@codapet/design-system 0.2.6 → 0.2.8

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 CHANGED
@@ -501,8 +501,39 @@ declare function Toggle({ className, variant, size, ...props }: React$1.Componen
501
501
  declare function ToggleGroup({ className, variant, size, children, ...props }: React$1.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
502
502
  declare function ToggleGroupItem({ className, children, variant, size, ...props }: React$1.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
503
503
 
504
+ declare const displayTextVariants: (props?: ({
505
+ size?: "md" | "sm" | "lg" | null | undefined;
506
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
507
+ declare function DisplayHeading({ className, size, asChild, ...props }: React$1.ComponentProps<'h1'> & VariantProps<typeof displayTextVariants> & {
508
+ asChild?: boolean;
509
+ }): react_jsx_runtime.JSX.Element;
510
+ declare const bodyTextVariants: (props?: ({
511
+ size?: "md" | "sm" | "lg" | "xs" | null | undefined;
512
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
513
+ declare function Body({ className, size, asChild, ...props }: React$1.ComponentProps<'h1'> & VariantProps<typeof bodyTextVariants> & {
514
+ asChild?: boolean;
515
+ }): react_jsx_runtime.JSX.Element;
516
+ declare function HeadingXL({ className, asChild, ...props }: React$1.ComponentProps<'h1'> & {
517
+ asChild?: boolean;
518
+ }): react_jsx_runtime.JSX.Element;
519
+ declare function HeadingL({ className, asChild, ...props }: React$1.ComponentProps<'h2'> & {
520
+ asChild?: boolean;
521
+ }): react_jsx_runtime.JSX.Element;
522
+ declare function HeadingM({ className, asChild, ...props }: React$1.ComponentProps<'h3'> & {
523
+ asChild?: boolean;
524
+ }): react_jsx_runtime.JSX.Element;
525
+ declare function HeadingS({ className, asChild, ...props }: React$1.ComponentProps<'h4'> & {
526
+ asChild?: boolean;
527
+ }): react_jsx_runtime.JSX.Element;
528
+ declare function HeadingXS({ className, asChild, ...props }: React$1.ComponentProps<'h5'> & {
529
+ asChild?: boolean;
530
+ }): react_jsx_runtime.JSX.Element;
531
+ declare function HeadingXXS({ className, asChild, ...props }: React$1.ComponentProps<'h6'> & {
532
+ asChild?: boolean;
533
+ }): react_jsx_runtime.JSX.Element;
534
+
504
535
  declare function cn(...inputs: ClassValue[]): string;
505
536
 
506
537
  declare function useIsMobile(): boolean;
507
538
 
508
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, 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, 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, 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, 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, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, inputVariants, labelTextVariants, navigationMenuTriggerStyle, toggleVariants, useFormField, useIsMobile, useSidebar };
539
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, 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, 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, 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, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, 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
@@ -147,14 +147,14 @@ var buttonVariants = cva2(
147
147
  variants: {
148
148
  variant: {
149
149
  primary: "bg-primary text-primary-foreground hover:bg-brand-dark active:bg-slate-800 ",
150
- secondary: "bg-brand-subtle text-brand-vibrant hover:bg-brand-light border border-brand-light active:bg-icon-disabled",
151
- tertiary: "bg-zinc-100 text-zinc-700 hover:bg-zinc-300 hover:border-zinc-300 border border-zinc-200 active:bg-zinc-400",
152
- outline: "text-zinc-800 border bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 active:bg-surface-default",
153
- ghost: "text-zinc-800 hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 active:bg-surface-default",
154
- link: "text-primary underline-offset-4 hover:underline active:bg-surface-light",
155
- destructive: "bg-red-400 text-white hover:bg-red-800 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 active:bg-red-surface-dark",
156
- "destructive-secondary": "bg-red-50 border border-red-200 text-red-400 hover:border-red-400 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 active:bg-red-100",
157
- "destructive-tertiary": "bg-transparent border border-red-200 text-red-400 hover:border-red-200 hover:bg-red-50 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 active:bg-red-100"
150
+ 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",
151
+ tertiary: "bg-gray-surface-light text-zinc-700 hover:bg-gray-surface-default border border-gray-stroke-light active:bg-zinc-400",
152
+ outline: "text-zinc-800 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",
153
+ ghost: "text-zinc-800 hover:bg-gray-surface-light hover:text-accent-foreground dark:hover:bg-accent/50 active:bg-gray-surface-default",
154
+ link: "text-primary underline-offset-4 hover:underline hover:bg-primary-surface-subtle active:bg-primary-surface-light",
155
+ destructive: "bg-error-surface-default text-white hover:bg-red-800 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 active:bg-error-surface-dark",
156
+ "destructive-secondary": "bg-error-surface-light border border-error-stroke-light text-red-400 hover:border-error-surface-default focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 active:bg-red-100",
157
+ "destructive-tertiary": "bg-transparent border border-error-stroke-light text-red-400 hover:bg-red-50 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 active:bg-red-100"
158
158
  },
159
159
  size: {
160
160
  md: "h-10 px-4 py-2 has-[>svg]:px-3 text-lg",
@@ -4606,6 +4606,180 @@ function ToggleGroupItem({
4606
4606
  }
4607
4607
  );
4608
4608
  }
4609
+
4610
+ // src/components/ui/typography.tsx
4611
+ import { Slot as Slot7 } from "@radix-ui/react-slot";
4612
+ import { cva as cva9 } from "class-variance-authority";
4613
+ import "react";
4614
+ import { jsx as jsx47 } from "react/jsx-runtime";
4615
+ var displayTextVariants = cva9(
4616
+ "tracking-normal font-normal leading-none text-brand-dark font-serif italic",
4617
+ {
4618
+ variants: {
4619
+ size: {
4620
+ md: "text-[1.75rem] md:text-4xl leading-[2.75rem] md:leading-[4rem]",
4621
+ sm: "text-lg md:text-xl leading-[2.5rem] md:leading-[3rem]",
4622
+ lg: "text-4xl md:text-[3.25rem] leading-[4rem] md:leading-[5rem]"
4623
+ }
4624
+ },
4625
+ defaultVariants: {
4626
+ size: "md"
4627
+ }
4628
+ }
4629
+ );
4630
+ function DisplayHeading({
4631
+ className,
4632
+ size,
4633
+ asChild = false,
4634
+ ...props
4635
+ }) {
4636
+ const Comp = asChild ? Slot7 : "h1";
4637
+ return /* @__PURE__ */ jsx47(
4638
+ Comp,
4639
+ {
4640
+ "data-slot": "h1",
4641
+ className: cn(displayTextVariants({ size, className })),
4642
+ ...props
4643
+ }
4644
+ );
4645
+ }
4646
+ var bodyTextVariants = cva9("font-sans ", {
4647
+ variants: {
4648
+ size: {
4649
+ lg: "text-lg md:text-xl leading-[1.625rem] md:leading-[1.75rem]",
4650
+ md: "text-base leading-[1.5rem] ",
4651
+ sm: "text-sm leading-[1.25rem] ",
4652
+ xs: "text-xs leading-[1rem]"
4653
+ }
4654
+ },
4655
+ defaultVariants: {
4656
+ size: "md"
4657
+ }
4658
+ });
4659
+ function Body({
4660
+ className,
4661
+ size,
4662
+ asChild = false,
4663
+ ...props
4664
+ }) {
4665
+ const Comp = asChild ? Slot7 : "p";
4666
+ return /* @__PURE__ */ jsx47(
4667
+ Comp,
4668
+ {
4669
+ "data-slot": "h1",
4670
+ className: cn(bodyTextVariants({ size, className })),
4671
+ ...props
4672
+ }
4673
+ );
4674
+ }
4675
+ function HeadingXL({
4676
+ className,
4677
+ asChild = false,
4678
+ ...props
4679
+ }) {
4680
+ const Comp = asChild ? Slot7 : "h1";
4681
+ return /* @__PURE__ */ jsx47(
4682
+ Comp,
4683
+ {
4684
+ "data-slot": "h1",
4685
+ className: cn(
4686
+ "text-2xl md:text-[2rem] md:leading-[2.5rem] leading-[2rem] font-semibold font-sans",
4687
+ className
4688
+ ),
4689
+ ...props
4690
+ }
4691
+ );
4692
+ }
4693
+ function HeadingL({
4694
+ className,
4695
+ asChild = false,
4696
+ ...props
4697
+ }) {
4698
+ const Comp = asChild ? Slot7 : "h2";
4699
+ return /* @__PURE__ */ jsx47(
4700
+ Comp,
4701
+ {
4702
+ "data-slot": "h2",
4703
+ className: cn(
4704
+ "md:text-[1.5rem] text-[1.25rem] md:leading-[2rem] leading-[1.75rem] font-semibold font-sans",
4705
+ className
4706
+ ),
4707
+ ...props
4708
+ }
4709
+ );
4710
+ }
4711
+ function HeadingM({
4712
+ className,
4713
+ asChild = false,
4714
+ ...props
4715
+ }) {
4716
+ const Comp = asChild ? Slot7 : "h3";
4717
+ return /* @__PURE__ */ jsx47(
4718
+ Comp,
4719
+ {
4720
+ "data-slot": "h3",
4721
+ className: cn(
4722
+ "text-[1.125rem] md:text-xl md:leading-[1.75rem] leading-[1.625rem] font-semibold font-sans",
4723
+ className
4724
+ ),
4725
+ ...props
4726
+ }
4727
+ );
4728
+ }
4729
+ function HeadingS({
4730
+ className,
4731
+ asChild = false,
4732
+ ...props
4733
+ }) {
4734
+ const Comp = asChild ? Slot7 : "h4";
4735
+ return /* @__PURE__ */ jsx47(
4736
+ Comp,
4737
+ {
4738
+ "data-slot": "h4",
4739
+ className: cn(
4740
+ "text-base leading-[1.5rem] font-semibold font-sans",
4741
+ className
4742
+ ),
4743
+ ...props
4744
+ }
4745
+ );
4746
+ }
4747
+ function HeadingXS({
4748
+ className,
4749
+ asChild = false,
4750
+ ...props
4751
+ }) {
4752
+ const Comp = asChild ? Slot7 : "h5";
4753
+ return /* @__PURE__ */ jsx47(
4754
+ Comp,
4755
+ {
4756
+ "data-slot": "h5",
4757
+ className: cn(
4758
+ "text-sm leading-[1.25rem] font-semibold font-sans",
4759
+ className
4760
+ ),
4761
+ ...props
4762
+ }
4763
+ );
4764
+ }
4765
+ function HeadingXXS({
4766
+ className,
4767
+ asChild = false,
4768
+ ...props
4769
+ }) {
4770
+ const Comp = asChild ? Slot7 : "h6";
4771
+ return /* @__PURE__ */ jsx47(
4772
+ Comp,
4773
+ {
4774
+ "data-slot": "h5",
4775
+ className: cn(
4776
+ "text-xs leading-[1rem] font-semibold font-sans",
4777
+ className
4778
+ ),
4779
+ ...props
4780
+ }
4781
+ );
4782
+ }
4609
4783
  export {
4610
4784
  Accordion,
4611
4785
  AccordionContent,
@@ -4630,6 +4804,7 @@ export {
4630
4804
  AvatarFallback,
4631
4805
  AvatarImage,
4632
4806
  Badge,
4807
+ Body,
4633
4808
  Breadcrumb,
4634
4809
  BreadcrumbEllipsis,
4635
4810
  BreadcrumbItem,
@@ -4696,6 +4871,7 @@ export {
4696
4871
  DialogPortal,
4697
4872
  DialogTitle,
4698
4873
  DialogTrigger,
4874
+ DisplayHeading,
4699
4875
  Drawer,
4700
4876
  DrawerClose,
4701
4877
  DrawerContent,
@@ -4728,6 +4904,12 @@ export {
4728
4904
  FormItem,
4729
4905
  FormLabel,
4730
4906
  FormMessage,
4907
+ HeadingL,
4908
+ HeadingM,
4909
+ HeadingS,
4910
+ HeadingXL,
4911
+ HeadingXS,
4912
+ HeadingXXS,
4731
4913
  HoverCard,
4732
4914
  HoverCardContent,
4733
4915
  HoverCardTrigger,
@@ -4847,8 +5029,10 @@ export {
4847
5029
  TooltipProvider,
4848
5030
  TooltipTrigger,
4849
5031
  badgeVariants,
5032
+ bodyTextVariants,
4850
5033
  buttonVariants,
4851
5034
  cn,
5035
+ displayTextVariants,
4852
5036
  inputVariants,
4853
5037
  labelTextVariants,
4854
5038
  navigationMenuTriggerStyle,