@squadbase/vantage 0.7.1-dev1.9d223a2 → 0.7.1-dev1.bb6bd72

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.
Files changed (67) hide show
  1. package/dist/{build-U7GO26HR.js → build-AON4MAQQ.js} +3 -3
  2. package/dist/{build-U7GO26HR.js.map → build-AON4MAQQ.js.map} +1 -1
  3. package/dist/{chunk-MQUIAP66.js → chunk-5HBUBVQ3.js} +28 -7
  4. package/dist/chunk-5HBUBVQ3.js.map +1 -0
  5. package/dist/{chunk-EG4PX726.js → chunk-GWXKENNH.js} +122 -5
  6. package/dist/chunk-GWXKENNH.js.map +1 -0
  7. package/dist/{chunk-YJQCB3UP.js → chunk-I2GWIPTD.js} +219 -67
  8. package/dist/chunk-I2GWIPTD.js.map +1 -0
  9. package/dist/{chunk-SDJTTMLK.js → chunk-SR43D6EF.js} +13 -8
  10. package/dist/chunk-SR43D6EF.js.map +1 -0
  11. package/dist/{chunk-P2KIHF65.js → chunk-U6MWBCM6.js} +28 -7
  12. package/dist/chunk-U6MWBCM6.js.map +1 -0
  13. package/dist/cli.js +2 -2
  14. package/dist/components/index.d.ts +223 -6
  15. package/dist/components/index.js +4 -4
  16. package/dist/{dev-O42JFQ64.js → dev-BZ7FXDB3.js} +3 -3
  17. package/dist/{dev-O42JFQ64.js.map → dev-BZ7FXDB3.js.map} +1 -1
  18. package/dist/doc/index.js +1 -1
  19. package/dist/slide/index.js +1 -1
  20. package/dist/table/index.js +4 -4
  21. package/dist/ui/index.d.ts +35 -4
  22. package/dist/ui/index.js +174 -10
  23. package/dist/ui/index.js.map +1 -1
  24. package/dist/vite/index.js +1 -1
  25. package/package.json +2 -2
  26. package/registry/parts.json +101 -3
  27. package/registry/ui/area-chart.tsx +43 -8
  28. package/registry/ui/bar-chart.tsx +43 -8
  29. package/registry/ui/bar-list.tsx +43 -8
  30. package/registry/ui/box-plot-chart.tsx +42 -7
  31. package/registry/ui/category-bar.tsx +25 -5
  32. package/registry/ui/chart-frame.tsx +47 -14
  33. package/registry/ui/checkbox.tsx +4 -3
  34. package/registry/ui/code-block.tsx +44 -0
  35. package/registry/ui/combo-chart.tsx +20 -3
  36. package/registry/ui/combobox.tsx +7 -0
  37. package/registry/ui/context-menu.tsx +71 -0
  38. package/registry/ui/dashboard-card.tsx +20 -9
  39. package/registry/ui/data-table.tsx +7 -1
  40. package/registry/ui/date-range-picker.tsx +51 -4
  41. package/registry/ui/delta.tsx +36 -11
  42. package/registry/ui/donut-chart.tsx +43 -8
  43. package/registry/ui/echart.tsx +167 -7
  44. package/registry/ui/file-dropzone.tsx +143 -0
  45. package/registry/ui/filter-bar.tsx +74 -1
  46. package/registry/ui/forecast-chart.tsx +42 -7
  47. package/registry/ui/funnel-steps.tsx +22 -4
  48. package/registry/ui/heatmap.tsx +20 -3
  49. package/registry/ui/histogram-chart.tsx +42 -7
  50. package/registry/ui/kpi-card.tsx +12 -8
  51. package/registry/ui/legend.tsx +73 -15
  52. package/registry/ui/line-chart.tsx +43 -8
  53. package/registry/ui/page-shell.tsx +2 -0
  54. package/registry/ui/paired-chart.tsx +43 -8
  55. package/registry/ui/progress.tsx +1 -1
  56. package/registry/ui/scatter-chart.tsx +50 -12
  57. package/registry/ui/sparkline.tsx +43 -8
  58. package/registry/ui/states.tsx +34 -1
  59. package/registry/ui/status-badge.tsx +7 -7
  60. package/registry/ui/tabs.tsx +1 -0
  61. package/registry/ui/treemap.tsx +20 -3
  62. package/registry/ui/waterfall-chart.tsx +64 -11
  63. package/dist/chunk-EG4PX726.js.map +0 -1
  64. package/dist/chunk-MQUIAP66.js.map +0 -1
  65. package/dist/chunk-P2KIHF65.js.map +0 -1
  66. package/dist/chunk-SDJTTMLK.js.map +0 -1
  67. package/dist/chunk-YJQCB3UP.js.map +0 -1
