@evinvest/uikit 0.11.2 → 0.12.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 +4 -0
- package/dist/index.d.ts +27 -27
- package/dist/index.js +65 -62
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -69,6 +69,10 @@ rung by how loud the thing should be, never by what it means; see
|
|
|
69
69
|
five, binding rungs it does not distinguish to the same value, which is what
|
|
70
70
|
lets a kit component reference an accent at all.
|
|
71
71
|
|
|
72
|
+
Variant names follow the same kind of unenforceable rule — a variant names the
|
|
73
|
+
state, never its appearance (`Red`) and never its selection (`Default`); see
|
|
74
|
+
[`docs/spec/variants.md`](../../docs/spec/variants.md).
|
|
75
|
+
|
|
72
76
|
`styles/tokens.css` is generated by `nix run .#gen` from the repo-root
|
|
73
77
|
`tokens.css` shared with the Rust feature — flattened, so it is self-contained —
|
|
74
78
|
and carries EV's values: a single dark palette on `:root, .dark`. A consumer
|
package/dist/index.d.ts
CHANGED
|
@@ -167,7 +167,7 @@ declare function useHoverIntent(opts: {
|
|
|
167
167
|
declare function mergeRefs<T>(...refs: Array<React.Ref<T> | undefined>): React.RefCallback<T>;
|
|
168
168
|
|
|
169
169
|
declare const alertVariants: {
|
|
170
|
-
readonly
|
|
170
|
+
readonly neutral: "bg-card text-ink";
|
|
171
171
|
readonly destructive: "text-accent-error bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-accent-error/90";
|
|
172
172
|
};
|
|
173
173
|
type AlertVariant = keyof typeof alertVariants;
|
|
@@ -184,7 +184,7 @@ declare function AvatarImage({ className, onError, ...props }: React.ComponentPr
|
|
|
184
184
|
declare function AvatarFallback({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
185
185
|
|
|
186
186
|
declare const badgeVariants: {
|
|
187
|
-
readonly
|
|
187
|
+
readonly primary: "border-transparent bg-primary text-on-primary [a&]:hover:bg-primary/90";
|
|
188
188
|
readonly secondary: "border-transparent bg-secondary text-on-secondary [a&]:hover:bg-secondary/90";
|
|
189
189
|
readonly destructive: "border-transparent bg-accent-error text-on-accent-error [a&]:hover:bg-accent-error/90 focus-visible:ring-accent-error/20";
|
|
190
190
|
readonly outline: "text-ink [a&]:hover:bg-hover [a&]:hover:text-ink";
|
|
@@ -210,7 +210,7 @@ declare function BreadcrumbSeparator({ children, className, ...props }: React.Co
|
|
|
210
210
|
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
211
211
|
|
|
212
212
|
declare const buttonVariantClasses: {
|
|
213
|
-
readonly
|
|
213
|
+
readonly primary: "bg-primary text-on-primary hover:bg-primary/90";
|
|
214
214
|
readonly secondary: "bg-secondary text-on-secondary hover:bg-secondary/80";
|
|
215
215
|
readonly outline: "border bg-transparent shadow-xs hover:bg-hover hover:text-ink";
|
|
216
216
|
readonly ghost: "hover:bg-hover hover:text-ink";
|
|
@@ -219,7 +219,7 @@ declare const buttonVariantClasses: {
|
|
|
219
219
|
};
|
|
220
220
|
type ButtonVariant = keyof typeof buttonVariantClasses;
|
|
221
221
|
declare const buttonSizeClasses: {
|
|
222
|
-
readonly
|
|
222
|
+
readonly md: "h-9 px-4 py-[var(--control-py)] has-[>svg]:px-3";
|
|
223
223
|
readonly xs: "h-7 gap-1 px-2 text-xs has-[>svg]:px-1.5";
|
|
224
224
|
readonly sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5";
|
|
225
225
|
readonly lg: "h-10 px-6 has-[>svg]:px-4";
|
|
@@ -278,7 +278,7 @@ declare function CardContent({ className, ...props }: React.ComponentProps<"div"
|
|
|
278
278
|
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
279
279
|
|
|
280
280
|
declare const emptyMediaVariants: {
|
|
281
|
-
readonly
|
|
281
|
+
readonly bare: "bg-transparent";
|
|
282
282
|
readonly icon: "bg-muted text-ink flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6";
|
|
283
283
|
};
|
|
284
284
|
type EmptyMediaVariant = keyof typeof emptyMediaVariants;
|
|
@@ -421,18 +421,18 @@ interface SeparatorProps extends React.ComponentProps<"div"> {
|
|
|
421
421
|
declare function Separator({ className, orientation, ...props }: SeparatorProps): React.JSX.Element;
|
|
422
422
|
|
|
423
423
|
declare const itemVariants: {
|
|
424
|
-
readonly
|
|
424
|
+
readonly bare: "bg-transparent";
|
|
425
425
|
readonly outline: "border-border";
|
|
426
426
|
readonly muted: "bg-muted/50";
|
|
427
427
|
};
|
|
428
428
|
type ItemVariant = keyof typeof itemVariants;
|
|
429
429
|
declare const itemSizes: {
|
|
430
|
-
readonly
|
|
430
|
+
readonly md: "p-4 gap-4";
|
|
431
431
|
readonly sm: "py-3 px-4 gap-2.5";
|
|
432
432
|
};
|
|
433
433
|
type ItemSize = keyof typeof itemSizes;
|
|
434
434
|
declare const itemMediaVariants: {
|
|
435
|
-
readonly
|
|
435
|
+
readonly bare: "bg-transparent";
|
|
436
436
|
readonly icon: "size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4";
|
|
437
437
|
readonly image: "size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover";
|
|
438
438
|
};
|
|
@@ -490,7 +490,7 @@ declare function Spinner({ className, ...props }: React.ComponentProps<"svg">):
|
|
|
490
490
|
* what you want off an error page); pass `linkComponent` (e.g. `next/link`) for
|
|
491
491
|
* soft navigation from a client boundary.
|
|
492
492
|
*/
|
|
493
|
-
type
|
|
493
|
+
type Accent = "trace" | "debug" | "info" | "warn" | "error";
|
|
494
494
|
/**
|
|
495
495
|
* A status CTA is a Button at the page's accent: the canonical button string,
|
|
496
496
|
* then the mono/uppercase treatment the error pages wear, then the accent.
|
|
@@ -499,7 +499,7 @@ type StatusAccent = "teal" | "gold" | "red" | "blue";
|
|
|
499
499
|
* slot — a retry button wired to Next's `reset`, say — has to be able to match
|
|
500
500
|
* the CTAs beside it, and the accent colour maps are ours.
|
|
501
501
|
*/
|
|
502
|
-
declare function statusCtaClass(accent:
|
|
502
|
+
declare function statusCtaClass(accent: Accent, variant: ButtonVariant): string;
|
|
503
503
|
interface StatusLinkData {
|
|
504
504
|
label: string;
|
|
505
505
|
href: string;
|
|
@@ -507,7 +507,7 @@ interface StatusLinkData {
|
|
|
507
507
|
leadingArrow?: boolean;
|
|
508
508
|
}
|
|
509
509
|
interface StatusScreenProps {
|
|
510
|
-
accent:
|
|
510
|
+
accent: Accent;
|
|
511
511
|
eyebrow: string;
|
|
512
512
|
code: string;
|
|
513
513
|
headlineLead: string;
|
|
@@ -673,12 +673,12 @@ interface TabsContentProps extends React.ComponentProps<"div"> {
|
|
|
673
673
|
declare function TabsContent({ className, value, children, ...props }: TabsContentProps): React.JSX.Element | null;
|
|
674
674
|
|
|
675
675
|
declare const toggleVariantClasses: {
|
|
676
|
-
readonly
|
|
676
|
+
readonly bare: "bg-transparent";
|
|
677
677
|
readonly outline: "border border-input bg-transparent shadow-xs hover:bg-hover hover:text-ink";
|
|
678
678
|
};
|
|
679
679
|
type ToggleVariant = keyof typeof toggleVariantClasses;
|
|
680
680
|
declare const toggleSizeClasses: {
|
|
681
|
-
readonly
|
|
681
|
+
readonly md: "h-9 px-2 min-w-9";
|
|
682
682
|
readonly xs: "h-7 px-1 min-w-7";
|
|
683
683
|
readonly sm: "h-8 px-1.5 min-w-8";
|
|
684
684
|
readonly lg: "h-10 px-2.5 min-w-10";
|
|
@@ -773,7 +773,7 @@ declare function ScrollBar({ className, orientation, ...props }: ScrollBarProps)
|
|
|
773
773
|
|
|
774
774
|
declare const sidebarMenuButtonSizeClasses: {
|
|
775
775
|
readonly xs: "h-7 text-xs";
|
|
776
|
-
readonly
|
|
776
|
+
readonly sm: "h-8 text-sm";
|
|
777
777
|
readonly lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!";
|
|
778
778
|
};
|
|
779
779
|
type SidebarMenuButtonSize = keyof typeof sidebarMenuButtonSizeClasses;
|
|
@@ -961,7 +961,7 @@ declare function DropdownMenuContent({ className, sideOffset, children, ...props
|
|
|
961
961
|
declare function DropdownMenuGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
962
962
|
interface DropdownMenuItemProps extends React.ComponentProps<"div"> {
|
|
963
963
|
inset?: boolean;
|
|
964
|
-
variant?: "
|
|
964
|
+
variant?: "neutral" | "destructive";
|
|
965
965
|
disabled?: boolean;
|
|
966
966
|
}
|
|
967
967
|
declare function DropdownMenuItem({ className, inset, variant, disabled, onClick, onKeyDown, ...props }: DropdownMenuItemProps): React.JSX.Element;
|
|
@@ -1017,7 +1017,7 @@ declare function ContextMenuGroup({ className, ...props }: React.ComponentProps<
|
|
|
1017
1017
|
declare function ContextMenuContent({ className, children, ...props }: React.ComponentProps<"div">): React.JSX.Element | null;
|
|
1018
1018
|
interface ContextMenuItemProps extends React.ComponentProps<"div"> {
|
|
1019
1019
|
inset?: boolean;
|
|
1020
|
-
variant?: "
|
|
1020
|
+
variant?: "neutral" | "destructive";
|
|
1021
1021
|
disabled?: boolean;
|
|
1022
1022
|
}
|
|
1023
1023
|
declare function ContextMenuItem({ className, inset, variant, disabled, onClick, onKeyDown, ...props }: ContextMenuItemProps): React.JSX.Element;
|
|
@@ -1070,7 +1070,7 @@ declare function MenubarContent({ className, children, align, ...props }: React.
|
|
|
1070
1070
|
declare function MenubarGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
1071
1071
|
declare function MenubarItem({ className, inset, variant, ...props }: React.ComponentProps<"div"> & {
|
|
1072
1072
|
inset?: boolean;
|
|
1073
|
-
variant?: "
|
|
1073
|
+
variant?: "neutral" | "destructive";
|
|
1074
1074
|
}): React.JSX.Element;
|
|
1075
1075
|
declare function MenubarCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<"div"> & {
|
|
1076
1076
|
checked?: boolean;
|
|
@@ -1255,7 +1255,7 @@ interface SelectProps {
|
|
|
1255
1255
|
}
|
|
1256
1256
|
declare function Select({ value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, children, }: SelectProps): React.JSX.Element;
|
|
1257
1257
|
interface SelectTriggerProps extends React.ComponentProps<"button"> {
|
|
1258
|
-
size?: "sm" | "
|
|
1258
|
+
size?: "sm" | "md";
|
|
1259
1259
|
}
|
|
1260
1260
|
declare function SelectTrigger({ className, size, onClick, children, ...props }: SelectTriggerProps): React.JSX.Element;
|
|
1261
1261
|
interface SelectValueProps extends React.ComponentProps<"span"> {
|
|
@@ -1375,11 +1375,11 @@ interface CalendarProps {
|
|
|
1375
1375
|
declare function Calendar({ selected, onSelect, month, defaultMonth, onMonthChange, today, className, }: CalendarProps): React.JSX.Element;
|
|
1376
1376
|
|
|
1377
1377
|
declare const toastVariantClasses: {
|
|
1378
|
-
readonly
|
|
1379
|
-
readonly
|
|
1380
|
-
readonly error: "bg-popover text-ink border-accent-error/50";
|
|
1378
|
+
readonly neutral: "bg-popover text-ink border-border";
|
|
1379
|
+
readonly positive: "bg-popover text-ink border-positive/40";
|
|
1381
1380
|
readonly info: "bg-popover text-ink border-border";
|
|
1382
|
-
readonly
|
|
1381
|
+
readonly warn: "bg-popover text-ink border-border";
|
|
1382
|
+
readonly error: "bg-popover text-ink border-accent-error/50";
|
|
1383
1383
|
};
|
|
1384
1384
|
type ToastVariant = keyof typeof toastVariantClasses;
|
|
1385
1385
|
declare const positionClasses: {
|
|
@@ -1419,15 +1419,15 @@ interface Toast {
|
|
|
1419
1419
|
}
|
|
1420
1420
|
interface ToastFn {
|
|
1421
1421
|
(message: React.ReactNode, opts?: ToastOptions): number;
|
|
1422
|
-
|
|
1422
|
+
positive: (message: React.ReactNode, opts?: ToastOptions) => number;
|
|
1423
1423
|
error: (message: React.ReactNode, opts?: ToastOptions) => number;
|
|
1424
1424
|
info: (message: React.ReactNode, opts?: ToastOptions) => number;
|
|
1425
|
-
|
|
1425
|
+
warn: (message: React.ReactNode, opts?: ToastOptions) => number;
|
|
1426
1426
|
dismiss: (id: number) => void;
|
|
1427
1427
|
}
|
|
1428
1428
|
/**
|
|
1429
|
-
* Global toast handle. `toast(msg)` enqueues a neutral toast; the `.
|
|
1430
|
-
* `.error`, `.info` and `.
|
|
1429
|
+
* Global toast handle. `toast(msg)` enqueues a neutral toast; the `.positive`,
|
|
1430
|
+
* `.error`, `.info` and `.warn` helpers pin the variant; `toast.dismiss(id)`
|
|
1431
1431
|
* removes one early. Mirrors Rust's `use_toaster()` handle methods.
|
|
1432
1432
|
*/
|
|
1433
1433
|
declare const toast: ToastFn;
|
|
@@ -1478,4 +1478,4 @@ interface ResizableHandleProps extends React.ComponentProps<"div"> {
|
|
|
1478
1478
|
}
|
|
1479
1479
|
declare function ResizableHandle({ className, index, withHandle, children, ...props }: ResizableHandleProps): React.JSX.Element;
|
|
1480
1480
|
|
|
1481
|
-
export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, type AlertDialogOverlayProps, type AlertDialogProps, AlertDialogTitle, AlertDialogTrigger, type AlertDialogTriggerProps, type AlertProps, AlertTitle, type AlertVariant, type Align, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, type BadgeVariant, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, type ButtonGroupOrientation, type ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, type ButtonGroupTextProps, type ButtonProps, type ButtonSize, type ButtonVariant, type ButtonVariantsOptions, Calendar, type CalendarProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselEdgeFade, CarouselItem, CarouselNext, CarouselPrevious, type CarouselProps, type ChartConfig, ChartContainer, type ChartItem, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Check, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, type CommandGroupProps, CommandInput, CommandItem, type CommandItemProps, CommandList, type CommandProps, CommandSeparator, CommandShortcut, Container, type ContainerProps, ContextMenu, ContextMenuCheckboxItem, type ContextMenuCheckboxItemProps, ContextMenuContent, ContextMenuGroup, ContextMenuItem, type ContextMenuItemProps, ContextMenuLabel, type ContextMenuLabelProps, ContextMenuPortal, type ContextMenuProps, ContextMenuRadioGroup, type ContextMenuRadioGroupProps, ContextMenuRadioItem, type ContextMenuRadioItemProps, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, type ContextMenuSubProps, ContextMenuSubTrigger, type ContextMenuSubTriggerProps, ContextMenuTrigger, type ContextMenuTriggerProps, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, type DialogOverlayProps, DialogPortal, type DialogPortalProps, type DialogProps, DialogTitle, DialogTrigger, type DialogTriggerProps, Display, Drawer, DrawerClose, type DrawerCloseProps, DrawerContent, DrawerDescription, type DrawerDirection, DrawerFooter, DrawerHeader, DrawerOverlay, type DrawerProps, DrawerTitle, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, type EmptyMediaProps, type EmptyMediaVariant, EmptyTitle, Eyebrow, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, type FieldOrientation, FieldSeparator, FieldSet, FieldTitle, type FloatingResult, Footer, type FooterLink, type FooterLinkGroup, type FooterOffice, type FooterProps, Forbidden, Form, FormControl, FormDescription, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, type HoverCardContentProps, type HoverCardProps, HoverCardTrigger, type HoverCardTriggerProps, type HoverIntentHandlers, InfoTip, InfoTipContent, type InfoTipContentProps, type InfoTipProps, InfoTipTrigger, type InfoTipTriggerProps, Input, InputGroup, InputGroupAddon, type InputGroupAddonAlign, type InputGroupAddonProps, InputGroupButton, type InputGroupButtonProps, type InputGroupButtonSize, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot, type InputOTPSlotProps, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, type ItemMediaProps, type ItemMediaVariant, type ItemProps, ItemSeparator, type ItemSize, ItemTitle, type ItemVariant, Kbd, KbdGroup, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, type MenubarMenuProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, type MenubarSubProps, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, type NavigationMenuItemProps, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotFound, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, PaginationNext, PaginationPrevious, type Polarity, Popover, PopoverAnchor, type PopoverAnchorProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, type PortalProps, Progress, type ProgressProps, Prose, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type ResizableDirection, ResizableHandle, type ResizableHandleProps, ResizablePanel, ResizablePanelGroup, type ResizablePanelGroupProps, type ResizablePanelProps, ScrollArea, ScrollBar, type ScrollBarOrientation, type ScrollBarProps, Section, SectionDescriptor, type SectionDescriptorProps, SectionHead, type SectionHeadProps, type SectionProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, type SelectProps, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, Separator, type SeparatorOrientation, type SeparatorProps, ServerError, type ServerErrorProps, Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, type SheetOverlayProps, type SheetProps, SheetTitle, SheetTrigger, type SheetTriggerProps, type Side, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, type SidebarGroupLabelProps, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, type SidebarMenuButtonProps, type SidebarMenuButtonSize, SidebarMenuItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, type SliderProps, Slot, type SlotProps, Spinner, Stat, type StatProps, type
|
|
1481
|
+
export { type Accent, Accordion, AccordionContent, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, type AlertDialogOverlayProps, type AlertDialogProps, AlertDialogTitle, AlertDialogTrigger, type AlertDialogTriggerProps, type AlertProps, AlertTitle, type AlertVariant, type Align, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, type BadgeVariant, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, type ButtonGroupOrientation, type ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, type ButtonGroupTextProps, type ButtonProps, type ButtonSize, type ButtonVariant, type ButtonVariantsOptions, Calendar, type CalendarProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselEdgeFade, CarouselItem, CarouselNext, CarouselPrevious, type CarouselProps, type ChartConfig, ChartContainer, type ChartItem, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Check, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, type CommandGroupProps, CommandInput, CommandItem, type CommandItemProps, CommandList, type CommandProps, CommandSeparator, CommandShortcut, Container, type ContainerProps, ContextMenu, ContextMenuCheckboxItem, type ContextMenuCheckboxItemProps, ContextMenuContent, ContextMenuGroup, ContextMenuItem, type ContextMenuItemProps, ContextMenuLabel, type ContextMenuLabelProps, ContextMenuPortal, type ContextMenuProps, ContextMenuRadioGroup, type ContextMenuRadioGroupProps, ContextMenuRadioItem, type ContextMenuRadioItemProps, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, type ContextMenuSubProps, ContextMenuSubTrigger, type ContextMenuSubTriggerProps, ContextMenuTrigger, type ContextMenuTriggerProps, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, type DialogOverlayProps, DialogPortal, type DialogPortalProps, type DialogProps, DialogTitle, DialogTrigger, type DialogTriggerProps, Display, Drawer, DrawerClose, type DrawerCloseProps, DrawerContent, DrawerDescription, type DrawerDirection, DrawerFooter, DrawerHeader, DrawerOverlay, type DrawerProps, DrawerTitle, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, type EmptyMediaProps, type EmptyMediaVariant, EmptyTitle, Eyebrow, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, type FieldOrientation, FieldSeparator, FieldSet, FieldTitle, type FloatingResult, Footer, type FooterLink, type FooterLinkGroup, type FooterOffice, type FooterProps, Forbidden, Form, FormControl, FormDescription, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, type HoverCardContentProps, type HoverCardProps, HoverCardTrigger, type HoverCardTriggerProps, type HoverIntentHandlers, InfoTip, InfoTipContent, type InfoTipContentProps, type InfoTipProps, InfoTipTrigger, type InfoTipTriggerProps, Input, InputGroup, InputGroupAddon, type InputGroupAddonAlign, type InputGroupAddonProps, InputGroupButton, type InputGroupButtonProps, type InputGroupButtonSize, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot, type InputOTPSlotProps, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, type ItemMediaProps, type ItemMediaVariant, type ItemProps, ItemSeparator, type ItemSize, ItemTitle, type ItemVariant, Kbd, KbdGroup, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, type MenubarMenuProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, type MenubarSubProps, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, type NavigationMenuItemProps, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotFound, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, PaginationNext, PaginationPrevious, type Polarity, Popover, PopoverAnchor, type PopoverAnchorProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, type PortalProps, Progress, type ProgressProps, Prose, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type ResizableDirection, ResizableHandle, type ResizableHandleProps, ResizablePanel, ResizablePanelGroup, type ResizablePanelGroupProps, type ResizablePanelProps, ScrollArea, ScrollBar, type ScrollBarOrientation, type ScrollBarProps, Section, SectionDescriptor, type SectionDescriptorProps, SectionHead, type SectionHeadProps, type SectionProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, type SelectProps, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, Separator, type SeparatorOrientation, type SeparatorProps, ServerError, type ServerErrorProps, Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, type SheetOverlayProps, type SheetProps, SheetTitle, SheetTrigger, type SheetTriggerProps, type Side, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, type SidebarGroupLabelProps, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, type SidebarMenuButtonProps, type SidebarMenuButtonSize, SidebarMenuItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, type SliderProps, Slot, type SlotProps, Spinner, Stat, type StatProps, type StatusLinkData, type StatusPageProps, StatusScreen, type StatusScreenProps, type Surface, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type Toast, type ToastFn, type ToastOptions, type ToastPosition, type ToastState, type ToastVariant, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, type ToggleSize, type ToggleVariant, type ToggleVariantsOptions, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps, buttonVariants, cn, mergeRefs, navigationMenuTriggerStyle, statusCtaClass, toast, toggleVariants, useControllableState, useDismissableLayer, useFloating, useFocusScope, useHoverIntent, usePresence, useRovingFocus, useSidebar };
|
package/dist/index.js
CHANGED
|
@@ -333,7 +333,7 @@ import "react";
|
|
|
333
333
|
// src/generated/alert.ts
|
|
334
334
|
var ALERT_BASE = "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current";
|
|
335
335
|
var alertVariants = {
|
|
336
|
-
"
|
|
336
|
+
"neutral": "bg-card text-ink",
|
|
337
337
|
"destructive": "text-accent-error bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-accent-error/90"
|
|
338
338
|
};
|
|
339
339
|
var ALERT_TITLE = "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight";
|
|
@@ -341,7 +341,7 @@ var ALERT_DESCRIPTION = "text-ink-soft col-start-2 grid justify-items-start gap-
|
|
|
341
341
|
|
|
342
342
|
// src/components/alert.tsx
|
|
343
343
|
import { jsx } from "react/jsx-runtime";
|
|
344
|
-
function Alert({ className, variant = "
|
|
344
|
+
function Alert({ className, variant = "neutral", ...props }) {
|
|
345
345
|
return /* @__PURE__ */ jsx(
|
|
346
346
|
"div",
|
|
347
347
|
{
|
|
@@ -436,7 +436,7 @@ import "react";
|
|
|
436
436
|
// src/generated/badge.ts
|
|
437
437
|
var BADGE_BASE = "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 gap-1 overflow-hidden [&>svg]:size-3 [&>svg]:pointer-events-none transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-accent-error/20 aria-invalid:border-accent-error";
|
|
438
438
|
var badgeVariants = {
|
|
439
|
-
"
|
|
439
|
+
"primary": "border-transparent bg-primary text-on-primary [a&]:hover:bg-primary/90",
|
|
440
440
|
"secondary": "border-transparent bg-secondary text-on-secondary [a&]:hover:bg-secondary/90",
|
|
441
441
|
"destructive": "border-transparent bg-accent-error text-on-accent-error [a&]:hover:bg-accent-error/90 focus-visible:ring-accent-error/20",
|
|
442
442
|
"outline": "text-ink [a&]:hover:bg-hover [a&]:hover:text-ink",
|
|
@@ -447,7 +447,7 @@ var badgeVariants = {
|
|
|
447
447
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
448
448
|
function Badge({
|
|
449
449
|
className,
|
|
450
|
-
variant = "
|
|
450
|
+
variant = "primary",
|
|
451
451
|
asChild = false,
|
|
452
452
|
...props
|
|
453
453
|
}) {
|
|
@@ -592,7 +592,7 @@ import "react";
|
|
|
592
592
|
// src/generated/button.ts
|
|
593
593
|
var BUTTON_BASE = "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[var(--control-radius)] text-sm font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-accent-error/20 aria-invalid:border-accent-error";
|
|
594
594
|
var buttonVariantClasses = {
|
|
595
|
-
"
|
|
595
|
+
"primary": "bg-primary text-on-primary hover:bg-primary/90",
|
|
596
596
|
"secondary": "bg-secondary text-on-secondary hover:bg-secondary/80",
|
|
597
597
|
"outline": "border bg-transparent shadow-xs hover:bg-hover hover:text-ink",
|
|
598
598
|
"ghost": "hover:bg-hover hover:text-ink",
|
|
@@ -600,7 +600,7 @@ var buttonVariantClasses = {
|
|
|
600
600
|
"link": "text-primary underline-offset-4 hover:underline"
|
|
601
601
|
};
|
|
602
602
|
var buttonSizeClasses = {
|
|
603
|
-
"
|
|
603
|
+
"md": "h-9 px-4 py-[var(--control-py)] has-[>svg]:px-3",
|
|
604
604
|
"xs": "h-7 gap-1 px-2 text-xs has-[>svg]:px-1.5",
|
|
605
605
|
"sm": "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
606
606
|
"lg": "h-10 px-6 has-[>svg]:px-4",
|
|
@@ -615,16 +615,16 @@ var buttonSizeClasses = {
|
|
|
615
615
|
// src/components/button.tsx
|
|
616
616
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
617
617
|
function buttonVariants({
|
|
618
|
-
variant = "
|
|
619
|
-
size = "
|
|
618
|
+
variant = "primary",
|
|
619
|
+
size = "md",
|
|
620
620
|
className
|
|
621
621
|
} = {}) {
|
|
622
622
|
return cn(BUTTON_BASE, buttonVariantClasses[variant], buttonSizeClasses[size], className);
|
|
623
623
|
}
|
|
624
624
|
function Button({
|
|
625
625
|
className,
|
|
626
|
-
variant = "
|
|
627
|
-
size = "
|
|
626
|
+
variant = "primary",
|
|
627
|
+
size = "md",
|
|
628
628
|
asChild = false,
|
|
629
629
|
href,
|
|
630
630
|
...props
|
|
@@ -800,7 +800,7 @@ var EMPTY = "flex min-w-0 flex-1 flex-col items-center justify-center gap-6 roun
|
|
|
800
800
|
var EMPTY_HEADER = "flex max-w-sm flex-col items-center gap-2 text-center";
|
|
801
801
|
var EMPTY_MEDIA_BASE = "flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0";
|
|
802
802
|
var emptyMediaVariants = {
|
|
803
|
-
"
|
|
803
|
+
"bare": "bg-transparent",
|
|
804
804
|
"icon": "bg-muted text-ink flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"
|
|
805
805
|
};
|
|
806
806
|
var EMPTY_TITLE = "text-lg font-medium tracking-tight";
|
|
@@ -827,7 +827,7 @@ function EmptyHeader({
|
|
|
827
827
|
}
|
|
828
828
|
function EmptyMedia({
|
|
829
829
|
className,
|
|
830
|
-
variant = "
|
|
830
|
+
variant = "bare",
|
|
831
831
|
...props
|
|
832
832
|
}) {
|
|
833
833
|
return /* @__PURE__ */ jsx8(
|
|
@@ -1460,17 +1460,17 @@ var ITEM_GROUP = "group/item-group flex flex-col";
|
|
|
1460
1460
|
var ITEM_SEPARATOR = "my-0";
|
|
1461
1461
|
var ITEM_BASE = "group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-hover/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]";
|
|
1462
1462
|
var itemVariants = {
|
|
1463
|
-
"
|
|
1463
|
+
"bare": "bg-transparent",
|
|
1464
1464
|
"outline": "border-border",
|
|
1465
1465
|
"muted": "bg-muted/50"
|
|
1466
1466
|
};
|
|
1467
1467
|
var itemSizes = {
|
|
1468
|
-
"
|
|
1468
|
+
"md": "p-4 gap-4",
|
|
1469
1469
|
"sm": "py-3 px-4 gap-2.5"
|
|
1470
1470
|
};
|
|
1471
1471
|
var ITEM_MEDIA_BASE = "flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5";
|
|
1472
1472
|
var itemMediaVariants = {
|
|
1473
|
-
"
|
|
1473
|
+
"bare": "bg-transparent",
|
|
1474
1474
|
"icon": "size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4",
|
|
1475
1475
|
"image": "size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover"
|
|
1476
1476
|
};
|
|
@@ -1510,8 +1510,8 @@ function ItemSeparator({
|
|
|
1510
1510
|
}
|
|
1511
1511
|
function Item({
|
|
1512
1512
|
className,
|
|
1513
|
-
variant = "
|
|
1514
|
-
size = "
|
|
1513
|
+
variant = "bare",
|
|
1514
|
+
size = "md",
|
|
1515
1515
|
asChild = false,
|
|
1516
1516
|
...props
|
|
1517
1517
|
}) {
|
|
@@ -1529,7 +1529,7 @@ function Item({
|
|
|
1529
1529
|
}
|
|
1530
1530
|
function ItemMedia({
|
|
1531
1531
|
className,
|
|
1532
|
-
variant = "
|
|
1532
|
+
variant = "bare",
|
|
1533
1533
|
...props
|
|
1534
1534
|
}) {
|
|
1535
1535
|
return /* @__PURE__ */ jsx18(
|
|
@@ -1727,7 +1727,7 @@ function PaginationPrevious({
|
|
|
1727
1727
|
PaginationLink,
|
|
1728
1728
|
{
|
|
1729
1729
|
"aria-label": "Go to previous page",
|
|
1730
|
-
size: "
|
|
1730
|
+
size: "md",
|
|
1731
1731
|
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
1732
1732
|
...props,
|
|
1733
1733
|
children: [
|
|
@@ -1745,7 +1745,7 @@ function PaginationNext({
|
|
|
1745
1745
|
PaginationLink,
|
|
1746
1746
|
{
|
|
1747
1747
|
"aria-label": "Go to next page",
|
|
1748
|
-
size: "
|
|
1748
|
+
size: "md",
|
|
1749
1749
|
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
1750
1750
|
...props,
|
|
1751
1751
|
children: [
|
|
@@ -1849,22 +1849,25 @@ function Spinner({ className, ...props }) {
|
|
|
1849
1849
|
import "react";
|
|
1850
1850
|
import { jsx as jsx24, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1851
1851
|
var ACCENT_TEXT = {
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1852
|
+
trace: "text-accent-trace",
|
|
1853
|
+
debug: "text-accent-debug",
|
|
1854
|
+
info: "text-accent-info",
|
|
1855
|
+
warn: "text-accent-warn",
|
|
1856
|
+
error: "text-accent-error"
|
|
1856
1857
|
};
|
|
1857
1858
|
var BTN_FILLED = {
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1859
|
+
trace: "bg-accent-trace text-on-accent-trace hover:bg-accent-trace/90",
|
|
1860
|
+
debug: "bg-accent-debug text-background hover:bg-accent-debug/90",
|
|
1861
|
+
info: "bg-accent-info text-on-accent-info hover:bg-accent-info/90",
|
|
1862
|
+
warn: "bg-accent-warn text-background hover:bg-accent-warn/90",
|
|
1863
|
+
error: "bg-accent-error text-on-accent-error hover:bg-accent-error/90"
|
|
1862
1864
|
};
|
|
1863
1865
|
var BTN_OUTLINE = {
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1866
|
+
trace: "border border-accent-trace/40 text-accent-trace hover:bg-accent-trace/10",
|
|
1867
|
+
debug: "border border-accent-debug/40 text-accent-debug hover:bg-accent-debug/10",
|
|
1868
|
+
info: "border border-accent-info/40 text-accent-info hover:bg-accent-info/10",
|
|
1869
|
+
warn: "border border-accent-warn/40 text-accent-warn hover:bg-accent-warn/10",
|
|
1870
|
+
error: "border border-accent-error/40 text-accent-error hover:bg-accent-error/10"
|
|
1868
1871
|
};
|
|
1869
1872
|
function statusCtaClass(accent, variant) {
|
|
1870
1873
|
return cn(
|
|
@@ -1937,7 +1940,7 @@ function StatusScreen({
|
|
|
1937
1940
|
/* @__PURE__ */ jsx24("p", { className: "mx-auto mt-5 max-w-md text-sm leading-relaxed text-ink/60 sm:text-base", children: subtext }),
|
|
1938
1941
|
/* @__PURE__ */ jsxs6("div", { className: "mt-9 flex flex-col items-center gap-3 sm:flex-row", children: [
|
|
1939
1942
|
children,
|
|
1940
|
-
links?.map((link) => /* @__PURE__ */ jsxs6(L, { href: link.href, className: statusCtaClass(accent, link.variant ?? "
|
|
1943
|
+
links?.map((link) => /* @__PURE__ */ jsxs6(L, { href: link.href, className: statusCtaClass(accent, link.variant ?? "primary"), children: [
|
|
1941
1944
|
link.leadingArrow ? /* @__PURE__ */ jsx24(ArrowLeftIcon, { className: "mr-2 h-4 w-4" }) : null,
|
|
1942
1945
|
link.label
|
|
1943
1946
|
] }, link.label))
|
|
@@ -1949,7 +1952,7 @@ function NotFound({ linkComponent = "a", homeHref = "/", contactHref = "/contact
|
|
|
1949
1952
|
return /* @__PURE__ */ jsx24(
|
|
1950
1953
|
StatusScreen,
|
|
1951
1954
|
{
|
|
1952
|
-
accent: "
|
|
1955
|
+
accent: "debug",
|
|
1953
1956
|
eyebrow: "Page not found",
|
|
1954
1957
|
code: "404",
|
|
1955
1958
|
headlineLead: "You've reached ",
|
|
@@ -1967,7 +1970,7 @@ function Forbidden({ linkComponent = "a", homeHref = "/", contactHref = "/contac
|
|
|
1967
1970
|
return /* @__PURE__ */ jsx24(
|
|
1968
1971
|
StatusScreen,
|
|
1969
1972
|
{
|
|
1970
|
-
accent: "
|
|
1973
|
+
accent: "warn",
|
|
1971
1974
|
eyebrow: "Access forbidden",
|
|
1972
1975
|
code: "403",
|
|
1973
1976
|
headlineLead: "This harbour is ",
|
|
@@ -1985,7 +1988,7 @@ function ServerError({ linkComponent = "a", homeHref = "/", reset }) {
|
|
|
1985
1988
|
return /* @__PURE__ */ jsx24(
|
|
1986
1989
|
StatusScreen,
|
|
1987
1990
|
{
|
|
1988
|
-
accent: "
|
|
1991
|
+
accent: "error",
|
|
1989
1992
|
eyebrow: "Server error",
|
|
1990
1993
|
code: "500",
|
|
1991
1994
|
headlineLead: "Our systems are ",
|
|
@@ -1997,7 +2000,7 @@ function ServerError({ linkComponent = "a", homeHref = "/", reset }) {
|
|
|
1997
2000
|
"button",
|
|
1998
2001
|
{
|
|
1999
2002
|
type: "button",
|
|
2000
|
-
className: statusCtaClass("
|
|
2003
|
+
className: statusCtaClass("error", "primary"),
|
|
2001
2004
|
onClick: () => reset ? reset() : window.location.reload(),
|
|
2002
2005
|
children: "Try again"
|
|
2003
2006
|
}
|
|
@@ -2519,11 +2522,11 @@ import "react";
|
|
|
2519
2522
|
// src/generated/toggle.ts
|
|
2520
2523
|
var TOGGLE_BASE = "inline-flex items-center justify-center gap-2 rounded-[var(--control-radius)] text-sm font-medium hover:bg-muted hover:text-ink-soft disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-hover data-[state=on]:text-ink [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-accent-error/20 aria-invalid:border-accent-error whitespace-nowrap";
|
|
2521
2524
|
var toggleVariantClasses = {
|
|
2522
|
-
"
|
|
2525
|
+
"bare": "bg-transparent",
|
|
2523
2526
|
"outline": "border border-input bg-transparent shadow-xs hover:bg-hover hover:text-ink"
|
|
2524
2527
|
};
|
|
2525
2528
|
var toggleSizeClasses = {
|
|
2526
|
-
"
|
|
2529
|
+
"md": "h-9 px-2 min-w-9",
|
|
2527
2530
|
"xs": "h-7 px-1 min-w-7",
|
|
2528
2531
|
"sm": "h-8 px-1.5 min-w-8",
|
|
2529
2532
|
"lg": "h-10 px-2.5 min-w-10",
|
|
@@ -2533,16 +2536,16 @@ var toggleSizeClasses = {
|
|
|
2533
2536
|
// src/components/toggle.tsx
|
|
2534
2537
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2535
2538
|
function toggleVariants({
|
|
2536
|
-
variant = "
|
|
2537
|
-
size = "
|
|
2539
|
+
variant = "bare",
|
|
2540
|
+
size = "md",
|
|
2538
2541
|
className
|
|
2539
2542
|
} = {}) {
|
|
2540
2543
|
return cn(TOGGLE_BASE, toggleVariantClasses[variant], toggleSizeClasses[size], className);
|
|
2541
2544
|
}
|
|
2542
2545
|
function Toggle({
|
|
2543
2546
|
className,
|
|
2544
|
-
variant = "
|
|
2545
|
-
size = "
|
|
2547
|
+
variant = "bare",
|
|
2548
|
+
size = "md",
|
|
2546
2549
|
pressed,
|
|
2547
2550
|
defaultPressed = false,
|
|
2548
2551
|
onPressedChange,
|
|
@@ -2575,8 +2578,8 @@ function Toggle({
|
|
|
2575
2578
|
import * as React41 from "react";
|
|
2576
2579
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2577
2580
|
var ToggleGroupContext = React41.createContext({
|
|
2578
|
-
variant: "
|
|
2579
|
-
size: "
|
|
2581
|
+
variant: "bare",
|
|
2582
|
+
size: "md",
|
|
2580
2583
|
value: [],
|
|
2581
2584
|
toggle: () => {
|
|
2582
2585
|
}
|
|
@@ -2587,8 +2590,8 @@ function toArray(v) {
|
|
|
2587
2590
|
}
|
|
2588
2591
|
function ToggleGroup({
|
|
2589
2592
|
className,
|
|
2590
|
-
variant = "
|
|
2591
|
-
size = "
|
|
2593
|
+
variant = "bare",
|
|
2594
|
+
size = "md",
|
|
2592
2595
|
type = "single",
|
|
2593
2596
|
value,
|
|
2594
2597
|
defaultValue,
|
|
@@ -2638,8 +2641,8 @@ function ToggleGroupItem({
|
|
|
2638
2641
|
...props
|
|
2639
2642
|
}) {
|
|
2640
2643
|
const context = React41.useContext(ToggleGroupContext);
|
|
2641
|
-
const resolvedVariant = context.variant || variant || "
|
|
2642
|
-
const resolvedSize = context.size || size || "
|
|
2644
|
+
const resolvedVariant = context.variant || variant || "bare";
|
|
2645
|
+
const resolvedSize = context.size || size || "md";
|
|
2643
2646
|
const on = context.value.includes(value);
|
|
2644
2647
|
return /* @__PURE__ */ jsx31(
|
|
2645
2648
|
"button",
|
|
@@ -3074,7 +3077,7 @@ import * as React47 from "react";
|
|
|
3074
3077
|
var SIDEBAR_MENU_BUTTON_BASE = "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-ring transition-[width,height,padding] hover:bg-hover hover:text-ink focus-visible:ring-2 active:bg-hover active:text-ink disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-hover data-[active=true]:font-medium data-[active=true]:text-ink data-[state=open]:hover:bg-hover data-[state=open]:hover:text-ink group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0";
|
|
3075
3078
|
var sidebarMenuButtonSizeClasses = {
|
|
3076
3079
|
"xs": "h-7 text-xs",
|
|
3077
|
-
"
|
|
3080
|
+
"sm": "h-8 text-sm",
|
|
3078
3081
|
"lg": "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
3079
3082
|
};
|
|
3080
3083
|
var SIDEBAR_WRAPPER = "group/sidebar-wrapper has-data-[variant=inset]:bg-secondary flex min-h-svh w-full";
|
|
@@ -3354,7 +3357,7 @@ function SidebarMenuButton({
|
|
|
3354
3357
|
asChild = false,
|
|
3355
3358
|
isActive = false,
|
|
3356
3359
|
variant = "ghost",
|
|
3357
|
-
size = "
|
|
3360
|
+
size = "sm",
|
|
3358
3361
|
className,
|
|
3359
3362
|
...props
|
|
3360
3363
|
}) {
|
|
@@ -4276,7 +4279,7 @@ function DropdownMenuGroup({ className, ...props }) {
|
|
|
4276
4279
|
function DropdownMenuItem({
|
|
4277
4280
|
className,
|
|
4278
4281
|
inset,
|
|
4279
|
-
variant = "
|
|
4282
|
+
variant = "neutral",
|
|
4280
4283
|
disabled,
|
|
4281
4284
|
onClick,
|
|
4282
4285
|
onKeyDown,
|
|
@@ -4590,7 +4593,7 @@ function ContextMenuContent({ className, children, ...props }) {
|
|
|
4590
4593
|
function ContextMenuItem({
|
|
4591
4594
|
className,
|
|
4592
4595
|
inset,
|
|
4593
|
-
variant = "
|
|
4596
|
+
variant = "neutral",
|
|
4594
4597
|
disabled,
|
|
4595
4598
|
onClick,
|
|
4596
4599
|
onKeyDown,
|
|
@@ -4910,7 +4913,7 @@ function MenubarGroup({ className, ...props }) {
|
|
|
4910
4913
|
function MenubarItem({
|
|
4911
4914
|
className,
|
|
4912
4915
|
inset,
|
|
4913
|
-
variant = "
|
|
4916
|
+
variant = "neutral",
|
|
4914
4917
|
...props
|
|
4915
4918
|
}) {
|
|
4916
4919
|
return /* @__PURE__ */ jsx46(
|
|
@@ -6031,7 +6034,7 @@ function Select({
|
|
|
6031
6034
|
}
|
|
6032
6035
|
function SelectTrigger({
|
|
6033
6036
|
className,
|
|
6034
|
-
size = "
|
|
6037
|
+
size = "md",
|
|
6035
6038
|
onClick,
|
|
6036
6039
|
children,
|
|
6037
6040
|
...props
|
|
@@ -6831,11 +6834,11 @@ import * as React66 from "react";
|
|
|
6831
6834
|
// src/generated/sonner.ts
|
|
6832
6835
|
var TOAST_BASE = "pointer-events-auto flex w-full items-start gap-3 rounded-md border p-4 text-sm shadow-lg";
|
|
6833
6836
|
var toastVariantClasses = {
|
|
6834
|
-
"
|
|
6835
|
-
"
|
|
6836
|
-
"error": "bg-popover text-ink border-accent-error/50",
|
|
6837
|
+
"neutral": "bg-popover text-ink border-border",
|
|
6838
|
+
"positive": "bg-popover text-ink border-positive/40",
|
|
6837
6839
|
"info": "bg-popover text-ink border-border",
|
|
6838
|
-
"
|
|
6840
|
+
"warn": "bg-popover text-ink border-border",
|
|
6841
|
+
"error": "bg-popover text-ink border-accent-error/50"
|
|
6839
6842
|
};
|
|
6840
6843
|
var TOASTER_BASE = "pointer-events-none fixed z-100 w-[calc(100%-2rem)] max-w-sm";
|
|
6841
6844
|
var positionClasses = {
|
|
@@ -6869,7 +6872,7 @@ var store = /* @__PURE__ */ (() => {
|
|
|
6869
6872
|
message,
|
|
6870
6873
|
description: opts.description,
|
|
6871
6874
|
duration: opts.duration ?? DEFAULT_DURATION,
|
|
6872
|
-
variant: opts.variant ?? "
|
|
6875
|
+
variant: opts.variant ?? "neutral",
|
|
6873
6876
|
state: "open"
|
|
6874
6877
|
};
|
|
6875
6878
|
toasts = [...toasts, next];
|
|
@@ -6898,10 +6901,10 @@ var store = /* @__PURE__ */ (() => {
|
|
|
6898
6901
|
var toast = Object.assign(
|
|
6899
6902
|
(message, opts) => store.add(message, opts),
|
|
6900
6903
|
{
|
|
6901
|
-
|
|
6904
|
+
positive: (message, opts) => store.add(message, { ...opts, variant: "positive" }),
|
|
6902
6905
|
error: (message, opts) => store.add(message, { ...opts, variant: "error" }),
|
|
6903
6906
|
info: (message, opts) => store.add(message, { ...opts, variant: "info" }),
|
|
6904
|
-
|
|
6907
|
+
warn: (message, opts) => store.add(message, { ...opts, variant: "warn" }),
|
|
6905
6908
|
dismiss: (id) => store.dismiss(id)
|
|
6906
6909
|
}
|
|
6907
6910
|
);
|