@codapet/design-system 0.6.0 → 0.6.2
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/dist/index.d.mts +7 -1
- package/dist/index.mjs +121 -63
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +80 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -37,6 +37,8 @@ import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
|
37
37
|
import { ToasterProps } from 'sonner';
|
|
38
38
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
39
39
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
40
|
+
import { ThemeProviderProps } from 'next-themes';
|
|
41
|
+
export { ThemeProviderProps, useTheme } from 'next-themes';
|
|
40
42
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
41
43
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
42
44
|
import { ClassValue } from 'clsx';
|
|
@@ -625,6 +627,10 @@ declare function TabsList({ className, ...props }: React$1.ComponentProps<typeof
|
|
|
625
627
|
declare function TabsTrigger({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
626
628
|
declare function TabsContent({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
627
629
|
|
|
630
|
+
declare function ThemeProvider({ children, ...props }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
631
|
+
|
|
632
|
+
declare function ThemeToggle({ className, ...props }: React$1.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
|
|
633
|
+
|
|
628
634
|
type TimeFormat = '12h' | '24h' | 'h:mm a' | 'h:mm A';
|
|
629
635
|
interface TimeValue {
|
|
630
636
|
hours: number;
|
|
@@ -691,4 +697,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
691
697
|
|
|
692
698
|
declare function useIsMobile(): boolean;
|
|
693
699
|
|
|
694
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, AutoResizeTextarea, Avatar, AvatarFallback, AvatarImage, Badge, Body, 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, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type DateFormat, DateInput, type DateInputProps, DateRangeInput, type DateRangeInputProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayHeading, 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, HeadingL, HeadingM, HeadingS, HeadingXL, HeadingXS, HeadingXXS, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label, 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, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchableSelect, SearchableSelectContent, SearchableSelectEmpty, SearchableSelectGroup, SearchableSelectItem, type SearchableSelectOption, type SearchableSelectProps, SearchableSelectTrigger, 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, SmartDialog, SmartDialogClose, SmartDialogContent, SmartDialogDescription, SmartDialogFooter, SmartDialogHeader, SmartDialogTitle, SmartDialogTrigger, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, type TimeFormat, TimeInput, type TimeInputProps, type TimeValue, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, bodyTextVariants, buttonVariants, cn, displayTextVariants, inputVariants, labelTextVariants, navigationMenuTriggerStyle, toggleVariants, useFormField, useIsMobile, useSidebar };
|
|
700
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, AutoResizeTextarea, Avatar, AvatarFallback, AvatarImage, Badge, Body, 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, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type DateFormat, DateInput, type DateInputProps, DateRangeInput, type DateRangeInputProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayHeading, 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, HeadingL, HeadingM, HeadingS, HeadingXL, HeadingXS, HeadingXXS, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label, 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, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchableSelect, SearchableSelectContent, SearchableSelectEmpty, SearchableSelectGroup, SearchableSelectItem, type SearchableSelectOption, type SearchableSelectProps, SearchableSelectTrigger, 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, SmartDialog, SmartDialogClose, SmartDialogContent, SmartDialogDescription, SmartDialogFooter, SmartDialogHeader, SmartDialogTitle, SmartDialogTrigger, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, ThemeProvider, ThemeToggle, type TimeFormat, TimeInput, type TimeInputProps, type TimeValue, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, bodyTextVariants, buttonVariants, cn, displayTextVariants, inputVariants, labelTextVariants, navigationMenuTriggerStyle, toggleVariants, useFormField, useIsMobile, useSidebar };
|
package/dist/index.mjs
CHANGED
|
@@ -153,17 +153,17 @@ var buttonVariants = cva2(
|
|
|
153
153
|
{
|
|
154
154
|
variants: {
|
|
155
155
|
variant: {
|
|
156
|
-
primary: "bg-primary text-primary-foreground hover:bg-brand-dark active:bg-
|
|
156
|
+
primary: "bg-primary text-primary-foreground hover:bg-brand-dark active:bg-active-primary",
|
|
157
157
|
secondary: "bg-brand-subtle text-brand-vibrant hover:bg-primary-surface-light border border-brand-light active:bg-icon-disabled hover:border-transparent active:border-transparent",
|
|
158
|
-
tertiary: "bg-gray-surface-light text-
|
|
159
|
-
outline: "text-
|
|
160
|
-
ghost: "text-brand-vibrant hover:bg-primary-surface-subtle
|
|
161
|
-
"ghost-secondary": "text-
|
|
162
|
-
"ghost-destructive": "bg-transparent
|
|
163
|
-
link: "text-
|
|
164
|
-
destructive: "bg-error-surface-default text-
|
|
165
|
-
"destructive-secondary": "bg-error-surface-light
|
|
166
|
-
"destructive-tertiary": "bg-transparent border border-error-stroke-light text-
|
|
158
|
+
tertiary: "bg-gray-surface-light text-foreground-secondary hover:bg-gray-surface-default border border-gray-stroke-light active:bg-gray-surface-default",
|
|
159
|
+
outline: "text-foreground-secondary border border-gray-surface-default bg-background hover:bg-gray-surface-light hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 active:bg-gray-surface-default",
|
|
160
|
+
ghost: "text-brand-vibrant hover:bg-primary-surface-subtle dark:hover:bg-accent/50 active:bg-primary-surface-light",
|
|
161
|
+
"ghost-secondary": "text-foreground-secondary hover:bg-gray-surface-light hover:text-accent-foreground dark:hover:bg-accent/50 active:bg-gray-surface-default",
|
|
162
|
+
"ghost-destructive": "bg-transparent text-destructive-text hover:bg-destructive-hover focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 active:bg-destructive-active",
|
|
163
|
+
link: "text-foreground-secondary underline-offset-4 underline hover:bg-none active:bg-none hover:text-brand-vibrant",
|
|
164
|
+
destructive: "bg-error-surface-default text-primary-foreground hover:bg-destructive-bg-deep focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 active:bg-error-surface-dark",
|
|
165
|
+
"destructive-secondary": "bg-error-surface-light border border-error-stroke-light text-destructive-text hover:border-error-surface-default focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 active:bg-destructive-active",
|
|
166
|
+
"destructive-tertiary": "bg-transparent border border-error-stroke-light text-destructive-text hover:bg-destructive-hover focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 active:bg-destructive-active"
|
|
167
167
|
},
|
|
168
168
|
size: {
|
|
169
169
|
md: "h-10 px-4 py-2 has-[>svg]:px-3 text-lg",
|
|
@@ -353,10 +353,10 @@ var textareaBaseStyles = [
|
|
|
353
353
|
// Responsive text size
|
|
354
354
|
"md:text-sm",
|
|
355
355
|
// Default state
|
|
356
|
-
"border-
|
|
356
|
+
"border-border-default bg-background",
|
|
357
357
|
// Hover/Focus/Active states
|
|
358
358
|
"hover:border-brand-normal",
|
|
359
|
-
"focus:border-
|
|
359
|
+
"focus:border-focus-ring",
|
|
360
360
|
"active:border-brand-normal",
|
|
361
361
|
// Textarea specific
|
|
362
362
|
"field-sizing-content min-h-16 resize-y px-3 py-2"
|
|
@@ -508,7 +508,7 @@ var badgeVariants = cva3(
|
|
|
508
508
|
variant: {
|
|
509
509
|
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
510
510
|
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
511
|
-
destructive: "border-transparent bg-destructive text-
|
|
511
|
+
destructive: "border-transparent bg-destructive text-primary-foreground [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
|
512
512
|
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
513
513
|
}
|
|
514
514
|
},
|
|
@@ -712,7 +712,7 @@ function Calendar({
|
|
|
712
712
|
classNames?.weekdays
|
|
713
713
|
),
|
|
714
714
|
weekday: cn(
|
|
715
|
-
"text-
|
|
715
|
+
"text-muted-foreground font-medium rounded-full md:flex-1 size-6 mx-1 font-normal text-[0.8rem] select-none",
|
|
716
716
|
classNames?.weekday
|
|
717
717
|
),
|
|
718
718
|
week: cn(
|
|
@@ -805,7 +805,7 @@ function CalendarDayButton({
|
|
|
805
805
|
"data-range-end": modifiers.range_end,
|
|
806
806
|
"data-range-middle": modifiers.range_middle,
|
|
807
807
|
className: cn(
|
|
808
|
-
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-
|
|
808
|
+
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-range-middle-bg data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none md:font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70 md:p-0 rounded-full md:text-base text-sm font-medium text-foreground data-[range-middle=true]:rounded-md",
|
|
809
809
|
className
|
|
810
810
|
),
|
|
811
811
|
...props
|
|
@@ -1898,7 +1898,7 @@ import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
|
1898
1898
|
var inputVariants = cva4(
|
|
1899
1899
|
[
|
|
1900
1900
|
// Base styles
|
|
1901
|
-
"file:text-
|
|
1901
|
+
"file:text-foreground-secondary placeholder:text-gray-subtle selection:bg-primary selection:text-primary-foreground",
|
|
1902
1902
|
"flex w-full min-w-0 rounded-md border bg-transparent text-base transition-all duration-400",
|
|
1903
1903
|
"outline-none font-sans",
|
|
1904
1904
|
// File input styles
|
|
@@ -1908,11 +1908,11 @@ var inputVariants = cva4(
|
|
|
1908
1908
|
// Responsive text size
|
|
1909
1909
|
"md:text-sm",
|
|
1910
1910
|
// Default state
|
|
1911
|
-
"border-
|
|
1911
|
+
"border-border-default bg-background",
|
|
1912
1912
|
// Hover state
|
|
1913
1913
|
"hover:border-primary-stroke-default",
|
|
1914
1914
|
// Focus state
|
|
1915
|
-
"focus:border-
|
|
1915
|
+
"focus:border-focus-ring",
|
|
1916
1916
|
"active:border-brand-normal"
|
|
1917
1917
|
],
|
|
1918
1918
|
{
|
|
@@ -1973,7 +1973,7 @@ var Input = React18.forwardRef(
|
|
|
1973
1973
|
className: cn(
|
|
1974
1974
|
"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 flex items-center justify-center",
|
|
1975
1975
|
"transition-colors stroke-[1.5px]",
|
|
1976
|
-
error ? "text-destructive peer-hover:text-destructive peer-focus:text-destructive peer-active:text-destructive" : "text-muted-foreground peer-hover:text-brand-normal peer-focus:text-
|
|
1976
|
+
error ? "text-destructive peer-hover:text-destructive peer-focus:text-destructive peer-active:text-destructive" : "text-muted-foreground peer-hover:text-brand-normal peer-focus:text-focus-ring peer-active:text-brand-normal",
|
|
1977
1977
|
leftIconClassName
|
|
1978
1978
|
),
|
|
1979
1979
|
children: React18.isValidElement(leftIcon) ? (() => {
|
|
@@ -1993,7 +1993,7 @@ var Input = React18.forwardRef(
|
|
|
1993
1993
|
className: cn(
|
|
1994
1994
|
"absolute right-3 top-1/2 -translate-y-1/2 flex items-center justify-center",
|
|
1995
1995
|
"h-6 w-6 rounded-sm transition-colors",
|
|
1996
|
-
error ? "text-destructive hover:text-destructive focus:text-destructive" : "text-muted-foreground hover:text-brand-normal focus:text-
|
|
1996
|
+
error ? "text-destructive hover:text-destructive focus:text-destructive" : "text-muted-foreground hover:text-brand-normal focus:text-focus-ring",
|
|
1997
1997
|
rightIconClassName
|
|
1998
1998
|
),
|
|
1999
1999
|
"aria-label": "Input action",
|
|
@@ -2358,7 +2358,7 @@ function DateInput({
|
|
|
2358
2358
|
placeholder: resolvedPlaceholder,
|
|
2359
2359
|
className: cn(
|
|
2360
2360
|
"bg-background cursor-pointer",
|
|
2361
|
-
"group-data-[state=open]:border-
|
|
2361
|
+
"group-data-[state=open]:border-focus-ring group-data-[state=open]:hover:border-focus-ring",
|
|
2362
2362
|
inputClassName
|
|
2363
2363
|
),
|
|
2364
2364
|
onChange: handleInputChange,
|
|
@@ -2384,7 +2384,7 @@ function DateInput({
|
|
|
2384
2384
|
popoverContentClassName
|
|
2385
2385
|
),
|
|
2386
2386
|
...popoverContentProps,
|
|
2387
|
-
children: /* @__PURE__ */ jsx22("div", { className: "border border-
|
|
2387
|
+
children: /* @__PURE__ */ jsx22("div", { className: "border border-focus-ring h-full w-full rounded-md", children: /* @__PURE__ */ jsx22(Calendar, { ...resolvedCalendarProps }) })
|
|
2388
2388
|
}
|
|
2389
2389
|
)
|
|
2390
2390
|
] }) });
|
|
@@ -2581,7 +2581,7 @@ function DateRangeInput({
|
|
|
2581
2581
|
className: cn(
|
|
2582
2582
|
inputVariants({ size }),
|
|
2583
2583
|
"bg-background cursor-pointer w-full text-left flex items-center justify-between gap-2 font-normal",
|
|
2584
|
-
"data-[state=open]:border-
|
|
2584
|
+
"data-[state=open]:border-focus-ring data-[state=open]:hover:border-focus-ring",
|
|
2585
2585
|
isInputDisabled && "pointer-events-none cursor-not-allowed opacity-50",
|
|
2586
2586
|
inputClassName
|
|
2587
2587
|
),
|
|
@@ -2600,7 +2600,7 @@ function DateRangeInput({
|
|
|
2600
2600
|
popoverContentClassName
|
|
2601
2601
|
),
|
|
2602
2602
|
...popoverContentProps,
|
|
2603
|
-
children: /* @__PURE__ */ jsxs11("div", { className: "border border-
|
|
2603
|
+
children: /* @__PURE__ */ jsxs11("div", { className: "border border-focus-ring h-full w-full rounded-md flex flex-col overflow-y-auto justify-between", children: [
|
|
2604
2604
|
/* @__PURE__ */ jsx23(Calendar, { ...resolvedCalendarProps }),
|
|
2605
2605
|
/* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-2 px-2 pb-1 shrink-0", children: [
|
|
2606
2606
|
/* @__PURE__ */ jsx23(
|
|
@@ -5586,7 +5586,7 @@ function TabsTrigger({
|
|
|
5586
5586
|
{
|
|
5587
5587
|
"data-slot": "tabs-trigger",
|
|
5588
5588
|
className: cn(
|
|
5589
|
-
"cursor-pointer data-[state=active]:border-b-2 data-[state=active]:border-brand-normal border-0 border-t-0 rounded-none data-[state=active]:text-
|
|
5589
|
+
"cursor-pointer data-[state=active]:border-b-2 data-[state=active]:border-brand-normal border-0 border-t-0 rounded-none data-[state=active]:text-foreground data-[state=active]:font-semibold data-[state=active]:bg-background dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex h-[calc(100%-1px)] shrink-0 items-center justify-center gap-1.5 px-2 py-[6px] font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 text-muted-foreground font-sans border-b-1 border-b-gray-stroke-light text-sm",
|
|
5590
5590
|
className
|
|
5591
5591
|
),
|
|
5592
5592
|
...props
|
|
@@ -5607,11 +5607,63 @@ function TabsContent({
|
|
|
5607
5607
|
);
|
|
5608
5608
|
}
|
|
5609
5609
|
|
|
5610
|
+
// src/components/ui/theme-provider.tsx
|
|
5611
|
+
import {
|
|
5612
|
+
ThemeProvider as NextThemesProvider
|
|
5613
|
+
} from "next-themes";
|
|
5614
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
5615
|
+
function ThemeProvider({ children, ...props }) {
|
|
5616
|
+
return /* @__PURE__ */ jsx50(
|
|
5617
|
+
NextThemesProvider,
|
|
5618
|
+
{
|
|
5619
|
+
attribute: "class",
|
|
5620
|
+
defaultTheme: "light",
|
|
5621
|
+
enableSystem: true,
|
|
5622
|
+
disableTransitionOnChange: true,
|
|
5623
|
+
...props,
|
|
5624
|
+
children
|
|
5625
|
+
}
|
|
5626
|
+
);
|
|
5627
|
+
}
|
|
5628
|
+
|
|
5629
|
+
// src/components/ui/theme-toggle.tsx
|
|
5630
|
+
import { Monitor, Moon, Sun } from "lucide-react";
|
|
5631
|
+
import { useTheme as useTheme2 } from "next-themes";
|
|
5632
|
+
import "react";
|
|
5633
|
+
import { jsx as jsx51, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5634
|
+
function ThemeToggle({
|
|
5635
|
+
className,
|
|
5636
|
+
...props
|
|
5637
|
+
}) {
|
|
5638
|
+
const { setTheme } = useTheme2();
|
|
5639
|
+
return /* @__PURE__ */ jsxs25(DropdownMenu, { children: [
|
|
5640
|
+
/* @__PURE__ */ jsx51(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs25(Button, { variant: "outline", size: "icon", className, ...props, children: [
|
|
5641
|
+
/* @__PURE__ */ jsx51(Sun, { className: "size-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
|
|
5642
|
+
/* @__PURE__ */ jsx51(Moon, { className: "absolute size-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" }),
|
|
5643
|
+
/* @__PURE__ */ jsx51("span", { className: "sr-only", children: "Toggle theme" })
|
|
5644
|
+
] }) }),
|
|
5645
|
+
/* @__PURE__ */ jsxs25(DropdownMenuContent, { align: "end", children: [
|
|
5646
|
+
/* @__PURE__ */ jsxs25(DropdownMenuItem, { onClick: () => setTheme("light"), children: [
|
|
5647
|
+
/* @__PURE__ */ jsx51(Sun, { className: "size-4" }),
|
|
5648
|
+
"Light"
|
|
5649
|
+
] }),
|
|
5650
|
+
/* @__PURE__ */ jsxs25(DropdownMenuItem, { onClick: () => setTheme("dark"), children: [
|
|
5651
|
+
/* @__PURE__ */ jsx51(Moon, { className: "size-4" }),
|
|
5652
|
+
"Dark"
|
|
5653
|
+
] }),
|
|
5654
|
+
/* @__PURE__ */ jsxs25(DropdownMenuItem, { onClick: () => setTheme("system"), children: [
|
|
5655
|
+
/* @__PURE__ */ jsx51(Monitor, { className: "size-4" }),
|
|
5656
|
+
"System"
|
|
5657
|
+
] })
|
|
5658
|
+
] })
|
|
5659
|
+
] });
|
|
5660
|
+
}
|
|
5661
|
+
|
|
5610
5662
|
// src/components/ui/time-input.tsx
|
|
5611
5663
|
import "class-variance-authority";
|
|
5612
5664
|
import { Clock } from "lucide-react";
|
|
5613
|
-
import * as
|
|
5614
|
-
import { jsx as
|
|
5665
|
+
import * as React48 from "react";
|
|
5666
|
+
import { jsx as jsx52, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5615
5667
|
var TIME_FORMAT_PLACEHOLDER = {
|
|
5616
5668
|
"12h": "hh:mm AM/PM",
|
|
5617
5669
|
"24h": "HH:mm",
|
|
@@ -5664,16 +5716,16 @@ function TimeInput({
|
|
|
5664
5716
|
formatDisplay
|
|
5665
5717
|
}) {
|
|
5666
5718
|
const resolvedPlaceholder = placeholder ?? TIME_FORMAT_PLACEHOLDER[timeFormat];
|
|
5667
|
-
const displayValue =
|
|
5719
|
+
const displayValue = React48.useMemo(() => {
|
|
5668
5720
|
if (!time) return "";
|
|
5669
5721
|
if (formatDisplay) return formatDisplay(time);
|
|
5670
5722
|
return formatTime(time, timeFormat);
|
|
5671
5723
|
}, [time, formatDisplay, timeFormat]);
|
|
5672
|
-
const [open, setOpen] =
|
|
5673
|
-
const hoursRef =
|
|
5674
|
-
const minutesRef =
|
|
5675
|
-
const periodRef =
|
|
5676
|
-
const scrollToSelected =
|
|
5724
|
+
const [open, setOpen] = React48.useState(false);
|
|
5725
|
+
const hoursRef = React48.useRef(null);
|
|
5726
|
+
const minutesRef = React48.useRef(null);
|
|
5727
|
+
const periodRef = React48.useRef(null);
|
|
5728
|
+
const scrollToSelected = React48.useCallback(() => {
|
|
5677
5729
|
requestAnimationFrame(() => {
|
|
5678
5730
|
for (const ref of [hoursRef, minutesRef, periodRef]) {
|
|
5679
5731
|
const container = ref.current;
|
|
@@ -5685,7 +5737,7 @@ function TimeInput({
|
|
|
5685
5737
|
}
|
|
5686
5738
|
});
|
|
5687
5739
|
}, []);
|
|
5688
|
-
|
|
5740
|
+
React48.useEffect(() => {
|
|
5689
5741
|
if (open) {
|
|
5690
5742
|
scrollToSelected();
|
|
5691
5743
|
}
|
|
@@ -5721,8 +5773,8 @@ function TimeInput({
|
|
|
5721
5773
|
const selectedH12 = time ? getDisplayHour(time.hours, timeFormat) : null;
|
|
5722
5774
|
const selectedMinute = time?.minutes ?? null;
|
|
5723
5775
|
const selectedPeriod = time ? getPeriod(time.hours) : null;
|
|
5724
|
-
return /* @__PURE__ */
|
|
5725
|
-
/* @__PURE__ */
|
|
5776
|
+
return /* @__PURE__ */ jsx52("div", { className: cn("relative flex gap-2", className), children: /* @__PURE__ */ jsxs26(Popover, { open, onOpenChange: setOpen, children: [
|
|
5777
|
+
/* @__PURE__ */ jsx52(PopoverTrigger, { asChild: true, disabled: inputDisabled, children: /* @__PURE__ */ jsxs26(
|
|
5726
5778
|
Button,
|
|
5727
5779
|
{
|
|
5728
5780
|
type: "button",
|
|
@@ -5730,25 +5782,25 @@ function TimeInput({
|
|
|
5730
5782
|
className: cn(
|
|
5731
5783
|
inputVariants({ size }),
|
|
5732
5784
|
"bg-background cursor-pointer w-full text-left flex items-center justify-between gap-2 font-normal",
|
|
5733
|
-
"data-[state=open]:border-
|
|
5785
|
+
"data-[state=open]:border-focus-ring data-[state=open]:hover:border-focus-ring",
|
|
5734
5786
|
inputDisabled && "pointer-events-none cursor-not-allowed opacity-50",
|
|
5735
5787
|
inputClassName
|
|
5736
5788
|
),
|
|
5737
5789
|
disabled: inputDisabled,
|
|
5738
5790
|
children: [
|
|
5739
5791
|
displayValue || resolvedPlaceholder,
|
|
5740
|
-
icon !== void 0 ? icon : /* @__PURE__ */
|
|
5792
|
+
icon !== void 0 ? icon : /* @__PURE__ */ jsx52(Clock, { className: "h-4 w-4 text-muted-foreground shrink-0" })
|
|
5741
5793
|
]
|
|
5742
5794
|
}
|
|
5743
5795
|
) }),
|
|
5744
|
-
/* @__PURE__ */
|
|
5796
|
+
/* @__PURE__ */ jsx52(
|
|
5745
5797
|
PopoverContent,
|
|
5746
5798
|
{
|
|
5747
5799
|
className: cn("w-auto p-0", popoverContentClassName),
|
|
5748
5800
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
5749
5801
|
...popoverContentProps,
|
|
5750
|
-
children: /* @__PURE__ */
|
|
5751
|
-
/* @__PURE__ */
|
|
5802
|
+
children: /* @__PURE__ */ jsxs26("div", { className: "flex divide-x border border-focus-ring rounded-md", children: [
|
|
5803
|
+
/* @__PURE__ */ jsx52("div", { className: "h-56 w-16 overflow-y-auto overscroll-y-contain [-webkit-overflow-scrolling:touch]", children: /* @__PURE__ */ jsx52("div", { ref: hoursRef, className: "flex flex-col p-1 ", children: hoursList.map((h) => /* @__PURE__ */ jsx52(
|
|
5752
5804
|
Button,
|
|
5753
5805
|
{
|
|
5754
5806
|
variant: "ghost",
|
|
@@ -5763,7 +5815,7 @@ function TimeInput({
|
|
|
5763
5815
|
},
|
|
5764
5816
|
h
|
|
5765
5817
|
)) }) }),
|
|
5766
|
-
/* @__PURE__ */
|
|
5818
|
+
/* @__PURE__ */ jsx52("div", { className: "h-56 w-16 overflow-y-auto overscroll-y-contain [-webkit-overflow-scrolling:touch]", children: /* @__PURE__ */ jsx52(
|
|
5767
5819
|
"div",
|
|
5768
5820
|
{
|
|
5769
5821
|
ref: minutesRef,
|
|
@@ -5771,7 +5823,7 @@ function TimeInput({
|
|
|
5771
5823
|
"flex flex-col p-1",
|
|
5772
5824
|
minutesList.length <= 12 && "h-full justify-center"
|
|
5773
5825
|
),
|
|
5774
|
-
children: minutesList.map((m) => /* @__PURE__ */
|
|
5826
|
+
children: minutesList.map((m) => /* @__PURE__ */ jsx52(
|
|
5775
5827
|
Button,
|
|
5776
5828
|
{
|
|
5777
5829
|
variant: "ghost",
|
|
@@ -5788,7 +5840,7 @@ function TimeInput({
|
|
|
5788
5840
|
))
|
|
5789
5841
|
}
|
|
5790
5842
|
) }),
|
|
5791
|
-
!is24HourFormat(timeFormat) && /* @__PURE__ */
|
|
5843
|
+
!is24HourFormat(timeFormat) && /* @__PURE__ */ jsx52("div", { className: "flex flex-col p-1 justify-center gap-1", children: ["AM", "PM"].map((p) => /* @__PURE__ */ jsx52(
|
|
5792
5844
|
Button,
|
|
5793
5845
|
{
|
|
5794
5846
|
variant: "ghost",
|
|
@@ -5813,7 +5865,7 @@ function TimeInput({
|
|
|
5813
5865
|
import "react";
|
|
5814
5866
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
5815
5867
|
import { cva as cva8 } from "class-variance-authority";
|
|
5816
|
-
import { jsx as
|
|
5868
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
5817
5869
|
var toggleVariants = cva8(
|
|
5818
5870
|
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_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-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
|
|
5819
5871
|
{
|
|
@@ -5840,7 +5892,7 @@ function Toggle({
|
|
|
5840
5892
|
size,
|
|
5841
5893
|
...props
|
|
5842
5894
|
}) {
|
|
5843
|
-
return /* @__PURE__ */
|
|
5895
|
+
return /* @__PURE__ */ jsx53(
|
|
5844
5896
|
TogglePrimitive.Root,
|
|
5845
5897
|
{
|
|
5846
5898
|
"data-slot": "toggle",
|
|
@@ -5851,11 +5903,11 @@ function Toggle({
|
|
|
5851
5903
|
}
|
|
5852
5904
|
|
|
5853
5905
|
// src/components/ui/toggle-group.tsx
|
|
5854
|
-
import * as
|
|
5906
|
+
import * as React50 from "react";
|
|
5855
5907
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
5856
5908
|
import "class-variance-authority";
|
|
5857
|
-
import { jsx as
|
|
5858
|
-
var ToggleGroupContext =
|
|
5909
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
5910
|
+
var ToggleGroupContext = React50.createContext({
|
|
5859
5911
|
size: "default",
|
|
5860
5912
|
variant: "default"
|
|
5861
5913
|
});
|
|
@@ -5866,7 +5918,7 @@ function ToggleGroup({
|
|
|
5866
5918
|
children,
|
|
5867
5919
|
...props
|
|
5868
5920
|
}) {
|
|
5869
|
-
return /* @__PURE__ */
|
|
5921
|
+
return /* @__PURE__ */ jsx54(
|
|
5870
5922
|
ToggleGroupPrimitive.Root,
|
|
5871
5923
|
{
|
|
5872
5924
|
"data-slot": "toggle-group",
|
|
@@ -5877,7 +5929,7 @@ function ToggleGroup({
|
|
|
5877
5929
|
className
|
|
5878
5930
|
),
|
|
5879
5931
|
...props,
|
|
5880
|
-
children: /* @__PURE__ */
|
|
5932
|
+
children: /* @__PURE__ */ jsx54(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
5881
5933
|
}
|
|
5882
5934
|
);
|
|
5883
5935
|
}
|
|
@@ -5888,8 +5940,8 @@ function ToggleGroupItem({
|
|
|
5888
5940
|
size,
|
|
5889
5941
|
...props
|
|
5890
5942
|
}) {
|
|
5891
|
-
const context =
|
|
5892
|
-
return /* @__PURE__ */
|
|
5943
|
+
const context = React50.useContext(ToggleGroupContext);
|
|
5944
|
+
return /* @__PURE__ */ jsx54(
|
|
5893
5945
|
ToggleGroupPrimitive.Item,
|
|
5894
5946
|
{
|
|
5895
5947
|
"data-slot": "toggle-group-item",
|
|
@@ -5913,7 +5965,7 @@ function ToggleGroupItem({
|
|
|
5913
5965
|
import { Slot as Slot7 } from "@radix-ui/react-slot";
|
|
5914
5966
|
import { cva as cva9 } from "class-variance-authority";
|
|
5915
5967
|
import "react";
|
|
5916
|
-
import { jsx as
|
|
5968
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
5917
5969
|
var displayTextVariants = cva9(
|
|
5918
5970
|
"tracking-normal font-normal leading-none text-brand-dark font-serif italic",
|
|
5919
5971
|
{
|
|
@@ -5936,7 +5988,7 @@ function DisplayHeading({
|
|
|
5936
5988
|
...props
|
|
5937
5989
|
}) {
|
|
5938
5990
|
const Comp = asChild ? Slot7 : "h1";
|
|
5939
|
-
return /* @__PURE__ */
|
|
5991
|
+
return /* @__PURE__ */ jsx55(
|
|
5940
5992
|
Comp,
|
|
5941
5993
|
{
|
|
5942
5994
|
"data-slot": "h1",
|
|
@@ -5965,7 +6017,7 @@ function Body({
|
|
|
5965
6017
|
...props
|
|
5966
6018
|
}) {
|
|
5967
6019
|
const Comp = asChild ? Slot7 : "p";
|
|
5968
|
-
return /* @__PURE__ */
|
|
6020
|
+
return /* @__PURE__ */ jsx55(
|
|
5969
6021
|
Comp,
|
|
5970
6022
|
{
|
|
5971
6023
|
"data-slot": "h1",
|
|
@@ -5980,7 +6032,7 @@ function HeadingXL({
|
|
|
5980
6032
|
...props
|
|
5981
6033
|
}) {
|
|
5982
6034
|
const Comp = asChild ? Slot7 : "h1";
|
|
5983
|
-
return /* @__PURE__ */
|
|
6035
|
+
return /* @__PURE__ */ jsx55(
|
|
5984
6036
|
Comp,
|
|
5985
6037
|
{
|
|
5986
6038
|
"data-slot": "h1",
|
|
@@ -5998,7 +6050,7 @@ function HeadingL({
|
|
|
5998
6050
|
...props
|
|
5999
6051
|
}) {
|
|
6000
6052
|
const Comp = asChild ? Slot7 : "h2";
|
|
6001
|
-
return /* @__PURE__ */
|
|
6053
|
+
return /* @__PURE__ */ jsx55(
|
|
6002
6054
|
Comp,
|
|
6003
6055
|
{
|
|
6004
6056
|
"data-slot": "h2",
|
|
@@ -6016,7 +6068,7 @@ function HeadingM({
|
|
|
6016
6068
|
...props
|
|
6017
6069
|
}) {
|
|
6018
6070
|
const Comp = asChild ? Slot7 : "h3";
|
|
6019
|
-
return /* @__PURE__ */
|
|
6071
|
+
return /* @__PURE__ */ jsx55(
|
|
6020
6072
|
Comp,
|
|
6021
6073
|
{
|
|
6022
6074
|
"data-slot": "h3",
|
|
@@ -6034,7 +6086,7 @@ function HeadingS({
|
|
|
6034
6086
|
...props
|
|
6035
6087
|
}) {
|
|
6036
6088
|
const Comp = asChild ? Slot7 : "h4";
|
|
6037
|
-
return /* @__PURE__ */
|
|
6089
|
+
return /* @__PURE__ */ jsx55(
|
|
6038
6090
|
Comp,
|
|
6039
6091
|
{
|
|
6040
6092
|
"data-slot": "h4",
|
|
@@ -6052,7 +6104,7 @@ function HeadingXS({
|
|
|
6052
6104
|
...props
|
|
6053
6105
|
}) {
|
|
6054
6106
|
const Comp = asChild ? Slot7 : "h5";
|
|
6055
|
-
return /* @__PURE__ */
|
|
6107
|
+
return /* @__PURE__ */ jsx55(
|
|
6056
6108
|
Comp,
|
|
6057
6109
|
{
|
|
6058
6110
|
"data-slot": "h5",
|
|
@@ -6070,7 +6122,7 @@ function HeadingXXS({
|
|
|
6070
6122
|
...props
|
|
6071
6123
|
}) {
|
|
6072
6124
|
const Comp = asChild ? Slot7 : "h6";
|
|
6073
|
-
return /* @__PURE__ */
|
|
6125
|
+
return /* @__PURE__ */ jsx55(
|
|
6074
6126
|
Comp,
|
|
6075
6127
|
{
|
|
6076
6128
|
"data-slot": "h5",
|
|
@@ -6082,6 +6134,9 @@ function HeadingXXS({
|
|
|
6082
6134
|
}
|
|
6083
6135
|
);
|
|
6084
6136
|
}
|
|
6137
|
+
|
|
6138
|
+
// src/hooks/use-theme.ts
|
|
6139
|
+
import { useTheme as useTheme3 } from "next-themes";
|
|
6085
6140
|
export {
|
|
6086
6141
|
Accordion,
|
|
6087
6142
|
AccordionContent,
|
|
@@ -6339,6 +6394,8 @@ export {
|
|
|
6339
6394
|
TabsList,
|
|
6340
6395
|
TabsTrigger,
|
|
6341
6396
|
Textarea,
|
|
6397
|
+
ThemeProvider,
|
|
6398
|
+
ThemeToggle,
|
|
6342
6399
|
TimeInput,
|
|
6343
6400
|
Toaster,
|
|
6344
6401
|
Toggle,
|
|
@@ -6359,6 +6416,7 @@ export {
|
|
|
6359
6416
|
toggleVariants,
|
|
6360
6417
|
useFormField,
|
|
6361
6418
|
useIsMobile,
|
|
6362
|
-
useSidebar
|
|
6419
|
+
useSidebar,
|
|
6420
|
+
useTheme3 as useTheme
|
|
6363
6421
|
};
|
|
6364
6422
|
//# sourceMappingURL=index.mjs.map
|