@alkimi.org/ui-kit 0.11.4 → 0.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-372VUZFE.js.map +1 -1
- package/dist/chunk-3BVMHDYA.js.map +1 -1
- package/dist/chunk-3PEPOFYU.js.map +1 -1
- package/dist/chunk-3TLCOZ5R.js.map +1 -1
- package/dist/chunk-5L5DM2X5.js.map +1 -1
- package/dist/chunk-5X26XR44.js.map +1 -1
- package/dist/chunk-7J2ETVGK.js.map +1 -1
- package/dist/chunk-7SOZ6MOV.js.map +1 -1
- package/dist/chunk-BANQNQD6.js +3 -0
- package/dist/chunk-BANQNQD6.js.map +1 -0
- package/dist/chunk-BV7RXRSL.js.map +1 -1
- package/dist/chunk-CT2CRYC2.js.map +1 -1
- package/dist/chunk-DHHZMQ72.js.map +1 -1
- package/dist/chunk-DMMKR6TY.js.map +1 -1
- package/dist/chunk-EIM5R7AJ.js.map +1 -1
- package/dist/chunk-EJTY2ABY.js.map +1 -1
- package/dist/chunk-EKCAULFP.js.map +1 -1
- package/dist/chunk-EWRKHBIV.js.map +1 -1
- package/dist/chunk-FFYMV22V.mjs +3 -0
- package/dist/chunk-FFYMV22V.mjs.map +1 -0
- package/dist/chunk-FUYXCJOQ.js.map +1 -1
- package/dist/chunk-GRXC46JC.js.map +1 -1
- package/dist/chunk-I5INE4KG.js.map +1 -1
- package/dist/chunk-K4GMCVHO.js.map +1 -1
- package/dist/chunk-LQMOWEA7.js.map +1 -1
- package/dist/chunk-RJMIOBXZ.js.map +1 -1
- package/dist/chunk-RKRTEMMZ.js.map +1 -1
- package/dist/chunk-RRAIGAHU.js.map +1 -1
- package/dist/chunk-TDMRUCR6.js.map +1 -1
- package/dist/chunk-UJZP6L4S.js.map +1 -1
- package/dist/chunk-ULIOO55I.js.map +1 -1
- package/dist/chunk-UNR6ATUH.js.map +1 -1
- package/dist/chunk-USPGZYMV.js.map +1 -1
- package/dist/chunk-VBPIXXIA.js.map +1 -1
- package/dist/chunk-WFD523CV.js.map +1 -1
- package/dist/chunk-WYRD4UAK.js.map +1 -1
- package/dist/chunk-XQILGD5B.js.map +1 -1
- package/dist/chunk-XYO4VLMF.js.map +1 -1
- package/dist/chunk-Z5V4P3EC.js.map +1 -1
- package/dist/components/GeometricFluidGrid.js.map +1 -1
- package/dist/components/GlitchLink.js.map +1 -1
- package/dist/components/PixelLoad.js.map +1 -1
- package/dist/components/TextDecoder.js.map +1 -1
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/card.js.map +1 -1
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/combobox.d.mts +3 -1
- package/dist/components/combobox.d.ts +3 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/combobox.mjs +1 -1
- package/dist/components/command.js.map +1 -1
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/date-range-picker.js.map +1 -1
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/field.js.map +1 -1
- package/dist/components/file-upload.js.map +1 -1
- package/dist/components/input.js.map +1 -1
- package/dist/components/label.js.map +1 -1
- package/dist/components/popover.js.map +1 -1
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/separator.js.map +1 -1
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/slider.js.map +1 -1
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/toast.js.map +1 -1
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/tree-select.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-XSJKREFJ.mjs +0 -3
- package/dist/chunk-XSJKREFJ.mjs.map +0 -1
- package/dist/chunk-YKXP3INY.js +0 -3
- package/dist/chunk-YKXP3INY.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-DMMKR6TY.js","../src/components/sidebar.tsx"],"names":["SIDEBAR_COOKIE_NAME","SIDEBAR_COOKIE_MAX_AGE","SIDEBAR_WIDTH","SIDEBAR_WIDTH_MOBILE","SIDEBAR_WIDTH_ICON","SIDEBAR_KEYBOARD_SHORTCUT","SIDEBAR_BANNER_HEIGHT","SidebarContext","SidebarMobileContext","useSidebar","context","SidebarProvider","defaultOpen","openProp","setOpenProp","bannerHeightProp","className","style","children","props","ref","openMobile","setOpenMobile","isFullyOpen","setIsFullyOpen","isAnimating","setIsAnimating","bannerVisible","setBannerVisible","_open","_setOpen","open","setOpen","value","openState"],"mappings":"AAAA,+8BAAY;AACZ,sDAA4D,sDAAwC,sDAAoE,sDAAwC,sDAAwC,sDAA+C,sDAAwC,uECCxT,iDACF,kEACkB,2CACJ,+CAuNrB,IAlMRA,EAAAA,CAAsB,eAAA,CACtBC,EAAAA,CAAyB,IAAA,CAAU,EAAA,CAAK,CAAA,CACxCC,EAAAA,CAAgB,UAAA,CAChBC,EAAAA,CAAuB,OAAA,CACvBC,EAAAA,CAAqB,sBAAA,CACrBC,EAAAA,CAA4B,GAAA,CAC5BC,EAAAA,CAAwB,MAAA,CAkBxBC,EAAAA,CAAuB,CAAA,CAAA,aAAA,CAA0C,IAAI,CAAA,CACrEC,EAAAA,CAA6B,CAAA,CAA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CAAA,CAErBJ,CAAAA,CAASI,CAAS,CAAA,CAGpB,QAAA,CAAS,MAAA,CAAS,CAAA,EAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-DMMKR6TY.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { PanelLeft, X, Menu } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button, buttonVariants } from \"@/components/button\"\nimport { Input } from \"@/components/input\"\nimport { Separator } from \"@/components/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/components/sheet\"\nimport { Skeleton } from \"@/components/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"@/components/tooltip\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16.75rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"23rem\"\nconst SIDEBAR_WIDTH_ICON = \"calc(3rem + 0.75rem)\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\nconst SIDEBAR_BANNER_HEIGHT = \"55px\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n isOpen: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n toggleSidebar: () => void\n toggleMobileSidebar: () => void\n setIsFullyOpen: (open: boolean) => void\n isAnimating: boolean\n setIsAnimating: (animating: boolean) => void\n isBannerClosing: boolean\n bannerVisible: boolean\n setBannerVisible: (visible: boolean) => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\nconst SidebarMobileContext = React.createContext(false)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nconst SidebarProvider = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n bannerHeight?: string\n }\n>(\n (\n {\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n bannerHeight: bannerHeightProp = SIDEBAR_BANNER_HEIGHT,\n className,\n style,\n children,\n ...props\n },\n ref\n ) => {\n const [openMobile, setOpenMobile] = React.useState(false)\n const [isFullyOpen, setIsFullyOpen] = React.useState(defaultOpen)\n const [isAnimating, setIsAnimating] = React.useState(false)\n const [bannerVisible, setBannerVisible] = React.useState(false)\n\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n const toggleSidebar = React.useCallback(() => {\n setOpen((open) => !open)\n }, [setOpen])\n\n const toggleMobileSidebar = React.useCallback(() => {\n const mdBreakpoint = getComputedStyle(document.documentElement)\n .getPropertyValue(\"--breakpoint-md\")\n .trim()\n if (\n mdBreakpoint &&\n window.matchMedia(`(min-width: ${mdBreakpoint})`).matches\n ) {\n return\n }\n setOpenMobile((open) => !open)\n }, [setOpenMobile])\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n const state = open ? \"expanded\" : \"collapsed\"\n\n const previousBannerChildrenRef = React.useRef<React.ReactNode[]>([])\n\n // Separate banner children (SidebarBanner) from layout children (Sidebar, SidebarInset)\n const childArray = React.Children.toArray(children)\n const bannerChildren = childArray.filter(\n (child) =>\n React.isValidElement(child) &&\n (child.type as React.FC & { displayName?: string })?.displayName ===\n \"SidebarBanner\"\n )\n const layoutChildren = childArray.filter(\n (child) =>\n !React.isValidElement(child) ||\n (child.type as React.FC & { displayName?: string })?.displayName !==\n \"SidebarBanner\"\n )\n\n // Store previous banner children for closing animation\n if (bannerChildren.length > 0 && bannerVisible) {\n previousBannerChildrenRef.current = bannerChildren\n }\n\n const hasBannerSlot = bannerChildren.length > 0\n const hasBanner = hasBannerSlot && bannerVisible\n const isClosing =\n !hasBanner && previousBannerChildrenRef.current.length > 0\n const displayBanner = hasBannerSlot\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n isOpen: isFullyOpen,\n setOpen,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n toggleMobileSidebar,\n setIsFullyOpen,\n isAnimating,\n setIsAnimating,\n isBannerClosing: isClosing,\n bannerVisible,\n setBannerVisible,\n }),\n [\n state,\n isFullyOpen,\n setOpen,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n toggleMobileSidebar,\n setIsFullyOpen,\n isAnimating,\n setIsAnimating,\n isClosing,\n bannerVisible,\n ]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n \"--sidebar-top\": hasBanner ? bannerHeightProp : \"0px\",\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n \"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar\",\n displayBanner && \"flex-col\",\n className\n )}\n ref={ref}\n {...props}\n >\n {displayBanner ? (\n <>\n <div\n className=\"relative overflow-hidden transition-[height] duration-200 ease-linear\"\n style={\n {\n height: hasBanner ? bannerHeightProp : \"0px\",\n } as React.CSSProperties\n }\n >\n <div\n className=\"fixed top-0 left-0 right-0 z-20 w-full transition-transform duration-200 ease-linear data-[state=closed]:-translate-y-full\"\n style={{ height: bannerHeightProp }}\n data-state={hasBanner ? \"open\" : \"closed\"}\n onTransitionEnd={() => {\n if (isClosing) {\n previousBannerChildrenRef.current = []\n }\n }}\n >\n {bannerChildren}\n </div>\n </div>\n <div className=\"flex flex-1\">{layoutChildren}</div>\n </>\n ) : (\n children\n )}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n }\n)\nSidebarProvider.displayName = \"SidebarProvider\"\n\nconst SidebarBanner = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"banner\"\n className={cn(\"w-full\", className)}\n {...props}\n />\n )\n})\nSidebarBanner.displayName = \"SidebarBanner\"\n\nconst Sidebar = React.forwardRef<\n HTMLElement,\n React.ComponentProps<\"aside\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n }\n>(\n (\n {\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n ...props\n },\n ref\n ) => {\n const {\n state,\n openMobile,\n setOpenMobile,\n setIsFullyOpen,\n setIsAnimating,\n isBannerClosing,\n } = useSidebar()\n const sidebarRef = React.useRef<HTMLDivElement>(null)\n const isFirstRenderRef = React.useRef(true)\n\n // Track when the sidebar animation completes\n React.useEffect(() => {\n const sidebar = sidebarRef.current\n if (!sidebar) return\n\n // On first render, set isFullyOpen immediately without waiting for animation\n if (isFirstRenderRef.current) {\n isFirstRenderRef.current = false\n setIsFullyOpen(state === \"expanded\")\n setIsAnimating(false)\n return\n }\n\n // Mark as animating when state changes\n setIsAnimating(true)\n\n // Fallback timeout in case transitionend doesn't fire\n const fallbackTimeout = setTimeout(() => {\n setIsFullyOpen(state === \"expanded\")\n setIsAnimating(false)\n }, 300) // Slightly longer than the 200ms transition duration\n\n const handleTransitionEnd = (event: TransitionEvent) => {\n // Only respond to transitions on the sidebar itself, not children\n if (event.target !== sidebar) return\n\n // Check if we're transitioning width, left, or right properties\n if (\n event.propertyName === \"left\" ||\n event.propertyName === \"right\" ||\n event.propertyName === \"width\"\n ) {\n clearTimeout(fallbackTimeout)\n setIsFullyOpen(state === \"expanded\")\n setIsAnimating(false)\n }\n }\n\n sidebar.addEventListener(\"transitionend\", handleTransitionEnd)\n return () => {\n sidebar.removeEventListener(\"transitionend\", handleTransitionEnd)\n clearTimeout(fallbackTimeout)\n }\n }, [state, setIsFullyOpen, setIsAnimating])\n\n if (collapsible === \"none\") {\n return (\n <aside\n className={cn(\n \"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </aside>\n )\n }\n\n return (\n <>\n {/* Mobile Sheet - visible only on mobile (< md) */}\n <Sheet open={openMobile} onOpenChange={setOpenMobile}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-mobile=\"true\"\n className=\"md:hidden bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n width: SIDEBAR_WIDTH_MOBILE,\n maxWidth: SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <SidebarMobileContext.Provider value={true}>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SidebarMobileContext.Provider>\n </SheetContent>\n </Sheet>\n\n {/* Desktop Sidebar - visible only on desktop (md+) */}\n <aside\n ref={ref}\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n data-variant={variant}\n data-side={side}\n >\n {/* Spacer to reserve horizontal space */}\n <div\n className={cn(\n \"w-(--sidebar-width) transition-[width] duration-200 ease-linear\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\"\n )}\n />\n {/* Fixed sidebar */}\n <div\n ref={sidebarRef}\n data-banner-closing={isBannerClosing}\n className={cn(\n \"fixed z-10 hidden w-(--sidebar-width) transition-[left,right,width,top,height] duration-200 ease-linear md:flex\",\n \"top-(--sidebar-top) h-[calc(100svh-var(--sidebar-top))]\",\n side === \"left\"\n ? \"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]\"\n : \"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]\",\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\",\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n className=\"flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow\"\n >\n <div className=\"flex flex-col my-2.5 ml-2.5 rounded-2xl border bg-sidebar border-sidebar-border flex-1 min-h-0\">\n {children}\n </div>\n </div>\n </div>\n </aside>\n </>\n )\n }\n)\nSidebar.displayName = \"Sidebar\"\n\nconst SidebarTrigger = React.forwardRef<\n React.ElementRef<typeof Button>,\n React.ComponentProps<typeof Button>\n>(({ className, onClick, ...props }, ref) => {\n const { toggleSidebar, toggleMobileSidebar, openMobile } = useSidebar()\n\n return (\n <>\n {/* Mobile trigger - visible below md */}\n <Button\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\n \"md:hidden bg-transparent hover:bg-transparent\",\n className\n )}\n onClick={(event) => {\n onClick?.(event)\n toggleMobileSidebar()\n }}\n {...props}\n >\n {openMobile ? (\n <span\n className={cn(\n buttonVariants({ variant: \"secondary\", size: \"icon\" })\n )}\n >\n <X size={16} />\n </span>\n ) : (\n <span\n className={cn(buttonVariants({ variant: \"outline\", size: \"icon\" }))}\n >\n <Menu size={16} />\n </span>\n )}\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n\n {/* Desktop trigger - visible at md+ */}\n <Button\n ref={ref}\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\"hidden md:inline-flex h-7 w-7\", className)}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <span className=\"rounded-full p-2\">\n <PanelLeft size={16} />\n </span>\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n </>\n )\n})\nSidebarTrigger.displayName = \"SidebarTrigger\"\n\nconst SidebarRail = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\">\n>(({ className, ...props }, ref) => {\n const { toggleSidebar } = useSidebar()\n\n return (\n <button\n ref={ref}\n data-sidebar=\"rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n \"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex\",\n \"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize\",\n \"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n \"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarRail.displayName = \"SidebarRail\"\n\nconst SidebarInset = React.memo(\n React.forwardRef<HTMLDivElement, React.ComponentProps<\"main\">>(\n ({ className, ...props }, ref) => {\n return (\n <main\n ref={ref}\n className={cn(\n \"relative flex min-w-0 w-full flex-1 flex-col\",\n \"md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow\",\n className\n )}\n {...props}\n />\n )\n }\n )\n)\nSidebarInset.displayName = \"SidebarInset\"\n\nconst SidebarInput = React.forwardRef<\n React.ElementRef<typeof Input>,\n React.ComponentProps<typeof Input>\n>(({ className, ...props }, ref) => {\n return (\n <Input\n ref={ref}\n data-sidebar=\"input\"\n className={cn(\n \"h-8 w-full bg-sidebar shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarInput.displayName = \"SidebarInput\"\n\nconst SidebarHeader = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showTrigger?: boolean\n }\n>(({ className, showTrigger = false, children, ...props }, ref) => {\n const { state } = useSidebar()\n const isMobile = React.useContext(SidebarMobileContext)\n\n const isCollapsed = state === \"collapsed\" && !isMobile\n\n return (\n <div\n ref={ref}\n data-sidebar=\"header\"\n className={cn(\n \"flex w-full gap-2 p-2 items-center\",\n isCollapsed\n ? \"justify-center items-center\"\n : \"justify-between items-start\",\n className\n )}\n {...props}\n >\n {!isCollapsed && (\n <div className=\"transition-all duration-200 w-full h-fit flex justify-between overflow-hidden\">\n <div className=\"whitespace-nowrap\">{children}</div>\n </div>\n )}\n\n {showTrigger && <SidebarTrigger />}\n </div>\n )\n})\nSidebarHeader.displayName = \"SidebarHeader\"\n\nconst SidebarFooter = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"footer\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n})\nSidebarFooter.displayName = \"SidebarFooter\"\n\nconst SidebarSeparator = React.forwardRef<\n React.ElementRef<typeof Separator>,\n React.ComponentProps<typeof Separator>\n>(({ className, ...props }, ref) => {\n return (\n <Separator\n ref={ref}\n data-sidebar=\"separator\"\n className={cn(\"mx-2 w-auto bg-border\", className)}\n {...props}\n />\n )\n})\nSidebarSeparator.displayName = \"SidebarSeparator\"\n\nconst SidebarContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"content\"\n className={cn(\n \"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden p-2\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarContent.displayName = \"SidebarContent\"\n\nconst SidebarGroup = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"group\"\n className={cn(\n \"relative flex w-full min-w-0 flex-col\",\n \"group-data-[collapsible=icon]:p-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroup.displayName = \"SidebarGroup\"\n\nconst SidebarGroupLabel = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"div\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-label\"\n className={cn(\n \"flex h-8 shrink-0 items-center rounded-md text-xs font-medium text-secondary-text outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n \"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupLabel.displayName = \"SidebarGroupLabel\"\n\nconst SidebarGroupAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-action\"\n className={cn(\n \"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupAction.displayName = \"SidebarGroupAction\"\n\nconst SidebarGroupContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"group-content\"\n className={cn(\"w-full text-sm\", className)}\n {...props}\n />\n))\nSidebarGroupContent.displayName = \"SidebarGroupContent\"\n\nconst SidebarMenu = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu\"\n className={cn(\"flex w-full min-w-0 flex-col gap-1\", className)}\n {...props}\n />\n))\nSidebarMenu.displayName = \"SidebarMenu\"\n\nconst SidebarMenuItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n data-sidebar=\"menu-item\"\n className={cn(\"group/menu-item relative\", className)}\n {...props}\n />\n))\nSidebarMenuItem.displayName = \"SidebarMenuItem\"\n\nconst sidebarMenuButtonVariants = cva(\n \"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"\",\n outline:\n \"bg-sidebar shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:!p-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst SidebarMenuButton = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n } & VariantProps<typeof sidebarMenuButtonVariants>\n>(\n (\n {\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n const { state } = useSidebar()\n\n const button = (\n <Comp\n ref={ref}\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== \"collapsed\"}\n {...tooltip}\n />\n </Tooltip>\n )\n }\n)\nSidebarMenuButton.displayName = \"SidebarMenuButton\"\n\nconst SidebarMenuAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n }\n>(({ className, asChild = false, showOnHover = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-action\"\n className={cn(\n \"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0\",\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n showOnHover &&\n \"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-base-accent-foreground md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuAction.displayName = \"SidebarMenuAction\"\n\nconst SidebarMenuBadge = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"menu-badge\"\n className={cn(\n \"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground\",\n \"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n))\nSidebarMenuBadge.displayName = \"SidebarMenuBadge\"\n\nconst SidebarMenuSkeleton = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n }\n>(({ className, showIcon = false, ...props }, ref) => {\n const width = React.useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n }, [])\n\n return (\n <div\n ref={ref}\n data-sidebar=\"menu-skeleton\"\n className={cn(\"flex h-8 items-center gap-2 rounded-md px-2\", className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-[--skeleton-width] flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n \"--skeleton-width\": width,\n } as React.CSSProperties\n }\n />\n </div>\n )\n})\nSidebarMenuSkeleton.displayName = \"SidebarMenuSkeleton\"\n\nconst SidebarMenuSub = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu-sub\"\n className={cn(\n \"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n))\nSidebarMenuSub.displayName = \"SidebarMenuSub\"\n\nconst SidebarMenuSubItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ ...props }, ref) => <li ref={ref} {...props} />)\nSidebarMenuSubItem.displayName = \"SidebarMenuSubItem\"\n\nconst SidebarMenuSubButton = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n }\n>(({ asChild = false, size = \"md\", isActive, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n data-active={isActive}\n className={cn(\n \"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground\",\n \"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground\",\n size === \"sm\" && \"text-xs\",\n size === \"md\" && \"text-sm\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuSubButton.displayName = \"SidebarMenuSubButton\"\n\nexport {\n Sidebar,\n SidebarBanner,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-DMMKR6TY.js","../src/components/sidebar.tsx"],"names":["SIDEBAR_COOKIE_NAME","SIDEBAR_COOKIE_MAX_AGE","SIDEBAR_WIDTH","SIDEBAR_WIDTH_MOBILE","SIDEBAR_WIDTH_ICON","SIDEBAR_KEYBOARD_SHORTCUT","SIDEBAR_BANNER_HEIGHT","SidebarContext","SidebarMobileContext","useSidebar","context","SidebarProvider","defaultOpen","openProp","setOpenProp","bannerHeightProp","className","style","children","props","ref","openMobile","setOpenMobile","isFullyOpen","setIsFullyOpen","isAnimating","setIsAnimating","bannerVisible","setBannerVisible","_open","_setOpen","open","setOpen","value","openState"],"mappings":"AAAA,+8BAAY;AACZ,sDAA4D,sDAAwC,sDAAoE,sDAAwC,sDAAwC,sDAA+C,sDAAwC,uECCxT,iDACF,kEACkB,2CACJ,+CAuNrB,IAlMRA,EAAAA,CAAsB,eAAA,CACtBC,EAAAA,CAAyB,IAAA,CAAU,EAAA,CAAK,CAAA,CACxCC,EAAAA,CAAgB,UAAA,CAChBC,EAAAA,CAAuB,OAAA,CACvBC,EAAAA,CAAqB,sBAAA,CACrBC,EAAAA,CAA4B,GAAA,CAC5BC,EAAAA,CAAwB,MAAA,CAkBxBC,EAAAA,CAAuB,CAAA,CAAA,aAAA,CAA0C,IAAI,CAAA,CACrEC,EAAAA,CAA6B,CAAA,CAAA,aAAA,CAAc,CAAA,CAAK,CAAA,CAEtD,SAASC,CAAAA,CAAAA,CAAa,CACpB,IAAMC,CAAAA,CAAgB,CAAA,CAAA,UAAA,CAAWH,EAAc,CAAA,CAC/C,EAAA,CAAI,CAACG,CAAAA,CACH,MAAM,IAAI,KAAA,CAAM,mDAAmD,CAAA,CAGrE,OAAOA,CACT,CAEA,IAAMC,EAAAA,CAAwB,CAAA,CAAA,UAAA,CAS5B,CACE,CACE,WAAA,CAAAC,CAAAA,CAAc,CAAA,CAAA,CACd,IAAA,CAAMC,CAAAA,CACN,YAAA,CAAcC,CAAAA,CACd,YAAA,CAAcC,CAAAA,CAAmBT,EAAAA,CACjC,SAAA,CAAAU,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EACG,CACH,GAAM,CAACC,CAAAA,CAAYC,CAAa,CAAA,CAAU,CAAA,CAAA,QAAA,CAAS,CAAA,CAAK,CAAA,CAClD,CAACC,CAAAA,CAAaC,CAAc,CAAA,CAAU,CAAA,CAAA,QAAA,CAASZ,CAAW,CAAA,CAC1D,CAACa,CAAAA,CAAaC,CAAc,CAAA,CAAU,CAAA,CAAA,QAAA,CAAS,CAAA,CAAK,CAAA,CACpD,CAACC,CAAAA,CAAeC,CAAgB,CAAA,CAAU,CAAA,CAAA,QAAA,CAAS,CAAA,CAAK,CAAA,CAExD,CAACC,CAAAA,CAAOC,CAAQ,CAAA,CAAU,CAAA,CAAA,QAAA,CAASlB,CAAW,CAAA,CAC9CmB,CAAAA,kBAAOlB,CAAAA,SAAYgB,GAAAA,CACnBG,CAAAA,CAAgB,CAAA,CAAA,WAAA,CACnBC,CAAAA,EAAmD,CAClD,IAAMC,CAAAA,CAAY,OAAOD,CAAAA,EAAU,UAAA,CAAaA,CAAAA,CAAMF,CAAI,CAAA,CAAIE,CAAAA,CAC1DnB,CAAAA,CACFA,CAAAA,CAAYoB,CAAS,CAAA,CAErBJ,CAAAA,CAASI,CAAS,CAAA,CAGpB,QAAA,CAAS,MAAA,CAAS,CAAA,EAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-DMMKR6TY.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { PanelLeft, X, Menu } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button, buttonVariants } from \"@/components/button\"\nimport { Input } from \"@/components/input\"\nimport { Separator } from \"@/components/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/components/sheet\"\nimport { Skeleton } from \"@/components/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"@/components/tooltip\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16.75rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"23rem\"\nconst SIDEBAR_WIDTH_ICON = \"calc(3rem + 0.75rem)\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\nconst SIDEBAR_BANNER_HEIGHT = \"55px\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n isOpen: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n toggleSidebar: () => void\n toggleMobileSidebar: () => void\n setIsFullyOpen: (open: boolean) => void\n isAnimating: boolean\n setIsAnimating: (animating: boolean) => void\n isBannerClosing: boolean\n bannerVisible: boolean\n setBannerVisible: (visible: boolean) => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\nconst SidebarMobileContext = React.createContext(false)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nconst SidebarProvider = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n bannerHeight?: string\n }\n>(\n (\n {\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n bannerHeight: bannerHeightProp = SIDEBAR_BANNER_HEIGHT,\n className,\n style,\n children,\n ...props\n },\n ref\n ) => {\n const [openMobile, setOpenMobile] = React.useState(false)\n const [isFullyOpen, setIsFullyOpen] = React.useState(defaultOpen)\n const [isAnimating, setIsAnimating] = React.useState(false)\n const [bannerVisible, setBannerVisible] = React.useState(false)\n\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n const toggleSidebar = React.useCallback(() => {\n setOpen((open) => !open)\n }, [setOpen])\n\n const toggleMobileSidebar = React.useCallback(() => {\n const mdBreakpoint = getComputedStyle(document.documentElement)\n .getPropertyValue(\"--breakpoint-md\")\n .trim()\n if (\n mdBreakpoint &&\n window.matchMedia(`(min-width: ${mdBreakpoint})`).matches\n ) {\n return\n }\n setOpenMobile((open) => !open)\n }, [setOpenMobile])\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n const state = open ? \"expanded\" : \"collapsed\"\n\n const previousBannerChildrenRef = React.useRef<React.ReactNode[]>([])\n\n // Separate banner children (SidebarBanner) from layout children (Sidebar, SidebarInset)\n const childArray = React.Children.toArray(children)\n const bannerChildren = childArray.filter(\n (child) =>\n React.isValidElement(child) &&\n (child.type as React.FC & { displayName?: string })?.displayName ===\n \"SidebarBanner\"\n )\n const layoutChildren = childArray.filter(\n (child) =>\n !React.isValidElement(child) ||\n (child.type as React.FC & { displayName?: string })?.displayName !==\n \"SidebarBanner\"\n )\n\n // Store previous banner children for closing animation\n if (bannerChildren.length > 0 && bannerVisible) {\n previousBannerChildrenRef.current = bannerChildren\n }\n\n const hasBannerSlot = bannerChildren.length > 0\n const hasBanner = hasBannerSlot && bannerVisible\n const isClosing =\n !hasBanner && previousBannerChildrenRef.current.length > 0\n const displayBanner = hasBannerSlot\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n isOpen: isFullyOpen,\n setOpen,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n toggleMobileSidebar,\n setIsFullyOpen,\n isAnimating,\n setIsAnimating,\n isBannerClosing: isClosing,\n bannerVisible,\n setBannerVisible,\n }),\n [\n state,\n isFullyOpen,\n setOpen,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n toggleMobileSidebar,\n setIsFullyOpen,\n isAnimating,\n setIsAnimating,\n isClosing,\n bannerVisible,\n ]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n \"--sidebar-top\": hasBanner ? bannerHeightProp : \"0px\",\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n \"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar\",\n displayBanner && \"flex-col\",\n className\n )}\n ref={ref}\n {...props}\n >\n {displayBanner ? (\n <>\n <div\n className=\"relative overflow-hidden transition-[height] duration-200 ease-linear\"\n style={\n {\n height: hasBanner ? bannerHeightProp : \"0px\",\n } as React.CSSProperties\n }\n >\n <div\n className=\"fixed top-0 left-0 right-0 z-20 w-full transition-transform duration-200 ease-linear data-[state=closed]:-translate-y-full\"\n style={{ height: bannerHeightProp }}\n data-state={hasBanner ? \"open\" : \"closed\"}\n onTransitionEnd={() => {\n if (isClosing) {\n previousBannerChildrenRef.current = []\n }\n }}\n >\n {bannerChildren}\n </div>\n </div>\n <div className=\"flex flex-1\">{layoutChildren}</div>\n </>\n ) : (\n children\n )}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n }\n)\nSidebarProvider.displayName = \"SidebarProvider\"\n\nconst SidebarBanner = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"banner\"\n className={cn(\"w-full\", className)}\n {...props}\n />\n )\n})\nSidebarBanner.displayName = \"SidebarBanner\"\n\nconst Sidebar = React.forwardRef<\n HTMLElement,\n React.ComponentProps<\"aside\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n }\n>(\n (\n {\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n ...props\n },\n ref\n ) => {\n const {\n state,\n openMobile,\n setOpenMobile,\n setIsFullyOpen,\n setIsAnimating,\n isBannerClosing,\n } = useSidebar()\n const sidebarRef = React.useRef<HTMLDivElement>(null)\n const isFirstRenderRef = React.useRef(true)\n\n // Track when the sidebar animation completes\n React.useEffect(() => {\n const sidebar = sidebarRef.current\n if (!sidebar) return\n\n // On first render, set isFullyOpen immediately without waiting for animation\n if (isFirstRenderRef.current) {\n isFirstRenderRef.current = false\n setIsFullyOpen(state === \"expanded\")\n setIsAnimating(false)\n return\n }\n\n // Mark as animating when state changes\n setIsAnimating(true)\n\n // Fallback timeout in case transitionend doesn't fire\n const fallbackTimeout = setTimeout(() => {\n setIsFullyOpen(state === \"expanded\")\n setIsAnimating(false)\n }, 300) // Slightly longer than the 200ms transition duration\n\n const handleTransitionEnd = (event: TransitionEvent) => {\n // Only respond to transitions on the sidebar itself, not children\n if (event.target !== sidebar) return\n\n // Check if we're transitioning width, left, or right properties\n if (\n event.propertyName === \"left\" ||\n event.propertyName === \"right\" ||\n event.propertyName === \"width\"\n ) {\n clearTimeout(fallbackTimeout)\n setIsFullyOpen(state === \"expanded\")\n setIsAnimating(false)\n }\n }\n\n sidebar.addEventListener(\"transitionend\", handleTransitionEnd)\n return () => {\n sidebar.removeEventListener(\"transitionend\", handleTransitionEnd)\n clearTimeout(fallbackTimeout)\n }\n }, [state, setIsFullyOpen, setIsAnimating])\n\n if (collapsible === \"none\") {\n return (\n <aside\n className={cn(\n \"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </aside>\n )\n }\n\n return (\n <>\n {/* Mobile Sheet - visible only on mobile (< md) */}\n <Sheet open={openMobile} onOpenChange={setOpenMobile}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-mobile=\"true\"\n className=\"md:hidden bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n width: SIDEBAR_WIDTH_MOBILE,\n maxWidth: SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <SidebarMobileContext.Provider value={true}>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SidebarMobileContext.Provider>\n </SheetContent>\n </Sheet>\n\n {/* Desktop Sidebar - visible only on desktop (md+) */}\n <aside\n ref={ref}\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n data-variant={variant}\n data-side={side}\n >\n {/* Spacer to reserve horizontal space */}\n <div\n className={cn(\n \"w-(--sidebar-width) transition-[width] duration-200 ease-linear\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\"\n )}\n />\n {/* Fixed sidebar */}\n <div\n ref={sidebarRef}\n data-banner-closing={isBannerClosing}\n className={cn(\n \"fixed z-10 hidden w-(--sidebar-width) transition-[left,right,width,top,height] duration-200 ease-linear md:flex\",\n \"top-(--sidebar-top) h-[calc(100svh-var(--sidebar-top))]\",\n side === \"left\"\n ? \"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]\"\n : \"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]\",\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\",\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n className=\"flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow\"\n >\n <div className=\"flex flex-col my-2.5 ml-2.5 rounded-2xl border bg-sidebar border-sidebar-border flex-1 min-h-0\">\n {children}\n </div>\n </div>\n </div>\n </aside>\n </>\n )\n }\n)\nSidebar.displayName = \"Sidebar\"\n\nconst SidebarTrigger = React.forwardRef<\n React.ElementRef<typeof Button>,\n React.ComponentProps<typeof Button>\n>(({ className, onClick, ...props }, ref) => {\n const { toggleSidebar, toggleMobileSidebar, openMobile } = useSidebar()\n\n return (\n <>\n {/* Mobile trigger - visible below md */}\n <Button\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\n \"md:hidden bg-transparent hover:bg-transparent\",\n className\n )}\n onClick={(event) => {\n onClick?.(event)\n toggleMobileSidebar()\n }}\n {...props}\n >\n {openMobile ? (\n <span\n className={cn(\n buttonVariants({ variant: \"secondary\", size: \"icon\" })\n )}\n >\n <X size={16} />\n </span>\n ) : (\n <span\n className={cn(buttonVariants({ variant: \"outline\", size: \"icon\" }))}\n >\n <Menu size={16} />\n </span>\n )}\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n\n {/* Desktop trigger - visible at md+ */}\n <Button\n ref={ref}\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\"hidden md:inline-flex h-7 w-7\", className)}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <span className=\"rounded-full p-2\">\n <PanelLeft size={16} />\n </span>\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n </>\n )\n})\nSidebarTrigger.displayName = \"SidebarTrigger\"\n\nconst SidebarRail = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\">\n>(({ className, ...props }, ref) => {\n const { toggleSidebar } = useSidebar()\n\n return (\n <button\n ref={ref}\n data-sidebar=\"rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n \"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex\",\n \"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize\",\n \"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n \"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarRail.displayName = \"SidebarRail\"\n\nconst SidebarInset = React.memo(\n React.forwardRef<HTMLDivElement, React.ComponentProps<\"main\">>(\n ({ className, ...props }, ref) => {\n return (\n <main\n ref={ref}\n className={cn(\n \"relative flex min-w-0 w-full flex-1 flex-col\",\n \"md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow\",\n className\n )}\n {...props}\n />\n )\n }\n )\n)\nSidebarInset.displayName = \"SidebarInset\"\n\nconst SidebarInput = React.forwardRef<\n React.ElementRef<typeof Input>,\n React.ComponentProps<typeof Input>\n>(({ className, ...props }, ref) => {\n return (\n <Input\n ref={ref}\n data-sidebar=\"input\"\n className={cn(\n \"h-8 w-full bg-sidebar shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarInput.displayName = \"SidebarInput\"\n\nconst SidebarHeader = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showTrigger?: boolean\n }\n>(({ className, showTrigger = false, children, ...props }, ref) => {\n const { state } = useSidebar()\n const isMobile = React.useContext(SidebarMobileContext)\n\n const isCollapsed = state === \"collapsed\" && !isMobile\n\n return (\n <div\n ref={ref}\n data-sidebar=\"header\"\n className={cn(\n \"flex w-full gap-2 p-2 items-center\",\n isCollapsed\n ? \"justify-center items-center\"\n : \"justify-between items-start\",\n className\n )}\n {...props}\n >\n {!isCollapsed && (\n <div className=\"transition-all duration-200 w-full h-fit flex justify-between overflow-hidden\">\n <div className=\"whitespace-nowrap\">{children}</div>\n </div>\n )}\n\n {showTrigger && <SidebarTrigger />}\n </div>\n )\n})\nSidebarHeader.displayName = \"SidebarHeader\"\n\nconst SidebarFooter = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"footer\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n})\nSidebarFooter.displayName = \"SidebarFooter\"\n\nconst SidebarSeparator = React.forwardRef<\n React.ElementRef<typeof Separator>,\n React.ComponentProps<typeof Separator>\n>(({ className, ...props }, ref) => {\n return (\n <Separator\n ref={ref}\n data-sidebar=\"separator\"\n className={cn(\"mx-2 w-auto bg-border\", className)}\n {...props}\n />\n )\n})\nSidebarSeparator.displayName = \"SidebarSeparator\"\n\nconst SidebarContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"content\"\n className={cn(\n \"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden p-2\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarContent.displayName = \"SidebarContent\"\n\nconst SidebarGroup = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"group\"\n className={cn(\n \"relative flex w-full min-w-0 flex-col\",\n \"group-data-[collapsible=icon]:p-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroup.displayName = \"SidebarGroup\"\n\nconst SidebarGroupLabel = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"div\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-label\"\n className={cn(\n \"flex h-8 shrink-0 items-center rounded-md text-xs font-medium text-secondary-text outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n \"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupLabel.displayName = \"SidebarGroupLabel\"\n\nconst SidebarGroupAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-action\"\n className={cn(\n \"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupAction.displayName = \"SidebarGroupAction\"\n\nconst SidebarGroupContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"group-content\"\n className={cn(\"w-full text-sm\", className)}\n {...props}\n />\n))\nSidebarGroupContent.displayName = \"SidebarGroupContent\"\n\nconst SidebarMenu = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu\"\n className={cn(\"flex w-full min-w-0 flex-col gap-1\", className)}\n {...props}\n />\n))\nSidebarMenu.displayName = \"SidebarMenu\"\n\nconst SidebarMenuItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n data-sidebar=\"menu-item\"\n className={cn(\"group/menu-item relative\", className)}\n {...props}\n />\n))\nSidebarMenuItem.displayName = \"SidebarMenuItem\"\n\nconst sidebarMenuButtonVariants = cva(\n \"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"\",\n outline:\n \"bg-sidebar shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:!p-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst SidebarMenuButton = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n } & VariantProps<typeof sidebarMenuButtonVariants>\n>(\n (\n {\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n const { state } = useSidebar()\n\n const button = (\n <Comp\n ref={ref}\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== \"collapsed\"}\n {...tooltip}\n />\n </Tooltip>\n )\n }\n)\nSidebarMenuButton.displayName = \"SidebarMenuButton\"\n\nconst SidebarMenuAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n }\n>(({ className, asChild = false, showOnHover = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-action\"\n className={cn(\n \"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0\",\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n showOnHover &&\n \"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-base-accent-foreground md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuAction.displayName = \"SidebarMenuAction\"\n\nconst SidebarMenuBadge = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"menu-badge\"\n className={cn(\n \"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground\",\n \"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n))\nSidebarMenuBadge.displayName = \"SidebarMenuBadge\"\n\nconst SidebarMenuSkeleton = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n }\n>(({ className, showIcon = false, ...props }, ref) => {\n const width = React.useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n }, [])\n\n return (\n <div\n ref={ref}\n data-sidebar=\"menu-skeleton\"\n className={cn(\"flex h-8 items-center gap-2 rounded-md px-2\", className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-[--skeleton-width] flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n \"--skeleton-width\": width,\n } as React.CSSProperties\n }\n />\n </div>\n )\n})\nSidebarMenuSkeleton.displayName = \"SidebarMenuSkeleton\"\n\nconst SidebarMenuSub = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu-sub\"\n className={cn(\n \"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n))\nSidebarMenuSub.displayName = \"SidebarMenuSub\"\n\nconst SidebarMenuSubItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ ...props }, ref) => <li ref={ref} {...props} />)\nSidebarMenuSubItem.displayName = \"SidebarMenuSubItem\"\n\nconst SidebarMenuSubButton = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n }\n>(({ asChild = false, size = \"md\", isActive, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n data-active={isActive}\n className={cn(\n \"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground\",\n \"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground\",\n size === \"sm\" && \"text-xs\",\n size === \"md\" && \"text-sm\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuSubButton.displayName = \"SidebarMenuSubButton\"\n\nexport {\n Sidebar,\n SidebarBanner,\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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-EIM5R7AJ.js","../src/components/dropdown-menu.tsx"],"names":["DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","className","inset","children","props","ref","jsxs","cn","jsx","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"mappings":"AAAA,uWAAY;AACZ,sDAAkC,uECCX,uHACgB,2CACK,+CAsB1C,IAlBIA,CAAAA,CAAqC,CAAA,CAAA,IAAA,CAErCC,CAAAA,aAA4C,CAAA,CAAA,OAAA,CAE5CC,CAAAA,aAA0C,CAAA,CAAA,KAAA,CAE1CC,CAAAA,aAA2C,CAAA,CAAA,MAAA,CAE3CC,CAAAA,aAAwC,CAAA,CAAA,GAAA,CAExCC,CAAAA,aAA+C,CAAA,CAAA,UAAA,CAE/CC,CAAAA,aAA+B,CAAA,CAAA,UAAA,CAKnC,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,KAAA,CAAAC,CAAAA,CAAO,QAAA,CAAAC,CAAAA,CAAU,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC3CC,8BAAAA,CAAuB,CAAA,UAAA,CAAtB,CACC,GAAA,CA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AAA,CAAWD,gCAAAA,4CAAG,CAA8CN,CAAS,CAAA,CACpE,GAAGG,CAAAA,CACN,CAAA,CAGJiB,CAAAA,CAAqB,WAAA,CAAc,sBAAA,CAAA,gOAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-EIM5R7AJ.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-[12px] px-2 py-1.5 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-[state=open]:bg-secondary\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-md border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-xl border border-border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-[12px] p-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-EIM5R7AJ.js","../src/components/dropdown-menu.tsx"],"names":["DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","className","inset","children","props","ref","jsxs","cn","jsx","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"mappings":"AAAA,uWAAY;AACZ,sDAAkC,uECCX,uHACgB,2CACK,+CAsB1C,IAlBIA,CAAAA,CAAqC,CAAA,CAAA,IAAA,CAErCC,CAAAA,aAA4C,CAAA,CAAA,OAAA,CAE5CC,CAAAA,aAA0C,CAAA,CAAA,KAAA,CAE1CC,CAAAA,aAA2C,CAAA,CAAA,MAAA,CAE3CC,CAAAA,aAAwC,CAAA,CAAA,GAAA,CAExCC,CAAAA,aAA+C,CAAA,CAAA,UAAA,CAE/CC,CAAAA,aAA+B,CAAA,CAAA,UAAA,CAKnC,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,KAAA,CAAAC,CAAAA,CAAO,QAAA,CAAAC,CAAAA,CAAU,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC3CC,8BAAAA,CAAuB,CAAA,UAAA,CAAtB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,gCAAAA,uMACT,CACAL,CAAAA,EAAS,MAAA,CACTD,CACF,CAAA,CACC,GAAGG,CAAAA,CAEH,QAAA,CAAA,CAAAD,CAAAA,CACDK,6BAAAA,yBAACC,CAAA,CAAa,SAAA,CAAU,iBAAA,CAAkB,CAAA,CAAA,CAC5C,CACD,CAAA,CACDT,CAAAA,CAAuB,WAAA,CACC,CAAA,CAAA,UAAA,CAAW,WAAA,CAEnC,IAAMU,CAAAA,CAA+B,CAAA,CAAA,UAAA,CAGnC,CAAC,CAAE,SAAA,CAAAT,CAAAA,CAAW,GAAGG,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC1BG,6BAAAA,CAAuB,CAAA,UAAA,CAAtB,CACC,GAAA,CAAKH,CAAAA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GC,CAAAA,CAAAA,EACjCG,6BAAAA,CAAuB,CAAA,KAAA,CAAtB,CACC,GAAA,CAAKH,CAAAA,CACL,SAAA,CAAWE,gCAAAA,mCACT,CACAL,CAAAA,EAAS,MAAA,CACTD,CACF,CAAA,CACC,GAAGG,CAAAA,CACN,CACD,CAAA,CACDe,CAAAA,CAAkB,WAAA,CAAoC,CAAA,CAAA,KAAA,CAAM,WAAA,CAE5D,IAAMC,CAAAA,CAA8B,CAAA,CAAA,UAAA,CAGlC,CAAC,CAAE,SAAA,CAAAnB,CAAAA,CAAW,GAAGG,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC1BG,6BAAAA,CAAuB,CAAA,SAAA,CAAtB,CACC,GAAA,CAAKH,CAAAA,CACL,SAAA,CAAWE,gCAAAA,0BAAG,CAA4BN,CAAS,CAAA,CAClD,GAAGG,CAAAA,CACN,CACD,CAAA,CACDgB,CAAAA,CAAsB,WAAA,CAAoC,CAAA,CAAA,SAAA,CAAU,WAAA,CAEpE,IAAMC,CAAAA,CAAuB,CAAC,CAC5B,SAAA,CAAApB,CAAAA,CACA,GAAGG,CACL,CAAA,CAAA,EAEII,6BAAAA,MAAC,CAAA,CACC,SAAA,CAAWD,gCAAAA,4CAAG,CAA8CN,CAAS,CAAA,CACpE,GAAGG,CAAAA,CACN,CAAA,CAGJiB,CAAAA,CAAqB,WAAA,CAAc,sBAAA,CAAA,gOAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-EIM5R7AJ.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-[12px] px-2 py-1.5 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-[state=open]:bg-secondary\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-md border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-xl border border-border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-[12px] p-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/
|
|
1
|
+
{"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-EJTY2ABY.js","../src/components/GlitchLink.tsx"],"names":["DEFAULT_SYMBOLS","GlitchLink","href","children","symbols","className","asChild","duration","props","isHovering","setIsHovering","useState","frame","setFrame","rafRef","useRef","queueRef","getTextContent","node","isValidElement","originalText","useMemo","setupQueue","newQueue","i","to","start","end","useEffect","update","prev","renderContent","char","item","jsx","jsxs","commonProps","cn","e","target"],"mappings":"AAAA,qLAAY;AACZ,sDAAuC,6ECAtB,4EAQV,iDACc,+CAmFN,IAhFFA,CAAAA,CAAkB,kCAAA,CAWzBC,CAAAA,CAAa,CAAC,CAClB,IAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CAAUJ,CAAAA,CACV,SAAA,CAAAK,CAAAA,CACA,OAAA,CAAAC,CAAAA,CAAU,CAAA,CAAA,CACV,QAAA,CAAAC,CAAAA,CA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qB,CAAAA,CAAK,KAAA,CAEZD,CAAAA,GAAS,GAAA,CACJE,6BAAAA,MAAC,CAAA,CAAa,QAAA,CAAA,GAAA,CAAA,CAAHV,CAAI,CAAA,CAAA,CAAA,CAGpB,CAACS,CAAAA,CAAK,IAAA,EAAQ,IAAA,CAAK,MAAA,CAAO,CAAA,CAAI,GAAA,CAAA,EAAA,CAChCA,CAAAA,CAAK,IAAA,CAAO7B,CAAAA,CAAQ,IAAA,CAAK,KAAA,CAAM,IAAA,CAAK,MAAA,CAAO,CAAA,CAAIA,CAAAA,CAAQ,MAAM,CAAC,CAAA,CAAA,CAG9D+B,8BAAAA,MAAC,CAAA,CAAa,SAAA,CAAU,uBAAA,CAEtB,QAAA,CAAA,CAAAD,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAU,qBAAA,CAAsB,aAAA,CAAY,MAAA,CAC/C,QAAA,CAAAF,CAAAA,CACH,CAAA,CAEAE,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAU,wEAAA,CACb,QAAA,CAAAD,CAAAA,CAAK,IAAA,CACR,CAAA,CAAA,CAAA,CARST,CASX,CAAA,CAAA,CAKGU,6BAAAA,MAAC,CAAA,CAAc,QAAA,CAAAF,CAAAA,CAAAA,CAAJR,CAAS,CAC7B,CAAC,CAAA,CAtCQrB,CAAAA,CAyCLiC,CAAAA,CAAc,CAClB,SAAA,CAAWC,gCAAAA,gCAAG,CAAkChC,CAAS,CAAA,CACzD,YAAA,CAAeiC,CAAAA,EAAqC,CAClD,IAAMC,CAAAA,CAASD,CAAAA,CAAE,aAAA,CACbC,CAAAA,EAAU,CAACA,CAAAA,CAAO,KAAA,CAAM,KAAA,EAAA,CAC1BA,CAAAA,CAAO,KAAA,CAAM,KAAA,CAAQ,CAAA,EAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-EJTY2ABY.js","sourcesContent":[null,"\"use client\"\nimport Link from \"next/link\"\nimport React, {\n useState,\n useEffect,\n useRef,\n ReactNode,\n isValidElement,\n useMemo,\n} from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cn } from \"@/lib/utils\"\n\nexport const DEFAULT_SYMBOLS = \"!<>-_\\\\/[]{}—=+*^?#________\"\n\ntype GlitchLinkProps = {\n href?: string\n children: ReactNode\n symbols?: string\n className?: string\n asChild?: boolean\n duration?: number\n}\n\nconst GlitchLink = ({\n href,\n children,\n symbols = DEFAULT_SYMBOLS,\n className,\n asChild = false,\n duration = 40,\n ...props\n}: GlitchLinkProps) => {\n const [isHovering, setIsHovering] = useState(false)\n const [frame, setFrame] = useState(0)\n const rafRef = useRef<number | null>(null)\n const queueRef = useRef<\n { to: string; start: number; end: number; char?: string }[]\n >([])\n\n const getTextContent = (node: ReactNode): string => {\n if (typeof node === \"string\" || typeof node === \"number\")\n return String(node)\n if (isValidElement(node)) {\n const children = (node.props as any).children\n if (children) return getTextContent(children)\n }\n return \"\"\n }\n\n const originalText = useMemo(() => getTextContent(children), [children])\n\n const setupQueue = () => {\n const newQueue = []\n for (let i = 0; i < originalText.length; i++) {\n const to = originalText[i]\n const start = Math.floor(Math.random() * (duration * 0.5))\n const end = start + Math.floor(Math.random() * (duration * 0.5))\n newQueue.push({ to, start, end })\n }\n queueRef.current = newQueue\n setFrame(0)\n }\n\n useEffect(() => {\n if (isHovering && originalText) {\n setupQueue()\n const update = () => {\n setFrame((prev) => prev + 1)\n rafRef.current = requestAnimationFrame(update)\n }\n rafRef.current = requestAnimationFrame(update)\n } else {\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n setFrame(0)\n }\n return () => {\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n }\n }, [isHovering, originalText])\n\n const renderContent = () => {\n // When not hovering, just render children as-is\n if (!isHovering) {\n return children\n }\n\n // When hovering, apply glitch effect to the text\n return originalText.split(\"\").map((char, i) => {\n const item = queueRef.current[i]\n\n // If animation for this char hasn't started, or it's finished\n if (!item || frame >= item.end) {\n return <span key={i}>{char}</span>\n }\n\n // If we are in the scrambling phase for this specific character\n if (frame >= item.start) {\n // Don't scramble spaces, just render them\n if (char === \" \") {\n return <span key={i}> </span>\n }\n\n if (!item.char || Math.random() < 0.28) {\n item.char = symbols[Math.floor(Math.random() * symbols.length)]\n }\n return (\n <span key={i} className=\"relative inline-block\">\n {/* The invisible real character preserves the exact width */}\n <span className=\"invisible opacity-0\" aria-hidden=\"true\">\n {char}\n </span>\n {/* The absolute symbol sits exactly on top of that width */}\n <span className=\"absolute inset-0 flex items-center justify-center font-mono opacity-50\">\n {item.char}\n </span>\n </span>\n )\n }\n\n // Default: show original character\n return <span key={i}>{char}</span>\n })\n }\n\n const commonProps = {\n className: cn(\"inline-block whitespace-nowrap\", className),\n onMouseEnter: (e: React.MouseEvent<HTMLElement>) => {\n const target = e.currentTarget\n if (target && !target.style.width) {\n target.style.width = `${target.offsetWidth}px`\n }\n setIsHovering(true)\n },\n onMouseLeave: () => setIsHovering(false),\n ...props,\n }\n\n if (asChild && isValidElement(children)) {\n return (\n <Slot {...commonProps}>\n {React.cloneElement(children as any, {}, renderContent())}\n </Slot>\n )\n }\n\n // If no href is provided, render as a span instead of a Link\n if (!href) {\n return <span {...commonProps}>{renderContent()}</span>\n }\n\n return (\n <Link href={href} {...commonProps}>\n {renderContent()}\n </Link>\n )\n}\n\nexport default GlitchLink\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/
|
|
1
|
+
{"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-EKCAULFP.js","../src/components/toast.tsx"],"names":["Toaster","props","jsx","SileoToaster"],"mappings":"AAAA,qFAAY;ACEZ,8BAA+C,+CAO3C,SAFKA,CAAAA,CAAQ,CAAE,GAAGC,CAAM,CAAA,CAAiB,CAC3C,OACEC,6BAAAA,cAACC,CAAA,CACC,OAAA,CAAS,CACP,IAAA,CAAM,0BAAA,CACN,MAAA,CAAQ,CACN,KAAA,CAAO,sBAAA,CACP,WAAA,CAAa,sBAAA,CACb,KAAA,CAAO,cAAA,CACP,MAAA,CAAQ,cACV,CACF,CAAA,CACC,GAAGF,CAAAA,CACN,CAEJ,CAAA,wCAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-EKCAULFP.js","sourcesContent":[null,"\"use client\"\n\nimport { sileo, Toaster as SileoToaster } from \"sileo\"\nimport type { ComponentProps } from \"react\"\n\ntype ToasterProps = ComponentProps<typeof SileoToaster>\n\nfunction Toaster({ ...props }: ToasterProps) {\n return (\n <SileoToaster\n options={{\n fill: \"var(--toast-bg, #171717)\",\n styles: {\n title: \"text-primary-accent!\",\n description: \"text-secondary-text!\",\n badge: \"bg-white/20!\",\n button: \"bg-white/10!\",\n },\n }}\n {...props}\n />\n )\n}\n\nexport { Toaster, sileo as toast }\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/
|
|
1
|
+
{"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-EWRKHBIV.js","../src/components/TextDecoder.tsx"],"names":["SYMBOLS","randomChar","symbols","extractText","node","React","props","injectScrambledText","scrambledChars","indexObj","text","result","i","jsx"],"mappings":"AAAA,qLAAY;AACZ,sDAAuC,4ECOhC,+CAgCC,IA9BFA,CAAAA,CAAU,kCAAA,CAEVC,CAAAA,CAAcC,CAAAA,EAClBA,CAAAA,CAAQ,IAAA,CAAK,KAAA,CAAM,IAAA,CAAK,MAAA,CAAO,CAAA,CAAIA,CAAAA,CAAQ,MAAM,CAAC,CAAA,CAE9CC,CAAAA,CAAeC,CAAAA,EAA4B,CAC/C,EAAA,CAAI,OAAOA,CAAAA,EAAS,QAAA,EAAY,OAAOA,CAAAA,EAAS,QAAA,CAAU,OAAO,MAAA,CAAOA,CAAI,CAAA,CAC5E,EAAA,CAAI,KAAA,CAAM,OAAA,CAAQA,CAAI,CAAA,CAAG,OAAOA,CAAAA,CAAK,GAAA,CAAID,CAAW,CAAA,CAAE,IAAA,CAAK,EAAE,CAAA,CAC7D,EAAA,CAAIE,eAAAA,CAAM,cAAA,CAAeD,CAAI,CAAA,CAAG,CAC9B,IAAME,CAAAA,CAAQF,CAAAA,CAAK,KAAA,CACnB,MAAA,CACGE,CAAAA,CAAM,IAAA,EAAQ,EAAA,CAAA,CAAA,CACdA,CAAAA,CAAM,KAAA,EAAS,EAAA,CAAA,CAAA,CACfA,CAAAA,CAAM,KAAA,EAAS,EAAA,CAAA,CAChBH,CAAAA,CAAYG,CAAAA,CAAM,QAAQ,CAE9B,CACA,MAAO,EACT,CAAA,CAEMC,CAAAA,CAAsB,CAC1BH,CAAAA,CACAI,CAAAA,CACAC,CAAAA,CAAAA,EACc,CACd,EAAA,CAAI,OAAOL,CAAAA,EAAS,QAAA,EAAY,OAAOA,CAAAA,EAAS,QAAA,CAAU,CACxD,IAAMM,CAAAA,CAAO,MAAA,CAAON,CAAI,CAAA,CAClBO,CAAAA,CAAiC,CAAC,CAAA,CACxC,GAAA,CAAA,IAASC,CAAAA,CAAI,CAAA,CAAGA,CAAAA,CAAIF,CAAAA,CAAK,MAAA,CAAQE,CAAAA,EAAAA,CAC/BD,CAAAA,CAAO,IAAA,CACLE,6BAAAA,eAACR,CAAM,QAAA,CAAN,CACE,QAAA,CAAAG,CAAAA,CAAeC,CAAAA,CAAS,OAAO,CAAA,EAAK,EAAA,CAAA,CADlB,CAAA,KAAA,EAAQA,CAAAA,CAAS,OAAO,CAAA,CAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-EWRKHBIV.js","sourcesContent":[null,"\"use client\"\nimport { cn } from \"@/lib/utils\"\nimport React, {\n useState,\n useEffect,\n useMemo,\n useRef,\n ReactNode,\n} from \"react\"\n\nconst SYMBOLS = \"!<>-_\\\\/[]{}—=+*^?#________\"\n\nconst randomChar = (symbols: string) =>\n symbols[Math.floor(Math.random() * symbols.length)]\n\nconst extractText = (node: ReactNode): string => {\n if (typeof node === \"string\" || typeof node === \"number\") return String(node)\n if (Array.isArray(node)) return node.map(extractText).join(\"\")\n if (React.isValidElement(node)) {\n const props = node.props as any\n return (\n (props.text || \"\") +\n (props.label || \"\") +\n (props.title || \"\") +\n extractText(props.children)\n )\n }\n return \"\"\n}\n\nconst injectScrambledText = (\n node: ReactNode,\n scrambledChars: (string | ReactNode)[],\n indexObj: { current: number }\n): ReactNode => {\n if (typeof node === \"string\" || typeof node === \"number\") {\n const text = String(node)\n const result: (string | ReactNode)[] = []\n for (let i = 0; i < text.length; i++) {\n result.push(\n <React.Fragment key={`char-${indexObj.current}`}>\n {scrambledChars[indexObj.current] || \"\"}\n </React.Fragment>\n )\n indexObj.current++\n }\n return result\n }\n\n if (Array.isArray(node)) {\n return node.map((child, idx) => (\n <React.Fragment key={`arr-${idx}-${indexObj.current}`}>\n {injectScrambledText(child, scrambledChars, indexObj)}\n </React.Fragment>\n ))\n }\n\n if (React.isValidElement(node)) {\n const props = node.props as any\n const newProps: any = {}\n\n if (props.children) {\n newProps.children = injectScrambledText(\n props.children,\n scrambledChars,\n indexObj\n )\n }\n return React.cloneElement(node, newProps)\n }\n return node\n}\n\nexport interface TextDecoderProps {\n children: ReactNode\n className?: string\n duration?: number\n symbols?: string\n delay?: number\n isLoading?: boolean\n speed?: number\n}\n\nexport default function TextDecoder ({\n children,\n className,\n duration = 40,\n symbols = SYMBOLS,\n delay = 0,\n isLoading = false,\n speed = 0.28,\n}: TextDecoderProps) {\n const [outputNodes, setOutputNodes] = useState<ReactNode>(null)\n const [isComplete, setIsComplete] = useState(false)\n const elementRef = useRef<HTMLSpanElement>(null)\n const frameRef = useRef(0)\n const queueRef = useRef<\n { to: string; start: number; end: number; char?: string }[]\n >([])\n const rafRef = useRef<number | null>(null)\n const hasAnimatedRef = useRef(false)\n\n const fullText = useMemo(() => extractText(children), [children])\n\n const setupQueue = () => {\n const newQueue = []\n for (let i = 0; i < fullText.length; i++) {\n const to = fullText[i]\n const start = Math.floor(Math.random() * (duration * 0.5))\n const end = start + Math.floor(Math.random() * (duration * 0.5))\n newQueue.push({ to, start, end })\n }\n queueRef.current = newQueue\n frameRef.current = 0\n setIsComplete(false)\n }\n\n const loadingCharsRef = useRef<(string | undefined)[]>([])\n\n const updateLoading = () => {\n const currentScrambledChars: (string | ReactNode)[] = []\n\n if (loadingCharsRef.current.length !== fullText.length) {\n loadingCharsRef.current = new Array(fullText.length).fill(undefined)\n }\n\n for (let i = 0; i < fullText.length; i++) {\n const char = fullText[i]\n\n if (char === \" \") {\n currentScrambledChars.push(\" \")\n } else {\n if (!loadingCharsRef.current[i] || Math.random() < speed) {\n loadingCharsRef.current[i] = randomChar(symbols)\n }\n\n currentScrambledChars.push(\n <span key={i} className=\"relative inline-block\">\n <span className=\"invisible select-none\" aria-hidden=\"true\">\n {char}\n </span>\n <span className=\"absolute inset-0 flex items-center justify-center opacity-50 font-mono leading-none\">\n {loadingCharsRef.current[i]}\n </span>\n </span>\n )\n }\n }\n\n const indexObj = { current: 0 }\n setOutputNodes(\n injectScrambledText(children, currentScrambledChars, indexObj)\n )\n\n rafRef.current = requestAnimationFrame(updateLoading)\n }\n\n const update = () => {\n let complete = 0\n const currentScrambledChars: (string | ReactNode)[] = []\n\n for (let i = 0; i < queueRef.current.length; i++) {\n const item = queueRef.current[i]\n\n if (frameRef.current >= item.end) {\n complete++\n currentScrambledChars.push(item.to)\n } else {\n if (frameRef.current >= item.start) {\n if (!item.char || Math.random() < speed) {\n item.char = randomChar(symbols)\n }\n }\n\n currentScrambledChars.push(\n <span key={i} className=\"relative inline-block\">\n <span className=\"invisible select-none\" aria-hidden=\"true\">\n {item.to === \" \" ? \"\\u00A0\" : item.to}\n </span>\n {frameRef.current >= item.start && (\n <span className=\"absolute inset-0 flex items-center justify-center opacity-50 font-mono leading-none\">\n {item.char}\n </span>\n )}\n </span>\n )\n }\n }\n\n const indexObj = { current: 0 }\n setOutputNodes(\n injectScrambledText(children, currentScrambledChars, indexObj)\n )\n\n if (complete === queueRef.current.length) {\n setIsComplete(true)\n } else {\n frameRef.current++\n rafRef.current = requestAnimationFrame(update)\n }\n }\n\n const wasLoadingRef = useRef(false)\n\n useEffect(() => {\n if (isLoading) {\n wasLoadingRef.current = true\n hasAnimatedRef.current = true\n setIsComplete(false)\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n rafRef.current = requestAnimationFrame(updateLoading)\n return () => {\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n }\n }\n\n if (wasLoadingRef.current) {\n wasLoadingRef.current = false\n setupQueue()\n rafRef.current = requestAnimationFrame(update)\n return () => {\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n }\n }\n }, [isLoading, fullText])\n\n useEffect(() => {\n if (isLoading) return\n\n const observer = new IntersectionObserver(\n (entries) => {\n if (entries[0].isIntersecting && !hasAnimatedRef.current) {\n hasAnimatedRef.current = true\n const timeoutId = setTimeout(() => {\n setupQueue()\n rafRef.current = requestAnimationFrame(update)\n }, delay)\n return () => clearTimeout(timeoutId)\n }\n },\n { threshold: 0.1 }\n )\n\n if (elementRef.current) observer.observe(elementRef.current)\n\n return () => {\n observer.disconnect()\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n }\n }, [fullText, delay, isLoading])\n\n return (\n <span\n ref={elementRef}\n className={cn(\"inline-block whitespace-pre-wrap\", className)}\n >\n {isComplete ? children : outputNodes}\n </span>\n )\n}\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as M,b as G,c as R}from"./chunk-FZ3NXOFK.mjs";import{a as D,c as E,d as I,e as T,f as g,h as z}from"./chunk-DATWXRPT.mjs";import{a as i}from"./chunk-S5TKCF6T.mjs";import*as p from"react";import{Check as U,ChevronDown as V,Plus as Y,X as L}from"lucide-react";import{Fragment as Z,jsx as o,jsxs as r}from"react/jsx-runtime";function ne({options:u=[],groups:l,value:c,onValueChange:W,placeholder:b="Select option...",searchPlaceholder:X="Search...",emptyMessage:$="No option found.",disabled:m=!1,disableLabelControls:f=!1,className:j,error:q=!1,multiple:A=!1,values:s=[],onValuesChange:x,variant:B="default",searchable:F=!0,onTriggerClick:h}){let[C,y]=p.useState(!1),t=B==="metrics",d=t?!0:A,N=p.useMemo(()=>l?l.flatMap(e=>e.options):u,[l,u]),w=N.find(e=>e.value===c),a=N.filter(e=>s.includes(e.value)),H=e=>{if(d){let n=s.includes(e)?s.filter(v=>v!==e):[...s,e];x?.(n)}else W?.(e===c?"":e),y(!1)},k=(e,n)=>{n.preventDefault(),n.stopPropagation();let v=s.filter(Q=>Q!==e);x?.(v)},J=()=>t?b:d?a.length===0?b:a.length===1?a[0].label:`${a.length} selected`:w?w.label:b,P=e=>{let n=d?s.includes(e.value):c===e.value;return r(z,{value:e.value,onSelect:H,className:"rounded-[12px]",children:[o("span",{className:"truncate",children:e.label}),o(U,{className:i("ml-auto h-4 w-4 shrink-0",n?"opacity-100":"opacity-0")})]},e.value)},O=()=>t||!d||a.length===0?null:o("div",{className:"px-2 py-1.5",children:o("div",{className:"flex flex-wrap gap-1",children:a.map(e=>r("div",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs",children:[o("span",{className:"truncate",children:e.label}),o(L,{className:"h-3 w-3 cursor-pointer",onClick:n=>k(e.value,n)})]},e.value))})}),K=()=>!t||a.length===0?null:a.map(e=>r("div",{className:i("inline-flex items-center gap-2 rounded-3xl border bg-transparent px-3 py-1.5 text-sm",(m||f)&&"opacity-50 cursor-not-allowed pointer-events-none"),style:{borderColor:e.color||"var(--border)"},children:[o("span",{className:"truncate text-xs font-medium",style:{color:e.color},children:e.label}),!m||!f&&o("button",{disabled:m||f,onClick:n=>k(e.value,n),children:o(L,{className:i("size-3.5 cursor-pointer opacity-70 hover:opacity-100"),style:{color:e.color}})})]},e.value)),S=r(M,{open:C,onOpenChange:y,children:[o(G,{asChild:!0,children:r("button",{type:"button",role:"combobox","aria-expanded":C,disabled:m,onClick:h?e=>{e.preventDefault(),h()}:void 0,className:i("cursor-pointer flex h-9 items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:cursor-not-allowed disabled:opacity-50",!t&&"my-2 w-full",t&&"w-auto gap-2",!c&&!s.length&&"text-secondary-text",q&&"border-destructive-foreground focus-visible:ring-destructive-foreground",t&&"bg-muted text-primary-accent hover:bg-muted/20 border-muted text-xs font-medium",j),children:[t&&o(Y,{className:"h-4 w-4 shrink-0"}),o("span",{className:"truncate",children:J()}),!t&&o(V,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),o(R,{className:"overflow-hidden rounded-xl p-0",align:"start",style:t?{minWidth:200}:{width:"var(--radix-popover-trigger-width)"},children:r(D,{children:[F&&o(E,{placeholder:X}),r(I,{children:[o(T,{children:$}),l?r(Z,{children:[O(),l.map(e=>o(g,{heading:e.label,children:e.options.map(P)},e.label))]}):r(g,{children:[O(),u.map(P)]})]})]})})]});return t?r("div",{className:"flex flex-wrap items-center gap-2",children:[S,K()]}):S}export{ne as a};
|
|
3
|
+
//# sourceMappingURL=chunk-FFYMV22V.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/combobox.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Check, ChevronDown, Plus, X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"@/components/command\"\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/popover\"\n\nexport interface ComboboxOption {\n value: string\n label: string\n color?: string\n}\n\nexport interface ComboboxGroup {\n label: string\n options: ComboboxOption[]\n}\n\nexport interface ComboboxProps {\n options?: ComboboxOption[]\n groups?: ComboboxGroup[]\n value?: string\n onValueChange?: (value: string) => void\n placeholder?: string\n searchPlaceholder?: string\n emptyMessage?: string\n disabled?: boolean\n disableLabelControls?: boolean\n className?: string\n error?: boolean\n multiple?: boolean\n values?: string[]\n onValuesChange?: (values: string[]) => void\n variant?: \"default\" | \"metrics\"\n searchable?: boolean\n onTriggerClick?: () => void\n}\n\nexport function Combobox({\n options = [],\n groups,\n value,\n onValueChange,\n placeholder = \"Select option...\",\n searchPlaceholder = \"Search...\",\n emptyMessage = \"No option found.\",\n disabled = false,\n disableLabelControls = false,\n className,\n error = false,\n multiple = false,\n values = [],\n onValuesChange,\n variant = \"default\",\n searchable = true,\n onTriggerClick,\n}: ComboboxProps) {\n const [open, setOpen] = React.useState(false)\n const isMetrics = variant === \"metrics\"\n const effectiveMultiple = isMetrics ? true : multiple\n\n const allOptions = React.useMemo(() => {\n if (groups) return groups.flatMap((g) => g.options)\n return options\n }, [groups, options])\n\n const selectedOption = allOptions.find((option) => option.value === value)\n const selectedOptions = allOptions.filter((option) =>\n values.includes(option.value)\n )\n\n const handleSelect = (currentValue: string) => {\n if (effectiveMultiple) {\n const newValues = values.includes(currentValue)\n ? values.filter((v) => v !== currentValue)\n : [...values, currentValue]\n onValuesChange?.(newValues)\n } else {\n onValueChange?.(currentValue === value ? \"\" : currentValue)\n setOpen(false)\n }\n }\n\n const handleRemoveValue = (valueToRemove: string, e: React.MouseEvent) => {\n e.preventDefault()\n e.stopPropagation()\n const newValues = values.filter((v) => v !== valueToRemove)\n onValuesChange?.(newValues)\n }\n\n const getDisplayText = () => {\n if (isMetrics) return placeholder\n if (effectiveMultiple) {\n if (selectedOptions.length === 0) return placeholder\n if (selectedOptions.length === 1) return selectedOptions[0].label\n return `${selectedOptions.length} selected`\n }\n return selectedOption ? selectedOption.label : placeholder\n }\n\n const renderOption = (option: ComboboxOption) => {\n const isSelected = effectiveMultiple\n ? values.includes(option.value)\n : value === option.value\n\n return (\n <CommandItem\n key={option.value}\n value={option.value}\n onSelect={handleSelect}\n className=\"rounded-[12px]\"\n >\n <span className=\"truncate\">{option.label}</span>\n <Check\n className={cn(\n \"ml-auto h-4 w-4 shrink-0\",\n isSelected ? \"opacity-100\" : \"opacity-0\"\n )}\n />\n </CommandItem>\n )\n }\n\n const renderSelectedChips = () => {\n if (isMetrics || !effectiveMultiple || selectedOptions.length === 0)\n return null\n\n return (\n <div className=\"px-2 py-1.5\">\n <div className=\"flex flex-wrap gap-1\">\n {selectedOptions.map((option) => (\n <div\n key={option.value}\n className=\"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs\"\n >\n <span className=\"truncate\">{option.label}</span>\n <X\n className=\"h-3 w-3 cursor-pointer\"\n onClick={(e) => handleRemoveValue(option.value, e)}\n />\n </div>\n ))}\n </div>\n </div>\n )\n }\n\n const renderExternalChips = () => {\n if (!isMetrics || selectedOptions.length === 0) return null\n\n return selectedOptions.map((option) => (\n <div\n key={option.value}\n className={cn(\n \"inline-flex items-center gap-2 rounded-3xl border bg-transparent px-3 py-1.5 text-sm\",\n (disabled || disableLabelControls) &&\n \"opacity-50 cursor-not-allowed pointer-events-none\"\n )}\n style={{ borderColor: option.color || \"var(--border)\" }}\n >\n <span\n className=\"truncate text-xs font-medium\"\n style={{ color: option.color }}\n >\n {option.label}\n </span>\n {!disabled ||\n (!disableLabelControls && (\n <button\n disabled={disabled || disableLabelControls}\n onClick={(e) => handleRemoveValue(option.value, e)}\n >\n <X\n className={cn(\n \"size-3.5 cursor-pointer opacity-70 hover:opacity-100\"\n )}\n style={{ color: option.color }}\n />\n </button>\n ))}\n </div>\n ))\n }\n\n const popover = (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n role=\"combobox\"\n aria-expanded={open}\n disabled={disabled}\n onClick={\n onTriggerClick\n ? (e) => {\n e.preventDefault()\n onTriggerClick()\n }\n : undefined\n }\n className={cn(\n \"cursor-pointer flex h-9 items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:cursor-not-allowed disabled:opacity-50\",\n !isMetrics && \"my-2 w-full\",\n isMetrics && \"w-auto gap-2\",\n !value && !values.length && \"text-secondary-text\",\n error &&\n \"border-destructive-foreground focus-visible:ring-destructive-foreground\",\n isMetrics &&\n \"bg-muted text-primary-accent hover:bg-muted/20 border-muted text-xs font-medium\",\n className\n )}\n >\n {isMetrics && <Plus className=\"h-4 w-4 shrink-0\" />}\n <span className=\"truncate\">{getDisplayText()}</span>\n {!isMetrics && (\n <ChevronDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n )}\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"overflow-hidden rounded-xl p-0\"\n align=\"start\"\n style={\n isMetrics\n ? { minWidth: 200 }\n : { width: \"var(--radix-popover-trigger-width)\" }\n }\n >\n <Command>\n {searchable && <CommandInput placeholder={searchPlaceholder} />}\n <CommandList>\n <CommandEmpty>{emptyMessage}</CommandEmpty>\n {groups ? (\n <>\n {renderSelectedChips()}\n {groups.map((group) => (\n <CommandGroup key={group.label} heading={group.label}>\n {group.options.map(renderOption)}\n </CommandGroup>\n ))}\n </>\n ) : (\n <CommandGroup>\n {renderSelectedChips()}\n {options.map(renderOption)}\n </CommandGroup>\n )}\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n )\n\n if (isMetrics) {\n return (\n <div className=\"flex flex-wrap items-center gap-2\">\n {popover}\n {renderExternalChips()}\n </div>\n )\n }\n\n return popover\n}\n"],"mappings":";4KAAA,UAAYA,MAAW,QACvB,OAAS,SAAAC,EAAO,eAAAC,EAAa,QAAAC,EAAM,KAAAC,MAAS,eAgHtC,OA+HQ,YAAAC,EAzHN,OAAAC,EANF,QAAAC,MAAA,oBApEC,SAASC,GAAS,CACvB,QAAAC,EAAU,CAAC,EACX,OAAAC,EACA,MAAAC,EACA,cAAAC,EACA,YAAAC,EAAc,mBACd,kBAAAC,EAAoB,YACpB,aAAAC,EAAe,mB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,WACL,gBAAemB,EACf,SAAUV,EACV,QACES,EACK,GAAM,CACL,EAAE,eAAe,EACjBA,EAAe,CACjB,EACA,OAEN,UAAWsB,EACT,4VACA,CAACnB,GAAa,cACdA,GAAa,eACb,CAACjB,GAAS,CAACU,EAAO,QAAU,sBAC5BF,GACE,0EACFS,GACE,kFACFV,CACF,EAEC,UAAAU,GAAatB,EAACgD,EAAA,CAAK,UAAU,mBAAmB,EACjDhD,EAAC,QAAK,UAAU,WAAY,SAAAoC,EAAe,EAAE,EAC5C,CAACd,GACAtB,EAACiD,EAAA,CAAY,UAAU,mCAAmC,GAE9D,EACF,EACAjD,EAACkD,EAAA,CACC,UAAU,iCACV,MAAM,QACN,MACE5B,EACI,CAAE,SAAU,GAAI,EAChB,CAAE,MAAO,oCAAqC,EAGpD,SAAArB,EAACkD,EAAA,CACE,UAAAjC,GAAclB,EAACoD,EAAA,CAAa,YAAa5C,EAAmB,EAC7DP,EAACoD,EAAA,CACC,UAAArD,EAACsD,EAAA,CAAc,SAAA7C,EAAa,EAC3BL,EACCH,EAAAF,EAAA,CACG,UAAA2C,EAAoB,EACpBtC,EAAO,IAAKmD,GACXvD,EAACwD,EAAA,CAA+B,QAASD,EAAM,MAC5C,SAAAA,EAAM,QAAQ,IAAIlB,CAAY,GADdkB,EAAM,KAEzB,CACD,GACH,EAEAtD,EAACuD,EAAA,CACE,UAAAd,EAAoB,EACpBvC,EAAQ,IAAIkC,CAAY,GAC3B,GAEJ,GACF,EACF,GACF,EAGF,OAAIf,EAEArB,EAAC,OAAI,UAAU,oCACZ,UAAA4C,EACAD,EAAoB,GACvB,EAIGC,CACT","names":["React","Check","ChevronDown","Plus","X","Fragment","jsx","jsxs","Combobox","options","groups","value","onValueChange","placeholder","searchPlaceholder","emptyMessage","disabled","disableLabelControls","className","error","multiple","values","onValuesChange","variant","searchable","onTriggerClick","open","setOpen","isMetrics","effectiveMultiple","allOptions","g","selectedOption","option","selectedOptions","handleSelect","currentValue","newValues","handleRemoveValue","valueToRemove","e","v","getDisplayText","renderOption","isSelected","CommandItem","Check","cn","renderSelectedChips","X","renderExternalChips","popover","Popover","PopoverTrigger","Plus","ChevronDown","PopoverContent","Command","CommandInput","CommandList","CommandEmpty","group","CommandGroup"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/
|
|
1
|
+
{"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-FUYXCJOQ.js","../src/lib/utils.ts"],"names":["cn","inputs","twMerge","clsx"],"mappings":"AAAA,qFAAY;ACAZ,4BAAsC,+CACd,SAERA,CAAAA,CAAAA,GAAMC,CAAAA,CAAsB,CAC1C,OAAOC,oCAAAA,wBAAQC,CAAW,CAAC,CAC7B,CAAA,cAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-FUYXCJOQ.js","sourcesContent":[null,"import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-GRXC46JC.js","../src/components/calendar.tsx"],"names":["Calendar","className","classNames","showOutsideDays","captionLayout","buttonVariant","formatters","components","props","defaultClassNames","getDefaultClassNames","jsx","DayPicker","cn","date","buttonVariants","rootRef","orientation","Icon","ChevronLeftIcon","ChevronRightIcon","CalendarDayButton","children","day","modifiers","ref","Button"],"mappings":"AAAA,22BAAY;AACZ,sDAA8C,sDAAwC,uECC/D,kDAKhB,2CAI2C,+CA4HtC,SA1HHA,CAAAA,CAAS,CAChB,SAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CAAkB,CAAA,CAAA,CAClB,aAAA,CAAAC,CAAAA,CAAgB,OAAA,CAChB,aAAA,CAAAC,CAAAA,C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A,CAAA,EAAM,CAChBD,CAAAA,CAAU,OAAA,kBAASC,CAAAA,qBAAI,OAAA,6BAAS,KAAA,mBAAM,GAC5C,CAAA,CAAG,CAACD,CAAAA,CAAU,OAAO,CAAC,CAAA,CAGpBb,6BAAAA,kBAACe,CAAA,CACC,GAAA,CAAKD,CAAAA,CACL,OAAA,CAAQ,OAAA,CACR,IAAA,CAAK,MAAA,CACL,UAAA,CAAUF,CAAAA,CAAI,IAAA,CAAK,kBAAA,CAAmB,CAAA,CACtC,sBAAA,CACEC,CAAAA,CAAU,QAAA,EACV,CAACA,CAAAA,CAAU,WAAA,EACX,CAACA,CAAAA,CAAU,SAAA,EACX,CAACA,CAAAA,CAAU,YAAA,CAEb,kBAAA,CAAkBA,CAAAA,CAAU,WAAA,CAC5B,gBAAA,CAAgBA,CAAAA,CAAU,SAAA,CAC1B,mBAAA,CAAmBA,CAAAA,CAAU,YAAA,CAC7B,SAAA,CAAWX,gCAAAA,m3BACT,CACAJ,CAAAA,CAAkB,GAAA,CAClBR,CACF,CAAA,CACC,GAAGO,CAAAA,CACN,CAEJ,CAAA,6BAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-GRXC46JC.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport {\n DayPicker,\n getDefaultClassNames,\n type DayButton,\n} from \"react-day-picker\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button, buttonVariants } from \"@/components/button\"\nimport { ChevronLeftIcon, ChevronRightIcon } from \"lucide-react\"\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"label\",\n buttonVariant = \"ghost\",\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>[\"variant\"]\n}) {\n const defaultClassNames = getDefaultClassNames()\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n \"p-3 text-primary-accent group/calendar rounded-sm\",\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) =>\n date.toLocaleString(\"default\", { month: \"short\" }),\n ...formatters,\n }}\n classNames={{\n root: cn(\"w-fit\", defaultClassNames.root),\n months: cn(\n \"flex gap-4 flex-col md:flex-row relative\",\n defaultClassNames.months\n ),\n month: cn(\"flex flex-col w-full gap-4\", defaultClassNames.month),\n nav: cn(\n \"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between\",\n defaultClassNames.nav\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n \"h-7 w-7 aria-disabled:opacity-50 p-0 select-none\",\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n \"h-7 w-7 aria-disabled:opacity-50 p-0 select-none\",\n defaultClassNames.button_next\n ),\n month_caption: cn(\n \"flex items-center justify-center h-7 w-full\",\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n \"w-full flex items-center text-sm font-medium justify-center h-7 gap-1.5\",\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn(\n \"relative cn-calendar-dropdown-root rounded-sm\",\n defaultClassNames.dropdown_root\n ),\n dropdown: cn(\n \"absolute bg-popover inset-0 opacity-0\",\n defaultClassNames.dropdown\n ),\n caption_label: cn(\n \"select-none font-medium\",\n captionLayout === \"label\"\n ? \"text-sm\"\n : \"cn-calendar-caption-label rounded-sm flex items-center gap-1 text-sm [&>svg]:text-muted-foreground [&>svg]:size-3.5\",\n defaultClassNames.caption_label\n ),\n table: \"w-full border-collapse\",\n weekdays: cn(\"flex\", defaultClassNames.weekdays),\n weekday: cn(\n \"text-muted-foreground rounded-sm flex-1 font-normal text-[0.8rem] select-none\",\n defaultClassNames.weekday\n ),\n week: cn(\"flex w-full mt-2\", defaultClassNames.week),\n week_number_header: cn(\n \"select-none w-9\",\n defaultClassNames.week_number_header\n ),\n week_number: cn(\n \"text-[0.8rem] select-none text-muted-foreground\",\n defaultClassNames.week_number\n ),\n day: cn(\n \"relative w-full rounded-sm h-full p-0 text-center group/day aspect-square select-none [&:first-child_button[data-range-start]]:!rounded-l-sm [&:first-child_button[data-range-middle]]:!rounded-l-sm [&:last-child_button[data-range-end]]:!rounded-r-sm [&:last-child_button[data-range-middle]]:!rounded-r-sm z-20 [&:has(button:not([data-range-start]):not([data-range-end]):hover)]:z-10 data-[focused=true]:z-30\",\n defaultClassNames.day\n ),\n range_start: cn(\n \"rounded-l-sm bg-muted relative after:bg-muted after:absolute after:inset-y-0 after:w-4 after:right-0 -z-0 isolate\",\n defaultClassNames.range_start\n ),\n range_middle: cn(\n \"rounded-none bg-transparent\",\n defaultClassNames.range_middle\n ),\n range_end: cn(\n \"rounded-r-sm bg-muted relative after:bg-muted after:absolute after:inset-y-0 after:w-4 after:left-0 -z-0 isolate\",\n defaultClassNames.range_end\n ),\n today: cn(\n \"bg-muted text-foreground rounded-sm data-[selected=true]:rounded-none\",\n defaultClassNames.today\n ),\n outside: cn(\n \"text-muted-foreground opacity-20 aria-selected:text-muted-foreground aria-selected:opacity-20\",\n defaultClassNames.outside\n ),\n disabled: cn(\n \"text-muted-foreground opacity-50\",\n defaultClassNames.disabled\n ),\n hidden: cn(\"invisible\", defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return (\n <div\n data-slot=\"calendar\"\n ref={rootRef}\n className={cn(className)}\n {...props}\n />\n )\n },\n Chevron: ({ className, orientation, ...props }) => {\n const Icon =\n orientation === \"left\" ? ChevronLeftIcon : ChevronRightIcon\n return (\n <span\n className={cn(\n buttonVariants({ variant: \"outline\", size: \"icon\" }),\n \"shrink-0 pointer-events-none\"\n )}\n >\n <Icon className={cn(\"size-4 shrink-0\", className)} {...props} />\n </span>\n )\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex h-9 w-9 items-center justify-center text-center\">\n {children}\n </div>\n </td>\n )\n },\n ...components,\n }}\n {...props}\n />\n )\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const defaultClassNames = getDefaultClassNames()\n\n const ref = React.useRef<HTMLButtonElement>(null)\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus()\n }, [modifiers.focused])\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString()}\n data-selected-single={\n modifiers.selected &&\n !modifiers.range_start &&\n !modifiers.range_end &&\n !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n \"rounded-sm data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 relative isolate z-10 flex aspect-square size-auto w-full min-w-9 flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-30 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-sm! data-[range-end=true]:rounded-r-sm! data-[range-middle=true]:rounded-none! data-[range-start=true]:rounded-sm! data-[range-start=true]:rounded-l-sm! [&>span]:text-xs [&>span]:opacity-70\",\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Calendar, CalendarDayButton }\n"]}
|
|
1
|
+
{"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-GRXC46JC.js","../src/components/calendar.tsx"],"names":["Calendar","className","classNames","showOutsideDays","captionLayout","buttonVariant","formatters","components","props","defaultClassNames","getDefaultClassNames","jsx","DayPicker","cn","date","buttonVariants","rootRef","orientation","Icon","ChevronLeftIcon","ChevronRightIcon","CalendarDayButton","children","day","modifiers","ref","Button"],"mappings":"AAAA,22BAAY;AACZ,sDAA8C,sDAAwC,uECC/D,kDAKhB,2CAI2C,+CA4HtC,SA1HHA,CAAAA,CAAS,CAChB,SAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CAAkB,CAAA,CAAA,CAClB,aAAA,CAAAC,CAAAA,CAAgB,OAAA,CAChB,aAAA,CAAAC,CAAAA,CAAgB,OAAA,CAChB,UAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAEG,CACD,IAAMC,CAAAA,CAAoBC,kDAAAA,CAAqB,CAE/C,OACEC,6BAAAA,yBAACC,CAAA,CACC,eAAA,CAAiBT,CAAAA,CACjB,SAAA,CAAWU,gCAAAA,mDACT,CACA,MAAA,CAAO,GAAA,CAAA,yCAAA,CAAA,CACP,MAAA,CAAO,GAAA,CAAA,6CAAA,CAAA,CACPZ,CACF,CAAA,CACA,aAAA,CAAeG,CAAAA,CACf,UAAA,CAAY,CACV,mBAAA,CAAsBU,CAAAA,EACpBA,CAAAA,CAAK,cAAA,CAAe,SAAA,CAAW,CAAE,KAAA,CAAO,OAAQ,CAAC,CAAA,CACnD,GAAGR,CACL,CAAA,CACA,UAAA,CAAY,CACV,IAAA,CAAMO,gCAAAA,OAAG,CAASJ,CAAAA,CAAkB,IAAI,CAAA,CACxC,MAAA,CAAQI,gCAAAA,0CACN,CACAJ,CAAAA,CAAkB,MACpB,CAAA,CACA,KAAA,CAAOI,gCAAAA,4BAAG,CAA8BJ,CAAAA,CAAkB,KAAK,CAAA,CAC/D,GAAA,CAAKI,gCAAAA,yEACH,CACAJ,CAAAA,CAAkB,GACpB,CAAA,CACA,eAAA,CAAiBI,gCAAAA,gCACfE,CAAiB,OAAA,CAASV,CAAc,CAAC,CAAA,CACzC,kDAAA,CACAI,C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CAAA,CAGJ,GAAGf,CACL,CAAA,CACC,GAAGC,CAAAA,CACN,CAEJ,CAEA,SAASa,CAAAA,CAAkB,CACzB,SAAA,CAAApB,CAAAA,CACA,GAAA,CAAAsB,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,GAAGhB,CACL,CAAA,CAA2C,CACzC,IAAMC,CAAAA,CAAoBC,kDAAAA,CAAqB,CAEzCe,CAAAA,CAAY,CAAA,CAAA,MAAA,CAA0B,IAAI,CAAA,CAChD,OAAM,CAAA,CAAA,SAAA,CAAU,CAAA,CAAA,EAAM,CAChBD,CAAAA,CAAU,OAAA,kBAASC,CAAAA,qBAAI,OAAA,6BAAS,KAAA,mBAAM,GAC5C,CAAA,CAAG,CAACD,CAAAA,CAAU,OAAO,CAAC,CAAA,CAGpBb,6BAAAA,kBAACe,CAAA,CACC,GAAA,CAAKD,CAAAA,CACL,OAAA,CAAQ,OAAA,CACR,IAAA,CAAK,MAAA,CACL,UAAA,CAAUF,CAAAA,CAAI,IAAA,CAAK,kBAAA,CAAmB,CAAA,CACtC,sBAAA,CACEC,CAAAA,CAAU,QAAA,EACV,CAACA,CAAAA,CAAU,WAAA,EACX,CAACA,CAAAA,CAAU,SAAA,EACX,CAACA,CAAAA,CAAU,YAAA,CAEb,kBAAA,CAAkBA,CAAAA,CAAU,WAAA,CAC5B,gBAAA,CAAgBA,CAAAA,CAAU,SAAA,CAC1B,mBAAA,CAAmBA,CAAAA,CAAU,YAAA,CAC7B,SAAA,CAAWX,gCAAAA,m3BACT,CACAJ,CAAAA,CAAkB,GAAA,CAClBR,CACF,CAAA,CACC,GAAGO,CAAAA,CACN,CAEJ,CAAA,6BAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-GRXC46JC.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport {\n DayPicker,\n getDefaultClassNames,\n type DayButton,\n} from \"react-day-picker\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button, buttonVariants } from \"@/components/button\"\nimport { ChevronLeftIcon, ChevronRightIcon } from \"lucide-react\"\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"label\",\n buttonVariant = \"ghost\",\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>[\"variant\"]\n}) {\n const defaultClassNames = getDefaultClassNames()\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n \"p-3 text-primary-accent group/calendar rounded-sm\",\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) =>\n date.toLocaleString(\"default\", { month: \"short\" }),\n ...formatters,\n }}\n classNames={{\n root: cn(\"w-fit\", defaultClassNames.root),\n months: cn(\n \"flex gap-4 flex-col md:flex-row relative\",\n defaultClassNames.months\n ),\n month: cn(\"flex flex-col w-full gap-4\", defaultClassNames.month),\n nav: cn(\n \"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between\",\n defaultClassNames.nav\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n \"h-7 w-7 aria-disabled:opacity-50 p-0 select-none\",\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n \"h-7 w-7 aria-disabled:opacity-50 p-0 select-none\",\n defaultClassNames.button_next\n ),\n month_caption: cn(\n \"flex items-center justify-center h-7 w-full\",\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n \"w-full flex items-center text-sm font-medium justify-center h-7 gap-1.5\",\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn(\n \"relative cn-calendar-dropdown-root rounded-sm\",\n defaultClassNames.dropdown_root\n ),\n dropdown: cn(\n \"absolute bg-popover inset-0 opacity-0\",\n defaultClassNames.dropdown\n ),\n caption_label: cn(\n \"select-none font-medium\",\n captionLayout === \"label\"\n ? \"text-sm\"\n : \"cn-calendar-caption-label rounded-sm flex items-center gap-1 text-sm [&>svg]:text-muted-foreground [&>svg]:size-3.5\",\n defaultClassNames.caption_label\n ),\n table: \"w-full border-collapse\",\n weekdays: cn(\"flex\", defaultClassNames.weekdays),\n weekday: cn(\n \"text-muted-foreground rounded-sm flex-1 font-normal text-[0.8rem] select-none\",\n defaultClassNames.weekday\n ),\n week: cn(\"flex w-full mt-2\", defaultClassNames.week),\n week_number_header: cn(\n \"select-none w-9\",\n defaultClassNames.week_number_header\n ),\n week_number: cn(\n \"text-[0.8rem] select-none text-muted-foreground\",\n defaultClassNames.week_number\n ),\n day: cn(\n \"relative w-full rounded-sm h-full p-0 text-center group/day aspect-square select-none [&:first-child_button[data-range-start]]:!rounded-l-sm [&:first-child_button[data-range-middle]]:!rounded-l-sm [&:last-child_button[data-range-end]]:!rounded-r-sm [&:last-child_button[data-range-middle]]:!rounded-r-sm z-20 [&:has(button:not([data-range-start]):not([data-range-end]):hover)]:z-10 data-[focused=true]:z-30\",\n defaultClassNames.day\n ),\n range_start: cn(\n \"rounded-l-sm bg-muted relative after:bg-muted after:absolute after:inset-y-0 after:w-4 after:right-0 -z-0 isolate\",\n defaultClassNames.range_start\n ),\n range_middle: cn(\n \"rounded-none bg-transparent\",\n defaultClassNames.range_middle\n ),\n range_end: cn(\n \"rounded-r-sm bg-muted relative after:bg-muted after:absolute after:inset-y-0 after:w-4 after:left-0 -z-0 isolate\",\n defaultClassNames.range_end\n ),\n today: cn(\n \"bg-muted text-foreground rounded-sm data-[selected=true]:rounded-none\",\n defaultClassNames.today\n ),\n outside: cn(\n \"text-muted-foreground opacity-20 aria-selected:text-muted-foreground aria-selected:opacity-20\",\n defaultClassNames.outside\n ),\n disabled: cn(\n \"text-muted-foreground opacity-50\",\n defaultClassNames.disabled\n ),\n hidden: cn(\"invisible\", defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return (\n <div\n data-slot=\"calendar\"\n ref={rootRef}\n className={cn(className)}\n {...props}\n />\n )\n },\n Chevron: ({ className, orientation, ...props }) => {\n const Icon =\n orientation === \"left\" ? ChevronLeftIcon : ChevronRightIcon\n return (\n <span\n className={cn(\n buttonVariants({ variant: \"outline\", size: \"icon\" }),\n \"shrink-0 pointer-events-none\"\n )}\n >\n <Icon className={cn(\"size-4 shrink-0\", className)} {...props} />\n </span>\n )\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex h-9 w-9 items-center justify-center text-center\">\n {children}\n </div>\n </td>\n )\n },\n ...components,\n }}\n {...props}\n />\n )\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const defaultClassNames = getDefaultClassNames()\n\n const ref = React.useRef<HTMLButtonElement>(null)\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus()\n }, [modifiers.focused])\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString()}\n data-selected-single={\n modifiers.selected &&\n !modifiers.range_start &&\n !modifiers.range_end &&\n !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n \"rounded-sm data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 relative isolate z-10 flex aspect-square size-auto w-full min-w-9 flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-30 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-sm! data-[range-end=true]:rounded-r-sm! data-[range-middle=true]:rounded-none! data-[range-start=true]:rounded-sm! data-[range-start=true]:rounded-l-sm! [&>span]:text-xs [&>span]:opacity-70\",\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Calendar, CalendarDayButton }\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/
|
|
1
|
+
{"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-I5INE4KG.js","../src/components/label.tsx"],"names":["Label","className","props","ref","jsx","cn"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,uECChB,+CAOnB,IAFEA,CAAAA,CAAc,CAAA,CAAA,UAAA,CAClB,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBC,6BAAAA,OAAC,CAAA,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,gCAAAA,yFACT,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CAEJ,CAAA,CACAF,CAAAA,CAAM,WAAA,CAAc,OAAA,CAAA,cAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-I5INE4KG.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\n\nexport interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {}\n\nconst Label = React.forwardRef<HTMLLabelElement, LabelProps>(\n ({ className, ...props }, ref) => (\n <label\n ref={ref}\n className={cn(\n \"text-sm font-medium leading-5 peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n className\n )}\n {...props}\n />\n )\n)\nLabel.displayName = \"Label\"\n\nexport { Label }\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/
|
|
1
|
+
{"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-K4GMCVHO.js","../src/components/input.tsx"],"names":["Input","className","type","error","props","ref","jsx","cn"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,uECDhB,+CAWjB,IAHAA,CAAAA,CAAc,CAAA,CAAA,UAAA,CAClB,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,IAAA,CAAAC,CAAAA,CAAM,KAAA,CAAAC,CAAAA,CAAO,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAEnCC,6BAAAA,OAAC,CAAA,CACC,IAAA,CAAMJ,CAAAA,CACN,SAAA,CAAWK,gCAAAA,2XACT,CACAJ,CAAAA,CACI,yEAAA,CACA,eAAA,CACJF,CACF,CAAA,CACA,GAAA,CAAKI,CAAAA,CACJ,GAAGD,CAAAA,CACN,CAGN,CAAA,CACAJ,CAAAA,CAAM,WAAA,CAAc,OAAA,CAAA,cAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-K4GMCVHO.js","sourcesContent":[null,"import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n error?: boolean\n}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, error, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex my-2 h-9 w-full rounded-3xl border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-secondary-text focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n error\n ? \"border-destructive-foreground focus-visible:ring-destructive-foreground\"\n : \"border-border\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n"]}
|