@fluid-app/portal-core 0.1.16
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-CKQMccvm.cjs +28 -0
- package/dist/data-sources/DataAwareWidget.cjs +50 -0
- package/dist/data-sources/DataAwareWidget.cjs.map +1 -0
- package/dist/data-sources/DataAwareWidget.d.cts +24 -0
- package/dist/data-sources/DataAwareWidget.d.cts.map +1 -0
- package/dist/data-sources/DataAwareWidget.d.mts +24 -0
- package/dist/data-sources/DataAwareWidget.d.mts.map +1 -0
- package/dist/data-sources/DataAwareWidget.mjs +48 -0
- package/dist/data-sources/DataAwareWidget.mjs.map +1 -0
- package/dist/data-sources/ErrorState.cjs +20 -0
- package/dist/data-sources/ErrorState.cjs.map +1 -0
- package/dist/data-sources/ErrorState.d.cts +7 -0
- package/dist/data-sources/ErrorState.d.cts.map +1 -0
- package/dist/data-sources/ErrorState.d.mts +7 -0
- package/dist/data-sources/ErrorState.d.mts.map +1 -0
- package/dist/data-sources/ErrorState.mjs +18 -0
- package/dist/data-sources/ErrorState.mjs.map +1 -0
- package/dist/data-sources/context.cjs +24 -0
- package/dist/data-sources/context.cjs.map +1 -0
- package/dist/data-sources/context.d.cts +21 -0
- package/dist/data-sources/context.d.cts.map +1 -0
- package/dist/data-sources/context.d.mts +21 -0
- package/dist/data-sources/context.d.mts.map +1 -0
- package/dist/data-sources/context.mjs +21 -0
- package/dist/data-sources/context.mjs.map +1 -0
- package/dist/data-sources/fetchers/api.cjs +65 -0
- package/dist/data-sources/fetchers/api.cjs.map +1 -0
- package/dist/data-sources/fetchers/api.d.cts +10 -0
- package/dist/data-sources/fetchers/api.d.cts.map +1 -0
- package/dist/data-sources/fetchers/api.d.mts +10 -0
- package/dist/data-sources/fetchers/api.d.mts.map +1 -0
- package/dist/data-sources/fetchers/api.mjs +64 -0
- package/dist/data-sources/fetchers/api.mjs.map +1 -0
- package/dist/data-sources/fetchers/custom.cjs +108 -0
- package/dist/data-sources/fetchers/custom.cjs.map +1 -0
- package/dist/data-sources/fetchers/custom.d.cts +17 -0
- package/dist/data-sources/fetchers/custom.d.cts.map +1 -0
- package/dist/data-sources/fetchers/custom.d.mts +17 -0
- package/dist/data-sources/fetchers/custom.d.mts.map +1 -0
- package/dist/data-sources/fetchers/custom.mjs +107 -0
- package/dist/data-sources/fetchers/custom.mjs.map +1 -0
- package/dist/data-sources/fetchers/static.cjs +161 -0
- package/dist/data-sources/fetchers/static.cjs.map +1 -0
- package/dist/data-sources/fetchers/static.d.cts +40 -0
- package/dist/data-sources/fetchers/static.d.cts.map +1 -0
- package/dist/data-sources/fetchers/static.d.mts +40 -0
- package/dist/data-sources/fetchers/static.d.mts.map +1 -0
- package/dist/data-sources/fetchers/static.mjs +158 -0
- package/dist/data-sources/fetchers/static.mjs.map +1 -0
- package/dist/data-sources/preview-context.cjs +21 -0
- package/dist/data-sources/preview-context.cjs.map +1 -0
- package/dist/data-sources/preview-context.d.cts +13 -0
- package/dist/data-sources/preview-context.d.cts.map +1 -0
- package/dist/data-sources/preview-context.d.mts +13 -0
- package/dist/data-sources/preview-context.d.mts.map +1 -0
- package/dist/data-sources/preview-context.mjs +18 -0
- package/dist/data-sources/preview-context.mjs.map +1 -0
- package/dist/data-sources/registry-context.cjs +53 -0
- package/dist/data-sources/registry-context.cjs.map +1 -0
- package/dist/data-sources/registry-context.d.cts +48 -0
- package/dist/data-sources/registry-context.d.cts.map +1 -0
- package/dist/data-sources/registry-context.d.mts +48 -0
- package/dist/data-sources/registry-context.d.mts.map +1 -0
- package/dist/data-sources/registry-context.mjs +49 -0
- package/dist/data-sources/registry-context.mjs.map +1 -0
- package/dist/data-sources/registry.cjs +31 -0
- package/dist/data-sources/registry.cjs.map +1 -0
- package/dist/data-sources/registry.d.cts +19 -0
- package/dist/data-sources/registry.d.cts.map +1 -0
- package/dist/data-sources/registry.d.mts +19 -0
- package/dist/data-sources/registry.d.mts.map +1 -0
- package/dist/data-sources/registry.mjs +29 -0
- package/dist/data-sources/registry.mjs.map +1 -0
- package/dist/data-sources/transformers.cjs +154 -0
- package/dist/data-sources/transformers.cjs.map +1 -0
- package/dist/data-sources/transformers.d.cts +10 -0
- package/dist/data-sources/transformers.d.cts.map +1 -0
- package/dist/data-sources/transformers.d.mts +10 -0
- package/dist/data-sources/transformers.d.mts.map +1 -0
- package/dist/data-sources/transformers.mjs +153 -0
- package/dist/data-sources/transformers.mjs.map +1 -0
- package/dist/data-sources/types.cjs +0 -0
- package/dist/data-sources/types.d.cts +2 -0
- package/dist/data-sources/types.d.mts +2 -0
- package/dist/data-sources/types.mjs +1 -0
- package/dist/data-sources/use-widget-data.cjs +111 -0
- package/dist/data-sources/use-widget-data.cjs.map +1 -0
- package/dist/data-sources/use-widget-data.d.cts +17 -0
- package/dist/data-sources/use-widget-data.d.cts.map +1 -0
- package/dist/data-sources/use-widget-data.d.mts +17 -0
- package/dist/data-sources/use-widget-data.d.mts.map +1 -0
- package/dist/data-sources/use-widget-data.mjs +109 -0
- package/dist/data-sources/use-widget-data.mjs.map +1 -0
- package/dist/index-B5cTNde-.d.cts +246 -0
- package/dist/index-B5cTNde-.d.cts.map +1 -0
- package/dist/index-Cqt2JzkQ.d.mts +246 -0
- package/dist/index-Cqt2JzkQ.d.mts.map +1 -0
- package/dist/registries/index.cjs +243 -0
- package/dist/registries/index.cjs.map +1 -0
- package/dist/registries/index.d.cts +338 -0
- package/dist/registries/index.d.cts.map +1 -0
- package/dist/registries/index.d.mts +338 -0
- package/dist/registries/index.d.mts.map +1 -0
- package/dist/registries/index.mjs +229 -0
- package/dist/registries/index.mjs.map +1 -0
- package/dist/shell/AppShellLayout.cjs +49 -0
- package/dist/shell/AppShellLayout.cjs.map +1 -0
- package/dist/shell/AppShellLayout.d.cts +39 -0
- package/dist/shell/AppShellLayout.d.cts.map +1 -0
- package/dist/shell/AppShellLayout.d.mts +39 -0
- package/dist/shell/AppShellLayout.d.mts.map +1 -0
- package/dist/shell/AppShellLayout.mjs +46 -0
- package/dist/shell/AppShellLayout.mjs.map +1 -0
- package/dist/shell/ScreenHeader.cjs +44 -0
- package/dist/shell/ScreenHeader.cjs.map +1 -0
- package/dist/shell/ScreenHeader.d.cts +12 -0
- package/dist/shell/ScreenHeader.d.cts.map +1 -0
- package/dist/shell/ScreenHeader.d.mts +12 -0
- package/dist/shell/ScreenHeader.d.mts.map +1 -0
- package/dist/shell/ScreenHeader.mjs +42 -0
- package/dist/shell/ScreenHeader.mjs.map +1 -0
- package/dist/shell/ScreenHeaderContext.cjs +91 -0
- package/dist/shell/ScreenHeaderContext.cjs.map +1 -0
- package/dist/shell/ScreenHeaderContext.d.cts +35 -0
- package/dist/shell/ScreenHeaderContext.d.cts.map +1 -0
- package/dist/shell/ScreenHeaderContext.d.mts +35 -0
- package/dist/shell/ScreenHeaderContext.d.mts.map +1 -0
- package/dist/shell/ScreenHeaderContext.mjs +86 -0
- package/dist/shell/ScreenHeaderContext.mjs.map +1 -0
- package/dist/shell/ThemeModeContext.cjs +70 -0
- package/dist/shell/ThemeModeContext.cjs.map +1 -0
- package/dist/shell/ThemeModeContext.d.cts +33 -0
- package/dist/shell/ThemeModeContext.d.cts.map +1 -0
- package/dist/shell/ThemeModeContext.d.mts +33 -0
- package/dist/shell/ThemeModeContext.d.mts.map +1 -0
- package/dist/shell/ThemeModeContext.mjs +66 -0
- package/dist/shell/ThemeModeContext.mjs.map +1 -0
- package/dist/shell/index.cjs +43 -0
- package/dist/shell/index.d.cts +7 -0
- package/dist/shell/index.d.mts +7 -0
- package/dist/shell/index.mjs +7 -0
- package/dist/shell/sidebar.cjs +390 -0
- package/dist/shell/sidebar.cjs.map +1 -0
- package/dist/shell/sidebar.d.cts +85 -0
- package/dist/shell/sidebar.d.cts.map +1 -0
- package/dist/shell/sidebar.d.mts +85 -0
- package/dist/shell/sidebar.d.mts.map +1 -0
- package/dist/shell/sidebar.mjs +364 -0
- package/dist/shell/sidebar.mjs.map +1 -0
- package/dist/shell/use-mobile.cjs +51 -0
- package/dist/shell/use-mobile.cjs.map +1 -0
- package/dist/shell/use-mobile.d.cts +7 -0
- package/dist/shell/use-mobile.d.cts.map +1 -0
- package/dist/shell/use-mobile.d.mts +7 -0
- package/dist/shell/use-mobile.d.mts.map +1 -0
- package/dist/shell/use-mobile.mjs +47 -0
- package/dist/shell/use-mobile.mjs.map +1 -0
- package/dist/theme/index.cjs +758 -0
- package/dist/theme/index.cjs.map +1 -0
- package/dist/theme/index.d.cts +131 -0
- package/dist/theme/index.d.cts.map +1 -0
- package/dist/theme/index.d.mts +131 -0
- package/dist/theme/index.d.mts.map +1 -0
- package/dist/theme/index.mjs +728 -0
- package/dist/theme/index.mjs.map +1 -0
- package/dist/types/index.cjs +18 -0
- package/dist/types/index.d.cts +4 -0
- package/dist/types/index.d.mts +4 -0
- package/dist/types/index.mjs +2 -0
- package/dist/types-27AHMek-.d.cts +85 -0
- package/dist/types-27AHMek-.d.cts.map +1 -0
- package/dist/types-BXFX9bXp.cjs +303 -0
- package/dist/types-BXFX9bXp.cjs.map +1 -0
- package/dist/types-Bjmd7Fdx.mjs +208 -0
- package/dist/types-Bjmd7Fdx.mjs.map +1 -0
- package/dist/types-C5Zs5V3E.d.mts +155 -0
- package/dist/types-C5Zs5V3E.d.mts.map +1 -0
- package/dist/types-CeCPKvOv.d.mts +85 -0
- package/dist/types-CeCPKvOv.d.mts.map +1 -0
- package/dist/types-DrzvahW8.d.cts +155 -0
- package/dist/types-DrzvahW8.d.cts.map +1 -0
- package/dist/widget-schema-BKZgsNG7.d.mts +119 -0
- package/dist/widget-schema-BKZgsNG7.d.mts.map +1 -0
- package/dist/widget-schema-BSX2fVhW.d.cts +119 -0
- package/dist/widget-schema-BSX2fVhW.d.cts.map +1 -0
- package/dist/widget-utils/index.cjs +130 -0
- package/dist/widget-utils/index.cjs.map +1 -0
- package/dist/widget-utils/index.d.cts +47 -0
- package/dist/widget-utils/index.d.cts.map +1 -0
- package/dist/widget-utils/index.d.mts +47 -0
- package/dist/widget-utils/index.d.mts.map +1 -0
- package/dist/widget-utils/index.mjs +119 -0
- package/dist/widget-utils/index.mjs.map +1 -0
- package/package.json +200 -0
- package/src/styles/globals.css +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar.cjs","names":["React","useIsMobile","Slot"],"sources":["../../src/shell/sidebar.tsx"],"sourcesContent":["\"use client\";\n\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\nimport * as React from \"react\";\n\nimport { useIsMobile } from \"./use-mobile\";\n\n// ---------------------------------------------------------------------------\n// Inlined utilities (avoid importing from builder's UI kit)\n// ---------------------------------------------------------------------------\n\nfunction cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nfunction Separator({\n className,\n orientation = \"horizontal\",\n ...props\n}: React.ComponentPropsWithRef<\"div\"> & {\n orientation?: \"horizontal\" | \"vertical\";\n decorative?: boolean;\n}) {\n return (\n <div\n role=\"separator\"\n aria-orientation={orientation}\n className={cn(\n \"bg-border shrink-0\",\n orientation === \"horizontal\" ? \"h-px w-full\" : \"h-full w-px\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Skeleton({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn(\"bg-muted animate-pulse rounded-md\", className)}\n {...props}\n />\n );\n}\n\n// ---------------------------------------------------------------------------\n// Constants\n// ---------------------------------------------------------------------------\n\nconst SIDEBAR_WIDTH = \"13rem\";\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\";\nconst SIDEBAR_WIDTH_ICON = \"3rem\";\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\";\n\n// ---------------------------------------------------------------------------\n// Sidebar Context\n// ---------------------------------------------------------------------------\n\ntype SidebarContextValue = {\n state: \"expanded\" | \"collapsed\";\n open: boolean;\n setOpen: (open: boolean) => void;\n openMobile: boolean;\n setOpenMobile: (open: boolean) => void;\n isMobile: boolean;\n toggleSidebar: () => void;\n isPreviewMode: boolean;\n useBottomNav: boolean;\n};\n\nexport const SidebarContext: React.Context<SidebarContextValue | null> =\n React.createContext<SidebarContextValue | null>(null);\n\nfunction useSidebar(): SidebarContextValue {\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\n// ---------------------------------------------------------------------------\n// SidebarProvider\n// ---------------------------------------------------------------------------\n\nconst SidebarProvider: React.ForwardRefExoticComponent<\n React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n viewportWidth?: number;\n previewMode?: boolean;\n useBottomNav?: boolean;\n } & React.RefAttributes<HTMLDivElement>\n> = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n viewportWidth?: number;\n previewMode?: boolean;\n useBottomNav?: boolean;\n }\n>(\n (\n {\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n viewportWidth,\n previewMode,\n useBottomNav: useBottomNavProp = false,\n className,\n style,\n children,\n ...props\n },\n ref,\n ) => {\n const windowIsMobile = useIsMobile();\n // Use viewportWidth if provided, otherwise use actual window detection\n const isMobile =\n viewportWidth !== undefined ? viewportWidth < 768 : windowIsMobile;\n // Preview mode is active when viewportWidth is provided\n const isPreviewMode = viewportWidth !== undefined || !!previewMode;\n const [openMobile, setOpenMobile] = React.useState(false);\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_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 [setOpenProp, open],\n );\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile\n ? setOpenMobile((open) => !open)\n : setOpen((open) => !open);\n }, [isMobile, setOpen, setOpenMobile]);\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n // check if composer is focused - if so, let the composer handle the shortcut\n const activeElement = document.activeElement;\n const isComposerFocused =\n activeElement?.closest(\".group\\\\/composer\") ||\n activeElement?.closest(\"[data-toolbar]\") ||\n activeElement?.classList.contains(\"ProseMirror\");\n\n if (isComposerFocused) {\n return; // let the composer handle the shortcut\n }\n\n event.preventDefault();\n toggleSidebar();\n }\n };\n\n window.addEventListener(\"keydown\", handleKeyDown);\n return () => window.removeEventListener(\"keydown\", handleKeyDown);\n }, [toggleSidebar]);\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? \"expanded\" : \"collapsed\";\n\n const contextValue = React.useMemo<SidebarContextValue>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n isPreviewMode,\n useBottomNav: useBottomNavProp,\n }),\n [\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n isPreviewMode,\n useBottomNavProp,\n ],\n );\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <div\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n \"group/sidebar-wrapper flex min-h-0 w-full flex-1\",\n className,\n )}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n </SidebarContext.Provider>\n );\n },\n);\nSidebarProvider.displayName = \"SidebarProvider\";\n\n// ---------------------------------------------------------------------------\n// Sidebar\n// ---------------------------------------------------------------------------\n\nconst Sidebar: React.ForwardRefExoticComponent<\n React.ComponentProps<\"div\"> & {\n side?: \"left\" | \"right\";\n variant?: \"sidebar\" | \"floating\" | \"inset\";\n collapsible?: \"offcanvas\" | \"icon\" | \"none\";\n } & React.RefAttributes<HTMLDivElement>\n> = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\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 isMobile,\n state,\n openMobile,\n setOpenMobile,\n isPreviewMode,\n useBottomNav,\n } = useSidebar();\n\n // Define CSS variables for expanded and collapsed sidebar widths\n const sidebarWidth =\n state === \"expanded\" ? SIDEBAR_WIDTH : SIDEBAR_WIDTH_ICON;\n\n // When bottom nav is active on mobile, hide the sidebar entirely\n if (useBottomNav && isMobile) {\n return null;\n }\n\n if (collapsible === \"none\") {\n return (\n <div\n className={cn(\n \"bg-sidebar text-sidebar-foreground flex w-(--sidebar-width) flex-col rounded-tl-lg\",\n isPreviewMode ? \"h-full\" : \"h-[97vh]\",\n className,\n )}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n );\n }\n\n if (isMobile) {\n // For mobile, render a slide-out sidebar with overlay\n // Use absolute positioning in preview mode so it stays within the preview container\n const positionClass = isPreviewMode ? \"absolute\" : \"fixed\";\n return (\n <>\n {/* Overlay - only visible when sidebar is open */}\n {openMobile && (\n <div\n className={cn(positionClass, \"inset-0 z-40 bg-black/50\")}\n onClick={() => setOpenMobile(false)}\n aria-hidden=\"true\"\n />\n )}\n\n {/* Sidebar - slides in from left */}\n <div\n data-sidebar=\"sidebar\"\n data-mobile=\"true\"\n className={cn(\n positionClass,\n \"bg-sidebar text-sidebar-foreground top-0 left-0 z-50 h-full w-[--sidebar-width] p-0 transition-transform duration-300 ease-in-out\",\n openMobile ? \"translate-x-0\" : \"-translate-x-full\",\n className,\n )}\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n ref={ref}\n {...props}\n >\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </div>\n </>\n );\n }\n\n return (\n <div\n ref={ref}\n className=\"group peer bg-sidebar text-sidebar-foreground hidden md:block\"\n data-state={state}\n data-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n data-variant={variant}\n data-side={side}\n style={\n {\n \"--sidebar-width\": sidebarWidth,\n } as React.CSSProperties\n }\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n className={cn(\n \"relative bg-transparent transition-[width] duration-200 ease-linear\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n \"group-data-[side=right]:rotate-180\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\",\n )}\n />\n <div\n className={cn(\n \"relative inset-y-0 z-[20] hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex\",\n isPreviewMode ? \"h-full\" : \"h-svh\",\n side === \"left\"\n ? \"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]\"\n : \"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]\",\n // Adjust the padding for floating and inset variants.\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=right]:border-l\",\n className,\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n className=\"group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm\"\n >\n {children}\n </div>\n </div>\n </div>\n );\n },\n);\nSidebar.displayName = \"Sidebar\";\n\n// ---------------------------------------------------------------------------\n// SidebarRail\n// ---------------------------------------------------------------------------\n\nconst SidebarRail: React.ForwardRefExoticComponent<\n React.ComponentProps<\"button\"> & React.RefAttributes<HTMLButtonElement>\n> = React.forwardRef<HTMLButtonElement, 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 \"hover:after:bg-sidebar-border absolute inset-y-0 z-[10] hidden w-4 -translate-x-full transition-all ease-linear group-data-[side=left]:-right-[1.375rem] group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] 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 \"hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nSidebarRail.displayName = \"SidebarRail\";\n\n// ---------------------------------------------------------------------------\n// SidebarInset\n// ---------------------------------------------------------------------------\n\nconst SidebarInset: React.ForwardRefExoticComponent<\n React.ComponentProps<\"main\"> & React.RefAttributes<HTMLDivElement>\n> = React.forwardRef<HTMLDivElement, React.ComponentProps<\"main\">>(\n ({ className, ...props }, ref) => {\n const { isPreviewMode } = useSidebar();\n return (\n <main\n ref={ref}\n className={cn(\n \"relative flex flex-1 flex-col\",\n isPreviewMode\n ? \"max-h-[calc(100svh-(--spacing(13)))]\"\n : \"min-h-svh peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))]\",\n \"md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nSidebarInset.displayName = \"SidebarInset\";\n\n// ---------------------------------------------------------------------------\n// SidebarInput\n// ---------------------------------------------------------------------------\n\nconst SidebarInput: React.ForwardRefExoticComponent<\n React.ComponentProps<\"input\"> & React.RefAttributes<HTMLInputElement>\n> = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, ...props }, ref) => {\n return (\n <input\n ref={ref}\n data-sidebar=\"input\"\n className={cn(\n \"bg-background focus-visible:ring-sidebar-ring h-8 w-full rounded-md border px-3 text-sm shadow-none focus-visible:ring-2 focus-visible:outline-none\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nSidebarInput.displayName = \"SidebarInput\";\n\n// ---------------------------------------------------------------------------\n// SidebarHeader / Footer\n// ---------------------------------------------------------------------------\n\nconst SidebarHeader: React.ForwardRefExoticComponent<\n React.ComponentProps<\"div\"> & React.RefAttributes<HTMLDivElement>\n> = React.forwardRef<HTMLDivElement, React.ComponentProps<\"div\">>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"header\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n );\n },\n);\nSidebarHeader.displayName = \"SidebarHeader\";\n\nconst SidebarFooter: React.ForwardRefExoticComponent<\n React.ComponentProps<\"div\"> & React.RefAttributes<HTMLDivElement>\n> = React.forwardRef<HTMLDivElement, 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 },\n);\nSidebarFooter.displayName = \"SidebarFooter\";\n\n// ---------------------------------------------------------------------------\n// SidebarSeparator\n// ---------------------------------------------------------------------------\n\nconst SidebarSeparator: React.ForwardRefExoticComponent<\n React.ComponentProps<\"div\"> & {\n orientation?: \"horizontal\" | \"vertical\";\n } & React.RefAttributes<HTMLDivElement>\n> = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n orientation?: \"horizontal\" | \"vertical\";\n }\n>(({ className, ...props }, ref) => {\n return (\n <Separator\n ref={ref}\n data-sidebar=\"separator\"\n className={cn(\"bg-sidebar-border mx-2 w-auto\", className)}\n {...props}\n />\n );\n});\nSidebarSeparator.displayName = \"SidebarSeparator\";\n\n// ---------------------------------------------------------------------------\n// SidebarContent\n// ---------------------------------------------------------------------------\n\nconst SidebarContent: React.ForwardRefExoticComponent<\n React.ComponentProps<\"div\"> & React.RefAttributes<HTMLDivElement>\n> = React.forwardRef<HTMLDivElement, React.ComponentProps<\"div\">>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"content\"\n className={cn(\n \"scrollbar-none flex min-h-0 flex-1 flex-col gap-2 overflow-auto rounded group-data-[collapsible=icon]:gap-0 group-data-[collapsible=icon]:overflow-hidden group-data-[collapsible=icon]:pt-3\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nSidebarContent.displayName = \"SidebarContent\";\n\n// ---------------------------------------------------------------------------\n// SidebarGroup\n// ---------------------------------------------------------------------------\n\nconst SidebarGroup: React.ForwardRefExoticComponent<\n React.ComponentProps<\"div\"> & React.RefAttributes<HTMLDivElement>\n> = React.forwardRef<HTMLDivElement, 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 p-2 group-data-[collapsible=icon]:py-0 group-data-[collapsible=icon]:pt-4\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nSidebarGroup.displayName = \"SidebarGroup\";\n\nconst SidebarGroupLabel: React.ForwardRefExoticComponent<\n React.ComponentProps<\"div\"> & {\n asChild?: boolean;\n } & React.RefAttributes<HTMLDivElement>\n> = 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 \"text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden 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]:hidden\",\n className,\n )}\n {...props}\n />\n );\n});\nSidebarGroupLabel.displayName = \"SidebarGroupLabel\";\n\nconst SidebarGroupAction: React.ForwardRefExoticComponent<\n React.ComponentProps<\"button\"> & {\n asChild?: boolean;\n } & React.RefAttributes<HTMLButtonElement>\n> = 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 \"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n // Increases the hit area of the button on mobile.\n \"after:absolute after:-inset-2 md:after:hidden\",\n \"group-data-[collapsible=icon]:hidden\",\n className,\n )}\n {...props}\n />\n );\n});\nSidebarGroupAction.displayName = \"SidebarGroupAction\";\n\nconst SidebarGroupContent: React.ForwardRefExoticComponent<\n React.ComponentProps<\"div\"> & React.RefAttributes<HTMLDivElement>\n> = React.forwardRef<HTMLDivElement, 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 ),\n);\nSidebarGroupContent.displayName = \"SidebarGroupContent\";\n\n// ---------------------------------------------------------------------------\n// SidebarMenu\n// ---------------------------------------------------------------------------\n\nconst SidebarMenu: React.ForwardRefExoticComponent<\n React.ComponentProps<\"ul\"> & React.RefAttributes<HTMLUListElement>\n> = React.forwardRef<HTMLUListElement, 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 ),\n);\nSidebarMenu.displayName = \"SidebarMenu\";\n\nconst SidebarMenuItem: React.ForwardRefExoticComponent<\n React.ComponentProps<\"li\"> & React.RefAttributes<HTMLLIElement>\n> = React.forwardRef<HTMLLIElement, 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 ),\n);\nSidebarMenuItem.displayName = \"SidebarMenuItem\";\n\n// ---------------------------------------------------------------------------\n// SidebarMenuButton\n// ---------------------------------------------------------------------------\n\nconst sidebarMenuButtonVariants: (\n props?:\n | ({\n variant?: \"default\" | \"outline\" | null | undefined;\n size?: \"default\" | \"sm\" | \"lg\" | null | undefined;\n } & (\n | {\n class: ClassValue;\n className?: never;\n }\n | {\n class?: never;\n className: ClassValue;\n }\n | {\n class?: never;\n className?: never;\n }\n ))\n | undefined,\n) => string = cva(\n \"peer/menu-button ring-sidebar-ring hover:bg-sidebar-primary hover:text-sidebar-primary-foreground active:bg-sidebar-primary active:text-sidebar-primary-foreground data-[active=true]:bg-sidebar-primary data-[active=true]:text-sidebar-primary-foreground data-[state=open]:hover:bg-sidebar-primary data-[state=open]:hover:text-sidebar-primary-foreground flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:font-medium [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default:\n \"hover:bg-sidebar-primary hover:text-sidebar-primary-foreground\",\n outline:\n \"hover:bg-sidebar-primary hover:text-sidebar-primary-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-primary))]\",\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.ForwardRefExoticComponent<\n React.ComponentProps<\"button\"> & {\n asChild?: boolean;\n isActive?: boolean;\n } & VariantProps<typeof sidebarMenuButtonVariants> &\n React.RefAttributes<HTMLButtonElement>\n> = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean;\n isActive?: boolean;\n } & VariantProps<typeof sidebarMenuButtonVariants>\n>(\n (\n {\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n className,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : \"button\";\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 return button;\n },\n);\nSidebarMenuButton.displayName = \"SidebarMenuButton\";\n\n// ---------------------------------------------------------------------------\n// SidebarMenuAction / Badge / Skeleton\n// ---------------------------------------------------------------------------\n\nconst SidebarMenuAction: React.ForwardRefExoticComponent<\n React.ComponentProps<\"button\"> & {\n asChild?: boolean;\n showOnHover?: boolean;\n } & React.RefAttributes<HTMLButtonElement>\n> = 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 \"text-sidebar-foreground ring-sidebar-ring peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n // Increases the hit area of the button on mobile.\n \"after:absolute after:-inset-2 md:after:hidden\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n showOnHover &&\n \"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n});\nSidebarMenuAction.displayName = \"SidebarMenuAction\";\n\nconst SidebarMenuBadge: React.ForwardRefExoticComponent<\n React.ComponentProps<\"div\"> & React.RefAttributes<HTMLDivElement>\n> = React.forwardRef<HTMLDivElement, React.ComponentProps<\"div\">>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"menu-badge\"\n className={cn(\n \"text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none\",\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 ),\n);\nSidebarMenuBadge.displayName = \"SidebarMenuBadge\";\n\nconst SidebarMenuSkeleton: React.ForwardRefExoticComponent<\n React.ComponentProps<\"div\"> & {\n showIcon?: boolean;\n } & React.RefAttributes<HTMLDivElement>\n> = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showIcon?: boolean;\n }\n>(({ className, showIcon = false, ...props }, ref) => {\n // Random width between 50 to 90%.\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\n// ---------------------------------------------------------------------------\n// SidebarMenuSub\n// ---------------------------------------------------------------------------\n\nconst SidebarMenuSub: React.ForwardRefExoticComponent<\n React.ComponentProps<\"ul\"> & React.RefAttributes<HTMLUListElement>\n> = React.forwardRef<HTMLUListElement, React.ComponentProps<\"ul\">>(\n ({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu-sub\"\n className={cn(\n \"border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className,\n )}\n {...props}\n />\n ),\n);\nSidebarMenuSub.displayName = \"SidebarMenuSub\";\n\nconst SidebarMenuSubItem: React.ForwardRefExoticComponent<\n React.ComponentProps<\"li\"> & React.RefAttributes<HTMLLIElement>\n> = React.forwardRef<HTMLLIElement, React.ComponentProps<\"li\">>(\n ({ ...props }, ref) => <li ref={ref} {...props} />,\n);\nSidebarMenuSubItem.displayName = \"SidebarMenuSubItem\";\n\nconst SidebarMenuSubButton: React.ForwardRefExoticComponent<\n React.ComponentProps<\"a\"> & {\n asChild?: boolean;\n size?: \"sm\" | \"md\";\n isActive?: boolean;\n } & React.RefAttributes<HTMLAnchorElement>\n> = 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 \"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0\",\n \"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground\",\n size === \"sm\" && \"text-xs\",\n size === \"md\" && \"text-sm\",\n \"group-data-[collapsible=icon]:hidden\",\n className,\n )}\n {...props}\n />\n );\n});\nSidebarMenuSubButton.displayName = \"SidebarMenuSubButton\";\n\n// ---------------------------------------------------------------------------\n// Exports\n// ---------------------------------------------------------------------------\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n useSidebar,\n};\n"],"mappings":";;;;;;;;;;;;AAcA,SAAS,GAAG,GAAG,QAAsB;AACnC,SAAA,GAAA,eAAA,UAAA,GAAA,KAAA,MAAoB,OAAO,CAAC;;AAG9B,SAAS,UAAU,EACjB,WACA,cAAc,cACd,GAAG,SAIF;AACD,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,MAAK;EACL,oBAAkB;EAClB,WAAW,GACT,sBACA,gBAAgB,eAAe,gBAAgB,eAC/C,UACD;EACD,GAAI;EACJ,CAAA;;AAIN,SAAS,SAAS,EAChB,WACA,GAAG,SACoC;AACvC,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,WAAW,GAAG,qCAAqC,UAAU;EAC7D,GAAI;EACJ,CAAA;;AAQN,MAAM,gBAAgB;AACtB,MAAM,uBAAuB;AAC7B,MAAM,qBAAqB;AAC3B,MAAM,4BAA4B;AAkBlC,MAAa,iBACXA,MAAM,cAA0C,KAAK;AAEvD,SAAS,aAAkC;CACzC,MAAM,UAAUA,MAAM,WAAW,eAAe;AAChD,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,oDAAoD;AAGtE,QAAO;;AAOT,MAAM,kBASFA,MAAM,YAYN,EACE,cAAc,MACd,MAAM,UACN,cAAc,aACd,eACA,aACA,cAAc,mBAAmB,OACjC,WACA,OACA,UACA,GAAG,SAEL,QACG;CACH,MAAM,iBAAiBC,yBAAAA,aAAa;CAEpC,MAAM,WACJ,kBAAkB,KAAA,IAAY,gBAAgB,MAAM;CAEtD,MAAM,gBAAgB,kBAAkB,KAAA,KAAa,CAAC,CAAC;CACvD,MAAM,CAAC,YAAY,iBAAiBD,MAAM,SAAS,MAAM;CAIzD,MAAM,CAAC,OAAO,YAAYA,M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BAAA,KAHW,UAAUE,qBAAAA,OAAO,KAG5B;EACO;EACL,gBAAa;EACb,aAAW;EACX,eAAa;EACb,WAAW,GACT,ifACA,0FACA,SAAS,QAAQ,WACjB,SAAS,QAAQ,WACjB,wCACA,UACD;EACD,GAAI;EACJ,CAAA;EAEJ;AACF,qBAAqB,cAAc"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import { ClassValue } from "clsx";
|
|
4
|
+
|
|
5
|
+
//#region src/shell/sidebar.d.ts
|
|
6
|
+
type SidebarContextValue = {
|
|
7
|
+
state: "expanded" | "collapsed";
|
|
8
|
+
open: boolean;
|
|
9
|
+
setOpen: (open: boolean) => void;
|
|
10
|
+
openMobile: boolean;
|
|
11
|
+
setOpenMobile: (open: boolean) => void;
|
|
12
|
+
isMobile: boolean;
|
|
13
|
+
toggleSidebar: () => void;
|
|
14
|
+
isPreviewMode: boolean;
|
|
15
|
+
useBottomNav: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare const SidebarContext: React$1.Context<SidebarContextValue | null>;
|
|
18
|
+
declare function useSidebar(): SidebarContextValue;
|
|
19
|
+
declare const SidebarProvider: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & {
|
|
20
|
+
defaultOpen?: boolean;
|
|
21
|
+
open?: boolean;
|
|
22
|
+
onOpenChange?: (open: boolean) => void;
|
|
23
|
+
viewportWidth?: number;
|
|
24
|
+
previewMode?: boolean;
|
|
25
|
+
useBottomNav?: boolean;
|
|
26
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
declare const Sidebar: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & {
|
|
28
|
+
side?: "left" | "right";
|
|
29
|
+
variant?: "sidebar" | "floating" | "inset";
|
|
30
|
+
collapsible?: "offcanvas" | "icon" | "none";
|
|
31
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
32
|
+
declare const SidebarRail: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"button"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
33
|
+
declare const SidebarInset: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"main"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
34
|
+
declare const SidebarInput: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"input"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
35
|
+
declare const SidebarHeader: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
declare const SidebarFooter: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
37
|
+
declare const SidebarSeparator: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & {
|
|
38
|
+
orientation?: "horizontal" | "vertical";
|
|
39
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
40
|
+
declare const SidebarContent: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
declare const SidebarGroup: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
42
|
+
declare const SidebarGroupLabel: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & {
|
|
43
|
+
asChild?: boolean;
|
|
44
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
declare const SidebarGroupAction: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"button"> & {
|
|
46
|
+
asChild?: boolean;
|
|
47
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
48
|
+
declare const SidebarGroupContent: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
49
|
+
declare const SidebarMenu: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"ul"> & React$1.RefAttributes<HTMLUListElement>>;
|
|
50
|
+
declare const SidebarMenuItem: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"li"> & React$1.RefAttributes<HTMLLIElement>>;
|
|
51
|
+
declare const sidebarMenuButtonVariants: (props?: ({
|
|
52
|
+
variant?: "default" | "outline" | null | undefined;
|
|
53
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
54
|
+
} & ({
|
|
55
|
+
class: ClassValue;
|
|
56
|
+
className?: never;
|
|
57
|
+
} | {
|
|
58
|
+
class?: never;
|
|
59
|
+
className: ClassValue;
|
|
60
|
+
} | {
|
|
61
|
+
class?: never;
|
|
62
|
+
className?: never;
|
|
63
|
+
})) | undefined) => string;
|
|
64
|
+
declare const SidebarMenuButton: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"button"> & {
|
|
65
|
+
asChild?: boolean;
|
|
66
|
+
isActive?: boolean;
|
|
67
|
+
} & VariantProps<typeof sidebarMenuButtonVariants> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
68
|
+
declare const SidebarMenuAction: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"button"> & {
|
|
69
|
+
asChild?: boolean;
|
|
70
|
+
showOnHover?: boolean;
|
|
71
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
72
|
+
declare const SidebarMenuBadge: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
73
|
+
declare const SidebarMenuSkeleton: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & {
|
|
74
|
+
showIcon?: boolean;
|
|
75
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
76
|
+
declare const SidebarMenuSub: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"ul"> & React$1.RefAttributes<HTMLUListElement>>;
|
|
77
|
+
declare const SidebarMenuSubItem: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"li"> & React$1.RefAttributes<HTMLLIElement>>;
|
|
78
|
+
declare const SidebarMenuSubButton: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"a"> & {
|
|
79
|
+
asChild?: boolean;
|
|
80
|
+
size?: "sm" | "md";
|
|
81
|
+
isActive?: boolean;
|
|
82
|
+
} & React$1.RefAttributes<HTMLAnchorElement>>;
|
|
83
|
+
//#endregion
|
|
84
|
+
export { Sidebar, SidebarContent, SidebarContext, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, useSidebar };
|
|
85
|
+
//# sourceMappingURL=sidebar.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar.d.cts","names":[],"sources":["../../src/shell/sidebar.tsx"],"mappings":";;;;;KAiEK,mBAAA;EACH,KAAA;EACA,IAAA;EACA,OAAA,GAAU,IAAA;EACV,UAAA;EACA,aAAA,GAAgB,IAAA;EAChB,QAAA;EACA,aAAA;EACA,aAAA;EACA,YAAA;AAAA;AAAA,cAGW,cAAA,EAAgB,OAAA,CAAM,OAAA,CAAQ,mBAAA;AAAA,iBAGlC,UAAA,CAAA,GAAc,mBAAA;AAAA,cAajB,eAAA,EAAiB,OAAA,CAAM,yBAAA,CAC3B,OAAA,CAAM,cAAA;EACJ,WAAA;EACA,IAAA;EACA,YAAA,IAAgB,IAAA;EAChB,aAAA;EACA,WAAA;EACA,YAAA;AAAA,IACE,OAAA,CAAM,aAAA,CAAc,cAAA;AAAA,cA+IpB,OAAA,EAAS,OAAA,CAAM,yBAAA,CACnB,OAAA,CAAM,cAAA;EACJ,IAAA;EACA,OAAA;EACA,WAAA;AAAA,IACE,OAAA,CAAM,aAAA,CAAc,cAAA;AAAA,cAsJpB,WAAA,EAAa,OAAA,CAAM,yBAAA,CAC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A,CAAM,aAAA,CAAc,iBAAA"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import { ClassValue } from "clsx";
|
|
4
|
+
|
|
5
|
+
//#region src/shell/sidebar.d.ts
|
|
6
|
+
type SidebarContextValue = {
|
|
7
|
+
state: "expanded" | "collapsed";
|
|
8
|
+
open: boolean;
|
|
9
|
+
setOpen: (open: boolean) => void;
|
|
10
|
+
openMobile: boolean;
|
|
11
|
+
setOpenMobile: (open: boolean) => void;
|
|
12
|
+
isMobile: boolean;
|
|
13
|
+
toggleSidebar: () => void;
|
|
14
|
+
isPreviewMode: boolean;
|
|
15
|
+
useBottomNav: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare const SidebarContext: React$1.Context<SidebarContextValue | null>;
|
|
18
|
+
declare function useSidebar(): SidebarContextValue;
|
|
19
|
+
declare const SidebarProvider: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & {
|
|
20
|
+
defaultOpen?: boolean;
|
|
21
|
+
open?: boolean;
|
|
22
|
+
onOpenChange?: (open: boolean) => void;
|
|
23
|
+
viewportWidth?: number;
|
|
24
|
+
previewMode?: boolean;
|
|
25
|
+
useBottomNav?: boolean;
|
|
26
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
declare const Sidebar: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & {
|
|
28
|
+
side?: "left" | "right";
|
|
29
|
+
variant?: "sidebar" | "floating" | "inset";
|
|
30
|
+
collapsible?: "offcanvas" | "icon" | "none";
|
|
31
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
32
|
+
declare const SidebarRail: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"button"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
33
|
+
declare const SidebarInset: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"main"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
34
|
+
declare const SidebarInput: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"input"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
35
|
+
declare const SidebarHeader: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
declare const SidebarFooter: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
37
|
+
declare const SidebarSeparator: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & {
|
|
38
|
+
orientation?: "horizontal" | "vertical";
|
|
39
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
40
|
+
declare const SidebarContent: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
declare const SidebarGroup: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
42
|
+
declare const SidebarGroupLabel: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & {
|
|
43
|
+
asChild?: boolean;
|
|
44
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
declare const SidebarGroupAction: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"button"> & {
|
|
46
|
+
asChild?: boolean;
|
|
47
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
48
|
+
declare const SidebarGroupContent: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
49
|
+
declare const SidebarMenu: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"ul"> & React$1.RefAttributes<HTMLUListElement>>;
|
|
50
|
+
declare const SidebarMenuItem: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"li"> & React$1.RefAttributes<HTMLLIElement>>;
|
|
51
|
+
declare const sidebarMenuButtonVariants: (props?: ({
|
|
52
|
+
variant?: "default" | "outline" | null | undefined;
|
|
53
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
54
|
+
} & ({
|
|
55
|
+
class: ClassValue;
|
|
56
|
+
className?: never;
|
|
57
|
+
} | {
|
|
58
|
+
class?: never;
|
|
59
|
+
className: ClassValue;
|
|
60
|
+
} | {
|
|
61
|
+
class?: never;
|
|
62
|
+
className?: never;
|
|
63
|
+
})) | undefined) => string;
|
|
64
|
+
declare const SidebarMenuButton: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"button"> & {
|
|
65
|
+
asChild?: boolean;
|
|
66
|
+
isActive?: boolean;
|
|
67
|
+
} & VariantProps<typeof sidebarMenuButtonVariants> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
68
|
+
declare const SidebarMenuAction: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"button"> & {
|
|
69
|
+
asChild?: boolean;
|
|
70
|
+
showOnHover?: boolean;
|
|
71
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
72
|
+
declare const SidebarMenuBadge: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
73
|
+
declare const SidebarMenuSkeleton: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"div"> & {
|
|
74
|
+
showIcon?: boolean;
|
|
75
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
76
|
+
declare const SidebarMenuSub: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"ul"> & React$1.RefAttributes<HTMLUListElement>>;
|
|
77
|
+
declare const SidebarMenuSubItem: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"li"> & React$1.RefAttributes<HTMLLIElement>>;
|
|
78
|
+
declare const SidebarMenuSubButton: React$1.ForwardRefExoticComponent<React$1.ComponentProps<"a"> & {
|
|
79
|
+
asChild?: boolean;
|
|
80
|
+
size?: "sm" | "md";
|
|
81
|
+
isActive?: boolean;
|
|
82
|
+
} & React$1.RefAttributes<HTMLAnchorElement>>;
|
|
83
|
+
//#endregion
|
|
84
|
+
export { Sidebar, SidebarContent, SidebarContext, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, useSidebar };
|
|
85
|
+
//# sourceMappingURL=sidebar.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar.d.mts","names":[],"sources":["../../src/shell/sidebar.tsx"],"mappings":";;;;;KAiEK,mBAAA;EACH,KAAA;EACA,IAAA;EACA,OAAA,GAAU,IAAA;EACV,UAAA;EACA,aAAA,GAAgB,IAAA;EAChB,QAAA;EACA,aAAA;EACA,aAAA;EACA,YAAA;AAAA;AAAA,cAGW,cAAA,EAAgB,OAAA,CAAM,OAAA,CAAQ,mBAAA;AAAA,iBAGlC,UAAA,CAAA,GAAc,mBAAA;AAAA,cAajB,eAAA,EAAiB,OAAA,CAAM,yBAAA,CAC3B,OAAA,CAAM,cAAA;EACJ,WAAA;EACA,IAAA;EACA,YAAA,IAAgB,IAAA;EAChB,aAAA;EACA,WAAA;EACA,YAAA;AAAA,IACE,OAAA,CAAM,aAAA,CAAc,cAAA;AAAA,cA+IpB,OAAA,EAAS,OAAA,CAAM,yBAAA,CACnB,OAAA,CAAM,cAAA;EACJ,IAAA;EACA,OAAA;EACA,WAAA;AAAA,IACE,OAAA,CAAM,aAAA,CAAc,cAAA;AAAA,cAsJpB,WAAA,EAAa,OAAA,CAAM,yBAAA,CACvB,OAAA,CAAM,cAAA,aAA2B,OAAA,CAAM,aAAA,CAAc,iBAAA;AAAA,cAiCjD,YAAA,EAAc,OAAA,CAAM,yBAAA,CACxB,OAAA,CAAM,cAAA,WAAyB,OAAA,CAAM,aAAA,CAAc,cAAA;AAAA,cA0B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