fina-react-ds 2.0.0 → 2.0.2

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.
@@ -1,3 +1,12 @@
1
+ /**
2
+ * Field Component - Modifications par rapport à la version originale :
3
+ *
4
+ * 1. FieldGroup :
5
+ * - Réduction de l'espacement : gap-7 -> gap-4
6
+ *
7
+ * 2. Composant Field :
8
+ * - Réduction de l'espactement : gap-4 -> gap-1
9
+ */
1
10
  import { type VariantProps } from "class-variance-authority";
2
11
  import { Label } from "./label";
3
12
  declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- var u=Object.defineProperty;var r=(t,e)=>u(t,"name",{value:e,configurable:!0});import{jsx as a}from"react/jsx-runtime";import{useMemo as m}from"react";import{cva as c}from"class-variance-authority";import{cn as i}from"../lib/utils.js";import{Label as p}from"./label.js";const g=c("data-[invalid=true]:text-destructive gap-3 group/field flex w-full",{variants:{orientation:{vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function k({className:t,orientation:e="vertical",...l}){return a("div",{role:"group","data-slot":"field","data-orientation":e,className:i(g({orientation:e}),t),...l})}r(k,"Field");function N({className:t,...e}){return a(p,{"data-slot":"field-label",className:i("has-data-checked:bg-primary/5 has-data-checked:border-primary dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-3 group/field-label peer/field-label flex w-fit leading-snug","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",t),...e})}r(N,"FieldLabel");function F({className:t,...e}){return a("p",{"data-slot":"field-description",className:i("text-muted text-left text-sm [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",t),...e})}r(F,"FieldDescription");function z({className:t,children:e,errors:l,...n}){const s=m(()=>{if(e)return e;if(!l?.length)return null;const d=[...new Map(l.map(o=>[o?.message,o])).values()];return d?.length==1?d[0]?.message:a("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:d.map((o,f)=>o?.message&&a("li",{children:o.message},f))})},[e,l]);return s?a("div",{role:"alert","data-slot":"field-error",className:i("text-destructive text-sm font-normal",t),...n,children:s}):null}r(z,"FieldError");export{k as Field,F as FieldDescription,z as FieldError,N as FieldLabel};
1
+ var u=Object.defineProperty;var l=(t,e)=>u(t,"name",{value:e,configurable:!0});import{jsx as a,jsxs as c}from"react/jsx-runtime";import{useMemo as m}from"react";import{cva as p}from"class-variance-authority";import{cn as o}from"../lib/utils.js";import{Label as g}from"./label.js";import{Separator as x}from"./separator.js";function L({className:t,...e}){return a("fieldset",{"data-slot":"field-set",className:o("gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col",t),...e})}l(L,"FieldSet");function S({className:t,variant:e="legend",...d}){return a("legend",{"data-slot":"field-legend","data-variant":e,className:o("mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",t),...d})}l(S,"FieldLegend");function j({className:t,...e}){return a("div",{"data-slot":"field-group",className:o("gap-4 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4 group/field-group @container/field-group flex w-full flex-col",t),...e})}l(j,"FieldGroup");const h=p("data-[invalid=true]:text-destructive gap-1 group/field flex w-full",{variants:{orientation:{vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function z({className:t,orientation:e="vertical",...d}){return a("div",{role:"group","data-slot":"field","data-orientation":e,className:o(h({orientation:e}),t),...d})}l(z,"Field");function E({className:t,...e}){return a("div",{"data-slot":"field-content",className:o("gap-1 group/field-content flex flex-1 flex-col leading-snug",t),...e})}l(E,"FieldContent");function M({className:t,...e}){return a(g,{"data-slot":"field-label",className:o("has-data-checked:bg-primary/5 has-data-checked:border-primary dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-3 group/field-label peer/field-label flex w-fit leading-snug","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",t),...e})}l(M,"FieldLabel");function V({className:t,...e}){return a("div",{"data-slot":"field-label",className:o("gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center leading-snug",t),...e})}l(V,"FieldTitle");function q({className:t,...e}){return a("p",{"data-slot":"field-description",className:o("text-muted text-left text-sm [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",t),...e})}l(q,"FieldDescription");function C({children:t,className:e,...d}){return c("div",{"data-slot":"field-separator","data-content":!!t,className:o("-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative",e),...d,children:[a(x,{className:"absolute inset-0 top-1/2"}),t&&a("span",{className:"text-muted-foreground px-2 bg-background relative mx-auto block w-fit","data-slot":"field-separator-content",children:t})]})}l(C,"FieldSeparator");function D({className:t,children:e,errors:d,...s}){const n=m(()=>{if(e)return e;if(!d?.length)return null;const r=[...new Map(d.map(i=>[i?.message,i])).values()];return r?.length==1?r[0]?.message:a("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:r.map((i,f)=>i?.message&&a("li",{children:i.message},f))})},[e,d]);return n?a("div",{role:"alert","data-slot":"field-error",className:o("text-destructive text-sm font-normal",t),...s,children:n}):null}l(D,"FieldError");export{z as Field,E as FieldContent,q as FieldDescription,D as FieldError,j as FieldGroup,M as FieldLabel,S as FieldLegend,C as FieldSeparator,L as FieldSet,V as FieldTitle};
@@ -36,3 +36,4 @@ export { ThemeProvider, useTheme } from "../providers/theme-provider";
36
36
  export { LoaderProvider, useLoader } from "../providers/loader-provider";
37
37
  export { HtmlInput } from "./html-input";
38
38
  export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, } from "./empty";
39
+ export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, } from "./field";
@@ -1 +1 @@
1
- import{AlertDialog as r,AlertDialogAction as t,AlertDialogCancel as a,AlertDialogContent as i,AlertDialogDescription as n,AlertDialogFooter as p,AlertDialogHeader as l,AlertDialogOverlay as d,AlertDialogPortal as m,AlertDialogTitle as g,AlertDialogTrigger as b}from"./alert-dialog.js";import{Alert as S,AlertDescription as D,AlertTitle as x}from"./alert.js";import{Badge as f}from"./badge.js";import{Button as s,buttonVariants as M}from"./button.js";import{Avatar as A,AvatarFallback as c,AvatarImage as v}from"./avatar.js";import{Calendar as h}from"./calendar.js";import{Card as I,CardAction as y,CardContent as k,CardDescription as F,CardFooter as L,CardHeader as B,CardTitle as E}from"./card.js";import{Checkbox as R}from"./checkbox.js";import{DatePicker as U}from"./date-picker.js";import{Dialog as V,DialogClose as j,DialogContent as q,DialogDescription as z,DialogFooter as J,DialogHeader as K,DialogOverlay as Q,DialogPortal as W,DialogTitle as X,DialogTrigger as Y}from"./dialog.js";import{DataLoader as _}from"./data-loader.js";import{DropdownMenu as ee,DropdownMenuCheckboxItem as oe,DropdownMenuContent as re,DropdownMenuGroup as te,DropdownMenuItem as ae,DropdownMenuLabel as ie,DropdownMenuPortal as ne,DropdownMenuRadioGroup as pe,DropdownMenuRadioItem as le,DropdownMenuSeparator as de,DropdownMenuShortcut as me,DropdownMenuSub as ge,DropdownMenuSubContent as be,DropdownMenuSubTrigger as ue,DropdownMenuTrigger as Se}from"./dropdown-menu.js";import{FileUploader as xe}from"./file-uploader.js";import{ImageUploader as fe}from"./image-uploader.js";import{HoverCard as se,HoverCardContent as Me,HoverCardTrigger as Pe}from"./hover-card.js";import{Input as ce}from"./input.js";import{Label as we}from"./label.js";import{ModeToggle as He}from"./mode-toggle.js";import{Pagination as ye,PaginationContent as ke,PaginationEllipsis as Fe,PaginationItem as Le,PaginationLink as Be,PaginationNext as Ee,PaginationPrevious as Ge}from"./pagination.js";import{PasswordRulesChecker as Oe}from"./password-rules-checker.js";import{Popover as Ne,PopoverContent as Ve,PopoverDescription as je,PopoverHeader as qe,PopoverTitle as ze,PopoverTrigger as Je}from"./popover.js";import{Select as Qe}from"./select.js";import{Separator as Xe}from"./separator.js";import{Sheet as Ze,SheetBody as _e,SheetClose as $e,SheetContent as eo,SheetDescription as oo,SheetFooter as ro,SheetHeader as to,SheetTitle as ao,SheetTrigger as io}from"./sheet.js";import{Sidebar as po,SidebarContent as lo,SidebarFooter as mo,SidebarGroup as go,SidebarGroupAction as bo,SidebarGroupContent as uo,SidebarGroupLabel as So,SidebarHeader as Do,SidebarInput as xo,SidebarInset as To,SidebarMenu as fo,SidebarMenuAction as Co,SidebarMenuBadge as so,SidebarMenuButton as Mo,SidebarMenuItem as Po,SidebarMenuSkeleton as Ao,SidebarMenuSub as co,SidebarMenuSubButton as vo,SidebarMenuSubItem as wo,SidebarProvider as ho,SidebarRail as Ho,SidebarSeparator as Io,SidebarTrigger as yo,useSidebar as ko}from"./sidebar.js";import{SimplePagination as Lo}from"./simple-pagination.js";import{SimpleTooltip as Eo}from"./simple-tooltip.js";import{Skeleton as Ro}from"./skeleton.js";import{Switch as Uo}from"./switch.js";import{Toaster as Vo}from"./sonner.js";import{Table as qo,TableBody as zo,TableCaption as Jo,TableCell as Ko,TableFooter as Qo,TableHead as Wo,TableHeader as Xo,TableRow as Yo}from"./table.js";import{Tabs as _o,TabsContent as $o,TabsList as er,TabsTrigger as or}from"./tabs.js";import{Textarea as tr}from"./textarea.js";import{Tooltip as ir,TooltipContent as nr,TooltipProvider as pr,TooltipTrigger as lr}from"./tooltip.js";import{ThemeProvider as mr,useTheme as gr}from"../providers/theme-provider.js";import{LoaderProvider as ur,useLoader as Sr}from"../providers/loader-provider.js";import{HtmlInput as xr}from"./html-input.js";import{Empty as fr,EmptyContent as Cr,EmptyDescription as sr,EmptyHeader as Mr,EmptyMedia as Pr,EmptyTitle as Ar}from"./empty.js";export{S as Alert,D as AlertDescription,r as AlertDialog,t as AlertDialogAction,a as AlertDialogCancel,i as AlertDialogContent,n as AlertDialogDescription,p as AlertDialogFooter,l as AlertDialogHeader,d as AlertDialogOverlay,m as AlertDialogPortal,g as AlertDialogTitle,b as AlertDialogTrigger,x as AlertTitle,A as Avatar,c as AvatarFallback,v as AvatarImage,f as Badge,s as Button,h as Calendar,I as Card,y as CardAction,k as CardContent,F as CardDescription,L as CardFooter,B as CardHeader,E as CardTitle,R as Checkbox,_ as DataLoader,U as DatePicker,V as Dialog,j as DialogClose,q as DialogContent,z as DialogDescription,J as DialogFooter,K as DialogHeader,Q as DialogOverlay,W as DialogPortal,X as DialogTitle,Y as DialogTrigger,ee as DropdownMenu,oe as DropdownMenuCheckboxItem,re as DropdownMenuContent,te as DropdownMenuGroup,ae as DropdownMenuItem,ie as DropdownMenuLabel,ne as DropdownMenuPortal,pe as DropdownMenuRadioGroup,le as DropdownMenuRadioItem,de as DropdownMenuSeparator,me as DropdownMenuShortcut,ge as DropdownMenuSub,be as DropdownMenuSubContent,ue as DropdownMenuSubTrigger,Se as DropdownMenuTrigger,fr as Empty,Cr as EmptyContent,sr as EmptyDescription,Mr as EmptyHeader,Pr as EmptyMedia,Ar as EmptyTitle,xe as FileUploader,se as HoverCard,Me as HoverCardContent,Pe as HoverCardTrigger,xr as HtmlInput,fe as ImageUploader,ce as Input,we as Label,ur as LoaderProvider,He as ModeToggle,ye as Pagination,ke as PaginationContent,Fe as PaginationEllipsis,Le as PaginationItem,Be as PaginationLink,Ee as PaginationNext,Ge as PaginationPrevious,Oe as PasswordRulesChecker,Ne as Popover,Ve as PopoverContent,je as PopoverDescription,qe as PopoverHeader,ze as PopoverTitle,Je as PopoverTrigger,Qe as Select,Xe as Separator,Ze as Sheet,_e as SheetBody,$e as SheetClose,eo as SheetContent,oo as SheetDescription,ro as SheetFooter,to as SheetHeader,ao as SheetTitle,io as SheetTrigger,po as Sidebar,lo as SidebarContent,mo as SidebarFooter,go as SidebarGroup,bo as SidebarGroupAction,uo as SidebarGroupContent,So as SidebarGroupLabel,Do as SidebarHeader,xo as SidebarInput,To as SidebarInset,fo as SidebarMenu,Co as SidebarMenuAction,so as SidebarMenuBadge,Mo as SidebarMenuButton,Po as SidebarMenuItem,Ao as SidebarMenuSkeleton,co as SidebarMenuSub,vo as SidebarMenuSubButton,wo as SidebarMenuSubItem,ho as SidebarProvider,Ho as SidebarRail,Io as SidebarSeparator,yo as SidebarTrigger,Lo as SimplePagination,Eo as SimpleTooltip,Ro as Skeleton,Uo as Switch,qo as Table,zo as TableBody,Jo as TableCaption,Ko as TableCell,Qo as TableFooter,Wo as TableHead,Xo as TableHeader,Yo as TableRow,_o as Tabs,$o as TabsContent,er as TabsList,or as TabsTrigger,tr as Textarea,mr as ThemeProvider,Vo as Toaster,ir as Tooltip,nr as TooltipContent,pr as TooltipProvider,lr as TooltipTrigger,M as buttonVariants,Sr as useLoader,ko as useSidebar,gr as useTheme};
1
+ import{AlertDialog as r,AlertDialogAction as t,AlertDialogCancel as a,AlertDialogContent as i,AlertDialogDescription as n,AlertDialogFooter as p,AlertDialogHeader as l,AlertDialogOverlay as d,AlertDialogPortal as m,AlertDialogTitle as g,AlertDialogTrigger as S}from"./alert-dialog.js";import{Alert as u,AlertDescription as D,AlertTitle as x}from"./alert.js";import{Badge as f}from"./badge.js";import{Button as s,buttonVariants as M}from"./button.js";import{Avatar as c,AvatarFallback as A,AvatarImage as v}from"./avatar.js";import{Calendar as F}from"./calendar.js";import{Card as H,CardAction as I,CardContent as y,CardDescription as L,CardFooter as k,CardHeader as E,CardTitle as B}from"./card.js";import{Checkbox as R}from"./checkbox.js";import{DatePicker as U}from"./date-picker.js";import{Dialog as V,DialogClose as j,DialogContent as q,DialogDescription as z,DialogFooter as J,DialogHeader as K,DialogOverlay as Q,DialogPortal as W,DialogTitle as X,DialogTrigger as Y}from"./dialog.js";import{DataLoader as _}from"./data-loader.js";import{DropdownMenu as ee,DropdownMenuCheckboxItem as oe,DropdownMenuContent as re,DropdownMenuGroup as te,DropdownMenuItem as ae,DropdownMenuLabel as ie,DropdownMenuPortal as ne,DropdownMenuRadioGroup as pe,DropdownMenuRadioItem as le,DropdownMenuSeparator as de,DropdownMenuShortcut as me,DropdownMenuSub as ge,DropdownMenuSubContent as Se,DropdownMenuSubTrigger as be,DropdownMenuTrigger as ue}from"./dropdown-menu.js";import{FileUploader as xe}from"./file-uploader.js";import{ImageUploader as fe}from"./image-uploader.js";import{HoverCard as se,HoverCardContent as Me,HoverCardTrigger as Pe}from"./hover-card.js";import{Input as Ae}from"./input.js";import{Label as we}from"./label.js";import{ModeToggle as he}from"./mode-toggle.js";import{Pagination as Ie,PaginationContent as ye,PaginationEllipsis as Le,PaginationItem as ke,PaginationLink as Ee,PaginationNext as Be,PaginationPrevious as Ge}from"./pagination.js";import{PasswordRulesChecker as Oe}from"./password-rules-checker.js";import{Popover as Ne,PopoverContent as Ve,PopoverDescription as je,PopoverHeader as qe,PopoverTitle as ze,PopoverTrigger as Je}from"./popover.js";import{Select as Qe}from"./select.js";import{Separator as Xe}from"./separator.js";import{Sheet as Ze,SheetBody as _e,SheetClose as $e,SheetContent as eo,SheetDescription as oo,SheetFooter as ro,SheetHeader as to,SheetTitle as ao,SheetTrigger as io}from"./sheet.js";import{Sidebar as po,SidebarContent as lo,SidebarFooter as mo,SidebarGroup as go,SidebarGroupAction as So,SidebarGroupContent as bo,SidebarGroupLabel as uo,SidebarHeader as Do,SidebarInput as xo,SidebarInset as To,SidebarMenu as fo,SidebarMenuAction as Co,SidebarMenuBadge as so,SidebarMenuButton as Mo,SidebarMenuItem as Po,SidebarMenuSkeleton as co,SidebarMenuSub as Ao,SidebarMenuSubButton as vo,SidebarMenuSubItem as wo,SidebarProvider as Fo,SidebarRail as ho,SidebarSeparator as Ho,SidebarTrigger as Io,useSidebar as yo}from"./sidebar.js";import{SimplePagination as ko}from"./simple-pagination.js";import{SimpleTooltip as Bo}from"./simple-tooltip.js";import{Skeleton as Ro}from"./skeleton.js";import{Switch as Uo}from"./switch.js";import{Toaster as Vo}from"./sonner.js";import{Table as qo,TableBody as zo,TableCaption as Jo,TableCell as Ko,TableFooter as Qo,TableHead as Wo,TableHeader as Xo,TableRow as Yo}from"./table.js";import{Tabs as _o,TabsContent as $o,TabsList as er,TabsTrigger as or}from"./tabs.js";import{Textarea as tr}from"./textarea.js";import{Tooltip as ir,TooltipContent as nr,TooltipProvider as pr,TooltipTrigger as lr}from"./tooltip.js";import{ThemeProvider as mr,useTheme as gr}from"../providers/theme-provider.js";import{LoaderProvider as br,useLoader as ur}from"../providers/loader-provider.js";import{HtmlInput as xr}from"./html-input.js";import{Empty as fr,EmptyContent as Cr,EmptyDescription as sr,EmptyHeader as Mr,EmptyMedia as Pr,EmptyTitle as cr}from"./empty.js";import{Field as vr,FieldContent as wr,FieldDescription as Fr,FieldError as hr,FieldGroup as Hr,FieldLabel as Ir,FieldLegend as yr,FieldSeparator as Lr,FieldSet as kr,FieldTitle as Er}from"./field.js";export{u as Alert,D as AlertDescription,r as AlertDialog,t as AlertDialogAction,a as AlertDialogCancel,i as AlertDialogContent,n as AlertDialogDescription,p as AlertDialogFooter,l as AlertDialogHeader,d as AlertDialogOverlay,m as AlertDialogPortal,g as AlertDialogTitle,S as AlertDialogTrigger,x as AlertTitle,c as Avatar,A as AvatarFallback,v as AvatarImage,f as Badge,s as Button,F as Calendar,H as Card,I as CardAction,y as CardContent,L as CardDescription,k as CardFooter,E as CardHeader,B as CardTitle,R as Checkbox,_ as DataLoader,U as DatePicker,V as Dialog,j as DialogClose,q as DialogContent,z as DialogDescription,J as DialogFooter,K as DialogHeader,Q as DialogOverlay,W as DialogPortal,X as DialogTitle,Y as DialogTrigger,ee as DropdownMenu,oe as DropdownMenuCheckboxItem,re as DropdownMenuContent,te as DropdownMenuGroup,ae as DropdownMenuItem,ie as DropdownMenuLabel,ne as DropdownMenuPortal,pe as DropdownMenuRadioGroup,le as DropdownMenuRadioItem,de as DropdownMenuSeparator,me as DropdownMenuShortcut,ge as DropdownMenuSub,Se as DropdownMenuSubContent,be as DropdownMenuSubTrigger,ue as DropdownMenuTrigger,fr as Empty,Cr as EmptyContent,sr as EmptyDescription,Mr as EmptyHeader,Pr as EmptyMedia,cr as EmptyTitle,vr as Field,wr as FieldContent,Fr as FieldDescription,hr as FieldError,Hr as FieldGroup,Ir as FieldLabel,yr as FieldLegend,Lr as FieldSeparator,kr as FieldSet,Er as FieldTitle,xe as FileUploader,se as HoverCard,Me as HoverCardContent,Pe as HoverCardTrigger,xr as HtmlInput,fe as ImageUploader,Ae as Input,we as Label,br as LoaderProvider,he as ModeToggle,Ie as Pagination,ye as PaginationContent,Le as PaginationEllipsis,ke as PaginationItem,Ee as PaginationLink,Be as PaginationNext,Ge as PaginationPrevious,Oe as PasswordRulesChecker,Ne as Popover,Ve as PopoverContent,je as PopoverDescription,qe as PopoverHeader,ze as PopoverTitle,Je as PopoverTrigger,Qe as Select,Xe as Separator,Ze as Sheet,_e as SheetBody,$e as SheetClose,eo as SheetContent,oo as SheetDescription,ro as SheetFooter,to as SheetHeader,ao as SheetTitle,io as SheetTrigger,po as Sidebar,lo as SidebarContent,mo as SidebarFooter,go as SidebarGroup,So as SidebarGroupAction,bo as SidebarGroupContent,uo as SidebarGroupLabel,Do as SidebarHeader,xo as SidebarInput,To as SidebarInset,fo as SidebarMenu,Co as SidebarMenuAction,so as SidebarMenuBadge,Mo as SidebarMenuButton,Po as SidebarMenuItem,co as SidebarMenuSkeleton,Ao as SidebarMenuSub,vo as SidebarMenuSubButton,wo as SidebarMenuSubItem,Fo as SidebarProvider,ho as SidebarRail,Ho as SidebarSeparator,Io as SidebarTrigger,ko as SimplePagination,Bo as SimpleTooltip,Ro as Skeleton,Uo as Switch,qo as Table,zo as TableBody,Jo as TableCaption,Ko as TableCell,Qo as TableFooter,Wo as TableHead,Xo as TableHeader,Yo as TableRow,_o as Tabs,$o as TabsContent,er as TabsList,or as TabsTrigger,tr as Textarea,mr as ThemeProvider,Vo as Toaster,ir as Tooltip,nr as TooltipContent,pr as TooltipProvider,lr as TooltipTrigger,M as buttonVariants,ur as useLoader,yo as useSidebar,gr as useTheme};
@@ -1 +1 @@
1
- var I=Object.defineProperty;var r=(e,a)=>I(e,"name",{value:a,configurable:!0});import{jsx as t,jsxs as m}from"react/jsx-runtime";import*as c from"react";import{cva as T}from"class-variance-authority";import{cn as i}from"../lib/utils.js";import{Button as C}from"./button.js";import{Input as D}from"./input.js";import{Separator as B}from"./separator.js";import{Sheet as A,SheetContent as O,SheetHeader as R,SheetTitle as H,SheetDescription as K}from"./sheet.js";import{Skeleton as _}from"./skeleton.js";import{Tooltip as j,TooltipContent as G,TooltipTrigger as L}from"./tooltip.js";import{useIsMobile as $}from"../hooks/use-mobile.js";import{PanelLeftIcon as P}from"lucide-react";import{useRender as x}from"../node_modules/.pnpm/@base-ui_react@1.1.0_@types_react@19.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/use-render/useRender.js";import{mergeProps as v}from"../node_modules/.pnpm/@base-ui_react@1.1.0_@types_react@19.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/merge-props/mergeProps.js";const V="sidebar_state",W=3600*24*7,q="16rem",F="18rem",U="3rem",X="b",k=c.createContext(null);function N(){const e=c.useContext(k);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}r(N,"useSidebar");function ce({defaultOpen:e=!0,open:a,onOpenChange:n,className:s,style:o,children:p,...g}){const l=$(),[f,u]=c.useState(!1),[E,z]=c.useState(e),h=a??E,w=c.useCallback(d=>{const b=typeof d=="function"?d(h):d;n?n(b):z(b),document.cookie=`${V}=${b}; path=/; max-age=${W}`},[n,h]),S=c.useCallback(()=>l?u(d=>!d):w(d=>!d),[l,w,u]);c.useEffect(()=>{const d=r(b=>{b.key===X&&(b.metaKey||b.ctrlKey)&&(b.preventDefault(),S())},"handleKeyDown");return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[S]);const y=h?"expanded":"collapsed",M=c.useMemo(()=>({state:y,open:h,setOpen:w,isMobile:l,openMobile:f,setOpenMobile:u,toggleSidebar:S}),[y,h,w,l,f,u,S]);return t(k.Provider,{value:M,children:t("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":q,"--sidebar-width-icon":U,...o},className:i("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",s),...g,children:p})})}r(ce,"SidebarProvider");function be({side:e="left",variant:a="sidebar",collapsible:n="offExamples",className:s,children:o,...p}){const{isMobile:g,state:l,openMobile:f,setOpenMobile:u}=N();return n==="none"?t("div",{"data-slot":"sidebar",className:i("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",s),...p,children:o}):g?t(A,{open:f,onOpenChange:u,...p,children:m(O,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":F},side:e,children:[m(R,{className:"sr-only",children:[t(H,{children:"Sidebar"}),t(K,{children:"Displays the mobile sidebar."})]}),t("div",{className:"flex h-full w-full flex-col",children:o})]})}):m("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":a,"data-side":e,"data-slot":"sidebar",children:[t("div",{"data-slot":"sidebar-gap",className:i("transition-[width] duration-200 ease-linear relative w-(--sidebar-width) bg-transparent","group-data-[collapsible=offExamples]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),t("div",{"data-slot":"sidebar-container",className:i("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"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),...p,children:t("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:ring-sidebar-border group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 flex size-full flex-col",children:o})})]})}r(be,"Sidebar");function pe({className:e,onClick:a,...n}){const{toggleSidebar:s}=N();return m(C,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",color:"dark",className:i(e),onClick:r(o=>{a?.(o),s()},"onClick"),...n,children:[t(P,{}),t("span",{className:"sr-only",children:"Toggle Sidebar"})]})}r(pe,"SidebarTrigger");function fe({className:e,...a}){const{toggleSidebar:n}=N();return t("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:i("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=offExamples]:bg-sidebar group-data-[collapsible=offExamples]:translate-x-0 group-data-[collapsible=offExamples]:after:left-full","[[data-side=left][data-collapsible=offExamples]_&]:-right-2","[[data-side=right][data-collapsible=offExamples]_&]:-left-2",e),...a})}r(fe,"SidebarRail");function me({className:e,...a}){return t("main",{"data-slot":"sidebar-inset",className:i("bg-background 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 relative flex w-full flex-1 flex-col",e),...a})}r(me,"SidebarInset");function ge({className:e,...a}){return t(D,{"data-slot":"sidebar-input","data-sidebar":"input",className:i("bg-background h-8 w-full shadow-none",e),...a})}r(ge,"SidebarInput");function he({className:e,...a}){return t("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:i("gap-2 p-2 flex flex-col",e),...a})}r(he,"SidebarHeader");function xe({className:e,...a}){return t("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:i("gap-2 p-2 flex flex-col",e),...a})}r(xe,"SidebarFooter");function ve({className:e,...a}){return t(B,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:i("bg-sidebar-border mx-2 w-auto",e),...a})}r(ve,"SidebarSeparator");function we({className:e,...a}){return t("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:i("no-scrollbar gap-2 flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...a})}r(we,"SidebarContent");function Se({className:e,...a}){return t("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:i("p-2 relative flex w-full min-w-0 flex-col",e),...a})}r(Se,"SidebarGroup");function Ne({className:e,render:a,...n}){return x({defaultTagName:"div",props:v({className:i("text-sidebar-foreground/70 ring-sidebar-ring h-8 rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0",e)},n),render:a,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}r(Ne,"SidebarGroupLabel");function ye({className:e,render:a,...n}){return x({defaultTagName:"button",props:v({className:i("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 w-5 rounded-md p-0 focus-visible:ring-2 [&>svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform [&>svg]:shrink-0 after:absolute after:-inset-2 md:after:hidden group-data-[collapsible=icon]:hidden",e)},n),render:a,state:{slot:"sidebar-group-action",sidebar:"group-action"}})}r(ye,"SidebarGroupAction");function _e({className:e,...a}){return t("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:i("text-sm w-full",e),...a})}r(_e,"SidebarGroupContent");function ke({className:e,...a}){return t("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:i("gap-1 flex w-full min-w-0 flex-col",e),...a})}r(ke,"SidebarMenu");function Ee({className:e,...a}){return t("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:i("group/menu-item relative",e),...a})}r(Ee,"SidebarMenuItem");const Y=T("ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left text-sm transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button 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",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ze({render:e,isActive:a=!1,variant:n="default",size:s="default",tooltip:o,className:p,...g}){const{isMobile:l,state:f}=N(),u=x({defaultTagName:"button",props:v({className:i(Y({variant:n,size:s}),p)},g),render:o?L:e,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:s,active:a}});return o?(typeof o=="string"&&(o={children:o}),m(j,{children:[u,t(G,{side:"right",align:"center",hidden:f!=="collapsed"||l,...o})]})):u}r(ze,"SidebarMenuButton");function Me({className:e,render:a,showOnHover:n=!1,...s}){return x({defaultTagName:"button",props:v({className:i("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 aspect-square w-5 rounded-md p-0 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 focus-visible:ring-2 [&>svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0",n&&"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0",e)},s),render:a,state:{slot:"sidebar-menu-action",sidebar:"menu-action"}})}r(Me,"SidebarMenuAction");function Ie({className:e,...a}){return t("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:i("text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 rounded-md px-1 text-xs font-medium 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 flex items-center justify-center tabular-nums select-none group-data-[collapsible=icon]:hidden",e),...a})}r(Ie,"SidebarMenuBadge");function Te({className:e,showIcon:a=!1,...n}){const[s]=c.useState(()=>`${Math.floor(Math.random()*40)+50}%`);return m("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:i("h-8 gap-2 rounded-md px-2 flex items-center",e),...n,children:[a&&t(_,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),t(_,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})}r(Te,"SidebarMenuSkeleton");function Ce({className:e,...a}){return t("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:i("border-sidebar-border mx-3.5 translate-x-px gap-1 border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden flex min-w-0 flex-col",e),...a})}r(Ce,"SidebarMenuSub");function De({className:e,...a}){return t("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:i("group/menu-sub-item relative",e),...a})}r(De,"SidebarMenuSubItem");function Be({render:e,size:a="md",isActive:n=!1,className:s,...o}){return x({defaultTagName:"a",props:v({className:i("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:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-sm data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0",s)},o),render:e,state:{slot:"sidebar-menu-sub-button",sidebar:"menu-sub-button",size:a,active:n}})}r(Be,"SidebarMenuSubButton");export{be as Sidebar,we as SidebarContent,xe as SidebarFooter,Se as SidebarGroup,ye as SidebarGroupAction,_e as SidebarGroupContent,Ne as SidebarGroupLabel,he as SidebarHeader,ge as SidebarInput,me as SidebarInset,ke as SidebarMenu,Me as SidebarMenuAction,Ie as SidebarMenuBadge,ze as SidebarMenuButton,Ee as SidebarMenuItem,Te as SidebarMenuSkeleton,Ce as SidebarMenuSub,Be as SidebarMenuSubButton,De as SidebarMenuSubItem,ce as SidebarProvider,fe as SidebarRail,ve as SidebarSeparator,pe as SidebarTrigger,N as useSidebar};
1
+ var I=Object.defineProperty;var r=(e,a)=>I(e,"name",{value:a,configurable:!0});import{jsx as t,jsxs as m}from"react/jsx-runtime";import*as c from"react";import{cva as T}from"class-variance-authority";import{cn as i}from"../lib/utils.js";import{Button as C}from"./button.js";import{Input as D}from"./input.js";import{Separator as B}from"./separator.js";import{Sheet as A,SheetContent as O,SheetHeader as R,SheetTitle as H,SheetDescription as K}from"./sheet.js";import{Skeleton as _}from"./skeleton.js";import{Tooltip as j,TooltipTrigger as G,TooltipContent as L}from"./tooltip.js";import{useIsMobile as $}from"../hooks/use-mobile.js";import{PanelLeftIcon as P}from"lucide-react";import{useRender as x}from"../node_modules/.pnpm/@base-ui_react@1.1.0_@types_react@19.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/use-render/useRender.js";import{mergeProps as v}from"../node_modules/.pnpm/@base-ui_react@1.1.0_@types_react@19.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/merge-props/mergeProps.js";const V="sidebar_state",W=3600*24*7,q="16rem",F="18rem",U="3rem",X="b",k=c.createContext(null);function N(){const e=c.useContext(k);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}r(N,"useSidebar");function ce({defaultOpen:e=!0,open:a,onOpenChange:n,className:o,style:s,children:p,...g}){const l=$(),[f,u]=c.useState(!1),[E,z]=c.useState(e),h=a??E,w=c.useCallback(d=>{const b=typeof d=="function"?d(h):d;n?n(b):z(b),document.cookie=`${V}=${b}; path=/; max-age=${W}`},[n,h]),S=c.useCallback(()=>l?u(d=>!d):w(d=>!d),[l,w,u]);c.useEffect(()=>{const d=r(b=>{b.key===X&&(b.metaKey||b.ctrlKey)&&(b.preventDefault(),S())},"handleKeyDown");return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[S]);const y=h?"expanded":"collapsed",M=c.useMemo(()=>({state:y,open:h,setOpen:w,isMobile:l,openMobile:f,setOpenMobile:u,toggleSidebar:S}),[y,h,w,l,f,u,S]);return t(k.Provider,{value:M,children:t("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":q,"--sidebar-width-icon":U,...s},className:i("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",o),...g,children:p})})}r(ce,"SidebarProvider");function be({side:e="left",variant:a="sidebar",collapsible:n="offExamples",className:o,children:s,...p}){const{isMobile:g,state:l,openMobile:f,setOpenMobile:u}=N();return n==="none"?t("div",{"data-slot":"sidebar",className:i("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",o),...p,children:s}):g?t(A,{open:f,onOpenChange:u,...p,children:m(O,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":F},side:e,children:[m(R,{className:"sr-only",children:[t(H,{children:"Sidebar"}),t(K,{children:"Displays the mobile sidebar."})]}),t("div",{className:"flex h-full w-full flex-col",children:s})]})}):m("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":a,"data-side":e,"data-slot":"sidebar",children:[t("div",{"data-slot":"sidebar-gap",className:i("transition-[width] duration-200 ease-linear relative w-(--sidebar-width) bg-transparent","group-data-[collapsible=offExamples]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),t("div",{"data-slot":"sidebar-container",className:i("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"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",o),...p,children:t("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:ring-sidebar-border group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 flex size-full flex-col",children:s})})]})}r(be,"Sidebar");function pe({className:e,onClick:a,...n}){const{toggleSidebar:o}=N();return m(C,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",color:"dark",className:i(e),onClick:r(s=>{a?.(s),o()},"onClick"),...n,children:[t(P,{}),t("span",{className:"sr-only",children:"Toggle Sidebar"})]})}r(pe,"SidebarTrigger");function fe({className:e,...a}){const{toggleSidebar:n}=N();return t("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:i("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=offExamples]:bg-sidebar group-data-[collapsible=offExamples]:translate-x-0 group-data-[collapsible=offExamples]:after:left-full","[[data-side=left][data-collapsible=offExamples]_&]:-right-2","[[data-side=right][data-collapsible=offExamples]_&]:-left-2",e),...a})}r(fe,"SidebarRail");function me({className:e,...a}){return t("main",{"data-slot":"sidebar-inset",className:i("bg-background 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 relative flex w-full flex-1 flex-col",e),...a})}r(me,"SidebarInset");function ge({className:e,...a}){return t(D,{"data-slot":"sidebar-input","data-sidebar":"input",className:i("bg-background h-8 w-full shadow-none",e),...a})}r(ge,"SidebarInput");function he({className:e,...a}){return t("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:i("gap-2 p-2 flex flex-col",e),...a})}r(he,"SidebarHeader");function xe({className:e,...a}){return t("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:i("gap-2 p-2 flex flex-col",e),...a})}r(xe,"SidebarFooter");function ve({className:e,...a}){return t(B,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:i("bg-sidebar-border mx-2 w-auto",e),...a})}r(ve,"SidebarSeparator");function we({className:e,...a}){return t("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:i("no-scrollbar gap-2 flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...a})}r(we,"SidebarContent");function Se({className:e,...a}){return t("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:i("p-2 relative flex w-full min-w-0 flex-col",e),...a})}r(Se,"SidebarGroup");function Ne({className:e,render:a,...n}){return x({defaultTagName:"div",props:v({className:i("text-sidebar-foreground/70 ring-sidebar-ring h-8 rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0",e)},n),render:a,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}r(Ne,"SidebarGroupLabel");function ye({className:e,render:a,...n}){return x({defaultTagName:"button",props:v({className:i("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 w-5 rounded-md p-0 focus-visible:ring-2 [&>svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform [&>svg]:shrink-0 after:absolute after:-inset-2 md:after:hidden group-data-[collapsible=icon]:hidden",e)},n),render:a,state:{slot:"sidebar-group-action",sidebar:"group-action"}})}r(ye,"SidebarGroupAction");function _e({className:e,...a}){return t("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:i("text-sm w-full",e),...a})}r(_e,"SidebarGroupContent");function ke({className:e,...a}){return t("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:i("gap-1 flex w-full min-w-0 flex-col",e),...a})}r(ke,"SidebarMenu");function Ee({className:e,...a}){return t("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:i("group/menu-item relative",e),...a})}r(Ee,"SidebarMenuItem");const Y=T("ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left text-sm transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button 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",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ze({render:e,isActive:a=!1,variant:n="default",size:o="default",tooltip:s,className:p,...g}){const{isMobile:l,state:f}=N(),u=x({defaultTagName:"button",props:v({className:i(Y({variant:n,size:o}),p)},g),render:e||t("button",{}),state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:o,active:a}});return s?(typeof s=="string"&&(s={children:s}),m(j,{children:[t(G,{render:u}),t(L,{side:"right",align:"center",hidden:f!=="collapsed"||l,...s})]})):u}r(ze,"SidebarMenuButton");function Me({className:e,render:a,showOnHover:n=!1,...o}){return x({defaultTagName:"button",props:v({className:i("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 aspect-square w-5 rounded-md p-0 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 focus-visible:ring-2 [&>svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0",n&&"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0",e)},o),render:a,state:{slot:"sidebar-menu-action",sidebar:"menu-action"}})}r(Me,"SidebarMenuAction");function Ie({className:e,...a}){return t("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:i("text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 rounded-md px-1 text-xs font-medium 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 flex items-center justify-center tabular-nums select-none group-data-[collapsible=icon]:hidden",e),...a})}r(Ie,"SidebarMenuBadge");function Te({className:e,showIcon:a=!1,...n}){const[o]=c.useState(()=>`${Math.floor(Math.random()*40)+50}%`);return m("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:i("h-8 gap-2 rounded-md px-2 flex items-center",e),...n,children:[a&&t(_,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),t(_,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}r(Te,"SidebarMenuSkeleton");function Ce({className:e,...a}){return t("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:i("border-sidebar-border mx-3.5 translate-x-px gap-1 border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden flex min-w-0 flex-col",e),...a})}r(Ce,"SidebarMenuSub");function De({className:e,...a}){return t("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:i("group/menu-sub-item relative",e),...a})}r(De,"SidebarMenuSubItem");function Be({render:e,size:a="md",isActive:n=!1,className:o,...s}){return x({defaultTagName:"a",props:v({className:i("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:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-sm data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0",o)},s),render:e,state:{slot:"sidebar-menu-sub-button",sidebar:"menu-sub-button",size:a,active:n}})}r(Be,"SidebarMenuSubButton");export{be as Sidebar,we as SidebarContent,xe as SidebarFooter,Se as SidebarGroup,ye as SidebarGroupAction,_e as SidebarGroupContent,Ne as SidebarGroupLabel,he as SidebarHeader,ge as SidebarInput,me as SidebarInset,ke as SidebarMenu,Me as SidebarMenuAction,Ie as SidebarMenuBadge,ze as SidebarMenuButton,Ee as SidebarMenuItem,Te as SidebarMenuSkeleton,Ce as SidebarMenuSub,Be as SidebarMenuSubButton,De as SidebarMenuSubItem,ce as SidebarProvider,fe as SidebarRail,ve as SidebarSeparator,pe as SidebarTrigger,N as useSidebar};
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "https://github.com/F1na/fina-react-ds"
6
6
  },
7
7
  "private": false,
8
- "version": "2.0.0",
8
+ "version": "2.0.2",
9
9
  "type": "module",
10
10
  "files": [
11
11
  "dist"