@@ -33,6 +33,7 @@ import * as _base_ui_react from '@base-ui/react';
33
33
  import { Toast as Toast$1 } from '@base-ui/react/toast';
34
34
  import { Toggle as Toggle$1 } from '@base-ui/react/toggle';
35
35
  import { ToggleGroup as ToggleGroup$1 } from '@base-ui/react/toggle-group';
36
+ import { ContextMenu as ContextMenu$1 } from '@base-ui/react/context-menu';
36
37
 
37
38
  /**
38
39
  * Class merger used by every component in the kit. `clsx` resolves conditional
@@ -445,25 +446,55 @@ declare function ToggleGroupItem({ className, children, variant, size, ...props
445
446
 
446
447
  declare function useIsMobile(): boolean;
447
448
 
448
- declare function Loading({ label, className }: {
449
+ type StateVariant = "default" | "inline";
450
+ declare function Loading({ label, variant, className, }: {
449
451
  label?: string;
452
+ variant?: StateVariant;
450
453
  className?: string;
451
454
  }): React$1.JSX.Element;
452
- declare function Empty({ title, description, icon, action, className, }: {
455
+ declare function Empty({ title, description, icon, action, variant, className, }: {
453
456
  title?: string;
454
457
  description?: string;
455
458
  icon?: ReactNode;
456
459
  action?: ReactNode;
460
+ variant?: StateVariant;
457
461
  className?: string;
458
462
  }): React$1.JSX.Element;
459
- declare function ErrorState({ title, message, details, action, className, }: {
463
+ declare function ErrorState({ title, message, details, action, variant, className, }: {
460
464
  title?: string;
461
465
  /** What happened and what to do next, in plain words. */
462
466
  message?: ReactNode;
463
467
  /** Technical detail (error message, status code), folded behind "Show details" (ja: "詳細を表示"). */
464
468
  details?: ReactNode;
465
469
  action?: ReactNode;
470
+ variant?: StateVariant;
466
471
  className?: string;
467
472
  }): React$1.JSX.Element;
468
473
 
