@xebecship/ui 0.0.9 → 0.0.11

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/README.md CHANGED
@@ -41,19 +41,13 @@ Ensure your project has the following peer dependencies installed:
41
41
 
42
42
  ### **1. Import Styles**
43
43
 
44
- Import the library's CSS at the root of your application (e.g., main.tsx or \_app.tsx). This includes the Xebec brand theme and Tailwind variables.
45
-
46
- TypeScript
47
-
48
- import "@xebecship/ui/style.css";
49
-
50
- ### **2. Configure Tailwind v4**
51
-
52
- Since @xebecship/ui uses Tailwind CSS v4, ensure your tailwind.config or CSS entry point is set up to process the components. In v4, you can simply import the library's theme variables into your main CSS file:
44
+ Import the library's CSS and the XebecShip theme in the base css file of your application. This includes the Xebec brand theme, Shadcn variables, and components styles.
53
45
 
54
46
  ```css
55
- @import "tailwindcss";
56
- @import "@xebecship/ui/style.css";
47
+ // @import "tailwindcss"; // If you're using tailwind css
48
+ // @import "tw-animate-css"; // If you're using tailwind animate
49
+ @import "@xebecship/ui/style.css"; // Components CSS
50
+ @import "@xebecship/ui/style.css"; // XebecShip theme & brand identity
57
51
  ```
58
52
 
59
53
  ## **Usage**
@@ -100,4 +94,4 @@ The library uses CSS variables for theming. You can override the Xebec brand col
100
94
 
101
95
  ## **License**
102
96
 
