@tydavidson/design-system 1.1.18 → 1.1.20

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
@@ -2,8 +2,6 @@ import * as class_variance_authority_dist_types from 'class-variance-authority/d
2
2
  import * as React from 'react';
3
3
  import React__default from 'react';
4
4
  import { VariantProps } from 'class-variance-authority';
5
- import { ThemeColor } from './themes/index.mjs';
6
- export { ClientThemeProvider, ClientThemeToggle, ComponentVariant, ThemeProvider, ThemeProviderNoSSR, getColorVariantClasses, isDarkTheme, mapColorToShadcnVariant, mapVariantToShadcnVariant, useThemeServer } from './themes/index.mjs';
7
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
6
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
9
7
  import * as TogglePrimitive from '@radix-ui/react-toggle';
@@ -16,8 +14,51 @@ import { DialogProps } from '@radix-ui/react-dialog';
16
14
  import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
17
15
  import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
18
16
  import { ClassValue } from 'clsx';
17
+ export { ClientThemeProvider, ClientThemeToggle, ThemeProvider, ThemeProviderNoSSR, useThemeServer } from './themes/index.mjs';
19
18
  import 'next-themes/dist/types';
20
19
 
20
+ /**
21
+ * Utility functions for theme handling
22
+ */
23
+ /**
24
+ * Supported color theme values
25
+ */
26
+ type ThemeColor = 'brand' | 'error' | 'warning' | 'success';
27
+ /**
28
+ * Supported component variant types
29
+ */
30
+ type ComponentVariant = 'primary' | 'secondary' | 'tertiary';
31
+ /**
32
+ * Map design system colors to shadcn variants
33
+ *
34
+ * @param color - The design system color
35
+ * @returns The corresponding shadcn variant
36
+ */
37
+ declare const mapColorToShadcnVariant: (color: ThemeColor) => "secondary" | "default" | "destructive";
38
+ /**
39
+ * Map design system variants to shadcn variants
40
+ *
41
+ * @param variant - The design system variant
42
+ * @returns The corresponding shadcn variant
43
+ */
44
+ declare const mapVariantToShadcnVariant: (variant: ComponentVariant) => "default" | "outline" | "ghost";
45
+ /**
46
+ * Generate Tailwind classes for color/variant combinations
47
+ *
48
+ * @param color - The design system color
49
+ * @param variant - The design system variant
50
+ * @returns String of Tailwind classes
51
+ */
52
+ declare const getColorVariantClasses: (color: ThemeColor, variant: ComponentVariant) => string;
53
+ /**
54
+ * Determine if the current theme is dark
55
+ *
56
+ * @param theme - The current theme
57
+ * @param systemTheme - The system theme
58
+ * @returns True if the theme is dark
59
+ */
60
+ declare const isDarkTheme: (theme: string | undefined, systemTheme: string | undefined) => boolean;
61
+
21
62
  declare const buttonVariants: (props?: ({
22
63
  variant?: "primary" | "secondary" | "tertiary" | "default" | "destructive" | "outline" | "ghost" | "link" | "primaryError" | null | undefined;
23
64
  size?: "sm" | "md" | "lg" | "iconSm" | "iconMd" | "iconLg" | "icon" | null | undefined;
@@ -977,4 +1018,4 @@ declare const tokens: {
977
1018
  };
978
1019
  type Tokens = typeof tokens;
979
1020
 
980
- export { Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, Collapsible, CollapsibleContent, CollapsibleTrigger, type Colors, 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, DropdownMenu, EmailButton, type EmailButtonProps, EmailCaption, EmailContainer, type EmailContainerProps, EmailFooter, type EmailFooterProps, EmailHeader, type EmailHeaderProps, EmailHeading, EmailLayout, type EmailLayoutProps, EmailMuted, EmailText, type EmailTextProps, Heading, type HeadingProps, HoverCard, HoverCardContent, HoverCardTrigger, Input, type InputProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type Radius, type Shadows, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Slider, type Spacing, Text, type TextProps, ThemeColor, Toggle, ToggleGroup, ToggleGroupItem, type Tokens, type Typography, buttonVariants, cn, colors, filterDOMProps, generateId, isNotNullOrUndefined, radius, shadows, spacing, tokens, typography };
1021
+ export { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Collapsible, CollapsibleContent, CollapsibleTrigger, type Colors, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type ComponentVariant, 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, DropdownMenu, EmailButton, type EmailButtonProps, EmailCaption, EmailContainer, type EmailContainerProps, EmailFooter, type EmailFooterProps, EmailHeader, type EmailHeaderProps, EmailHeading, EmailLayout, type EmailLayoutProps, EmailMuted, EmailText, type EmailTextProps, Heading, HoverCard, HoverCardContent, HoverCardTrigger, Input, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type Radius, type Shadows, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Slider, type Spacing, Text, type ThemeColor, Toggle, ToggleGroup, ToggleGroupItem, type Tokens, type Typography, buttonVariants, cn, colors, filterDOMProps, generateId, getColorVariantClasses, isDarkTheme, isNotNullOrUndefined, mapColorToShadcnVariant, mapVariantToShadcnVariant, radius, shadows, spacing, tokens, typography };
package/dist/index.d.ts CHANGED
@@ -2,8 +2,6 @@ import * as class_variance_authority_dist_types from 'class-variance-authority/d
2
2
  import * as React from 'react';
3
3
  import React__default from 'react';
4
4
  import { VariantProps } from 'class-variance-authority';
5
- import { ThemeColor } from './themes/index.js';
6
- export { ClientThemeProvider, ClientThemeToggle, ComponentVariant, ThemeProvider, ThemeProviderNoSSR, getColorVariantClasses, isDarkTheme, mapColorToShadcnVariant, mapVariantToShadcnVariant, useThemeServer } from './themes/index.js';
7
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
6
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
9
7
  import * as TogglePrimitive from '@radix-ui/react-toggle';
@@ -16,8 +14,51 @@ import { DialogProps } from '@radix-ui/react-dialog';
16
14
  import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
17
15
  import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
18
16
  import { ClassValue } from 'clsx';
17
+ export { ClientThemeProvider, ClientThemeToggle, ThemeProvider, ThemeProviderNoSSR, useThemeServer } from './themes/index.js';
19
18
  import 'next-themes/dist/types';
20
19
 
20
+ /**
21
+ * Utility functions for theme handling
22
+ */
23
+ /**
24
+ * Supported color theme values
25
+ */
26
+ type ThemeColor = 'brand' | 'error' | 'warning' | 'success';
27
+ /**
28
+ * Supported component variant types
29
+ */
30
+ type ComponentVariant = 'primary' | 'secondary' | 'tertiary';
31
+ /**
32
+ * Map design system colors to shadcn variants
33
+ *
34
+ * @param color - The design system color
35
+ * @returns The corresponding shadcn variant
36
+ */
37
+ declare const mapColorToShadcnVariant: (color: ThemeColor) => "secondary" | "default" | "destructive";
38
+ /**
39
+ * Map design system variants to shadcn variants
40
+ *
41
+ * @param variant - The design system variant
42
+ * @returns The corresponding shadcn variant
43
+ */
44
+ declare const mapVariantToShadcnVariant: (variant: ComponentVariant) => "default" | "outline" | "ghost";
45
+ /**
46
+ * Generate Tailwind classes for color/variant combinations
47
+ *
48
+ * @param color - The design system color
49
+ * @param variant - The design system variant
50
+ * @returns String of Tailwind classes
51
+ */
52
+ declare const getColorVariantClasses: (color: ThemeColor, variant: ComponentVariant) => string;
53
+ /**
54
+ * Determine if the current theme is dark
55
+ *
56
+ * @param theme - The current theme
57
+ * @param systemTheme - The system theme
58
+ * @returns True if the theme is dark
59
+ */
60
+ declare const isDarkTheme: (theme: string | undefined, systemTheme: string | undefined) => boolean;
61
+
21
62
  declare const buttonVariants: (props?: ({
22
63
  variant?: "primary" | "secondary" | "tertiary" | "default" | "destructive" | "outline" | "ghost" | "link" | "primaryError" | null | undefined;
23
64
  size?: "sm" | "md" | "lg" | "iconSm" | "iconMd" | "iconLg" | "icon" | null | undefined;
@@ -977,4 +1018,4 @@ declare const tokens: {
977
1018
  };
978
1019
  type Tokens = typeof tokens;
979
1020
 
980
- export { Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, Collapsible, CollapsibleContent, CollapsibleTrigger, type Colors, 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, DropdownMenu, EmailButton, type EmailButtonProps, EmailCaption, EmailContainer, type EmailContainerProps, EmailFooter, type EmailFooterProps, EmailHeader, type EmailHeaderProps, EmailHeading, EmailLayout, type EmailLayoutProps, EmailMuted, EmailText, type EmailTextProps, Heading, type HeadingProps, HoverCard, HoverCardContent, HoverCardTrigger, Input, type InputProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type Radius, type Shadows, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Slider, type Spacing, Text, type TextProps, ThemeColor, Toggle, ToggleGroup, ToggleGroupItem, type Tokens, type Typography, buttonVariants, cn, colors, filterDOMProps, generateId, isNotNullOrUndefined, radius, shadows, spacing, tokens, typography };
1021
+ export { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Collapsible, CollapsibleContent, CollapsibleTrigger, type Colors, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type ComponentVariant, 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, DropdownMenu, EmailButton, type EmailButtonProps, EmailCaption, EmailContainer, type EmailContainerProps, EmailFooter, type EmailFooterProps, EmailHeader, type EmailHeaderProps, EmailHeading, EmailLayout, type EmailLayoutProps, EmailMuted, EmailText, type EmailTextProps, Heading, HoverCard, HoverCardContent, HoverCardTrigger, Input, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type Radius, type Shadows, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Slider, type Spacing, Text, type ThemeColor, Toggle, ToggleGroup, ToggleGroupItem, type Tokens, type Typography, buttonVariants, cn, colors, filterDOMProps, generateId, getColorVariantClasses, isDarkTheme, isNotNullOrUndefined, mapColorToShadcnVariant, mapVariantToShadcnVariant, radius, shadows, spacing, tokens, typography };