469
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, ErrorState, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Kbd, KbdGroup, Label, Loading, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, createToastManager, tabsListVariants, toast, toggleVariants, useComboboxAnchor, useIsMobile, useSidebar, useToastManager };
474
+ type CodeBlockProps = Omit<React$1.ComponentProps<"div">, "children"> & {
475
+ /** The text shown and copied. No syntax highlighting. */
476
+ code: string;
477
+ /** Plain-text label above the code (a file name or language). */
478
+ title?: string;
479
+ };
480
+ /** Monospace text with a copy button. */
481
+ declare function CodeBlock({ code, title, className, ...props }: CodeBlockProps): React$1.JSX.Element;
482
+
483
+ declare function ContextMenu({ ...props }: ContextMenu$1.Root.Props): React$1.JSX.Element;
484
+ /** The area that opens the menu on right-click (long-press on touch). */
485
+ declare function ContextMenuTrigger({ className, ...props }: ContextMenu$1.Trigger.Props): React$1.JSX.Element;
486
+ declare function ContextMenuContent({ className, ...props }: React$1.ComponentProps<typeof DropdownMenuContent>): React$1.JSX.Element;
487
+
488
+ type FileDropzoneProps = Omit<React$1.ComponentProps<"div">, "onChange"> & {
489
+ /** Comma-separated types, same syntax as `<input accept>` (e.g. ".csv,.xlsx" or "text/*"). */
490
+ accept?: string;
491
+ /** Largest allowed file size in bytes. */
492
+ maxSize?: number;
493
+ multiple?: boolean;
494
+ disabled?: boolean;
495
+ onFilesChange?: (files: File[]) => void;
496
+ };
497
+ /** Drag & drop or click to pick files. Wrong type / too large files are rejected with a message and never reach `onFilesChange`. */
498
+ declare function FileDropzone({ accept, maxSize, multiple, disabled, onFilesChange, className, ...props }: FileDropzoneProps): React$1.JSX.Element;
499
+
500
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, type CodeBlockProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, DropdownMenuCheckboxItem as ContextMenuCheckboxItem, ContextMenuContent, DropdownMenuGroup as ContextMenuGroup, DropdownMenuItem as ContextMenuItem, DropdownMenuLabel as ContextMenuLabel, DropdownMenuRadioGroup as ContextMenuRadioGroup, DropdownMenuRadioItem as ContextMenuRadioItem, DropdownMenuSeparator as ContextMenuSeparator, DropdownMenuShortcut as ContextMenuShortcut, DropdownMenuSub as ContextMenuSub, DropdownMenuSubContent as ContextMenuSubContent, DropdownMenuSubTrigger as ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, ErrorState, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FileDropzone, type FileDropzoneProps, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Kbd, KbdGroup, Label, Loading, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, type StateVariant, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, createToastManager, tabsListVariants, toast, toggleVariants, useComboboxAnchor, useIsMobile, useSidebar, useToastManager };
package/dist/ui/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { InputGroup, InputGroupInput, InputGroupAddon, InputGroupButton, Separator } from '../chunk-MQUIAP66.js';
2
- export { Badge, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, ErrorState, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Loading, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, toggleVariants, useIsMobile, useSidebar } from '../chunk-MQUIAP66.js';
1
+ import { InputGroup, InputGroupInput, InputGroupAddon, InputGroupButton, Separator, DropdownMenuContent } from '../chunk-5HBUBVQ3.js';
2
+ export { Badge, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DropdownMenuCheckboxItem as ContextMenuCheckboxItem, DropdownMenuGroup as ContextMenuGroup, DropdownMenuItem as ContextMenuItem, DropdownMenuLabel as ContextMenuLabel, DropdownMenuRadioGroup as ContextMenuRadioGroup, DropdownMenuRadioItem as ContextMenuRadioItem, DropdownMenuSeparator as ContextMenuSeparator, DropdownMenuShortcut as ContextMenuShortcut, DropdownMenuSub as ContextMenuSub, DropdownMenuSubContent as ContextMenuSubContent, DropdownMenuSubTrigger as ContextMenuSubTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, ErrorState, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Loading, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, toggleVariants, useIsMobile, useSidebar } from '../chunk-5HBUBVQ3.js';
3
3
  import { Button } from '../chunk-ROHNXP7J.js';
4
4
  export { Button, buttonVariants } from '../chunk-ROHNXP7J.js';
5
5
  import { cn } from '../chunk-U736PVHY.js';
6
6
  export { cn } from '../chunk-U736PVHY.js';
7
7
  import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
8
- import { ChevronDownIcon, ChevronUpIcon, ChevronRightIcon, MoreHorizontalIcon, CheckIcon, XIcon, ChevronLeftIcon, Loader2Icon, CircleCheckIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon } from 'lucide-react';
8
+ import { ChevronDownIcon, ChevronUpIcon, ChevronRightIcon, MoreHorizontalIcon, CheckIcon, XIcon, ChevronLeftIcon, Loader2Icon, CopyIcon, UploadIcon, CircleCheckIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon } from 'lucide-react';
9
9
  import { jsx, jsxs } from 'react/jsx-runtime';
10
- import * as React6 from 'react';
10
+ import * as React12 from 'react';
11
11
  import { useMemo } from 'react';
12
12
  import { cva } from 'class-variance-authority';
13
13
  import { AlertDialog as AlertDialog$1 } from '@base-ui/react/alert-dialog';
@@ -25,6 +25,7 @@ import { Slider as Slider$1 } from '@base-ui/react/slider';
25
25
  import { Switch as Switch$1 } from '@base-ui/react/switch';
26
26
  import { Tabs as Tabs$1 } from '@base-ui/react/tabs';