103
- MIT © Xebec Ship
97
+ MIT © XebecShip
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- /* empty css */import{cn as o}from"./shadcn/lib/utils.js";import{useIsMobile as s}from"./shadcn/hooks/use-mobile.js";import{Accordion as n,AccordionContent as m,AccordionItem as r,AccordionTrigger as t}from"./shadcn/components/ui/accordion.js";import{AlertDialog as i,AlertDialogAction as p,AlertDialogCancel as c,AlertDialogContent as e,AlertDialogDescription as a,AlertDialogFooter as d,AlertDialogHeader as u,AlertDialogMedia as h,AlertDialogOverlay as f,AlertDialogPortal as j,AlertDialogTitle as l,AlertDialogTrigger as b}from"./shadcn/components/ui/alert-dialog.js";import{Alert as g,AlertAction as k,AlertDescription as v,AlertTitle as x}from"./shadcn/components/ui/alert.js";import{AspectRatio as w}from"./shadcn/components/ui/aspect-ratio.js";import{Avatar as y,AvatarBadge as z,AvatarFallback as q,AvatarGroup as A,AvatarGroupCount as B,AvatarImage as C}from"./shadcn/components/ui/avatar.js";import{Badge as D,badgeVariants as E}from"./shadcn/components/ui/badge.js";import{Breadcrumb as F,BreadcrumbEllipsis as G,BreadcrumbItem as H,BreadcrumbLink as I,BreadcrumbList as J,BreadcrumbPage as K,BreadcrumbSeparator as L}from"./shadcn/components/ui/breadcrumb.js";import{ButtonGroup as M,ButtonGroupSeparator as N,ButtonGroupText as O,buttonGroupVariants as P}from"./shadcn/components/ui/button-group.js";import{Button as Q,buttonVariants as R}from"./shadcn/components/ui/button.js";import{Calendar as S,CalendarDayButton as T}from"./shadcn/components/ui/calendar.js";import{Card as U,CardAction as V,CardContent as W,CardDescription as X,CardFooter as Y,CardHeader as Z,CardTitle as $}from"./shadcn/components/ui/card.js";import{Carousel as _,CarouselContent as oo,CarouselItem as so,CarouselNext as no,CarouselPrevious as mo,useCarousel as ro}from"./shadcn/components/ui/carousel.js";import{ChartContainer as to,ChartLegend as io,ChartLegendContent as po,ChartStyle as co,ChartTooltip as eo,ChartTooltipContent as ao}from"./shadcn/components/ui/chart.js";import{Checkbox as uo}from"./shadcn/components/ui/checkbox.js";import{Collapsible as ho,CollapsibleContent as fo,CollapsibleTrigger as jo}from"./shadcn/components/ui/collapsible.js";import{Command as lo,CommandDialog as bo,CommandEmpty as go,CommandGroup as ko,CommandInput as vo,CommandItem as xo,CommandList as wo,CommandSeparator as yo,CommandShortcut as zo}from"./shadcn/components/ui/command.js";import{ContextMenu as qo,ContextMenuCheckboxItem as Ao,ContextMenuContent as Bo,ContextMenuGroup as Co,ContextMenuItem as Do,ContextMenuLabel as Eo,ContextMenuPortal as Fo,ContextMenuRadioGroup as Go,ContextMenuRadioItem as Ho,ContextMenuSeparator as Io,ContextMenuShortcut as Jo,ContextMenuSub as Ko,ContextMenuSubContent as Lo,ContextMenuSubTrigger as Mo,ContextMenuTrigger as No}from"./shadcn/components/ui/context-menu.js";import{Dialog as Oo,DialogClose as Po,DialogContent as Qo,DialogDescription as Ro,DialogFooter as So,DialogHeader as To,DialogOverlay as Uo,DialogPortal as Vo,DialogTitle as Wo,DialogTrigger as Xo}from"./shadcn/components/ui/dialog.js";import{Drawer as Yo,DrawerClose as Zo,DrawerContent as $o,DrawerDescription as _o,DrawerFooter as os,DrawerHeader as ss,DrawerOverlay as ns,DrawerPortal as ms,DrawerTitle as rs,DrawerTrigger as ts}from"./shadcn/components/ui/drawer.js";import{DropdownMenu as is,DropdownMenuCheckboxItem as ps,DropdownMenuContent as cs,DropdownMenuGroup as es,DropdownMenuItem as as,DropdownMenuLabel as ds,DropdownMenuPortal as us,DropdownMenuRadioGroup as hs,DropdownMenuRadioItem as fs,DropdownMenuSeparator as js,DropdownMenuShortcut as ls,DropdownMenuSub as bs,DropdownMenuSubContent as gs,DropdownMenuSubTrigger as ks,DropdownMenuTrigger as vs}from"./shadcn/components/ui/dropdown-menu.js";import{Empty as xs,EmptyContent as ws,EmptyDescription as ys,EmptyHeader as zs,EmptyMedia as qs,EmptyTitle as As}from"./shadcn/components/ui/empty.js";import{Field as Bs,FieldContent as Cs,FieldDescription as Ds,FieldError as Es,FieldGroup as Fs,FieldLabel as Gs,FieldLegend as Hs,FieldSeparator as Is,FieldSet as Js,FieldTitle as Ks}from"./shadcn/components/ui/field.js";import{HoverCard as Ls,HoverCardContent as Ms,HoverCardTrigger as Ns}from"./shadcn/components/ui/hover-card.js";import{InputGroup as Os,InputGroupAddon as Ps,InputGroupButton as Qs,InputGroupInput as Rs,InputGroupText as Ss,InputGroupTextarea as Ts}from"./shadcn/components/ui/input-group.js";import{InputOTP as Us,InputOTPGroup as Vs,InputOTPSeparator as Ws,InputOTPSlot as Xs}from"./shadcn/components/ui/input-otp.js";import{Input as Ys}from"./shadcn/components/ui/input.js";import{Item as Zs,ItemActions as $s,ItemContent as _s,ItemDescription as on,ItemFooter as sn,ItemGroup as nn,ItemHeader as mn,ItemMedia as rn,ItemSeparator as tn,ItemTitle as pn}from"./shadcn/components/ui/item.js";import{Kbd as cn,KbdGroup as en}from"./shadcn/components/ui/kbd.js";import{Label as an}from"./shadcn/components/ui/label.js";import{Menubar as dn,MenubarCheckboxItem as un,MenubarContent as hn,MenubarGroup as fn,MenubarItem as jn,MenubarLabel as ln,MenubarMenu as bn,MenubarPortal as gn,MenubarRadioGroup as kn,MenubarRadioItem as vn,MenubarSeparator as xn,MenubarShortcut as wn,MenubarSub as yn,MenubarSubContent as zn,MenubarSubTrigger as qn,MenubarTrigger as An}from"./shadcn/components/ui/menubar.js";import{NavigationMenu as Bn,NavigationMenuContent as Cn,NavigationMenuIndicator as Dn,NavigationMenuItem as En,NavigationMenuLink as Fn,NavigationMenuList as Gn,NavigationMenuPositioner as Hn,NavigationMenuTrigger as In,navigationMenuTriggerStyle as Jn}from"./shadcn/components/ui/navigation-menu.js";import{Pagination as Kn,PaginationContent as Ln,PaginationEllipsis as Mn,PaginationItem as Nn,PaginationLink as On,PaginationNext as Pn,PaginationPrevious as Qn}from"./shadcn/components/ui/pagination.js";import{Popover as Rn,PopoverContent as Sn,PopoverDescription as Tn,PopoverHeader as Un,PopoverTitle as Vn,PopoverTrigger as Wn}from"./shadcn/components/ui/popover.js";import{Progress as Xn,ProgressIndicator as Yn,ProgressLabel as Zn,ProgressTrack as $n,ProgressValue as _n}from"./shadcn/components/ui/progress.js";import{RadioGroup as om,RadioGroupItem as sm}from"./shadcn/components/ui/radio-group.js";import{ResizableHandle as nm,ResizablePanel as mm,ResizablePanelGroup as rm}from"./shadcn/components/ui/resizable.js";import{ScrollArea as tm,ScrollBar as im}from"./shadcn/components/ui/scroll-area.js";import{Select as pm,SelectContent as cm,SelectGroup as em,SelectItem as am,SelectLabel as dm,SelectScrollDownButton as um,SelectScrollUpButton as hm,SelectSeparator as fm,SelectTrigger as jm,SelectValue as lm}from"./shadcn/components/ui/select.js";import{Separator as bm}from"./shadcn/components/ui/separator.js";import{Sheet as gm,SheetClose as km,SheetContent as vm,SheetDescription as xm,SheetFooter as wm,SheetHeader as ym,SheetTitle as zm,SheetTrigger as qm}from"./shadcn/components/ui/sheet.js";import{Sidebar as Am,SidebarContent as Bm,SidebarFooter as Cm,SidebarGroup as Dm,SidebarGroupAction as Em,SidebarGroupContent as Fm,SidebarGroupLabel as Gm,SidebarHeader as Hm,SidebarInput as Im,SidebarInset as Jm,SidebarMenu as Km,SidebarMenuAction as Lm,SidebarMenuBadge as Mm,SidebarMenuButton as Nm,SidebarMenuItem as Om,SidebarMenuSkeleton as Pm,SidebarMenuSub as Qm,SidebarMenuSubButton as Rm,SidebarMenuSubItem as Sm,SidebarProvider as Tm,SidebarRail as Um,SidebarSeparator as Vm,SidebarTrigger as Wm,useSidebar as Xm}from"./shadcn/components/ui/sidebar.js";import{Skeleton as Ym}from"./shadcn/components/ui/skeleton.js";import{Slider as Zm}from"./shadcn/components/ui/slider.js";import{Toaster as $m}from"./shadcn/components/ui/sonner.js";import{Spinner as _m}from"./shadcn/components/ui/spinner.js";import{Switch as or}from"./shadcn/components/ui/switch.js";import{Table as sr,TableBody as nr,TableCaption as mr,TableCell as rr,TableFooter as tr,TableHead as ir,TableHeader as pr,TableRow as cr}from"./shadcn/components/ui/table.js";import{Tabs as er,TabsContent as ar,TabsList as dr,TabsTrigger as ur,tabsListVariants as hr}from"./shadcn/components/ui/tabs.js";import{Textarea as fr}from"./shadcn/components/ui/textarea.js";import{ToggleGroup as jr,ToggleGroupItem as lr}from"./shadcn/components/ui/toggle-group.js";import{Toggle as br,toggleVariants as gr}from"./shadcn/components/ui/toggle.js";import{Tooltip as kr,TooltipContent as vr,TooltipProvider as xr,TooltipTrigger as wr}from"./shadcn/components/ui/tooltip.js";import{toast as yr}from"sonner";export{n as Accordion,m as AccordionContent,r as AccordionItem,t as AccordionTrigger,g as Alert,k as AlertAction,v as AlertDescription,i as AlertDialog,p as AlertDialogAction,c as AlertDialogCancel,e as AlertDialogContent,a as AlertDialogDescription,d as AlertDialogFooter,u as AlertDialogHeader,h as AlertDialogMedia,f as AlertDialogOverlay,j as AlertDialogPortal,l as AlertDialogTitle,b as AlertDialogTrigger,x as AlertTitle,w as AspectRatio,y as Avatar,z as AvatarBadge,q as AvatarFallback,A as AvatarGroup,B as AvatarGroupCount,C as AvatarImage,D as Badge,F as Breadcrumb,G as BreadcrumbEllipsis,H as BreadcrumbItem,I as BreadcrumbLink,J as BreadcrumbList,K as BreadcrumbPage,L as BreadcrumbSeparator,Q as Button,M as ButtonGroup,N as ButtonGroupSeparator,O as ButtonGroupText,S as Calendar,T as CalendarDayButton,U as Card,V as CardAction,W as CardContent,X as CardDescription,Y as CardFooter,Z as CardHeader,$ as CardTitle,_ as Carousel,oo as CarouselContent,so as CarouselItem,no as CarouselNext,mo as CarouselPrevious,to as ChartContainer,io as ChartLegend,po as ChartLegendContent,co as ChartStyle,eo as ChartTooltip,ao as ChartTooltipContent,uo as Checkbox,ho as Collapsible,fo as CollapsibleContent,jo as CollapsibleTrigger,lo as Command,bo as CommandDialog,go as CommandEmpty,ko as CommandGroup,vo as CommandInput,xo as CommandItem,wo as CommandList,yo as CommandSeparator,zo as CommandShortcut,qo as ContextMenu,Ao as ContextMenuCheckboxItem,Bo as ContextMenuContent,Co as ContextMenuGroup,Do as ContextMenuItem,Eo as ContextMenuLabel,Fo as ContextMenuPortal,Go as ContextMenuRadioGroup,Ho as ContextMenuRadioItem,Io as ContextMenuSeparator,Jo as ContextMenuShortcut,Ko as ContextMenuSub,Lo as ContextMenuSubContent,Mo as ContextMenuSubTrigger,No as ContextMenuTrigger,Oo as Dialog,Po as DialogClose,Qo as DialogContent,Ro as DialogDescription,So as DialogFooter,To as DialogHeader,Uo as DialogOverlay,Vo as DialogPortal,Wo as DialogTitle,Xo as DialogTrigger,Yo as Drawer,Zo as DrawerClose,$o as DrawerContent,_o as DrawerDescription,os as DrawerFooter,ss as DrawerHeader,ns as DrawerOverlay,ms as DrawerPortal,rs as DrawerTitle,ts as DrawerTrigger,is as DropdownMenu,ps as DropdownMenuCheckboxItem,cs as DropdownMenuContent,es as DropdownMenuGroup,as as DropdownMenuItem,ds as DropdownMenuLabel,us as DropdownMenuPortal,hs as DropdownMenuRadioGroup,fs as DropdownMenuRadioItem,js as DropdownMenuSeparator,ls as DropdownMenuShortcut,bs as DropdownMenuSub,gs as DropdownMenuSubContent,ks as DropdownMenuSubTrigger,vs as DropdownMenuTrigger,xs as Empty,ws as EmptyContent,ys as EmptyDescription,zs as EmptyHeader,qs as EmptyMedia,As as EmptyTitle,Bs as Field,Cs as FieldContent,Ds as FieldDescription,Es as FieldError,Fs as FieldGroup,Gs as FieldLabel,Hs as FieldLegend,Is as FieldSeparator,Js as FieldSet,Ks as FieldTitle,Ls as HoverCard,Ms as HoverCardContent,Ns as HoverCardTrigger,Ys as Input,Os as InputGroup,Ps as InputGroupAddon,Qs as InputGroupButton,Rs as InputGroupInput,Ss as InputGroupText,Ts as InputGroupTextarea,Us as InputOTP,Vs as InputOTPGroup,Ws as InputOTPSeparator,Xs as InputOTPSlot,Zs as Item,$s as ItemActions,_s as ItemContent,on as ItemDescription,sn as ItemFooter,nn as ItemGroup,mn as ItemHeader,rn as ItemMedia,tn as ItemSeparator,pn as ItemTitle,cn as Kbd,en as KbdGroup,an as Label,dn as Menubar,un as MenubarCheckboxItem,hn as MenubarContent,fn as MenubarGroup,jn as MenubarItem,ln as MenubarLabel,bn as MenubarMenu,gn as MenubarPortal,kn as MenubarRadioGroup,vn as MenubarRadioItem,xn as MenubarSeparator,wn as MenubarShortcut,yn as MenubarSub,zn as MenubarSubContent,qn as MenubarSubTrigger,An as MenubarTrigger,Bn as NavigationMenu,Cn as NavigationMenuContent,Dn as NavigationMenuIndicator,En as NavigationMenuItem,Fn as NavigationMenuLink,Gn as NavigationMenuList,Hn as NavigationMenuPositioner,In as NavigationMenuTrigger,Kn as Pagination,Ln as PaginationContent,Mn as PaginationEllipsis,Nn as PaginationItem,On as PaginationLink,Pn as PaginationNext,Qn as PaginationPrevious,Rn as Popover,Sn as PopoverContent,Tn as PopoverDescription,Un as PopoverHeader,Vn as PopoverTitle,Wn as PopoverTrigger,Xn as Progress,Yn as ProgressIndicator,Zn as ProgressLabel,$n as ProgressTrack,_n as ProgressValue,om as RadioGroup,sm as RadioGroupItem,nm as ResizableHandle,mm as ResizablePanel,rm as ResizablePanelGroup,tm as ScrollArea,im as ScrollBar,pm as Select,cm as SelectContent,em as SelectGroup,am as SelectItem,dm as SelectLabel,um as SelectScrollDownButton,hm as SelectScrollUpButton,fm as SelectSeparator,jm as SelectTrigger,lm as SelectValue,bm as Separator,gm as Sheet,km as SheetClose,vm as SheetContent,xm as SheetDescription,wm as SheetFooter,ym as SheetHeader,zm as SheetTitle,qm as SheetTrigger,Am as Sidebar,Bm as SidebarContent,Cm as SidebarFooter,Dm as SidebarGroup,Em as SidebarGroupAction,Fm as SidebarGroupContent,Gm as SidebarGroupLabel,Hm as SidebarHeader,Im as SidebarInput,Jm as SidebarInset,Km as SidebarMenu,Lm as SidebarMenuAction,Mm as SidebarMenuBadge,Nm as SidebarMenuButton,Om as SidebarMenuItem,Pm as SidebarMenuSkeleton,Qm as SidebarMenuSub,Rm as SidebarMenuSubButton,Sm as SidebarMenuSubItem,Tm as SidebarProvider,Um as SidebarRail,Vm as SidebarSeparator,Wm as SidebarTrigger,Ym as Skeleton,Zm as Slider,_m as Spinner,or as Switch,sr as Table,nr as TableBody,mr as TableCaption,rr as TableCell,tr as TableFooter,ir as TableHead,pr as TableHeader,cr as TableRow,er as Tabs,ar as TabsContent,dr as TabsList,ur as TabsTrigger,fr as Textarea,$m as Toaster,br as Toggle,jr as ToggleGroup,lr as ToggleGroupItem,kr as Tooltip,vr as TooltipContent,xr as TooltipProvider,wr as TooltipTrigger,E as badgeVariants,P as buttonGroupVariants,R as buttonVariants,o as cn,Jn as navigationMenuTriggerStyle,hr as tabsListVariants,yr as toast,gr as toggleVariants,ro as useCarousel,s as useIsMobile,Xm as useSidebar};
1
+ /* empty css */import{cn as o}from"./shadcn/lib/utils.js";import{useIsMobile as n}from"./shadcn/hooks/use-mobile.js";import{Accordion as s,AccordionContent as m,AccordionItem as r,AccordionTrigger as t}from"./shadcn/components/ui/accordion.js";import{AlertDialog as i,AlertDialogAction as p,AlertDialogCancel as c,AlertDialogContent as e,AlertDialogDescription as a,AlertDialogFooter as d,AlertDialogHeader as u,AlertDialogMedia as h,AlertDialogOverlay as f,AlertDialogPortal as j,AlertDialogTitle as l,AlertDialogTrigger as b}from"./shadcn/components/ui/alert-dialog.js";import{Alert as g,AlertAction as x,AlertDescription as k,AlertTitle as v}from"./shadcn/components/ui/alert.js";import{AspectRatio as w}from"./shadcn/components/ui/aspect-ratio.js";import{Avatar as y,AvatarBadge as z,AvatarFallback as q,AvatarGroup as A,AvatarGroupCount as B,AvatarImage as C}from"./shadcn/components/ui/avatar.js";import{Badge as D,badgeVariants as E}from"./shadcn/components/ui/badge.js";import{Breadcrumb as F,BreadcrumbEllipsis as G,BreadcrumbItem as H,BreadcrumbLink as I,BreadcrumbList as J,BreadcrumbPage as K,BreadcrumbSeparator as L}from"./shadcn/components/ui/breadcrumb.js";import{ButtonGroup as M,ButtonGroupSeparator as N,ButtonGroupText as O,buttonGroupVariants as P}from"./shadcn/components/ui/button-group.js";import{Button as Q,buttonVariants as R}from"./shadcn/components/ui/button.js";import{Calendar as S,CalendarDayButton as T}from"./shadcn/components/ui/calendar.js";import{Card as U,CardAction as V,CardContent as W,CardDescription as X,CardFooter as Y,CardHeader as Z,CardTitle as $}from"./shadcn/components/ui/card.js";import{Carousel as _,CarouselContent as oo,CarouselItem as no,CarouselNext as so,CarouselPrevious as mo,useCarousel as ro}from"./shadcn/components/ui/carousel.js";import{ChartContainer as to,ChartLegend as io,ChartLegendContent as po,ChartStyle as co,ChartTooltip as eo,ChartTooltipContent as ao}from"./shadcn/components/ui/chart.js";import{Checkbox as uo}from"./shadcn/components/ui/checkbox.js";import{Collapsible as ho,CollapsibleContent as fo,CollapsibleTrigger as jo}from"./shadcn/components/ui/collapsible.js";import{Command as lo,CommandDialog as bo,CommandEmpty as go,CommandGroup as xo,CommandInput as ko,CommandItem as vo,CommandList as wo,CommandSeparator as yo,CommandShortcut as zo}from"./shadcn/components/ui/command.js";import{ContextMenu as qo,ContextMenuCheckboxItem as Ao,ContextMenuContent as Bo,ContextMenuGroup as Co,ContextMenuItem as Do,ContextMenuLabel as Eo,ContextMenuPortal as Fo,ContextMenuRadioGroup as Go,ContextMenuRadioItem as Ho,ContextMenuSeparator as Io,ContextMenuShortcut as Jo,ContextMenuSub as Ko,ContextMenuSubContent as Lo,ContextMenuSubTrigger as Mo,ContextMenuTrigger as No}from"./shadcn/components/ui/context-menu.js";import{Dialog as Oo,DialogClose as Po,DialogContent as Qo,DialogDescription as Ro,DialogFooter as So,DialogHeader as To,DialogOverlay as Uo,DialogPortal as Vo,DialogTitle as Wo,DialogTrigger as Xo}from"./shadcn/components/ui/dialog.js";import{Drawer as Yo,DrawerClose as Zo,DrawerContent as $o,DrawerDescription as _o,DrawerFooter as on,DrawerHeader as nn,DrawerOverlay as sn,DrawerPortal as mn,DrawerTitle as rn,DrawerTrigger as tn}from"./shadcn/components/ui/drawer.js";import{DropdownMenu as pn,DropdownMenuCheckboxItem as cn,DropdownMenuContent as en,DropdownMenuGroup as an,DropdownMenuItem as dn,DropdownMenuLabel as un,DropdownMenuPortal as hn,DropdownMenuRadioGroup as fn,DropdownMenuRadioItem as jn,DropdownMenuSeparator as ln,DropdownMenuShortcut as bn,DropdownMenuSub as gn,DropdownMenuSubContent as xn,DropdownMenuSubTrigger as kn,DropdownMenuTrigger as vn}from"./shadcn/components/ui/dropdown-menu.js";import{Empty as wn,EmptyContent as yn,EmptyDescription as zn,EmptyHeader as qn,EmptyMedia as An,EmptyTitle as Bn}from"./shadcn/components/ui/empty.js";import{Field as Cn,FieldContent as Dn,FieldDescription as En,FieldError as Fn,FieldGroup as Gn,FieldLabel as Hn,FieldLegend as In,FieldSeparator as Jn,FieldSet as Kn,FieldTitle as Ln}from"./shadcn/components/ui/field.js";import{HoverCard as Mn,HoverCardContent as Nn,HoverCardTrigger as On}from"./shadcn/components/ui/hover-card.js";import{InputGroup as Pn,InputGroupAddon as Qn,InputGroupButton as Rn,InputGroupInput as Sn,InputGroupText as Tn,InputGroupTextarea as Un}from"./shadcn/components/ui/input-group.js";import{InputOTP as Vn,InputOTPGroup as Wn,InputOTPSeparator as Xn,InputOTPSlot as Yn}from"./shadcn/components/ui/input-otp.js";import{Input as Zn}from"./shadcn/components/ui/input.js";import{Item as $n,ItemActions as _n,ItemContent as os,ItemDescription as ns,ItemFooter as ss,ItemGroup as ms,ItemHeader as rs,ItemMedia as ts,ItemSeparator as is,ItemTitle as ps}from"./shadcn/components/ui/item.js";import{Kbd as cs,KbdGroup as es}from"./shadcn/components/ui/kbd.js";import{Label as as}from"./shadcn/components/ui/label.js";import{Menubar as ds,MenubarCheckboxItem as us,MenubarContent as hs,MenubarGroup as fs,MenubarItem as js,MenubarLabel as ls,MenubarMenu as bs,MenubarPortal as gs,MenubarRadioGroup as xs,MenubarRadioItem as ks,MenubarSeparator as vs,MenubarShortcut as ws,MenubarSub as ys,MenubarSubContent as zs,MenubarSubTrigger as qs,MenubarTrigger as As}from"./shadcn/components/ui/menubar.js";import{NavigationMenu as Bs,NavigationMenuContent as Cs,NavigationMenuIndicator as Ds,NavigationMenuItem as Es,NavigationMenuLink as Fs,NavigationMenuList as Gs,NavigationMenuPositioner as Hs,NavigationMenuTrigger as Is,navigationMenuTriggerStyle as Js}from"./shadcn/components/ui/navigation-menu.js";import{Pagination as Ks,PaginationContent as Ls,PaginationEllipsis as Ms,PaginationItem as Ns,PaginationLink as Os,PaginationNext as Ps,PaginationPrevious as Qs}from"./shadcn/components/ui/pagination.js";import{Popover as Rs,PopoverContent as Ss,PopoverDescription as Ts,PopoverHeader as Us,PopoverTitle as Vs,PopoverTrigger as Ws}from"./shadcn/components/ui/popover.js";import{Progress as Xs,ProgressIndicator as Ys,ProgressLabel as Zs,ProgressTrack as $s,ProgressValue as _s}from"./shadcn/components/ui/progress.js";import{RadioGroup as om,RadioGroupItem as nm}from"./shadcn/components/ui/radio-group.js";import{ResizableHandle as sm,ResizablePanel as mm,ResizablePanelGroup as rm}from"./shadcn/components/ui/resizable.js";import{ScrollArea as tm,ScrollBar as im}from"./shadcn/components/ui/scroll-area.js";import{Select as pm,SelectContent as cm,SelectGroup as em,SelectItem as am,SelectLabel as dm,SelectScrollDownButton as um,SelectScrollUpButton as hm,SelectSeparator as fm,SelectTrigger as jm,SelectValue as lm}from"./shadcn/components/ui/select.js";import{Separator as bm}from"./shadcn/components/ui/separator.js";import{Sheet as gm,SheetClose as xm,SheetContent as km,SheetDescription as vm,SheetFooter as wm,SheetHeader as ym,SheetTitle as zm,SheetTrigger as qm}from"./shadcn/components/ui/sheet.js";import{Sidebar as Am,SidebarContent as Bm,SidebarFooter as Cm,SidebarGroup as Dm,SidebarGroupAction as Em,SidebarGroupContent as Fm,SidebarGroupLabel as Gm,SidebarHeader as Hm,SidebarInput as Im,SidebarInset as Jm,SidebarMenu as Km,SidebarMenuAction as Lm,SidebarMenuBadge as Mm,SidebarMenuButton as Nm,SidebarMenuItem as Om,SidebarMenuSkeleton as Pm,SidebarMenuSub as Qm,SidebarMenuSubButton as Rm,SidebarMenuSubItem as Sm,SidebarProvider as Tm,SidebarRail as Um,SidebarSeparator as Vm,SidebarTrigger as Wm,useSidebar as Xm}from"./shadcn/components/ui/sidebar.js";import{Skeleton as Ym}from"./shadcn/components/ui/skeleton.js";import{Slider as Zm}from"./shadcn/components/ui/slider.js";import{Toaster as $m}from"./shadcn/components/ui/sonner.js";import{Spinner as _m}from"./shadcn/components/ui/spinner.js";import{Switch as or}from"./shadcn/components/ui/switch.js";import{Table as nr,TableBody as sr,TableCaption as mr,TableCell as rr,TableFooter as tr,TableHead as ir,TableHeader as pr,TableRow as cr}from"./shadcn/components/ui/table.js";import{Tabs as er,TabsContent as ar,TabsList as dr,TabsTrigger as ur,tabsListVariants as hr}from"./shadcn/components/ui/tabs.js";import{Textarea as fr}from"./shadcn/components/ui/textarea.js";import{ToggleGroup as jr,ToggleGroupItem as lr}from"./shadcn/components/ui/toggle-group.js";import{Toggle as br,toggleVariants as gr}from"./shadcn/components/ui/toggle.js";import{Tooltip as xr,TooltipContent as kr,TooltipProvider as vr,TooltipTrigger as wr}from"./shadcn/components/ui/tooltip.js";import{toast as yr}from"sonner";export{s as Accordion,m as AccordionContent,r as AccordionItem,t as AccordionTrigger,g as Alert,x as AlertAction,k as AlertDescription,i as AlertDialog,p as AlertDialogAction,c as AlertDialogCancel,e as AlertDialogContent,a as AlertDialogDescription,d as AlertDialogFooter,u as AlertDialogHeader,h as AlertDialogMedia,f as AlertDialogOverlay,j as AlertDialogPortal,l as AlertDialogTitle,b as AlertDialogTrigger,v as AlertTitle,w as AspectRatio,y as Avatar,z as AvatarBadge,q as AvatarFallback,A as AvatarGroup,B as AvatarGroupCount,C as AvatarImage,D as Badge,F as Breadcrumb,G as BreadcrumbEllipsis,H as BreadcrumbItem,I as BreadcrumbLink,J as BreadcrumbList,K as BreadcrumbPage,L as BreadcrumbSeparator,Q as Button,M as ButtonGroup,N as ButtonGroupSeparator,O as ButtonGroupText,S as Calendar,T as CalendarDayButton,U as Card,V as CardAction,W as CardContent,X as CardDescription,Y as CardFooter,Z as CardHeader,$ as CardTitle,_ as Carousel,oo as CarouselContent,no as CarouselItem,so as CarouselNext,mo as CarouselPrevious,to as ChartContainer,io as ChartLegend,po as ChartLegendContent,co as ChartStyle,eo as ChartTooltip,ao as ChartTooltipContent,uo as Checkbox,ho as Collapsible,fo as CollapsibleContent,jo as CollapsibleTrigger,lo as Command,bo as CommandDialog,go as CommandEmpty,xo as CommandGroup,ko as CommandInput,vo as CommandItem,wo as CommandList,yo as CommandSeparator,zo as CommandShortcut,qo as ContextMenu,Ao as ContextMenuCheckboxItem,Bo as ContextMenuContent,Co as ContextMenuGroup,Do as ContextMenuItem,Eo as ContextMenuLabel,Fo as ContextMenuPortal,Go as ContextMenuRadioGroup,Ho as ContextMenuRadioItem,Io as ContextMenuSeparator,Jo as ContextMenuShortcut,Ko as ContextMenuSub,Lo as ContextMenuSubContent,Mo as ContextMenuSubTrigger,No as ContextMenuTrigger,Oo as Dialog,Po as DialogClose,Qo as DialogContent,Ro as DialogDescription,So as DialogFooter,To as DialogHeader,Uo as DialogOverlay,Vo as DialogPortal,Wo as DialogTitle,Xo as DialogTrigger,Yo as Drawer,Zo as DrawerClose,$o as DrawerContent,_o as DrawerDescription,on as DrawerFooter,nn as DrawerHeader,sn as DrawerOverlay,mn as DrawerPortal,rn as DrawerTitle,tn as DrawerTrigger,pn as DropdownMenu,cn as DropdownMenuCheckboxItem,en as DropdownMenuContent,an as DropdownMenuGroup,dn as DropdownMenuItem,un as DropdownMenuLabel,hn as DropdownMenuPortal,fn as DropdownMenuRadioGroup,jn as DropdownMenuRadioItem,ln as DropdownMenuSeparator,bn as DropdownMenuShortcut,gn as DropdownMenuSub,xn as DropdownMenuSubContent,kn as DropdownMenuSubTrigger,vn as DropdownMenuTrigger,wn as Empty,yn as EmptyContent,zn as EmptyDescription,qn as EmptyHeader,An as EmptyMedia,Bn as EmptyTitle,Cn as Field,Dn as FieldContent,En as FieldDescription,Fn as FieldError,Gn as FieldGroup,Hn as FieldLabel,In as FieldLegend,Jn as FieldSeparator,Kn as FieldSet,Ln as FieldTitle,Mn as HoverCard,Nn as HoverCardContent,On as HoverCardTrigger,Zn as Input,Pn as InputGroup,Qn as InputGroupAddon,Rn as InputGroupButton,Sn as InputGroupInput,Tn as InputGroupText,Un as InputGroupTextarea,Vn as InputOTP,Wn as InputOTPGroup,Xn as InputOTPSeparator,Yn as InputOTPSlot,$n as Item,_n as ItemActions,os as ItemContent,ns as ItemDescription,ss as ItemFooter,ms as ItemGroup,rs as ItemHeader,ts as ItemMedia,is as ItemSeparator,ps as ItemTitle,cs as Kbd,es as KbdGroup,as as Label,ds as Menubar,us as MenubarCheckboxItem,hs as MenubarContent,fs as MenubarGroup,js as MenubarItem,ls as MenubarLabel,bs as MenubarMenu,gs as MenubarPortal,xs as MenubarRadioGroup,ks as MenubarRadioItem,vs as MenubarSeparator,ws as MenubarShortcut,ys as MenubarSub,zs as MenubarSubContent,qs as MenubarSubTrigger,As as MenubarTrigger,Bs as NavigationMenu,Cs as NavigationMenuContent,Ds as NavigationMenuIndicator,Es as NavigationMenuItem,Fs as NavigationMenuLink,Gs as NavigationMenuList,Hs as NavigationMenuPositioner,Is as NavigationMenuTrigger,Ks as Pagination,Ls as PaginationContent,Ms as PaginationEllipsis,Ns as PaginationItem,Os as PaginationLink,Ps as PaginationNext,Qs as PaginationPrevious,Rs as Popover,Ss as PopoverContent,Ts as PopoverDescription,Us as PopoverHeader,Vs as PopoverTitle,Ws as PopoverTrigger,Xs as Progress,Ys as ProgressIndicator,Zs as ProgressLabel,$s as ProgressTrack,_s as ProgressValue,om as RadioGroup,nm as RadioGroupItem,sm as ResizableHandle,mm as ResizablePanel,rm as ResizablePanelGroup,tm as ScrollArea,im as ScrollBar,pm as Select,cm as SelectContent,em as SelectGroup,am as SelectItem,dm as SelectLabel,um as SelectScrollDownButton,hm as SelectScrollUpButton,fm as SelectSeparator,jm as SelectTrigger,lm as SelectValue,bm as Separator,gm as Sheet,xm as SheetClose,km as SheetContent,vm as SheetDescription,wm as SheetFooter,ym as SheetHeader,zm as SheetTitle,qm as SheetTrigger,Am as Sidebar,Bm as SidebarContent,Cm as SidebarFooter,Dm as SidebarGroup,Em as SidebarGroupAction,Fm as SidebarGroupContent,Gm as SidebarGroupLabel,Hm as SidebarHeader,Im as SidebarInput,Jm as SidebarInset,Km as SidebarMenu,Lm as SidebarMenuAction,Mm as SidebarMenuBadge,Nm as SidebarMenuButton,Om as SidebarMenuItem,Pm as SidebarMenuSkeleton,Qm as SidebarMenuSub,Rm as SidebarMenuSubButton,Sm as SidebarMenuSubItem,Tm as SidebarProvider,Um as SidebarRail,Vm as SidebarSeparator,Wm as SidebarTrigger,Ym as Skeleton,Zm as Slider,_m as Spinner,or as Switch,nr as Table,sr as TableBody,mr as TableCaption,rr as TableCell,tr as TableFooter,ir as TableHead,pr as TableHeader,cr as TableRow,er as Tabs,ar as TabsContent,dr as TabsList,ur as TabsTrigger,fr as Textarea,$m as Toaster,br as Toggle,jr as ToggleGroup,lr as ToggleGroupItem,xr as Tooltip,kr as TooltipContent,vr as TooltipProvider,wr as TooltipTrigger,E as badgeVariants,P as buttonGroupVariants,R as buttonVariants,o as cn,Js as navigationMenuTriggerStyle,hr as tabsListVariants,yr as toast,gr as toggleVariants,ro as useCarousel,n as useIsMobile,Xm as useSidebar};
@@ -1,2 +1,2 @@
1
- import*as e from"react";import{tabbable as t,isTabbable as n,focusable as r}from"../../../../../../../tabbable@6.3.0/node_modules/tabbable/dist/index.esm.js";import{isHTMLElement as o,getNodeName as s,getWindow as u,getComputedStyle as i}from"../../../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js";import{useMergedRefs as c}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useMergedRefs.js";import{useValueAsRef as a}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useValueAsRef.js";import{useStableCallback as l}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useStableCallback.js";import{useIsoLayoutEffect as f}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useIsoLayoutEffect.js";import{visuallyHidden as d}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/visuallyHidden.js";import{useTimeout as m}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useTimeout.js";import{useAnimationFrame as p}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useAnimationFrame.js";import{FocusGuard as b}from"../../utils/FocusGuard.js";import{createChangeEventDetails as v}from"../../utils/createBaseUIEventDetails.js";import{createAttribute as _}from"../utils/createAttribute.js";import{enqueueFocus as E}from"../utils/enqueueFocus.js";import{markOthers as y}from"../utils/markOthers.js";import{usePortalContext as g}from"./FloatingPortal.js";import{useFloatingTree as R}from"./FloatingTree.js";import{CLICK_TRIGGER_IDENTIFIER as h}from"../../utils/constants.js";import{resolveRef as x}from"../../utils/resolveRef.js";import{jsxs as j,jsx as L}from"react/jsx-runtime";import{isTypeableCombobox as k,getFloatingFocusElement as F,getDocument as A,activeElement as O,contains as T,getTarget as S}from"../utils/element.js";import{getTabbableOptions as w,isOutsideEvent as M,getNextTabbable as q,getPreviousTabbable as C}from"../utils/tabbable.js";import{getNodeAncestors as I,getNodeChildren as N}from"../utils/nodes.js";import{isVirtualClick as V,isVirtualPointerEvent as B,stopEvent as G}from"../utils/event.js";import{triggerHover as $,outsidePress as D,focusOut as H}from"../../utils/reason-parts.js";let K=[];function P(){K=K.filter(e=>e.isConnected)}function U(){return P(),K[K.length-1]}function W(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const o=w(),s=r(e,o).filter(e=>{const t=e.getAttribute("data-tabindex")||"";return n(e,o)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),u=e.getAttribute("tabindex");t.current.includes("floating")||0===s.length?"0"!==u&&e.setAttribute("tabindex","0"):("-1"!==u||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function z(r){const{context:z,children:J,disabled:Q=!1,order:X=["content"],initialFocus:Y=!0,returnFocus:Z=!0,restoreFocus:ee=!1,modal:te=!0,closeOnFocusOut:ne=!0,openInteractionType:re="",getInsideElements:oe=()=>[],nextFocusableElement:se,previousFocusableElement:ue,beforeContentFocusGuardRef:ie,externalTree:ce}=r,ae="rootStore"in z?z.rootStore:z,le=ae.useState("open"),fe=ae.useState("domReferenceElement"),de=ae.useState("floatingElement"),{events:me,dataRef:pe}=ae.context,be=l(()=>pe.current.floatingContext?.nodeId),ve=l(oe),_e=!1===Y,Ee=k(fe)&&_e,ye=a(X),ge=a(Y),Re=a(Z),he=a(re),xe=R(ce),je=g(),Le=e.useRef(null),ke=e.useRef(null),Fe=e.useRef(!1),Ae=e.useRef(!1),Oe=e.useRef(!1),Te=e.useRef(-1),Se=e.useRef(""),we=e.useRef(""),Me=m(),qe=m(),Ce=p(),Ie=null!=je,Ne=F(de),Ve=l((e=Ne)=>e?t(e,w()):[]),Be=l(e=>{const t=Ve(e);return ye.current.map(()=>t).filter(Boolean).flat()});e.useEffect(()=>{if(Q)return;if(!te)return;function e(e){"Tab"===e.key&&T(Ne,O(A(Ne)))&&0===Ve().length&&!Ee&&G(e)}const t=A(Ne);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[Q,fe,Ne,te,ye,Ee,Ve,Be]),e.useEffect(()=>{if(!Q&&de)return de.addEventListener("focusin",e),()=>{de.removeEventListener("focusin",e)};function e(e){const t=S(e),n=Ve().indexOf(t);-1!==n&&(Te.current=n)}},[Q,de,Ve]),e.useEffect(()=>{if(Q||!le)return;const e=A(Ne);function t(){Oe.current=!1}function n(e){const t=S(e),n=T(de,t)||T(fe,t)||T(je?.portalNode,t);Oe.current=!n,we.current=e.pointerType||"keyboard"}function r(){we.current="keyboard"}return e.addEventListener("pointerdown",n,!0),e.addEventListener("pointerup",t,!0),e.addEventListener("pointercancel",t,!0),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("pointerdown",n,!0),e.removeEventListener("pointerup",t,!0),e.removeEventListener("pointercancel",t,!0),e.removeEventListener("keydown",r,!0)}},[Q,de,fe,Ne,le,je]),e.useEffect(()=>{if(Q)return;if(!ne)return;function e(){Ae.current=!0,qe.start(0,()=>{Ae.current=!1})}function t(e){const t=e.relatedTarget,n=e.currentTarget,r=S(e);queueMicrotask(()=>{const s=be(),u=ae.context.triggerElements,c=!(T(fe,t)||T(de,t)||T(t,de)||T(je?.portalNode,t)||null!=t&&u.hasElement(t)||u.hasMatchingElement(e=>T(e,t))||t?.hasAttribute(_("focus-guard"))||xe&&(N(xe.nodesRef.current,s).find(e=>T(e.context?.elements.floating,t)||T(e.context?.elements.domReference,t))||I(xe.nodesRef.current,s).find(e=>[e.context?.elements.floating,F(e.context?.elements.floating)].includes(t)||e.context?.elements.domReference===t)));if(n===fe&&Ne&&W(Ne,ye),ee&&n!==fe&&!((a=r)&&a.isConnected&&("function"==typeof a.checkVisibility?a.checkVisibility():"none"!==i(a).display))&&O(A(Ne))===A(Ne).body){if(o(Ne)&&(Ne.focus(),"popup"===ee))return void Ce.request(()=>{Ne.focus()});const e=Te.current,t=Ve(),n=t[e]||t[t.length-1]||Ne;o(n)&&n.focus()}var a;pe.current.insideReactTree?pe.current.insideReactTree=!1:!Ee&&te||!t||!c||Ae.current||!Ee&&t===U()||(Fe.current=!0,ae.setOpen(!1,v(H,e)))})}function n(){Oe.current||(pe.current.insideReactTree=!0,Me.start(0,()=>{pe.current.insideReactTree=!1}))}const r=o(fe)?fe:null,s=[];return de||r?(r&&(r.addEventListener("focusout",t),r.addEventListener("pointerdown",e),s.push(()=>{r.removeEventListener("focusout",t),r.removeEventListener("pointerdown",e)})),de&&(de.addEventListener("focusout",t),je&&(de.addEventListener("focusout",n,!0),s.push(()=>{de.removeEventListener("focusout",n,!0)})),s.push(()=>{de.removeEventListener("focusout",t)})),()=>{s.forEach(e=>{e()})}):void 0},[Q,fe,de,Ne,te,xe,je,ae,ne,ee,Ve,Ee,be,ye,pe,Me,qe,Ce]);const Ge=e.useRef(null),$e=e.useRef(null),De=c(Ge,ie,je?.beforeInsideRef),He=c($e,je?.afterInsideRef);e.useEffect(()=>{if(Q||!de||!le)return;const e=Array.from(je?.portalNode?.querySelectorAll(`[${_("portal")}]`)||[]),t=xe?I(xe.nodesRef.current,be()):[],n=t.find(e=>k(e.context?.elements.domReference||null))?.context?.elements.domReference,r=[de,n,...e,...ve(),Le.current,ke.current,Ge.current,$e.current,je?.beforeOutsideRef.current,je?.afterOutsideRef.current,x(ue),x(se),Ee?fe:null].filter(e=>null!=e),o=y(r,te||Ee);return()=>{o()}},[le,Q,fe,de,te,ye,je,Ee,xe,be,ve,se,ue]),f(()=>{if(!le||Q||!o(Ne))return;const e=A(Ne),t=O(e);queueMicrotask(()=>{const e=Be(Ne),n=ge.current,r="function"==typeof n?n(he.current||""):n;if(void 0===r||!1===r)return;let o;o=!0===r||null===r?e[0]||Ne:x(r),o=o||e[0]||Ne;T(Ne,t)||E(o,{preventScroll:o===Ne})})},[Q,le,Ne,_e,Be,ge,he]),f(()=>{if(Q||!Ne)return;const e=A(Ne),r=O(e);var i;function c(e){if(e.open||(Se.current=function(e,t){const n=u(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(0===e.detail?"keyboard":"mouse"):""}(e.nativeEvent,we.current)),e.reason===$&&"mouseleave"===e.nativeEvent.type&&(Fe.current=!0),e.reason===D)if(e.nested)Fe.current=!1;else if(V(e.nativeEvent)||B(e.nativeEvent))Fe.current=!1;else{let e=!1;document.createElement("div").focus({get preventScroll(){return e=!0,!1}}),Fe.current=!e}}i=r,P(),i&&"body"!==s(i)&&(K.push(i),K.length>20&&(K=K.slice(-20))),me.on("openchange",c);const a=e.createElement("span");return a.setAttribute("tabindex","-1"),a.setAttribute("aria-hidden","true"),Object.assign(a.style,d),Ie&&fe&&fe.insertAdjacentElement("afterend",a),()=>{me.off("openchange",c);const r=O(e),s=T(de,r)||xe&&N(xe.nodesRef.current,be(),!1).some(e=>T(e.context?.elements.floating,r)),u=function(){const e=Re.current;let t="function"==typeof e?e(Se.current):e;if(void 0===t||!1===t)return null;if(null===t&&(t=!0),"boolean"==typeof t){const e=fe||U();return e&&e.isConnected?e:a}const n=fe||U()||a;return x(t)||n}();queueMicrotask(()=>{const i=function(e){if(!e)return null;const r=w();return n(e,r)?e:t(e,r)[0]||e}(u),c="boolean"!=typeof Re.current;Re.current&&!Fe.current&&o(i)&&(c||i===r||r===e.body||s)&&i.focus({preventScroll:!0}),a.remove()})}},[Q,de,Ne,Re,pe,me,xe,Ie,fe,be]),e.useEffect(()=>{queueMicrotask(()=>{Fe.current=!1})},[Q]),e.useEffect(()=>{if(Q||!le)return;function e(e){const t=S(e);t?.closest(`[${h}]`)&&(Ae.current=!0)}const t=A(Ne);return t.addEventListener("pointerdown",e,!0),()=>{t.removeEventListener("pointerdown",e,!0)}},[Q,le,Ne]),f(()=>{if(!Q&&je)return je.setFocusManagerState({modal:te,closeOnFocusOut:ne,open:le,onOpenChange:ae.setOpen,domReference:fe}),()=>{je.setFocusManagerState(null)}},[Q,je,te,le,ae,ne,fe]),f(()=>{if(!Q&&Ne)return W(Ne,ye),()=>{queueMicrotask(P)}},[Q,Ne,ye]);const Ke=!Q&&(!te||!Ee)&&(Ie||te);/* @__PURE__ */
1
+ import*as e from"react";import{tabbable as t,isTabbable as n,focusable as r}from"../../../../../../../tabbable@6.4.0/node_modules/tabbable/dist/index.esm.js";import{isHTMLElement as o,getNodeName as s,getWindow as u,getComputedStyle as i}from"../../../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js";import{useMergedRefs as c}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useMergedRefs.js";import{useValueAsRef as a}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useValueAsRef.js";import{useStableCallback as l}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useStableCallback.js";import{useIsoLayoutEffect as f}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useIsoLayoutEffect.js";import{visuallyHidden as d}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/visuallyHidden.js";import{useTimeout as m}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useTimeout.js";import{useAnimationFrame as p}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useAnimationFrame.js";import{FocusGuard as b}from"../../utils/FocusGuard.js";import{createChangeEventDetails as v}from"../../utils/createBaseUIEventDetails.js";import{createAttribute as _}from"../utils/createAttribute.js";import{enqueueFocus as E}from"../utils/enqueueFocus.js";import{markOthers as y}from"../utils/markOthers.js";import{usePortalContext as g}from"./FloatingPortal.js";import{useFloatingTree as R}from"./FloatingTree.js";import{CLICK_TRIGGER_IDENTIFIER as h}from"../../utils/constants.js";import{resolveRef as x}from"../../utils/resolveRef.js";import{jsxs as j,jsx as L}from"react/jsx-runtime";import{isTypeableCombobox as k,getFloatingFocusElement as F,getDocument as A,activeElement as O,contains as T,getTarget as S}from"../utils/element.js";import{getTabbableOptions as w,isOutsideEvent as M,getNextTabbable as q,getPreviousTabbable as C}from"../utils/tabbable.js";import{getNodeAncestors as I,getNodeChildren as N}from"../utils/nodes.js";import{isVirtualClick as V,isVirtualPointerEvent as B,stopEvent as G}from"../utils/event.js";import{triggerHover as $,outsidePress as D,focusOut as H}from"../../utils/reason-parts.js";let K=[];function P(){K=K.filter(e=>e.isConnected)}function U(){return P(),K[K.length-1]}function W(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const o=w(),s=r(e,o).filter(e=>{const t=e.getAttribute("data-tabindex")||"";return n(e,o)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),u=e.getAttribute("tabindex");t.current.includes("floating")||0===s.length?"0"!==u&&e.setAttribute("tabindex","0"):("-1"!==u||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function z(r){const{context:z,children:J,disabled:Q=!1,order:X=["content"],initialFocus:Y=!0,returnFocus:Z=!0,restoreFocus:ee=!1,modal:te=!0,closeOnFocusOut:ne=!0,openInteractionType:re="",getInsideElements:oe=()=>[],nextFocusableElement:se,previousFocusableElement:ue,beforeContentFocusGuardRef:ie,externalTree:ce}=r,ae="rootStore"in z?z.rootStore:z,le=ae.useState("open"),fe=ae.useState("domReferenceElement"),de=ae.useState("floatingElement"),{events:me,dataRef:pe}=ae.context,be=l(()=>pe.current.floatingContext?.nodeId),ve=l(oe),_e=!1===Y,Ee=k(fe)&&_e,ye=a(X),ge=a(Y),Re=a(Z),he=a(re),xe=R(ce),je=g(),Le=e.useRef(null),ke=e.useRef(null),Fe=e.useRef(!1),Ae=e.useRef(!1),Oe=e.useRef(!1),Te=e.useRef(-1),Se=e.useRef(""),we=e.useRef(""),Me=m(),qe=m(),Ce=p(),Ie=null!=je,Ne=F(de),Ve=l((e=Ne)=>e?t(e,w()):[]),Be=l(e=>{const t=Ve(e);return ye.current.map(()=>t).filter(Boolean).flat()});e.useEffect(()=>{if(Q)return;if(!te)return;function e(e){"Tab"===e.key&&T(Ne,O(A(Ne)))&&0===Ve().length&&!Ee&&G(e)}const t=A(Ne);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[Q,fe,Ne,te,ye,Ee,Ve,Be]),e.useEffect(()=>{if(!Q&&de)return de.addEventListener("focusin",e),()=>{de.removeEventListener("focusin",e)};function e(e){const t=S(e),n=Ve().indexOf(t);-1!==n&&(Te.current=n)}},[Q,de,Ve]),e.useEffect(()=>{if(Q||!le)return;const e=A(Ne);function t(){Oe.current=!1}function n(e){const t=S(e),n=T(de,t)||T(fe,t)||T(je?.portalNode,t);Oe.current=!n,we.current=e.pointerType||"keyboard"}function r(){we.current="keyboard"}return e.addEventListener("pointerdown",n,!0),e.addEventListener("pointerup",t,!0),e.addEventListener("pointercancel",t,!0),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("pointerdown",n,!0),e.removeEventListener("pointerup",t,!0),e.removeEventListener("pointercancel",t,!0),e.removeEventListener("keydown",r,!0)}},[Q,de,fe,Ne,le,je]),e.useEffect(()=>{if(Q)return;if(!ne)return;function e(){Ae.current=!0,qe.start(0,()=>{Ae.current=!1})}function t(e){const t=e.relatedTarget,n=e.currentTarget,r=S(e);queueMicrotask(()=>{const s=be(),u=ae.context.triggerElements,c=!(T(fe,t)||T(de,t)||T(t,de)||T(je?.portalNode,t)||null!=t&&u.hasElement(t)||u.hasMatchingElement(e=>T(e,t))||t?.hasAttribute(_("focus-guard"))||xe&&(N(xe.nodesRef.current,s).find(e=>T(e.context?.elements.floating,t)||T(e.context?.elements.domReference,t))||I(xe.nodesRef.current,s).find(e=>[e.context?.elements.floating,F(e.context?.elements.floating)].includes(t)||e.context?.elements.domReference===t)));if(n===fe&&Ne&&W(Ne,ye),ee&&n!==fe&&!((a=r)&&a.isConnected&&("function"==typeof a.checkVisibility?a.checkVisibility():"none"!==i(a).display))&&O(A(Ne))===A(Ne).body){if(o(Ne)&&(Ne.focus(),"popup"===ee))return void Ce.request(()=>{Ne.focus()});const e=Te.current,t=Ve(),n=t[e]||t[t.length-1]||Ne;o(n)&&n.focus()}var a;pe.current.insideReactTree?pe.current.insideReactTree=!1:!Ee&&te||!t||!c||Ae.current||!Ee&&t===U()||(Fe.current=!0,ae.setOpen(!1,v(H,e)))})}function n(){Oe.current||(pe.current.insideReactTree=!0,Me.start(0,()=>{pe.current.insideReactTree=!1}))}const r=o(fe)?fe:null,s=[];return de||r?(r&&(r.addEventListener("focusout",t),r.addEventListener("pointerdown",e),s.push(()=>{r.removeEventListener("focusout",t),r.removeEventListener("pointerdown",e)})),de&&(de.addEventListener("focusout",t),je&&(de.addEventListener("focusout",n,!0),s.push(()=>{de.removeEventListener("focusout",n,!0)})),s.push(()=>{de.removeEventListener("focusout",t)})),()=>{s.forEach(e=>{e()})}):void 0},[Q,fe,de,Ne,te,xe,je,ae,ne,ee,Ve,Ee,be,ye,pe,Me,qe,Ce]);const Ge=e.useRef(null),$e=e.useRef(null),De=c(Ge,ie,je?.beforeInsideRef),He=c($e,je?.afterInsideRef);e.useEffect(()=>{if(Q||!de||!le)return;const e=Array.from(je?.portalNode?.querySelectorAll(`[${_("portal")}]`)||[]),t=xe?I(xe.nodesRef.current,be()):[],n=t.find(e=>k(e.context?.elements.domReference||null))?.context?.elements.domReference,r=[de,n,...e,...ve(),Le.current,ke.current,Ge.current,$e.current,je?.beforeOutsideRef.current,je?.afterOutsideRef.current,x(ue),x(se),Ee?fe:null].filter(e=>null!=e),o=y(r,te||Ee);return()=>{o()}},[le,Q,fe,de,te,ye,je,Ee,xe,be,ve,se,ue]),f(()=>{if(!le||Q||!o(Ne))return;const e=A(Ne),t=O(e);queueMicrotask(()=>{const e=Be(Ne),n=ge.current,r="function"==typeof n?n(he.current||""):n;if(void 0===r||!1===r)return;let o;o=!0===r||null===r?e[0]||Ne:x(r),o=o||e[0]||Ne;T(Ne,t)||E(o,{preventScroll:o===Ne})})},[Q,le,Ne,_e,Be,ge,he]),f(()=>{if(Q||!Ne)return;const e=A(Ne),r=O(e);var i;function c(e){if(e.open||(Se.current=function(e,t){const n=u(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(0===e.detail?"keyboard":"mouse"):""}(e.nativeEvent,we.current)),e.reason===$&&"mouseleave"===e.nativeEvent.type&&(Fe.current=!0),e.reason===D)if(e.nested)Fe.current=!1;else if(V(e.nativeEvent)||B(e.nativeEvent))Fe.current=!1;else{let e=!1;document.createElement("div").focus({get preventScroll(){return e=!0,!1}}),Fe.current=!e}}i=r,P(),i&&"body"!==s(i)&&(K.push(i),K.length>20&&(K=K.slice(-20))),me.on("openchange",c);const a=e.createElement("span");return a.setAttribute("tabindex","-1"),a.setAttribute("aria-hidden","true"),Object.assign(a.style,d),Ie&&fe&&fe.insertAdjacentElement("afterend",a),()=>{me.off("openchange",c);const r=O(e),s=T(de,r)||xe&&N(xe.nodesRef.current,be(),!1).some(e=>T(e.context?.elements.floating,r)),u=function(){const e=Re.current;let t="function"==typeof e?e(Se.current):e;if(void 0===t||!1===t)return null;if(null===t&&(t=!0),"boolean"==typeof t){const e=fe||U();return e&&e.isConnected?e:a}const n=fe||U()||a;return x(t)||n}();queueMicrotask(()=>{const i=function(e){if(!e)return null;const r=w();return n(e,r)?e:t(e,r)[0]||e}(u),c="boolean"!=typeof Re.current;Re.current&&!Fe.current&&o(i)&&(c||i===r||r===e.body||s)&&i.focus({preventScroll:!0}),a.remove()})}},[Q,de,Ne,Re,pe,me,xe,Ie,fe,be]),e.useEffect(()=>{queueMicrotask(()=>{Fe.current=!1})},[Q]),e.useEffect(()=>{if(Q||!le)return;function e(e){const t=S(e);t?.closest(`[${h}]`)&&(Ae.current=!0)}const t=A(Ne);return t.addEventListener("pointerdown",e,!0),()=>{t.removeEventListener("pointerdown",e,!0)}},[Q,le,Ne]),f(()=>{if(!Q&&je)return je.setFocusManagerState({modal:te,closeOnFocusOut:ne,open:le,onOpenChange:ae.setOpen,domReference:fe}),()=>{je.setFocusManagerState(null)}},[Q,je,te,le,ae,ne,fe]),f(()=>{if(!Q&&Ne)return W(Ne,ye),()=>{queueMicrotask(P)}},[Q,Ne,ye]);const Ke=!Q&&(!te||!Ee)&&(Ie||te);/* @__PURE__ */
2
2
  return j(e.Fragment,{children:[Ke&&/* @__PURE__ */L(b,{"data-type":"inside",ref:De,onFocus:e=>{if(te){const e=Be();E(e[e.length-1])}else if(je?.portalNode)if(Fe.current=!1,M(e,je.portalNode)){const e=q(fe);e?.focus()}else x(ue??je.beforeOutsideRef)?.focus()}}),J,Ke&&/* @__PURE__ */L(b,{"data-type":"inside",ref:He,onFocus:e=>{if(te)E(Be()[0]);else if(je?.portalNode)if(ne&&(Fe.current=!0),M(e,je.portalNode)){const e=C(fe);e?.focus()}else x(se??je.afterOutsideRef)?.focus()}})]})}export{z as FloatingFocusManager};
