@gv-tech/design-system 2.27.2 → 2.28.0
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 +1 -1
- package/dist/design-system.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +64 -64
- package/dist/packages/ui-web/src/index.d.ts +1 -1
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.cjs.map +1 -1
- package/dist/support-fab.mjs +35 -27
- package/dist/support-fab.mjs.map +1 -1
- package/dist/vendor-B6CFfDyk.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./theme-toggle-CNDBFa9t.js"),ee=require("./utils-D7tt_q-u.js"),t=require("./accordion.cjs"),n=require("./alert.cjs"),r=require("./button.cjs"),i=require("./alert-dialog.cjs"),te=require("./aspect-ratio.cjs"),a=require("./avatar.cjs"),o=require("./badge.cjs"),s=require("./breadcrumb.cjs"),c=require("./calendar.cjs"),l=require("./card.cjs"),u=require("./carousel.cjs"),d=require("./chart.cjs"),ne=require("./checkbox.cjs"),f=require("./collapsible.cjs"),p=require("./dialog.cjs"),re=require("./input.cjs"),ie=require("./textarea.cjs"),m=require("./input-group.cjs"),h=require("./command.cjs"),g=require("./context-menu.cjs"),_=require("./drawer.cjs"),v=require("./dropdown-menu.cjs"),ae=require("./label.cjs"),y=require("./form.cjs"),b=require("./hover-card.cjs"),x=require("./menubar.cjs"),S=require("./navigation-menu.cjs"),C=require("./pagination.cjs"),w=require("./popover.cjs"),oe=require("./progress.cjs"),T=require("./radio-group.cjs"),E=require("./resizable.cjs"),D=require("./scroll-area.cjs"),se=require("./scroll-to-top.cjs"),ce=require("./support-fab.cjs"),O=require("./search.cjs"),k=require("./select.cjs"),A=require("./separator.cjs"),j=require("./sheet.cjs"),M=require("./skeleton.cjs"),N=require("./slider.cjs"),P=require("./sonner.cjs"),F=require("./switch.cjs"),I=require("./table.cjs"),L=require("./tabs.cjs"),R=require("./text.cjs"),z=require("./toggle.cjs"),B=require("./toggle-group.cjs"),V=require("./tooltip.cjs"),H=require("./toast.cjs"),le=require("./theme-provider.cjs"),U=require("./toaster-C3UZyPzU.js"),ue=require("./table-of-contents.cjs"),W=require("./button-group.cjs"),G=require("./direction.cjs"),K=require("./empty.cjs"),de=require("./spinner.cjs"),q=require("./field.cjs"),J=require("./native-select.cjs"),Y=require("./kbd.cjs"),X=require("./item.cjs"),Z=require("./combobox.cjs"),Q=require("./input-otp.cjs"),$=require("./sidebar-BnuanaZN.js");exports.Accordion=t.Accordion,exports.AccordionContent=t.AccordionContent,exports.AccordionItem=t.AccordionItem,exports.AccordionTrigger=t.AccordionTrigger,exports.Alert=n.Alert,exports.AlertDescription=n.AlertDescription,exports.AlertDialog=i.AlertDialog,exports.AlertDialogAction=i.AlertDialogAction,exports.AlertDialogCancel=i.AlertDialogCancel,exports.AlertDialogContent=i.AlertDialogContent,exports.AlertDialogDescription=i.AlertDialogDescription,exports.AlertDialogFooter=i.AlertDialogFooter,exports.AlertDialogHeader=i.AlertDialogHeader,exports.AlertDialogOverlay=i.AlertDialogOverlay,exports.AlertDialogPortal=i.AlertDialogPortal,exports.AlertDialogTitle=i.AlertDialogTitle,exports.AlertDialogTrigger=i.AlertDialogTrigger,exports.AlertTitle=n.AlertTitle,exports.AspectRatio=te.AspectRatio,exports.Avatar=a.Avatar,exports.AvatarFallback=a.AvatarFallback,exports.AvatarImage=a.AvatarImage,exports.Badge=o.Badge,exports.Breadcrumb=s.Breadcrumb,exports.BreadcrumbEllipsis=s.BreadcrumbEllipsis,exports.BreadcrumbItem=s.BreadcrumbItem,exports.BreadcrumbLink=s.BreadcrumbLink,exports.BreadcrumbList=s.BreadcrumbList,exports.BreadcrumbPage=s.BreadcrumbPage,exports.BreadcrumbSeparator=s.BreadcrumbSeparator,exports.Button=r.Button,exports.ButtonGroup=W.ButtonGroup,exports.ButtonGroupSeparator=W.ButtonGroupSeparator,exports.ButtonGroupText=W.ButtonGroupText,exports.Calendar=c.Calendar,exports.CalendarDayButton=c.CalendarDayButton,exports.Card=l.Card,exports.CardContent=l.CardContent,exports.CardDescription=l.CardDescription,exports.CardFooter=l.CardFooter,exports.CardHeader=l.CardHeader,exports.CardTitle=l.CardTitle,exports.Carousel=u.Carousel,exports.CarouselContent=u.CarouselContent,exports.CarouselItem=u.CarouselItem,exports.CarouselNext=u.CarouselNext,exports.CarouselPrevious=u.CarouselPrevious,exports.ChartContainer=d.ChartContainer,exports.ChartLegend=d.ChartLegend,exports.ChartLegendContent=d.ChartLegendContent,exports.ChartStyle=d.ChartStyle,exports.ChartTooltip=d.ChartTooltip,exports.ChartTooltipContent=d.ChartTooltipContent,exports.Checkbox=ne.Checkbox,exports.Collapsible=f.Collapsible,exports.CollapsibleContent=f.CollapsibleContent,exports.CollapsibleTrigger=f.CollapsibleTrigger,exports.Combobox=Z.Combobox,exports.ComboboxChip=Z.ComboboxChip,exports.ComboboxChips=Z.ComboboxChips,exports.ComboboxChipsInput=Z.ComboboxChipsInput,exports.ComboboxCollection=Z.ComboboxCollection,exports.ComboboxContent=Z.ComboboxContent,exports.ComboboxEmpty=Z.ComboboxEmpty,exports.ComboboxGroup=Z.ComboboxGroup,exports.ComboboxInput=Z.ComboboxInput,exports.ComboboxItem=Z.ComboboxItem,exports.ComboboxLabel=Z.ComboboxLabel,exports.ComboboxList=Z.ComboboxList,exports.ComboboxSeparator=Z.ComboboxSeparator,exports.ComboboxTrigger=Z.ComboboxTrigger,exports.ComboboxValue=Z.ComboboxValue,exports.Command=h.Command,exports.CommandDialog=h.CommandDialog,exports.CommandEmpty=h.CommandEmpty,exports.CommandGroup=h.CommandGroup,exports.CommandInput=h.CommandInput,exports.CommandItem=h.CommandItem,exports.CommandList=h.CommandList,exports.CommandSeparator=h.CommandSeparator,exports.CommandShortcut=h.CommandShortcut,exports.ContextMenu=g.ContextMenu,exports.ContextMenuCheckboxItem=g.ContextMenuCheckboxItem,exports.ContextMenuContent=g.ContextMenuContent,exports.ContextMenuGroup=g.ContextMenuGroup,exports.ContextMenuItem=g.ContextMenuItem,exports.ContextMenuLabel=g.ContextMenuLabel,exports.ContextMenuPortal=g.ContextMenuPortal,exports.ContextMenuRadioGroup=g.ContextMenuRadioGroup,exports.ContextMenuRadioItem=g.ContextMenuRadioItem,exports.ContextMenuSeparator=g.ContextMenuSeparator,exports.ContextMenuShortcut=g.ContextMenuShortcut,exports.ContextMenuSub=g.ContextMenuSub,exports.ContextMenuSubContent=g.ContextMenuSubContent,exports.ContextMenuSubTrigger=g.ContextMenuSubTrigger,exports.ContextMenuTrigger=g.ContextMenuTrigger,exports.Dialog=p.Dialog,exports.DialogClose=p.DialogClose,exports.DialogContent=p.DialogContent,exports.DialogDescription=p.DialogDescription,exports.DialogFooter=p.DialogFooter,exports.DialogHeader=p.DialogHeader,exports.DialogOverlay=p.DialogOverlay,exports.DialogPortal=p.DialogPortal,exports.DialogTitle=p.DialogTitle,exports.DialogTrigger=p.DialogTrigger,exports.DirectionProvider=G.DirectionProvider,exports.Drawer=_.Drawer,exports.DrawerClose=_.DrawerClose,exports.DrawerContent=_.DrawerContent,exports.DrawerDescription=_.DrawerDescription,exports.DrawerFooter=_.DrawerFooter,exports.DrawerHeader=_.DrawerHeader,exports.DrawerOverlay=_.DrawerOverlay,exports.DrawerPortal=_.DrawerPortal,exports.DrawerTitle=_.DrawerTitle,exports.DrawerTrigger=_.DrawerTrigger,exports.DropdownMenu=v.DropdownMenu,exports.DropdownMenuCheckboxItem=v.DropdownMenuCheckboxItem,exports.DropdownMenuContent=v.DropdownMenuContent,exports.DropdownMenuGroup=v.DropdownMenuGroup,exports.DropdownMenuItem=v.DropdownMenuItem,exports.DropdownMenuLabel=v.DropdownMenuLabel,exports.DropdownMenuPortal=v.DropdownMenuPortal,exports.DropdownMenuRadioGroup=v.DropdownMenuRadioGroup,exports.DropdownMenuRadioItem=v.DropdownMenuRadioItem,exports.DropdownMenuSeparator=v.DropdownMenuSeparator,exports.DropdownMenuShortcut=v.DropdownMenuShortcut,exports.DropdownMenuSub=v.DropdownMenuSub,exports.DropdownMenuSubContent=v.DropdownMenuSubContent,exports.DropdownMenuSubTrigger=v.DropdownMenuSubTrigger,exports.DropdownMenuTrigger=v.DropdownMenuTrigger,exports.Empty=K.Empty,exports.EmptyContent=K.EmptyContent,exports.EmptyDescription=K.EmptyDescription,exports.EmptyHeader=K.EmptyHeader,exports.EmptyMedia=K.EmptyMedia,exports.EmptyTitle=K.EmptyTitle,exports.Field=q.Field,exports.FieldContent=q.FieldContent,exports.FieldDescription=q.FieldDescription,exports.FieldError=q.FieldError,exports.FieldGroup=q.FieldGroup,exports.FieldLabel=q.FieldLabel,exports.FieldLegend=q.FieldLegend,exports.FieldSeparator=q.FieldSeparator,exports.FieldSet=q.FieldSet,exports.FieldTitle=q.FieldTitle,exports.Form=y.Form,exports.FormControl=y.FormControl,exports.FormDescription=y.FormDescription,exports.FormField=y.FormField,exports.FormItem=y.FormItem,exports.FormLabel=y.FormLabel,exports.FormMessage=y.FormMessage,exports.HoverCard=b.HoverCard,exports.HoverCardContent=b.HoverCardContent,exports.HoverCardTrigger=b.HoverCardTrigger,exports.Input=re.Input,exports.InputGroup=m.InputGroup,exports.InputGroupAddon=m.InputGroupAddon,exports.InputGroupButton=m.InputGroupButton,exports.InputGroupInput=m.InputGroupInput,exports.InputGroupText=m.InputGroupText,exports.InputGroupTextarea=m.InputGroupTextarea,exports.InputOTP=Q.InputOTP,exports.InputOTPGroup=Q.InputOTPGroup,exports.InputOTPSeparator=Q.InputOTPSeparator,exports.InputOTPSlot=Q.InputOTPSlot,exports.Item=X.Item,exports.ItemActions=X.ItemActions,exports.ItemContent=X.ItemContent,exports.ItemDescription=X.ItemDescription,exports.ItemFooter=X.ItemFooter,exports.ItemGroup=X.ItemGroup,exports.ItemHeader=X.ItemHeader,exports.ItemMedia=X.ItemMedia,exports.ItemSeparator=X.ItemSeparator,exports.ItemTitle=X.ItemTitle,exports.Kbd=Y.Kbd,exports.KbdGroup=Y.KbdGroup,exports.Label=ae.Label,exports.Menubar=x.Menubar,exports.MenubarCheckboxItem=x.MenubarCheckboxItem,exports.MenubarContent=x.MenubarContent,exports.MenubarGroup=x.MenubarGroup,exports.MenubarItem=x.MenubarItem,exports.MenubarLabel=x.MenubarLabel,exports.MenubarMenu=x.MenubarMenu,exports.MenubarPortal=x.MenubarPortal,exports.MenubarRadioGroup=x.MenubarRadioGroup,exports.MenubarRadioItem=x.MenubarRadioItem,exports.MenubarSeparator=x.MenubarSeparator,exports.MenubarShortcut=x.MenubarShortcut,exports.MenubarSub=x.MenubarSub,exports.MenubarSubContent=x.MenubarSubContent,exports.MenubarSubTrigger=x.MenubarSubTrigger,exports.MenubarTrigger=x.MenubarTrigger,exports.NativeSelect=J.NativeSelect,exports.NativeSelectOptGroup=J.NativeSelectOptGroup,exports.NativeSelectOption=J.NativeSelectOption,exports.NavigationMenu=S.NavigationMenu,exports.NavigationMenuContent=S.NavigationMenuContent,exports.NavigationMenuIndicator=S.NavigationMenuIndicator,exports.NavigationMenuItem=S.NavigationMenuItem,exports.NavigationMenuLink=S.NavigationMenuLink,exports.NavigationMenuList=S.NavigationMenuList,exports.NavigationMenuTrigger=S.NavigationMenuTrigger,exports.NavigationMenuViewport=S.NavigationMenuViewport,exports.Pagination=C.Pagination,exports.PaginationContent=C.PaginationContent,exports.PaginationEllipsis=C.PaginationEllipsis,exports.PaginationItem=C.PaginationItem,exports.PaginationLink=C.PaginationLink,exports.PaginationNext=C.PaginationNext,exports.PaginationPrevious=C.PaginationPrevious,exports.Popover=w.Popover,exports.PopoverAnchor=w.PopoverAnchor,exports.PopoverContent=w.PopoverContent,exports.PopoverTrigger=w.PopoverTrigger,exports.Progress=oe.Progress,exports.RadioGroup=T.RadioGroup,exports.RadioGroupItem=T.RadioGroupItem,exports.ResizableHandle=E.ResizableHandle,exports.ResizablePanel=E.ResizablePanel,exports.ResizablePanelGroup=E.ResizablePanelGroup,exports.ScrollArea=D.ScrollArea,exports.ScrollBar=D.ScrollBar,exports.ScrollToTop=se.ScrollToTop,exports.Search=O.Search,exports.SearchTrigger=O.SearchTrigger,exports.Select=k.Select,exports.SelectContent=k.SelectContent,exports.SelectGroup=k.SelectGroup,exports.SelectItem=k.SelectItem,exports.SelectLabel=k.SelectLabel,exports.SelectScrollDownButton=k.SelectScrollDownButton,exports.SelectScrollUpButton=k.SelectScrollUpButton,exports.SelectSeparator=k.SelectSeparator,exports.SelectTrigger=k.SelectTrigger,exports.SelectValue=k.SelectValue,exports.Separator=A.Separator,exports.Sheet=j.Sheet,exports.SheetClose=j.SheetClose,exports.SheetContent=j.SheetContent,exports.SheetDescription=j.SheetDescription,exports.SheetFooter=j.SheetFooter,exports.SheetHeader=j.SheetHeader,exports.SheetTitle=j.SheetTitle,exports.SheetTrigger=j.SheetTrigger,exports.Sidebar=$.t,exports.SidebarContent=$.n,exports.SidebarFooter=$.r,exports.SidebarGroup=$.i,exports.SidebarGroupAction=$.a,exports.SidebarGroupContent=$.o,exports.SidebarGroupLabel=$.s,exports.SidebarHeader=$.c,exports.SidebarInput=$.l,exports.SidebarInset=$.u,exports.SidebarMenu=$.d,exports.SidebarMenuAction=$.f,exports.SidebarMenuBadge=$.p,exports.SidebarMenuButton=$.m,exports.SidebarMenuItem=$.h,exports.SidebarMenuSkeleton=$.g,exports.SidebarMenuSub=$._,exports.SidebarMenuSubButton=$.v,exports.SidebarMenuSubItem=$.y,exports.SidebarProvider=$.b,exports.SidebarRail=$.x,exports.SidebarSeparator=$.S,exports.SidebarTrigger=$.C,exports.Skeleton=M.Skeleton,exports.Slider=N.Slider,exports.SonnerToaster=P.Toaster,exports.Spinner=de.Spinner,exports.SupportFab=ce.SupportFab,exports.Switch=F.Switch,exports.Table=I.Table,exports.TableBody=I.TableBody,exports.TableCaption=I.TableCaption,exports.TableCell=I.TableCell,exports.TableFooter=I.TableFooter,exports.TableHead=I.TableHead,exports.TableHeader=I.TableHeader,exports.TableOfContents=ue.TableOfContents,exports.TableRow=I.TableRow,exports.Tabs=L.Tabs,exports.TabsContent=L.TabsContent,exports.TabsList=L.TabsList,exports.TabsTrigger=L.TabsTrigger,exports.Text=R.Text,exports.Textarea=ie.Textarea,exports.ThemeProvider=le.ThemeProvider,exports.ThemeToggle=e.t,exports.Toast=H.Toast,exports.ToastAction=H.ToastAction,exports.ToastClose=H.ToastClose,exports.ToastDescription=H.ToastDescription,exports.ToastProvider=H.ToastProvider,exports.ToastTitle=H.ToastTitle,exports.ToastViewport=H.ToastViewport,exports.Toaster=U.t,exports.Toggle=z.Toggle,exports.ToggleGroup=B.ToggleGroup,exports.ToggleGroupItem=B.ToggleGroupItem,exports.Tooltip=V.Tooltip,exports.TooltipContent=V.TooltipContent,exports.TooltipProvider=V.TooltipProvider,exports.TooltipTrigger=V.TooltipTrigger,exports.badgeVariants=o.badgeVariants,exports.buttonGroupVariants=W.buttonGroupVariants,exports.buttonVariants=r.buttonVariants,exports.cn=ee.t,exports.navigationMenuTriggerStyle=S.navigationMenuTriggerStyle,exports.palette=e.d,exports.preset=e.i,exports.radii=e.s,exports.radiiNumeric=e.c,exports.shadows=e.a,exports.spacing=e.l,exports.textVariants=R.textVariants,exports.theme=e.u,exports.toast=U.n,exports.toggleVariants=z.toggleVariants,exports.tokens=e.r,exports.typography=e.o,exports.useComboboxAnchor=Z.useComboboxAnchor,exports.useDirection=G.useDirection,exports.useFormField=y.useFormField,exports.useSidebar=$.w,exports.useTheme=e.n,exports.useToast=U.r;
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./theme-toggle-CNDBFa9t.js"),ee=require("./utils-D7tt_q-u.js"),t=require("./accordion.cjs"),n=require("./alert.cjs"),r=require("./button.cjs"),i=require("./alert-dialog.cjs"),te=require("./aspect-ratio.cjs"),a=require("./avatar.cjs"),o=require("./badge.cjs"),s=require("./breadcrumb.cjs"),c=require("./calendar.cjs"),l=require("./card.cjs"),u=require("./carousel.cjs"),d=require("./chart.cjs"),f=require("./checkbox.cjs"),p=require("./collapsible.cjs"),m=require("./dialog.cjs"),ne=require("./input.cjs"),re=require("./textarea.cjs"),h=require("./input-group.cjs"),g=require("./command.cjs"),_=require("./context-menu.cjs"),v=require("./drawer.cjs"),y=require("./dropdown-menu.cjs"),ie=require("./label.cjs"),b=require("./form.cjs"),x=require("./hover-card.cjs"),S=require("./menubar.cjs"),C=require("./navigation-menu.cjs"),w=require("./pagination.cjs"),T=require("./popover.cjs"),ae=require("./progress.cjs"),E=require("./radio-group.cjs"),D=require("./resizable.cjs"),O=require("./scroll-area.cjs"),oe=require("./scroll-to-top.cjs"),se=require("./support-fab.cjs"),k=require("./search.cjs"),A=require("./select.cjs"),ce=require("./separator.cjs"),j=require("./sheet.cjs"),M=require("./skeleton.cjs"),N=require("./slider.cjs"),P=require("./sonner.cjs"),F=require("./switch.cjs"),I=require("./table.cjs"),L=require("./tabs.cjs"),R=require("./text.cjs"),z=require("./toggle.cjs"),B=require("./toggle-group.cjs"),V=require("./tooltip.cjs"),H=require("./toast.cjs"),le=require("./theme-provider.cjs"),U=require("./toaster-C3UZyPzU.js"),ue=require("./table-of-contents.cjs"),W=require("./button-group.cjs"),G=require("./direction.cjs"),K=require("./empty.cjs"),de=require("./spinner.cjs"),q=require("./field.cjs"),J=require("./native-select.cjs"),Y=require("./kbd.cjs"),X=require("./item.cjs"),Z=require("./combobox.cjs"),Q=require("./input-otp.cjs"),$=require("./sidebar-BnuanaZN.js");exports.Accordion=t.Accordion,exports.AccordionContent=t.AccordionContent,exports.AccordionItem=t.AccordionItem,exports.AccordionTrigger=t.AccordionTrigger,exports.Alert=n.Alert,exports.AlertAction=n.AlertAction,exports.AlertDescription=n.AlertDescription,exports.AlertDialog=i.AlertDialog,exports.AlertDialogAction=i.AlertDialogAction,exports.AlertDialogCancel=i.AlertDialogCancel,exports.AlertDialogContent=i.AlertDialogContent,exports.AlertDialogDescription=i.AlertDialogDescription,exports.AlertDialogFooter=i.AlertDialogFooter,exports.AlertDialogHeader=i.AlertDialogHeader,exports.AlertDialogOverlay=i.AlertDialogOverlay,exports.AlertDialogPortal=i.AlertDialogPortal,exports.AlertDialogTitle=i.AlertDialogTitle,exports.AlertDialogTrigger=i.AlertDialogTrigger,exports.AlertTitle=n.AlertTitle,exports.AspectRatio=te.AspectRatio,exports.Avatar=a.Avatar,exports.AvatarFallback=a.AvatarFallback,exports.AvatarImage=a.AvatarImage,exports.Badge=o.Badge,exports.Breadcrumb=s.Breadcrumb,exports.BreadcrumbEllipsis=s.BreadcrumbEllipsis,exports.BreadcrumbItem=s.BreadcrumbItem,exports.BreadcrumbLink=s.BreadcrumbLink,exports.BreadcrumbList=s.BreadcrumbList,exports.BreadcrumbPage=s.BreadcrumbPage,exports.BreadcrumbSeparator=s.BreadcrumbSeparator,exports.Button=r.Button,exports.ButtonGroup=W.ButtonGroup,exports.ButtonGroupSeparator=W.ButtonGroupSeparator,exports.ButtonGroupText=W.ButtonGroupText,exports.Calendar=c.Calendar,exports.CalendarDayButton=c.CalendarDayButton,exports.Card=l.Card,exports.CardContent=l.CardContent,exports.CardDescription=l.CardDescription,exports.CardFooter=l.CardFooter,exports.CardHeader=l.CardHeader,exports.CardTitle=l.CardTitle,exports.Carousel=u.Carousel,exports.CarouselContent=u.CarouselContent,exports.CarouselItem=u.CarouselItem,exports.CarouselNext=u.CarouselNext,exports.CarouselPrevious=u.CarouselPrevious,exports.ChartContainer=d.ChartContainer,exports.ChartLegend=d.ChartLegend,exports.ChartLegendContent=d.ChartLegendContent,exports.ChartStyle=d.ChartStyle,exports.ChartTooltip=d.ChartTooltip,exports.ChartTooltipContent=d.ChartTooltipContent,exports.Checkbox=f.Checkbox,exports.Collapsible=p.Collapsible,exports.CollapsibleContent=p.CollapsibleContent,exports.CollapsibleTrigger=p.CollapsibleTrigger,exports.Combobox=Z.Combobox,exports.ComboboxChip=Z.ComboboxChip,exports.ComboboxChips=Z.ComboboxChips,exports.ComboboxChipsInput=Z.ComboboxChipsInput,exports.ComboboxCollection=Z.ComboboxCollection,exports.ComboboxContent=Z.ComboboxContent,exports.ComboboxEmpty=Z.ComboboxEmpty,exports.ComboboxGroup=Z.ComboboxGroup,exports.ComboboxInput=Z.ComboboxInput,exports.ComboboxItem=Z.ComboboxItem,exports.ComboboxLabel=Z.ComboboxLabel,exports.ComboboxList=Z.ComboboxList,exports.ComboboxSeparator=Z.ComboboxSeparator,exports.ComboboxTrigger=Z.ComboboxTrigger,exports.ComboboxValue=Z.ComboboxValue,exports.Command=g.Command,exports.CommandDialog=g.CommandDialog,exports.CommandEmpty=g.CommandEmpty,exports.CommandGroup=g.CommandGroup,exports.CommandInput=g.CommandInput,exports.CommandItem=g.CommandItem,exports.CommandList=g.CommandList,exports.CommandSeparator=g.CommandSeparator,exports.CommandShortcut=g.CommandShortcut,exports.ContextMenu=_.ContextMenu,exports.ContextMenuCheckboxItem=_.ContextMenuCheckboxItem,exports.ContextMenuContent=_.ContextMenuContent,exports.ContextMenuGroup=_.ContextMenuGroup,exports.ContextMenuItem=_.ContextMenuItem,exports.ContextMenuLabel=_.ContextMenuLabel,exports.ContextMenuPortal=_.ContextMenuPortal,exports.ContextMenuRadioGroup=_.ContextMenuRadioGroup,exports.ContextMenuRadioItem=_.ContextMenuRadioItem,exports.ContextMenuSeparator=_.ContextMenuSeparator,exports.ContextMenuShortcut=_.ContextMenuShortcut,exports.ContextMenuSub=_.ContextMenuSub,exports.ContextMenuSubContent=_.ContextMenuSubContent,exports.ContextMenuSubTrigger=_.ContextMenuSubTrigger,exports.ContextMenuTrigger=_.ContextMenuTrigger,exports.Dialog=m.Dialog,exports.DialogClose=m.DialogClose,exports.DialogContent=m.DialogContent,exports.DialogDescription=m.DialogDescription,exports.DialogFooter=m.DialogFooter,exports.DialogHeader=m.DialogHeader,exports.DialogOverlay=m.DialogOverlay,exports.DialogPortal=m.DialogPortal,exports.DialogTitle=m.DialogTitle,exports.DialogTrigger=m.DialogTrigger,exports.DirectionProvider=G.DirectionProvider,exports.Drawer=v.Drawer,exports.DrawerClose=v.DrawerClose,exports.DrawerContent=v.DrawerContent,exports.DrawerDescription=v.DrawerDescription,exports.DrawerFooter=v.DrawerFooter,exports.DrawerHeader=v.DrawerHeader,exports.DrawerOverlay=v.DrawerOverlay,exports.DrawerPortal=v.DrawerPortal,exports.DrawerTitle=v.DrawerTitle,exports.DrawerTrigger=v.DrawerTrigger,exports.DropdownMenu=y.DropdownMenu,exports.DropdownMenuCheckboxItem=y.DropdownMenuCheckboxItem,exports.DropdownMenuContent=y.DropdownMenuContent,exports.DropdownMenuGroup=y.DropdownMenuGroup,exports.DropdownMenuItem=y.DropdownMenuItem,exports.DropdownMenuLabel=y.DropdownMenuLabel,exports.DropdownMenuPortal=y.DropdownMenuPortal,exports.DropdownMenuRadioGroup=y.DropdownMenuRadioGroup,exports.DropdownMenuRadioItem=y.DropdownMenuRadioItem,exports.DropdownMenuSeparator=y.DropdownMenuSeparator,exports.DropdownMenuShortcut=y.DropdownMenuShortcut,exports.DropdownMenuSub=y.DropdownMenuSub,exports.DropdownMenuSubContent=y.DropdownMenuSubContent,exports.DropdownMenuSubTrigger=y.DropdownMenuSubTrigger,exports.DropdownMenuTrigger=y.DropdownMenuTrigger,exports.Empty=K.Empty,exports.EmptyContent=K.EmptyContent,exports.EmptyDescription=K.EmptyDescription,exports.EmptyHeader=K.EmptyHeader,exports.EmptyMedia=K.EmptyMedia,exports.EmptyTitle=K.EmptyTitle,exports.Field=q.Field,exports.FieldContent=q.FieldContent,exports.FieldDescription=q.FieldDescription,exports.FieldError=q.FieldError,exports.FieldGroup=q.FieldGroup,exports.FieldLabel=q.FieldLabel,exports.FieldLegend=q.FieldLegend,exports.FieldSeparator=q.FieldSeparator,exports.FieldSet=q.FieldSet,exports.FieldTitle=q.FieldTitle,exports.Form=b.Form,exports.FormControl=b.FormControl,exports.FormDescription=b.FormDescription,exports.FormField=b.FormField,exports.FormItem=b.FormItem,exports.FormLabel=b.FormLabel,exports.FormMessage=b.FormMessage,exports.HoverCard=x.HoverCard,exports.HoverCardContent=x.HoverCardContent,exports.HoverCardTrigger=x.HoverCardTrigger,exports.Input=ne.Input,exports.InputGroup=h.InputGroup,exports.InputGroupAddon=h.InputGroupAddon,exports.InputGroupButton=h.InputGroupButton,exports.InputGroupInput=h.InputGroupInput,exports.InputGroupText=h.InputGroupText,exports.InputGroupTextarea=h.InputGroupTextarea,exports.InputOTP=Q.InputOTP,exports.InputOTPGroup=Q.InputOTPGroup,exports.InputOTPSeparator=Q.InputOTPSeparator,exports.InputOTPSlot=Q.InputOTPSlot,exports.Item=X.Item,exports.ItemActions=X.ItemActions,exports.ItemContent=X.ItemContent,exports.ItemDescription=X.ItemDescription,exports.ItemFooter=X.ItemFooter,exports.ItemGroup=X.ItemGroup,exports.ItemHeader=X.ItemHeader,exports.ItemMedia=X.ItemMedia,exports.ItemSeparator=X.ItemSeparator,exports.ItemTitle=X.ItemTitle,exports.Kbd=Y.Kbd,exports.KbdGroup=Y.KbdGroup,exports.Label=ie.Label,exports.Menubar=S.Menubar,exports.MenubarCheckboxItem=S.MenubarCheckboxItem,exports.MenubarContent=S.MenubarContent,exports.MenubarGroup=S.MenubarGroup,exports.MenubarItem=S.MenubarItem,exports.MenubarLabel=S.MenubarLabel,exports.MenubarMenu=S.MenubarMenu,exports.MenubarPortal=S.MenubarPortal,exports.MenubarRadioGroup=S.MenubarRadioGroup,exports.MenubarRadioItem=S.MenubarRadioItem,exports.MenubarSeparator=S.MenubarSeparator,exports.MenubarShortcut=S.MenubarShortcut,exports.MenubarSub=S.MenubarSub,exports.MenubarSubContent=S.MenubarSubContent,exports.MenubarSubTrigger=S.MenubarSubTrigger,exports.MenubarTrigger=S.MenubarTrigger,exports.NativeSelect=J.NativeSelect,exports.NativeSelectOptGroup=J.NativeSelectOptGroup,exports.NativeSelectOption=J.NativeSelectOption,exports.NavigationMenu=C.NavigationMenu,exports.NavigationMenuContent=C.NavigationMenuContent,exports.NavigationMenuIndicator=C.NavigationMenuIndicator,exports.NavigationMenuItem=C.NavigationMenuItem,exports.NavigationMenuLink=C.NavigationMenuLink,exports.NavigationMenuList=C.NavigationMenuList,exports.NavigationMenuTrigger=C.NavigationMenuTrigger,exports.NavigationMenuViewport=C.NavigationMenuViewport,exports.Pagination=w.Pagination,exports.PaginationContent=w.PaginationContent,exports.PaginationEllipsis=w.PaginationEllipsis,exports.PaginationItem=w.PaginationItem,exports.PaginationLink=w.PaginationLink,exports.PaginationNext=w.PaginationNext,exports.PaginationPrevious=w.PaginationPrevious,exports.Popover=T.Popover,exports.PopoverAnchor=T.PopoverAnchor,exports.PopoverContent=T.PopoverContent,exports.PopoverTrigger=T.PopoverTrigger,exports.Progress=ae.Progress,exports.RadioGroup=E.RadioGroup,exports.RadioGroupItem=E.RadioGroupItem,exports.ResizableHandle=D.ResizableHandle,exports.ResizablePanel=D.ResizablePanel,exports.ResizablePanelGroup=D.ResizablePanelGroup,exports.ScrollArea=O.ScrollArea,exports.ScrollBar=O.ScrollBar,exports.ScrollToTop=oe.ScrollToTop,exports.Search=k.Search,exports.SearchTrigger=k.SearchTrigger,exports.Select=A.Select,exports.SelectContent=A.SelectContent,exports.SelectGroup=A.SelectGroup,exports.SelectItem=A.SelectItem,exports.SelectLabel=A.SelectLabel,exports.SelectScrollDownButton=A.SelectScrollDownButton,exports.SelectScrollUpButton=A.SelectScrollUpButton,exports.SelectSeparator=A.SelectSeparator,exports.SelectTrigger=A.SelectTrigger,exports.SelectValue=A.SelectValue,exports.Separator=ce.Separator,exports.Sheet=j.Sheet,exports.SheetClose=j.SheetClose,exports.SheetContent=j.SheetContent,exports.SheetDescription=j.SheetDescription,exports.SheetFooter=j.SheetFooter,exports.SheetHeader=j.SheetHeader,exports.SheetTitle=j.SheetTitle,exports.SheetTrigger=j.SheetTrigger,exports.Sidebar=$.t,exports.SidebarContent=$.n,exports.SidebarFooter=$.r,exports.SidebarGroup=$.i,exports.SidebarGroupAction=$.a,exports.SidebarGroupContent=$.o,exports.SidebarGroupLabel=$.s,exports.SidebarHeader=$.c,exports.SidebarInput=$.l,exports.SidebarInset=$.u,exports.SidebarMenu=$.d,exports.SidebarMenuAction=$.f,exports.SidebarMenuBadge=$.p,exports.SidebarMenuButton=$.m,exports.SidebarMenuItem=$.h,exports.SidebarMenuSkeleton=$.g,exports.SidebarMenuSub=$._,exports.SidebarMenuSubButton=$.v,exports.SidebarMenuSubItem=$.y,exports.SidebarProvider=$.b,exports.SidebarRail=$.x,exports.SidebarSeparator=$.S,exports.SidebarTrigger=$.C,exports.Skeleton=M.Skeleton,exports.Slider=N.Slider,exports.SonnerToaster=P.Toaster,exports.Spinner=de.Spinner,exports.SupportFab=se.SupportFab,exports.Switch=F.Switch,exports.Table=I.Table,exports.TableBody=I.TableBody,exports.TableCaption=I.TableCaption,exports.TableCell=I.TableCell,exports.TableFooter=I.TableFooter,exports.TableHead=I.TableHead,exports.TableHeader=I.TableHeader,exports.TableOfContents=ue.TableOfContents,exports.TableRow=I.TableRow,exports.Tabs=L.Tabs,exports.TabsContent=L.TabsContent,exports.TabsList=L.TabsList,exports.TabsTrigger=L.TabsTrigger,exports.Text=R.Text,exports.Textarea=re.Textarea,exports.ThemeProvider=le.ThemeProvider,exports.ThemeToggle=e.t,exports.Toast=H.Toast,exports.ToastAction=H.ToastAction,exports.ToastClose=H.ToastClose,exports.ToastDescription=H.ToastDescription,exports.ToastProvider=H.ToastProvider,exports.ToastTitle=H.ToastTitle,exports.ToastViewport=H.ToastViewport,exports.Toaster=U.t,exports.Toggle=z.Toggle,exports.ToggleGroup=B.ToggleGroup,exports.ToggleGroupItem=B.ToggleGroupItem,exports.Tooltip=V.Tooltip,exports.TooltipContent=V.TooltipContent,exports.TooltipProvider=V.TooltipProvider,exports.TooltipTrigger=V.TooltipTrigger,exports.badgeVariants=o.badgeVariants,exports.buttonGroupVariants=W.buttonGroupVariants,exports.buttonVariants=r.buttonVariants,exports.cn=ee.t,exports.navigationMenuTriggerStyle=C.navigationMenuTriggerStyle,exports.palette=e.d,exports.preset=e.i,exports.radii=e.s,exports.radiiNumeric=e.c,exports.shadows=e.a,exports.spacing=e.l,exports.textVariants=R.textVariants,exports.theme=e.u,exports.toast=U.n,exports.toggleVariants=z.toggleVariants,exports.tokens=e.r,exports.typography=e.o,exports.useComboboxAnchor=Z.useComboboxAnchor,exports.useDirection=G.useDirection,exports.useFormField=b.useFormField,exports.useSidebar=$.w,exports.useTheme=e.n,exports.useToast=U.r;
|
package/dist/index.mjs
CHANGED
|
@@ -2,67 +2,67 @@
|
|
|
2
2
|
import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./theme-toggle-CgEJLId-.mjs";
|
|
3
3
|
import { t as d } from "./utils-IYJAOUsw.mjs";
|
|
4
4
|
import { Accordion as f, AccordionContent as p, AccordionItem as m, AccordionTrigger as h } from "./accordion.mjs";
|
|
5
|
-
import { Alert as g,
|
|
6
|
-
import { Button as
|
|
7
|
-
import { AlertDialog as
|
|
8
|
-
import { AspectRatio as
|
|
9
|
-
import { Avatar as
|
|
10
|
-
import { Badge as
|
|
11
|
-
import { Breadcrumb as
|
|
12
|
-
import { Calendar as
|
|
13
|
-
import { Card as
|
|
14
|
-
import { Carousel as
|
|
15
|
-
import { ChartContainer as
|
|
16
|
-
import { Checkbox as
|
|
17
|
-
import { Collapsible as
|
|
18
|
-
import { Dialog as
|
|
19
|
-
import { Input as
|
|
20
|
-
import { Textarea as
|
|
21
|
-
import { InputGroup as
|
|
22
|
-
import { Command as
|
|
23
|
-
import { ContextMenu as
|
|
24
|
-
import { Drawer as
|
|
25
|
-
import { DropdownMenu as
|
|
26
|
-
import { Label as
|
|
27
|
-
import { Form as
|
|
28
|
-
import { HoverCard as
|
|
29
|
-
import { Menubar as
|
|
30
|
-
import { NavigationMenu as
|
|
31
|
-
import { Pagination as
|
|
32
|
-
import { Popover as
|
|
33
|
-
import { Progress as
|
|
34
|
-
import { RadioGroup as
|
|
35
|
-
import { ResizableHandle as
|
|
36
|
-
import { ScrollArea as
|
|
37
|
-
import { ScrollToTop as
|
|
38
|
-
import { SupportFab as
|
|
39
|
-
import { Search as
|
|
40
|
-
import { Select as
|
|
41
|
-
import { Separator as
|
|
42
|
-
import { Sheet as
|
|
43
|
-
import { Skeleton as
|
|
44
|
-
import { Slider as
|
|
45
|
-
import { Toaster as
|
|
46
|
-
import { Switch as
|
|
47
|
-
import { Table as
|
|
48
|
-
import { Tabs as
|
|
49
|
-
import { Text as
|
|
50
|
-
import { Toggle as
|
|
51
|
-
import { ToggleGroup as
|
|
52
|
-
import { Tooltip as
|
|
53
|
-
import { Toast as
|
|
54
|
-
import { ThemeProvider as
|
|
55
|
-
import { n as
|
|
56
|
-
import { TableOfContents as
|
|
57
|
-
import { ButtonGroup as
|
|
58
|
-
import { DirectionProvider as
|
|
59
|
-
import { Empty as
|
|
60
|
-
import { Spinner as
|
|
61
|
-
import { Field as
|
|
62
|
-
import { NativeSelect as
|
|
63
|
-
import { Kbd as
|
|
64
|
-
import { Item as
|
|
65
|
-
import { Combobox as
|
|
66
|
-
import { InputOTP as
|
|
67
|
-
import { C as
|
|
68
|
-
export { f as Accordion, p as AccordionContent, m as AccordionItem, h as AccordionTrigger, g as Alert, _ as AlertDescription,
|
|
5
|
+
import { Alert as g, AlertAction as _, AlertDescription as v, AlertTitle as y } from "./alert.mjs";
|
|
6
|
+
import { Button as b, buttonVariants as x } from "./button.mjs";
|
|
7
|
+
import { AlertDialog as S, AlertDialogAction as C, AlertDialogCancel as w, AlertDialogContent as T, AlertDialogDescription as E, AlertDialogFooter as D, AlertDialogHeader as O, AlertDialogOverlay as k, AlertDialogPortal as A, AlertDialogTitle as j, AlertDialogTrigger as M } from "./alert-dialog.mjs";
|
|
8
|
+
import { AspectRatio as N } from "./aspect-ratio.mjs";
|
|
9
|
+
import { Avatar as P, AvatarFallback as F, AvatarImage as I } from "./avatar.mjs";
|
|
10
|
+
import { Badge as L, badgeVariants as R } from "./badge.mjs";
|
|
11
|
+
import { Breadcrumb as z, BreadcrumbEllipsis as B, BreadcrumbItem as V, BreadcrumbLink as H, BreadcrumbList as U, BreadcrumbPage as W, BreadcrumbSeparator as G } from "./breadcrumb.mjs";
|
|
12
|
+
import { Calendar as K, CalendarDayButton as q } from "./calendar.mjs";
|
|
13
|
+
import { Card as J, CardContent as Y, CardDescription as X, CardFooter as Z, CardHeader as Q, CardTitle as $ } from "./card.mjs";
|
|
14
|
+
import { Carousel as ee, CarouselContent as te, CarouselItem as ne, CarouselNext as re, CarouselPrevious as ie } from "./carousel.mjs";
|
|
15
|
+
import { ChartContainer as ae, ChartLegend as oe, ChartLegendContent as se, ChartStyle as ce, ChartTooltip as le, ChartTooltipContent as ue } from "./chart.mjs";
|
|
16
|
+
import { Checkbox as de } from "./checkbox.mjs";
|
|
17
|
+
import { Collapsible as fe, CollapsibleContent as pe, CollapsibleTrigger as me } from "./collapsible.mjs";
|
|
18
|
+
import { Dialog as he, DialogClose as ge, DialogContent as _e, DialogDescription as ve, DialogFooter as ye, DialogHeader as be, DialogOverlay as xe, DialogPortal as Se, DialogTitle as Ce, DialogTrigger as we } from "./dialog.mjs";
|
|
19
|
+
import { Input as Te } from "./input.mjs";
|
|
20
|
+
import { Textarea as Ee } from "./textarea.mjs";
|
|
21
|
+
import { InputGroup as De, InputGroupAddon as Oe, InputGroupButton as ke, InputGroupInput as Ae, InputGroupText as je, InputGroupTextarea as Me } from "./input-group.mjs";
|
|
22
|
+
import { Command as Ne, CommandDialog as Pe, CommandEmpty as Fe, CommandGroup as Ie, CommandInput as Le, CommandItem as Re, CommandList as ze, CommandSeparator as Be, CommandShortcut as Ve } from "./command.mjs";
|
|
23
|
+
import { ContextMenu as He, ContextMenuCheckboxItem as Ue, ContextMenuContent as We, ContextMenuGroup as Ge, ContextMenuItem as Ke, ContextMenuLabel as qe, ContextMenuPortal as Je, ContextMenuRadioGroup as Ye, ContextMenuRadioItem as Xe, ContextMenuSeparator as Ze, ContextMenuShortcut as Qe, ContextMenuSub as $e, ContextMenuSubContent as et, ContextMenuSubTrigger as tt, ContextMenuTrigger as nt } from "./context-menu.mjs";
|
|
24
|
+
import { Drawer as rt, DrawerClose as it, DrawerContent as at, DrawerDescription as ot, DrawerFooter as st, DrawerHeader as ct, DrawerOverlay as lt, DrawerPortal as ut, DrawerTitle as dt, DrawerTrigger as ft } from "./drawer.mjs";
|
|
25
|
+
import { DropdownMenu as pt, DropdownMenuCheckboxItem as mt, DropdownMenuContent as ht, DropdownMenuGroup as gt, DropdownMenuItem as _t, DropdownMenuLabel as vt, DropdownMenuPortal as yt, DropdownMenuRadioGroup as bt, DropdownMenuRadioItem as xt, DropdownMenuSeparator as St, DropdownMenuShortcut as Ct, DropdownMenuSub as wt, DropdownMenuSubContent as Tt, DropdownMenuSubTrigger as Et, DropdownMenuTrigger as Dt } from "./dropdown-menu.mjs";
|
|
26
|
+
import { Label as Ot } from "./label.mjs";
|
|
27
|
+
import { Form as kt, FormControl as At, FormDescription as jt, FormField as Mt, FormItem as Nt, FormLabel as Pt, FormMessage as Ft, useFormField as It } from "./form.mjs";
|
|
28
|
+
import { HoverCard as Lt, HoverCardContent as Rt, HoverCardTrigger as zt } from "./hover-card.mjs";
|
|
29
|
+
import { Menubar as Bt, MenubarCheckboxItem as Vt, MenubarContent as Ht, MenubarGroup as Ut, MenubarItem as Wt, MenubarLabel as Gt, MenubarMenu as Kt, MenubarPortal as qt, MenubarRadioGroup as Jt, MenubarRadioItem as Yt, MenubarSeparator as Xt, MenubarShortcut as Zt, MenubarSub as Qt, MenubarSubContent as $t, MenubarSubTrigger as en, MenubarTrigger as tn } from "./menubar.mjs";
|
|
30
|
+
import { NavigationMenu as nn, NavigationMenuContent as rn, NavigationMenuIndicator as an, NavigationMenuItem as on, NavigationMenuLink as sn, NavigationMenuList as cn, NavigationMenuTrigger as ln, NavigationMenuViewport as un, navigationMenuTriggerStyle as dn } from "./navigation-menu.mjs";
|
|
31
|
+
import { Pagination as fn, PaginationContent as pn, PaginationEllipsis as mn, PaginationItem as hn, PaginationLink as gn, PaginationNext as _n, PaginationPrevious as vn } from "./pagination.mjs";
|
|
32
|
+
import { Popover as yn, PopoverAnchor as bn, PopoverContent as xn, PopoverTrigger as Sn } from "./popover.mjs";
|
|
33
|
+
import { Progress as Cn } from "./progress.mjs";
|
|
34
|
+
import { RadioGroup as wn, RadioGroupItem as Tn } from "./radio-group.mjs";
|
|
35
|
+
import { ResizableHandle as En, ResizablePanel as Dn, ResizablePanelGroup as On } from "./resizable.mjs";
|
|
36
|
+
import { ScrollArea as kn, ScrollBar as An } from "./scroll-area.mjs";
|
|
37
|
+
import { ScrollToTop as jn } from "./scroll-to-top.mjs";
|
|
38
|
+
import { SupportFab as Mn } from "./support-fab.mjs";
|
|
39
|
+
import { Search as Nn, SearchTrigger as Pn } from "./search.mjs";
|
|
40
|
+
import { Select as Fn, SelectContent as In, SelectGroup as Ln, SelectItem as Rn, SelectLabel as zn, SelectScrollDownButton as Bn, SelectScrollUpButton as Vn, SelectSeparator as Hn, SelectTrigger as Un, SelectValue as Wn } from "./select.mjs";
|
|
41
|
+
import { Separator as Gn } from "./separator.mjs";
|
|
42
|
+
import { Sheet as Kn, SheetClose as qn, SheetContent as Jn, SheetDescription as Yn, SheetFooter as Xn, SheetHeader as Zn, SheetTitle as Qn, SheetTrigger as $n } from "./sheet.mjs";
|
|
43
|
+
import { Skeleton as er } from "./skeleton.mjs";
|
|
44
|
+
import { Slider as tr } from "./slider.mjs";
|
|
45
|
+
import { Toaster as nr } from "./sonner.mjs";
|
|
46
|
+
import { Switch as rr } from "./switch.mjs";
|
|
47
|
+
import { Table as ir, TableBody as ar, TableCaption as or, TableCell as sr, TableFooter as cr, TableHead as lr, TableHeader as ur, TableRow as dr } from "./table.mjs";
|
|
48
|
+
import { Tabs as fr, TabsContent as pr, TabsList as mr, TabsTrigger as hr } from "./tabs.mjs";
|
|
49
|
+
import { Text as gr, textVariants as _r } from "./text.mjs";
|
|
50
|
+
import { Toggle as vr, toggleVariants as yr } from "./toggle.mjs";
|
|
51
|
+
import { ToggleGroup as br, ToggleGroupItem as xr } from "./toggle-group.mjs";
|
|
52
|
+
import { Tooltip as Sr, TooltipContent as Cr, TooltipProvider as wr, TooltipTrigger as Tr } from "./tooltip.mjs";
|
|
53
|
+
import { Toast as Er, ToastAction as Dr, ToastClose as Or, ToastDescription as kr, ToastProvider as Ar, ToastTitle as jr, ToastViewport as Mr } from "./toast.mjs";
|
|
54
|
+
import { ThemeProvider as Nr } from "./theme-provider.mjs";
|
|
55
|
+
import { n as Pr, r as Fr, t as Ir } from "./toaster-DH0UX0nD.mjs";
|
|
56
|
+
import { TableOfContents as Lr } from "./table-of-contents.mjs";
|
|
57
|
+
import { ButtonGroup as Rr, ButtonGroupSeparator as zr, ButtonGroupText as Br, buttonGroupVariants as Vr } from "./button-group.mjs";
|
|
58
|
+
import { DirectionProvider as Hr, useDirection as Ur } from "./direction.mjs";
|
|
59
|
+
import { Empty as Wr, EmptyContent as Gr, EmptyDescription as Kr, EmptyHeader as qr, EmptyMedia as Jr, EmptyTitle as Yr } from "./empty.mjs";
|
|
60
|
+
import { Spinner as Xr } from "./spinner.mjs";
|
|
61
|
+
import { Field as Zr, FieldContent as Qr, FieldDescription as $r, FieldError as ei, FieldGroup as ti, FieldLabel as ni, FieldLegend as ri, FieldSeparator as ii, FieldSet as ai, FieldTitle as oi } from "./field.mjs";
|
|
62
|
+
import { NativeSelect as si, NativeSelectOptGroup as ci, NativeSelectOption as li } from "./native-select.mjs";
|
|
63
|
+
import { Kbd as ui, KbdGroup as di } from "./kbd.mjs";
|
|
64
|
+
import { Item as fi, ItemActions as pi, ItemContent as mi, ItemDescription as hi, ItemFooter as gi, ItemGroup as _i, ItemHeader as vi, ItemMedia as yi, ItemSeparator as bi, ItemTitle as xi } from "./item.mjs";
|
|
65
|
+
import { Combobox as Si, ComboboxChip as Ci, ComboboxChips as wi, ComboboxChipsInput as Ti, ComboboxCollection as Ei, ComboboxContent as Di, ComboboxEmpty as Oi, ComboboxGroup as ki, ComboboxInput as Ai, ComboboxItem as ji, ComboboxLabel as Mi, ComboboxList as Ni, ComboboxSeparator as Pi, ComboboxTrigger as Fi, ComboboxValue as Ii, useComboboxAnchor as Li } from "./combobox.mjs";
|
|
66
|
+
import { InputOTP as Ri, InputOTPGroup as zi, InputOTPSeparator as Bi, InputOTPSlot as Vi } from "./input-otp.mjs";
|
|
67
|
+
import { C as Hi, S as Ui, _ as Wi, a as Gi, b as Ki, c as qi, d as Ji, f as Yi, g as Xi, h as Zi, i as Qi, l as $i, m as ea, n as ta, o as na, p as ra, r as ia, s as aa, t as oa, u as sa, v as ca, w as la, x as ua, y as da } from "./sidebar-BnEmNYS2.mjs";
|
|
68
|
+
export { f as Accordion, p as AccordionContent, m as AccordionItem, h as AccordionTrigger, g as Alert, _ as AlertAction, v as AlertDescription, S as AlertDialog, C as AlertDialogAction, w as AlertDialogCancel, T as AlertDialogContent, E as AlertDialogDescription, D as AlertDialogFooter, O as AlertDialogHeader, k as AlertDialogOverlay, A as AlertDialogPortal, j as AlertDialogTitle, M as AlertDialogTrigger, y as AlertTitle, N as AspectRatio, P as Avatar, F as AvatarFallback, I as AvatarImage, L as Badge, z as Breadcrumb, B as BreadcrumbEllipsis, V as BreadcrumbItem, H as BreadcrumbLink, U as BreadcrumbList, W as BreadcrumbPage, G as BreadcrumbSeparator, b as Button, Rr as ButtonGroup, zr as ButtonGroupSeparator, Br as ButtonGroupText, K as Calendar, q as CalendarDayButton, J as Card, Y as CardContent, X as CardDescription, Z as CardFooter, Q as CardHeader, $ as CardTitle, ee as Carousel, te as CarouselContent, ne as CarouselItem, re as CarouselNext, ie as CarouselPrevious, ae as ChartContainer, oe as ChartLegend, se as ChartLegendContent, ce as ChartStyle, le as ChartTooltip, ue as ChartTooltipContent, de as Checkbox, fe as Collapsible, pe as CollapsibleContent, me as CollapsibleTrigger, Si as Combobox, Ci as ComboboxChip, wi as ComboboxChips, Ti as ComboboxChipsInput, Ei as ComboboxCollection, Di as ComboboxContent, Oi as ComboboxEmpty, ki as ComboboxGroup, Ai as ComboboxInput, ji as ComboboxItem, Mi as ComboboxLabel, Ni as ComboboxList, Pi as ComboboxSeparator, Fi as ComboboxTrigger, Ii as ComboboxValue, Ne as Command, Pe as CommandDialog, Fe as CommandEmpty, Ie as CommandGroup, Le as CommandInput, Re as CommandItem, ze as CommandList, Be as CommandSeparator, Ve as CommandShortcut, He as ContextMenu, Ue as ContextMenuCheckboxItem, We as ContextMenuContent, Ge as ContextMenuGroup, Ke as ContextMenuItem, qe as ContextMenuLabel, Je as ContextMenuPortal, Ye as ContextMenuRadioGroup, Xe as ContextMenuRadioItem, Ze as ContextMenuSeparator, Qe as ContextMenuShortcut, $e as ContextMenuSub, et as ContextMenuSubContent, tt as ContextMenuSubTrigger, nt as ContextMenuTrigger, he as Dialog, ge as DialogClose, _e as DialogContent, ve as DialogDescription, ye as DialogFooter, be as DialogHeader, xe as DialogOverlay, Se as DialogPortal, Ce as DialogTitle, we as DialogTrigger, Hr as DirectionProvider, rt as Drawer, it as DrawerClose, at as DrawerContent, ot as DrawerDescription, st as DrawerFooter, ct as DrawerHeader, lt as DrawerOverlay, ut as DrawerPortal, dt as DrawerTitle, ft as DrawerTrigger, pt as DropdownMenu, mt as DropdownMenuCheckboxItem, ht as DropdownMenuContent, gt as DropdownMenuGroup, _t as DropdownMenuItem, vt as DropdownMenuLabel, yt as DropdownMenuPortal, bt as DropdownMenuRadioGroup, xt as DropdownMenuRadioItem, St as DropdownMenuSeparator, Ct as DropdownMenuShortcut, wt as DropdownMenuSub, Tt as DropdownMenuSubContent, Et as DropdownMenuSubTrigger, Dt as DropdownMenuTrigger, Wr as Empty, Gr as EmptyContent, Kr as EmptyDescription, qr as EmptyHeader, Jr as EmptyMedia, Yr as EmptyTitle, Zr as Field, Qr as FieldContent, $r as FieldDescription, ei as FieldError, ti as FieldGroup, ni as FieldLabel, ri as FieldLegend, ii as FieldSeparator, ai as FieldSet, oi as FieldTitle, kt as Form, At as FormControl, jt as FormDescription, Mt as FormField, Nt as FormItem, Pt as FormLabel, Ft as FormMessage, Lt as HoverCard, Rt as HoverCardContent, zt as HoverCardTrigger, Te as Input, De as InputGroup, Oe as InputGroupAddon, ke as InputGroupButton, Ae as InputGroupInput, je as InputGroupText, Me as InputGroupTextarea, Ri as InputOTP, zi as InputOTPGroup, Bi as InputOTPSeparator, Vi as InputOTPSlot, fi as Item, pi as ItemActions, mi as ItemContent, hi as ItemDescription, gi as ItemFooter, _i as ItemGroup, vi as ItemHeader, yi as ItemMedia, bi as ItemSeparator, xi as ItemTitle, ui as Kbd, di as KbdGroup, Ot as Label, Bt as Menubar, Vt as MenubarCheckboxItem, Ht as MenubarContent, Ut as MenubarGroup, Wt as MenubarItem, Gt as MenubarLabel, Kt as MenubarMenu, qt as MenubarPortal, Jt as MenubarRadioGroup, Yt as MenubarRadioItem, Xt as MenubarSeparator, Zt as MenubarShortcut, Qt as MenubarSub, $t as MenubarSubContent, en as MenubarSubTrigger, tn as MenubarTrigger, si as NativeSelect, ci as NativeSelectOptGroup, li as NativeSelectOption, nn as NavigationMenu, rn as NavigationMenuContent, an as NavigationMenuIndicator, on as NavigationMenuItem, sn as NavigationMenuLink, cn as NavigationMenuList, ln as NavigationMenuTrigger, un as NavigationMenuViewport, fn as Pagination, pn as PaginationContent, mn as PaginationEllipsis, hn as PaginationItem, gn as PaginationLink, _n as PaginationNext, vn as PaginationPrevious, yn as Popover, bn as PopoverAnchor, xn as PopoverContent, Sn as PopoverTrigger, Cn as Progress, wn as RadioGroup, Tn as RadioGroupItem, En as ResizableHandle, Dn as ResizablePanel, On as ResizablePanelGroup, kn as ScrollArea, An as ScrollBar, jn as ScrollToTop, Nn as Search, Pn as SearchTrigger, Fn as Select, In as SelectContent, Ln as SelectGroup, Rn as SelectItem, zn as SelectLabel, Bn as SelectScrollDownButton, Vn as SelectScrollUpButton, Hn as SelectSeparator, Un as SelectTrigger, Wn as SelectValue, Gn as Separator, Kn as Sheet, qn as SheetClose, Jn as SheetContent, Yn as SheetDescription, Xn as SheetFooter, Zn as SheetHeader, Qn as SheetTitle, $n as SheetTrigger, oa as Sidebar, ta as SidebarContent, ia as SidebarFooter, Qi as SidebarGroup, Gi as SidebarGroupAction, na as SidebarGroupContent, aa as SidebarGroupLabel, qi as SidebarHeader, $i as SidebarInput, sa as SidebarInset, Ji as SidebarMenu, Yi as SidebarMenuAction, ra as SidebarMenuBadge, ea as SidebarMenuButton, Zi as SidebarMenuItem, Xi as SidebarMenuSkeleton, Wi as SidebarMenuSub, ca as SidebarMenuSubButton, da as SidebarMenuSubItem, Ki as SidebarProvider, ua as SidebarRail, Ui as SidebarSeparator, Hi as SidebarTrigger, er as Skeleton, tr as Slider, nr as SonnerToaster, Xr as Spinner, Mn as SupportFab, rr as Switch, ir as Table, ar as TableBody, or as TableCaption, sr as TableCell, cr as TableFooter, lr as TableHead, ur as TableHeader, Lr as TableOfContents, dr as TableRow, fr as Tabs, pr as TabsContent, mr as TabsList, hr as TabsTrigger, gr as Text, Ee as Textarea, Nr as ThemeProvider, l as ThemeToggle, Er as Toast, Dr as ToastAction, Or as ToastClose, kr as ToastDescription, Ar as ToastProvider, jr as ToastTitle, Mr as ToastViewport, Ir as Toaster, vr as Toggle, br as ToggleGroup, xr as ToggleGroupItem, Sr as Tooltip, Cr as TooltipContent, wr as TooltipProvider, Tr as TooltipTrigger, R as badgeVariants, Vr as buttonGroupVariants, x as buttonVariants, d as cn, dn as navigationMenuTriggerStyle, n as palette, r as preset, c as radii, t as radiiNumeric, e as shadows, i as spacing, _r as textVariants, u as theme, Pr as toast, yr as toggleVariants, s as tokens, o as typography, Li as useComboboxAnchor, Ur as useDirection, It as useFormField, la as useSidebar, a as useTheme, Fr as useToast };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { cn } from './lib/utils';
|
|
2
2
|
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './accordion';
|
|
3
|
-
export { Alert, AlertDescription, AlertTitle } from './alert';
|
|
3
|
+
export { Alert, AlertAction, AlertDescription, AlertTitle } from './alert';
|
|
4
4
|
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, } from './alert-dialog';
|
|
5
5
|
export { AspectRatio } from './aspect-ratio';
|
|
6
6
|
export { Avatar, AvatarFallback, AvatarImage } from './avatar';
|
package/dist/support-fab.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-UfQavLF9.js"),n=require("./utils-D7tt_q-u.js"),r=require("./button.cjs"),i=require("./dialog.cjs"),a=require("./drawer.cjs");let o=require("react");o=e.r(o);var s=t.Jr(),c=`(max-width: 767px)`,l=e=>{let t=e.trim();return t.endsWith(`/`)?t.slice(0,-1):t},
|
|
1
|
+
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-UfQavLF9.js"),n=require("./utils-D7tt_q-u.js"),r=require("./button.cjs"),i=require("./dialog.cjs"),a=require("./drawer.cjs");let o=require("react");o=e.r(o);var s=t.Jr(),c=`(max-width: 767px)`,l=`https://www.buymeacoffee.com`,u=new Set([`buymeacoffee.com`,`www.buymeacoffee.com`]),d=e=>{let t=e.trim();try{let n=new URL(t),r=n.hostname.toLowerCase();return n.protocol!==`https:`||!u.has(r)?(console.warn(`Invalid supportUrl: ${e}. Falling back to default.`),l):t}catch{return console.warn(`Invalid supportUrl: ${e}. Falling back to default.`),l}},f=e=>{let t=d(e);return t.endsWith(`/`)?t.slice(0,-1):t},p=e=>e.trim().replace(/^@+/,``),m=(e,t)=>`${f(e)}/${encodeURIComponent(p(t))}`,h=(e,t)=>`${f(e)}/widget/page/${encodeURIComponent(p(t))}`,g=()=>{let[e,t]=o.useState(()=>typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(c).matches);return o.useEffect(()=>{if(typeof window>`u`||typeof window.matchMedia!=`function`)return;let e=window.matchMedia(c),n=e=>t(e.matches);return t(e.matches),e.addEventListener(`change`,n),()=>{e.removeEventListener(`change`,n)}},[]),e};function _({supportUrl:e=l,creatorId:c,title:u=`Buy me a coffee`,description:d=`Support the project directly from this panel.`,iframeTitle:f=`Buy Me a Coffee support form`,open:p,defaultOpen:_=!1,onOpenChange:v,positionClassName:y,buttonClassName:b,panelClassName:x,className:S,type:C,onClick:w,...T}){let E=g(),D=p!==void 0,[O,k]=o.useState(_),A=D?p:O,j=o.useCallback(e=>{D||k(e),v?.(e)},[D,v]),M=o.useMemo(()=>m(e,c),[c,e]),N=(0,s.jsxs)(`div`,{className:`flex max-h-[75vh] flex-col gap-3`,children:[(0,s.jsx)(`div`,{className:`overflow-hidden rounded-md border`,children:(0,s.jsx)(`iframe`,{title:f,src:o.useMemo(()=>h(e,c),[c,e]),className:`h-[560px] w-full border-0`,loading:`lazy`,referrerPolicy:`strict-origin-when-cross-origin`})}),(0,s.jsxs)(`div`,{className:`text-muted-foreground flex items-center justify-between gap-2 text-xs`,children:[(0,s.jsx)(`span`,{children:`If the embedded checkout is unavailable, open the support page directly.`}),(0,s.jsxs)(`a`,{href:M,target:`_blank`,rel:`noopener noreferrer`,className:`text-foreground inline-flex items-center gap-1 font-medium underline underline-offset-2`,children:[`Open Buy Me a Coffee`,(0,s.jsx)(t.X,{className:`h-3.5 w-3.5`})]})]})]}),P=(0,s.jsx)(`div`,{className:n.t(`fixed right-6 bottom-6 z-50`,y),children:(0,s.jsxs)(r.Button,{"aria-label":`Support this project`,type:C??`button`,className:n.t(`inline-flex h-14 w-14 items-center justify-center rounded-full border border-black/15 bg-[#ffdd00] text-black shadow-[0_16px_36px_-18px_rgba(0,0,0,0.8)] transition hover:-translate-y-0.5 hover:scale-105 hover:bg-[#ffe347] focus-visible:ring-2 focus-visible:ring-offset-2 active:translate-y-0 active:scale-95`,b,S),onClick:e=>{w?.(e),e.defaultPrevented||j(!0)},...T,children:[(0,s.jsx)(t.Q,{className:`h-6 w-6`}),(0,s.jsx)(`span`,{className:`sr-only`,children:`Support this project`})]})});return E?(0,s.jsxs)(s.Fragment,{children:[P,(0,s.jsx)(a.Drawer,{open:A,onOpenChange:j,children:(0,s.jsxs)(a.DrawerContent,{className:n.t(`mx-auto w-full max-w-xl`,x),children:[(0,s.jsxs)(a.DrawerHeader,{children:[(0,s.jsx)(a.DrawerTitle,{children:u}),(0,s.jsx)(a.DrawerDescription,{children:d})]}),(0,s.jsx)(`div`,{className:`px-4 pb-4`,children:N})]})})]}):(0,s.jsxs)(s.Fragment,{children:[P,(0,s.jsx)(i.Dialog,{open:A,onOpenChange:j,children:(0,s.jsxs)(i.DialogContent,{className:n.t(`max-w-xl p-5`,x),children:[(0,s.jsxs)(i.DialogHeader,{children:[(0,s.jsx)(i.DialogTitle,{children:u}),(0,s.jsx)(i.DialogDescription,{children:d})]}),N]})})]})}exports.SupportFab=_;
|
|
2
2
|
//# sourceMappingURL=support-fab.cjs.map
|
package/dist/support-fab.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"support-fab.cjs","names":[],"sources":["../packages/ui-web/src/support-fab.tsx"],"sourcesContent":["'use client';\n\nimport { Coffee, ExternalLink } from 'lucide-react';\nimport * as React from 'react';\nimport { Button } from './button';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog';\nimport { Drawer, DrawerContent, DrawerDescription, DrawerHeader, DrawerTitle } from './drawer';\nimport { cn } from './lib/utils';\n\nconst MOBILE_QUERY = '(max-width: 767px)';\n\nconst normalizeBaseUrl = (url: string) => {\n const trimmed = url.trim();\n return trimmed.endsWith('/') ? trimmed.slice(0, -1) : trimmed;\n};\n\nconst sanitizeCreator = (creatorId: string) => creatorId.trim().replace(/^@+/, '');\n\nconst buildPageUrl = (supportUrl: string, creatorId: string) => {\n const base = normalizeBaseUrl(supportUrl);\n const creator = encodeURIComponent(sanitizeCreator(creatorId));\n return `${base}/${creator}`;\n};\n\nconst buildEmbedUrl = (supportUrl: string, creatorId: string) => {\n const base = normalizeBaseUrl(supportUrl);\n const creator = encodeURIComponent(sanitizeCreator(creatorId));\n return `${base}/widget/page/${creator}`;\n};\n\nconst useIsMobile = () => {\n const getInitial = () => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return false;\n }\n return window.matchMedia(MOBILE_QUERY).matches;\n };\n\n const [isMobile, setIsMobile] = React.useState(getInitial);\n\n React.useEffect(() => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return;\n }\n\n const mediaQuery = window.matchMedia(MOBILE_QUERY);\n const onChange = (event: MediaQueryListEvent) => setIsMobile(event.matches);\n\n setIsMobile(mediaQuery.matches);\n mediaQuery.addEventListener('change', onChange);\n\n return () => {\n mediaQuery.removeEventListener('change', onChange);\n };\n }, []);\n\n return isMobile;\n};\n\nexport interface SupportFabProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {\n supportUrl?: string;\n creatorId: string;\n title?: string;\n description?: string;\n iframeTitle?: string;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n positionClassName?: string;\n buttonClassName?: string;\n panelClassName?: string;\n}\n\nexport function SupportFab({\n supportUrl = 'https://www.buymeacoffee.com',\n creatorId,\n title = 'Buy me a coffee',\n description = 'Support the project directly from this panel.',\n iframeTitle = 'Buy Me a Coffee support form',\n open,\n defaultOpen = false,\n onOpenChange,\n positionClassName,\n buttonClassName,\n panelClassName,\n className,\n type,\n onClick,\n ...buttonProps\n}: SupportFabProps) {\n const isMobile = useIsMobile();\n const isControlled = open !== undefined;\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\n const isOpen = isControlled ? open : internalOpen;\n\n const setOpen = React.useCallback(\n (nextOpen: boolean) => {\n if (!isControlled) {\n setInternalOpen(nextOpen);\n }\n onOpenChange?.(nextOpen);\n },\n [isControlled, onOpenChange],\n );\n\n const pageUrl = React.useMemo(() => buildPageUrl(supportUrl, creatorId), [creatorId, supportUrl]);\n const embedUrl = React.useMemo(() => buildEmbedUrl(supportUrl, creatorId), [creatorId, supportUrl]);\n\n const panelBody = (\n <div className=\"flex max-h-[75vh] flex-col gap-3\">\n <div className=\"overflow-hidden rounded-md border\">\n <iframe\n title={iframeTitle}\n src={embedUrl}\n className=\"h-[560px] w-full border-0\"\n loading=\"lazy\"\n referrerPolicy=\"strict-origin-when-cross-origin\"\n />\n </div>\n <div className=\"text-muted-foreground flex items-center justify-between gap-2 text-xs\">\n <span>If the embedded checkout is unavailable, open the support page directly.</span>\n <a\n href={pageUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-foreground inline-flex items-center gap-1 font-medium underline underline-offset-2\"\n >\n Open Buy Me a Coffee\n <ExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n </div>\n );\n\n const trigger = (\n <div className={cn('fixed right-6 bottom-6 z-50', positionClassName)}>\n <Button\n aria-label=\"Support this project\"\n type={type ?? 'button'}\n className={cn(\n 'inline-flex h-14 w-14 items-center justify-center rounded-full border border-black/15 bg-[#ffdd00] text-black shadow-[0_16px_36px_-18px_rgba(0,0,0,0.8)] transition hover:-translate-y-0.5 hover:scale-105 hover:bg-[#ffe347] focus-visible:ring-2 focus-visible:ring-offset-2 active:translate-y-0 active:scale-95',\n buttonClassName,\n className,\n )}\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) {\n setOpen(true);\n }\n }}\n {...buttonProps}\n >\n <Coffee className=\"h-6 w-6\" />\n <span className=\"sr-only\">Support this project</span>\n </Button>\n </div>\n );\n\n if (isMobile) {\n return (\n <>\n {trigger}\n <Drawer open={isOpen} onOpenChange={setOpen}>\n <DrawerContent className={cn('mx-auto w-full max-w-xl', panelClassName)}>\n <DrawerHeader>\n <DrawerTitle>{title}</DrawerTitle>\n <DrawerDescription>{description}</DrawerDescription>\n </DrawerHeader>\n <div className=\"px-4 pb-4\">{panelBody}</div>\n </DrawerContent>\n </Drawer>\n </>\n );\n }\n\n return (\n <>\n {trigger}\n <Dialog open={isOpen} onOpenChange={setOpen}>\n <DialogContent className={cn('max-w-xl p-5', panelClassName)}>\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n {panelBody}\n </DialogContent>\n </Dialog>\n </>\n );\n}\n"],"mappings":"6UASM,EAAe,qBAEf,EAAoB,GAAgB,CACxC,IAAM,EAAU,EAAI,KAAK,EACzB,OAAO,EAAQ,SAAS,GAAG,EAAI,EAAQ,MAAM,EAAG,EAAE,EAAI,CACxD,EAEM,EAAmB,GAAsB,EAAU,KAAK,EAAE,QAAQ,MAAO,EAAE,EAE3E,GAAgB,EAAoB,IAGjC,GAFM,EAAiB,CAEpB,EAAK,GADC,mBAAmB,EAAgB,CAAS,CAC1C,IAGd,GAAiB,EAAoB,IAGlC,GAFM,EAAiB,CAEpB,EAAK,eADC,mBAAmB,EAAgB,CAAS,CAC9B,IAG1B,MAAoB,CAQxB,GAAM,CAAC,EAAU,GAAe,EAAM,aANhC,OAAO,OAAW,KAAe,OAAO,OAAO,YAAe,WACzD,GAEF,OAAO,WAAW,CAAY,EAAE,OAGgB,EAkBzD,OAhBA,EAAM,cAAgB,CACpB,GAAI,OAAO,OAAW,KAAe,OAAO,OAAO,YAAe,WAChE,OAGF,IAAM,EAAa,OAAO,WAAW,CAAY,EAC3C,EAAY,GAA+B,EAAY,EAAM,OAAO,EAK1E,OAHA,EAAY,EAAW,OAAO,EAC9B,EAAW,iBAAiB,SAAU,CAAQ,MAEjC,CACX,EAAW,oBAAoB,SAAU,CAAQ,CACnD,CACF,EAAG,CAAC,CAAC,EAEE,CACT,EAgBA,SAAgB,EAAW,CACzB,aAAa,+BACb,YACA,QAAQ,kBACR,cAAc,gDAC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,UAAU,SAAW,CAAA,GAC7B,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,mBAAU,sBAA0B,CAAA,CAC9C,GACL,CAAA,EAoBP,OAjBI,GAEA,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,CACG,GACD,EAAA,EAAA,KAAC,EAAA,OAAD,CAAQ,KAAM,EAAQ,aAAc,YAClC,EAAA,EAAA,MAAC,EAAA,cAAD,CAAe,UAAW,EAAA,EAAG,0BAA2B,CAAc,WAAtE,EACE,EAAA,EAAA,MAAC,EAAA,aAAD,CAAA,SAAA,EACE,EAAA,EAAA,KAAC,EAAA,YAAD,CAAA,SAAc,CAAmB,CAAA,GACjC,EAAA,EAAA,KAAC,EAAA,kBAAD,CAAA,SAAoB,CAA+B,CAAA,CACvC,CAAA,CAAA,GACd,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,qBAAa,CAAe,CAAA,CAC9B,GACT,CAAA,CACR,CAAA,CAAA,GAKJ,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,CACG,GACD,EAAA,EAAA,KAAC,EAAA,OAAD,CAAQ,KAAM,EAAQ,aAAc,YAClC,EAAA,EAAA,MAAC,EAAA,cAAD,CAAe,UAAW,EAAA,EAAG,eAAgB,CAAc,WAA3D,EACE,EAAA,EAAA,MAAC,EAAA,aAAD,CAAA,SAAA,EACE,EAAA,EAAA,KAAC,EAAA,YAAD,CAAA,SAAc,CAAmB,CAAA,GACjC,EAAA,EAAA,KAAC,EAAA,kBAAD,CAAA,SAAoB,CAA+B,CAAA,CACvC,CAAA,CAAA,EACb,CACY,GACT,CAAA,CACR,CAAA,CAAA,CAEN"}
|
|
1
|
+
{"version":3,"file":"support-fab.cjs","names":[],"sources":["../packages/ui-web/src/support-fab.tsx"],"sourcesContent":["'use client';\n\nimport { Coffee, ExternalLink } from 'lucide-react';\nimport * as React from 'react';\nimport { Button } from './button';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog';\nimport { Drawer, DrawerContent, DrawerDescription, DrawerHeader, DrawerTitle } from './drawer';\nimport { cn } from './lib/utils';\n\nconst MOBILE_QUERY = '(max-width: 767px)';\nconst DEFAULT_SUPPORT_URL = 'https://www.buymeacoffee.com';\nconst ALLOWED_SUPPORT_DOMAINS = new Set(['buymeacoffee.com', 'www.buymeacoffee.com']);\n\nconst validateSupportUrl = (url: string) => {\n const trimmed = url.trim();\n\n try {\n const parsed = new URL(trimmed);\n const hostname = parsed.hostname.toLowerCase();\n\n if (parsed.protocol !== 'https:' || !ALLOWED_SUPPORT_DOMAINS.has(hostname)) {\n console.warn(`Invalid supportUrl: ${url}. Falling back to default.`);\n return DEFAULT_SUPPORT_URL;\n }\n\n return trimmed;\n } catch {\n console.warn(`Invalid supportUrl: ${url}. Falling back to default.`);\n return DEFAULT_SUPPORT_URL;\n }\n};\n\nconst normalizeBaseUrl = (url: string) => {\n const validated = validateSupportUrl(url);\n return validated.endsWith('/') ? validated.slice(0, -1) : validated;\n};\n\nconst sanitizeCreator = (creatorId: string) => creatorId.trim().replace(/^@+/, '');\n\nconst buildPageUrl = (supportUrl: string, creatorId: string) => {\n const base = normalizeBaseUrl(supportUrl);\n const creator = encodeURIComponent(sanitizeCreator(creatorId));\n return `${base}/${creator}`;\n};\n\nconst buildEmbedUrl = (supportUrl: string, creatorId: string) => {\n const base = normalizeBaseUrl(supportUrl);\n const creator = encodeURIComponent(sanitizeCreator(creatorId));\n return `${base}/widget/page/${creator}`;\n};\n\nconst useIsMobile = () => {\n const getInitial = () => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return false;\n }\n return window.matchMedia(MOBILE_QUERY).matches;\n };\n\n const [isMobile, setIsMobile] = React.useState(getInitial);\n\n React.useEffect(() => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return;\n }\n\n const mediaQuery = window.matchMedia(MOBILE_QUERY);\n const onChange = (event: MediaQueryListEvent) => setIsMobile(event.matches);\n\n setIsMobile(mediaQuery.matches);\n mediaQuery.addEventListener('change', onChange);\n\n return () => {\n mediaQuery.removeEventListener('change', onChange);\n };\n }, []);\n\n return isMobile;\n};\n\nexport interface SupportFabProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {\n supportUrl?: string;\n creatorId: string;\n title?: string;\n description?: string;\n iframeTitle?: string;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n positionClassName?: string;\n buttonClassName?: string;\n panelClassName?: string;\n}\n\nexport function SupportFab({\n supportUrl = DEFAULT_SUPPORT_URL,\n creatorId,\n title = 'Buy me a coffee',\n description = 'Support the project directly from this panel.',\n iframeTitle = 'Buy Me a Coffee support form',\n open,\n defaultOpen = false,\n onOpenChange,\n positionClassName,\n buttonClassName,\n panelClassName,\n className,\n type,\n onClick,\n ...buttonProps\n}: SupportFabProps) {\n const isMobile = useIsMobile();\n const isControlled = open !== undefined;\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\n const isOpen = isControlled ? open : internalOpen;\n\n const setOpen = React.useCallback(\n (nextOpen: boolean) => {\n if (!isControlled) {\n setInternalOpen(nextOpen);\n }\n onOpenChange?.(nextOpen);\n },\n [isControlled, onOpenChange],\n );\n\n const pageUrl = React.useMemo(() => buildPageUrl(supportUrl, creatorId), [creatorId, supportUrl]);\n const embedUrl = React.useMemo(() => buildEmbedUrl(supportUrl, creatorId), [creatorId, supportUrl]);\n\n const panelBody = (\n <div className=\"flex max-h-[75vh] flex-col gap-3\">\n <div className=\"overflow-hidden rounded-md border\">\n <iframe\n title={iframeTitle}\n src={embedUrl}\n className=\"h-[560px] w-full border-0\"\n loading=\"lazy\"\n referrerPolicy=\"strict-origin-when-cross-origin\"\n />\n </div>\n <div className=\"text-muted-foreground flex items-center justify-between gap-2 text-xs\">\n <span>If the embedded checkout is unavailable, open the support page directly.</span>\n <a\n href={pageUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-foreground inline-flex items-center gap-1 font-medium underline underline-offset-2\"\n >\n Open Buy Me a Coffee\n <ExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n </div>\n );\n\n const trigger = (\n <div className={cn('fixed right-6 bottom-6 z-50', positionClassName)}>\n <Button\n aria-label=\"Support this project\"\n type={type ?? 'button'}\n className={cn(\n 'inline-flex h-14 w-14 items-center justify-center rounded-full border border-black/15 bg-[#ffdd00] text-black shadow-[0_16px_36px_-18px_rgba(0,0,0,0.8)] transition hover:-translate-y-0.5 hover:scale-105 hover:bg-[#ffe347] focus-visible:ring-2 focus-visible:ring-offset-2 active:translate-y-0 active:scale-95',\n buttonClassName,\n className,\n )}\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) {\n setOpen(true);\n }\n }}\n {...buttonProps}\n >\n <Coffee className=\"h-6 w-6\" />\n <span className=\"sr-only\">Support this project</span>\n </Button>\n </div>\n );\n\n if (isMobile) {\n return (\n <>\n {trigger}\n <Drawer open={isOpen} onOpenChange={setOpen}>\n <DrawerContent className={cn('mx-auto w-full max-w-xl', panelClassName)}>\n <DrawerHeader>\n <DrawerTitle>{title}</DrawerTitle>\n <DrawerDescription>{description}</DrawerDescription>\n </DrawerHeader>\n <div className=\"px-4 pb-4\">{panelBody}</div>\n </DrawerContent>\n </Drawer>\n </>\n );\n }\n\n return (\n <>\n {trigger}\n <Dialog open={isOpen} onOpenChange={setOpen}>\n <DialogContent className={cn('max-w-xl p-5', panelClassName)}>\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n {panelBody}\n </DialogContent>\n </Dialog>\n </>\n );\n}\n"],"mappings":"6UASM,EAAe,qBACf,EAAsB,+BACtB,EAA0B,IAAI,IAAI,CAAC,mBAAoB,sBAAsB,CAAC,EAE9E,EAAsB,GAAgB,CAC1C,IAAM,EAAU,EAAI,KAAK,EAEzB,GAAI,CACF,IAAM,EAAS,IAAI,IAAI,CAAO,EACxB,EAAW,EAAO,SAAS,Y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,EAAA,EAAA,KAAC,EAAA,OAAD,CAAQ,KAAM,EAAQ,aAAc,YAClC,EAAA,EAAA,MAAC,EAAA,cAAD,CAAe,UAAW,EAAA,EAAG,0BAA2B,CAAc,WAAtE,EACE,EAAA,EAAA,MAAC,EAAA,aAAD,CAAA,SAAA,EACE,EAAA,EAAA,KAAC,EAAA,YAAD,CAAA,SAAc,CAAmB,CAAA,GACjC,EAAA,EAAA,KAAC,EAAA,kBAAD,CAAA,SAAoB,CAA+B,CAAA,CACvC,CAAA,CAAA,GACd,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,qBAAa,CAAe,CAAA,CAC9B,GACT,CAAA,CACR,CAAA,CAAA,GAKJ,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,CACG,GACD,EAAA,EAAA,KAAC,EAAA,OAAD,CAAQ,KAAM,EAAQ,aAAc,YAClC,EAAA,EAAA,MAAC,EAAA,cAAD,CAAe,UAAW,EAAA,EAAG,eAAgB,CAAc,WAA3D,EACE,EAAA,EAAA,MAAC,EAAA,aAAD,CAAA,SAAA,EACE,EAAA,EAAA,KAAC,EAAA,YAAD,CAAA,SAAc,CAAmB,CAAA,GACjC,EAAA,EAAA,KAAC,EAAA,kBAAD,CAAA,SAAoB,CAA+B,CAAA,CACvC,CAAA,CAAA,EACb,CACY,GACT,CAAA,CACR,CAAA,CAAA,CAEN"}
|
package/dist/support-fab.mjs
CHANGED
|
@@ -7,10 +7,18 @@ import { Dialog as a, DialogContent as o, DialogDescription as s, DialogHeader a
|
|
|
7
7
|
import { Drawer as u, DrawerContent as d, DrawerDescription as f, DrawerHeader as p, DrawerTitle as m } from "./drawer.mjs";
|
|
8
8
|
import * as h from "react";
|
|
9
9
|
//#region packages/ui-web/src/support-fab.tsx
|
|
10
|
-
var g = e(), _ = "(max-width: 767px)", v = (e) => {
|
|
10
|
+
var g = e(), _ = "(max-width: 767px)", v = "https://www.buymeacoffee.com", y = new Set(["buymeacoffee.com", "www.buymeacoffee.com"]), b = (e) => {
|
|
11
11
|
let t = e.trim();
|
|
12
|
+
try {
|
|
13
|
+
let n = new URL(t), r = n.hostname.toLowerCase();
|
|
14
|
+
return n.protocol !== "https:" || !y.has(r) ? (console.warn(`Invalid supportUrl: ${e}. Falling back to default.`), v) : t;
|
|
15
|
+
} catch {
|
|
16
|
+
return console.warn(`Invalid supportUrl: ${e}. Falling back to default.`), v;
|
|
17
|
+
}
|
|
18
|
+
}, x = (e) => {
|
|
19
|
+
let t = b(e);
|
|
12
20
|
return t.endsWith("/") ? t.slice(0, -1) : t;
|
|
13
|
-
},
|
|
21
|
+
}, S = (e) => e.trim().replace(/^@+/, ""), C = (e, t) => `${x(e)}/${encodeURIComponent(S(t))}`, w = (e, t) => `${x(e)}/widget/page/${encodeURIComponent(S(t))}`, T = () => {
|
|
14
22
|
let [e, t] = h.useState(() => typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(_).matches);
|
|
15
23
|
return h.useEffect(() => {
|
|
16
24
|
if (typeof window > "u" || typeof window.matchMedia != "function") return;
|
|
@@ -20,16 +28,16 @@ var g = e(), _ = "(max-width: 767px)", v = (e) => {
|
|
|
20
28
|
};
|
|
21
29
|
}, []), e;
|
|
22
30
|
};
|
|
23
|
-
function
|
|
24
|
-
let
|
|
25
|
-
|
|
26
|
-
}, [
|
|
31
|
+
function E({ supportUrl: e = v, creatorId: _, title: y = "Buy me a coffee", description: b = "Support the project directly from this panel.", iframeTitle: x = "Buy Me a Coffee support form", open: S, defaultOpen: E = !1, onOpenChange: D, positionClassName: O, buttonClassName: k, panelClassName: A, className: j, type: M, onClick: N, ...P }) {
|
|
32
|
+
let F = T(), I = S !== void 0, [L, R] = h.useState(E), z = I ? S : L, B = h.useCallback((e) => {
|
|
33
|
+
I || R(e), D?.(e);
|
|
34
|
+
}, [I, D]), V = h.useMemo(() => C(e, _), [_, e]), H = /* @__PURE__ */ (0, g.jsxs)("div", {
|
|
27
35
|
className: "flex max-h-[75vh] flex-col gap-3",
|
|
28
36
|
children: [/* @__PURE__ */ (0, g.jsx)("div", {
|
|
29
37
|
className: "overflow-hidden rounded-md border",
|
|
30
38
|
children: /* @__PURE__ */ (0, g.jsx)("iframe", {
|
|
31
|
-
title:
|
|
32
|
-
src: h.useMemo(() =>
|
|
39
|
+
title: x,
|
|
40
|
+
src: h.useMemo(() => w(e, _), [_, e]),
|
|
33
41
|
className: "h-[560px] w-full border-0",
|
|
34
42
|
loading: "lazy",
|
|
35
43
|
referrerPolicy: "strict-origin-when-cross-origin"
|
|
@@ -37,49 +45,49 @@ function C({ supportUrl: e = "https://www.buymeacoffee.com", creatorId: _, title
|
|
|
37
45
|
}), /* @__PURE__ */ (0, g.jsxs)("div", {
|
|
38
46
|
className: "text-muted-foreground flex items-center justify-between gap-2 text-xs",
|
|
39
47
|
children: [/* @__PURE__ */ (0, g.jsx)("span", { children: "If the embedded checkout is unavailable, open the support page directly." }), /* @__PURE__ */ (0, g.jsxs)("a", {
|
|
40
|
-
href:
|
|
48
|
+
href: V,
|
|
41
49
|
target: "_blank",
|
|
42
50
|
rel: "noopener noreferrer",
|
|
43
51
|
className: "text-foreground inline-flex items-center gap-1 font-medium underline underline-offset-2",
|
|
44
52
|
children: ["Open Buy Me a Coffee", /* @__PURE__ */ (0, g.jsx)(n, { className: "h-3.5 w-3.5" })]
|
|
45
53
|
})]
|
|
46
54
|
})]
|
|
47
|
-
}),
|
|
48
|
-
className: r("fixed right-6 bottom-6 z-50",
|
|
55
|
+
}), U = /* @__PURE__ */ (0, g.jsx)("div", {
|
|
56
|
+
className: r("fixed right-6 bottom-6 z-50", O),
|
|
49
57
|
children: /* @__PURE__ */ (0, g.jsxs)(i, {
|
|
50
58
|
"aria-label": "Support this project",
|
|
51
|
-
type:
|
|
52
|
-
className: r("inline-flex h-14 w-14 items-center justify-center rounded-full border border-black/15 bg-[#ffdd00] text-black shadow-[0_16px_36px_-18px_rgba(0,0,0,0.8)] transition hover:-translate-y-0.5 hover:scale-105 hover:bg-[#ffe347] focus-visible:ring-2 focus-visible:ring-offset-2 active:translate-y-0 active:scale-95",
|
|
59
|
+
type: M ?? "button",
|
|
60
|
+
className: r("inline-flex h-14 w-14 items-center justify-center rounded-full border border-black/15 bg-[#ffdd00] text-black shadow-[0_16px_36px_-18px_rgba(0,0,0,0.8)] transition hover:-translate-y-0.5 hover:scale-105 hover:bg-[#ffe347] focus-visible:ring-2 focus-visible:ring-offset-2 active:translate-y-0 active:scale-95", k, j),
|
|
53
61
|
onClick: (e) => {
|
|
54
|
-
|
|
62
|
+
N?.(e), e.defaultPrevented || B(!0);
|
|
55
63
|
},
|
|
56
|
-
...
|
|
64
|
+
...P,
|
|
57
65
|
children: [/* @__PURE__ */ (0, g.jsx)(t, { className: "h-6 w-6" }), /* @__PURE__ */ (0, g.jsx)("span", {
|
|
58
66
|
className: "sr-only",
|
|
59
67
|
children: "Support this project"
|
|
60
68
|
})]
|
|
61
69
|
})
|
|
62
70
|
});
|
|
63
|
-
return
|
|
64
|
-
open:
|
|
65
|
-
onOpenChange:
|
|
71
|
+
return F ? /* @__PURE__ */ (0, g.jsxs)(g.Fragment, { children: [U, /* @__PURE__ */ (0, g.jsx)(u, {
|
|
72
|
+
open: z,
|
|
73
|
+
onOpenChange: B,
|
|
66
74
|
children: /* @__PURE__ */ (0, g.jsxs)(d, {
|
|
67
|
-
className: r("mx-auto w-full max-w-xl",
|
|
68
|
-
children: [/* @__PURE__ */ (0, g.jsxs)(p, { children: [/* @__PURE__ */ (0, g.jsx)(m, { children:
|
|
75
|
+
className: r("mx-auto w-full max-w-xl", A),
|
|
76
|
+
children: [/* @__PURE__ */ (0, g.jsxs)(p, { children: [/* @__PURE__ */ (0, g.jsx)(m, { children: y }), /* @__PURE__ */ (0, g.jsx)(f, { children: b })] }), /* @__PURE__ */ (0, g.jsx)("div", {
|
|
69
77
|
className: "px-4 pb-4",
|
|
70
|
-
children:
|
|
78
|
+
children: H
|
|
71
79
|
})]
|
|
72
80
|
})
|
|
73
|
-
})] }) : /* @__PURE__ */ (0, g.jsxs)(g.Fragment, { children: [
|
|
74
|
-
open:
|
|
75
|
-
onOpenChange:
|
|
81
|
+
})] }) : /* @__PURE__ */ (0, g.jsxs)(g.Fragment, { children: [U, /* @__PURE__ */ (0, g.jsx)(a, {
|
|
82
|
+
open: z,
|
|
83
|
+
onOpenChange: B,
|
|
76
84
|
children: /* @__PURE__ */ (0, g.jsxs)(o, {
|
|
77
|
-
className: r("max-w-xl p-5",
|
|
78
|
-
children: [/* @__PURE__ */ (0, g.jsxs)(c, { children: [/* @__PURE__ */ (0, g.jsx)(l, { children:
|
|
85
|
+
className: r("max-w-xl p-5", A),
|
|
86
|
+
children: [/* @__PURE__ */ (0, g.jsxs)(c, { children: [/* @__PURE__ */ (0, g.jsx)(l, { children: y }), /* @__PURE__ */ (0, g.jsx)(s, { children: b })] }), H]
|
|
79
87
|
})
|
|
80
88
|
})] });
|
|
81
89
|
}
|
|
82
90
|
//#endregion
|
|
83
|
-
export {
|
|
91
|
+
export { E as SupportFab };
|
|
84
92
|
|
|
85
93
|
//# sourceMappingURL=support-fab.mjs.map
|
package/dist/support-fab.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"support-fab.mjs","names":[],"sources":["../packages/ui-web/src/support-fab.tsx"],"sourcesContent":["'use client';\n\nimport { Coffee, ExternalLink } from 'lucide-react';\nimport * as React from 'react';\nimport { Button } from './button';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog';\nimport { Drawer, DrawerContent, DrawerDescription, DrawerHeader, DrawerTitle } from './drawer';\nimport { cn } from './lib/utils';\n\nconst MOBILE_QUERY = '(max-width: 767px)';\n\nconst normalizeBaseUrl = (url: string) => {\n const trimmed = url.trim();\n return trimmed.endsWith('/') ? trimmed.slice(0, -1) : trimmed;\n};\n\nconst sanitizeCreator = (creatorId: string) => creatorId.trim().replace(/^@+/, '');\n\nconst buildPageUrl = (supportUrl: string, creatorId: string) => {\n const base = normalizeBaseUrl(supportUrl);\n const creator = encodeURIComponent(sanitizeCreator(creatorId));\n return `${base}/${creator}`;\n};\n\nconst buildEmbedUrl = (supportUrl: string, creatorId: string) => {\n const base = normalizeBaseUrl(supportUrl);\n const creator = encodeURIComponent(sanitizeCreator(creatorId));\n return `${base}/widget/page/${creator}`;\n};\n\nconst useIsMobile = () => {\n const getInitial = () => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return false;\n }\n return window.matchMedia(MOBILE_QUERY).matches;\n };\n\n const [isMobile, setIsMobile] = React.useState(getInitial);\n\n React.useEffect(() => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return;\n }\n\n const mediaQuery = window.matchMedia(MOBILE_QUERY);\n const onChange = (event: MediaQueryListEvent) => setIsMobile(event.matches);\n\n setIsMobile(mediaQuery.matches);\n mediaQuery.addEventListener('change', onChange);\n\n return () => {\n mediaQuery.removeEventListener('change', onChange);\n };\n }, []);\n\n return isMobile;\n};\n\nexport interface SupportFabProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {\n supportUrl?: string;\n creatorId: string;\n title?: string;\n description?: string;\n iframeTitle?: string;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n positionClassName?: string;\n buttonClassName?: string;\n panelClassName?: string;\n}\n\nexport function SupportFab({\n supportUrl = 'https://www.buymeacoffee.com',\n creatorId,\n title = 'Buy me a coffee',\n description = 'Support the project directly from this panel.',\n iframeTitle = 'Buy Me a Coffee support form',\n open,\n defaultOpen = false,\n onOpenChange,\n positionClassName,\n buttonClassName,\n panelClassName,\n className,\n type,\n onClick,\n ...buttonProps\n}: SupportFabProps) {\n const isMobile = useIsMobile();\n const isControlled = open !== undefined;\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\n const isOpen = isControlled ? open : internalOpen;\n\n const setOpen = React.useCallback(\n (nextOpen: boolean) => {\n if (!isControlled) {\n setInternalOpen(nextOpen);\n }\n onOpenChange?.(nextOpen);\n },\n [isControlled, onOpenChange],\n );\n\n const pageUrl = React.useMemo(() => buildPageUrl(supportUrl, creatorId), [creatorId, supportUrl]);\n const embedUrl = React.useMemo(() => buildEmbedUrl(supportUrl, creatorId), [creatorId, supportUrl]);\n\n const panelBody = (\n <div className=\"flex max-h-[75vh] flex-col gap-3\">\n <div className=\"overflow-hidden rounded-md border\">\n <iframe\n title={iframeTitle}\n src={embedUrl}\n className=\"h-[560px] w-full border-0\"\n loading=\"lazy\"\n referrerPolicy=\"strict-origin-when-cross-origin\"\n />\n </div>\n <div className=\"text-muted-foreground flex items-center justify-between gap-2 text-xs\">\n <span>If the embedded checkout is unavailable, open the support page directly.</span>\n <a\n href={pageUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-foreground inline-flex items-center gap-1 font-medium underline underline-offset-2\"\n >\n Open Buy Me a Coffee\n <ExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n </div>\n );\n\n const trigger = (\n <div className={cn('fixed right-6 bottom-6 z-50', positionClassName)}>\n <Button\n aria-label=\"Support this project\"\n type={type ?? 'button'}\n className={cn(\n 'inline-flex h-14 w-14 items-center justify-center rounded-full border border-black/15 bg-[#ffdd00] text-black shadow-[0_16px_36px_-18px_rgba(0,0,0,0.8)] transition hover:-translate-y-0.5 hover:scale-105 hover:bg-[#ffe347] focus-visible:ring-2 focus-visible:ring-offset-2 active:translate-y-0 active:scale-95',\n buttonClassName,\n className,\n )}\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) {\n setOpen(true);\n }\n }}\n {...buttonProps}\n >\n <Coffee className=\"h-6 w-6\" />\n <span className=\"sr-only\">Support this project</span>\n </Button>\n </div>\n );\n\n if (isMobile) {\n return (\n <>\n {trigger}\n <Drawer open={isOpen} onOpenChange={setOpen}>\n <DrawerContent className={cn('mx-auto w-full max-w-xl', panelClassName)}>\n <DrawerHeader>\n <DrawerTitle>{title}</DrawerTitle>\n <DrawerDescription>{description}</DrawerDescription>\n </DrawerHeader>\n <div className=\"px-4 pb-4\">{panelBody}</div>\n </DrawerContent>\n </Drawer>\n </>\n );\n }\n\n return (\n <>\n {trigger}\n <Dialog open={isOpen} onOpenChange={setOpen}>\n <DialogContent className={cn('max-w-xl p-5', panelClassName)}>\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n {panelBody}\n </DialogContent>\n </Dialog>\n </>\n );\n}\n"],"mappings":";;;;;;;;;aASM,IAAe,sBAEf,KAAoB,MAAgB;CACxC,IAAM,IAAU,EAAI,KAAK;CACzB,OAAO,EAAQ,SAAS,GAAG,IAAI,EAAQ,MAAM,GAAG,EAAE,IAAI;AACxD,GAEM,KAAmB,MAAsB,EAAU,KAAK,EAAE,QAAQ,OAAO,EAAE,GAE3E,KAAgB,GAAoB,MAGjC,GAFM,EAAiB,CAEpB,EAAK,GADC,mBAAmB,EAAgB,CAAS,CAC1C,KAGd,KAAiB,GAAoB,MAGlC,GAFM,EAAiB,CAEpB,EAAK,eADC,mBAAmB,EAAgB,CAAS,CAC9B,KAG1B,UAAoB;CAQxB,IAAM,CAAC,GAAU,KAAe,EAAM,eANhC,OAAO,SAAW,OAAe,OAAO,OAAO,cAAe,aACzD,KAEF,OAAO,WAAW,CAAY,EAAE,OAGgB;CAkBzD,OAhBA,EAAM,gBAAgB;EACpB,IAAI,OAAO,SAAW,OAAe,OAAO,OAAO,cAAe,YAChE;EAGF,IAAM,IAAa,OAAO,WAAW,CAAY,GAC3C,KAAY,MAA+B,EAAY,EAAM,OAAO;EAK1E,OAHA,EAAY,EAAW,OAAO,GAC9B,EAAW,iBAAiB,UAAU,CAAQ,SAEjC;GACX,EAAW,oBAAoB,UAAU,CAAQ;EACnD;CACF,GAAG,CAAC,CAAC,GAEE;AACT;AAgBA,SAAgB,EAAW,EACzB,gBAAa,gCACb,cACA,WAAQ,mBACR,iBAAc,iDACd,iBAAc,gCACd,SACA,iBAAc,IACd,iBAC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C,GAAD,EAAQ,WAAU,UAAW,CAAA,GAC7B,iBAAA,GAAA,EAAA,KAAC,QAAD;IAAM,WAAU;cAAU;GAA0B,CAAA,CAC9C;;CACL,CAAA;CAoBP,OAjBI,IAEA,iBAAA,GAAA,EAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CACG,GACD,iBAAA,GAAA,EAAA,KAAC,GAAD;EAAQ,MAAM;EAAQ,cAAc;YAClC,iBAAA,GAAA,EAAA,MAAC,GAAD;GAAe,WAAW,EAAG,2BAA2B,CAAc;aAAtE,CACE,iBAAA,GAAA,EAAA,MAAC,GAAD,EAAA,UAAA,CACE,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAA,UAAc,EAAmB,CAAA,GACjC,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAA,UAAoB,EAA+B,CAAA,CACvC,EAAA,CAAA,GACd,iBAAA,GAAA,EAAA,KAAC,OAAD;IAAK,WAAU;cAAa;GAAe,CAAA,CAC9B;;CACT,CAAA,CACR,EAAA,CAAA,IAKJ,iBAAA,GAAA,EAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CACG,GACD,iBAAA,GAAA,EAAA,KAAC,GAAD;EAAQ,MAAM;EAAQ,cAAc;YAClC,iBAAA,GAAA,EAAA,MAAC,GAAD;GAAe,WAAW,EAAG,gBAAgB,CAAc;aAA3D,CACE,iBAAA,GAAA,EAAA,MAAC,GAAD,EAAA,UAAA,CACE,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAA,UAAc,EAAmB,CAAA,GACjC,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAA,UAAoB,EAA+B,CAAA,CACvC,EAAA,CAAA,GACb,CACY;;CACT,CAAA,CACR,EAAA,CAAA;AAEN"}
|
|
1
|
+
{"version":3,"file":"support-fab.mjs","names":[],"sources":["../packages/ui-web/src/support-fab.tsx"],"sourcesContent":["'use client';\n\nimport { Coffee, ExternalLink } from 'lucide-react';\nimport * as React from 'react';\nimport { Button } from './button';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog';\nimport { Drawer, DrawerContent, DrawerDescription, DrawerHeader, DrawerTitle } from './drawer';\nimport { cn } from './lib/utils';\n\nconst MOBILE_QUERY = '(max-width: 767px)';\nconst DEFAULT_SUPPORT_URL = 'https://www.buymeacoffee.com';\nconst ALLOWED_SUPPORT_DOMAINS = new Set(['buymeacoffee.com', 'www.buymeacoffee.com']);\n\nconst validateSupportUrl = (url: string) => {\n const trimmed = url.trim();\n\n try {\n const parsed = new URL(trimmed);\n const hostname = parsed.hostname.toLowerCase();\n\n if (parsed.protocol !== 'https:' || !ALLOWED_SUPPORT_DOMAINS.has(hostname)) {\n console.warn(`Invalid supportUrl: ${url}. Falling back to default.`);\n return DEFAULT_SUPPORT_URL;\n }\n\n return trimmed;\n } catch {\n console.warn(`Invalid supportUrl: ${url}. Falling back to default.`);\n return DEFAULT_SUPPORT_URL;\n }\n};\n\nconst normalizeBaseUrl = (url: string) => {\n const validated = validateSupportUrl(url);\n return validated.endsWith('/') ? validated.slice(0, -1) : validated;\n};\n\nconst sanitizeCreator = (creatorId: string) => creatorId.trim().replace(/^@+/, '');\n\nconst buildPageUrl = (supportUrl: string, creatorId: string) => {\n const base = normalizeBaseUrl(supportUrl);\n const creator = encodeURIComponent(sanitizeCreator(creatorId));\n return `${base}/${creator}`;\n};\n\nconst buildEmbedUrl = (supportUrl: string, creatorId: string) => {\n const base = normalizeBaseUrl(supportUrl);\n const creator = encodeURIComponent(sanitizeCreator(creatorId));\n return `${base}/widget/page/${creator}`;\n};\n\nconst useIsMobile = () => {\n const getInitial = () => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return false;\n }\n return window.matchMedia(MOBILE_QUERY).matches;\n };\n\n const [isMobile, setIsMobile] = React.useState(getInitial);\n\n React.useEffect(() => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return;\n }\n\n const mediaQuery = window.matchMedia(MOBILE_QUERY);\n const onChange = (event: MediaQueryListEvent) => setIsMobile(event.matches);\n\n setIsMobile(mediaQuery.matches);\n mediaQuery.addEventListener('change', onChange);\n\n return () => {\n mediaQuery.removeEventListener('change', onChange);\n };\n }, []);\n\n return isMobile;\n};\n\nexport interface SupportFabProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {\n supportUrl?: string;\n creatorId: string;\n title?: string;\n description?: string;\n iframeTitle?: string;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n positionClassName?: string;\n buttonClassName?: string;\n panelClassName?: string;\n}\n\nexport function SupportFab({\n supportUrl = DEFAULT_SUPPORT_URL,\n creatorId,\n title = 'Buy me a coffee',\n description = 'Support the project directly from this panel.',\n iframeTitle = 'Buy Me a Coffee support form',\n open,\n defaultOpen = false,\n onOpenChange,\n positionClassName,\n buttonClassName,\n panelClassName,\n className,\n type,\n onClick,\n ...buttonProps\n}: SupportFabProps) {\n const isMobile = useIsMobile();\n const isControlled = open !== undefined;\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\n const isOpen = isControlled ? open : internalOpen;\n\n const setOpen = React.useCallback(\n (nextOpen: boolean) => {\n if (!isControlled) {\n setInternalOpen(nextOpen);\n }\n onOpenChange?.(nextOpen);\n },\n [isControlled, onOpenChange],\n );\n\n const pageUrl = React.useMemo(() => buildPageUrl(supportUrl, creatorId), [creatorId, supportUrl]);\n const embedUrl = React.useMemo(() => buildEmbedUrl(supportUrl, creatorId), [creatorId, supportUrl]);\n\n const panelBody = (\n <div className=\"flex max-h-[75vh] flex-col gap-3\">\n <div className=\"overflow-hidden rounded-md border\">\n <iframe\n title={iframeTitle}\n src={embedUrl}\n className=\"h-[560px] w-full border-0\"\n loading=\"lazy\"\n referrerPolicy=\"strict-origin-when-cross-origin\"\n />\n </div>\n <div className=\"text-muted-foreground flex items-center justify-between gap-2 text-xs\">\n <span>If the embedded checkout is unavailable, open the support page directly.</span>\n <a\n href={pageUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-foreground inline-flex items-center gap-1 font-medium underline underline-offset-2\"\n >\n Open Buy Me a Coffee\n <ExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n </div>\n );\n\n const trigger = (\n <div className={cn('fixed right-6 bottom-6 z-50', positionClassName)}>\n <Button\n aria-label=\"Support this project\"\n type={type ?? 'button'}\n className={cn(\n 'inline-flex h-14 w-14 items-center justify-center rounded-full border border-black/15 bg-[#ffdd00] text-black shadow-[0_16px_36px_-18px_rgba(0,0,0,0.8)] transition hover:-translate-y-0.5 hover:scale-105 hover:bg-[#ffe347] focus-visible:ring-2 focus-visible:ring-offset-2 active:translate-y-0 active:scale-95',\n buttonClassName,\n className,\n )}\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) {\n setOpen(true);\n }\n }}\n {...buttonProps}\n >\n <Coffee className=\"h-6 w-6\" />\n <span className=\"sr-only\">Support this project</span>\n </Button>\n </div>\n );\n\n if (isMobile) {\n return (\n <>\n {trigger}\n <Drawer open={isOpen} onOpenChange={setOpen}>\n <DrawerContent className={cn('mx-auto w-full max-w-xl', panelClassName)}>\n <DrawerHeader>\n <DrawerTitle>{title}</DrawerTitle>\n <DrawerDescription>{description}</DrawerDescription>\n </DrawerHeader>\n <div className=\"px-4 pb-4\">{panelBody}</div>\n </DrawerContent>\n </Drawer>\n </>\n );\n }\n\n return (\n <>\n {trigger}\n <Dialog open={isOpen} onOpenChange={setOpen}>\n <DialogContent className={cn('max-w-xl p-5', panelClassName)}>\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n {panelBody}\n </DialogContent>\n </Dialog>\n </>\n );\n}\n"],"mappings":";;;;;;;;;aASM,IAAe,sBACf,IAAsB,gCACtB,IAA0B,IAAI,IAAI,CAAC,oBAAoB,sBAAsB,CAAC,GAE9E,KAAsB,MAAgB;CAC1C,IAAM,IAAU,EAAI,KAAK;CAEzB,IAAI;EACF,IAAM,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