@trading-game/design-intelligence-layer 0.15.4 → 0.16.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 +41 -3
- package/dist/index.cjs +401 -226
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -5
- package/dist/index.d.ts +37 -5
- package/dist/index.js +499 -316
- package/dist/index.js.map +1 -1
- package/guides/design-system-guide/trading-game-ds-guide.md +2 -1
- package/package.json +1 -1
- package/src/styles.css +7 -2
package/dist/index.d.cts
CHANGED
|
@@ -22,12 +22,44 @@ declare function AccordionItem({ className, ...props }: React$1.ComponentProps<t
|
|
|
22
22
|
declare function AccordionTrigger({ className, children, ...props }: React$1.ComponentProps<typeof Accordion$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
23
23
|
declare function AccordionContent({ className, children, ...props }: React$1.ComponentProps<typeof Accordion$1.Content>): react_jsx_runtime.JSX.Element;
|
|
24
24
|
|
|
25
|
+
type AlertVariant = "default" | "brand" | "info" | "warning" | "danger" | "success";
|
|
26
|
+
type AlertLayout = "inline" | "card";
|
|
27
|
+
/**
|
|
28
|
+
* Per-variant surface, title, and accent classes. Description and close X are
|
|
29
|
+
* applied via dedicated slot classes below — they're not part of the cva root
|
|
30
|
+
* because they target descendant elements.
|
|
31
|
+
*/
|
|
25
32
|
declare const alertVariants: (props?: ({
|
|
26
|
-
variant?: "info" | "
|
|
33
|
+
variant?: "default" | "brand" | "info" | "warning" | "danger" | "success" | null | undefined;
|
|
34
|
+
layout?: "inline" | "card" | null | undefined;
|
|
27
35
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
36
|
+
interface AlertProps extends Omit<React$1.ComponentProps<"div">, "title">, VariantProps<typeof alertVariants> {
|
|
37
|
+
/** Surface + accent variant. */
|
|
38
|
+
variant?: AlertVariant;
|
|
39
|
+
/** Layout shape. */
|
|
40
|
+
layout?: AlertLayout;
|
|
41
|
+
/** Title text. At least one of `title` or `description` is required. */
|
|
42
|
+
title?: React$1.ReactNode;
|
|
43
|
+
/** Description / supporting text. At least one of `title` or `description` is required. */
|
|
44
|
+
description?: React$1.ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* Leading icon. When `undefined`, the default for the variant is used.
|
|
47
|
+
* Pass `null` to omit the icon entirely. Pass any `ReactNode` to override.
|
|
48
|
+
*/
|
|
49
|
+
icon?: React$1.ReactNode | null;
|
|
50
|
+
/** Single action button — honoured only when `layout="inline"`. */
|
|
51
|
+
action?: React$1.ReactNode;
|
|
52
|
+
/** Up to 2 action buttons — honoured only when `layout="card"`. */
|
|
53
|
+
actions?: React$1.ReactNode[];
|
|
54
|
+
/**
|
|
55
|
+
* When provided, the close X renders and calls this on click. Absence
|
|
56
|
+
* means the alert is not user-dismissible.
|
|
57
|
+
*/
|
|
58
|
+
onDismiss?: () => void;
|
|
59
|
+
/** aria-label for the close button. Defaults to "Dismiss". */
|
|
60
|
+
dismissLabel?: string;
|
|
61
|
+
}
|
|
62
|
+
declare function Alert({ variant, layout, title, description, icon, action, actions, onDismiss, dismissLabel, className, ...props }: AlertProps): react_jsx_runtime.JSX.Element | null;
|
|
31
63
|
|
|
32
64
|
declare const buttonVariants: (props?: ({
|
|
33
65
|
variant?: "primary" | "primary-inverse" | "secondary" | "secondary-inverse" | "tertiary" | null | undefined;
|
|
@@ -924,4 +956,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
924
956
|
|
|
925
957
|
declare function useIsMobile(): boolean;
|
|
926
958
|
|
|
927
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert,
|
|
959
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertLayout, type AlertProps, type AlertVariant, AspectRatio, AuthBlock, type AuthBlockMode, type AuthBlockProps, type AuthBlockProvider, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, type BoxOPosition, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, 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, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CreditTicketCard, type CreditTicketCardProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type DigitsPosition, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAQBlock, type FAQBlockProps, type FAQItem, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HeaderNavigationBlock, type HeaderNavigationBlockProps, HeroBlock, type HeroBlockCta, type HeroBlockProps, type HeroBlockTagline, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, Link, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavBarBlock, type NavBarBlockLink, type NavBarBlockProps, NavigationButton, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, OpenPositionsBlock, type OpenPositionsBlockProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, type Position, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResultBlock, type ResultBlockCta, type ResultBlockProps, type ResultBlockStatus, ResultDialog, type ResultDialogProps, type RiseFallPosition, 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, Stepper, type StepperProps, type StepperSize, type SwipePosition, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, TicketCard, TicketCardDesktop, type TicketCardProps, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TooltipVariant, alertVariants, badgeVariants, buttonVariants, cn, inputVariants, linkVariants, navigationButtonVariants, navigationMenuTriggerStyle, tabsListVariants, toggleVariants, useComboboxAnchor, useDirection, useFormField, useIsMobile, useSidebar };
|
package/dist/index.d.ts
CHANGED
|
@@ -22,12 +22,44 @@ declare function AccordionItem({ className, ...props }: React$1.ComponentProps<t
|
|
|
22
22
|
declare function AccordionTrigger({ className, children, ...props }: React$1.ComponentProps<typeof Accordion$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
23
23
|
declare function AccordionContent({ className, children, ...props }: React$1.ComponentProps<typeof Accordion$1.Content>): react_jsx_runtime.JSX.Element;
|
|
24
24
|
|
|
25
|
+
type AlertVariant = "default" | "brand" | "info" | "warning" | "danger" | "success";
|
|
26
|
+
type AlertLayout = "inline" | "card";
|
|
27
|
+
/**
|
|
28
|
+
* Per-variant surface, title, and accent classes. Description and close X are
|
|
29
|
+
* applied via dedicated slot classes below — they're not part of the cva root
|
|
30
|
+
* because they target descendant elements.
|
|
31
|
+
*/
|
|
25
32
|
declare const alertVariants: (props?: ({
|
|
26
|
-
variant?: "info" | "
|
|
33
|
+
variant?: "default" | "brand" | "info" | "warning" | "danger" | "success" | null | undefined;
|
|
34
|
+
layout?: "inline" | "card" | null | undefined;
|
|
27
35
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
36
|
+
interface AlertProps extends Omit<React$1.ComponentProps<"div">, "title">, VariantProps<typeof alertVariants> {
|
|
37
|
+
/** Surface + accent variant. */
|
|
38
|
+
variant?: AlertVariant;
|
|
39
|
+
/** Layout shape. */
|
|
40
|
+
layout?: AlertLayout;
|
|
41
|
+
/** Title text. At least one of `title` or `description` is required. */
|
|
42
|
+
title?: React$1.ReactNode;
|
|
43
|
+
/** Description / supporting text. At least one of `title` or `description` is required. */
|
|
44
|
+
description?: React$1.ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* Leading icon. When `undefined`, the default for the variant is used.
|
|
47
|
+
* Pass `null` to omit the icon entirely. Pass any `ReactNode` to override.
|
|
48
|
+
*/
|
|
49
|
+
icon?: React$1.ReactNode | null;
|
|
50
|
+
/** Single action button — honoured only when `layout="inline"`. */
|
|
51
|
+
action?: React$1.ReactNode;
|
|
52
|
+
/** Up to 2 action buttons — honoured only when `layout="card"`. */
|
|
53
|
+
actions?: React$1.ReactNode[];
|
|
54
|
+
/**
|
|
55
|
+
* When provided, the close X renders and calls this on click. Absence
|
|
56
|
+
* means the alert is not user-dismissible.
|
|
57
|
+
*/
|
|
58
|
+
onDismiss?: () => void;
|
|
59
|
+
/** aria-label for the close button. Defaults to "Dismiss". */
|
|
60
|
+
dismissLabel?: string;
|
|
61
|
+
}
|
|
62
|
+
declare function Alert({ variant, layout, title, description, icon, action, actions, onDismiss, dismissLabel, className, ...props }: AlertProps): react_jsx_runtime.JSX.Element | null;
|
|
31
63
|
|
|
32
64
|
declare const buttonVariants: (props?: ({
|
|
33
65
|
variant?: "primary" | "primary-inverse" | "secondary" | "secondary-inverse" | "tertiary" | null | undefined;
|
|
@@ -924,4 +956,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
924
956
|
|
|
925
957
|
declare function useIsMobile(): boolean;
|
|
926
958
|
|
|
927
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert,
|
|
959
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertLayout, type AlertProps, type AlertVariant, AspectRatio, AuthBlock, type AuthBlockMode, type AuthBlockProps, type AuthBlockProvider, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, type BoxOPosition, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, 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, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CreditTicketCard, type CreditTicketCardProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type DigitsPosition, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAQBlock, type FAQBlockProps, type FAQItem, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HeaderNavigationBlock, type HeaderNavigationBlockProps, HeroBlock, type HeroBlockCta, type HeroBlockProps, type HeroBlockTagline, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, Link, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavBarBlock, type NavBarBlockLink, type NavBarBlockProps, NavigationButton, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, OpenPositionsBlock, type OpenPositionsBlockProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, type Position, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResultBlock, type ResultBlockCta, type ResultBlockProps, type ResultBlockStatus, ResultDialog, type ResultDialogProps, type RiseFallPosition, 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, Stepper, type StepperProps, type StepperSize, type SwipePosition, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, TicketCard, TicketCardDesktop, type TicketCardProps, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TooltipVariant, alertVariants, badgeVariants, buttonVariants, cn, inputVariants, linkVariants, navigationButtonVariants, navigationMenuTriggerStyle, tabsListVariants, toggleVariants, useComboboxAnchor, useDirection, useFormField, useIsMobile, useSidebar };
|