@@ -1 +1 @@
1
- import{tabbable as t}from"../../../../../../../tabbable@6.3.0/node_modules/tabbable/dist/index.esm.js";import{contains as e,getDocument as n,activeElement as r}from"./element.js";const i=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function o(e,o){const u=t(e,i()),a=u.length;if(0===a)return;const d=r(n(e)),c=u.indexOf(d);return u[-1===c?1===o?0:a-1:c+o]}function u(t){return o(n(t).body,1)||t}function a(t){return o(n(t).body,-1)||t}function d(e,r){if(!e)return null;const o=t(n(e).body,i()),u=o.length;if(0===u)return null;const a=o.indexOf(e);if(-1===a)return null;return o[(a+r+u)%u]}function c(t){return d(t,1)}function b(t){return d(t,-1)}function s(t,n){const r=n||t.currentTarget,i=t.relatedTarget;return!i||!e(r,i)}function f(e){t(e,i()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function l(t){t.querySelectorAll("[data-tabindex]").forEach(t=>{const e=t.dataset.tabindex;delete t.dataset.tabindex,e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex")})}export{f as disableFocusInside,l as enableFocusInside,u as getNextTabbable,a as getPreviousTabbable,c as getTabbableAfterElement,b as getTabbableBeforeElement,i as getTabbableOptions,s as isOutsideEvent};
1
+ import{tabbable as t}from"../../../../../../../tabbable@6.4.0/node_modules/tabbable/dist/index.esm.js";import{contains as e,getDocument as n,activeElement as r}from"./element.js";const i=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function o(e,o){const u=t(e,i()),a=u.length;if(0===a)return;const d=r(n(e)),c=u.indexOf(d);return u[-1===c?1===o?0:a-1:c+o]}function u(t){return o(n(t).body,1)||t}function a(t){return o(n(t).body,-1)||t}function d(e,r){if(!e)return null;const o=t(n(e).body,i()),u=o.length;if(0===u)return null;const a=o.indexOf(e);if(-1===a)return null;return o[(a+r+u)%u]}function c(t){return d(t,1)}function b(t){return d(t,-1)}function s(t,n){const r=n||t.currentTarget,i=t.relatedTarget;return!i||!e(r,i)}function f(e){t(e,i()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function l(t){t.querySelectorAll("[data-tabindex]").forEach(t=>{const e=t.dataset.tabindex;delete t.dataset.tabindex,e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex")})}export{f as disableFocusInside,l as enableFocusInside,u as getNextTabbable,a as getPreviousTabbable,c as getTabbableAfterElement,b as getTabbableBeforeElement,i as getTabbableOptions,s as isOutsideEvent};
@@ -1,2 +1,2 @@
1
- import*as e from"react";import*as t from"react-dom";import{isTabbable as o}from"../../../../../../../tabbable@6.3.0/node_modules/tabbable/dist/index.esm.js";import{useStableCallback as r}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useStableCallback.js";import{useIsoLayoutEffect as s}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useIsoLayoutEffect.js";import{useTimeout as n}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useTimeout.js";import{useAnimationFrame as i}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useAnimationFrame.js";import{useValueAsRef as u}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useValueAsRef.js";import{useNavigationMenuItemContext as a}from"../item/NavigationMenuItemContext.js";import{useNavigationMenuRootContext as c,useNavigationMenuTreeContext as p}from"../root/NavigationMenuRootContext.js";import{createChangeEventDetails as l}from"../../utils/createBaseUIEventDetails.js";import{ownerVisuallyHidden as m,PATIENT_CLICK_THRESHOLD as f}from"../../utils/constants.js";import{FocusGuard as d}from"../../utils/FocusGuard.js";import{pressableTriggerOpenStateMapping as g}from"../../utils/popupStateMapping.js";import{isOutsideMenuEvent as h}from"../utils/isOutsideMenuEvent.js";import{useAnimationsFinished as _}from"../../utils/useAnimationsFinished.js";import{NavigationMenuPopupCssVars as y}from"../popup/NavigationMenuPopupCssVars.js";import{NavigationMenuPositionerCssVars as b}from"../positioner/NavigationMenuPositionerCssVars.js";import{CompositeItem as v}from"../../composite/item/CompositeItem.js";import{getCssDimensions as j}from"../../utils/getCssDimensions.js";import{NAVIGATION_MENU_TRIGGER_IDENTIFIER as E}from"../utils/constants.js";import{useNavigationMenuDismissContext as R}from"../list/NavigationMenuDismissContext.js";import{jsxs as P,jsx as w}from"react/jsx-runtime";import{useFloatingTree as x}from"../../floating-ui-react/components/FloatingTree.js";import{useFloatingRootContext as C}from"../../floating-ui-react/hooks/useFloatingRootContext.js";import{useHover as M}from"../../floating-ui-react/hooks/useHover.js";import{safePolygon as k}from"../../floating-ui-react/safePolygon.js";import{useClick as D}from"../../floating-ui-react/hooks/useClick.js";import{useInteractions as F}from"../../floating-ui-react/hooks/useInteractions.js";import{useButton as I}from"../../use-button/useButton.js";import{EMPTY_ARRAY as N}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/empty.js";import{isOutsideEvent as O,getPreviousTabbable as T,getNextTabbable as A}from"../../floating-ui-react/utils/tabbable.js";import{contains as H}from"../../floating-ui-react/utils/element.js";import{focusOut as W,listNavigation as B,triggerHover as S,triggerPress as V}from"../../utils/reason-parts.js";import{stopEvent as $}from"../../floating-ui-react/utils/event.js";const z={width:0,height:0},q=/* @__PURE__ */e.forwardRef(function(q,L){const{className:G,render:K,nativeButton:U=!0,disabled:J,...Q}=q,{value:X,setValue:Y,mounted:Z,open:ee,positionerElement:te,setActivationDirection:oe,setFloatingRootContext:re,popupElement:se,viewportElement:ne,rootRef:ie,beforeOutsideRef:ue,afterOutsideRef:ae,afterInsideRef:ce,beforeInsideRef:pe,prevTriggerElementRef:le,delay:me,closeDelay:fe,orientation:de,setViewportInert:ge,nested:he}=c(),{value:_e}=a(),ye=p(),be=x(),ve=R(),je=n(),Ee=i(),Re=i(),Pe=i(),[we,xe]=e.useState(null),[Ce,Me]=e.useState(!0),[ke,De]=e.useState(""),Fe=e.useRef(!1),Ie=e.useRef(z),Ne=e.useRef(null),Oe=ee&&X===_e,Te=u(Oe),Ae=!!te||!X,He=_(se);function We(){se&&(se.style.setProperty(y.popupWidth,"auto"),se.style.setProperty(y.popupHeight,"auto"))}e.useEffect(()=>{Ne.current?.abort()},[Oe]);const Be=r((e,t)=>{if(!se||!te)return;se.style.removeProperty(y.popupWidth),se.style.removeProperty(y.popupHeight),te.style.removeProperty(b.positionerWidth),te.style.removeProperty(b.positionerHeight);const{width:o,height:r}=j(se),s=o||Ie.current.width,n=r||Ie.current.height;0!==t&&0!==e||(e=s,t=n),se.style.setProperty(y.popupWidth,`${e}px`),se.style.setProperty(y.popupHeight,`${t}px`),te.style.setProperty(b.positionerWidth,`${s}px`),te.style.setProperty(b.positionerHeight,`${n}px`),Re.request(()=>{se.style.setProperty(y.popupWidth,`${s}px`),se.style.setProperty(y.popupHeight,`${n}px`),Pe.request(()=>{Ne.current=new AbortController,He(We,Ne.current.signal)})})});e.useEffect(()=>{ee||(je.clear(),Re.cancel(),Pe.cancel())},[je,ee,Re,Pe]),e.useEffect(()=>{Z||(Ie.current=z)},[Z]),e.useEffect(()=>{if(!se||"function"!=typeof ResizeObserver)return;const e=new ResizeObserver(()=>{Ie.current={width:se.offsetWidth,height:se.offsetHeight}});return e.observe(se),()=>{e.disconnect()}},[se]),e.useEffect(()=>{if(!se||!Oe||"function"!=typeof MutationObserver)return;const e=new MutationObserver(()=>{Ne.current?.abort(),Be(Ie.current.width,Ie.current.height)});return e.observe(se,{childList:!0,subtree:!0,characterData:!0}),()=>{e.disconnect()}},[se,te,Oe,Be]),e.useEffect(()=>(Oe&&ee&&se&&Fe.current&&(Fe.current=!1,Ee.request(()=>{ue.current?.focus()})),()=>{Ee.cancel()}),[ue,Ee,Be,Oe,ee,se]),s(()=>{Te.current&&ee&&se&&Be(0,0)},[Te,ee,se,Be]);const Se=C({open:ee,onOpenChange:function(e,o){const r=o.reason===S;function s(){r&&(Me(!0),je.clear(),je.start(f,()=>{Me(!1)})),e?Y(_e,o):(Y(null,o),De(""))}Ae&&("touch"===ke&&r||(e||X===_e)&&(r?t.flushSync(s):s()))},elements:{reference:we,floating:te||ne}}),Ve=M(Se,{move:!1,handleClose:k({blockPointerEvents:"touch"!==ke}),restMs:Z&&te?0:me,delay:{close:fe}}),$e=D(Se,{enabled:Ae,stickIfOpen:Ce,toggle:Oe});s(()=>{Oe&&(re(Se),le.current=we)},[Oe,Se,re,le,we]);const{getReferenceProps:ze}=F([Ve,$e]);function qe(e){t.flushSync(()=>{const t=le.current?.getBoundingClientRect();if(Z&&t&&we){const e=we.getBoundingClientRect(),o=e.left>t.left,r=e.top>t.top;"horizontal"===de&&e.left!==t.left?oe(o?"right":"left"):"vertical"===de&&e.top!==t.top&&oe(r?"down":"up")}"click"!==e.type&&(Se.context.dataRef.current.openEvent=void 0),"touch"===ke&&"click"!==e.type||null!=X&&Y(_e,l("mouseenter"===e.type?S:V,e.nativeEvent))})}const Le=r(e=>{if(!se||!te)return void qe(e);const{width:t,height:o}=j(se);qe(e),Be(t,o)}),Ge=e.useMemo(()=>({open:Oe}),[Oe]);function Ke(e){De(e.pointerType)}const Ue={tabIndex:0,onMouseEnter:Le,onClick:Le,onPointerEnter:Ke,onPointerDown:Ke,"aria-expanded":Oe,"aria-controls":Oe?se?.id:void 0,[E]:"",onFocus(){Oe&&ge(!1)},onMouseMove(){Fe.current=!1},onKeyDown(e){if(Fe.current=!0,he)return;const t="horizontal"===de&&"ArrowDown"===e.key,o="vertical"===de&&"ArrowRight"===e.key;(t||o)&&(Y(_e,l(B,e.nativeEvent)),Le(e),$(e))},onBlur(e){te&&se&&h({currentTarget:e.currentTarget,relatedTarget:e.relatedTarget},{popupElement:se,rootRef:ie,tree:be,nodeId:ye})&&Y(null,l(W,e.nativeEvent))}},{getButtonProps:Je,buttonRef:Qe}=I({disabled:J,focusableWhenDisabled:!0,native:U}),Xe=te||ne;/* @__PURE__ */
1
+ import*as e from"react";import*as t from"react-dom";import{isTabbable as o}from"../../../../../../../tabbable@6.4.0/node_modules/tabbable/dist/index.esm.js";import{useStableCallback as r}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useStableCallback.js";import{useIsoLayoutEffect as s}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useIsoLayoutEffect.js";import{useTimeout as n}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useTimeout.js";import{useAnimationFrame as i}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useAnimationFrame.js";import{useValueAsRef as u}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useValueAsRef.js";import{useNavigationMenuItemContext as a}from"../item/NavigationMenuItemContext.js";import{useNavigationMenuRootContext as c,useNavigationMenuTreeContext as p}from"../root/NavigationMenuRootContext.js";import{createChangeEventDetails as l}from"../../utils/createBaseUIEventDetails.js";import{ownerVisuallyHidden as m,PATIENT_CLICK_THRESHOLD as f}from"../../utils/constants.js";import{FocusGuard as d}from"../../utils/FocusGuard.js";import{pressableTriggerOpenStateMapping as g}from"../../utils/popupStateMapping.js";import{isOutsideMenuEvent as h}from"../utils/isOutsideMenuEvent.js";import{useAnimationsFinished as _}from"../../utils/useAnimationsFinished.js";import{NavigationMenuPopupCssVars as y}from"../popup/NavigationMenuPopupCssVars.js";import{NavigationMenuPositionerCssVars as b}from"../positioner/NavigationMenuPositionerCssVars.js";import{CompositeItem as v}from"../../composite/item/CompositeItem.js";import{getCssDimensions as j}from"../../utils/getCssDimensions.js";import{NAVIGATION_MENU_TRIGGER_IDENTIFIER as E}from"../utils/constants.js";import{useNavigationMenuDismissContext as R}from"../list/NavigationMenuDismissContext.js";import{jsxs as P,jsx as w}from"react/jsx-runtime";import{useFloatingTree as x}from"../../floating-ui-react/components/FloatingTree.js";import{useFloatingRootContext as C}from"../../floating-ui-react/hooks/useFloatingRootContext.js";import{useHover as M}from"../../floating-ui-react/hooks/useHover.js";import{safePolygon as k}from"../../floating-ui-react/safePolygon.js";import{useClick as D}from"../../floating-ui-react/hooks/useClick.js";import{useInteractions as F}from"../../floating-ui-react/hooks/useInteractions.js";import{useButton as I}from"../../use-button/useButton.js";import{EMPTY_ARRAY as N}from"../../../../../../../@base-ui_utils@0.2.3_@types_react@19.2.7_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/empty.js";import{isOutsideEvent as O,getPreviousTabbable as T,getNextTabbable as A}from"../../floating-ui-react/utils/tabbable.js";import{contains as H}from"../../floating-ui-react/utils/element.js";import{focusOut as W,listNavigation as B,triggerHover as S,triggerPress as V}from"../../utils/reason-parts.js";import{stopEvent as $}from"../../floating-ui-react/utils/event.js";const z={width:0,height:0},q=/* @__PURE__ */e.forwardRef(function(q,L){const{className:G,render:K,nativeButton:U=!0,disabled:J,...Q}=q,{value:X,setValue:Y,mounted:Z,open:ee,positionerElement:te,setActivationDirection:oe,setFloatingRootContext:re,popupElement:se,viewportElement:ne,rootRef:ie,beforeOutsideRef:ue,afterOutsideRef:ae,afterInsideRef:ce,beforeInsideRef:pe,prevTriggerElementRef:le,delay:me,closeDelay:fe,orientation:de,setViewportInert:ge,nested:he}=c(),{value:_e}=a(),ye=p(),be=x(),ve=R(),je=n(),Ee=i(),Re=i(),Pe=i(),[we,xe]=e.useState(null),[Ce,Me]=e.useState(!0),[ke,De]=e.useState(""),Fe=e.useRef(!1),Ie=e.useRef(z),Ne=e.useRef(null),Oe=ee&&X===_e,Te=u(Oe),Ae=!!te||!X,He=_(se);function We(){se&&(se.style.setProperty(y.popupWidth,"auto"),se.style.setProperty(y.popupHeight,"auto"))}e.useEffect(()=>{Ne.current?.abort()},[Oe]);const Be=r((e,t)=>{if(!se||!te)return;se.style.removeProperty(y.popupWidth),se.style.removeProperty(y.popupHeight),te.style.removeProperty(b.positionerWidth),te.style.removeProperty(b.positionerHeight);const{width:o,height:r}=j(se),s=o||Ie.current.width,n=r||Ie.current.height;0!==t&&0!==e||(e=s,t=n),se.style.setProperty(y.popupWidth,`${e}px`),se.style.setProperty(y.popupHeight,`${t}px`),te.style.setProperty(b.positionerWidth,`${s}px`),te.style.setProperty(b.positionerHeight,`${n}px`),Re.request(()=>{se.style.setProperty(y.popupWidth,`${s}px`),se.style.setProperty(y.popupHeight,`${n}px`),Pe.request(()=>{Ne.current=new AbortController,He(We,Ne.current.signal)})})});e.useEffect(()=>{ee||(je.clear(),Re.cancel(),Pe.cancel())},[je,ee,Re,Pe]),e.useEffect(()=>{Z||(Ie.current=z)},[Z]),e.useEffect(()=>{if(!se||"function"!=typeof ResizeObserver)return;const e=new ResizeObserver(()=>{Ie.current={width:se.offsetWidth,height:se.offsetHeight}});return e.observe(se),()=>{e.disconnect()}},[se]),e.useEffect(()=>{if(!se||!Oe||"function"!=typeof MutationObserver)return;const e=new MutationObserver(()=>{Ne.current?.abort(),Be(Ie.current.width,Ie.current.height)});return e.observe(se,{childList:!0,subtree:!0,characterData:!0}),()=>{e.disconnect()}},[se,te,Oe,Be]),e.useEffect(()=>(Oe&&ee&&se&&Fe.current&&(Fe.current=!1,Ee.request(()=>{ue.current?.focus()})),()=>{Ee.cancel()}),[ue,Ee,Be,Oe,ee,se]),s(()=>{Te.current&&ee&&se&&Be(0,0)},[Te,ee,se,Be]);const Se=C({open:ee,onOpenChange:function(e,o){const r=o.reason===S;function s(){r&&(Me(!0),je.clear(),je.start(f,()=>{Me(!1)})),e?Y(_e,o):(Y(null,o),De(""))}Ae&&("touch"===ke&&r||(e||X===_e)&&(r?t.flushSync(s):s()))},elements:{reference:we,floating:te||ne}}),Ve=M(Se,{move:!1,handleClose:k({blockPointerEvents:"touch"!==ke}),restMs:Z&&te?0:me,delay:{close:fe}}),$e=D(Se,{enabled:Ae,stickIfOpen:Ce,toggle:Oe});s(()=>{Oe&&(re(Se),le.current=we)},[Oe,Se,re,le,we]);const{getReferenceProps:ze}=F([Ve,$e]);function qe(e){t.flushSync(()=>{const t=le.current?.getBoundingClientRect();if(Z&&t&&we){const e=we.getBoundingClientRect(),o=e.left>t.left,r=e.top>t.top;"horizontal"===de&&e.left!==t.left?oe(o?"right":"left"):"vertical"===de&&e.top!==t.top&&oe(r?"down":"up")}"click"!==e.type&&(Se.context.dataRef.current.openEvent=void 0),"touch"===ke&&"click"!==e.type||null!=X&&Y(_e,l("mouseenter"===e.type?S:V,e.nativeEvent))})}const Le=r(e=>{if(!se||!te)return void qe(e);const{width:t,height:o}=j(se);qe(e),Be(t,o)}),Ge=e.useMemo(()=>({open:Oe}),[Oe]);function Ke(e){De(e.pointerType)}const Ue={tabIndex:0,onMouseEnter:Le,onClick:Le,onPointerEnter:Ke,onPointerDown:Ke,"aria-expanded":Oe,"aria-controls":Oe?se?.id:void 0,[E]:"",onFocus(){Oe&&ge(!1)},onMouseMove(){Fe.current=!1},onKeyDown(e){if(Fe.current=!0,he)return;const t="horizontal"===de&&"ArrowDown"===e.key,o="vertical"===de&&"ArrowRight"===e.key;(t||o)&&(Y(_e,l(B,e.nativeEvent)),Le(e),$(e))},onBlur(e){te&&se&&h({currentTarget:e.currentTarget,relatedTarget:e.relatedTarget},{popupElement:se,rootRef:ie,tree:be,nodeId:ye})&&Y(null,l(W,e.nativeEvent))}},{getButtonProps:Je,buttonRef:Qe}=I({disabled:J,focusableWhenDisabled:!0,native:U}),Xe=te||ne;/* @__PURE__ */
2
2
  return P(e.Fragment,{children:[/* @__PURE__ */w(v,{tag:"button",render:K,className:G,state:Ge,stateAttributesMapping:g,refs:[L,xe,Qe],props:[ze,ve?.reference||N,Ue,Q,Je]}),Oe&&/* @__PURE__ */P(e.Fragment,{children:[/* @__PURE__ */w(d,{ref:ue,onFocus:e=>{if(Xe&&O(e,Xe))pe.current?.focus();else{const e=T(we);e?.focus()}}}),/* @__PURE__ */w("span",{"aria-owns":ne?.id,style:m}),/* @__PURE__ */w(d,{ref:ae,onFocus:e=>{if(Xe&&O(e,Xe)){const e=ce.current&&o(ce.current)?ce.current:we;e?.focus()}else{const t=A(we);t?.focus(),H(ie.current,t)||Y(null,l(W,e.nativeEvent))}}})]})]})});"production"!==process.env.NODE_ENV&&(q.displayName="NavigationMenuTrigger");export{q as NavigationMenuTrigger};
@@ -0,0 +1 @@
1
+ var t=/* @__PURE__ */["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),e="undefined"==typeof Element,n=e?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,o=!e&&Element.prototype.getRootNode?function(t){var e;return null==t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},r=function(t,e){var n;void 0===e&&(e=!0);var o=null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"inert");return""===o||"true"===o||e&&t&&("function"==typeof t.closest?t.closest("[inert]"):r(t.parentNode))},i=function(e,o,i){if(r(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(t));return o&&n.call(e,t)&&a.unshift(e),a=a.filter(i)},a=function(e,o,i){for(var l=[],u=Array.from(e);u.length;){var c=u.shift();if(!r(c,!1))if("SLOT"===c.tagName){var d=c.assignedElements(),f=d.length?d:c.children,s=a(f,!0,i);i.flatten?l.push.apply(l,s):l.push({scopeParent:c,candidates:s})}else{n.call(c,t)&&i.filter(c)&&(o||!e.includes(c))&&l.push(c);var p=c.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(c),h=!r(p,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(c));if(p&&h){var v=a(!0===p?c.children:p.children,!0,i);i.flatten?l.push.apply(l,v):l.push({scopeParent:c,candidates:v})}else u.unshift.apply(u,c.children)}}return l},l=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},u=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||function(t){var e,n=null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"contenteditable");return""===n||"true"===n}(t))&&!l(t)?0:t.tabIndex},c=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},d=function(t){return"INPUT"===t.tagName},f=function(t){return function(t){return d(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||o(t),r=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=r(window.CSS.escape(t.name));else try{e=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]}(e,t.form);return!i||i===t}(t)},s=function(t){var e=t.getBoundingClientRect(),n=e.width,o=e.height;return 0===n&&0===o},p=function(t,e){var r=e.displayCheck,i=e.getShadowRoot;if("full-native"===r&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(t).visibility)return!0;var a=n.call(t,"details>summary:first-of-type")?t.parentElement:t;if(n.call(a,"details:not([open]) *"))return!0;if(r&&"full"!==r&&"full-native"!==r&&"legacy-full"!==r){if("non-zero-area"===r)return s(t)}else{if("function"==typeof i){for(var l=t;t;){var u=t.parentElement,c=o(t);if(u&&!u.shadowRoot&&!0===i(u))return s(t);t=t.assignedSlot?t.assignedSlot:u||c===t.ownerDocument?u:c.host}t=l}if(function(t){var e,n,r,i,a=t&&o(t),l=null===(e=a)||void 0===e?void 0:e.host,u=!1;if(a&&a!==t)for(u=!!(null!==(n=l)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(l)||null!=t&&null!==(i=t.ownerDocument)&&void 0!==i&&i.contains(t));!u&&l;){var c,d,f;u=!(null===(d=l=null===(c=a=o(l))||void 0===c?void 0:c.host)||void 0===d||null===(f=d.ownerDocument)||void 0===f||!f.contains(l))}return u}(t))return!t.getClientRects().length;if("legacy-full"!==r)return!0}return!1},h=function(t,e){return!(e.disabled||function(t){return d(t)&&"hidden"===t.type}(e)||p(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some(function(t){return"SUMMARY"===t.tagName})}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var o=0;o<e.children.length;o++){var r=e.children.item(o);if("LEGEND"===r.tagName)return!!n.call(e,"fieldset[disabled] *")||!r.contains(t)}return!0}e=e.parentElement}return!1}(e))},v=function(t,e){return!(f(e)||u(e)<0||!h(t,e))},y=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},m=function(t){var e=[],n=[];return t.forEach(function(t,o){var r=!!t.scopeParent,i=r?t.scopeParent:t,a=function(t,e){var n=u(t);return n<0&&e&&!l(t)?0:n}(i,r),c=r?m(t.candidates):i;0===a?r?e.push.apply(e,c):e.push(i):n.push({documentOrder:o,tabIndex:a,item:t,isScope:r,content:c})}),n.sort(c).reduce(function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t},[]).concat(e)},g=function(t,e){var n;return n=(e=e||{}).getShadowRoot?a([t],e.includeContainer,{filter:v.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:y}):i(t,e.includeContainer,v.bind(null,e)),m(n)},S=function(t,e){return(e=e||{}).getShadowRoot?a([t],e.includeContainer,{filter:h.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):i(t,e.includeContainer,h.bind(null,e))},b=function(e,o){if(o=o||{},!e)throw new Error("No node provided");return!1!==n.call(e,t)&&v(o,e)};export{S as focusable,u as getTabIndex,b as isTabbable,g as tabbable};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xebecship/ui",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "Xebec UI - A React component library for building modern web applications.",
5
5
  "type": "module",
6
6
  "author": "XebecShip",
@@ -8,7 +8,7 @@
8
8
  "files": [
9
9
  "dist",
10
10
  "README.md",
11
- "./src/theme.css"
11
+ "src/theme.css"
12
12
  ],
13
13
  "publishConfig": {
14
14
  "access": "public"
@@ -18,6 +18,7 @@
18
18
  "import": "./dist/index.js",
19
19
  "types": "./dist/index.d.ts"
20
20
  },
21
+ "./style.css": "./dist/style.css",
21
22
  "./theme.css": "./src/theme.css"
22
23
  },
23
24
  "sideEffects": [
@@ -54,14 +55,14 @@
54
55
  "@types/react": "^19.2.7",
55
56
  "@types/react-dom": "^19.2.3",
56
57
  "@vitejs/plugin-react": "^5.1.2",
57
- "@xebecship/config": "^1.1.13",
58
58
  "react": "^19.2.3",
59
59
  "react-dom": "^19.2.3",
60
60
  "tailwindcss": "^4.1.18",
61
61
  "terser": "^5.44.1",
62
62
  "vite": "^7.3.0",
63
63
  "vite-plugin-dts": "^4.5.4",
64
- "vite-tsconfig-paths": "^6.0.3"
64
+ "vite-tsconfig-paths": "^6.0.3",
65
+ "@xebecship/config": "1.1.13"
65
66
  },
66
67
  "scripts": {
67
68
  "dev": "vite",
@@ -1 +0,0 @@
1
- var t=/* @__PURE__ */["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),e="undefined"==typeof Element,n=e?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,r=!e&&Element.prototype.getRootNode?function(t){var e;return null==t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},o=function(t,e){var n;void 0===e&&(e=!0);var r=null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"inert");return""===r||"true"===r||e&&t&&o(t.parentNode)},i=function(e,r,i){if(o(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(t));return r&&n.call(e,t)&&a.unshift(e),a=a.filter(i)},a=function(e,r,i){for(var l=[],u=Array.from(e);u.length;){var c=u.shift();if(!o(c,!1))if("SLOT"===c.tagName){var d=c.assignedElements(),f=d.length?d:c.children,s=a(f,!0,i);i.flatten?l.push.apply(l,s):l.push({scopeParent:c,candidates:s})}else{n.call(c,t)&&i.filter(c)&&(r||!e.includes(c))&&l.push(c);var p=c.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(c),h=!o(p,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(c));if(p&&h){var v=a(!0===p?c.children:p.children,!0,i);i.flatten?l.push.apply(l,v):l.push({scopeParent:c,candidates:v})}else u.unshift.apply(u,c.children)}}return l},l=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},u=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||function(t){var e,n=null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"contenteditable");return""===n||"true"===n}(t))&&!l(t)?0:t.tabIndex},c=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},d=function(t){return"INPUT"===t.tagName},f=function(t){return function(t){return d(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||r(t),o=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=o(window.CSS.escape(t.name));else try{e=o(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]}(e,t.form);return!i||i===t}(t)},s=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height;return 0===n&&0===r},p=function(t,e){var o=e.displayCheck,i=e.getShadowRoot;if("full-native"===o&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(t).visibility)return!0;var a=n.call(t,"details>summary:first-of-type")?t.parentElement:t;if(n.call(a,"details:not([open]) *"))return!0;if(o&&"full"!==o&&"full-native"!==o&&"legacy-full"!==o){if("non-zero-area"===o)return s(t)}else{if("function"==typeof i){for(var l=t;t;){var u=t.parentElement,c=r(t);if(u&&!u.shadowRoot&&!0===i(u))return s(t);t=t.assignedSlot?t.assignedSlot:u||c===t.ownerDocument?u:c.host}t=l}if(function(t){var e,n,o,i,a=t&&r(t),l=null===(e=a)||void 0===e?void 0:e.host,u=!1;if(a&&a!==t)for(u=!!(null!==(n=l)&&void 0!==n&&null!==(o=n.ownerDocument)&&void 0!==o&&o.contains(l)||null!=t&&null!==(i=t.ownerDocument)&&void 0!==i&&i.contains(t));!u&&l;){var c,d,f;u=!(null===(d=l=null===(c=a=r(l))||void 0===c?void 0:c.host)||void 0===d||null===(f=d.ownerDocument)||void 0===f||!f.contains(l))}return u}(t))return!t.getClientRects().length;if("legacy-full"!==o)return!0}return!1},h=function(t,e){return!(e.disabled||o(e)||function(t){return d(t)&&"hidden"===t.type}(e)||p(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some(function(t){return"SUMMARY"===t.tagName})}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var r=0;r<e.children.length;r++){var o=e.children.item(r);if("LEGEND"===o.tagName)return!!n.call(e,"fieldset[disabled] *")||!o.contains(t)}return!0}e=e.parentElement}return!1}(e))},v=function(t,e){return!(f(e)||u(e)<0||!h(t,e))},y=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},m=function(t){var e=[],n=[];return t.forEach(function(t,r){var o=!!t.scopeParent,i=o?t.scopeParent:t,a=function(t,e){var n=u(t);return n<0&&e&&!l(t)?0:n}(i,o),c=o?m(t.candidates):i;0===a?o?e.push.apply(e,c):e.push(i):n.push({documentOrder:r,tabIndex:a,item:t,isScope:o,content:c})}),n.sort(c).reduce(function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t},[]).concat(e)},g=function(t,e){var n;return n=(e=e||{}).getShadowRoot?a([t],e.includeContainer,{filter:v.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:y}):i(t,e.includeContainer,v.bind(null,e)),m(n)},S=function(t,e){return(e=e||{}).getShadowRoot?a([t],e.includeContainer,{filter:h.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):i(t,e.includeContainer,h.bind(null,e))},b=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return!1!==n.call(e,t)&&v(r,e)};export{S as focusable,u as getTabIndex,b as isTabbable,g as tabbable};