@yuva-devlab/ui 1.0.0 → 1.1.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 +29 -14
- package/dist/index.cjs +53 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -6
- package/dist/index.d.ts +18 -6
- package/dist/index.js +51 -19
- package/dist/index.js.map +1 -1
- package/dist/preset.css +159 -0
- package/dist/styles/preset.css +159 -0
- package/dist/styles/styles.css +6 -0
- package/dist/styles/themes/finai.css +114 -0
- package/dist/styles/themes/orchestrai.css +75 -0
- package/dist/styles.css +6 -0
- package/dist/themes/finai.css +114 -0
- package/dist/themes/orchestrai.css +75 -0
- package/package.json +10 -2
package/dist/index.d.cts
CHANGED
|
@@ -56,28 +56,40 @@ import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
|
56
56
|
declare function cn(...inputs: ClassValue[]): string;
|
|
57
57
|
|
|
58
58
|
type Theme = "dark" | "light" | "system" | string;
|
|
59
|
+
type Brand = "finai" | "orchestrai" | string;
|
|
59
60
|
interface ThemeProviderProps {
|
|
60
61
|
children: React__default.ReactNode;
|
|
62
|
+
brand?: Brand;
|
|
61
63
|
defaultTheme?: Theme;
|
|
62
64
|
storageKey?: string;
|
|
65
|
+
brandStorageKey?: string;
|
|
63
66
|
attribute?: string;
|
|
67
|
+
brandAttribute?: string;
|
|
64
68
|
enableSystem?: boolean;
|
|
65
69
|
}
|
|
66
70
|
interface ThemeProviderState {
|
|
67
71
|
theme: Theme;
|
|
72
|
+
brand: Brand;
|
|
68
73
|
setTheme: (theme: Theme) => void;
|
|
74
|
+
setBrand: (brand: Brand) => void;
|
|
69
75
|
resolvedTheme: "dark" | "light";
|
|
70
76
|
}
|
|
71
77
|
/**
|
|
72
|
-
* Universal theme provider for Yuva DevLab applications (FinAI, OrchestrAI).
|
|
73
|
-
* Handles HTML class manipulation, data-theme
|
|
74
|
-
* and localStorage persistence.
|
|
78
|
+
* Universal theme & brand provider for Yuva DevLab applications (FinAI, OrchestrAI).
|
|
79
|
+
* Handles HTML class manipulation, data-theme and data-brand attributes,
|
|
80
|
+
* system preferences, and localStorage persistence.
|
|
75
81
|
*/
|
|
76
|
-
declare function ThemeProvider({ children, defaultTheme, storageKey, attribute, enableSystem, ...props }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
82
|
+
declare function ThemeProvider({ children, brand: initialBrand, defaultTheme, storageKey, brandStorageKey, attribute, brandAttribute, enableSystem, ...props }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
77
83
|
/**
|
|
78
|
-
* Hook to access current theme state and mutate the theme.
|
|
84
|
+
* Hook to access current theme & brand state and mutate the theme/brand.
|
|
79
85
|
*/
|
|
80
86
|
declare const useTheme: () => ThemeProviderState;
|
|
87
|
+
/**
|
|
88
|
+
* ConfigProvider: Brand and Theme Configuration Provider for Yuva DevLab applications.
|
|
89
|
+
*/
|
|
90
|
+
declare const ConfigProvider: typeof ThemeProvider;
|
|
91
|
+
type ConfigProviderProps = ThemeProviderProps;
|
|
92
|
+
declare const useConfig: () => ThemeProviderState;
|
|
81
93
|
|
|
82
94
|
/**
|
|
83
95
|
* Hook to determine if current viewport matches mobile breakpoint (< 768px).
|
|
@@ -762,4 +774,4 @@ interface LoadingStateProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
762
774
|
}
|
|
763
775
|
declare function LoadingState({ rows, className, ...props }: LoadingStateProps): react_jsx_runtime.JSX.Element;
|
|
764
776
|
|
|
765
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, type ConfirmDialogProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label, LoadingState, type LoadingStateProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Panel, type PanelProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchableSelect, type SearchableSelectOption, type SearchableSelectProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, 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, StatusChip, type StatusChipProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThemeProvider, type ThemeProviderProps, type ThemeProviderState, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, navigationMenuTriggerStyle, toggleVariants, useFormField, useIsMobile, useSidebar, useTheme };
|
|
777
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, type Brand, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfigProvider, type ConfigProviderProps, ConfirmDialog, type ConfirmDialogProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label, LoadingState, type LoadingStateProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Panel, type PanelProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchableSelect, type SearchableSelectOption, type SearchableSelectProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, 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, StatusChip, type StatusChipProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThemeProvider, type ThemeProviderProps, type ThemeProviderState, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, navigationMenuTriggerStyle, toggleVariants, useConfig, useFormField, useIsMobile, useSidebar, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -56,28 +56,40 @@ import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
|
56
56
|
declare function cn(...inputs: ClassValue[]): string;
|
|
57
57
|
|
|
58
58
|
type Theme = "dark" | "light" | "system" | string;
|
|
59
|
+
type Brand = "finai" | "orchestrai" | string;
|
|
59
60
|
interface ThemeProviderProps {
|
|
60
61
|
children: React__default.ReactNode;
|
|
62
|
+
brand?: Brand;
|
|
61
63
|
defaultTheme?: Theme;
|
|
62
64
|
storageKey?: string;
|
|
65
|
+
brandStorageKey?: string;
|
|
63
66
|
attribute?: string;
|
|
67
|
+
brandAttribute?: string;
|
|
64
68
|
enableSystem?: boolean;
|
|
65
69
|
}
|
|
66
70
|
interface ThemeProviderState {
|
|
67
71
|
theme: Theme;
|
|
72
|
+
brand: Brand;
|
|
68
73
|
setTheme: (theme: Theme) => void;
|
|
74
|
+
setBrand: (brand: Brand) => void;
|
|
69
75
|
resolvedTheme: "dark" | "light";
|
|
70
76
|
}
|
|
71
77
|
/**
|
|
72
|
-
* Universal theme provider for Yuva DevLab applications (FinAI, OrchestrAI).
|
|
73
|
-
* Handles HTML class manipulation, data-theme
|
|
74
|
-
* and localStorage persistence.
|
|
78
|
+
* Universal theme & brand provider for Yuva DevLab applications (FinAI, OrchestrAI).
|
|
79
|
+
* Handles HTML class manipulation, data-theme and data-brand attributes,
|
|
80
|
+
* system preferences, and localStorage persistence.
|
|
75
81
|
*/
|
|
76
|
-
declare function ThemeProvider({ children, defaultTheme, storageKey, attribute, enableSystem, ...props }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
82
|
+
declare function ThemeProvider({ children, brand: initialBrand, defaultTheme, storageKey, brandStorageKey, attribute, brandAttribute, enableSystem, ...props }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
77
83
|
/**
|
|
78
|
-
* Hook to access current theme state and mutate the theme.
|
|
84
|
+
* Hook to access current theme & brand state and mutate the theme/brand.
|
|
79
85
|
*/
|
|
80
86
|
declare const useTheme: () => ThemeProviderState;
|
|
87
|
+
/**
|
|
88
|
+
* ConfigProvider: Brand and Theme Configuration Provider for Yuva DevLab applications.
|
|
89
|
+
*/
|
|
90
|
+
declare const ConfigProvider: typeof ThemeProvider;
|
|
91
|
+
type ConfigProviderProps = ThemeProviderProps;
|
|
92
|
+
declare const useConfig: () => ThemeProviderState;
|
|
81
93
|
|
|
82
94
|
/**
|
|
83
95
|
* Hook to determine if current viewport matches mobile breakpoint (< 768px).
|
|
@@ -762,4 +774,4 @@ interface LoadingStateProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
762
774
|
}
|
|
763
775
|
declare function LoadingState({ rows, className, ...props }: LoadingStateProps): react_jsx_runtime.JSX.Element;
|
|
764
776
|
|
|
765
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, type ConfirmDialogProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label, LoadingState, type LoadingStateProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Panel, type PanelProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchableSelect, type SearchableSelectOption, type SearchableSelectProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, 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, StatusChip, type StatusChipProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThemeProvider, type ThemeProviderProps, type ThemeProviderState, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, navigationMenuTriggerStyle, toggleVariants, useFormField, useIsMobile, useSidebar, useTheme };
|
|
777
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, type Brand, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfigProvider, type ConfigProviderProps, ConfirmDialog, type ConfirmDialogProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label, LoadingState, type LoadingStateProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Panel, type PanelProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchableSelect, type SearchableSelectOption, type SearchableSelectProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, 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, StatusChip, type StatusChipProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThemeProvider, type ThemeProviderProps, type ThemeProviderState, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, navigationMenuTriggerStyle, toggleVariants, useConfig, useFormField, useIsMobile, useSidebar, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -12,15 +12,20 @@ import { createContext, useContext, useEffect, useState } from "react";
|
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
var initialState = {
|
|
14
14
|
theme: "system",
|
|
15
|
+
brand: "finai",
|
|
15
16
|
setTheme: () => null,
|
|
17
|
+
setBrand: () => null,
|
|
16
18
|
resolvedTheme: "dark"
|
|
17
19
|
};
|
|
18
20
|
var ThemeProviderContext = createContext(initialState);
|
|
19
21
|
function ThemeProvider({
|
|
20
22
|
children,
|
|
23
|
+
brand: initialBrand = "finai",
|
|
21
24
|
defaultTheme = "system",
|
|
22
25
|
storageKey = "yd-theme",
|
|
26
|
+
brandStorageKey = "yd-brand",
|
|
23
27
|
attribute = "data-theme",
|
|
28
|
+
brandAttribute = "data-brand",
|
|
24
29
|
enableSystem = true,
|
|
25
30
|
...props
|
|
26
31
|
}) {
|
|
@@ -31,6 +36,13 @@ function ThemeProvider({
|
|
|
31
36
|
}
|
|
32
37
|
return defaultTheme;
|
|
33
38
|
});
|
|
39
|
+
const [brand, setBrandState] = useState(() => {
|
|
40
|
+
if (typeof window !== "undefined") {
|
|
41
|
+
const stored = localStorage.getItem(brandStorageKey);
|
|
42
|
+
if (stored) return stored;
|
|
43
|
+
}
|
|
44
|
+
return initialBrand;
|
|
45
|
+
});
|
|
34
46
|
const [resolvedTheme, setResolvedTheme] = useState("dark");
|
|
35
47
|
useEffect(() => {
|
|
36
48
|
const root = window.document.documentElement;
|
|
@@ -40,20 +52,33 @@ function ThemeProvider({
|
|
|
40
52
|
const systemTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
41
53
|
activeTheme = systemTheme;
|
|
42
54
|
}
|
|
43
|
-
const isDark = activeTheme.includes("dark") || activeTheme === "orchestrai";
|
|
55
|
+
const isDark = activeTheme.includes("dark") || activeTheme === "orchestrai" || brand === "orchestrai" && activeTheme !== "light";
|
|
44
56
|
const resolved = isDark ? "dark" : "light";
|
|
45
57
|
setResolvedTheme(resolved);
|
|
46
58
|
root.classList.add(resolved);
|
|
59
|
+
if (brandAttribute && brand) {
|
|
60
|
+
root.setAttribute(brandAttribute, brand);
|
|
61
|
+
}
|
|
47
62
|
if (attribute) {
|
|
48
|
-
|
|
63
|
+
const combinedTheme = theme === "system" ? `${brand}-${resolved}` : theme.startsWith(brand) ? theme : `${brand}-${theme}`;
|
|
64
|
+
root.setAttribute(attribute, combinedTheme);
|
|
49
65
|
}
|
|
50
|
-
}, [theme, enableSystem, attribute]);
|
|
66
|
+
}, [theme, brand, enableSystem, attribute, brandAttribute]);
|
|
51
67
|
const value = {
|
|
52
68
|
theme,
|
|
69
|
+
brand,
|
|
53
70
|
setTheme: (newTheme) => {
|
|
54
|
-
|
|
71
|
+
if (typeof window !== "undefined") {
|
|
72
|
+
localStorage.setItem(storageKey, newTheme);
|
|
73
|
+
}
|
|
55
74
|
setThemeState(newTheme);
|
|
56
75
|
},
|
|
76
|
+
setBrand: (newBrand) => {
|
|
77
|
+
if (typeof window !== "undefined") {
|
|
78
|
+
localStorage.setItem(brandStorageKey, newBrand);
|
|
79
|
+
}
|
|
80
|
+
setBrandState(newBrand);
|
|
81
|
+
},
|
|
57
82
|
resolvedTheme
|
|
58
83
|
};
|
|
59
84
|
return /* @__PURE__ */ jsx(ThemeProviderContext.Provider, { ...props, value, children });
|
|
@@ -65,6 +90,8 @@ var useTheme = () => {
|
|
|
65
90
|
}
|
|
66
91
|
return context;
|
|
67
92
|
};
|
|
93
|
+
var ConfigProvider = ThemeProvider;
|
|
94
|
+
var useConfig = useTheme;
|
|
68
95
|
|
|
69
96
|
// src/hooks/use-mobile.ts
|
|
70
97
|
import * as React2 from "react";
|
|
@@ -137,7 +164,7 @@ import { Slot } from "@radix-ui/react-slot";
|
|
|
137
164
|
import { cva } from "class-variance-authority";
|
|
138
165
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
139
166
|
var buttonVariants = cva(
|
|
140
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-
|
|
167
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
141
168
|
{
|
|
142
169
|
variants: {
|
|
143
170
|
variant: {
|
|
@@ -423,7 +450,10 @@ var BreadcrumbLink = React8.forwardRef(({ asChild, className, ...props }, ref) =
|
|
|
423
450
|
Comp,
|
|
424
451
|
{
|
|
425
452
|
ref,
|
|
426
|
-
className: cn(
|
|
453
|
+
className: cn(
|
|
454
|
+
"cursor-pointer transition-colors hover:text-foreground",
|
|
455
|
+
className
|
|
456
|
+
),
|
|
427
457
|
...props
|
|
428
458
|
}
|
|
429
459
|
);
|
|
@@ -1143,7 +1173,7 @@ var Checkbox = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1143
1173
|
{
|
|
1144
1174
|
ref,
|
|
1145
1175
|
className: cn(
|
|
1146
|
-
"grid place-content-center peer shrink-0 rounded-sm border border-primary shadow cursor-pointer focus-visible:outline-none focus-visible:ring-
|
|
1176
|
+
"grid place-content-center peer shrink-0 rounded-sm border border-primary shadow cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground size-4",
|
|
1147
1177
|
className
|
|
1148
1178
|
),
|
|
1149
1179
|
...props,
|
|
@@ -1203,7 +1233,7 @@ var DialogContent = React14.forwardRef(({ className, children, ...props }, ref)
|
|
|
1203
1233
|
...props,
|
|
1204
1234
|
children: [
|
|
1205
1235
|
children,
|
|
1206
|
-
/* @__PURE__ */ jsxs6(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background cursor-pointer transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-
|
|
1236
|
+
/* @__PURE__ */ jsxs6(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background cursor-pointer transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
1207
1237
|
/* @__PURE__ */ jsx14(X, { className: "size-4" }),
|
|
1208
1238
|
/* @__PURE__ */ jsx14("span", { className: "sr-only", children: "Close" })
|
|
1209
1239
|
] })
|
|
@@ -1604,7 +1634,7 @@ var DropdownMenuSubTrigger = React18.forwardRef(({ className, inset, children, .
|
|
|
1604
1634
|
{
|
|
1605
1635
|
ref,
|
|
1606
1636
|
className: cn(
|
|
1607
|
-
"flex cursor-
|
|
1637
|
+
"flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
1608
1638
|
inset && "pl-8",
|
|
1609
1639
|
className
|
|
1610
1640
|
),
|
|
@@ -1647,7 +1677,7 @@ var DropdownMenuItem = React18.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1647
1677
|
{
|
|
1648
1678
|
ref,
|
|
1649
1679
|
className: cn(
|
|
1650
|
-
"relative flex cursor-
|
|
1680
|
+
"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1651
1681
|
inset && "pl-8",
|
|
1652
1682
|
className
|
|
1653
1683
|
),
|
|
@@ -1660,7 +1690,7 @@ var DropdownMenuCheckboxItem = React18.forwardRef(({ className, children, ...pro
|
|
|
1660
1690
|
{
|
|
1661
1691
|
ref,
|
|
1662
1692
|
className: cn(
|
|
1663
|
-
"relative flex cursor-
|
|
1693
|
+
"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
1664
1694
|
className
|
|
1665
1695
|
),
|
|
1666
1696
|
...props,
|
|
@@ -1676,7 +1706,7 @@ var DropdownMenuRadioItem = React18.forwardRef(({ className, children, ...props
|
|
|
1676
1706
|
{
|
|
1677
1707
|
ref,
|
|
1678
1708
|
className: cn(
|
|
1679
|
-
"relative flex cursor-
|
|
1709
|
+
"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
1680
1710
|
className
|
|
1681
1711
|
),
|
|
1682
1712
|
...props,
|
|
@@ -1926,7 +1956,7 @@ var Input = React23.forwardRef(
|
|
|
1926
1956
|
{
|
|
1927
1957
|
type,
|
|
1928
1958
|
className: cn(
|
|
1929
|
-
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:
|
|
1959
|
+
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:font-medium file:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1930
1960
|
className
|
|
1931
1961
|
),
|
|
1932
1962
|
ref,
|
|
@@ -2474,7 +2504,7 @@ var SelectTrigger = React31.forwardRef(({ className, children, ...props }, ref)
|
|
|
2474
2504
|
{
|
|
2475
2505
|
ref,
|
|
2476
2506
|
className: cn(
|
|
2477
|
-
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background cursor-pointer data-placeholder:text-muted-foreground focus:outline-none focus:ring-
|
|
2507
|
+
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background cursor-pointer data-placeholder:text-muted-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:opacity-50 [&>span]:line-clamp-1",
|
|
2478
2508
|
className
|
|
2479
2509
|
),
|
|
2480
2510
|
...props,
|
|
@@ -2517,7 +2547,7 @@ var SelectContent = React31.forwardRef(({ className, children, position = "poppe
|
|
|
2517
2547
|
ref,
|
|
2518
2548
|
className: cn(
|
|
2519
2549
|
"relative z-50 max-h-(--radix-select-content-available-height) min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-select-content-transform-origin)",
|
|
2520
|
-
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1
|
|
2550
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1",
|
|
2521
2551
|
className
|
|
2522
2552
|
),
|
|
2523
2553
|
position,
|
|
@@ -2553,7 +2583,7 @@ var SelectItem = React31.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
2553
2583
|
{
|
|
2554
2584
|
ref,
|
|
2555
2585
|
className: cn(
|
|
2556
|
-
"relative flex w-full cursor-
|
|
2586
|
+
"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
2557
2587
|
className
|
|
2558
2588
|
),
|
|
2559
2589
|
...props,
|
|
@@ -3488,7 +3518,7 @@ var TabsTrigger = React39.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3488
3518
|
{
|
|
3489
3519
|
ref,
|
|
3490
3520
|
className: cn(
|
|
3491
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background cursor-pointer transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
3521
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background cursor-pointer transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
|
|
3492
3522
|
className
|
|
3493
3523
|
),
|
|
3494
3524
|
...props
|
|
@@ -3500,7 +3530,7 @@ var TabsContent = React39.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3500
3530
|
{
|
|
3501
3531
|
ref,
|
|
3502
3532
|
className: cn(
|
|
3503
|
-
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
3533
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
3504
3534
|
className
|
|
3505
3535
|
),
|
|
3506
3536
|
...props
|
|
@@ -3516,7 +3546,7 @@ var Textarea = React40.forwardRef(({ className, ...props }, ref) => {
|
|
|
3516
3546
|
"textarea",
|
|
3517
3547
|
{
|
|
3518
3548
|
className: cn(
|
|
3519
|
-
"flex min-h-15 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-
|
|
3549
|
+
"flex min-h-15 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
3520
3550
|
className
|
|
3521
3551
|
),
|
|
3522
3552
|
ref,
|
|
@@ -4036,6 +4066,7 @@ export {
|
|
|
4036
4066
|
CommandList,
|
|
4037
4067
|
CommandSeparator,
|
|
4038
4068
|
CommandShortcut,
|
|
4069
|
+
ConfigProvider,
|
|
4039
4070
|
ConfirmDialog,
|
|
4040
4071
|
ContextMenu,
|
|
4041
4072
|
ContextMenuCheckboxItem,
|
|
@@ -4226,6 +4257,7 @@ export {
|
|
|
4226
4257
|
navigationMenuTriggerStyle,
|
|
4227
4258
|
toast,
|
|
4228
4259
|
toggleVariants,
|
|
4260
|
+
useConfig,
|
|
4229
4261
|
useFormField,
|
|
4230
4262
|
useIsMobile,
|
|
4231
4263
|
useSidebar,
|