27
27
  import { Toast as Toast$1 } from '@base-ui/react/toast';
28
+ import { ContextMenu as ContextMenu$1 } from '@base-ui/react/context-menu';
28
29
 
29
30
  // @squadbase/vantage — generated build. Do not edit.
30
31
  function Accordion({ className, ...props }) {
@@ -526,6 +527,7 @@ function ComboboxTrigger({
526
527
  Combobox$1.Trigger,
527
528
  {
528
529
  "data-slot": "combobox-trigger",
530
+ "aria-label": "Toggle options",
529
531
  className: cn("[&_svg:not([class*='size-'])]:size-4", className),
530
532
  ...props,
531
533
  children: [
@@ -545,6 +547,7 @@ function ComboboxClear({ className, ...props }) {
545
547
  Combobox$1.Clear,
546
548
  {
547
549
  "data-slot": "combobox-clear",
550
+ "aria-label": "Clear",
548
551
  render: /* @__PURE__ */ jsx(InputGroupButton, { variant: "ghost", size: "icon-xs" }),
549
552
  className: cn(className),
550
553
  ...props,
@@ -759,6 +762,7 @@ function ComboboxChip({
759
762
  render: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon-xs" }),
760
763
  className: "-ml-1 opacity-50 hover:opacity-100",
761
764
  "data-slot": "combobox-chip-remove",
765
+ "aria-label": typeof children === "string" || typeof children === "number" ? `Remove ${children}` : "Remove",
762
766
  children: /* @__PURE__ */ jsx(
763
767
  XIcon,
764
768
  {
@@ -785,11 +789,11 @@ function ComboboxChipsInput({
785
789
  );
786
790
  }
787
791
  function useComboboxAnchor() {
788
- return React6.useRef(null);
792
+ return React12.useRef(null);
789
793
  }
790
- var DrawerContext = React6.createContext(null);
794
+ var DrawerContext = React12.createContext(null);
791
795
  function useDrawer() {
792
- const context = React6.useContext(DrawerContext);
796
+ const context = React12.useContext(DrawerContext);
793
797
  if (!context) {
794
798
  throw new Error("useDrawer must be used within a Drawer.");
795
799
  }
@@ -803,7 +807,7 @@ function Drawer({
803
807
  ...props
804
808
  }) {
805
809
  const hasSnapPoints = snapPoints != null && snapPoints.length > 0;
806
- const contextValue = React6.useMemo(
810
+ const contextValue = React12.useMemo(
807
811
  () => ({ hasSnapPoints, modal, showSwipeHandle, swipeDirection }),
808
812
  [hasSnapPoints, modal, showSwipeHandle, swipeDirection]
809
813
  );
@@ -1400,7 +1404,7 @@ function ProgressTrack({ className, ...props }) {
1400
1404
  Progress$1.Track,
1401
1405
  {
1402
1406
  className: cn(
1403
- "relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",
1407
+ "relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-border",
1404
1408
  className
1405
1409
  ),
1406
1410
  "data-slot": "progress-track",
@@ -1658,6 +1662,7 @@ function TabsTrigger({ className, ...props }) {
1658
1662
  "relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-[color,background-color,border-color,box-shadow] group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1659
1663
  "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
1660
1664
  "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground",
1665
+ "[&_[data-slot=badge]]:h-4 [&_[data-slot=badge]]:min-w-4 [&_[data-slot=badge]]:px-1.5 [&_[data-slot=badge]]:tabular-nums [&_[data-slot=badge][data-variant=secondary]]:bg-foreground/10 [&_[data-slot=badge][data-variant=secondary]]:text-current",
1661
1666
  "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
1662
1667
  className
1663
1668
  ),
@@ -1879,7 +1884,166 @@ function Toaster({
1879
1884
  }
1880
1885
  var createToastManager = Toast$1.createToastManager;
1881
1886
  var useToastManager = Toast$1.useToastManager;
1887
+ function CodeBlock({ code, title, className, ...props }) {
1888
+ const [copied, setCopied] = React12.useState(false);
1889
+ const copy = async () => {
1890
+ await navigator.clipboard.writeText(code);
1891
+ setCopied(true);
1892
+ setTimeout(() => setCopied(false), 1500);
1893
+ };
1894
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "code-block", className: cn("rounded-lg bg-muted", className), ...props, children: [
1895
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 border-b border-border px-3 py-1.5", children: [
1896
+ /* @__PURE__ */ jsx("span", { className: "truncate text-xs text-muted-foreground", children: title }),
1897
+ /* @__PURE__ */ jsxs(Button, { type: "button", variant: "ghost", size: "xs", onClick: copy, "aria-label": "Copy code", children: [
1898
+ copied ? /* @__PURE__ */ jsx(CheckIcon, {}) : /* @__PURE__ */ jsx(CopyIcon, {}),
1899
+ copied ? "Copied" : "Copy"
1900
+ ] })
1901
+ ] }),
1902
+ /* @__PURE__ */ jsx("pre", { className: "overflow-x-auto p-3 font-mono text-sm text-foreground", children: /* @__PURE__ */ jsx("code", { children: code }) })
1903
+ ] });
1904
+ }
1905
+ function ContextMenu({ ...props }) {
1906
+ return /* @__PURE__ */ jsx(ContextMenu$1.Root, { "data-slot": "context-menu", ...props });
1907
+ }
1908
+ function ContextMenuTrigger({ className, ...props }) {
1909
+ return /* @__PURE__ */ jsx(
1910
+ ContextMenu$1.Trigger,
1911
+ {
1912
+ "data-slot": "context-menu-trigger",
1913
+ className: cn("select-none", className),
1914
+ ...props
1915
+ }
1916
+ );
1917
+ }
1918
+ function ContextMenuContent({
1919
+ className,
1920
+ ...props
1921
+ }) {
1922
+ return /* @__PURE__ */ jsx(
1923
+ DropdownMenuContent,
1924
+ {
1925
+ "data-slot": "context-menu-content",
1926
+ align: "start",
1927
+ side: "right",
1928
+ sideOffset: 0,
1929
+ className: cn("w-auto", className),
1930
+ ...props
1931
+ }
1932
+ );
1933
+ }
1934
+ function matchesAccept(file, accept) {
1935
+ if (!accept) return true;
1936
+ const name = file.name.toLowerCase();
1937
+ return accept.split(",").some((raw) => {
1938
+ const t = raw.trim().toLowerCase();
1939
+ if (!t) return false;
1940
+ if (t.startsWith(".")) return name.endsWith(t);
1941
+ if (t.endsWith("/*")) return file.type.toLowerCase().startsWith(t.slice(0, -1));
1942
+ return file.type.toLowerCase() === t;
1943
+ });
1944
+ }
1945
+ function formatSize(bytes) {
1946
+ if (bytes < 1024) return `${bytes} B`;
1947
+ if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
1948
+ return `${(bytes / 1024 / 1024).toFixed(1)} MB`;
1949
+ }
1950
+ function FileDropzone({
1951
+ accept,
1952
+ maxSize,
1953
+ multiple = false,
1954
+ disabled = false,
1955
+ onFilesChange,
1956
+ className,
1957
+ ...props
1958
+ }) {
1959
+ const inputRef = React12.useRef(null);
1960
+ const [files, setFiles] = React12.useState([]);
1961
+ const [error, setError] = React12.useState(null);
1962
+ const [dragOver, setDragOver] = React12.useState(false);
1963
+ const commit = (next) => {
1964
+ setFiles(next);
1965
+ onFilesChange?.(next);
1966
+ };
1967
+ const accepting = (incoming) => {
1968
+ const list = multiple ? incoming : incoming.slice(0, 1);
1969
+ const badType = list.find((f) => !matchesAccept(f, accept));
1970
+ if (badType) return setError(`${badType.name}: this file type isn't accepted${accept ? ` (${accept})` : ""}.`);
1971
+ const tooBig = maxSize === void 0 ? void 0 : list.find((f) => f.size > maxSize);
1972
+ if (tooBig) return setError(`${tooBig.name}: larger than ${formatSize(maxSize)}.`);
1973
+ setError(null);
1974
+ commit(multiple ? [...files, ...list] : list);
1975
+ };
1976
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "file-dropzone", className: cn("flex flex-col gap-2", className), ...props, children: [
1977
+ /* @__PURE__ */ jsxs(
1978
+ "button",
1979
+ {
1980
+ type: "button",
1981
+ disabled,
1982
+ "data-state": error ? "error" : dragOver ? "drag-over" : "idle",
1983
+ onClick: () => inputRef.current?.click(),
1984
+ onDragOver: (e) => {
1985
+ e.preventDefault();
1986
+ if (!disabled) setDragOver(true);
1987
+ },
1988
+ onDragLeave: () => setDragOver(false),
1989
+ onDrop: (e) => {
1990
+ e.preventDefault();
1991
+ setDragOver(false);
1992
+ if (!disabled) accepting(Array.from(e.dataTransfer.files));
1993
+ },
1994
+ className: cn(
1995
+ "flex flex-col items-center gap-1 rounded-lg border border-dashed border-border bg-card px-6 py-8 text-sm text-muted-foreground outline-none transition-colors hover:bg-muted focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50",
1996
+ "data-[state=drag-over]:border-primary data-[state=drag-over]:bg-muted data-[state=error]:border-destructive"
1997
+ ),
1998
+ children: [
1999
+ /* @__PURE__ */ jsx(UploadIcon, { className: "size-5", "aria-hidden": true }),
2000
+ /* @__PURE__ */ jsxs("span", { className: "font-medium text-foreground", children: [
2001
+ "Drop ",
2002
+ multiple ? "files" : "a file",
2003
+ " here, or click to browse"
2004
+ ] }),
2005
+ (accept || maxSize !== void 0) && /* @__PURE__ */ jsx("span", { className: "text-xs", children: [accept, maxSize !== void 0 && `up to ${formatSize(maxSize)}`].filter(Boolean).join(" \xB7 ") })
2006
+ ]
2007
+ }
2008
+ ),
2009
+ /* @__PURE__ */ jsx(
2010
+ "input",
2011
+ {
2012
+ ref: inputRef,
2013
+ type: "file",
2014
+ hidden: true,
2015
+ accept,
2016
+ multiple,
2017
+ disabled,
2018
+ "data-slot": "file-dropzone-input",
2019
+ onChange: (e) => {
2020
+ accepting(Array.from(e.target.files ?? []));
2021
+ e.target.value = "";
2022
+ }
2023
+ }
2024
+ ),
2025
+ error && /* @__PURE__ */ jsx("p", { role: "alert", className: "text-sm text-destructive", children: error }),
2026
+ files.length > 0 && /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-1 text-sm", children: files.map((f, i) => /* @__PURE__ */ jsxs("li", { className: "flex items-center justify-between gap-2 rounded-md bg-muted px-2 py-1", children: [
2027
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: f.name }),
2028
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 text-xs text-muted-foreground tabular-nums", children: [
2029
+ formatSize(f.size),
2030
+ /* @__PURE__ */ jsx(
2031
+ Button,
2032
+ {
2033
+ type: "button",
2034
+ variant: "ghost",
2035
+ size: "icon",
2036
+ className: "size-6",
2037
+ "aria-label": `Remove ${f.name}`,
2038
+ onClick: () => commit(files.filter((_, j) => j !== i)),
2039
+ children: /* @__PURE__ */ jsx(XIcon, {})
2040
+ }
2041
+ )
2042
+ ] })
2043
+ ] }, `${f.name}-${i}`)) })
2044
+ ] });
2045
+ }
1882
2046
 
1883
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, HoverCard, HoverCardContent, HoverCardTrigger, Kbd, KbdGroup, Label, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Slider, Spinner, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, Toaster, createToastManager, tabsListVariants, toast, useComboboxAnchor, useToastManager };
2047
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, CodeBlock, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, ContextMenu, ContextMenuContent, ContextMenuTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FileDropzone, HoverCard, HoverCardContent, HoverCardTrigger, Kbd, KbdGroup, Label, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Slider, Spinner, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, Toaster, createToastManager, tabsListVariants, toast, useComboboxAnchor, useToastManager };
1884
2048
  //# sourceMappingURL=index.js.map
1885
2049
  //# sourceMappingURL=index.js.map