@codefast/ui 0.3.9 → 0.3.10
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/CHANGELOG.md +11 -0
- package/dist/components/accordion.cjs +97 -1
- package/dist/components/accordion.d.ts +4 -4
- package/dist/components/accordion.js +51 -1
- package/dist/components/alert-dialog.cjs +155 -1
- package/dist/components/alert-dialog.d.ts +11 -11
- package/dist/components/alert-dialog.js +94 -1
- package/dist/components/alert.cjs +84 -1
- package/dist/components/alert.d.ts +5 -5
- package/dist/components/alert.js +41 -1
- package/dist/components/aspect-ratio.cjs +43 -1
- package/dist/components/aspect-ratio.d.ts +2 -2
- package/dist/components/aspect-ratio.js +9 -1
- package/dist/components/avatar.cjs +65 -1
- package/dist/components/avatar.d.ts +2 -2
- package/dist/components/avatar.js +25 -1
- package/dist/components/badge.cjs +66 -1
- package/dist/components/badge.d.ts +3 -3
- package/dist/components/badge.js +29 -1
- package/dist/components/breadcrumb.cjs +126 -1
- package/dist/components/breadcrumb.d.ts +8 -8
- package/dist/components/breadcrumb.js +74 -1
- package/dist/components/button-group.cjs +86 -1
- package/dist/components/button-group.d.ts +5 -5
- package/dist/components/button-group.js +43 -1
- package/dist/components/button.cjs +92 -1
- package/dist/components/button.d.ts +6 -6
- package/dist/components/button.js +55 -1
- package/dist/components/calendar.cjs +150 -1
- package/dist/components/calendar.d.ts +12 -19
- package/dist/components/calendar.js +113 -1
- package/dist/components/card.cjs +105 -1
- package/dist/components/card.d.ts +8 -8
- package/dist/components/card.js +53 -1
- package/dist/components/carousel.cjs +210 -1
- package/dist/components/carousel.d.ts +10 -10
- package/dist/components/carousel.js +151 -1
- package/dist/components/chart.cjs +250 -3
- package/dist/components/chart.d.ts +9 -9
- package/dist/components/chart.js +198 -3
- package/dist/components/checkbox-cards.cjs +69 -1
- package/dist/components/checkbox-cards.d.ts +2 -2
- package/dist/components/checkbox-cards.js +32 -1
- package/dist/components/checkbox-group.cjs +63 -1
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +26 -1
- package/dist/components/checkbox.cjs +53 -1
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +19 -1
- package/dist/components/collapsible.cjs +61 -1
- package/dist/components/collapsible.d.ts +2 -2
- package/dist/components/collapsible.js +21 -1
- package/dist/components/command.cjs +167 -1
- package/dist/components/command.d.ts +4 -4
- package/dist/components/command.js +106 -1
- package/dist/components/context-menu.cjs +218 -1
- package/dist/components/context-menu.d.ts +4 -4
- package/dist/components/context-menu.js +142 -1
- package/dist/components/dialog.cjs +164 -1
- package/dist/components/dialog.d.ts +10 -10
- package/dist/components/dialog.js +106 -1
- package/dist/components/drawer.cjs +143 -1
- package/dist/components/drawer.d.ts +9 -9
- package/dist/components/drawer.js +85 -1
- package/dist/components/dropdown-menu.cjs +221 -1
- package/dist/components/dropdown-menu.d.ts +4 -4
- package/dist/components/dropdown-menu.js +145 -1
- package/dist/components/empty.cjs +113 -1
- package/dist/components/empty.d.ts +9 -9
- package/dist/components/empty.js +61 -1
- package/dist/components/field.cjs +193 -1
- package/dist/components/field.d.ts +14 -14
- package/dist/components/field.js +129 -1
- package/dist/components/form.cjs +151 -1
- package/dist/components/form.d.ts +10 -10
- package/dist/components/form.js +96 -1
- package/dist/components/hover-card.cjs +77 -1
- package/dist/components/hover-card.d.ts +2 -2
- package/dist/components/hover-card.js +34 -1
- package/dist/components/input-group.cjs +155 -1
- package/dist/components/input-group.d.ts +15 -15
- package/dist/components/input-group.js +97 -1
- package/dist/components/input-number.cjs +98 -1
- package/dist/components/input-number.d.ts +2 -2
- package/dist/components/input-number.js +64 -1
- package/dist/components/input-otp.cjs +101 -1
- package/dist/components/input-otp.d.ts +6 -6
- package/dist/components/input-otp.js +49 -1
- package/dist/components/input-password.cjs +71 -1
- package/dist/components/input-password.d.ts +3 -3
- package/dist/components/input-password.js +37 -1
- package/dist/components/input-search.cjs +80 -1
- package/dist/components/input-search.d.ts +3 -3
- package/dist/components/input-search.js +46 -1
- package/dist/components/input.cjs +45 -1
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +11 -1
- package/dist/components/item.cjs +186 -1
- package/dist/components/item.d.ts +12 -12
- package/dist/components/item.js +119 -1
- package/dist/components/kbd.cjs +54 -1
- package/dist/components/kbd.d.ts +3 -3
- package/dist/components/kbd.js +17 -1
- package/dist/components/label.cjs +45 -1
- package/dist/components/label.d.ts +2 -2
- package/dist/components/label.js +11 -1
- package/dist/components/menubar.cjs +232 -1
- package/dist/components/menubar.d.ts +4 -4
- package/dist/components/menubar.js +153 -1
- package/dist/components/native-select.cjs +75 -1
- package/dist/components/native-select.d.ts +4 -4
- package/dist/components/native-select.js +35 -1
- package/dist/components/navigation-menu.cjs +146 -2
- package/dist/components/navigation-menu.d.ts +2 -2
- package/dist/components/navigation-menu.js +94 -2
- package/dist/components/pagination.cjs +138 -1
- package/dist/components/pagination.d.ts +10 -10
- package/dist/components/pagination.js +86 -1
- package/dist/components/popover.cjs +86 -1
- package/dist/components/popover.d.ts +3 -3
- package/dist/components/popover.js +40 -1
- package/dist/components/progress-circle.cjs +184 -1
- package/dist/components/progress-circle.d.ts +5 -5
- package/dist/components/progress-circle.js +147 -1
- package/dist/components/progress.cjs +52 -1
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/progress.js +18 -1
- package/dist/components/radio-cards.cjs +66 -1
- package/dist/components/radio-cards.d.ts +2 -2
- package/dist/components/radio-cards.js +29 -1
- package/dist/components/radio-group.cjs +59 -1
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +22 -1
- package/dist/components/radio.cjs +47 -1
- package/dist/components/radio.d.ts +2 -2
- package/dist/components/radio.js +13 -1
- package/dist/components/resizable.cjs +71 -1
- package/dist/components/resizable.d.ts +8 -8
- package/dist/components/resizable.js +31 -1
- package/dist/components/scroll-area.cjs +140 -1
- package/dist/components/scroll-area.d.ts +5 -5
- package/dist/components/scroll-area.js +100 -1
- package/dist/components/select.cjs +180 -1
- package/dist/components/select.d.ts +5 -5
- package/dist/components/select.js +119 -1
- package/dist/components/separator.cjs +82 -1
- package/dist/components/separator.d.ts +5 -5
- package/dist/components/separator.js +42 -1
- package/dist/components/sheet.cjs +184 -1
- package/dist/components/sheet.d.ts +9 -9
- package/dist/components/sheet.js +123 -1
- package/dist/components/sidebar.cjs +506 -1
- package/dist/components/sidebar.d.ts +31 -31
- package/dist/components/sidebar.js +400 -1
- package/dist/components/skeleton.cjs +44 -1
- package/dist/components/skeleton.d.ts +2 -2
- package/dist/components/skeleton.js +10 -1
- package/dist/components/slider.cjs +79 -1
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +45 -1
- package/dist/components/sonner.cjs +57 -1
- package/dist/components/sonner.d.ts +3 -3
- package/dist/components/sonner.js +17 -1
- package/dist/components/spinner.cjs +75 -1
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/spinner.js +41 -1
- package/dist/components/switch.cjs +49 -1
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +15 -1
- package/dist/components/table.cjs +118 -1
- package/dist/components/table.d.ts +9 -9
- package/dist/components/table.js +63 -1
- package/dist/components/tabs.cjs +75 -1
- package/dist/components/tabs.d.ts +3 -3
- package/dist/components/tabs.js +32 -1
- package/dist/components/textarea.cjs +44 -1
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/textarea.js +10 -1
- package/dist/components/toggle-group.cjs +90 -1
- package/dist/components/toggle-group.d.ts +10 -12
- package/dist/components/toggle-group.js +53 -1
- package/dist/components/toggle.cjs +71 -1
- package/dist/components/toggle.d.ts +10 -12
- package/dist/components/toggle.js +34 -1
- package/dist/components/tooltip.cjs +90 -1
- package/dist/components/tooltip.d.ts +3 -3
- package/dist/components/tooltip.js +44 -1
- package/dist/css/amber.css +95 -1
- package/dist/css/blue.css +95 -1
- package/dist/css/cyan.css +95 -1
- package/dist/css/emerald.css +95 -1
- package/dist/css/fuchsia.css +95 -1
- package/dist/css/gray.css +95 -1
- package/dist/css/green.css +95 -1
- package/dist/css/indigo.css +95 -1
- package/dist/css/lime.css +95 -1
- package/dist/css/neutral.css +95 -1
- package/dist/css/orange.css +95 -1
- package/dist/css/pink.css +95 -1
- package/dist/css/preset.css +118 -1
- package/dist/css/purple.css +95 -1
- package/dist/css/red.css +95 -1
- package/dist/css/rose.css +95 -1
- package/dist/css/sky.css +95 -1
- package/dist/css/slate.css +95 -1
- package/dist/css/stone.css +95 -1
- package/dist/css/style.css +3 -1
- package/dist/css/teal.css +95 -1
- package/dist/css/violet.css +95 -1
- package/dist/css/yellow.css +95 -1
- package/dist/css/zinc.css +95 -1
- package/dist/hooks/use-animated-value.cjs +74 -1
- package/dist/hooks/use-animated-value.d.ts +9 -10
- package/dist/hooks/use-animated-value.js +40 -1
- package/dist/hooks/use-copy-to-clipboard.cjs +57 -1
- package/dist/hooks/use-copy-to-clipboard.d.ts +18 -1
- package/dist/hooks/use-copy-to-clipboard.js +23 -1
- package/dist/hooks/use-is-mobile.cjs +39 -1
- package/dist/hooks/use-is-mobile.d.ts +15 -6
- package/dist/hooks/use-is-mobile.js +5 -1
- package/dist/hooks/use-media-query.cjs +56 -1
- package/dist/hooks/use-media-query.d.ts +11 -3
- package/dist/hooks/use-media-query.js +22 -1
- package/dist/hooks/use-mutation-observer.cjs +56 -1
- package/dist/hooks/use-mutation-observer.d.ts +8 -12
- package/dist/hooks/use-mutation-observer.js +22 -1
- package/dist/hooks/use-pagination.cjs +92 -1
- package/dist/hooks/use-pagination.d.ts +12 -10
- package/dist/hooks/use-pagination.js +55 -1
- package/dist/index.cjs +1081 -1
- package/dist/index.d.ts +130 -131
- package/dist/index.js +69 -1
- package/dist/primitives/checkbox-group.cjs +151 -1
- package/dist/primitives/checkbox-group.d.ts +11 -11
- package/dist/primitives/checkbox-group.js +99 -1
- package/dist/primitives/input-number.cjs +439 -1
- package/dist/primitives/input-number.d.ts +8 -8
- package/dist/primitives/input-number.js +381 -1
- package/dist/primitives/input.cjs +99 -1
- package/dist/primitives/input.d.ts +4 -4
- package/dist/primitives/input.js +53 -1
- package/dist/primitives/progress-circle.cjs +198 -1
- package/dist/primitives/progress-circle.d.ts +7 -7
- package/dist/primitives/progress-circle.js +128 -1
- package/package.json +385 -38
|
@@ -1,2 +1,507 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
"use client";
|
|
2
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,a)=>{for(var t in a)__webpack_require__.o(a,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},__webpack_require__.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SidebarFooter:()=>SidebarFooter,SidebarMenuSub:()=>SidebarMenuSub,SidebarMenuSubButton:()=>SidebarMenuSubButton,SidebarProvider:()=>SidebarProvider,SidebarContent:()=>SidebarContent,SidebarGroupAction:()=>SidebarGroupAction,SidebarHeader:()=>SidebarHeader,SidebarMenuBadge:()=>SidebarMenuBadge,SidebarMenuSkeleton:()=>SidebarMenuSkeleton,SidebarMenu:()=>SidebarMenu,Sidebar:()=>Sidebar,SidebarSeparator:()=>SidebarSeparator,SidebarTrigger:()=>SidebarTrigger,SidebarGroupContent:()=>SidebarGroupContent,SidebarMenuItem:()=>SidebarMenuItem,SidebarGroupLabel:()=>SidebarGroupLabel,sidebarMenuButtonVariants:()=>sidebarMenuButtonVariants,useSidebar:()=>useSidebar,SidebarInput:()=>SidebarInput,SidebarMenuButton:()=>SidebarMenuButton,SidebarInset:()=>SidebarInset,SidebarMenuAction:()=>SidebarMenuAction,SidebarMenuSubItem:()=>SidebarMenuSubItem,SidebarRail:()=>SidebarRail,SidebarGroup:()=>SidebarGroup});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_lucide_react_namespaceObject=require("lucide-react"),external_react_namespaceObject=require("react"),external_button_cjs_namespaceObject=require("./button.cjs"),external_input_cjs_namespaceObject=require("./input.cjs"),external_separator_cjs_namespaceObject=require("./separator.cjs"),external_sheet_cjs_namespaceObject=require("./sheet.cjs"),external_skeleton_cjs_namespaceObject=require("./skeleton.cjs"),external_tooltip_cjs_namespaceObject=require("./tooltip.cjs"),use_is_mobile_cjs_namespaceObject=require("../hooks/use-is-mobile.cjs"),tailwind_variants_namespaceObject=require("@codefast/tailwind-variants"),react_context_namespaceObject=require("@radix-ui/react-context"),react_slot_namespaceObject=require("@radix-ui/react-slot"),sidebarMenuButtonVariants=(0,tailwind_variants_namespaceObject.tv)({base:"peer/menu-button outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground group-has-data-[sidebar=menu-action]/menu-item:pr-8 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-3 flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm transition-[width,height,padding] 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",defaultVariants:{size:"md",variant:"default"},variants:{size:{sm:"h-7 text-xs",md:"h-8 text-sm",lg:"group-data-[collapsible=icon]:p-0! h-12 text-sm"},variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"}}}),SIDEBAR_COOKIE_NAME="sidebar_state",SIDEBAR_COOKIE_MAX_AGE=604800,SIDEBAR_WIDTH="16rem",SIDEBAR_WIDTH_MOBILE="18rem",SIDEBAR_WIDTH_ICON="3.0625rem",SIDEBAR_KEYBOARD_SHORTCUT="b",SIDEBAR_PROVIDER_NAME="SidebarProvider",[SidebarContextProvider,useSidebar]=(0,react_context_namespaceObject.createContext)("SidebarProvider");function SidebarProvider({children:e,className:a,defaultOpen:t=!0,onOpenChange:r,open:i,style:n,...s}){let d=(0,use_is_mobile_cjs_namespaceObject.useIsMobile)(),[o,c]=(0,external_react_namespaceObject.useState)(!1),[b,l]=(0,external_react_namespaceObject.useState)(t),u=i??b,_=(0,external_react_namespaceObject.useCallback)(e=>{let a="function"==typeof e?e(u):e;r?r(a):l(a),document.cookie=`sidebar_state=${a.toString()}; path=/; max-age=604800`},[r,u]),p=(0,external_react_namespaceObject.useCallback)(()=>{d?c(e=>!e):_(e=>!e)},[d,_]);(0,external_react_namespaceObject.useEffect)(()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),p())};return globalThis.addEventListener("keydown",e),()=>{globalThis.removeEventListener("keydown",e)}},[p]);let m=u?"expanded":"collapsed";return(0,jsx_runtime_namespaceObject.jsx)(SidebarContextProvider,{isMobile:d,open:u,openMobile:o,setOpen:_,setOpenMobile:c,state:m,toggleSidebar:p,children:(0,jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipProvider,{delayDuration:0,children:(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,tailwind_variants_namespaceObject.cn)("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",a),"data-slot":"sidebar-wrapper",style:{"--sidebar-width":"16rem","--sidebar-width-icon":"3.0625rem",...n},...s,children:e})})})}const SIDEBAR_NAME="Sidebar";function Sidebar({children:e,className:a,collapsible:t="offcanvas",side:r="left",variant:i="sidebar",...n}){let{isMobile:s,openMobile:d,setOpenMobile:o,state:c}=useSidebar("Sidebar");return"none"===t?(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,tailwind_variants_namespaceObject.cn)("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),"data-slot":"sidebar",...n,children:e}):s?(0,jsx_runtime_namespaceObject.jsx)(external_sheet_cjs_namespaceObject.Sheet,{open:d,onOpenChange:o,...n,children:(0,jsx_runtime_namespaceObject.jsxs)(external_sheet_cjs_namespaceObject.SheetContent,{className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar","data-slot":"sidebar",side:r,style:{"--sidebar-width":"18rem"},children:[(0,jsx_runtime_namespaceObject.jsxs)(external_sheet_cjs_namespaceObject.SheetHeader,{className:"sr-only",children:[(0,jsx_runtime_namespaceObject.jsx)(external_sheet_cjs_namespaceObject.SheetTitle,{children:"Sidebar"}),(0,jsx_runtime_namespaceObject.jsx)(external_sheet_cjs_namespaceObject.SheetDescription,{children:"Displays the mobile sidebar."})]}),(0,jsx_runtime_namespaceObject.jsx)("div",{className:"flex h-full w-full flex-col",children:e})]})}):(0,jsx_runtime_namespaceObject.jsxs)("div",{className:(0,tailwind_variants_namespaceObject.cn)("text-sidebar-foreground group peer hidden md:block",a),"data-collapsible":"collapsed"===c?t:"","data-side":r,"data-slot":"sidebar","data-state":c,"data-variant":i,children:[(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,tailwind_variants_namespaceObject.cn)("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear group-data-[collapsible=offcanvas]:w-0 group-data-[side=right]:rotate-180","floating"===i||"inset"===i?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)"),"data-slot":"sidebar-gap"}),(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,tailwind_variants_namespaceObject.cn)("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex","left"===r?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===i||"inset"===i?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",a),"data-slot":"sidebar-container",...n,children:(0,jsx_runtime_namespaceObject.jsx)("div",{className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm","data-sidebar":"sidebar","data-slot":"sidebar-inner",children:e})})]})}const SIDEBAR_TRIGGER_NAME="SidebarTrigger";function SidebarTrigger({className:e,onClick:a,...t}){let{toggleSidebar:r}=useSidebar("SidebarTrigger");return(0,jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button,{className:(0,tailwind_variants_namespaceObject.cn)("size-7",e),"data-sidebar":"trigger","data-slot":"sidebar-trigger",size:"icon",variant:"ghost",onClick:e=>{a?.(e),r()},...t,children:[(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.PanelLeftIcon,{}),(0,jsx_runtime_namespaceObject.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})}const SIDEBAR_RAIL_NAME="SidebarRail";function SidebarRail({className:e,...a}){let{toggleSidebar:t}=useSidebar("SidebarRail");return(0,jsx_runtime_namespaceObject.jsx)("button",{className:(0,tailwind_variants_namespaceObject.cn)("hover:after:bg-sidebar-border hover:group-data-[collapsible=offcanvas]:bg-sidebar absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[collapsible=offcanvas]:translate-x-0 group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] group-data-[collapsible=offcanvas]:after:left-full in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize sm:flex [[data-side=left][data-collapsible=offcanvas]_&]:-right-2 [[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-collapsible=offcanvas]_&]:-left-2 [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",e),"data-sidebar":"rail","data-slot":"sidebar-rail",title:"Toggle Sidebar",type:"button",onClick:t,...a})}function SidebarInset({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("main",{className:(0,tailwind_variants_namespaceObject.cn)("bg-background relative flex w-full min-w-0 flex-1 flex-col 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",e),"data-slot":"sidebar-inset",...a})}function SidebarInput({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)(external_input_cjs_namespaceObject.Input,{className:(0,tailwind_variants_namespaceObject.cn)("bg-background h-8 w-full shadow-none",e),"data-sidebar":"input","data-slot":"sidebar-input",...a})}function SidebarHeader({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,tailwind_variants_namespaceObject.cn)("flex flex-col gap-2 p-2",e),"data-sidebar":"header","data-slot":"sidebar-header",...a})}function SidebarFooter({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,tailwind_variants_namespaceObject.cn)("flex flex-col gap-2 p-2",e),"data-sidebar":"footer","data-slot":"sidebar-footer",...a})}function SidebarSeparator({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)(external_separator_cjs_namespaceObject.Separator,{className:(0,tailwind_variants_namespaceObject.cn)("bg-sidebar-border mx-2 w-auto",e),"data-sidebar":"separator","data-slot":"sidebar-separator",...a})}function SidebarContent({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,tailwind_variants_namespaceObject.cn)("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),"data-sidebar":"content","data-slot":"sidebar-content",...a})}function SidebarGroup({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,tailwind_variants_namespaceObject.cn)("relative flex w-full min-w-0 flex-col p-2",e),"data-sidebar":"group","data-slot":"sidebar-group",...a})}function SidebarGroupLabel({asChild:e=!1,className:a,...t}){let r=e?react_slot_namespaceObject.Slot:"div";return(0,jsx_runtime_namespaceObject.jsx)(r,{className:(0,tailwind_variants_namespaceObject.cn)("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center truncate rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-3 [&>svg]:size-4 [&>svg]:shrink-0",a),"data-sidebar":"group-label","data-slot":"sidebar-group-label",...t})}function SidebarGroupAction({asChild:e=!1,className:a,...t}){let r=e?react_slot_namespaceObject.Slot:"button";return(0,jsx_runtime_namespaceObject.jsx)(r,{className:(0,tailwind_variants_namespaceObject.cn)("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 group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 focus-visible:ring-3 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",a),"data-sidebar":"group-action","data-slot":"sidebar-group-action",...t})}function SidebarGroupContent({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,tailwind_variants_namespaceObject.cn)("w-full text-sm",e),"data-sidebar":"group-content","data-slot":"sidebar-group-content",...a})}function SidebarMenu({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("ul",{className:(0,tailwind_variants_namespaceObject.cn)("flex w-full min-w-0 flex-col gap-1",e),"data-sidebar":"menu","data-slot":"sidebar-menu",...a})}function SidebarMenuItem({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("li",{className:(0,tailwind_variants_namespaceObject.cn)("group/menu-item relative",e),"data-sidebar":"menu-item","data-slot":"sidebar-menu-item",...a})}const SIDEBAR_MENU_BUTTON_NAME="SidebarMenuButton";function SidebarMenuButton({asChild:e=!1,className:a,isActive:t=!1,size:r="md",tooltip:i,variant:n="default",...s}){let d=e?react_slot_namespaceObject.Slot:"button",{isMobile:o,state:c}=useSidebar("SidebarMenuButton"),b=(0,jsx_runtime_namespaceObject.jsx)(d,{className:(0,tailwind_variants_namespaceObject.cn)(sidebarMenuButtonVariants({size:r,variant:n}),a),"data-active":t,"data-sidebar":"menu-button","data-size":r,"data-slot":"sidebar-menu-button",...s});return i?("string"==typeof i&&(i={children:i}),(0,jsx_runtime_namespaceObject.jsxs)(external_tooltip_cjs_namespaceObject.Tooltip,{children:[(0,jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipTrigger,{asChild:!0,children:b}),(0,jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipContent,{align:"center",hidden:"collapsed"!==c||o,side:"right",...i})]})):b}function SidebarMenuAction({asChild:e=!1,className:a,showOnHover:t=!1,...r}){let i=e?react_slot_namespaceObject.Slot:"button";return(0,jsx_runtime_namespaceObject.jsx)(i,{className:(0,tailwind_variants_namespaceObject.cn)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button: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 group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 focus-visible:ring-3 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",t&&"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",a),"data-sidebar":"menu-action","data-slot":"sidebar-menu-action",...r})}function SidebarMenuBadge({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,tailwind_variants_namespaceObject.cn)("text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-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 group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1",e),"data-sidebar":"menu-badge","data-slot":"sidebar-menu-badge",...a})}function SidebarMenuSkeleton({className:e,showIcon:a=!1,...t}){let[r]=(0,external_react_namespaceObject.useState)(()=>`${String(Math.floor(40*Math.random())+50)}%`);return(0,jsx_runtime_namespaceObject.jsxs)("div",{className:(0,tailwind_variants_namespaceObject.cn)("flex h-8 items-center gap-2 rounded-md px-2",e),"data-sidebar":"menu-skeleton","data-slot":"sidebar-menu-skeleton",...t,children:[a?(0,jsx_runtime_namespaceObject.jsx)(external_skeleton_cjs_namespaceObject.Skeleton,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}):null,(0,jsx_runtime_namespaceObject.jsx)(external_skeleton_cjs_namespaceObject.Skeleton,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})}function SidebarMenuSub({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("ul",{className:(0,tailwind_variants_namespaceObject.cn)("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",e),"data-sidebar":"menu-sub","data-slot":"sidebar-menu-sub",...a})}function SidebarMenuSubItem({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("li",{className:(0,tailwind_variants_namespaceObject.cn)("group/menu-sub-item relative",e),"data-sidebar":"menu-sub-item","data-slot":"sidebar-menu-sub-item",...a})}function SidebarMenuSubButton({asChild:e=!1,className:a,isActive:t=!1,size:r="md",...i}){let n=e?react_slot_namespaceObject.Slot:"a";return(0,jsx_runtime_namespaceObject.jsx)(n,{className:(0,tailwind_variants_namespaceObject.cn)("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 data-[active=true]:bg-sidebar-accent data-[active=true]: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-3 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","sm"===r&&"text-xs","md"===r&&"text-sm","group-data-[collapsible=icon]:hidden",a),"data-active":t,"data-sidebar":"menu-sub-button","data-size":r,"data-slot":"sidebar-menu-sub-button",...i})}for(var __webpack_i__ in exports.Sidebar=__webpack_exports__.Sidebar,exports.SidebarContent=__webpack_exports__.SidebarContent,exports.SidebarFooter=__webpack_exports__.SidebarFooter,exports.SidebarGroup=__webpack_exports__.SidebarGroup,exports.SidebarGroupAction=__webpack_exports__.SidebarGroupAction,exports.SidebarGroupContent=__webpack_exports__.SidebarGroupContent,exports.SidebarGroupLabel=__webpack_exports__.SidebarGroupLabel,exports.SidebarHeader=__webpack_exports__.SidebarHeader,exports.SidebarInput=__webpack_exports__.SidebarInput,exports.SidebarInset=__webpack_exports__.SidebarInset,exports.SidebarMenu=__webpack_exports__.SidebarMenu,exports.SidebarMenuAction=__webpack_exports__.SidebarMenuAction,exports.SidebarMenuBadge=__webpack_exports__.SidebarMenuBadge,exports.SidebarMenuButton=__webpack_exports__.SidebarMenuButton,exports.SidebarMenuItem=__webpack_exports__.SidebarMenuItem,exports.SidebarMenuSkeleton=__webpack_exports__.SidebarMenuSkeleton,exports.SidebarMenuSub=__webpack_exports__.SidebarMenuSub,exports.SidebarMenuSubButton=__webpack_exports__.SidebarMenuSubButton,exports.SidebarMenuSubItem=__webpack_exports__.SidebarMenuSubItem,exports.SidebarProvider=__webpack_exports__.SidebarProvider,exports.SidebarRail=__webpack_exports__.SidebarRail,exports.SidebarSeparator=__webpack_exports__.SidebarSeparator,exports.SidebarTrigger=__webpack_exports__.SidebarTrigger,exports.sidebarMenuButtonVariants=__webpack_exports__.sidebarMenuButtonVariants,exports.useSidebar=__webpack_exports__.useSidebar,__webpack_exports__)-1===["Sidebar","SidebarContent","SidebarFooter","SidebarGroup","SidebarGroupAction","SidebarGroupContent","SidebarGroupLabel","SidebarHeader","SidebarInput","SidebarInset","SidebarMenu","SidebarMenuAction","SidebarMenuBadge","SidebarMenuButton","SidebarMenuItem","SidebarMenuSkeleton","SidebarMenuSub","SidebarMenuSubButton","SidebarMenuSubItem","SidebarProvider","SidebarRail","SidebarSeparator","SidebarTrigger","sidebarMenuButtonVariants","useSidebar"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
17
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var __webpack_exports__ = {};
|
|
26
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
+
SidebarFooter: ()=>SidebarFooter,
|
|
29
|
+
SidebarMenuSub: ()=>SidebarMenuSub,
|
|
30
|
+
SidebarMenuSubButton: ()=>SidebarMenuSubButton,
|
|
31
|
+
SidebarProvider: ()=>SidebarProvider,
|
|
32
|
+
SidebarContent: ()=>SidebarContent,
|
|
33
|
+
SidebarGroupAction: ()=>SidebarGroupAction,
|
|
34
|
+
SidebarHeader: ()=>SidebarHeader,
|
|
35
|
+
SidebarMenuBadge: ()=>SidebarMenuBadge,
|
|
36
|
+
SidebarMenuSkeleton: ()=>SidebarMenuSkeleton,
|
|
37
|
+
SidebarMenu: ()=>SidebarMenu,
|
|
38
|
+
Sidebar: ()=>Sidebar,
|
|
39
|
+
SidebarSeparator: ()=>SidebarSeparator,
|
|
40
|
+
SidebarTrigger: ()=>SidebarTrigger,
|
|
41
|
+
SidebarGroupContent: ()=>SidebarGroupContent,
|
|
42
|
+
SidebarMenuItem: ()=>SidebarMenuItem,
|
|
43
|
+
SidebarGroupLabel: ()=>SidebarGroupLabel,
|
|
44
|
+
sidebarMenuButtonVariants: ()=>sidebarMenuButtonVariants,
|
|
45
|
+
useSidebar: ()=>useSidebar,
|
|
46
|
+
SidebarInput: ()=>SidebarInput,
|
|
47
|
+
SidebarMenuButton: ()=>SidebarMenuButton,
|
|
48
|
+
SidebarInset: ()=>SidebarInset,
|
|
49
|
+
SidebarMenuAction: ()=>SidebarMenuAction,
|
|
50
|
+
SidebarMenuSubItem: ()=>SidebarMenuSubItem,
|
|
51
|
+
SidebarRail: ()=>SidebarRail,
|
|
52
|
+
SidebarGroup: ()=>SidebarGroup
|
|
53
|
+
});
|
|
54
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
55
|
+
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
56
|
+
const react_context_namespaceObject = require("@radix-ui/react-context");
|
|
57
|
+
const react_slot_namespaceObject = require("@radix-ui/react-slot");
|
|
58
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
59
|
+
const external_react_namespaceObject = require("react");
|
|
60
|
+
const external_button_cjs_namespaceObject = require("./button.cjs");
|
|
61
|
+
const external_input_cjs_namespaceObject = require("./input.cjs");
|
|
62
|
+
const external_separator_cjs_namespaceObject = require("./separator.cjs");
|
|
63
|
+
const external_sheet_cjs_namespaceObject = require("./sheet.cjs");
|
|
64
|
+
const external_skeleton_cjs_namespaceObject = require("./skeleton.cjs");
|
|
65
|
+
const external_tooltip_cjs_namespaceObject = require("./tooltip.cjs");
|
|
66
|
+
const use_is_mobile_cjs_namespaceObject = require("../hooks/use-is-mobile.cjs");
|
|
67
|
+
const sidebarMenuButtonVariants = (0, tailwind_variants_namespaceObject.tv)({
|
|
68
|
+
base: 'peer/menu-button outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground group-has-data-[sidebar=menu-action]/menu-item:pr-8 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-3 flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm transition-[width,height,padding] 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',
|
|
69
|
+
defaultVariants: {
|
|
70
|
+
size: 'md',
|
|
71
|
+
variant: 'default'
|
|
72
|
+
},
|
|
73
|
+
variants: {
|
|
74
|
+
size: {
|
|
75
|
+
sm: 'h-7 text-xs',
|
|
76
|
+
md: 'h-8 text-sm',
|
|
77
|
+
lg: 'group-data-[collapsible=icon]:p-0! h-12 text-sm'
|
|
78
|
+
},
|
|
79
|
+
variant: {
|
|
80
|
+
default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
|
|
81
|
+
outline: 'bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]'
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
const SIDEBAR_COOKIE_NAME = 'sidebar_state';
|
|
86
|
+
const SIDEBAR_COOKIE_MAX_AGE = 604800;
|
|
87
|
+
const SIDEBAR_WIDTH = '16rem';
|
|
88
|
+
const SIDEBAR_WIDTH_MOBILE = '18rem';
|
|
89
|
+
const SIDEBAR_WIDTH_ICON = '3.0625rem';
|
|
90
|
+
const SIDEBAR_KEYBOARD_SHORTCUT = 'b';
|
|
91
|
+
const SIDEBAR_PROVIDER_NAME = 'SidebarProvider';
|
|
92
|
+
const [SidebarContextProvider, useSidebar] = (0, react_context_namespaceObject.createContext)(SIDEBAR_PROVIDER_NAME);
|
|
93
|
+
function SidebarProvider({ children, className, defaultOpen = true, onOpenChange: setOpenProperty, open: openProperty, style, ...props }) {
|
|
94
|
+
const isMobile = (0, use_is_mobile_cjs_namespaceObject.useIsMobile)();
|
|
95
|
+
const [openMobile, setOpenMobile] = (0, external_react_namespaceObject.useState)(false);
|
|
96
|
+
const [isOpen, setIsOpen] = (0, external_react_namespaceObject.useState)(defaultOpen);
|
|
97
|
+
const open = openProperty ?? isOpen;
|
|
98
|
+
const setOpen = (0, external_react_namespaceObject.useCallback)((value)=>{
|
|
99
|
+
const openState = 'function' == typeof value ? value(open) : value;
|
|
100
|
+
if (setOpenProperty) setOpenProperty(openState);
|
|
101
|
+
else setIsOpen(openState);
|
|
102
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState.toString()}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE.toString()}`;
|
|
103
|
+
}, [
|
|
104
|
+
setOpenProperty,
|
|
105
|
+
open
|
|
106
|
+
]);
|
|
107
|
+
const toggleSidebar = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
108
|
+
if (isMobile) setOpenMobile((currentValue)=>!currentValue);
|
|
109
|
+
else setOpen((currentValue)=>!currentValue);
|
|
110
|
+
}, [
|
|
111
|
+
isMobile,
|
|
112
|
+
setOpen
|
|
113
|
+
]);
|
|
114
|
+
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
115
|
+
const handleKeyDown = (event)=>{
|
|
116
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
117
|
+
event.preventDefault();
|
|
118
|
+
toggleSidebar();
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
window.addEventListener('keydown', handleKeyDown);
|
|
122
|
+
return ()=>{
|
|
123
|
+
window.removeEventListener('keydown', handleKeyDown);
|
|
124
|
+
};
|
|
125
|
+
}, [
|
|
126
|
+
toggleSidebar
|
|
127
|
+
]);
|
|
128
|
+
const state = open ? 'expanded' : 'collapsed';
|
|
129
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SidebarContextProvider, {
|
|
130
|
+
isMobile: isMobile,
|
|
131
|
+
open: open,
|
|
132
|
+
openMobile: openMobile,
|
|
133
|
+
setOpen: setOpen,
|
|
134
|
+
setOpenMobile: setOpenMobile,
|
|
135
|
+
state: state,
|
|
136
|
+
toggleSidebar: toggleSidebar,
|
|
137
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipProvider, {
|
|
138
|
+
delayDuration: 0,
|
|
139
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
140
|
+
className: (0, tailwind_variants_namespaceObject.cn)('group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full', className),
|
|
141
|
+
"data-slot": "sidebar-wrapper",
|
|
142
|
+
style: {
|
|
143
|
+
'--sidebar-width': SIDEBAR_WIDTH,
|
|
144
|
+
'--sidebar-width-icon': SIDEBAR_WIDTH_ICON,
|
|
145
|
+
...style
|
|
146
|
+
},
|
|
147
|
+
...props,
|
|
148
|
+
children: children
|
|
149
|
+
})
|
|
150
|
+
})
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
const SIDEBAR_NAME = 'Sidebar';
|
|
154
|
+
function Sidebar({ children, className, collapsible = 'offcanvas', side = 'left', variant = 'sidebar', ...props }) {
|
|
155
|
+
const { isMobile, openMobile, setOpenMobile, state } = useSidebar(SIDEBAR_NAME);
|
|
156
|
+
if ('none' === collapsible) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
157
|
+
className: (0, tailwind_variants_namespaceObject.cn)('bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col', className),
|
|
158
|
+
"data-slot": "sidebar",
|
|
159
|
+
...props,
|
|
160
|
+
children: children
|
|
161
|
+
});
|
|
162
|
+
if (isMobile) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_sheet_cjs_namespaceObject.Sheet, {
|
|
163
|
+
open: openMobile,
|
|
164
|
+
onOpenChange: setOpenMobile,
|
|
165
|
+
...props,
|
|
166
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_sheet_cjs_namespaceObject.SheetContent, {
|
|
167
|
+
className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
|
|
168
|
+
"data-mobile": "true",
|
|
169
|
+
"data-sidebar": "sidebar",
|
|
170
|
+
"data-slot": "sidebar",
|
|
171
|
+
side: side,
|
|
172
|
+
style: {
|
|
173
|
+
'--sidebar-width': SIDEBAR_WIDTH_MOBILE
|
|
174
|
+
},
|
|
175
|
+
children: [
|
|
176
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_sheet_cjs_namespaceObject.SheetHeader, {
|
|
177
|
+
className: "sr-only",
|
|
178
|
+
children: [
|
|
179
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_sheet_cjs_namespaceObject.SheetTitle, {
|
|
180
|
+
children: "Sidebar"
|
|
181
|
+
}),
|
|
182
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_sheet_cjs_namespaceObject.SheetDescription, {
|
|
183
|
+
children: "Displays the mobile sidebar."
|
|
184
|
+
})
|
|
185
|
+
]
|
|
186
|
+
}),
|
|
187
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
188
|
+
className: "flex h-full w-full flex-col",
|
|
189
|
+
children: children
|
|
190
|
+
})
|
|
191
|
+
]
|
|
192
|
+
})
|
|
193
|
+
});
|
|
194
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
195
|
+
className: (0, tailwind_variants_namespaceObject.cn)('text-sidebar-foreground group peer hidden md:block', className),
|
|
196
|
+
"data-collapsible": 'collapsed' === state ? collapsible : '',
|
|
197
|
+
"data-side": side,
|
|
198
|
+
"data-slot": "sidebar",
|
|
199
|
+
"data-state": state,
|
|
200
|
+
"data-variant": variant,
|
|
201
|
+
children: [
|
|
202
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
203
|
+
className: (0, tailwind_variants_namespaceObject.cn)('relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear group-data-[collapsible=offcanvas]:w-0 group-data-[side=right]:rotate-180', 'floating' === variant || 'inset' === variant ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]' : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)'),
|
|
204
|
+
"data-slot": "sidebar-gap"
|
|
205
|
+
}),
|
|
206
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
207
|
+
className: (0, tailwind_variants_namespaceObject.cn)('fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex', 'left' === side ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]' : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]', 'floating' === variant || 'inset' === variant ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]' : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l', className),
|
|
208
|
+
"data-slot": "sidebar-container",
|
|
209
|
+
...props,
|
|
210
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
211
|
+
className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
|
|
212
|
+
"data-sidebar": "sidebar",
|
|
213
|
+
"data-slot": "sidebar-inner",
|
|
214
|
+
children: children
|
|
215
|
+
})
|
|
216
|
+
})
|
|
217
|
+
]
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
const SIDEBAR_TRIGGER_NAME = 'SidebarTrigger';
|
|
221
|
+
function SidebarTrigger({ className, onClick, ...props }) {
|
|
222
|
+
const { toggleSidebar } = useSidebar(SIDEBAR_TRIGGER_NAME);
|
|
223
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button, {
|
|
224
|
+
className: (0, tailwind_variants_namespaceObject.cn)('size-7', className),
|
|
225
|
+
"data-sidebar": "trigger",
|
|
226
|
+
"data-slot": "sidebar-trigger",
|
|
227
|
+
size: "icon",
|
|
228
|
+
variant: "ghost",
|
|
229
|
+
onClick: (event)=>{
|
|
230
|
+
onClick?.(event);
|
|
231
|
+
toggleSidebar();
|
|
232
|
+
},
|
|
233
|
+
...props,
|
|
234
|
+
children: [
|
|
235
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.PanelLeftIcon, {}),
|
|
236
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
237
|
+
className: "sr-only",
|
|
238
|
+
children: "Toggle Sidebar"
|
|
239
|
+
})
|
|
240
|
+
]
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
const SIDEBAR_RAIL_NAME = 'SidebarRail';
|
|
244
|
+
function SidebarRail({ className, ...props }) {
|
|
245
|
+
const { toggleSidebar } = useSidebar(SIDEBAR_RAIL_NAME);
|
|
246
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
247
|
+
className: (0, tailwind_variants_namespaceObject.cn)('hover:after:bg-sidebar-border hover:group-data-[collapsible=offcanvas]:bg-sidebar absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[collapsible=offcanvas]:translate-x-0 group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-0.5 group-data-[collapsible=offcanvas]:after:left-full in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize sm:flex [[data-side=left][data-collapsible=offcanvas]_&]:-right-2 [[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-collapsible=offcanvas]_&]:-left-2 [[data-side=right][data-state=collapsed]_&]:cursor-w-resize', className),
|
|
248
|
+
"data-sidebar": "rail",
|
|
249
|
+
"data-slot": "sidebar-rail",
|
|
250
|
+
title: "Toggle Sidebar",
|
|
251
|
+
type: "button",
|
|
252
|
+
onClick: toggleSidebar,
|
|
253
|
+
...props
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
function SidebarInset({ className, ...props }) {
|
|
257
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("main", {
|
|
258
|
+
className: (0, tailwind_variants_namespaceObject.cn)('bg-background relative flex w-full min-w-0 flex-1 flex-col 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', className),
|
|
259
|
+
"data-slot": "sidebar-inset",
|
|
260
|
+
...props
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
function SidebarInput({ className, ...props }) {
|
|
264
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_cjs_namespaceObject.Input, {
|
|
265
|
+
className: (0, tailwind_variants_namespaceObject.cn)('bg-background h-8 w-full shadow-none', className),
|
|
266
|
+
"data-sidebar": "input",
|
|
267
|
+
"data-slot": "sidebar-input",
|
|
268
|
+
...props
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
function SidebarHeader({ className, ...props }) {
|
|
272
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
273
|
+
className: (0, tailwind_variants_namespaceObject.cn)('flex flex-col gap-2 p-2', className),
|
|
274
|
+
"data-sidebar": "header",
|
|
275
|
+
"data-slot": "sidebar-header",
|
|
276
|
+
...props
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
function SidebarFooter({ className, ...props }) {
|
|
280
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
281
|
+
className: (0, tailwind_variants_namespaceObject.cn)('flex flex-col gap-2 p-2', className),
|
|
282
|
+
"data-sidebar": "footer",
|
|
283
|
+
"data-slot": "sidebar-footer",
|
|
284
|
+
...props
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
function SidebarSeparator({ className, ...props }) {
|
|
288
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_separator_cjs_namespaceObject.Separator, {
|
|
289
|
+
className: (0, tailwind_variants_namespaceObject.cn)('bg-sidebar-border mx-2 w-auto', className),
|
|
290
|
+
"data-sidebar": "separator",
|
|
291
|
+
"data-slot": "sidebar-separator",
|
|
292
|
+
...props
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
function SidebarContent({ className, ...props }) {
|
|
296
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
297
|
+
className: (0, tailwind_variants_namespaceObject.cn)('flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden', className),
|
|
298
|
+
"data-sidebar": "content",
|
|
299
|
+
"data-slot": "sidebar-content",
|
|
300
|
+
...props
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
function SidebarGroup({ className, ...props }) {
|
|
304
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
305
|
+
className: (0, tailwind_variants_namespaceObject.cn)('relative flex w-full min-w-0 flex-col p-2', className),
|
|
306
|
+
"data-sidebar": "group",
|
|
307
|
+
"data-slot": "sidebar-group",
|
|
308
|
+
...props
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
function SidebarGroupLabel({ asChild = false, className, ...props }) {
|
|
312
|
+
const Component = asChild ? react_slot_namespaceObject.Slot : 'div';
|
|
313
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, {
|
|
314
|
+
className: (0, tailwind_variants_namespaceObject.cn)('text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center truncate rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-3 [&>svg]:size-4 [&>svg]:shrink-0', className),
|
|
315
|
+
"data-sidebar": "group-label",
|
|
316
|
+
"data-slot": "sidebar-group-label",
|
|
317
|
+
...props
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
function SidebarGroupAction({ asChild = false, className, ...props }) {
|
|
321
|
+
const Component = asChild ? react_slot_namespaceObject.Slot : 'button';
|
|
322
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, {
|
|
323
|
+
className: (0, tailwind_variants_namespaceObject.cn)('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 group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 focus-visible:ring-3 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0', className),
|
|
324
|
+
"data-sidebar": "group-action",
|
|
325
|
+
"data-slot": "sidebar-group-action",
|
|
326
|
+
...props
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
function SidebarGroupContent({ className, ...props }) {
|
|
330
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
331
|
+
className: (0, tailwind_variants_namespaceObject.cn)('w-full text-sm', className),
|
|
332
|
+
"data-sidebar": "group-content",
|
|
333
|
+
"data-slot": "sidebar-group-content",
|
|
334
|
+
...props
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
function SidebarMenu({ className, ...props }) {
|
|
338
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("ul", {
|
|
339
|
+
className: (0, tailwind_variants_namespaceObject.cn)('flex w-full min-w-0 flex-col gap-1', className),
|
|
340
|
+
"data-sidebar": "menu",
|
|
341
|
+
"data-slot": "sidebar-menu",
|
|
342
|
+
...props
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
function SidebarMenuItem({ className, ...props }) {
|
|
346
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", {
|
|
347
|
+
className: (0, tailwind_variants_namespaceObject.cn)('group/menu-item relative', className),
|
|
348
|
+
"data-sidebar": "menu-item",
|
|
349
|
+
"data-slot": "sidebar-menu-item",
|
|
350
|
+
...props
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
const SIDEBAR_MENU_BUTTON_NAME = 'SidebarMenuButton';
|
|
354
|
+
function SidebarMenuButton({ asChild = false, className, isActive = false, size = 'md', tooltip, variant = 'default', ...props }) {
|
|
355
|
+
const Component = asChild ? react_slot_namespaceObject.Slot : 'button';
|
|
356
|
+
const { isMobile, state } = useSidebar(SIDEBAR_MENU_BUTTON_NAME);
|
|
357
|
+
const button = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, {
|
|
358
|
+
className: (0, tailwind_variants_namespaceObject.cn)(sidebarMenuButtonVariants({
|
|
359
|
+
size,
|
|
360
|
+
variant
|
|
361
|
+
}), className),
|
|
362
|
+
"data-active": isActive,
|
|
363
|
+
"data-sidebar": "menu-button",
|
|
364
|
+
"data-size": size,
|
|
365
|
+
"data-slot": "sidebar-menu-button",
|
|
366
|
+
...props
|
|
367
|
+
});
|
|
368
|
+
if (!tooltip) return button;
|
|
369
|
+
if ('string' == typeof tooltip) tooltip = {
|
|
370
|
+
children: tooltip
|
|
371
|
+
};
|
|
372
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_tooltip_cjs_namespaceObject.Tooltip, {
|
|
373
|
+
children: [
|
|
374
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipTrigger, {
|
|
375
|
+
asChild: true,
|
|
376
|
+
children: button
|
|
377
|
+
}),
|
|
378
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipContent, {
|
|
379
|
+
align: "center",
|
|
380
|
+
hidden: 'collapsed' !== state || isMobile,
|
|
381
|
+
side: "right",
|
|
382
|
+
...tooltip
|
|
383
|
+
})
|
|
384
|
+
]
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
function SidebarMenuAction({ asChild = false, className, showOnHover = false, ...props }) {
|
|
388
|
+
const Component = asChild ? react_slot_namespaceObject.Slot : 'button';
|
|
389
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, {
|
|
390
|
+
className: (0, tailwind_variants_namespaceObject.cn)('text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button: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 group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 focus-visible:ring-3 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0', showOnHover && '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', className),
|
|
391
|
+
"data-sidebar": "menu-action",
|
|
392
|
+
"data-slot": "sidebar-menu-action",
|
|
393
|
+
...props
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
function SidebarMenuBadge({ className, ...props }) {
|
|
397
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
398
|
+
className: (0, tailwind_variants_namespaceObject.cn)('text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-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 group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1', className),
|
|
399
|
+
"data-sidebar": "menu-badge",
|
|
400
|
+
"data-slot": "sidebar-menu-badge",
|
|
401
|
+
...props
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
405
|
+
const [width] = (0, external_react_namespaceObject.useState)(()=>`${String(Math.floor(40 * Math.random()) + 50)}%`);
|
|
406
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
407
|
+
className: (0, tailwind_variants_namespaceObject.cn)('flex h-8 items-center gap-2 rounded-md px-2', className),
|
|
408
|
+
"data-sidebar": "menu-skeleton",
|
|
409
|
+
"data-slot": "sidebar-menu-skeleton",
|
|
410
|
+
...props,
|
|
411
|
+
children: [
|
|
412
|
+
showIcon ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_skeleton_cjs_namespaceObject.Skeleton, {
|
|
413
|
+
className: "size-4 rounded-md",
|
|
414
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
415
|
+
}) : null,
|
|
416
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_skeleton_cjs_namespaceObject.Skeleton, {
|
|
417
|
+
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
418
|
+
"data-sidebar": "menu-skeleton-text",
|
|
419
|
+
style: {
|
|
420
|
+
'--skeleton-width': width
|
|
421
|
+
}
|
|
422
|
+
})
|
|
423
|
+
]
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
function SidebarMenuSub({ className, ...props }) {
|
|
427
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("ul", {
|
|
428
|
+
className: (0, tailwind_variants_namespaceObject.cn)('border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden', className),
|
|
429
|
+
"data-sidebar": "menu-sub",
|
|
430
|
+
"data-slot": "sidebar-menu-sub",
|
|
431
|
+
...props
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
function SidebarMenuSubItem({ className, ...props }) {
|
|
435
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", {
|
|
436
|
+
className: (0, tailwind_variants_namespaceObject.cn)('group/menu-sub-item relative', className),
|
|
437
|
+
"data-sidebar": "menu-sub-item",
|
|
438
|
+
"data-slot": "sidebar-menu-sub-item",
|
|
439
|
+
...props
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
function SidebarMenuSubButton({ asChild = false, className, isActive = false, size = 'md', ...props }) {
|
|
443
|
+
const Component = asChild ? react_slot_namespaceObject.Slot : 'a';
|
|
444
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, {
|
|
445
|
+
className: (0, tailwind_variants_namespaceObject.cn)('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 data-[active=true]:bg-sidebar-accent data-[active=true]: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-3 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', 'sm' === size && 'text-xs', 'md' === size && 'text-sm', 'group-data-[collapsible=icon]:hidden', className),
|
|
446
|
+
"data-active": isActive,
|
|
447
|
+
"data-sidebar": "menu-sub-button",
|
|
448
|
+
"data-size": size,
|
|
449
|
+
"data-slot": "sidebar-menu-sub-button",
|
|
450
|
+
...props
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
exports.Sidebar = __webpack_exports__.Sidebar;
|
|
454
|
+
exports.SidebarContent = __webpack_exports__.SidebarContent;
|
|
455
|
+
exports.SidebarFooter = __webpack_exports__.SidebarFooter;
|
|
456
|
+
exports.SidebarGroup = __webpack_exports__.SidebarGroup;
|
|
457
|
+
exports.SidebarGroupAction = __webpack_exports__.SidebarGroupAction;
|
|
458
|
+
exports.SidebarGroupContent = __webpack_exports__.SidebarGroupContent;
|
|
459
|
+
exports.SidebarGroupLabel = __webpack_exports__.SidebarGroupLabel;
|
|
460
|
+
exports.SidebarHeader = __webpack_exports__.SidebarHeader;
|
|
461
|
+
exports.SidebarInput = __webpack_exports__.SidebarInput;
|
|
462
|
+
exports.SidebarInset = __webpack_exports__.SidebarInset;
|
|
463
|
+
exports.SidebarMenu = __webpack_exports__.SidebarMenu;
|
|
464
|
+
exports.SidebarMenuAction = __webpack_exports__.SidebarMenuAction;
|
|
465
|
+
exports.SidebarMenuBadge = __webpack_exports__.SidebarMenuBadge;
|
|
466
|
+
exports.SidebarMenuButton = __webpack_exports__.SidebarMenuButton;
|
|
467
|
+
exports.SidebarMenuItem = __webpack_exports__.SidebarMenuItem;
|
|
468
|
+
exports.SidebarMenuSkeleton = __webpack_exports__.SidebarMenuSkeleton;
|
|
469
|
+
exports.SidebarMenuSub = __webpack_exports__.SidebarMenuSub;
|
|
470
|
+
exports.SidebarMenuSubButton = __webpack_exports__.SidebarMenuSubButton;
|
|
471
|
+
exports.SidebarMenuSubItem = __webpack_exports__.SidebarMenuSubItem;
|
|
472
|
+
exports.SidebarProvider = __webpack_exports__.SidebarProvider;
|
|
473
|
+
exports.SidebarRail = __webpack_exports__.SidebarRail;
|
|
474
|
+
exports.SidebarSeparator = __webpack_exports__.SidebarSeparator;
|
|
475
|
+
exports.SidebarTrigger = __webpack_exports__.SidebarTrigger;
|
|
476
|
+
exports.sidebarMenuButtonVariants = __webpack_exports__.sidebarMenuButtonVariants;
|
|
477
|
+
exports.useSidebar = __webpack_exports__.useSidebar;
|
|
478
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
479
|
+
"Sidebar",
|
|
480
|
+
"SidebarContent",
|
|
481
|
+
"SidebarFooter",
|
|
482
|
+
"SidebarGroup",
|
|
483
|
+
"SidebarGroupAction",
|
|
484
|
+
"SidebarGroupContent",
|
|
485
|
+
"SidebarGroupLabel",
|
|
486
|
+
"SidebarHeader",
|
|
487
|
+
"SidebarInput",
|
|
488
|
+
"SidebarInset",
|
|
489
|
+
"SidebarMenu",
|
|
490
|
+
"SidebarMenuAction",
|
|
491
|
+
"SidebarMenuBadge",
|
|
492
|
+
"SidebarMenuButton",
|
|
493
|
+
"SidebarMenuItem",
|
|
494
|
+
"SidebarMenuSkeleton",
|
|
495
|
+
"SidebarMenuSub",
|
|
496
|
+
"SidebarMenuSubButton",
|
|
497
|
+
"SidebarMenuSubItem",
|
|
498
|
+
"SidebarProvider",
|
|
499
|
+
"SidebarRail",
|
|
500
|
+
"SidebarSeparator",
|
|
501
|
+
"SidebarTrigger",
|
|
502
|
+
"sidebarMenuButtonVariants",
|
|
503
|
+
"useSidebar"
|
|
504
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
505
|
+
Object.defineProperty(exports, '__esModule', {
|
|
506
|
+
value: true
|
|
507
|
+
});
|