@codefast/ui 0.1.55 → 0.1.56

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 (228) hide show
  1. package/dist/chunk-2D4K3VN5.js +2 -0
  2. package/dist/chunk-2D4K3VN5.js.map +1 -0
  3. package/dist/chunk-2ZV3RRUF.js +2 -0
  4. package/dist/chunk-2ZV3RRUF.js.map +1 -0
  5. package/dist/chunk-36JL64WE.js +2 -0
  6. package/dist/chunk-36JL64WE.js.map +1 -0
  7. package/dist/{chunk-EEDKRHHZ.cjs → chunk-4KP3LG6P.cjs} +2 -2
  8. package/dist/chunk-4KP3LG6P.cjs.map +1 -0
  9. package/dist/chunk-6AI2HSG6.js +2 -0
  10. package/dist/chunk-6AI2HSG6.js.map +1 -0
  11. package/dist/chunk-6IKJWYUQ.cjs +2 -0
  12. package/dist/chunk-6IKJWYUQ.cjs.map +1 -0
  13. package/dist/chunk-7D25EXRF.cjs +2 -0
  14. package/dist/chunk-7D25EXRF.cjs.map +1 -0
  15. package/dist/chunk-7G7GY6WB.cjs +2 -0
  16. package/dist/chunk-7G7GY6WB.cjs.map +1 -0
  17. package/dist/chunk-7GOKKSQ2.js +2 -0
  18. package/dist/chunk-7GOKKSQ2.js.map +1 -0
  19. package/dist/chunk-7M3I7GAI.cjs +2 -0
  20. package/dist/chunk-7M3I7GAI.cjs.map +1 -0
  21. package/dist/chunk-ANFCBS2Z.cjs +2 -0
  22. package/dist/chunk-ANFCBS2Z.cjs.map +1 -0
  23. package/dist/chunk-BBVYRCKN.cjs +2 -0
  24. package/dist/chunk-BBVYRCKN.cjs.map +1 -0
  25. package/dist/chunk-BP2FRPTA.js +2 -0
  26. package/dist/chunk-BP2FRPTA.js.map +1 -0
  27. package/dist/chunk-CFXQ7IR4.js +2 -0
  28. package/dist/chunk-CFXQ7IR4.js.map +1 -0
  29. package/dist/chunk-DRLZ27WH.cjs +2 -0
  30. package/dist/chunk-DRLZ27WH.cjs.map +1 -0
  31. package/dist/chunk-GAIGLFOT.js +2 -0
  32. package/dist/chunk-GAIGLFOT.js.map +1 -0
  33. package/dist/chunk-GBCWWLEX.js +2 -0
  34. package/dist/chunk-GBCWWLEX.js.map +1 -0
  35. package/dist/chunk-GCXQJEFZ.cjs +2 -0
  36. package/dist/chunk-GCXQJEFZ.cjs.map +1 -0
  37. package/dist/chunk-GDEO256Z.js +2 -0
  38. package/dist/chunk-GDEO256Z.js.map +1 -0
  39. package/dist/chunk-HXMLYPF5.js +2 -0
  40. package/dist/chunk-HXMLYPF5.js.map +1 -0
  41. package/dist/chunk-IDSE6FJ7.cjs +2 -0
  42. package/dist/chunk-IDSE6FJ7.cjs.map +1 -0
  43. package/dist/chunk-ITSIGICG.js +2 -0
  44. package/dist/chunk-ITSIGICG.js.map +1 -0
  45. package/dist/chunk-J7QU6N2U.js +2 -0
  46. package/dist/chunk-J7QU6N2U.js.map +1 -0
  47. package/dist/chunk-K32V3MHQ.cjs +2 -0
  48. package/dist/chunk-K32V3MHQ.cjs.map +1 -0
  49. package/dist/chunk-KEAW3ISB.cjs +2 -0
  50. package/dist/chunk-KEAW3ISB.cjs.map +1 -0
  51. package/dist/{chunk-E2QRPDUI.cjs → chunk-KFX5L3AF.cjs} +2 -2
  52. package/dist/{chunk-E2QRPDUI.cjs.map → chunk-KFX5L3AF.cjs.map} +1 -1
  53. package/dist/chunk-KYZ6DEDI.cjs +2 -0
  54. package/dist/chunk-KYZ6DEDI.cjs.map +1 -0
  55. package/dist/chunk-LQRU5KEQ.js +2 -0
  56. package/dist/chunk-LQRU5KEQ.js.map +1 -0
  57. package/dist/chunk-LUQA5J5W.cjs +2 -0
  58. package/dist/chunk-LUQA5J5W.cjs.map +1 -0
  59. package/dist/chunk-M25UFVFW.cjs +2 -0
  60. package/dist/chunk-M25UFVFW.cjs.map +1 -0
  61. package/dist/chunk-OIF6PONX.cjs +2 -0
  62. package/dist/chunk-OIF6PONX.cjs.map +1 -0
  63. package/dist/{chunk-FSXJI6UE.js → chunk-PP6Z3U6S.js} +2 -2
  64. package/dist/chunk-QISUHNKM.cjs +2 -0
  65. package/dist/chunk-QISUHNKM.cjs.map +1 -0
  66. package/dist/chunk-QUMY3I5T.js +2 -0
  67. package/dist/chunk-QUMY3I5T.js.map +1 -0
  68. package/dist/chunk-RNWK4YZ2.js +2 -0
  69. package/dist/chunk-RNWK4YZ2.js.map +1 -0
  70. package/dist/chunk-T2EOHTGR.js +2 -0
  71. package/dist/chunk-T2EOHTGR.js.map +1 -0
  72. package/dist/chunk-W3UMO54G.js +2 -0
  73. package/dist/chunk-W3UMO54G.js.map +1 -0
  74. package/dist/chunk-WNEFXTN4.cjs +2 -0
  75. package/dist/chunk-WNEFXTN4.cjs.map +1 -0
  76. package/dist/chunk-WZSVJ7BS.js +2 -0
  77. package/dist/chunk-WZSVJ7BS.js.map +1 -0
  78. package/dist/chunk-XEGQBIJR.cjs +2 -0
  79. package/dist/chunk-XEGQBIJR.cjs.map +1 -0
  80. package/dist/chunk-XRJ3USVN.js +2 -0
  81. package/dist/chunk-XRJ3USVN.js.map +1 -0
  82. package/dist/chunk-YEINLNE5.js +2 -0
  83. package/dist/chunk-YEINLNE5.js.map +1 -0
  84. package/dist/chunk-YMXAFSOU.cjs +2 -0
  85. package/dist/chunk-YMXAFSOU.cjs.map +1 -0
  86. package/dist/chunk-YQWAU4NX.cjs +2 -0
  87. package/dist/chunk-YQWAU4NX.cjs.map +1 -0
  88. package/dist/chunk-YSVRLPUL.js +2 -0
  89. package/dist/chunk-YSVRLPUL.js.map +1 -0
  90. package/dist/chunk-ZK6QHQWT.cjs +2 -0
  91. package/dist/chunk-ZK6QHQWT.cjs.map +1 -0
  92. package/dist/components/accordion.cjs +1 -1
  93. package/dist/components/accordion.js +1 -1
  94. package/dist/components/breadcrumb.cjs +1 -1
  95. package/dist/components/breadcrumb.js +1 -1
  96. package/dist/components/calendar.cjs +1 -1
  97. package/dist/components/calendar.js +1 -1
  98. package/dist/components/carousel.cjs +1 -1
  99. package/dist/components/carousel.js +1 -1
  100. package/dist/components/checkbox-cards.cjs +1 -1
  101. package/dist/components/checkbox-cards.js +1 -1
  102. package/dist/components/checkbox-group.cjs +1 -1
  103. package/dist/components/checkbox-group.js +1 -1
  104. package/dist/components/checkbox.cjs +1 -1
  105. package/dist/components/checkbox.js +1 -1
  106. package/dist/components/command.cjs +1 -1
  107. package/dist/components/command.js +1 -1
  108. package/dist/components/context-menu.cjs +1 -1
  109. package/dist/components/context-menu.js +1 -1
  110. package/dist/components/data-table.cjs +1 -1
  111. package/dist/components/data-table.js +1 -1
  112. package/dist/components/dialog.cjs +1 -1
  113. package/dist/components/dialog.js +1 -1
  114. package/dist/components/dropdown-menu.cjs +1 -1
  115. package/dist/components/dropdown-menu.js +1 -1
  116. package/dist/components/input-otp.cjs +1 -1
  117. package/dist/components/input-otp.js +1 -1
  118. package/dist/components/menubar.cjs +1 -1
  119. package/dist/components/menubar.js +1 -1
  120. package/dist/components/navigation-menu.cjs +1 -1
  121. package/dist/components/navigation-menu.js +1 -1
  122. package/dist/components/number-input.cjs +1 -1
  123. package/dist/components/number-input.js +1 -1
  124. package/dist/components/pagination.cjs +1 -1
  125. package/dist/components/pagination.js +1 -1
  126. package/dist/components/password-input.cjs +1 -1
  127. package/dist/components/password-input.js +1 -1
  128. package/dist/components/resizable.cjs +1 -1
  129. package/dist/components/resizable.js +1 -1
  130. package/dist/components/search-input.cjs +1 -1
  131. package/dist/components/search-input.js +1 -1
  132. package/dist/components/select.cjs +1 -1
  133. package/dist/components/select.js +1 -1
  134. package/dist/components/sheet.cjs +1 -1
  135. package/dist/components/sheet.js +1 -1
  136. package/dist/components/sidebar.cjs +1 -1
  137. package/dist/components/sidebar.js +1 -1
  138. package/dist/index.cjs +1 -1
  139. package/dist/index.js +1 -1
  140. package/package.json +9 -10
  141. package/dist/chunk-4PL3DAT2.cjs +0 -2
  142. package/dist/chunk-4PL3DAT2.cjs.map +0 -1
  143. package/dist/chunk-5I7UA4HT.js +0 -2
  144. package/dist/chunk-5I7UA4HT.js.map +0 -1
  145. package/dist/chunk-5LM6T7Z5.js +0 -2
  146. package/dist/chunk-5LM6T7Z5.js.map +0 -1
  147. package/dist/chunk-B5V32KRW.cjs +0 -2
  148. package/dist/chunk-B5V32KRW.cjs.map +0 -1
  149. package/dist/chunk-BAOFKRE7.cjs +0 -2
  150. package/dist/chunk-BAOFKRE7.cjs.map +0 -1
  151. package/dist/chunk-BHLW3MWI.js +0 -2
  152. package/dist/chunk-BHLW3MWI.js.map +0 -1
  153. package/dist/chunk-C4SXNTCJ.js +0 -2
  154. package/dist/chunk-C4SXNTCJ.js.map +0 -1
  155. package/dist/chunk-CRQ5URNB.js +0 -2
  156. package/dist/chunk-CRQ5URNB.js.map +0 -1
  157. package/dist/chunk-DIYHARQU.cjs +0 -2
  158. package/dist/chunk-DIYHARQU.cjs.map +0 -1
  159. package/dist/chunk-DQBQF25F.cjs +0 -2
  160. package/dist/chunk-DQBQF25F.cjs.map +0 -1
  161. package/dist/chunk-DUDXLCPG.js +0 -2
  162. package/dist/chunk-DUDXLCPG.js.map +0 -1
  163. package/dist/chunk-EEDKRHHZ.cjs.map +0 -1
  164. package/dist/chunk-GUOQM6BL.cjs +0 -2
  165. package/dist/chunk-GUOQM6BL.cjs.map +0 -1
  166. package/dist/chunk-GV5FQF4J.js +0 -2
  167. package/dist/chunk-GV5FQF4J.js.map +0 -1
  168. package/dist/chunk-I6LNZ6KP.cjs +0 -2
  169. package/dist/chunk-I6LNZ6KP.cjs.map +0 -1
  170. package/dist/chunk-IPRXHJQ5.cjs +0 -2
  171. package/dist/chunk-IPRXHJQ5.cjs.map +0 -1
  172. package/dist/chunk-JMYWGU6A.js +0 -2
  173. package/dist/chunk-JMYWGU6A.js.map +0 -1
  174. package/dist/chunk-KASTA74M.cjs +0 -2
  175. package/dist/chunk-KASTA74M.cjs.map +0 -1
  176. package/dist/chunk-LGRBBJSZ.js +0 -2
  177. package/dist/chunk-LGRBBJSZ.js.map +0 -1
  178. package/dist/chunk-LJPFJ6NG.js +0 -2
  179. package/dist/chunk-LJPFJ6NG.js.map +0 -1
  180. package/dist/chunk-MHH6QORE.cjs +0 -2
  181. package/dist/chunk-MHH6QORE.cjs.map +0 -1
  182. package/dist/chunk-MO7TQSRR.js +0 -2
  183. package/dist/chunk-MO7TQSRR.js.map +0 -1
  184. package/dist/chunk-MYT23AOL.js +0 -2
  185. package/dist/chunk-MYT23AOL.js.map +0 -1
  186. package/dist/chunk-O632SAUI.js +0 -2
  187. package/dist/chunk-O632SAUI.js.map +0 -1
  188. package/dist/chunk-OH3BXT6D.js +0 -2
  189. package/dist/chunk-OH3BXT6D.js.map +0 -1
  190. package/dist/chunk-OOEZEXWK.cjs +0 -2
  191. package/dist/chunk-OOEZEXWK.cjs.map +0 -1
  192. package/dist/chunk-OUWUINGX.cjs +0 -2
  193. package/dist/chunk-OUWUINGX.cjs.map +0 -1
  194. package/dist/chunk-P3YLZBAU.js +0 -2
  195. package/dist/chunk-P3YLZBAU.js.map +0 -1
  196. package/dist/chunk-PCKCN7MO.js +0 -2
  197. package/dist/chunk-PCKCN7MO.js.map +0 -1
  198. package/dist/chunk-PYKB3C2F.cjs +0 -2
  199. package/dist/chunk-PYKB3C2F.cjs.map +0 -1
  200. package/dist/chunk-Q7IH47TY.js +0 -2
  201. package/dist/chunk-Q7IH47TY.js.map +0 -1
  202. package/dist/chunk-QEIZTAWS.js +0 -2
  203. package/dist/chunk-QEIZTAWS.js.map +0 -1
  204. package/dist/chunk-R5235IUC.cjs +0 -2
  205. package/dist/chunk-R5235IUC.cjs.map +0 -1
  206. package/dist/chunk-RAOQ5OMD.cjs +0 -2
  207. package/dist/chunk-RAOQ5OMD.cjs.map +0 -1
  208. package/dist/chunk-SDGFNHJP.cjs +0 -2
  209. package/dist/chunk-SDGFNHJP.cjs.map +0 -1
  210. package/dist/chunk-TTKMKXCU.js +0 -2
  211. package/dist/chunk-TTKMKXCU.js.map +0 -1
  212. package/dist/chunk-UHHMORLE.js +0 -2
  213. package/dist/chunk-UHHMORLE.js.map +0 -1
  214. package/dist/chunk-UIVPC5TQ.cjs +0 -2
  215. package/dist/chunk-UIVPC5TQ.cjs.map +0 -1
  216. package/dist/chunk-UQWSMTYF.js +0 -2
  217. package/dist/chunk-UQWSMTYF.js.map +0 -1
  218. package/dist/chunk-VBE6D4FZ.cjs +0 -2
  219. package/dist/chunk-VBE6D4FZ.cjs.map +0 -1
  220. package/dist/chunk-VFOMCFSG.cjs +0 -2
  221. package/dist/chunk-VFOMCFSG.cjs.map +0 -1
  222. package/dist/chunk-YORY32TX.cjs +0 -2
  223. package/dist/chunk-YORY32TX.cjs.map +0 -1
  224. package/dist/chunk-YTSBANYY.js +0 -2
  225. package/dist/chunk-YTSBANYY.js.map +0 -1
  226. package/dist/chunk-Z7U5IONC.cjs +0 -2
  227. package/dist/chunk-Z7U5IONC.cjs.map +0 -1
  228. /package/dist/{chunk-FSXJI6UE.js.map → chunk-PP6Z3U6S.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-E2QRPDUI.cjs","../src/components/sidebar.tsx"],"names":["SIDEBAR_WIDTH","SIDEBAR_WIDTH_MOBILE","SidebarContext","createContext","useSidebar","SidebarProvider","defaultOpen","setOpenProp","className","children","isMobile","useMediaQuery","openMobile","useState","isOpen","setIsOpen","open","openProp","setOpen","useCallback","value","openState"],"mappings":"AAAA,6rBAAY,CAAC,wDAA6D,wDAAyC,wDAAyC,wDAA8D,wDAAyC,wDAAyC,wDCEnS,wCACA,iDACA,sEACA,2CAIP,8BASO,qDAqHC,+CA3GkB,IAAA,CAAA,CAAA,eACkB,CACxCA,CAAAA,CAAgB,EAAA,CAAA,EAAA,CAAA,EAChBC,CAAAA,CAAuB,CAAA,CAAA,CAAA,OACF,CAAA,CAAA,CAAA,OACO,CAAA,CAAA,CAAA,MACA,CAAA,EAY5BC,CAAiBC,GAAqC,CAAA,EAAI,CAAA,GAEhE,CAAA,CAAA,CAAA,kCAAA,IAASC,CAA6B,CACpC,SAAyC,CAAA,CAEzC,CAAA,CAAA,IACE,CAAA,CAAA,+BAAA,CAAA,CAAM,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,MAAM,IAAA,KAAA,CAAA,mDAiBpB,CAAA,CAAMC,OACD,CAAA,CAAA,IAAA,EAAA,CAAA,+BAAA,CAAAC,CAAAA,WAAoC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAcC,YAAaC,CAAAA,CAAW,CAAA,SAAO,CAAA,CAAA,CAAA,KAAAC,CAAU,CAAA,CAAA,QAAoB,CAChH,CAAA,CAAA,GAAMC,CAAWC,CAAAA,CAAc,CAAA,CAAA,EAAA,CAAA,IAAA,CAAA,CAAA,kCAAA,CAAA,YACzB,EAACC,EAAyB,CAAA,CAAIC,CAAAA,GAAc,CAAA,CAI5C,CAACC,CAAAA,CAAQC,CAAS,CAAA,CAAIF,CAAAA,6BAASP,CAAW,CAC1CU,CAAAA,CAAOC,CAAAA,CAAAA,CAAYH,CAAAA,CACnBI,CAAAA,6BAAUC,CACbC,CAAAA,CAAAA,CAAmD,kBAClD,CAAA,SAAA,GAAMC,CAAAA,CAAY,CAAA,gCAAA,CAAA,EAAA,CAAOD,IAAU,CAAA,CAAA,OAAA,CAAaA,EAAMJ,UAG/B,CAAA,CAErBD,CAAAA,CAAUM,CAAS,CAAA,CAIrB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAAA,CAAA,CAAA,QAA+B,CAAA,MAAa,CAAA,CAAA,EAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-E2QRPDUI.cjs","sourcesContent":[null,"'use client';\n\nimport { useMediaQuery } from '@codefast/hooks';\nimport { Slot } from '@radix-ui/react-slot';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport { PanelLeftIcon } from 'lucide-react';\nimport {\n type ComponentProps,\n type ComponentRef,\n createContext,\n type CSSProperties,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { tv, type VariantProps } from 'tailwind-variants';\n\nimport { Button } from '@/components/button';\nimport { Separator } from '@/components/separator';\nimport { Sheet, SheetContent, SheetDescription, SheetTitle } from '@/components/sheet';\nimport { Skeleton } from '@/components/skeleton';\nimport { TextInput } from '@/components/text-input';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/tooltip';\nimport { cn } from '@/lib/utils';\n\nconst SIDEBAR_COOKIE_NAME = 'sidebar:state';\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;\nconst SIDEBAR_WIDTH = '16rem';\nconst SIDEBAR_WIDTH_MOBILE = '18rem';\nconst SIDEBAR_WIDTH_ICON = '3rem';\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b';\nconst SIDEBAR_MOBILE_BREAKPOINT = 768;\n\ninterface SidebarContext {\n isMobile: boolean;\n open: boolean;\n openMobile: boolean;\n setOpen: (open: boolean) => void;\n setOpenMobile: (open: boolean) => void;\n state: 'expanded' | 'collapsed';\n toggleSidebar: () => void;\n}\n\nconst SidebarContext = createContext<SidebarContext | null>(null);\n\nfunction useSidebar(): SidebarContext {\n const context = useContext(SidebarContext);\n\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider.');\n }\n\n return context;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarProvider\n * -------------------------------------------------------------------------- */\n\ntype SidebarProviderElement = HTMLDivElement;\ninterface SidebarProviderProps extends ComponentProps<'div'> {\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n open?: boolean;\n}\n\nconst SidebarProvider = forwardRef<SidebarProviderElement, SidebarProviderProps>(\n ({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }, ref) => {\n const isMobile = useMediaQuery(`(max-width: ${SIDEBAR_MOBILE_BREAKPOINT - 1}px)`);\n const [openMobile, setOpenMobile] = useState(false);\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [isOpen, setIsOpen] = useState(defaultOpen);\n const open = openProp ?? isOpen;\n const setOpen = useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === 'function' ? value(open) : value;\n\n if (setOpenProp) {\n setOpenProp(openState);\n } else {\n setIsOpen(openState);\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;\n },\n [setOpenProp, open],\n );\n\n // Helper to toggle the sidebar.\n const toggleSidebar = useCallback(() => {\n isMobile ? setOpenMobile((currentValue) => !currentValue) : setOpen((currentValue) => !currentValue);\n }, [isMobile, setOpen, setOpenMobile]);\n\n // Adds a keyboard shortcut to toggle the sidebar.\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent): void => {\n if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {\n event.preventDefault();\n toggleSidebar();\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n };\n }, [toggleSidebar]);\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? 'expanded' : 'collapsed';\n\n const contextValue = useMemo<SidebarContext>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar],\n );\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n ref={ref}\n className={cn(\n 'group/sidebar-wrapper has-[[data-variant=inset]]:bg-sidebar flex min-h-svh w-full',\n className,\n )}\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n ...style,\n } as CSSProperties\n }\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n );\n },\n);\n\nSidebarProvider.displayName = 'SidebarProvider';\n\n/* -----------------------------------------------------------------------------\n * Component: Sidebar\n * -------------------------------------------------------------------------- */\n\ntype SidebarElement = HTMLDivElement;\ninterface SidebarProps extends ComponentProps<'div'> {\n collapsible?: 'offcanvas' | 'icon' | 'none';\n side?: 'left' | 'right';\n variant?: 'sidebar' | 'floating' | 'inset';\n}\n\nconst Sidebar = forwardRef<SidebarElement, SidebarProps>(\n ({ side = 'left', variant = 'sidebar', collapsible = 'offcanvas', className, children, ...props }, ref) => {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar();\n\n if (collapsible === 'none') {\n return (\n <div\n ref={ref}\n className={cn('bg-sidebar text-sidebar-foreground flex h-full w-[--sidebar-width] flex-col', className)}\n {...props}\n >\n {children}\n </div>\n );\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n className=\"bg-sidebar text-sidebar-foreground w-[--sidebar-width] p-0 [&>button]:hidden\"\n data-mobile=\"true\"\n data-sidebar=\"sidebar\"\n side={side}\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH_MOBILE,\n } as CSSProperties\n }\n >\n <VisuallyHidden>\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Press escape to close the sidebar</SheetDescription>\n </VisuallyHidden>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n );\n }\n\n return (\n <div\n ref={ref}\n className=\"text-sidebar-foreground group peer hidden md:block\"\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-side={side}\n data-state={state}\n data-variant={variant}\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n className={cn(\n 'relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n variant === 'floating' || variant === 'inset'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]'\n : 'group-data-[collapsible=icon]:w-[--sidebar-width-icon]',\n )}\n />\n <div\n className={cn(\n 'fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex',\n side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'\n : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n // Adjust the padding for floating and inset variants.\n variant === 'floating' || variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]'\n : 'group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l',\n className,\n )}\n {...props}\n >\n <div\n className=\"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow\"\n data-sidebar=\"sidebar\"\n >\n {children}\n </div>\n </div>\n </div>\n );\n },\n);\n\nSidebar.displayName = 'Sidebar';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarTrigger\n * -------------------------------------------------------------------------- */\n\ntype SidebarTriggerElement = ComponentRef<typeof Button>;\ntype SidebarTriggerProps = ComponentProps<typeof Button>;\n\nconst SidebarTrigger = forwardRef<SidebarTriggerElement, SidebarTriggerProps>(\n ({ className, onClick, ...props }, ref) => {\n const { toggleSidebar } = useSidebar();\n\n return (\n <Button\n ref={ref}\n icon\n className={cn('', className)}\n data-sidebar=\"trigger\"\n size=\"xxs\"\n variant=\"ghost\"\n onClick={(event) => {\n onClick?.(event);\n toggleSidebar();\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n );\n },\n);\n\nSidebarTrigger.displayName = 'SidebarTrigger';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarRail\n * -------------------------------------------------------------------------- */\n\ntype SidebarRailElement = HTMLButtonElement;\ntype SidebarRailProps = ComponentProps<'button'>;\n\nconst SidebarRail = forwardRef<SidebarRailElement, SidebarRailProps>(({ className, ...props }, ref) => {\n const { toggleSidebar } = useSidebar();\n\n return (\n <button\n ref={ref}\n aria-label=\"Toggle Sidebar\"\n className={cn(\n 'hover:after:bg-sidebar-border 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-0.5 group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex',\n '[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'group-data-[collapsible=offcanvas]:hover:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',\n className,\n )}\n data-sidebar=\"rail\"\n tabIndex={-1}\n title=\"Toggle Sidebar\"\n type=\"button\"\n onClick={toggleSidebar}\n {...props}\n />\n );\n});\n\nSidebarRail.displayName = 'SidebarRail';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarInset\n * -------------------------------------------------------------------------- */\n\ntype SidebarInsetElement = HTMLDivElement;\ntype SidebarInsetProps = ComponentProps<'main'>;\n\nconst SidebarInset = forwardRef<SidebarInsetElement, SidebarInsetProps>(({ className, ...props }, ref) => {\n return (\n <main\n ref={ref}\n className={cn(\n 'bg-background relative flex min-h-svh flex-1 flex-col',\n 'peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow',\n className,\n )}\n {...props}\n />\n );\n});\n\nSidebarInset.displayName = 'SidebarInset';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarInput\n * -------------------------------------------------------------------------- */\n\ntype SidebarInputElement = ComponentRef<typeof TextInput>;\ntype SidebarInputProps = ComponentProps<typeof TextInput>;\n\nconst SidebarInput = forwardRef<SidebarInputElement, SidebarInputProps>(({ className, ...props }, ref) => {\n return (\n <TextInput\n ref={ref}\n className={cn(\n 'bg-background focus-visible:ring-sidebar-ring h-8 w-full shadow-none focus-visible:ring-2',\n className,\n )}\n data-sidebar=\"input\"\n {...props}\n />\n );\n});\n\nSidebarInput.displayName = 'SidebarInput';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarHeader\n * -------------------------------------------------------------------------- */\n\ntype SidebarHeaderElement = HTMLDivElement;\ntype SidebarHeaderProps = ComponentProps<'div'>;\n\nconst SidebarHeader = forwardRef<SidebarHeaderElement, SidebarHeaderProps>(({ className, ...props }, ref) => {\n return <div ref={ref} className={cn('flex flex-col gap-2 p-2', className)} data-sidebar=\"header\" {...props} />;\n});\n\nSidebarHeader.displayName = 'SidebarHeader';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarFooter\n * -------------------------------------------------------------------------- */\n\ntype SidebarFooterElement = HTMLDivElement;\ntype SidebarFooterProps = ComponentProps<'div'>;\n\nconst SidebarFooter = forwardRef<SidebarFooterElement, SidebarFooterProps>(({ className, ...props }, ref) => {\n return <div ref={ref} className={cn('flex flex-col gap-2 p-2', className)} data-sidebar=\"footer\" {...props} />;\n});\n\nSidebarFooter.displayName = 'SidebarFooter';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarSeparator\n * -------------------------------------------------------------------------- */\n\ntype SidebarSeparatorElement = ComponentRef<typeof Separator>;\ntype SidebarSeparatorProps = ComponentProps<typeof Separator>;\n\nconst SidebarSeparator = forwardRef<SidebarSeparatorElement, SidebarSeparatorProps>(({ className, ...props }, ref) => {\n return (\n <Separator\n ref={ref}\n className={cn('bg-sidebar-border mx-2 w-auto', className)}\n data-sidebar=\"separator\"\n {...props}\n />\n );\n});\n\nSidebarSeparator.displayName = 'SidebarSeparator';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarContent\n * -------------------------------------------------------------------------- */\n\ntype SidebarContentElement = HTMLDivElement;\ntype SidebarContentProps = ComponentProps<'div'>;\n\nconst SidebarContent = forwardRef<SidebarContentElement, SidebarContentProps>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n 'flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden',\n className,\n )}\n data-sidebar=\"content\"\n {...props}\n />\n );\n});\n\nSidebarContent.displayName = 'SidebarContent';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarGroup\n * -------------------------------------------------------------------------- */\n\ntype SidebarGroupElement = HTMLDivElement;\ntype SidebarGroupProps = ComponentProps<'div'>;\n\nconst SidebarGroup = forwardRef<SidebarGroupElement, SidebarGroupProps>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn('relative flex w-full min-w-0 flex-col p-2', className)}\n data-sidebar=\"group\"\n {...props}\n />\n );\n});\n\nSidebarGroup.displayName = 'SidebarGroup';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarGroupLabel\n * -------------------------------------------------------------------------- */\n\ntype SidebarGroupLabelElement = HTMLDivElement;\ninterface SidebarGroupLabelProps extends ComponentProps<'div'> {\n asChild?: boolean;\n}\n\nconst SidebarGroupLabel = forwardRef<SidebarGroupLabelElement, SidebarGroupLabelProps>(\n ({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'div';\n\n return (\n <Comp\n ref={ref}\n className={cn(\n 'text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-none transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',\n className,\n )}\n data-sidebar=\"group-label\"\n {...props}\n />\n );\n },\n);\n\nSidebarGroupLabel.displayName = 'SidebarGroupLabel';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarGroupAction\n * -------------------------------------------------------------------------- */\n\ntype SidebarGroupActionElement = HTMLButtonElement;\ninterface SidebarGroupActionProps extends ComponentProps<'button'> {\n asChild?: boolean;\n}\n\nconst SidebarGroupAction = forwardRef<SidebarGroupActionElement, SidebarGroupActionProps>(\n ({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n ref={ref}\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-none transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:absolute after:-inset-2 after:md:hidden',\n 'group-data-[collapsible=icon]:hidden',\n className,\n )}\n data-sidebar=\"group-action\"\n {...props}\n />\n );\n },\n);\n\nSidebarGroupAction.displayName = 'SidebarGroupAction';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarGroupContent\n * -------------------------------------------------------------------------- */\n\ntype SidebarGroupContentElement = HTMLDivElement;\ntype SidebarGroupContentProps = ComponentProps<'div'>;\n\nconst SidebarGroupContent = forwardRef<SidebarGroupContentElement, SidebarGroupContentProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('w-full text-sm', className)} data-sidebar=\"group-content\" {...props} />\n ),\n);\n\nSidebarGroupContent.displayName = 'SidebarGroupContent';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenu\n * -------------------------------------------------------------------------- */\n\ntype SidebarMenuElement = HTMLUListElement;\ntype SidebarMenuProps = ComponentProps<'ul'>;\n\nconst SidebarMenu = forwardRef<SidebarMenuElement, SidebarMenuProps>(({ className, ...props }, ref) => (\n <ul ref={ref} className={cn('flex w-full min-w-0 flex-col gap-1', className)} data-sidebar=\"menu\" {...props} />\n));\n\nSidebarMenu.displayName = 'SidebarMenu';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuItem\n * -------------------------------------------------------------------------- */\n\ntype SidebarMenuItemElement = HTMLLIElement;\ntype SidebarMenuItemProps = ComponentProps<'li'>;\n\nconst SidebarMenuItem = forwardRef<SidebarMenuItemElement, SidebarMenuItemProps>(({ className, ...props }, ref) => (\n <li ref={ref} className={cn('group/menu-item relative', className)} data-sidebar=\"menu-item\" {...props} />\n));\n\nSidebarMenuItem.displayName = 'SidebarMenuItem';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuButton\n * -------------------------------------------------------------------------- */\n\nconst sidebarMenuButtonVariants = tv({\n base: 'peer/menu-button ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none transition-[width,height,padding] focus-visible:ring-2 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]:font-medium group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',\n variants: {\n variant: {\n default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',\n outline:\n 'bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]',\n },\n size: {\n default: 'h-8 text-sm',\n sm: 'h-7 text-xs',\n lg: 'h-12 text-sm group-data-[collapsible=icon]:!p-0',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n});\n\ntype SidebarMenuButtonElement = HTMLButtonElement;\ninterface SidebarMenuButtonProps extends ComponentProps<'button'>, VariantProps<typeof sidebarMenuButtonVariants> {\n asChild?: boolean;\n isActive?: boolean;\n tooltip?: string | ComponentProps<typeof TooltipContent>;\n}\n\nconst SidebarMenuButton = forwardRef<SidebarMenuButtonElement, SidebarMenuButtonProps>(\n ({ asChild = false, isActive = false, variant = 'default', size = 'default', tooltip, className, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n const { isMobile, state } = useSidebar();\n\n const button = (\n <Comp\n ref={ref}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n data-active={isActive}\n data-sidebar=\"menu-button\"\n data-size={size}\n {...props}\n />\n );\n\n if (!tooltip) {\n return button;\n }\n\n const tooltipProps =\n typeof tooltip === 'string'\n ? {\n children: tooltip,\n }\n : tooltip;\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent align=\"center\" hidden={state !== 'collapsed' || isMobile} side=\"right\" {...tooltipProps} />\n </Tooltip>\n );\n },\n);\n\nSidebarMenuButton.displayName = 'SidebarMenuButton';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuAction\n * -------------------------------------------------------------------------- */\n\ntype SidebarMenuActionElement = HTMLButtonElement;\ninterface SidebarMenuActionProps extends ComponentProps<'button'> {\n asChild?: boolean;\n showOnHover?: boolean;\n}\nconst SidebarMenuAction = forwardRef<SidebarMenuActionElement, SidebarMenuActionProps>(\n ({ className, asChild = false, showOnHover = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n ref={ref}\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-none transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:absolute after:-inset-2 after:md:hidden',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n showOnHover &&\n 'peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0',\n className,\n )}\n data-sidebar=\"menu-action\"\n {...props}\n />\n );\n },\n);\n\nSidebarMenuAction.displayName = 'SidebarMenuAction';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuBadge\n * -------------------------------------------------------------------------- */\n\ntype SidebarMenuBadgeElement = HTMLDivElement;\ntype SidebarMenuBadgeProps = ComponentProps<'div'>;\nconst SidebarMenuBadge = forwardRef<SidebarMenuBadgeElement, SidebarMenuBadgeProps>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'text-sidebar-foreground 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',\n 'peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n className,\n )}\n data-sidebar=\"menu-badge\"\n {...props}\n />\n));\n\nSidebarMenuBadge.displayName = 'SidebarMenuBadge';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSkeleton\n * -------------------------------------------------------------------------- */\n\ntype SidebarMenuSkeletonElement = HTMLDivElement;\ninterface SidebarMenuSkeletonProps extends ComponentProps<'div'> {\n showIcon?: boolean;\n}\nconst SidebarMenuSkeleton = forwardRef<SidebarMenuSkeletonElement, SidebarMenuSkeletonProps>(\n ({ className, showIcon = false, ...props }, ref) => {\n // Random width between 50 to 90%.\n const width = useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`;\n }, []);\n\n return (\n <div\n ref={ref}\n className={cn('flex h-8 items-center gap-2 rounded-md px-2', className)}\n data-sidebar=\"menu-skeleton\"\n {...props}\n >\n {showIcon ? <Skeleton className=\"size-4 rounded-md\" data-sidebar=\"menu-skeleton-icon\" /> : null}\n <Skeleton\n className=\"h-4 max-w-[--skeleton-width] flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n '--skeleton-width': width,\n } as CSSProperties\n }\n />\n </div>\n );\n },\n);\n\nSidebarMenuSkeleton.displayName = 'SidebarMenuSkeleton';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSub\n * -------------------------------------------------------------------------- */\n\ntype SidebarMenuSubElement = HTMLUListElement;\ntype SidebarMenuSubProps = ComponentProps<'ul'>;\nconst SidebarMenuSub = forwardRef<SidebarMenuSubElement, SidebarMenuSubProps>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn(\n 'border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5',\n 'group-data-[collapsible=icon]:hidden',\n className,\n )}\n data-sidebar=\"menu-sub\"\n {...props}\n />\n));\n\nSidebarMenuSub.displayName = 'SidebarMenuSub';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSubItem\n * -------------------------------------------------------------------------- */\n\ntype SidebarMenuSubItemElement = HTMLLIElement;\ntype SidebarMenuSubItemProps = ComponentProps<'li'>;\nconst SidebarMenuSubItem = forwardRef<SidebarMenuSubItemElement, SidebarMenuSubItemProps>(({ ...props }, ref) => (\n <li ref={ref} {...props} />\n));\n\nSidebarMenuSubItem.displayName = 'SidebarMenuSubItem';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSubButton\n * -------------------------------------------------------------------------- */\n\ntype SidebarMenuSubButtonElement = HTMLAnchorElement;\ninterface SidebarMenuSubButtonProps extends ComponentProps<'a'> {\n asChild?: boolean;\n isActive?: boolean;\n size?: 'sm' | 'md';\n}\n\nconst SidebarMenuSubButton = forwardRef<SidebarMenuSubButtonElement, SidebarMenuSubButtonProps>(\n ({ asChild = false, size = 'md', isActive, className, ...props }, ref) => {\n const Comp = asChild ? Slot : 'a';\n\n return (\n <Comp\n ref={ref}\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',\n 'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground',\n size === 'sm' && 'text-xs',\n size === 'md' && 'text-sm',\n 'group-data-[collapsible=icon]:hidden',\n className,\n )}\n data-active={isActive}\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n {...props}\n />\n );\n },\n);\n\nSidebarMenuSubButton.displayName = 'SidebarMenuSubButton';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n};\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-KFX5L3AF.cjs","../src/components/sidebar.tsx"],"names":["SIDEBAR_WIDTH","SIDEBAR_WIDTH_MOBILE","SidebarContext","createContext","useSidebar","SidebarProvider","defaultOpen","setOpenProp","className","children","isMobile","useMediaQuery","openMobile","useState","isOpen","setIsOpen","open","openProp","setOpen","useCallback","value","openState"],"mappings":"AAAA,6rBAAY,CAAC,wDAA6D,wDAAyC,wDAAyC,wDAA8D,wDAAyC,wDAAyC,wDCEnS,wCACA,iDACA,sEACA,2CAIP,8BASO,qDAqHC,+CA3GkB,IAAA,CAAA,CAAA,eACkB,CACxCA,CAAAA,CAAgB,EAAA,CAAA,EAAA,CAAA,EAChBC,CAAAA,CAAuB,CAAA,CAAA,CAAA,OACF,CAAA,CAAA,CAAA,OACO,CAAA,CAAA,CAAA,MACA,CAAA,EAY5BC,CAAiBC,GAAqC,CAAA,EAAI,CAAA,GAEhE,CAAA,CAAA,CAAA,kCAAA,IAASC,CAA6B,CACpC,SAAyC,CAAA,CAEzC,CAAA,CAAA,IACE,CAAA,CAAA,+BAAA,CAAA,CAAM,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,MAAM,IAAA,KAAA,CAAA,mDAiBpB,CAAA,CAAMC,OACD,CAAA,CAAA,IAAA,EAAA,CAAA,+BAAA,CAAAC,CAAAA,WAAoC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAcC,YAAaC,CAAAA,CAAW,CAAA,SAAO,CAAA,CAAA,CAAA,KAAAC,CAAU,CAAA,CAAA,QAAoB,CAChH,CAAA,CAAA,GAAMC,CAAWC,CAAAA,CAAc,CAAA,CAAA,EAAA,CAAA,IAAA,CAAA,CAAA,kCAAA,CAAA,YACzB,EAACC,EAAyB,CAAA,CAAIC,CAAAA,GAAc,CAAA,CAI5C,CAACC,CAAAA,CAAQC,CAAS,CAAA,CAAIF,CAAAA,6BAASP,CAAW,CAC1CU,CAAAA,CAAOC,CAAAA,CAAAA,CAAYH,CAAAA,CACnBI,CAAAA,6BAAUC,CACbC,CAAAA,CAAAA,CAAmD,kBAClD,CAAA,SAAA,GAAMC,CAAAA,CAAY,CAAA,gCAAA,CAAA,EAAA,CAAOD,IAAU,CAAA,CAAA,OAAA,CAAaA,EAAMJ,UAG/B,CAAA,CAErBD,CAAAA,CAAUM,CAAS,CAAA,CAIrB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAAA,CAAA,CAAA,QAA+B,CAAA,MAAa,CAAA,CAAA,EAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-KFX5L3AF.cjs","sourcesContent":[null,"'use client';\n\nimport { useMediaQuery } from '@codefast/hooks';\nimport { Slot } from '@radix-ui/react-slot';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport { PanelLeftIcon } from 'lucide-react';\nimport {\n type ComponentProps,\n type ComponentRef,\n createContext,\n type CSSProperties,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { tv, type VariantProps } from 'tailwind-variants';\n\nimport { Button } from '@/components/button';\nimport { Separator } from '@/components/separator';\nimport { Sheet, SheetContent, SheetDescription, SheetTitle } from '@/components/sheet';\nimport { Skeleton } from '@/components/skeleton';\nimport { TextInput } from '@/components/text-input';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/tooltip';\nimport { cn } from '@/lib/utils';\n\nconst SIDEBAR_COOKIE_NAME = 'sidebar:state';\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;\nconst SIDEBAR_WIDTH = '16rem';\nconst SIDEBAR_WIDTH_MOBILE = '18rem';\nconst SIDEBAR_WIDTH_ICON = '3rem';\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b';\nconst SIDEBAR_MOBILE_BREAKPOINT = 768;\n\ninterface SidebarContext {\n isMobile: boolean;\n open: boolean;\n openMobile: boolean;\n setOpen: (open: boolean) => void;\n setOpenMobile: (open: boolean) => void;\n state: 'expanded' | 'collapsed';\n toggleSidebar: () => void;\n}\n\nconst SidebarContext = createContext<SidebarContext | null>(null);\n\nfunction useSidebar(): SidebarContext {\n const context = useContext(SidebarContext);\n\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider.');\n }\n\n return context;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarProvider\n * -------------------------------------------------------------------------- */\n\ntype SidebarProviderElement = HTMLDivElement;\ninterface SidebarProviderProps extends ComponentProps<'div'> {\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n open?: boolean;\n}\n\nconst SidebarProvider = forwardRef<SidebarProviderElement, SidebarProviderProps>(\n ({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }, ref) => {\n const isMobile = useMediaQuery(`(max-width: ${SIDEBAR_MOBILE_BREAKPOINT - 1}px)`);\n const [openMobile, setOpenMobile] = useState(false);\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [isOpen, setIsOpen] = useState(defaultOpen);\n const open = openProp ?? isOpen;\n const setOpen = useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === 'function' ? value(open) : value;\n\n if (setOpenProp) {\n setOpenProp(openState);\n } else {\n setIsOpen(openState);\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;\n },\n [setOpenProp, open],\n );\n\n // Helper to toggle the sidebar.\n const toggleSidebar = useCallback(() => {\n isMobile ? setOpenMobile((currentValue) => !currentValue) : setOpen((currentValue) => !currentValue);\n }, [isMobile, setOpen, setOpenMobile]);\n\n // Adds a keyboard shortcut to toggle the sidebar.\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent): void => {\n if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {\n event.preventDefault();\n toggleSidebar();\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n };\n }, [toggleSidebar]);\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? 'expanded' : 'collapsed';\n\n const contextValue = useMemo<SidebarContext>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar],\n );\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n ref={ref}\n className={cn(\n 'group/sidebar-wrapper has-[[data-variant=inset]]:bg-sidebar flex min-h-svh w-full',\n className,\n )}\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n ...style,\n } as CSSProperties\n }\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n );\n },\n);\n\nSidebarProvider.displayName = 'SidebarProvider';\n\n/* -----------------------------------------------------------------------------\n * Component: Sidebar\n * -------------------------------------------------------------------------- */\n\ntype SidebarElement = HTMLDivElement;\ninterface SidebarProps extends ComponentProps<'div'> {\n collapsible?: 'offcanvas' | 'icon' | 'none';\n side?: 'left' | 'right';\n variant?: 'sidebar' | 'floating' | 'inset';\n}\n\nconst Sidebar = forwardRef<SidebarElement, SidebarProps>(\n ({ side = 'left', variant = 'sidebar', collapsible = 'offcanvas', className, children, ...props }, ref) => {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar();\n\n if (collapsible === 'none') {\n return (\n <div\n ref={ref}\n className={cn('bg-sidebar text-sidebar-foreground flex h-full w-[--sidebar-width] flex-col', className)}\n {...props}\n >\n {children}\n </div>\n );\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n className=\"bg-sidebar text-sidebar-foreground w-[--sidebar-width] p-0 [&>button]:hidden\"\n data-mobile=\"true\"\n data-sidebar=\"sidebar\"\n side={side}\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH_MOBILE,\n } as CSSProperties\n }\n >\n <VisuallyHidden>\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Press escape to close the sidebar</SheetDescription>\n </VisuallyHidden>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n );\n }\n\n return (\n <div\n ref={ref}\n className=\"text-sidebar-foreground group peer hidden md:block\"\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-side={side}\n data-state={state}\n data-variant={variant}\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n className={cn(\n 'relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n variant === 'floating' || variant === 'inset'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]'\n : 'group-data-[collapsible=icon]:w-[--sidebar-width-icon]',\n )}\n />\n <div\n className={cn(\n 'fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex',\n side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'\n : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n // Adjust the padding for floating and inset variants.\n variant === 'floating' || variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]'\n : 'group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l',\n className,\n )}\n {...props}\n >\n <div\n className=\"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow\"\n data-sidebar=\"sidebar\"\n >\n {children}\n </div>\n </div>\n </div>\n );\n },\n);\n\nSidebar.displayName = 'Sidebar';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarTrigger\n * -------------------------------------------------------------------------- */\n\ntype SidebarTriggerElement = ComponentRef<typeof Button>;\ntype SidebarTriggerProps = ComponentProps<typeof Button>;\n\nconst SidebarTrigger = forwardRef<SidebarTriggerElement, SidebarTriggerProps>(\n ({ className, onClick, ...props }, ref) => {\n const { toggleSidebar } = useSidebar();\n\n return (\n <Button\n ref={ref}\n icon\n className={cn('', className)}\n data-sidebar=\"trigger\"\n size=\"xxs\"\n variant=\"ghost\"\n onClick={(event) => {\n onClick?.(event);\n toggleSidebar();\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n );\n },\n);\n\nSidebarTrigger.displayName = 'SidebarTrigger';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarRail\n * -------------------------------------------------------------------------- */\n\ntype SidebarRailElement = HTMLButtonElement;\ntype SidebarRailProps = ComponentProps<'button'>;\n\nconst SidebarRail = forwardRef<SidebarRailElement, SidebarRailProps>(({ className, ...props }, ref) => {\n const { toggleSidebar } = useSidebar();\n\n return (\n <button\n ref={ref}\n aria-label=\"Toggle Sidebar\"\n className={cn(\n 'hover:after:bg-sidebar-border 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-0.5 group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex',\n '[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'group-data-[collapsible=offcanvas]:hover:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',\n className,\n )}\n data-sidebar=\"rail\"\n tabIndex={-1}\n title=\"Toggle Sidebar\"\n type=\"button\"\n onClick={toggleSidebar}\n {...props}\n />\n );\n});\n\nSidebarRail.displayName = 'SidebarRail';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarInset\n * -------------------------------------------------------------------------- */\n\ntype SidebarInsetElement = HTMLDivElement;\ntype SidebarInsetProps = ComponentProps<'main'>;\n\nconst SidebarInset = forwardRef<SidebarInsetElement, SidebarInsetProps>(({ className, ...props }, ref) => {\n return (\n <main\n ref={ref}\n className={cn(\n 'bg-background relative flex min-h-svh flex-1 flex-col',\n 'peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow',\n className,\n )}\n {...props}\n />\n );\n});\n\nSidebarInset.displayName = 'SidebarInset';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarInput\n * -------------------------------------------------------------------------- */\n\ntype SidebarInputElement = ComponentRef<typeof TextInput>;\ntype SidebarInputProps = ComponentProps<typeof TextInput>;\n\nconst SidebarInput = forwardRef<SidebarInputElement, SidebarInputProps>(({ className, ...props }, ref) => {\n return (\n <TextInput\n ref={ref}\n className={cn(\n 'bg-background focus-visible:ring-sidebar-ring h-8 w-full shadow-none focus-visible:ring-2',\n className,\n )}\n data-sidebar=\"input\"\n {...props}\n />\n );\n});\n\nSidebarInput.displayName = 'SidebarInput';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarHeader\n * -------------------------------------------------------------------------- */\n\ntype SidebarHeaderElement = HTMLDivElement;\ntype SidebarHeaderProps = ComponentProps<'div'>;\n\nconst SidebarHeader = forwardRef<SidebarHeaderElement, SidebarHeaderProps>(({ className, ...props }, ref) => {\n return <div ref={ref} className={cn('flex flex-col gap-2 p-2', className)} data-sidebar=\"header\" {...props} />;\n});\n\nSidebarHeader.displayName = 'SidebarHeader';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarFooter\n * -------------------------------------------------------------------------- */\n\ntype SidebarFooterElement = HTMLDivElement;\ntype SidebarFooterProps = ComponentProps<'div'>;\n\nconst SidebarFooter = forwardRef<SidebarFooterElement, SidebarFooterProps>(({ className, ...props }, ref) => {\n return <div ref={ref} className={cn('flex flex-col gap-2 p-2', className)} data-sidebar=\"footer\" {...props} />;\n});\n\nSidebarFooter.displayName = 'SidebarFooter';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarSeparator\n * -------------------------------------------------------------------------- */\n\ntype SidebarSeparatorElement = ComponentRef<typeof Separator>;\ntype SidebarSeparatorProps = ComponentProps<typeof Separator>;\n\nconst SidebarSeparator = forwardRef<SidebarSeparatorElement, SidebarSeparatorProps>(({ className, ...props }, ref) => {\n return (\n <Separator\n ref={ref}\n className={cn('bg-sidebar-border mx-2 w-auto', className)}\n data-sidebar=\"separator\"\n {...props}\n />\n );\n});\n\nSidebarSeparator.displayName = 'SidebarSeparator';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarContent\n * -------------------------------------------------------------------------- */\n\ntype SidebarContentElement = HTMLDivElement;\ntype SidebarContentProps = ComponentProps<'div'>;\n\nconst SidebarContent = forwardRef<SidebarContentElement, SidebarContentProps>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n 'flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden',\n className,\n )}\n data-sidebar=\"content\"\n {...props}\n />\n );\n});\n\nSidebarContent.displayName = 'SidebarContent';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarGroup\n * -------------------------------------------------------------------------- */\n\ntype SidebarGroupElement = HTMLDivElement;\ntype SidebarGroupProps = ComponentProps<'div'>;\n\nconst SidebarGroup = forwardRef<SidebarGroupElement, SidebarGroupProps>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn('relative flex w-full min-w-0 flex-col p-2', className)}\n data-sidebar=\"group\"\n {...props}\n />\n );\n});\n\nSidebarGroup.displayName = 'SidebarGroup';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarGroupLabel\n * -------------------------------------------------------------------------- */\n\ntype SidebarGroupLabelElement = HTMLDivElement;\ninterface SidebarGroupLabelProps extends ComponentProps<'div'> {\n asChild?: boolean;\n}\n\nconst SidebarGroupLabel = forwardRef<SidebarGroupLabelElement, SidebarGroupLabelProps>(\n ({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'div';\n\n return (\n <Comp\n ref={ref}\n className={cn(\n 'text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-none transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',\n className,\n )}\n data-sidebar=\"group-label\"\n {...props}\n />\n );\n },\n);\n\nSidebarGroupLabel.displayName = 'SidebarGroupLabel';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarGroupAction\n * -------------------------------------------------------------------------- */\n\ntype SidebarGroupActionElement = HTMLButtonElement;\ninterface SidebarGroupActionProps extends ComponentProps<'button'> {\n asChild?: boolean;\n}\n\nconst SidebarGroupAction = forwardRef<SidebarGroupActionElement, SidebarGroupActionProps>(\n ({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n ref={ref}\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-none transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:absolute after:-inset-2 after:md:hidden',\n 'group-data-[collapsible=icon]:hidden',\n className,\n )}\n data-sidebar=\"group-action\"\n {...props}\n />\n );\n },\n);\n\nSidebarGroupAction.displayName = 'SidebarGroupAction';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarGroupContent\n * -------------------------------------------------------------------------- */\n\ntype SidebarGroupContentElement = HTMLDivElement;\ntype SidebarGroupContentProps = ComponentProps<'div'>;\n\nconst SidebarGroupContent = forwardRef<SidebarGroupContentElement, SidebarGroupContentProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('w-full text-sm', className)} data-sidebar=\"group-content\" {...props} />\n ),\n);\n\nSidebarGroupContent.displayName = 'SidebarGroupContent';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenu\n * -------------------------------------------------------------------------- */\n\ntype SidebarMenuElement = HTMLUListElement;\ntype SidebarMenuProps = ComponentProps<'ul'>;\n\nconst SidebarMenu = forwardRef<SidebarMenuElement, SidebarMenuProps>(({ className, ...props }, ref) => (\n <ul ref={ref} className={cn('flex w-full min-w-0 flex-col gap-1', className)} data-sidebar=\"menu\" {...props} />\n));\n\nSidebarMenu.displayName = 'SidebarMenu';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuItem\n * -------------------------------------------------------------------------- */\n\ntype SidebarMenuItemElement = HTMLLIElement;\ntype SidebarMenuItemProps = ComponentProps<'li'>;\n\nconst SidebarMenuItem = forwardRef<SidebarMenuItemElement, SidebarMenuItemProps>(({ className, ...props }, ref) => (\n <li ref={ref} className={cn('group/menu-item relative', className)} data-sidebar=\"menu-item\" {...props} />\n));\n\nSidebarMenuItem.displayName = 'SidebarMenuItem';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuButton\n * -------------------------------------------------------------------------- */\n\nconst sidebarMenuButtonVariants = tv({\n base: 'peer/menu-button ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none transition-[width,height,padding] focus-visible:ring-2 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]:font-medium group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',\n variants: {\n variant: {\n default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',\n outline:\n 'bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]',\n },\n size: {\n default: 'h-8 text-sm',\n sm: 'h-7 text-xs',\n lg: 'h-12 text-sm group-data-[collapsible=icon]:!p-0',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n});\n\ntype SidebarMenuButtonElement = HTMLButtonElement;\ninterface SidebarMenuButtonProps extends ComponentProps<'button'>, VariantProps<typeof sidebarMenuButtonVariants> {\n asChild?: boolean;\n isActive?: boolean;\n tooltip?: string | ComponentProps<typeof TooltipContent>;\n}\n\nconst SidebarMenuButton = forwardRef<SidebarMenuButtonElement, SidebarMenuButtonProps>(\n ({ asChild = false, isActive = false, variant = 'default', size = 'default', tooltip, className, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n const { isMobile, state } = useSidebar();\n\n const button = (\n <Comp\n ref={ref}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n data-active={isActive}\n data-sidebar=\"menu-button\"\n data-size={size}\n {...props}\n />\n );\n\n if (!tooltip) {\n return button;\n }\n\n const tooltipProps =\n typeof tooltip === 'string'\n ? {\n children: tooltip,\n }\n : tooltip;\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent align=\"center\" hidden={state !== 'collapsed' || isMobile} side=\"right\" {...tooltipProps} />\n </Tooltip>\n );\n },\n);\n\nSidebarMenuButton.displayName = 'SidebarMenuButton';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuAction\n * -------------------------------------------------------------------------- */\n\ntype SidebarMenuActionElement = HTMLButtonElement;\ninterface SidebarMenuActionProps extends ComponentProps<'button'> {\n asChild?: boolean;\n showOnHover?: boolean;\n}\nconst SidebarMenuAction = forwardRef<SidebarMenuActionElement, SidebarMenuActionProps>(\n ({ className, asChild = false, showOnHover = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n ref={ref}\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-none transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:absolute after:-inset-2 after:md:hidden',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n showOnHover &&\n 'peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0',\n className,\n )}\n data-sidebar=\"menu-action\"\n {...props}\n />\n );\n },\n);\n\nSidebarMenuAction.displayName = 'SidebarMenuAction';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuBadge\n * -------------------------------------------------------------------------- */\n\ntype SidebarMenuBadgeElement = HTMLDivElement;\ntype SidebarMenuBadgeProps = ComponentProps<'div'>;\nconst SidebarMenuBadge = forwardRef<SidebarMenuBadgeElement, SidebarMenuBadgeProps>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'text-sidebar-foreground 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',\n 'peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n className,\n )}\n data-sidebar=\"menu-badge\"\n {...props}\n />\n));\n\nSidebarMenuBadge.displayName = 'SidebarMenuBadge';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSkeleton\n * -------------------------------------------------------------------------- */\n\ntype SidebarMenuSkeletonElement = HTMLDivElement;\ninterface SidebarMenuSkeletonProps extends ComponentProps<'div'> {\n showIcon?: boolean;\n}\nconst SidebarMenuSkeleton = forwardRef<SidebarMenuSkeletonElement, SidebarMenuSkeletonProps>(\n ({ className, showIcon = false, ...props }, ref) => {\n // Random width between 50 to 90%.\n const width = useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`;\n }, []);\n\n return (\n <div\n ref={ref}\n className={cn('flex h-8 items-center gap-2 rounded-md px-2', className)}\n data-sidebar=\"menu-skeleton\"\n {...props}\n >\n {showIcon ? <Skeleton className=\"size-4 rounded-md\" data-sidebar=\"menu-skeleton-icon\" /> : null}\n <Skeleton\n className=\"h-4 max-w-[--skeleton-width] flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n '--skeleton-width': width,\n } as CSSProperties\n }\n />\n </div>\n );\n },\n);\n\nSidebarMenuSkeleton.displayName = 'SidebarMenuSkeleton';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSub\n * -------------------------------------------------------------------------- */\n\ntype SidebarMenuSubElement = HTMLUListElement;\ntype SidebarMenuSubProps = ComponentProps<'ul'>;\nconst SidebarMenuSub = forwardRef<SidebarMenuSubElement, SidebarMenuSubProps>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn(\n 'border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5',\n 'group-data-[collapsible=icon]:hidden',\n className,\n )}\n data-sidebar=\"menu-sub\"\n {...props}\n />\n));\n\nSidebarMenuSub.displayName = 'SidebarMenuSub';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSubItem\n * -------------------------------------------------------------------------- */\n\ntype SidebarMenuSubItemElement = HTMLLIElement;\ntype SidebarMenuSubItemProps = ComponentProps<'li'>;\nconst SidebarMenuSubItem = forwardRef<SidebarMenuSubItemElement, SidebarMenuSubItemProps>(({ ...props }, ref) => (\n <li ref={ref} {...props} />\n));\n\nSidebarMenuSubItem.displayName = 'SidebarMenuSubItem';\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSubButton\n * -------------------------------------------------------------------------- */\n\ntype SidebarMenuSubButtonElement = HTMLAnchorElement;\ninterface SidebarMenuSubButtonProps extends ComponentProps<'a'> {\n asChild?: boolean;\n isActive?: boolean;\n size?: 'sm' | 'md';\n}\n\nconst SidebarMenuSubButton = forwardRef<SidebarMenuSubButtonElement, SidebarMenuSubButtonProps>(\n ({ asChild = false, size = 'md', isActive, className, ...props }, ref) => {\n const Comp = asChild ? Slot : 'a';\n\n return (\n <Comp\n ref={ref}\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',\n 'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground',\n size === 'sm' && 'text-xs',\n size === 'md' && 'text-sm',\n 'group-data-[collapsible=icon]:hidden',\n className,\n )}\n data-active={isActive}\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n {...props}\n />\n );\n },\n);\n\nSidebarMenuSubButton.displayName = 'SidebarMenuSubButton';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n};\n"]}
@@ -0,0 +1,2 @@
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; } }var _chunkDD6AVCRHcjs = require('./chunk-DD6AVCRH.cjs');var _reactdropdownmenu = require('@radix-ui/react-dropdown-menu'); var e = _interopRequireWildcard(_reactdropdownmenu);var _lucidereact = require('lucide-react');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var h=e.Root,R= exports.b =e.Trigger,S= exports.c =e.Group,N= exports.d =e.Sub,T= exports.e =e.RadioGroup,l= exports.f =_react.forwardRef.call(void 0, ({children:o,className:t,inset:n,...p},d)=>_jsxruntime.jsxs.call(void 0, e.SubTrigger,{ref:d,className:_chunkDD6AVCRHcjs.a.call(void 0, "gap-x-2 px-3 py-1.5","flex cursor-pointer select-none items-center rounded text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",n&&"pl-8",t),...p,children:[o,_jsxruntime.jsx.call(void 0, _lucidereact.ChevronRightIcon,{className:"ml-auto size-4"})]}));l.displayName=e.SubTrigger.displayName;var M=_react.forwardRef.call(void 0, ({className:o,...t},n)=>_jsxruntime.jsx.call(void 0, e.Portal,{children:_jsxruntime.jsx.call(void 0, e.SubContent,{ref:n,className:_chunkDD6AVCRHcjs.a.call(void 0, "bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95","data-[state=open]:data-[side=top]:slide-in-from-bottom-2","data-[state=open]:data-[side=right]:slide-in-from-left-2","data-[state=open]:data-[side=bottom]:slide-in-from-top-2","data-[state=open]:data-[side=left]:slide-in-from-right-2","data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95","data-[state=closed]:data-[side=top]:slide-out-to-bottom-2","data-[state=closed]:data-[side=right]:slide-out-to-left-2","data-[state=closed]:data-[side=bottom]:slide-out-to-top-2","data-[state=closed]:data-[side=left]:slide-out-to-right-2",o),...t})}));M.displayName=e.SubContent.displayName;var D=_react.forwardRef.call(void 0, ({className:o,sideOffset:t=6,...n},p)=>_jsxruntime.jsx.call(void 0, e.Portal,{children:_jsxruntime.jsx.call(void 0, e.Content,{ref:p,className:_chunkDD6AVCRHcjs.a.call(void 0, "bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95","data-[state=open]:data-[side=top]:slide-in-from-bottom-2","data-[state=open]:data-[side=right]:slide-in-from-left-2","data-[state=open]:data-[side=bottom]:slide-in-from-top-2","data-[state=open]:data-[side=left]:slide-in-from-right-2","data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95","data-[state=closed]:data-[side=top]:slide-out-to-bottom-2","data-[state=closed]:data-[side=right]:slide-out-to-left-2","data-[state=closed]:data-[side=bottom]:slide-out-to-top-2","data-[state=closed]:data-[side=left]:slide-out-to-right-2",o),sideOffset:t,...n})}));D.displayName=e.Content.displayName;var c=_react.forwardRef.call(void 0, ({className:o,inset:t,...n},p)=>_jsxruntime.jsx.call(void 0, e.Item,{ref:p,className:_chunkDD6AVCRHcjs.a.call(void 0, "gap-x-2 px-3 py-1.5","relative flex cursor-pointer select-none items-center rounded text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",t&&"pl-8",o),...n}));c.displayName=e.Item.displayName;var P=_react.forwardRef.call(void 0, ({children:o,className:t,checked:n,...p},d)=>_jsxruntime.jsxs.call(void 0, e.CheckboxItem,{ref:d,checked:n,className:_chunkDD6AVCRHcjs.a.call(void 0, "gap-x-2 px-3 py-1.5","pl-8","relative flex cursor-pointer select-none items-center rounded text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",t),...p,children:[_jsxruntime.jsx.call(void 0, "span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:_jsxruntime.jsx.call(void 0, e.ItemIndicator,{children:_jsxruntime.jsx.call(void 0, _lucidereact.CheckIcon,{className:"size-4"})})}),o]}));P.displayName=e.CheckboxItem.displayName;var f=_react.forwardRef.call(void 0, ({children:o,className:t,...n},p)=>_jsxruntime.jsxs.call(void 0, e.RadioItem,{ref:p,className:_chunkDD6AVCRHcjs.a.call(void 0, "gap-x-2 px-3 py-1.5","pl-8","relative flex cursor-pointer select-none items-center rounded text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",t),...n,children:[_jsxruntime.jsx.call(void 0, "span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:_jsxruntime.jsx.call(void 0, e.ItemIndicator,{children:_jsxruntime.jsx.call(void 0, _lucidereact.DotIcon,{className:"size-4 fill-current"})})}),o]}));f.displayName=e.RadioItem.displayName;var y=_react.forwardRef.call(void 0, ({className:o,inset:t,...n},p)=>_jsxruntime.jsx.call(void 0, e.Label,{ref:p,className:_chunkDD6AVCRHcjs.a.call(void 0, "gap-x-2 px-3 py-1.5","flex items-center text-sm font-semibold",t&&"pl-8",o),...n}));y.displayName=e.Label.displayName;var b=_react.forwardRef.call(void 0, ({className:o,...t},n)=>_jsxruntime.jsx.call(void 0, e.Separator,{ref:n,className:_chunkDD6AVCRHcjs.a.call(void 0, "bg-muted mx-2 my-1 h-px",o),...t}));b.displayName=e.Separator.displayName;function E({className:o,...t}){return _jsxruntime.jsx.call(void 0, "span",{className:_chunkDD6AVCRHcjs.a.call(void 0, "ml-auto text-xs tracking-widest opacity-60",o),...t})}var v=_react.forwardRef.call(void 0, ({className:o,...t},n)=>_jsxruntime.jsx.call(void 0, e.Arrow,{ref:n,className:_chunkDD6AVCRHcjs.a.call(void 0, "fill-popover",o),...t}));v.displayName=e.Arrow.displayName;exports.a = h; exports.b = R; exports.c = S; exports.d = N; exports.e = T; exports.f = l; exports.g = M; exports.h = D; exports.i = c; exports.j = P; exports.k = f; exports.l = y; exports.m = b; exports.n = E; exports.o = v;
2
+ //# sourceMappingURL=chunk-KYZ6DEDI.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-KYZ6DEDI.cjs","../src/components/dropdown-menu.tsx"],"names":["DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","forwardRef","children","className","inset","props","forwardedRef","jsxs","cn","jsx","ChevronRightIcon","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","CheckIcon","DropdownMenuRadioItem","DotIcon","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuArrow"],"mappings":"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","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-KYZ6DEDI.cjs","sourcesContent":[null,"import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { CheckIcon, ChevronRightIcon, DotIcon } from 'lucide-react';\nimport {\n type ComponentProps,\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n type HTMLAttributes,\n type JSX,\n} from 'react';\n\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenu\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuProps = ComponentProps<typeof DropdownMenuPrimitive.Root>;\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuTrigger\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuTriggerProps = ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuGroup\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuGroupProps = ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSub\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSubProps = ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub>;\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuRadioGroupProps = ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSubTriggerElement = ComponentRef<typeof DropdownMenuPrimitive.SubTrigger>;\ninterface DropdownMenuSubTriggerProps extends ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> {\n inset?: boolean;\n}\n\nconst DropdownMenuSubTrigger = forwardRef<DropdownMenuSubTriggerElement, DropdownMenuSubTriggerProps>(\n ({ children, className, inset, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={forwardedRef}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'flex cursor-pointer select-none items-center rounded text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n ),\n);\n\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubContent\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSubContentProps = DropdownMenuPrimitive.DropdownMenuSubContentProps;\n\nconst DropdownMenuSubContent = forwardRef<\n ComponentRef<typeof DropdownMenuPrimitive.SubContent>,\n DropdownMenuSubContentProps\n>(({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.SubContent\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95',\n 'data-[state=open]:data-[side=top]:slide-in-from-bottom-2',\n 'data-[state=open]:data-[side=right]:slide-in-from-left-2',\n 'data-[state=open]:data-[side=bottom]:slide-in-from-top-2',\n 'data-[state=open]:data-[side=left]:slide-in-from-right-2',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95',\n 'data-[state=closed]:data-[side=top]:slide-out-to-bottom-2',\n 'data-[state=closed]:data-[side=right]:slide-out-to-left-2',\n 'data-[state=closed]:data-[side=bottom]:slide-out-to-top-2',\n 'data-[state=closed]:data-[side=left]:slide-out-to-right-2',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\n\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuContent\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuContentElement = ComponentRef<typeof DropdownMenuPrimitive.Content>;\ntype DropdownMenuContentProps = ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>;\n\nconst DropdownMenuContent = forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n ({ className, sideOffset = 6, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95',\n 'data-[state=open]:data-[side=top]:slide-in-from-bottom-2',\n 'data-[state=open]:data-[side=right]:slide-in-from-left-2',\n 'data-[state=open]:data-[side=bottom]:slide-in-from-top-2',\n 'data-[state=open]:data-[side=left]:slide-in-from-right-2',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95',\n 'data-[state=closed]:data-[side=top]:slide-out-to-bottom-2',\n 'data-[state=closed]:data-[side=right]:slide-out-to-left-2',\n 'data-[state=closed]:data-[side=bottom]:slide-out-to-top-2',\n 'data-[state=closed]:data-[side=left]:slide-out-to-right-2',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n ),\n);\n\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuItem\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuItemElement = ComponentRef<typeof DropdownMenuPrimitive.Item>;\ninterface DropdownMenuItemProps extends ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {\n inset?: boolean;\n}\n\nconst DropdownMenuItem = forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'relative flex cursor-pointer select-none items-center rounded text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n ),\n);\n\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuCheckboxItemElement = ComponentRef<typeof DropdownMenuPrimitive.CheckboxItem>;\ntype DropdownMenuCheckboxItemProps = ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>;\n\nconst DropdownMenuCheckboxItem = forwardRef<DropdownMenuCheckboxItemElement, DropdownMenuCheckboxItemProps>(\n ({ children, className, checked, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={forwardedRef}\n checked={checked}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'pl-8',\n 'relative flex cursor-pointer select-none items-center rounded text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n ),\n);\n\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuRadioItem\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuRadioItemElement = ComponentRef<typeof DropdownMenuPrimitive.RadioItem>;\ntype DropdownMenuRadioItemProps = ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>;\n\nconst DropdownMenuRadioItem = forwardRef<DropdownMenuRadioItemElement, DropdownMenuRadioItemProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.RadioItem\n ref={forwardedRef}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'pl-8',\n 'relative flex cursor-pointer select-none items-center rounded text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <DotIcon className=\"size-4 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n ),\n);\n\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuLabel\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuLabelElement = ComponentRef<typeof DropdownMenuPrimitive.Label>;\n\ninterface DropdownMenuLabelProps extends ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> {\n inset?: boolean;\n}\n\nconst DropdownMenuLabel = forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Label\n ref={forwardedRef}\n className={cn('gap-x-2 px-3 py-1.5', 'flex items-center text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n ),\n);\n\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSeparator\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuSeparatorElement = ComponentRef<typeof DropdownMenuPrimitive.Separator>;\ntype DropdownMenuSeparatorProps = ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>;\n\nconst DropdownMenuSeparator = forwardRef<DropdownMenuSeparatorElement, DropdownMenuSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Separator\n ref={forwardedRef}\n className={cn('bg-muted mx-2 my-1 h-px', className)}\n {...props}\n />\n ),\n);\n\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuShortcut\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuShortcutProps = HTMLAttributes<HTMLSpanElement>;\n\nfunction DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps): JSX.Element {\n return <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuArrow\n * -------------------------------------------------------------------------- */\n\ntype DropdownMenuArrowElement = ComponentRef<typeof DropdownMenuPrimitive.Arrow>;\ntype DropdownMenuArrowProps = DropdownMenuPrimitive.DropdownMenuArrowProps;\n\nconst DropdownMenuArrow = forwardRef<DropdownMenuArrowElement, DropdownMenuArrowProps>(\n ({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Arrow ref={forwardedRef} className={cn('fill-popover', className)} {...props} />\n ),\n);\n\nDropdownMenuArrow.displayName = DropdownMenuPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DropdownMenu,\n DropdownMenuArrow,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n type DropdownMenuArrowProps,\n type DropdownMenuCheckboxItemProps,\n type DropdownMenuContentProps,\n type DropdownMenuGroupProps,\n type DropdownMenuItemProps,\n type DropdownMenuLabelProps,\n type DropdownMenuProps,\n type DropdownMenuRadioGroupProps,\n type DropdownMenuRadioItemProps,\n type DropdownMenuSeparatorProps,\n type DropdownMenuShortcutProps,\n type DropdownMenuSubContentProps,\n type DropdownMenuSubProps,\n type DropdownMenuSubTriggerProps,\n type DropdownMenuTriggerProps,\n};\n"]}
@@ -0,0 +1,2 @@
1
+ import{a as o}from"./chunk-VPYH6JWS.js";import*as e from"@codefast-ui/checkbox-group";import{CheckIcon as c}from"lucide-react";import{forwardRef as s}from"react";import{jsx as r,jsxs as n}from"react/jsx-runtime";var C=s(({className:i,...t},p)=>r(e.Root,{className:o("grid gap-2",i),...t,ref:p}));C.displayName=e.Root.displayName;var b=s(({children:i,className:t,checkboxClassName:p,...m},a)=>n("label",{className:o("group flex items-center justify-center gap-4 rounded-md border p-4",t),children:[i,r(e.Item,{ref:a,className:o("border-input text-primary-foreground peer flex size-4 shrink-0 cursor-pointer rounded border shadow-sm transition","group-hover:border-primary","aria-checked:border-primary aria-checked:bg-primary","focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:cursor-default disabled:opacity-50",p),...m,children:r(e.CheckboxGroupIndicator,{children:r(c,{className:"size-3.5"})})})]}));b.displayName=e.Item.displayName;export{C as a,b};
2
+ //# sourceMappingURL=chunk-LQRU5KEQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/checkbox-cards.tsx"],"names":["CheckboxGroupPrimitive","CheckIcon","forwardRef","jsx","jsxs","CheckboxCards","className","props","forwardedRef","cn","CheckboxCardsItem","children","checkboxClassName"],"mappings":"wCAAA,UAAYA,MAA4B,8BACxC,OAAS,aAAAC,MAAiB,eAC1B,OAA2D,cAAAC,MAAkB,QAY3E,cAAAC,EAiBE,QAAAC,MAjBF,oBADF,IAAMC,EAAgBH,EAAqD,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAGC,IACnGL,EAAwB,OAAvB,CAA4B,UAAWM,EAAG,aAAcH,CAAS,EAAI,GAAGC,EAAO,IAAKC,EAAc,CACpG,EAEDH,EAAc,YAAqC,OAAK,YAYxD,IAAMK,EAAoBR,EACxB,CAAC,CAAE,SAAAS,EAAU,UAAAL,EAAW,kBAAAM,EAAmB,GAAGL,CAAM,EAAGC,IACrDJ,EAAC,SAAM,UAAWK,EAAG,qEAAsEH,CAAS,EACjG,UAAAK,EACDR,EAAwB,OAAvB,CACC,IAAKK,EACL,UAAWC,EACT,oHACA,6BACA,sDACA,sGACA,8CACAG,CACF,EACC,GAAGL,EAEJ,SAAAJ,EAAwB,yBAAvB,CACC,SAAAA,EAACF,EAAA,CAAU,UAAU,WAAW,EAClC,EACF,GACF,CAEJ,EAEAS,EAAkB,YAAqC,OAAK","sourcesContent":["import * as CheckboxGroupPrimitive from '@codefast-ui/checkbox-group';\nimport { CheckIcon } from 'lucide-react';\nimport { type ComponentPropsWithoutRef, type ComponentRef, forwardRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxCards\n * -------------------------------------------------------------------------- */\n\ntype CheckboxCardsElement = ComponentRef<typeof CheckboxGroupPrimitive.Root>;\ntype CheckboxCardsProps = ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Root>;\n\nconst CheckboxCards = forwardRef<CheckboxCardsElement, CheckboxCardsProps>(({ className, ...props }, forwardedRef) => (\n <CheckboxGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={forwardedRef} />\n));\n\nCheckboxCards.displayName = CheckboxGroupPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxCardsItem\n * -------------------------------------------------------------------------- */\n\ntype CheckboxCardsItemElement = ComponentRef<typeof CheckboxGroupPrimitive.Item>;\n\ninterface CheckboxCardsItemProps extends ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item> {\n checkboxClassName?: string;\n}\n\nconst CheckboxCardsItem = forwardRef<CheckboxCardsItemElement, CheckboxCardsItemProps>(\n ({ children, className, checkboxClassName, ...props }, forwardedRef) => (\n <label className={cn('group flex items-center justify-center gap-4 rounded-md border p-4', className)}>\n {children}\n <CheckboxGroupPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'border-input text-primary-foreground peer flex size-4 shrink-0 cursor-pointer rounded border shadow-sm transition',\n 'group-hover:border-primary',\n 'aria-checked:border-primary aria-checked:bg-primary',\n 'focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2',\n 'disabled:cursor-default disabled:opacity-50',\n checkboxClassName,\n )}\n {...props}\n >\n <CheckboxGroupPrimitive.CheckboxGroupIndicator>\n <CheckIcon className=\"size-3.5\" />\n </CheckboxGroupPrimitive.CheckboxGroupIndicator>\n </CheckboxGroupPrimitive.Item>\n </label>\n ),\n);\n\nCheckboxCardsItem.displayName = CheckboxGroupPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { CheckboxCards, CheckboxCardsItem, type CheckboxCardsItemProps, type CheckboxCardsProps };\n"]}
@@ -0,0 +1,2 @@
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; } }var _chunkKF7Y7B3Gcjs = require('./chunk-KF7Y7B3G.cjs');var _chunkDD6AVCRHcjs = require('./chunk-DD6AVCRH.cjs');var _reactnavigationmenu = require('@radix-ui/react-navigation-menu'); var t = _interopRequireWildcard(_reactnavigationmenu);var _lucidereact = require('lucide-react');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var N=_react.forwardRef.call(void 0, ({children:i,className:e,...o},p)=>_jsxruntime.jsxs.call(void 0, t.Root,{ref:p,className:_chunkDD6AVCRHcjs.a.call(void 0, "relative z-10 flex max-w-max flex-1 items-center justify-center",e),...o,children:[i,_jsxruntime.jsx.call(void 0, s,{})]}));N.displayName=t.Root.displayName;var d=_react.forwardRef.call(void 0, ({children:i,className:e,...o},p)=>_jsxruntime.jsxs.call(void 0, t.List,{ref:p,className:_chunkDD6AVCRHcjs.a.call(void 0, "group flex flex-1 list-none items-center justify-center space-x-1",e),...o,children:[i,_jsxruntime.jsx.call(void 0, g,{})]}));d.displayName=t.List.displayName;var h=t.Item,f= exports.d =_react.forwardRef.call(void 0, ({children:i,className:e,...o},p)=>_jsxruntime.jsxs.call(void 0, t.Trigger,{ref:p,className:_chunkKF7Y7B3Gcjs.a.call(void 0, {variant:"ghost",className:["data-[state=open]:bg-accent data-[state=open]:text-accent-foreground","group",e]}),...o,children:[i,_jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon,{"aria-hidden":"true",className:_chunkDD6AVCRHcjs.a.call(void 0, "relative top-px ml-1 size-3 transition","group-data-[state=open]:rotate-180")})]}));f.displayName=t.Trigger.displayName;var M=_react.forwardRef.call(void 0, ({className:i,...e},o)=>_jsxruntime.jsx.call(void 0, t.Content,{ref:o,className:_chunkDD6AVCRHcjs.a.call(void 0, "left-0 top-0 w-full md:absolute md:w-auto","data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in","data-[motion=from-end]:slide-in-from-right-52","data-[motion=from-start]:slide-in-from-left-52","data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out","data-[motion=to-end]:slide-out-to-right-52","data-[motion=to-start]:slide-out-to-left-52",i),...e}));M.displayName=t.Content.displayName;var w=t.Link,s=_react.forwardRef.call(void 0, ({className:i,...e},o)=>_jsxruntime.jsx.call(void 0, "div",{className:"perspective-[125rem] absolute left-0 top-full flex justify-center",children:_jsxruntime.jsx.call(void 0, t.Viewport,{ref:o,className:_chunkDD6AVCRHcjs.a.call(void 0, "bg-popover text-popover-foreground relative mt-1.5 w-full origin-[top_center] overflow-hidden rounded-md border p-1 shadow-md transition-[width,height]","h-[var(--radix-navigation-menu-viewport-height)] sm:w-[var(--radix-navigation-menu-viewport-width)]","data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-90","data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95",i),...e})}));s.displayName=t.Viewport.displayName;var g=_react.forwardRef.call(void 0, ({className:i,...e},o)=>_jsxruntime.jsx.call(void 0, t.Indicator,{ref:o,className:_chunkDD6AVCRHcjs.a.call(void 0, "data-[state=visible]:animate-fade-in data-[state=hidden]:animate-fade-out top-full z-10 flex h-1.5 items-center justify-center overflow-hidden transition",i),...e,children:_jsxruntime.jsx.call(void 0, "div",{className:"bg-popover relative top-[60%] size-2 rotate-45 rounded-tl-sm"})}));g.displayName=t.Indicator.displayName;exports.a = N; exports.b = d; exports.c = h; exports.d = f; exports.e = M; exports.f = w;
2
+ //# sourceMappingURL=chunk-LUQA5J5W.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-LUQA5J5W.cjs","../src/components/navigation-menu.tsx"],"names":["NavigationMenu","forwardRef","children","className","props","forwardedRef","jsxs","cn","jsx","NavigationMenuViewport","NavigationMenuList","NavigationMenuIndicator","NavigationMenuItem","NavigationMenuTrigger","buttonVariants","ChevronDownIcon","NavigationMenuContent","NavigationMenuLink"],"mappings":"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","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-LUQA5J5W.cjs","sourcesContent":[null,"import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';\nimport { ChevronDownIcon } from 'lucide-react';\nimport { type ComponentPropsWithoutRef, type ComponentRef, forwardRef } from 'react';\n\nimport { cn } from '@/lib/utils';\nimport { buttonVariants } from '@/styles/button-variants';\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenu\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuElement = ComponentRef<typeof NavigationMenuPrimitive.Root>;\ntype NavigationMenuProps = ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>;\n\nconst NavigationMenu = forwardRef<NavigationMenuElement, NavigationMenuProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <NavigationMenuPrimitive.Root\n ref={forwardedRef}\n className={cn('relative z-10 flex max-w-max flex-1 items-center justify-center', className)}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n ),\n);\n\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuList\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuListElement = ComponentRef<typeof NavigationMenuPrimitive.List>;\ntype NavigationMenuListProps = ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>;\n\nconst NavigationMenuList = forwardRef<NavigationMenuListElement, NavigationMenuListProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <NavigationMenuPrimitive.List\n ref={forwardedRef}\n className={cn('group flex flex-1 list-none items-center justify-center space-x-1', className)}\n {...props}\n >\n {children}\n <NavigationMenuIndicator />\n </NavigationMenuPrimitive.List>\n ),\n);\n\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuItem\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuItemProps = ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Item>;\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuContent\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuTriggerElement = ComponentRef<typeof NavigationMenuPrimitive.Trigger>;\ntype NavigationMenuTriggerProps = ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>;\n\nconst NavigationMenuTrigger = forwardRef<NavigationMenuTriggerElement, NavigationMenuTriggerProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <NavigationMenuPrimitive.Trigger\n ref={forwardedRef}\n className={buttonVariants({\n variant: 'ghost',\n className: ['data-[state=open]:bg-accent data-[state=open]:text-accent-foreground', 'group', className],\n })}\n {...props}\n >\n {children}\n <ChevronDownIcon\n aria-hidden=\"true\"\n className={cn('relative top-px ml-1 size-3 transition', 'group-data-[state=open]:rotate-180')}\n />\n </NavigationMenuPrimitive.Trigger>\n ),\n);\n\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuContent\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuContentElement = ComponentRef<typeof NavigationMenuPrimitive.Content>;\ntype NavigationMenuContentProps = ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>;\n\nconst NavigationMenuContent = forwardRef<NavigationMenuContentElement, NavigationMenuContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <NavigationMenuPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'left-0 top-0 w-full md:absolute md:w-auto',\n 'data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in',\n 'data-[motion=from-end]:slide-in-from-right-52',\n 'data-[motion=from-start]:slide-in-from-left-52',\n 'data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out',\n 'data-[motion=to-end]:slide-out-to-right-52',\n 'data-[motion=to-start]:slide-out-to-left-52',\n className,\n )}\n {...props}\n />\n ),\n);\n\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuLink\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuLinkProps = ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Link>;\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuViewport\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuViewportElement = ComponentRef<typeof NavigationMenuPrimitive.Viewport>;\ntype NavigationMenuViewportProps = ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>;\n\nconst NavigationMenuViewport = forwardRef<NavigationMenuViewportElement, NavigationMenuViewportProps>(\n ({ className, ...props }, forwardedRef) => (\n <div className=\"perspective-[125rem] absolute left-0 top-full flex justify-center\">\n <NavigationMenuPrimitive.Viewport\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground relative mt-1.5 w-full origin-[top_center] overflow-hidden rounded-md border p-1 shadow-md transition-[width,height]',\n 'h-[var(--radix-navigation-menu-viewport-height)] sm:w-[var(--radix-navigation-menu-viewport-width)]',\n 'data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-90',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95',\n className,\n )}\n {...props}\n />\n </div>\n ),\n);\n\nNavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: NavigationMenuIndicator\n * -------------------------------------------------------------------------- */\n\ntype NavigationMenuIndicatorElement = ComponentRef<typeof NavigationMenuPrimitive.Indicator>;\ntype NavigationMenuIndicatorProps = ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>;\n\nconst NavigationMenuIndicator = forwardRef<NavigationMenuIndicatorElement, NavigationMenuIndicatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <NavigationMenuPrimitive.Indicator\n ref={forwardedRef}\n className={cn(\n 'data-[state=visible]:animate-fade-in data-[state=hidden]:animate-fade-out top-full z-10 flex h-1.5 items-center justify-center overflow-hidden transition',\n className,\n )}\n {...props}\n >\n <div className=\"bg-popover relative top-[60%] size-2 rotate-45 rounded-tl-sm\" />\n </NavigationMenuPrimitive.Indicator>\n ),\n);\n\nNavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n type NavigationMenuContentProps,\n type NavigationMenuItemProps,\n type NavigationMenuLinkProps,\n type NavigationMenuListProps,\n type NavigationMenuProps,\n type NavigationMenuTriggerProps,\n};\n"]}
@@ -0,0 +1,2 @@
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; } }var _chunkDD6AVCRHcjs = require('./chunk-DD6AVCRH.cjs');var _checkboxgroup = require('@codefast-ui/checkbox-group'); var o = _interopRequireWildcard(_checkboxgroup);var _lucidereact = require('lucide-react');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var n=_react.forwardRef.call(void 0, ({className:r,...i},p)=>_jsxruntime.jsx.call(void 0, o.Root,{ref:p,className:_chunkDD6AVCRHcjs.a.call(void 0, "grid gap-2",r),...i}));n.displayName="CheckboxGroup";var b=_react.forwardRef.call(void 0, ({className:r,...i},p)=>_jsxruntime.jsx.call(void 0, o.Item,{ref:p,className:_chunkDD6AVCRHcjs.a.call(void 0, ["border-input text-primary-foreground peer flex size-4 shrink-0 rounded border shadow-sm transition","hover:border-primary","aria-checked:border-primary aria-checked:bg-primary","focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"],r),...i,children:_jsxruntime.jsx.call(void 0, o.CheckboxGroupIndicator,{children:_jsxruntime.jsx.call(void 0, _lucidereact.CheckIcon,{className:"size-3.5"})})}));b.displayName="CheckboxGroupItem";exports.a = n; exports.b = b;
2
+ //# sourceMappingURL=chunk-M25UFVFW.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-M25UFVFW.cjs","../src/components/checkbox-group.tsx"],"names":["CheckboxGroup","forwardRef","className","props","forwardedRef","jsx","cn","CheckboxGroupItem","CheckIcon"],"mappings":"AAAA,mZAAwC,6GCAA,2CACd,8BACmD,+CAY3E,IADIA,CAAAA,CAAgBC,+BAAAA,CAAsD,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACnGC,6BAAAA,CAAwB,CAAA,IAAA,CAAvB,CAA4B,GAAA,CAAKD,CAAAA,CAAc,SAAA,CAAWE,iCAAAA,YAAG,CAAcJ,CAAS,CAAA,CAAI,GAAGC,CAAAA,CAAO,CACpG,CAAA,CAEDH,CAAAA,CAAc,WAAA,CAAc,eAAA,CAS5B,IAAMO,CAAAA,CAAoBN,+BAAAA,CACvB,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBC,6BAAAA,CAAwB,CAAA,IAAA,CAAvB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,iCAAAA,CAEP,oGAAA,CACA,sBAAA,CACA,qDAAA,CACA,qGAAA,CACA,kDACF,CAAA,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CAEJ,QAAA,CAAAE,6BAAAA,CAAwB,CAAA,sBAAA,CAAvB,CACC,QAAA,CAAAA,6BAAAA,sBAACG,CAAA,CAAU,SAAA,CAAU,UAAA,CAAW,CAAA,CAClC,CAAA,CACF,CAEJ,CAAA,CAEAD,CAAAA,CAAkB,WAAA,CAAc,mBAAA,CAAA,6BAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-M25UFVFW.cjs","sourcesContent":[null,"import * as CheckboxGroupPrimitive from '@codefast-ui/checkbox-group';\nimport { CheckIcon } from 'lucide-react';\nimport { type ComponentPropsWithoutRef, type ComponentRef, forwardRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroup\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupElement = ComponentRef<typeof CheckboxGroupPrimitive.Root>;\ntype CheckboxGroupProps = ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Root>;\n\nconst CheckboxGroup = forwardRef<CheckboxGroupElement, CheckboxGroupProps>(({ className, ...props }, forwardedRef) => (\n <CheckboxGroupPrimitive.Root ref={forwardedRef} className={cn('grid gap-2', className)} {...props} />\n));\n\nCheckboxGroup.displayName = 'CheckboxGroup';\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroupItem\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupItemElement = ComponentRef<typeof CheckboxGroupPrimitive.Item>;\ntype CheckboxGroupItemProps = ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item>;\n\nconst CheckboxGroupItem = forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n ({ className, ...props }, forwardedRef) => (\n <CheckboxGroupPrimitive.Item\n ref={forwardedRef}\n className={cn(\n [\n 'border-input text-primary-foreground peer flex size-4 shrink-0 rounded border shadow-sm transition',\n 'hover:border-primary',\n 'aria-checked:border-primary aria-checked:bg-primary',\n 'focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2',\n 'disabled:pointer-events-none disabled:opacity-50',\n ],\n className,\n )}\n {...props}\n >\n <CheckboxGroupPrimitive.CheckboxGroupIndicator>\n <CheckIcon className=\"size-3.5\" />\n </CheckboxGroupPrimitive.CheckboxGroupIndicator>\n </CheckboxGroupPrimitive.Item>\n ),\n);\n\nCheckboxGroupItem.displayName = 'CheckboxGroupItem';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { CheckboxGroup, CheckboxGroupItem, type CheckboxGroupItemProps, type CheckboxGroupProps };\n"]}
@@ -0,0 +1,2 @@
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; } }var _chunkKF7Y7B3Gcjs = require('./chunk-KF7Y7B3G.cjs');var _chunkDD6AVCRHcjs = require('./chunk-DD6AVCRH.cjs');var _reactdialog = require('@radix-ui/react-dialog'); var e = _interopRequireWildcard(_reactdialog);var _lucidereact = require('lucide-react');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var T=e.Root,x= exports.b =e.Trigger,D= exports.c =_react.forwardRef.call(void 0, ({children:t,className:o,...l},s)=>_jsxruntime.jsx.call(void 0, e.Portal,{children:_jsxruntime.jsx.call(void 0, e.Overlay,{className:_chunkDD6AVCRHcjs.a.call(void 0, "fixed inset-0 z-50 grid place-items-center overflow-auto bg-black/80 p-4 sm:pb-12 sm:pt-8","data-[state=open]:animate-duration-200 data-[state=open]:animate-fade-in","data-[state=closed]:animate-duration-200 data-[state=closed]:animate-fade-out"),children:_jsxruntime.jsxs.call(void 0, e.Content,{ref:s,className:_chunkDD6AVCRHcjs.a.call(void 0, "bg-background relative z-50 flex w-full max-w-lg flex-col rounded-lg border shadow-lg","data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=open]:animate-duration-200 data-[state=open]:fade-in","data-[state=closed]:zoom-out-95 data-[state=closed]:animate-duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out",o),...l,children:[t,_jsxruntime.jsxs.call(void 0, e.Close,{className:_chunkKF7Y7B3Gcjs.a.call(void 0, {className:"absolute right-4 top-4",icon:!0,size:"xxs",variant:"ghost"}),children:[_jsxruntime.jsx.call(void 0, _lucidereact.XIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Close"})]})]})})}));D.displayName=e.Content.displayName;function N({className:t,...o}){return _jsxruntime.jsx.call(void 0, "header",{className:_chunkDD6AVCRHcjs.a.call(void 0, "flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left",t),...o})}function b({className:t,...o}){return _jsxruntime.jsx.call(void 0, "main",{className:_chunkDD6AVCRHcjs.a.call(void 0, "overflow-auto px-6 py-2",t),...o})}function E({className:t,...o}){return _jsxruntime.jsx.call(void 0, "footer",{className:_chunkDD6AVCRHcjs.a.call(void 0, "flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-4 sm:flex-row sm:justify-end",t),...o})}var P=_react.forwardRef.call(void 0, ({className:t,...o},l)=>_jsxruntime.jsx.call(void 0, e.Title,{ref:l,className:_chunkDD6AVCRHcjs.a.call(void 0, "text-lg font-semibold leading-none tracking-tight",t),...o}));P.displayName=e.Title.displayName;var d=_react.forwardRef.call(void 0, ({className:t,...o},l)=>_jsxruntime.jsx.call(void 0, e.Description,{ref:l,className:_chunkDD6AVCRHcjs.a.call(void 0, "text-muted-foreground text-sm",t),...o}));d.displayName=e.Description.displayName;var f=_react.forwardRef.call(void 0, ({className:t,size:o,variant:l="outline",...s},m)=>_jsxruntime.jsx.call(void 0, e.Close,{ref:m,className:_chunkKF7Y7B3Gcjs.a.call(void 0, {className:t,size:o,variant:l}),...s}));f.displayName=e.Close.displayName;exports.a = T; exports.b = x; exports.c = D; exports.d = N; exports.e = b; exports.f = E; exports.g = P; exports.h = d; exports.i = f;
2
+ //# sourceMappingURL=chunk-OIF6PONX.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-OIF6PONX.cjs","../src/components/dialog.tsx"],"names":["Dialog","DialogTrigger","DialogContent","forwardRef","children","className","props","forwardedRef","jsx","cn","jsxs","buttonVariants","XIcon","DialogHeader","DialogBody","DialogFooter","DialogTitle","DialogDescription","DialogClose","size","variant"],"mappings":"AAAA,mZAAwC,wDAAoC,oGCA3C,2CACX,8BAQf,+CA+CG,IArCJA,CAAAA,CAAyB,CAAA,CAAA,IAAA,CAOzBC,CAAAA,aAAgC,CAAA,CAAA,OAAA,CAShCC,CAAAA,aAAgBC,+BAAAA,CACnB,CAAE,QAAA,CAAAC,CAAAA,CAAU,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAClCC,6BAAAA,CAAiB,CAAA,MAAA,CAAhB,CACC,QAAA,CAAAA,6BAAAA,CAAiB,CAAA,OAAA,CAAhB,CACC,SAAA,CAAWC,iCAAAA,2FACT,CACA,0EAAA,CACA,+EACF,CAAA,CAEA,QAAA,CAAAC,8BAAAA,CAAiB,CAAA,OAAA,CAAhB,CACC,GAAA,CAAKH,CAAAA,CACL,SAAA,CAAWE,iCAAAA,uFACT,CACA,4HAAA,CACA,uIAAA,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CAEH,QAAA,CAAA,CAAAF,CAAAA,CACDM,8BAAAA,CAAiB,CAAA,KAAA,CAAhB,CACC,SAAA,CAAWC,iCAAAA,CACT,SAAA,CAAW,wBAAA,CACX,IAAA,CAAM,CAAA,CAAA,CACN,IAAA,CAAM,KAAA,CACN,OAAA,CAAS,OACX,CAAC,CAAA,CAED,QAAA,CAAA,CAAAH,6BAAAA,kBAACI,CAAA,CAAM,SAAA,CAAU,QAAA,CAAS,CAAA,CAC1BJ,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAU,SAAA,CAAU,QAAA,CAAA,OAAA,CAAK,CAAA,CAAA,CACjC,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CACF,CAEJ,CAAA,CAEAN,CAAAA,CAAc,WAAA,CAA8B,CAAA,CAAA,OAAA,CAAQ,WAAA,CAQpD,SAASW,CAAAA,CAAa,CAAE,SAAA,CAAAR,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAmC,CAC7E,OACEE,6BAAAA,QAAC,CAAA,CACC,SAAA,CAAWC,iCAAAA,wEAAG,CAA0EJ,CAAS,CAAA,CAChG,GAAGC,CAAAA,CACN,CAEJ,CAQA,SAASQ,CAAAA,CAAW,CAAE,SAAA,CAAAT,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAiC,CACzE,OAAOE,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAWC,iCAAAA,yBAAG,CAA2BJ,CAAS,CAAA,CAAI,GAAGC,CAAAA,CAAO,CAC/E,CAQA,SAASS,CAAAA,CAAa,CAAE,SAAA,CAAAV,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAmC,CAC7E,OACEE,6BAAAA,QAAC,CAAA,CACC,SAAA,CAAWC,iCAAAA,gFAAG,CAAkFJ,CAAS,CAAA,CACxG,GAAGC,CAAAA,CACN,CAEJ,CASA,IAAMU,CAAAA,CAAcb,+BAAAA,CAAkD,CAAE,SAAA,CAAAE,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC7FC,6BAAAA,CAAiB,CAAA,KAAA,CAAhB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,iCAAAA,mDAAG,CAAqDJ,CAAS,CAAA,CAC3E,GAAGC,CAAAA,CACN,CACD,CAAA,CAEDU,CAAAA,CAAY,WAAA,CAA8B,CAAA,CAAA,KAAA,CAAM,WAAA,CAShD,IAAMC,CAAAA,CAAoBd,+BAAAA,CACvB,CAAE,SAAA,CAAAE,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBC,6BAAAA,CAAiB,CAAA,WAAA,CAAhB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,iCAAAA,+BAAG,CAAiCJ,CAAS,CAAA,CACvD,GAAGC,CAAAA,CACN,CAEJ,CAAA,CAEAW,CAAAA,CAAkB,WAAA,CAA8B,CAAA,CAAA,WAAA,CAAY,WAAA,CAY5D,IAAMC,CAAAA,CAAcf,+BAAAA,CACjB,CAAE,SAAA,CAAAE,CAAAA,CAAW,IAAA,CAAAc,CAAAA,CAAM,OAAA,CAAAC,CAAAA,CAAU,SAAA,CAAW,GAAGd,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACnDC,6BAAAA,CAAiB,CAAA,KAAA,CAAhB,CAAsB,GAAA,CAAKD,CAAAA,CAAc,SAAA,CAAWI,iCAAAA,CAAiB,SAAA,CAAAN,CAAAA,CAAW,IAAA,CAAAc,CAAAA,CAAM,OAAA,CAAAC,CAAQ,CAAC,CAAA,CAAI,GAAGd,CAAAA,CAAO,CAElH,CAAA,CAEAY,CAAAA,CAAY,WAAA,CAA8B,CAAA,CAAA,KAAA,CAAM,WAAA,CAAA,sIAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-OIF6PONX.cjs","sourcesContent":[null,"import * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { XIcon } from 'lucide-react';\nimport {\n type ComponentProps,\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n type HTMLAttributes,\n type JSX,\n} from 'react';\n\nimport { cn } from '@/lib/utils';\nimport { buttonVariants, type ButtonVariantsProps } from '@/styles/button-variants';\n\n/* -----------------------------------------------------------------------------\n * Component: Dialog\n * -------------------------------------------------------------------------- */\n\ntype DialogProps = ComponentProps<typeof DialogPrimitive.Root>;\nconst Dialog = DialogPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTrigger\n * -------------------------------------------------------------------------- */\n\ntype DialogTriggerProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;\nconst DialogTrigger = DialogPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogContent\n * -------------------------------------------------------------------------- */\n\ntype DialogContentElement = ComponentRef<typeof DialogPrimitive.Content>;\ntype DialogContentProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;\n\nconst DialogContent = forwardRef<DialogContentElement, DialogContentProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay\n className={cn(\n 'fixed inset-0 z-50 grid place-items-center overflow-auto bg-black/80 p-4 sm:pb-12 sm:pt-8',\n 'data-[state=open]:animate-duration-200 data-[state=open]:animate-fade-in',\n 'data-[state=closed]:animate-duration-200 data-[state=closed]:animate-fade-out',\n )}\n >\n <DialogPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-background relative z-50 flex w-full max-w-lg flex-col rounded-lg border shadow-lg',\n 'data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=open]:animate-duration-200 data-[state=open]:fade-in',\n 'data-[state=closed]:zoom-out-95 data-[state=closed]:animate-duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out',\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close\n className={buttonVariants({\n className: 'absolute right-4 top-4',\n icon: true,\n size: 'xxs',\n variant: 'ghost',\n })}\n >\n <XIcon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPrimitive.Overlay>\n </DialogPrimitive.Portal>\n ),\n);\n\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogHeader\n * -------------------------------------------------------------------------- */\n\ntype DialogHeaderProps = HTMLAttributes<HTMLDivElement>;\n\nfunction DialogHeader({ className, ...props }: DialogHeaderProps): JSX.Element {\n return (\n <header\n className={cn('flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogBody\n * -------------------------------------------------------------------------- */\n\ntype DialogBodyProps = HTMLAttributes<HTMLDivElement>;\n\nfunction DialogBody({ className, ...props }: DialogBodyProps): JSX.Element {\n return <main className={cn('overflow-auto px-6 py-2', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogFooter\n * -------------------------------------------------------------------------- */\n\ntype DialogFooterProps = HTMLAttributes<HTMLDivElement>;\n\nfunction DialogFooter({ className, ...props }: DialogFooterProps): JSX.Element {\n return (\n <footer\n className={cn('flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-4 sm:flex-row sm:justify-end', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTitle\n * -------------------------------------------------------------------------- */\n\ntype DialogTitleElement = ComponentRef<typeof DialogPrimitive.Title>;\ntype DialogTitleProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;\n\nconst DialogTitle = forwardRef<DialogTitleElement, DialogTitleProps>(({ className, ...props }, forwardedRef) => (\n <DialogPrimitive.Title\n ref={forwardedRef}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n));\n\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogDescription\n * -------------------------------------------------------------------------- */\n\ntype DialogDescriptionElement = ComponentRef<typeof DialogPrimitive.Description>;\ntype DialogDescriptionProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;\n\nconst DialogDescription = forwardRef<DialogDescriptionElement, DialogDescriptionProps>(\n ({ className, ...props }, forwardedRef) => (\n <DialogPrimitive.Description\n ref={forwardedRef}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n ),\n);\n\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogClose\n * -------------------------------------------------------------------------- */\n\ntype DialogCloseElement = ComponentRef<typeof DialogPrimitive.Close>;\ninterface DialogCloseProps extends ComponentPropsWithoutRef<typeof DialogPrimitive.Close> {\n size?: ButtonVariantsProps['size'];\n variant?: ButtonVariantsProps['variant'];\n}\n\nconst DialogClose = forwardRef<DialogCloseElement, DialogCloseProps>(\n ({ className, size, variant = 'outline', ...props }, forwardedRef) => (\n <DialogPrimitive.Close ref={forwardedRef} className={buttonVariants({ className, size, variant })} {...props} />\n ),\n);\n\nDialogClose.displayName = DialogPrimitive.Close.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n type DialogBodyProps,\n type DialogCloseProps,\n type DialogContentProps,\n type DialogDescriptionProps,\n type DialogFooterProps,\n type DialogHeaderProps,\n type DialogProps,\n type DialogTitleProps,\n type DialogTriggerProps,\n};\n"]}
@@ -1,2 +1,2 @@
1
- "use client";import{a as _,b as k,c as A,d as D}from"./chunk-CTKVRKDK.js";import{a as H}from"./chunk-NPOAOTIH.js";import{a as N}from"./chunk-432ZMHFM.js";import{a as T,c as I,g as B,h as L}from"./chunk-MO7TQSRR.js";import{a as P}from"./chunk-NSTXYMJD.js";import{a as w}from"./chunk-24TJIVWR.js";import{a as o}from"./chunk-VPYH6JWS.js";import{useMediaQuery as V}from"@codefast/hooks";import{Slot as v}from"@radix-ui/react-slot";import{VisuallyHidden as F}from"@radix-ui/react-visually-hidden";import{PanelLeftIcon as $}from"lucide-react";import{createContext as U,forwardRef as n,useCallback as G,useContext as W,useEffect as j,useMemo as R,useState as z}from"react";import{tv as q}from"tailwind-variants";import{jsx as r,jsxs as f}from"react/jsx-runtime";var Q="sidebar:state",X=60*60*24*7,Y="16rem",J="18rem",Z="3rem",ee="b",te=768,O=U(null);function M(){let t=W(O);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}var ae=n(({defaultOpen:t=!0,open:e,onOpenChange:a,className:i,style:d,children:s,...c},S)=>{let p=V(`(max-width: ${te-1}px)`),[m,b]=z(!1),[h,E]=z(t),g=e??h,x=G(l=>{let u=typeof l=="function"?l(g):l;a?a(u):E(u),document.cookie=`${Q}=${u}; path=/; max-age=${X}`},[a,g]),y=G(()=>{p?b(l=>!l):x(l=>!l)},[p,x,b]);j(()=>{let l=u=>{u.key===ee&&(u.metaKey||u.ctrlKey)&&(u.preventDefault(),y())};return window.addEventListener("keydown",l),()=>{window.removeEventListener("keydown",l)}},[y]);let C=g?"expanded":"collapsed",K=R(()=>({state:C,open:g,setOpen:x,isMobile:p,openMobile:m,setOpenMobile:b,toggleSidebar:y}),[C,g,x,p,m,b,y]);return r(O.Provider,{value:K,children:r(_,{delayDuration:0,children:r("div",{ref:S,className:o("group/sidebar-wrapper has-[[data-variant=inset]]:bg-sidebar flex min-h-svh w-full",i),style:{"--sidebar-width":Y,"--sidebar-width-icon":Z,...d},...c,children:s})})})});ae.displayName="SidebarProvider";var re=n(({side:t="left",variant:e="sidebar",collapsible:a="offcanvas",className:i,children:d,...s},c)=>{let{isMobile:S,state:p,openMobile:m,setOpenMobile:b}=M();return a==="none"?r("div",{ref:c,className:o("bg-sidebar text-sidebar-foreground flex h-full w-[--sidebar-width] flex-col",i),...s,children:d}):S?r(T,{open:m,onOpenChange:b,...s,children:f(I,{className:"bg-sidebar text-sidebar-foreground w-[--sidebar-width] p-0 [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar",side:t,style:{"--sidebar-width":J},children:[f(F,{children:[r(B,{children:"Sidebar"}),r(L,{children:"Press escape to close the sidebar"})]}),r("div",{className:"flex h-full w-full flex-col",children:d})]})}):f("div",{ref:c,className:"text-sidebar-foreground group peer hidden md:block","data-collapsible":p==="collapsed"?a:"","data-side":t,"data-state":p,"data-variant":e,children:[r("div",{className:o("relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),r("div",{className:o("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...s,children:r("div",{className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow","data-sidebar":"sidebar",children:d})})]})});re.displayName="Sidebar";var oe=n(({className:t,onClick:e,...a},i)=>{let{toggleSidebar:d}=M();return f(w,{ref:i,icon:!0,className:o("",t),"data-sidebar":"trigger",size:"xxs",variant:"ghost",onClick:s=>{e?.(s),d()},...a,children:[r($,{}),r("span",{className:"sr-only",children:"Toggle Sidebar"})]})});oe.displayName="SidebarTrigger";var ne=n(({className:t,...e},a)=>{let{toggleSidebar:i}=M();return r("button",{ref:a,"aria-label":"Toggle Sidebar",className:o("hover:after:bg-sidebar-border 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-0.5 group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[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]:hover:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",t),"data-sidebar":"rail",tabIndex:-1,title:"Toggle Sidebar",type:"button",onClick:i,...e})});ne.displayName="SidebarRail";var ie=n(({className:t,...e},a)=>r("main",{ref:a,className:o("bg-background relative flex min-h-svh flex-1 flex-col","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] 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",t),...e}));ie.displayName="SidebarInset";var de=n(({className:t,...e},a)=>r(H,{ref:a,className:o("bg-background focus-visible:ring-sidebar-ring h-8 w-full shadow-none focus-visible:ring-2",t),"data-sidebar":"input",...e}));de.displayName="SidebarInput";var se=n(({className:t,...e},a)=>r("div",{ref:a,className:o("flex flex-col gap-2 p-2",t),"data-sidebar":"header",...e}));se.displayName="SidebarHeader";var le=n(({className:t,...e},a)=>r("div",{ref:a,className:o("flex flex-col gap-2 p-2",t),"data-sidebar":"footer",...e}));le.displayName="SidebarFooter";var pe=n(({className:t,...e},a)=>r(N,{ref:a,className:o("bg-sidebar-border mx-2 w-auto",t),"data-sidebar":"separator",...e}));pe.displayName="SidebarSeparator";var be=n(({className:t,...e},a)=>r("div",{ref:a,className:o("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),"data-sidebar":"content",...e}));be.displayName="SidebarContent";var ue=n(({className:t,...e},a)=>r("div",{ref:a,className:o("relative flex w-full min-w-0 flex-col p-2",t),"data-sidebar":"group",...e}));ue.displayName="SidebarGroup";var ce=n(({className:t,asChild:e=!1,...a},i)=>r(e?v:"div",{ref:i,className:o("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-none transition-[margin,opa] 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",t),"data-sidebar":"group-label",...a}));ce.displayName="SidebarGroupLabel";var me=n(({className:t,asChild:e=!1,...a},i)=>r(e?v:"button",{ref:i,className:o("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-none transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",t),"data-sidebar":"group-action",...a}));me.displayName="SidebarGroupAction";var fe=n(({className:t,...e},a)=>r("div",{ref:a,className:o("w-full text-sm",t),"data-sidebar":"group-content",...e}));fe.displayName="SidebarGroupContent";var Se=n(({className:t,...e},a)=>r("ul",{ref:a,className:o("flex w-full min-w-0 flex-col gap-1",t),"data-sidebar":"menu",...e}));Se.displayName="SidebarMenu";var ge=n(({className:t,...e},a)=>r("li",{ref:a,className:o("group/menu-item relative",t),"data-sidebar":"menu-item",...e}));ge.displayName="SidebarMenuItem";var ve=q({base:"peer/menu-button ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none transition-[width,height,padding] focus-visible:ring-2 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]:font-medium group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),he=n(({asChild:t=!1,isActive:e=!1,variant:a="default",size:i="default",tooltip:d,className:s,...c},S)=>{let p=t?v:"button",{isMobile:m,state:b}=M(),h=r(p,{ref:S,className:o(ve({variant:a,size:i}),s),"data-active":e,"data-sidebar":"menu-button","data-size":i,...c});return d?f(k,{children:[r(A,{asChild:!0,children:h}),r(D,{align:"center",hidden:b!=="collapsed"||m,side:"right",...typeof d=="string"?{children:d}:d})]}):h});he.displayName="SidebarMenuButton";var xe=n(({className:t,asChild:e=!1,showOnHover:a=!1,...i},d)=>r(e?v:"button",{ref:d,className:o("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-none transition-transform focus-visible:ring-2 [&>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",a&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",t),"data-sidebar":"menu-action",...i}));xe.displayName="SidebarMenuAction";var ye=n(({className:t,...e},a)=>r("div",{ref:a,className:o("text-sidebar-foreground 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","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",t),"data-sidebar":"menu-badge",...e}));ye.displayName="SidebarMenuBadge";var Me=n(({className:t,showIcon:e=!1,...a},i)=>{let d=R(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return f("div",{ref:i,className:o("flex h-8 items-center gap-2 rounded-md px-2",t),"data-sidebar":"menu-skeleton",...a,children:[e?r(P,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}):null,r(P,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":d}})]})});Me.displayName="SidebarMenuSkeleton";var Pe=n(({className:t,...e},a)=>r("ul",{ref:a,className:o("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),"data-sidebar":"menu-sub",...e}));Pe.displayName="SidebarMenuSub";var Ee=n(({...t},e)=>r("li",{ref:e,...t}));Ee.displayName="SidebarMenuSubItem";var Ce=n(({asChild:t=!1,size:e="md",isActive:a,className:i,...d},s)=>r(t?v:"a",{ref:s,className:o("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",e==="sm"&&"text-xs",e==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),"data-active":a,"data-sidebar":"menu-sub-button","data-size":e,...d}));Ce.displayName="SidebarMenuSubButton";export{M as a,ae as b,re as c,oe as d,ne as e,ie as f,de as g,se as h,le as i,pe as j,be as k,ue as l,ce as m,me as n,fe as o,Se as p,ge as q,he as r,xe as s,ye as t,Me as u,Pe as v,Ee as w,Ce as x};
2
- //# sourceMappingURL=chunk-FSXJI6UE.js.map
1
+ "use client";import{a as _,b as k,c as A,d as D}from"./chunk-CTKVRKDK.js";import{a as H}from"./chunk-NPOAOTIH.js";import{a as N}from"./chunk-432ZMHFM.js";import{a as T,c as I,g as B,h as L}from"./chunk-XRJ3USVN.js";import{a as P}from"./chunk-NSTXYMJD.js";import{a as w}from"./chunk-24TJIVWR.js";import{a as o}from"./chunk-VPYH6JWS.js";import{useMediaQuery as V}from"@codefast/hooks";import{Slot as v}from"@radix-ui/react-slot";import{VisuallyHidden as F}from"@radix-ui/react-visually-hidden";import{PanelLeftIcon as $}from"lucide-react";import{createContext as U,forwardRef as n,useCallback as G,useContext as W,useEffect as j,useMemo as R,useState as z}from"react";import{tv as q}from"tailwind-variants";import{jsx as r,jsxs as f}from"react/jsx-runtime";var Q="sidebar:state",X=60*60*24*7,Y="16rem",J="18rem",Z="3rem",ee="b",te=768,O=U(null);function M(){let t=W(O);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}var ae=n(({defaultOpen:t=!0,open:e,onOpenChange:a,className:i,style:d,children:s,...c},S)=>{let p=V(`(max-width: ${te-1}px)`),[m,b]=z(!1),[h,E]=z(t),g=e??h,x=G(l=>{let u=typeof l=="function"?l(g):l;a?a(u):E(u),document.cookie=`${Q}=${u}; path=/; max-age=${X}`},[a,g]),y=G(()=>{p?b(l=>!l):x(l=>!l)},[p,x,b]);j(()=>{let l=u=>{u.key===ee&&(u.metaKey||u.ctrlKey)&&(u.preventDefault(),y())};return window.addEventListener("keydown",l),()=>{window.removeEventListener("keydown",l)}},[y]);let C=g?"expanded":"collapsed",K=R(()=>({state:C,open:g,setOpen:x,isMobile:p,openMobile:m,setOpenMobile:b,toggleSidebar:y}),[C,g,x,p,m,b,y]);return r(O.Provider,{value:K,children:r(_,{delayDuration:0,children:r("div",{ref:S,className:o("group/sidebar-wrapper has-[[data-variant=inset]]:bg-sidebar flex min-h-svh w-full",i),style:{"--sidebar-width":Y,"--sidebar-width-icon":Z,...d},...c,children:s})})})});ae.displayName="SidebarProvider";var re=n(({side:t="left",variant:e="sidebar",collapsible:a="offcanvas",className:i,children:d,...s},c)=>{let{isMobile:S,state:p,openMobile:m,setOpenMobile:b}=M();return a==="none"?r("div",{ref:c,className:o("bg-sidebar text-sidebar-foreground flex h-full w-[--sidebar-width] flex-col",i),...s,children:d}):S?r(T,{open:m,onOpenChange:b,...s,children:f(I,{className:"bg-sidebar text-sidebar-foreground w-[--sidebar-width] p-0 [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar",side:t,style:{"--sidebar-width":J},children:[f(F,{children:[r(B,{children:"Sidebar"}),r(L,{children:"Press escape to close the sidebar"})]}),r("div",{className:"flex h-full w-full flex-col",children:d})]})}):f("div",{ref:c,className:"text-sidebar-foreground group peer hidden md:block","data-collapsible":p==="collapsed"?a:"","data-side":t,"data-state":p,"data-variant":e,children:[r("div",{className:o("relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),r("div",{className:o("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...s,children:r("div",{className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow","data-sidebar":"sidebar",children:d})})]})});re.displayName="Sidebar";var oe=n(({className:t,onClick:e,...a},i)=>{let{toggleSidebar:d}=M();return f(w,{ref:i,icon:!0,className:o("",t),"data-sidebar":"trigger",size:"xxs",variant:"ghost",onClick:s=>{e?.(s),d()},...a,children:[r($,{}),r("span",{className:"sr-only",children:"Toggle Sidebar"})]})});oe.displayName="SidebarTrigger";var ne=n(({className:t,...e},a)=>{let{toggleSidebar:i}=M();return r("button",{ref:a,"aria-label":"Toggle Sidebar",className:o("hover:after:bg-sidebar-border 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-0.5 group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[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]:hover:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",t),"data-sidebar":"rail",tabIndex:-1,title:"Toggle Sidebar",type:"button",onClick:i,...e})});ne.displayName="SidebarRail";var ie=n(({className:t,...e},a)=>r("main",{ref:a,className:o("bg-background relative flex min-h-svh flex-1 flex-col","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] 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",t),...e}));ie.displayName="SidebarInset";var de=n(({className:t,...e},a)=>r(H,{ref:a,className:o("bg-background focus-visible:ring-sidebar-ring h-8 w-full shadow-none focus-visible:ring-2",t),"data-sidebar":"input",...e}));de.displayName="SidebarInput";var se=n(({className:t,...e},a)=>r("div",{ref:a,className:o("flex flex-col gap-2 p-2",t),"data-sidebar":"header",...e}));se.displayName="SidebarHeader";var le=n(({className:t,...e},a)=>r("div",{ref:a,className:o("flex flex-col gap-2 p-2",t),"data-sidebar":"footer",...e}));le.displayName="SidebarFooter";var pe=n(({className:t,...e},a)=>r(N,{ref:a,className:o("bg-sidebar-border mx-2 w-auto",t),"data-sidebar":"separator",...e}));pe.displayName="SidebarSeparator";var be=n(({className:t,...e},a)=>r("div",{ref:a,className:o("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),"data-sidebar":"content",...e}));be.displayName="SidebarContent";var ue=n(({className:t,...e},a)=>r("div",{ref:a,className:o("relative flex w-full min-w-0 flex-col p-2",t),"data-sidebar":"group",...e}));ue.displayName="SidebarGroup";var ce=n(({className:t,asChild:e=!1,...a},i)=>r(e?v:"div",{ref:i,className:o("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-none transition-[margin,opa] 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",t),"data-sidebar":"group-label",...a}));ce.displayName="SidebarGroupLabel";var me=n(({className:t,asChild:e=!1,...a},i)=>r(e?v:"button",{ref:i,className:o("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-none transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",t),"data-sidebar":"group-action",...a}));me.displayName="SidebarGroupAction";var fe=n(({className:t,...e},a)=>r("div",{ref:a,className:o("w-full text-sm",t),"data-sidebar":"group-content",...e}));fe.displayName="SidebarGroupContent";var Se=n(({className:t,...e},a)=>r("ul",{ref:a,className:o("flex w-full min-w-0 flex-col gap-1",t),"data-sidebar":"menu",...e}));Se.displayName="SidebarMenu";var ge=n(({className:t,...e},a)=>r("li",{ref:a,className:o("group/menu-item relative",t),"data-sidebar":"menu-item",...e}));ge.displayName="SidebarMenuItem";var ve=q({base:"peer/menu-button ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none transition-[width,height,padding] focus-visible:ring-2 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]:font-medium group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),he=n(({asChild:t=!1,isActive:e=!1,variant:a="default",size:i="default",tooltip:d,className:s,...c},S)=>{let p=t?v:"button",{isMobile:m,state:b}=M(),h=r(p,{ref:S,className:o(ve({variant:a,size:i}),s),"data-active":e,"data-sidebar":"menu-button","data-size":i,...c});return d?f(k,{children:[r(A,{asChild:!0,children:h}),r(D,{align:"center",hidden:b!=="collapsed"||m,side:"right",...typeof d=="string"?{children:d}:d})]}):h});he.displayName="SidebarMenuButton";var xe=n(({className:t,asChild:e=!1,showOnHover:a=!1,...i},d)=>r(e?v:"button",{ref:d,className:o("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-none transition-transform focus-visible:ring-2 [&>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",a&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",t),"data-sidebar":"menu-action",...i}));xe.displayName="SidebarMenuAction";var ye=n(({className:t,...e},a)=>r("div",{ref:a,className:o("text-sidebar-foreground 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","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",t),"data-sidebar":"menu-badge",...e}));ye.displayName="SidebarMenuBadge";var Me=n(({className:t,showIcon:e=!1,...a},i)=>{let d=R(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return f("div",{ref:i,className:o("flex h-8 items-center gap-2 rounded-md px-2",t),"data-sidebar":"menu-skeleton",...a,children:[e?r(P,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}):null,r(P,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":d}})]})});Me.displayName="SidebarMenuSkeleton";var Pe=n(({className:t,...e},a)=>r("ul",{ref:a,className:o("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),"data-sidebar":"menu-sub",...e}));Pe.displayName="SidebarMenuSub";var Ee=n(({...t},e)=>r("li",{ref:e,...t}));Ee.displayName="SidebarMenuSubItem";var Ce=n(({asChild:t=!1,size:e="md",isActive:a,className:i,...d},s)=>r(t?v:"a",{ref:s,className:o("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",e==="sm"&&"text-xs",e==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),"data-active":a,"data-sidebar":"menu-sub-button","data-size":e,...d}));Ce.displayName="SidebarMenuSubButton";export{M as a,ae as b,re as c,oe as d,ne as e,ie as f,de as g,se as h,le as i,pe as j,be as k,ue as l,ce as m,me as n,fe as o,Se as p,ge as q,he as r,xe as s,ye as t,Me as u,Pe as v,Ee as w,Ce as x};
2
+ //# sourceMappingURL=chunk-PP6Z3U6S.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkOIF6PONXcjs = require('./chunk-OIF6PONX.cjs');var _chunkDD6AVCRHcjs = require('./chunk-DD6AVCRH.cjs');var _cmdk = require('cmdk');var _lucidereact = require('lucide-react');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var i=_react.forwardRef.call(void 0, ({className:e,...o},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command,{ref:t,className:_chunkDD6AVCRHcjs.a.call(void 0, "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...o}));i.displayName=_cmdk.Command.displayName;function I({children:e,...o}){return _jsxruntime.jsx.call(void 0, _chunkOIF6PONXcjs.a,{...o,children:_jsxruntime.jsx.call(void 0, _chunkOIF6PONXcjs.c,{className:"p-0",children:_jsxruntime.jsx.call(void 0, i,{className:"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5",children:e})})})}var C=_react.forwardRef.call(void 0, ({className:e,...o},t)=>_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center gap-2 border-b px-3","cmdk-input-wrapper":"",children:[_jsxruntime.jsx.call(void 0, _lucidereact.SearchIcon,{className:"size-5 shrink-0 opacity-50"}),_jsxruntime.jsx.call(void 0, _cmdk.Command.Input,{ref:t,className:_chunkDD6AVCRHcjs.a.call(void 0, "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-default disabled:opacity-50",e),...o})]}));C.displayName=_cmdk.Command.Input.displayName;var l=_react.forwardRef.call(void 0, ({className:e,...o},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.List,{ref:t,className:_chunkDD6AVCRHcjs.a.call(void 0, "max-h-72 overflow-y-auto overflow-x-hidden",e),...o}));l.displayName=_cmdk.Command.List.displayName;var y=_react.forwardRef.call(void 0, (e,o)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Empty,{ref:o,className:"py-6 text-center text-sm",...e}));y.displayName=_cmdk.Command.Empty.displayName;var u=_react.forwardRef.call(void 0, ({className:e,...o},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Group,{ref:t,className:_chunkDD6AVCRHcjs.a.call(void 0, "text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...o}));u.displayName=_cmdk.Command.Group.displayName;var f=_react.forwardRef.call(void 0, ({className:e,...o},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Separator,{ref:t,className:_chunkDD6AVCRHcjs.a.call(void 0, "bg-border -mx-1 h-px",e),...o}));f.displayName=_cmdk.Command.Separator.displayName;var c=_react.forwardRef.call(void 0, ({className:e,...o},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Item,{ref:t,className:_chunkDD6AVCRHcjs.a.call(void 0, "gap-x-2 px-3 py-1.5","relative flex cursor-pointer select-none items-center rounded text-sm","aria-disabled:pointer-events-none aria-disabled:opacity-50","aria-selected:bg-accent aria-selected:text-accent-foreground aria-selected:outline-none",e),...o}));c.displayName=_cmdk.Command.Item.displayName;var P=_react.forwardRef.call(void 0, ({className:e,...o},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Loading,{ref:t,className:_chunkDD6AVCRHcjs.a.call(void 0, "flex justify-center p-2",e),...o}));P.displayName=_cmdk.Command.Loading.displayName;function k({className:e,...o}){return _jsxruntime.jsx.call(void 0, "span",{className:_chunkDD6AVCRHcjs.a.call(void 0, "text-muted-foreground ml-auto text-xs tracking-widest",e),...o})}exports.a = i; exports.b = I; exports.c = C; exports.d = l; exports.e = y; exports.f = u; exports.g = f; exports.h = c; exports.i = P; exports.j = k;
2
+ //# sourceMappingURL=chunk-QISUHNKM.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-QISUHNKM.cjs","../src/components/command.tsx"],"names":["className","jsx","CommandPrimitive","forwardedRef","cn","Command","children","Dialog","DialogContent","CommandInput","forwardRef","jsxs","SearchIcon","CommandList","CommandGroup","CommandSeparator","CommandItem","CommandLoading"],"mappings":"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","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-QISUHNKM.cjs","sourcesContent":[null,"'use client';\n\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { SearchIcon } from 'lucide-react';\nimport {\n type ComponentProps,\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n type HTMLAttributes,\n type JSX,\n} from 'react';\n\nimport { Dialog, DialogContent } from '@/components/dialog';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Command\n * -------------------------------------------------------------------------- */\n\ntype CommandElement = ComponentRef<typeof CommandPrimitive>;\ntype CommandProps = ComponentPropsWithoutRef<typeof CommandPrimitive>;\n\nconst Command = forwardRef<CommandElement, CommandProps>(({ className, ...props }, forwardedRef) => (\n <CommandPrimitive\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className,\n )}\n {...props}\n />\n));\n\nCommand.displayName = CommandPrimitive.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandDialog\n * -------------------------------------------------------------------------- */\n\ntype CommandDialogProps = ComponentProps<typeof Dialog>;\n\nfunction CommandDialog({ children, ...props }: CommandDialogProps): JSX.Element {\n return (\n <Dialog {...props}>\n <DialogContent className=\"p-0\">\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CommandInput\n * -------------------------------------------------------------------------- */\n\ntype CommandInputElement = ComponentRef<typeof CommandPrimitive.Input>;\ntype CommandInputProps = ComponentPropsWithoutRef<typeof CommandPrimitive.Input>;\n\nconst CommandInput = forwardRef<CommandInputElement, CommandInputProps>(({ className, ...props }, forwardedRef) => (\n <div className=\"flex items-center gap-2 border-b px-3\" cmdk-input-wrapper=\"\">\n <SearchIcon className=\"size-5 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={forwardedRef}\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-default disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandList\n * -------------------------------------------------------------------------- */\n\ntype CommandListElement = ComponentRef<typeof CommandPrimitive.List>;\ntype CommandListProps = ComponentPropsWithoutRef<typeof CommandPrimitive.List>;\n\nconst CommandList = forwardRef<CommandListElement, CommandListProps>(({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.List\n ref={forwardedRef}\n className={cn('max-h-72 overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandEmpty\n * -------------------------------------------------------------------------- */\n\ntype CommandEmptyElement = ComponentRef<typeof CommandPrimitive.Empty>;\ntype CommandEmptyProps = ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>;\n\nconst CommandEmpty = forwardRef<CommandEmptyElement, CommandEmptyProps>((props, forwardedRef) => (\n <CommandPrimitive.Empty ref={forwardedRef} className=\"py-6 text-center text-sm\" {...props} />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandGroup\n * -------------------------------------------------------------------------- */\n\ntype CommandGroupElement = ComponentRef<typeof CommandPrimitive.Group>;\ntype CommandGroupProps = ComponentPropsWithoutRef<typeof CommandPrimitive.Group>;\n\nconst CommandGroup = forwardRef<CommandGroupElement, CommandGroupProps>(({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.Group\n ref={forwardedRef}\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandSeparator\n * -------------------------------------------------------------------------- */\n\ntype CommandSeparatorElement = ComponentRef<typeof CommandPrimitive.Separator>;\ntype CommandSeparatorProps = ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>;\n\nconst CommandSeparator = forwardRef<CommandSeparatorElement, CommandSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.Separator ref={forwardedRef} className={cn('bg-border -mx-1 h-px', className)} {...props} />\n ),\n);\n\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandItem\n * -------------------------------------------------------------------------- */\n\ntype CommandItemElement = ComponentRef<typeof CommandPrimitive.Item>;\ntype CommandItemProps = ComponentPropsWithoutRef<typeof CommandPrimitive.Item>;\n\nconst CommandItem = forwardRef<CommandItemElement, CommandItemProps>(({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'relative flex cursor-pointer select-none items-center rounded text-sm',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n 'aria-selected:bg-accent aria-selected:text-accent-foreground aria-selected:outline-none',\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandLoading\n * -------------------------------------------------------------------------- */\n\ntype CommandLoadingElement = ComponentRef<typeof CommandPrimitive.Loading>;\ntype CommandLoadingProps = ComponentPropsWithoutRef<typeof CommandPrimitive.Loading>;\n\nconst CommandLoading = forwardRef<CommandLoadingElement, CommandLoadingProps>(\n ({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.Loading ref={forwardedRef} className={cn('flex justify-center p-2', className)} {...props} />\n ),\n);\n\nCommandLoading.displayName = CommandPrimitive.Loading.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandShortcut\n * -------------------------------------------------------------------------- */\n\ntype CommandShortcutProps = HTMLAttributes<HTMLSpanElement>;\n\nfunction CommandShortcut({ className, ...props }: CommandShortcutProps): JSX.Element {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandLoading,\n CommandSeparator,\n CommandShortcut,\n type CommandDialogProps,\n type CommandEmptyProps,\n type CommandGroupProps,\n type CommandInputProps,\n type CommandItemProps,\n type CommandListProps,\n type CommandLoadingProps,\n type CommandProps,\n type CommandSeparatorProps,\n type CommandShortcutProps,\n};\n"]}
@@ -0,0 +1,2 @@
1
+ import{a as n}from"./chunk-VPYH6JWS.js";import*as e from"@radix-ui/react-menubar";import{CheckIcon as b,ChevronRightIcon as d,DotIcon as M}from"lucide-react";import{forwardRef as p}from"react";import{jsx as a,jsxs as s}from"react/jsx-runtime";var w=e.Menu,k=e.Group,W=e.Sub,L=e.RadioGroup,l=p(({className:t,...r},o)=>a(e.Root,{ref:o,className:n("bg-background flex h-10 items-center space-x-1 rounded-md border p-1",t),...r}));l.displayName=e.Root.displayName;var c=p(({className:t,...r},o)=>a(e.Trigger,{ref:o,className:n("gap-x-2 px-3 py-1.5","flex cursor-pointer select-none items-center rounded text-sm font-medium","focus:bg-accent focus:text-accent-foreground focus:outline-none","data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t),...r}));c.displayName=e.Trigger.displayName;var f=p(({children:t,className:r,inset:o,...i},u)=>s(e.SubTrigger,{ref:u,className:n("gap-x-2 px-3 py-1.5","flex cursor-pointer select-none items-center rounded text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",o&&"pl-8",r),...i,children:[t,a(d,{className:"ml-auto size-4"})]}));f.displayName=e.SubTrigger.displayName;var P=p(({className:t,...r},o)=>a(e.Portal,{children:a(e.SubContent,{ref:o,className:n("bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95","data-[state=open]:data-[side=top]:slide-in-from-bottom-2","data-[state=open]:data-[side=right]:slide-in-from-left-2","data-[state=open]:data-[side=bottom]:slide-in-from-top-2","data-[state=open]:data-[side=left]:slide-in-from-right-2","data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95","data-[state=closed]:data-[side=top]:slide-out-to-bottom-2","data-[state=closed]:data-[side=left]:slide-out-to-right-2","data-[state=closed]:data-[side=bottom]:slide-out-to-top-2","data-[state=closed]:data-[side=right]:slide-out-to-left-2",t),...r})}));P.displayName=e.SubContent.displayName;var y=p(({className:t,align:r="start",alignOffset:o=-4,sideOffset:i=8,...u},m)=>a(e.Portal,{children:a(e.Content,{ref:m,align:r,alignOffset:o,className:n("bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2",t),sideOffset:i,...u})}));y.displayName=e.Content.displayName;var g=p(({className:t,inset:r,...o},i)=>a(e.Item,{ref:i,className:n("gap-x-2 px-3 py-1.5","relative flex cursor-pointer select-none items-center rounded text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",r&&"pl-8",t),...o}));g.displayName=e.Item.displayName;var v=p(({children:t,className:r,checked:o,...i},u)=>s(e.CheckboxItem,{ref:u,checked:o,className:n("gap-x-2 px-3 py-1.5","pl-8","relative flex cursor-pointer select-none items-center rounded text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",r),...i,children:[a("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:a(e.ItemIndicator,{children:a(b,{className:"size-4"})})}),t]}));v.displayName=e.CheckboxItem.displayName;var C=p(({children:t,className:r,...o},i)=>s(e.RadioItem,{ref:i,className:n("gap-x-2 px-3 py-1.5","pl-8","relative flex cursor-pointer select-none items-center rounded text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",r),...o,children:[a("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:a(e.ItemIndicator,{children:a(M,{className:"size-4 fill-current"})})}),t]}));C.displayName=e.RadioItem.displayName;var x=p(({className:t,inset:r,...o},i)=>a(e.Label,{ref:i,className:n("gap-x-2 px-3 py-1.5","flex items-center text-sm font-semibold",r&&"pl-8",t),...o}));x.displayName=e.Label.displayName;var R=p(({className:t,...r},o)=>a(e.Separator,{ref:o,className:n("bg-muted mx-2 my-1 h-px",t),...r}));R.displayName=e.Separator.displayName;function A({className:t,...r}){return a("span",{className:n("text-muted-foreground ml-auto text-xs tracking-widest",t),...r})}var h=p(({className:t,...r},o)=>a(e.Arrow,{ref:o,className:n("fill-popover",t),...r}));h.displayName=e.Arrow.displayName;export{w as a,k as b,W as c,L as d,l as e,c as f,f as g,P as h,y as i,g as j,v as k,C as l,x as m,R as n,A as o,h as p};
2
+ //# sourceMappingURL=chunk-QUMY3I5T.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/menubar.tsx"],"names":["MenubarPrimitive","CheckIcon","ChevronRightIcon","DotIcon","forwardRef","jsx","jsxs","MenubarMenu","MenubarGroup","MenubarSub","MenubarRadioGroup","Menubar","className","props","forwardedRef","cn","MenubarTrigger","MenubarSubTrigger","children","inset","MenubarSubContent","MenubarContent","align","alignOffset","sideOffset","MenubarItem","MenubarCheckboxItem","checked","MenubarRadioItem","MenubarLabel","MenubarSeparator","MenubarShortcut","MenubarArrow"],"mappings":"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","sourcesContent":["import * as MenubarPrimitive from '@radix-ui/react-menubar';\nimport { CheckIcon, ChevronRightIcon, DotIcon } from 'lucide-react';\nimport {\n type ComponentProps,\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n type HTMLAttributes,\n type JSX,\n} from 'react';\n\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarMenu\n * -------------------------------------------------------------------------- */\n\ntype MenubarMenuProps = ComponentProps<typeof MenubarPrimitive.Menu>;\nconst MenubarMenu = MenubarPrimitive.Menu;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarGroup\n * -------------------------------------------------------------------------- */\n\ntype MenubarGroupProps = ComponentPropsWithoutRef<typeof MenubarPrimitive.Group>;\nconst MenubarGroup = MenubarPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSub\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubProps = ComponentPropsWithoutRef<typeof MenubarPrimitive.Sub>;\nconst MenubarSub = MenubarPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioGroup\n * -------------------------------------------------------------------------- */\n\ntype MenubarRadioGroupProps = ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioGroup>;\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: Menubar\n * -------------------------------------------------------------------------- */\n\ntype MenubarElement = ComponentRef<typeof MenubarPrimitive.Root>;\ntype MenubarProps = ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>;\n\nconst Menubar = forwardRef<MenubarElement, MenubarProps>(({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Root\n ref={forwardedRef}\n className={cn('bg-background flex h-10 items-center space-x-1 rounded-md border p-1', className)}\n {...props}\n />\n));\n\nMenubar.displayName = MenubarPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarTrigger\n * -------------------------------------------------------------------------- */\n\ntype MenubarTriggerElement = ComponentRef<typeof MenubarPrimitive.Trigger>;\ntype MenubarTriggerProps = ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>;\n\nconst MenubarTrigger = forwardRef<MenubarTriggerElement, MenubarTriggerProps>(\n ({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Trigger\n ref={forwardedRef}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'flex cursor-pointer select-none items-center rounded text-sm font-medium',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n className,\n )}\n {...props}\n />\n ),\n);\n\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubTriggerElement = ComponentRef<typeof MenubarPrimitive.SubTrigger>;\n\ninterface MenubarSubTriggerProps extends ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> {\n inset?: boolean;\n}\n\nconst MenubarSubTrigger = forwardRef<MenubarSubTriggerElement, MenubarSubTriggerProps>(\n ({ children, className, inset, ...props }, forwardedRef) => (\n <MenubarPrimitive.SubTrigger\n ref={forwardedRef}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'flex cursor-pointer select-none items-center rounded text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </MenubarPrimitive.SubTrigger>\n ),\n);\n\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSubContent\n * -------------------------------------------------------------------------- */\n\ntype MenubarSubContentElement = ComponentRef<typeof MenubarPrimitive.SubContent>;\ntype MenubarSubContentProps = ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>;\n\nconst MenubarSubContent = forwardRef<MenubarSubContentElement, MenubarSubContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.SubContent\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95',\n 'data-[state=open]:data-[side=top]:slide-in-from-bottom-2',\n 'data-[state=open]:data-[side=right]:slide-in-from-left-2',\n 'data-[state=open]:data-[side=bottom]:slide-in-from-top-2',\n 'data-[state=open]:data-[side=left]:slide-in-from-right-2',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95',\n 'data-[state=closed]:data-[side=top]:slide-out-to-bottom-2',\n 'data-[state=closed]:data-[side=left]:slide-out-to-right-2',\n 'data-[state=closed]:data-[side=bottom]:slide-out-to-top-2',\n 'data-[state=closed]:data-[side=right]:slide-out-to-left-2',\n className,\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n ),\n);\n\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarContent\n * -------------------------------------------------------------------------- */\n\ntype MenubarContentElement = ComponentRef<typeof MenubarPrimitive.Content>;\ntype MenubarContentProps = ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>;\n\nconst MenubarContent = forwardRef<MenubarContentElement, MenubarContentProps>(\n ({ className, align = 'start', alignOffset = -4, sideOffset = 8, ...props }, forwardedRef) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={forwardedRef}\n align={align}\n alignOffset={alignOffset}\n className={cn(\n 'bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2',\n className,\n )}\n sideOffset={sideOffset}\n {...props}\n />\n </MenubarPrimitive.Portal>\n ),\n);\n\nMenubarContent.displayName = MenubarPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarItemElement = ComponentRef<typeof MenubarPrimitive.Item>;\n\ninterface MenubarItemProps extends ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> {\n inset?: boolean;\n}\n\nconst MenubarItem = forwardRef<MenubarItemElement, MenubarItemProps>(({ className, inset, ...props }, forwardedRef) => (\n <MenubarPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'relative flex cursor-pointer select-none items-center rounded text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\n\nMenubarItem.displayName = MenubarPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarCheckboxItemElement = ComponentRef<typeof MenubarPrimitive.CheckboxItem>;\ntype MenubarCheckboxItemProps = ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>;\n\nconst MenubarCheckboxItem = forwardRef<MenubarCheckboxItemElement, MenubarCheckboxItemProps>(\n ({ children, className, checked, ...props }, forwardedRef) => (\n <MenubarPrimitive.CheckboxItem\n ref={forwardedRef}\n checked={checked}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'pl-8',\n 'relative flex cursor-pointer select-none items-center rounded text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n ),\n);\n\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarRadioItem\n * -------------------------------------------------------------------------- */\n\ntype MenubarRadioItemElement = ComponentRef<typeof MenubarPrimitive.RadioItem>;\ntype MenubarRadioItemProps = ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>;\n\nconst MenubarRadioItem = forwardRef<MenubarRadioItemElement, MenubarRadioItemProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <MenubarPrimitive.RadioItem\n ref={forwardedRef}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'pl-8',\n 'relative flex cursor-pointer select-none items-center rounded text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <DotIcon className=\"size-4 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n ),\n);\n\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarLabel\n * -------------------------------------------------------------------------- */\n\ntype MenubarLabelElement = ComponentRef<typeof MenubarPrimitive.Label>;\n\ninterface MenubarLabelProps extends ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> {\n inset?: boolean;\n}\n\nconst MenubarLabel = forwardRef<MenubarLabelElement, MenubarLabelProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <MenubarPrimitive.Label\n ref={forwardedRef}\n className={cn('gap-x-2 px-3 py-1.5', 'flex items-center text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n ),\n);\n\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarSeparator\n * -------------------------------------------------------------------------- */\n\ntype MenubarSeparatorElement = ComponentRef<typeof MenubarPrimitive.Separator>;\ntype MenubarSeparatorProps = ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>;\n\nconst MenubarSeparator = forwardRef<MenubarSeparatorElement, MenubarSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Separator ref={forwardedRef} className={cn('bg-muted mx-2 my-1 h-px', className)} {...props} />\n ),\n);\n\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarShortcut\n * -------------------------------------------------------------------------- */\n\ntype MenubarShortcutProps = HTMLAttributes<HTMLSpanElement>;\n\nfunction MenubarShortcut({ className, ...props }: MenubarShortcutProps): JSX.Element {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: MenubarArrow\n * -------------------------------------------------------------------------- */\n\ntype MenubarArrowElement = ComponentRef<typeof MenubarPrimitive.Arrow>;\ntype MenubarArrowProps = MenubarPrimitive.MenubarArrowProps;\n\nconst MenubarArrow = forwardRef<MenubarArrowElement, MenubarArrowProps>(({ className, ...props }, forwardedRef) => (\n <MenubarPrimitive.Arrow ref={forwardedRef} className={cn('fill-popover', className)} {...props} />\n));\n\nMenubarArrow.displayName = MenubarPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Menubar,\n MenubarArrow,\n MenubarCheckboxItem,\n MenubarContent,\n MenubarGroup,\n MenubarItem,\n MenubarLabel,\n MenubarMenu,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSeparator,\n MenubarShortcut,\n MenubarSub,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarTrigger,\n type MenubarArrowProps,\n type MenubarCheckboxItemProps,\n type MenubarContentProps,\n type MenubarGroupProps,\n type MenubarItemProps,\n type MenubarLabelProps,\n type MenubarMenuProps,\n type MenubarProps,\n type MenubarRadioGroupProps,\n type MenubarRadioItemProps,\n type MenubarSeparatorProps,\n type MenubarShortcutProps,\n type MenubarSubContentProps,\n type MenubarSubProps,\n type MenubarSubTriggerProps,\n type MenubarTriggerProps,\n};\n"]}
@@ -0,0 +1,2 @@
1
+ import{a as n}from"./chunk-EVRI6TWT.js";import{a}from"./chunk-VPYH6JWS.js";import*as e from"@radix-ui/react-dialog";import{XIcon as g}from"lucide-react";import{forwardRef as r}from"react";import{jsx as i,jsxs as p}from"react/jsx-runtime";var x=e.Root,N=e.Trigger,D=r(({children:t,className:o,...l},s)=>i(e.Portal,{children:i(e.Overlay,{className:a("fixed inset-0 z-50 grid place-items-center overflow-auto bg-black/80 p-4 sm:pb-12 sm:pt-8","data-[state=open]:animate-duration-200 data-[state=open]:animate-fade-in","data-[state=closed]:animate-duration-200 data-[state=closed]:animate-fade-out"),children:p(e.Content,{ref:s,className:a("bg-background relative z-50 flex w-full max-w-lg flex-col rounded-lg border shadow-lg","data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=open]:animate-duration-200 data-[state=open]:fade-in","data-[state=closed]:zoom-out-95 data-[state=closed]:animate-duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out",o),...l,children:[t,p(e.Close,{className:n({className:"absolute right-4 top-4",icon:!0,size:"xxs",variant:"ghost"}),children:[i(g,{className:"size-4"}),i("span",{className:"sr-only",children:"Close"})]})]})})}));D.displayName=e.Content.displayName;function b({className:t,...o}){return i("header",{className:a("flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left",t),...o})}function E({className:t,...o}){return i("main",{className:a("overflow-auto px-6 py-2",t),...o})}function R({className:t,...o}){return i("footer",{className:a("flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-4 sm:flex-row sm:justify-end",t),...o})}var P=r(({className:t,...o},l)=>i(e.Title,{ref:l,className:a("text-lg font-semibold leading-none tracking-tight",t),...o}));P.displayName=e.Title.displayName;var d=r(({className:t,...o},l)=>i(e.Description,{ref:l,className:a("text-muted-foreground text-sm",t),...o}));d.displayName=e.Description.displayName;var f=r(({className:t,size:o,variant:l="outline",...s},m)=>i(e.Close,{ref:m,className:n({className:t,size:o,variant:l}),...s}));f.displayName=e.Close.displayName;export{x as a,N as b,D as c,b as d,E as e,R as f,P as g,d as h,f as i};
2
+ //# sourceMappingURL=chunk-RNWK4YZ2.js.map