lsp-uikit 1.4.2 → 1.4.4
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/components/alert/alert.d.ts +1 -1
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/button/button.d.ts +2 -2
- package/dist/components/dialog/dialog.d.ts +2 -2
- package/dist/components/dialog/dialog.js +1 -1
- package/dist/components/r-dialog/r-dialog.js +1 -1
- package/dist/components/sheet/sheet.d.ts +2 -2
- package/dist/components/sheet/sheet.js +1 -1
- package/dist/components/sidebar/sidebar.d.ts +2 -2
- package/dist/components/sidebar/sidebar.js +1 -1
- package/dist/components/toggle/toggle.d.ts +2 -2
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
|
|
6
6
|
declare const alertVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "success" | "destructive" | "default" | "warning" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
declare function Alert({ className, variant, hideDefaultIcon, children, ...props }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants> & {
|
|
10
10
|
hideDefaultIcon?: boolean;
|
|
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
|
|
6
6
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "primary" | "primary_ghost" | "primary_outline" | "success" | "success_ghost" | "success_outline" | "purple" | "purple_ghost" | "purple_outline" | "secondary" | "destructive" | "destructive_ghost" | "destructive_outline" | "outline" | null | undefined;
|
|
8
8
|
rounded?: "sm" | "md" | "full" | null | undefined;
|
|
9
9
|
textOverflow?: "default" | "hidden" | null | undefined;
|
|
10
10
|
hover?: boolean | null | undefined;
|
|
@@ -4,8 +4,8 @@ import * as React from 'react';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
8
|
-
size?: "
|
|
7
|
+
variant?: "secondary" | "destructive" | "outline" | "default" | "default_invert" | "destructive_invert" | "ghost" | "link" | "clear" | null | undefined;
|
|
8
|
+
size?: "sm" | "default" | "lg" | "icon" | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
interface ButtonProps extends React.ComponentProps<'button'>, VariantProps<typeof buttonVariants> {
|
|
11
11
|
asChild?: boolean;
|
|
@@ -9,10 +9,10 @@ declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPri
|
|
|
9
9
|
declare function DialogOverlay({ className, blurred, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay> & {
|
|
10
10
|
blurred?: boolean;
|
|
11
11
|
}): react_jsx_runtime.JSX.Element;
|
|
12
|
-
declare function DialogContent({ className,
|
|
12
|
+
declare function DialogContent({ className, radixClassName, children, blurred, hideCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
13
13
|
blurred?: boolean;
|
|
14
14
|
hideCloseButton?: boolean;
|
|
15
|
-
|
|
15
|
+
radixClassName?: string;
|
|
16
16
|
}): react_jsx_runtime.JSX.Element;
|
|
17
17
|
declare function DialogHeader({ className, pin, ...props }: React.ComponentProps<'div'> & {
|
|
18
18
|
pin?: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as t,jsxs as a}from"react/jsx-runtime";import{Root as e,Close as o,Content as l,Description as s,Overlay as n,Portal as d,Title as i,Trigger as r}from"../../node_modules/@radix-ui/react-dialog/dist/index.js";import{XIcon as c}from"lucide-react";import{cn as u}from"../../lib/utils/cn.js";import{onPointerDownOutside as m}from"../../lib/utils/events.js";import{Button as f}from"../button/button.js";function p({...a}){return t(e,{"data-slot":"dialog",...a})}function g({...a}){return t(r,{"data-slot":"dialog-trigger",...a})}function x({...a}){return t(d,{"data-slot":"dialog-portal",...a})}function b({...a}){return t(o,{"data-slot":"dialog-close",...a})}function h({className:a,blurred:e,...o}){return t(n,{"data-slot":"dialog-overlay",className:u("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50",e?"backdrop-blur":"bg-black/50",a),...o})}function N({className:e,
|
|
2
|
+
import{jsx as t,jsxs as a}from"react/jsx-runtime";import{Root as e,Close as o,Content as l,Description as s,Overlay as n,Portal as d,Title as i,Trigger as r}from"../../node_modules/@radix-ui/react-dialog/dist/index.js";import{XIcon as c}from"lucide-react";import{cn as u}from"../../lib/utils/cn.js";import{onPointerDownOutside as m}from"../../lib/utils/events.js";import{Button as f}from"../button/button.js";function p({...a}){return t(e,{"data-slot":"dialog",...a})}function g({...a}){return t(r,{"data-slot":"dialog-trigger",...a})}function x({...a}){return t(d,{"data-slot":"dialog-portal",...a})}function b({...a}){return t(o,{"data-slot":"dialog-close",...a})}function h({className:a,blurred:e,...o}){return t(n,{"data-slot":"dialog-overlay",className:u("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50",e?"backdrop-blur":"bg-black/50",a),...o})}function N({className:e,radixClassName:s,children:n,blurred:d=!1,hideCloseButton:i=!1,...r}){return a(x,{"data-slot":"dialog-portal",children:[t(h,{blurred:d}),a(l,{"data-slot":"dialog-content",className:u("bg-dialog data-[state=open]:animate-in border-background data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 xs:max-h-[94%] fixed top-[50%] left-[50%] z-50 flex max-h-[98%] w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] flex-col gap-3 overflow-hidden rounded-3xl border shadow-lg duration-200 sm:max-w-lg",s),onOpenAutoFocus:t=>t.preventDefault(),onPointerDownOutside:m,...r,children:[t("div",{className:u("flex h-full w-full flex-col gap-2 overflow-y-auto",e),children:n}),!i&&t(o,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-[25px] right-[25px] rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",asChild:!0,children:a(f,{variant:"secondary",className:"xs:bg-secondary h-auto rounded-md bg-transparent p-[6px]",children:[t(c,{className:"xs:size-4 size-5"}),t("span",{className:"sr-only",children:"Close"})]})})]})]})}function v({className:a,pin:e,...o}){return t("div",{"data-slot":"dialog-header",className:u("bg-background flex flex-col rounded-b-3xl p-[30px] text-left",{"outline-dialog sticky top-0 left-0 outline-[8px]":e},a),...o})}function y({className:a,...e}){return t("div",{className:u("bg-background rounded-3xl p-[30px]",a),...e})}function k({className:a,pin:e,...o}){return t("div",{"data-slot":"dialog-footer",className:u("bg-background flex flex-col-reverse gap-2 rounded-t-3xl p-[30px] sm:flex-row sm:justify-end",{"outline-dialog sticky bottom-0 left-0 outline-[8px]":e},a),...o})}function w({className:a,...e}){return t(i,{"data-slot":"dialog-title",className:u("line-clamp-2 pr-5 text-xl leading-tight font-medium break-all text-ellipsis",a),...e})}function z({className:a,...e}){return t(s,{"data-slot":"dialog-description",className:u("text-muted-foreground mt-2 text-sm",a),...e})}export{p as Dialog,b as DialogClose,N as DialogContent,y as DialogContentSection,z as DialogDescription,k as DialogFooter,v as DialogHeader,h as DialogOverlay,x as DialogPortal,w as DialogTitle,g as DialogTrigger};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as
|
|
2
|
+
import{jsx as r}from"react/jsx-runtime";import{createContext as n,useContext as o}from"react";import{useIsMobile as t}from"../../lib/hooks/useMobile.js";import{Dialog as e,DialogContent as s,DialogTrigger as i,DialogFooter as a,DialogHeader as c,DialogTitle as u,DialogDescription as l}from"../dialog/dialog.js";import{Sheet as m,SheetContent as f,SheetTrigger as d,SheetFooter as p,SheetHeader as x,SheetTitle as N,SheetDescription as h}from"../sheet/sheet.js";const b=n(!1);function j({breakpoint:n="xs",...o}){const s=t(n);return r(b.Provider,{value:s,children:r(s?m:e,{...o})})}function g({className:n,radixClassName:t,...e}){return o(b)?r(f,{radixClassName:t,className:n,side:"bottom",...e}):r(s,{radixClassName:t,className:n,...e})}function C(n){const t=o(b);return r(t?d:i,{...n})}function k(n){const t=o(b);return r(t?p:a,{...n})}function v(n){const t=o(b);return r(t?x:c,{...n})}function w(n){const t=o(b);return r(t?N:u,{...n})}function y(n){const t=o(b);return r(t?h:l,{...n})}function M({only:r,children:n}){const t=o(b);return"dialog"===r&&t?null:"drawer"!==r||t?n:null}export{j as RDialog,g as RDialogContent,y as RDialogDescription,k as RDialogFooter,v as RDialogHeader,M as RDialogOnly,w as RDialogTitle,C as RDialogTrigger};
|
|
@@ -5,10 +5,10 @@ import * as React from 'react';
|
|
|
5
5
|
declare function Sheet({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
6
6
|
declare function SheetTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
7
7
|
declare function SheetClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
|
|
8
|
-
declare function SheetContent({ className,
|
|
8
|
+
declare function SheetContent({ className, radixClassName, children, side, duration, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
9
9
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
10
10
|
duration?: 'default' | 'fast';
|
|
11
|
-
|
|
11
|
+
radixClassName?: string;
|
|
12
12
|
}): react_jsx_runtime.JSX.Element;
|
|
13
13
|
declare function SheetHeader({ className, pin, children, ...props }: React.ComponentProps<'div'> & {
|
|
14
14
|
pin?: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{Root as a,Trigger as o,Close as s,Content as n,Title as d,Description as l,Portal as i,Overlay as r}from"../../node_modules/@radix-ui/react-dialog/dist/index.js";import{XIcon as u}from"lucide-react";import{cn as c}from"../../lib/utils/cn.js";import{onPointerDownOutside as f}from"../../lib/utils/events.js";import{Button as m}from"../button/button.js";function p({...e}){return t(a,{"data-slot":"sheet",...e})}function x({...e}){return t(o,{"data-slot":"sheet-trigger",...e})}function h({...e}){return t(s,{"data-slot":"sheet-close",...e})}function g({...e}){return t(i,{"data-slot":"sheet-portal",...e})}function b({className:e,...a}){return t(r,{"data-slot":"sheet-overlay",className:c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...a})}function N({className:a,
|
|
2
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{Root as a,Trigger as o,Close as s,Content as n,Title as d,Description as l,Portal as i,Overlay as r}from"../../node_modules/@radix-ui/react-dialog/dist/index.js";import{XIcon as u}from"lucide-react";import{cn as c}from"../../lib/utils/cn.js";import{onPointerDownOutside as f}from"../../lib/utils/events.js";import{Button as m}from"../button/button.js";function p({...e}){return t(a,{"data-slot":"sheet",...e})}function x({...e}){return t(o,{"data-slot":"sheet-trigger",...e})}function h({...e}){return t(s,{"data-slot":"sheet-close",...e})}function g({...e}){return t(i,{"data-slot":"sheet-portal",...e})}function b({className:e,...a}){return t(r,{"data-slot":"sheet-overlay",className:c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...a})}function N({className:a,radixClassName:o,children:s,side:d="right",duration:l="default",...i}){return e(g,{children:[t(b,{}),t(n,{onPointerDownOutside:f,"data-slot":"sheet-content",onOpenAutoFocus:t=>t.preventDefault(),className:c("bg-dialog data-[state=open]:animate-in data-[state=closed]:animate-out max-xs:w-full fixed z-50 flex flex-col gap-2 overflow-hidden shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-300","right"===d&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm","left"===d&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm","top"===d&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b","bottom"===d&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto max-h-[98%] rounded-t-3xl border-t data-[state=closed]:!duration-300 data-[state=open]:!duration-300","default"===l&&"data-[state=closed]:duration-300 data-[state=open]:duration-500","fast"===l&&"data-[state=closed]:duration-200 data-[state=open]:duration-300",o),...i,children:t("div",{className:c("flex h-full w-full flex-1 flex-col gap-2 overflow-y-auto",a),children:s})})]})}function y({className:a,pin:o,children:n,...d}){return e("div",{"data-slot":"sheet-header",className:c("bg-background flex flex-col gap-1.5 rounded-b-3xl p-[30px]",{"outline-dialog sticky top-0 left-0 outline-[8px]":o},a),...d,children:[n,t(s,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-[25px] right-[25px] rounded-xs bg-transparent opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",asChild:!0,children:e(m,{variant:"secondary",className:"xs:bg-secondary h-auto rounded-md bg-transparent p-[6px]",children:[t(u,{className:"xs:size-4 size-5"}),t("span",{className:"sr-only",children:"Close"})]})})]})}function v({className:e,...a}){return t("div",{className:c("bg-background flex flex-col rounded-3xl p-[30px]",e),...a})}function w({className:e,pin:a,...o}){return t("div",{"data-slot":"sheet-footer",className:c("bg-background flex h-full flex-1 flex-col gap-2 rounded-t-3xl p-[30px]",{"outline-dialog sticky bottom-0 left-0 outline-[8px]":a},e),...o})}function k({className:e,...a}){return t(d,{"data-slot":"sheet-title",className:c("text-foreground pr-[38px] text-xl leading-tight font-medium",e),...a})}function j({className:e,...a}){return t(l,{"data-slot":"sheet-description",className:c("text-muted-foreground text-sm",e),...a})}export{p as Sheet,h as SheetClose,N as SheetContent,v as SheetContentSection,j as SheetDescription,w as SheetFooter,y as SheetHeader,k as SheetTitle,x as SheetTrigger};
|
|
@@ -46,8 +46,8 @@ declare function SidebarGroupContent({ className, ...props }: React.ComponentPro
|
|
|
46
46
|
declare function SidebarMenu({ className, ...props }: React.ComponentProps<'ul'>): react_jsx_runtime.JSX.Element;
|
|
47
47
|
declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<'li'>): react_jsx_runtime.JSX.Element;
|
|
48
48
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
49
|
-
variant?: "
|
|
50
|
-
size?: "
|
|
49
|
+
variant?: "outline" | "default" | null | undefined;
|
|
50
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
51
51
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
52
52
|
declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: React.ComponentProps<'button'> & {
|
|
53
53
|
asChild?: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Root as t}from"../../node_modules/@radix-ui/react-slot/dist/index.js";import{cva as r}from"../../node_modules/class-variance-authority/dist/index.js";import{PanelLeftIcon as i}from"lucide-react";import*as s from"react";import{useIsMobile as d}from"../../lib/hooks/useMobile.js";import{cn as n}from"../../lib/utils/cn.js";import{Button as o}from"../button/button.js";import{Input as l}from"../input/input.js";import{Separator as c}from"../separator/separator.js";import{Sheet as u,SheetContent as b,SheetHeader as p,SheetTitle as m,SheetDescription as f,SheetContentSection as g}from"../sheet/sheet.js";import{Skeleton as h}from"../skeleton/skeleton.js";import{Tooltip as v,TooltipTrigger as x,TooltipContent as w,TooltipProvider as N}from"../tooltip/tooltip.js";const y=s.createContext(null);function k(){const e=s.useContext(y);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function z({defaultOpen:a=!0,open:t,onOpenChange:r,className:i,style:o,children:l,...c}){const u=d(),[b,p]=s.useState(!1),[m,f]=s.useState(a),g=t??m,h=s.useCallback(e=>{const a="function"==typeof e?e(g):e;r?r(a):f(a),document.cookie=`sidebar_state=${a}; path=/; max-age=604800`},[r,g]),v=s.useCallback(()=>u?p(e=>!e):h(e=>!e),[u,h,p]);s.useEffect(()=>{const e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),v())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[v]);const x=g?"expanded":"collapsed",w=s.useMemo(()=>({state:x,open:g,setOpen:h,isMobile:u,openMobile:b,setOpenMobile:p,toggleSidebar:v}),[x,g,h,u,b,p,v]);return e(y.Provider,{value:w,children:e(N,{delayDuration:0,children:e("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":"16rem","--sidebar-width-icon":"5rem",...o},className:n("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",i),...c,children:l})})})}function C({side:t="left",variant:r="sidebar",collapsible:i="offcanvas",className:s,children:d,...o}){const{isMobile:l,state:c,openMobile:h,setOpenMobile:v}=k();return"none"===i?e("div",{"data-slot":"sidebar",className:n("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",s),...o,children:d}):l?e(u,{open:h,onOpenChange:v,...o,children:a(b,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"text-sidebar-foreground w-full p-0 [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:t,children:[a(p,{children:[e(m,{children:"Меню"}),e(f,{className:"hidden"})]}),e(g,{className:"h-full p-5",children:d})]})}):a("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":c,"data-collapsible":"collapsed"===c?i:"","data-variant":r,"data-side":t,"data-slot":"sidebar",children:[e("div",{"data-slot":"sidebar-gap",className:n("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"===r||"inset"===r?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e("div",{"data-slot":"sidebar-container",className:n("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex","left"===t?"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"===r||"inset"===r?"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",s),...o,children:e("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",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",children:d})})]})}function _({className:t,onClick:r,...s}){const{toggleSidebar:d}=k();return a(o,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:n("size-7",t),onClick:e=>{r?.(e),d()},...s,children:[e(i,{}),e("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function j({className:a,...t}){const{toggleSidebar:r}=k();return e("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:n("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear 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] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",a),...t})}function M({className:a,...t}){return e("main",{"data-slot":"sidebar-inset",className:n("bg-background relative flex w-full 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",a),...t})}function S({className:a,...t}){return e(l,{"data-slot":"sidebar-input","data-sidebar":"input",className:n("bg-background h-8 w-full shadow-none",a),...t})}function O({className:a,...t}){return e("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:n("flex flex-col gap-2 p-2",a),...t})}function E({className:a,...t}){return e("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:n("flex flex-col gap-2 p-2",a),...t})}function T({className:a,...t}){return e(c,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:n("bg-sidebar-border mx-2 w-auto",a),...t})}function q({className:a,...t}){return e("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",a),...t})}function A({className:a,...t}){return e("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:n("relative flex w-full min-w-0 flex-col px-[15px] py-2 max-md:p-0",a),...t})}function D({className:a,asChild:r=!1,...i}){return e(r?t:"div",{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className: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","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",a),...i})}function I({className:a,asChild:r=!1,...i}){return e(r?t:"button",{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className: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","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",a),...i})}function K({className:a,...t}){return e("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:n("w-full text-sm",a),...t})}function L({className:a,...t}){return e("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n("flex w-full min-w-0 flex-col gap-1",a),...t})}function P({className:a,...t}){return e("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n("group/menu-item relative",a),...t})}const $=r("peer/menu-button cursor-pointer flex w-full items-center gap-2 [&>svg]:ml-[8px] overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate group-data-[collapsible=icon]:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-[32px] text-sm",sm:"h-7 text-xs",lg:"h-10 text-sm "}},defaultVariants:{variant:"default",size:"default"}});function H({asChild:r=!1,isActive:i=!1,variant:s="default",size:d="default",tooltip:o,className:l,...c}){const u=r?t:"button",{isMobile:b,state:p}=k(),m=e(u,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":d,"data-active":i,className:n($({variant:s,size:d}),l),...c});return o?("string"==typeof o&&(o={children:o}),a(v,{children:[e(x,{asChild:!0,children:m}),e(w,{side:"right",align:"center",hidden:"collapsed"!==p||b,...o})]})):m}function R({className:a,asChild:r=!1,showOnHover:i=!1,...s}){return e(r?t:"button",{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:n("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute 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","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",i&&"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),...s})}function V({className:a,...t}){return e("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className: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","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a),...t})}function B({className:t,showIcon:r=!1,...i}){const d=s.useMemo(()=>`${Math.floor(40*Math.random())+50}%`,[]);return a("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:n("flex h-8 items-center gap-2 rounded-md px-2",t),...i,children:[r&&e(h,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),e(h,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":d}})]})}function F({className:a,...t}){return e("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className: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","group-data-[collapsible=icon]:hidden",a),...t})}function G({className:a,...t}){return e("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:n("group/menu-sub-item relative",a),...t})}function J({asChild:a=!1,size:r="md",isActive:i=!1,className:s,...d}){return e(a?t:"a",{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":r,"data-active":i,className: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","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground","sm"===r&&"text-xs","md"===r&&"text-sm","group-data-[collapsible=icon]:hidden",s),...d})}export{C as Sidebar,q as SidebarContent,E as SidebarFooter,A as SidebarGroup,I as SidebarGroupAction,K as SidebarGroupContent,D as SidebarGroupLabel,O as SidebarHeader,S as SidebarInput,M as SidebarInset,L as SidebarMenu,R as SidebarMenuAction,V as SidebarMenuBadge,H as SidebarMenuButton,P as SidebarMenuItem,B as SidebarMenuSkeleton,F as SidebarMenuSub,J as SidebarMenuSubButton,G as SidebarMenuSubItem,z as SidebarProvider,j as SidebarRail,T as SidebarSeparator,_ as SidebarTrigger,k as useSidebar};
|
|
2
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Root as t}from"../../node_modules/@radix-ui/react-slot/dist/index.js";import{cva as r}from"../../node_modules/class-variance-authority/dist/index.js";import{PanelLeftIcon as i}from"lucide-react";import*as s from"react";import{useIsMobile as d}from"../../lib/hooks/useMobile.js";import{cn as n}from"../../lib/utils/cn.js";import{Button as o}from"../button/button.js";import{Input as l}from"../input/input.js";import{Separator as c}from"../separator/separator.js";import{Sheet as u,SheetContent as b,SheetHeader as m,SheetTitle as p,SheetDescription as f}from"../sheet/sheet.js";import{Skeleton as g}from"../skeleton/skeleton.js";import{Tooltip as h,TooltipTrigger as v,TooltipContent as x,TooltipProvider as w}from"../tooltip/tooltip.js";const N=s.createContext(null);function y(){const e=s.useContext(N);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function k({defaultOpen:a=!0,open:t,onOpenChange:r,className:i,style:o,children:l,...c}){const u=d(),[b,m]=s.useState(!1),[p,f]=s.useState(a),g=t??p,h=s.useCallback(e=>{const a="function"==typeof e?e(g):e;r?r(a):f(a),document.cookie=`sidebar_state=${a}; path=/; max-age=604800`},[r,g]),v=s.useCallback(()=>u?m(e=>!e):h(e=>!e),[u,h,m]);s.useEffect(()=>{const e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),v())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[v]);const x=g?"expanded":"collapsed",y=s.useMemo(()=>({state:x,open:g,setOpen:h,isMobile:u,openMobile:b,setOpenMobile:m,toggleSidebar:v}),[x,g,h,u,b,m,v]);return e(N.Provider,{value:y,children:e(w,{delayDuration:0,children:e("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":"16rem","--sidebar-width-icon":"5rem",...o},className:n("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",i),...c,children:l})})})}function z({side:t="left",variant:r="sidebar",collapsible:i="offcanvas",className:s,children:d,...o}){const{isMobile:l,state:c,openMobile:g,setOpenMobile:h}=y();return"none"===i?e("div",{"data-slot":"sidebar",className:n("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",s),...o,children:d}):l?e(u,{open:g,onOpenChange:h,...o,children:a(b,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"text-sidebar-foreground w-full p-0 [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:t,children:[a(m,{className:"sr-only",children:[e(p,{children:"Меню"}),e(f,{className:"hidden"})]}),d]})}):a("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":c,"data-collapsible":"collapsed"===c?i:"","data-variant":r,"data-side":t,"data-slot":"sidebar",children:[e("div",{"data-slot":"sidebar-gap",className:n("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"===r||"inset"===r?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e("div",{"data-slot":"sidebar-container",className:n("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex","left"===t?"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"===r||"inset"===r?"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",s),...o,children:e("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",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",children:d})})]})}function C({className:t,onClick:r,...s}){const{toggleSidebar:d}=y();return a(o,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:n("size-7",t),onClick:e=>{r?.(e),d()},...s,children:[e(i,{}),e("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function _({className:a,...t}){const{toggleSidebar:r}=y();return e("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:n("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear 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] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",a),...t})}function j({className:a,...t}){return e("main",{"data-slot":"sidebar-inset",className:n("bg-background relative flex w-full 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",a),...t})}function M({className:a,...t}){return e(l,{"data-slot":"sidebar-input","data-sidebar":"input",className:n("bg-background h-8 w-full shadow-none",a),...t})}function S({className:a,...t}){return e("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:n("flex flex-col gap-2 p-2",a),...t})}function O({className:a,...t}){return e("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:n("flex flex-col gap-2 p-2",a),...t})}function E({className:a,...t}){return e(c,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:n("bg-sidebar-border mx-2 w-auto",a),...t})}function T({className:a,...t}){return e("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",a),...t})}function q({className:a,...t}){return e("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:n("relative flex w-full min-w-0 flex-col px-[15px] py-2 max-md:p-0",a),...t})}function A({className:a,asChild:r=!1,...i}){return e(r?t:"div",{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className: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","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",a),...i})}function D({className:a,asChild:r=!1,...i}){return e(r?t:"button",{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className: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","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",a),...i})}function I({className:a,...t}){return e("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:n("w-full text-sm",a),...t})}function K({className:a,...t}){return e("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n("flex w-full min-w-0 flex-col gap-1",a),...t})}function L({className:a,...t}){return e("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n("group/menu-item relative",a),...t})}const P=r("peer/menu-button cursor-pointer flex w-full items-center gap-2 [&>svg]:ml-[8px] overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate group-data-[collapsible=icon]:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-[32px] text-sm",sm:"h-7 text-xs",lg:"h-10 text-sm "}},defaultVariants:{variant:"default",size:"default"}});function $({asChild:r=!1,isActive:i=!1,variant:s="default",size:d="default",tooltip:o,className:l,...c}){const u=r?t:"button",{isMobile:b,state:m}=y(),p=e(u,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":d,"data-active":i,className:n(P({variant:s,size:d}),l),...c});return o?("string"==typeof o&&(o={children:o}),a(h,{children:[e(v,{asChild:!0,children:p}),e(x,{side:"right",align:"center",hidden:"collapsed"!==m||b,...o})]})):p}function H({className:a,asChild:r=!1,showOnHover:i=!1,...s}){return e(r?t:"button",{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:n("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute 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","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",i&&"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),...s})}function R({className:a,...t}){return e("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className: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","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a),...t})}function V({className:t,showIcon:r=!1,...i}){const d=s.useMemo(()=>`${Math.floor(40*Math.random())+50}%`,[]);return a("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:n("flex h-8 items-center gap-2 rounded-md px-2",t),...i,children:[r&&e(g,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),e(g,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":d}})]})}function B({className:a,...t}){return e("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className: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","group-data-[collapsible=icon]:hidden",a),...t})}function F({className:a,...t}){return e("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:n("group/menu-sub-item relative",a),...t})}function G({asChild:a=!1,size:r="md",isActive:i=!1,className:s,...d}){return e(a?t:"a",{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":r,"data-active":i,className: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","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground","sm"===r&&"text-xs","md"===r&&"text-sm","group-data-[collapsible=icon]:hidden",s),...d})}export{z as Sidebar,T as SidebarContent,O as SidebarFooter,q as SidebarGroup,D as SidebarGroupAction,I as SidebarGroupContent,A as SidebarGroupLabel,S as SidebarHeader,M as SidebarInput,j as SidebarInset,K as SidebarMenu,H as SidebarMenuAction,R as SidebarMenuBadge,$ as SidebarMenuButton,L as SidebarMenuItem,V as SidebarMenuSkeleton,B as SidebarMenuSub,G as SidebarMenuSubButton,F as SidebarMenuSubItem,k as SidebarProvider,_ as SidebarRail,E as SidebarSeparator,C as SidebarTrigger,y as useSidebar};
|
|
@@ -5,8 +5,8 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
|
|
7
7
|
declare const toggleVariants: (props?: ({
|
|
8
|
-
variant?: "
|
|
9
|
-
size?: "
|
|
8
|
+
variant?: "outline" | "default" | null | undefined;
|
|
9
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
10
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
11
|
declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
|
|
12
12
|
|