@yomologic/react-ui 0.5.1 → 0.5.3

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
@@ -76,6 +76,36 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
76
76
  }
77
77
  declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
78
78
 
79
+ interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "rows"> {
80
+ /** Field name - required when used inside Form */
81
+ name?: string;
82
+ label?: string;
83
+ error?: string;
84
+ helperText?: string;
85
+ fullWidth?: boolean;
86
+ /** Custom validation function that returns error message or undefined if valid */
87
+ validate?: ValidationFunction;
88
+ /** Callback when validation error changes */
89
+ onValidationError?: (error: string | undefined) => void;
90
+ /** Custom error messages for built-in validations */
91
+ errorMessages?: {
92
+ required?: string;
93
+ minLength?: string;
94
+ maxLength?: string;
95
+ };
96
+ /** Number of visible text rows */
97
+ rows?: number;
98
+ /** Allow vertical resizing */
99
+ resize?: "none" | "vertical" | "horizontal" | "both";
100
+ /** Auto-resize to fit content */
101
+ autoResize?: boolean;
102
+ /** Show character count */
103
+ showCharacterCount?: boolean;
104
+ /** Maximum height when auto-resizing (in pixels) */
105
+ maxHeight?: number;
106
+ }
107
+ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
108
+
79
109
  interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "variant" | "accentColor"> {
80
110
  variant?: "default" | "bordered" | "elevated" | "accent";
81
111
  padding?: "none" | "sm" | "md" | "lg";
@@ -696,6 +726,16 @@ interface NavProps extends React.HTMLAttributes<HTMLElement> {
696
726
  sticky?: boolean;
697
727
  activeId?: string;
698
728
  onItemClick?: (item: NavItem$2) => void;
729
+ /** Remove bottom border for seamless hero integration */
730
+ borderless?: boolean;
731
+ /** Make background transparent */
732
+ transparent?: boolean;
733
+ /** Add backdrop blur effect (glassmorphism) */
734
+ blur?: boolean;
735
+ /** Position of the nav (fixed, sticky, or static) */
736
+ position?: "fixed" | "sticky" | "static";
737
+ /** Auto-hide nav on scroll down, show on scroll up */
738
+ autoHideOnScroll?: boolean;
699
739
  }
700
740
  declare const Nav: React.ForwardRefExoticComponent<NavProps & React.RefAttributes<HTMLElement>>;
701
741
 
@@ -720,16 +760,14 @@ interface DrawerProps {
720
760
  homeUrl?: string;
721
761
  autoHideOnScroll?: boolean;
722
762
  headerActions?: React.ReactNode;
763
+ /** Remove bottom border from mobile header */
764
+ borderless?: boolean;
765
+ /** Make mobile header background transparent */
766
+ transparent?: boolean;
767
+ /** Add backdrop blur effect to mobile header (glassmorphism) */
768
+ blur?: boolean;
723
769
  }
724
- declare function Drawer({ title, subtitle, items, sections, activeItem, onItemClick, footer, position, homeUrl, autoHideOnScroll, headerActions, }: DrawerProps): react_jsx_runtime.JSX.Element;
725
-
726
- interface HeaderProps {
727
- children: React.ReactNode;
728
- autoHideOnScroll?: boolean;
729
- className?: string;
730
- position?: "fixed" | "sticky" | "static";
731
- }
732
- declare function Header({ children, autoHideOnScroll, className, position, }: HeaderProps): react_jsx_runtime.JSX.Element;
770
+ declare function Drawer({ title, subtitle, items, sections, activeItem, onItemClick, footer, position, homeUrl, autoHideOnScroll, headerActions, borderless, transparent, blur, }: DrawerProps): react_jsx_runtime.JSX.Element;
733
771
 
734
772
  interface NavItem {
735
773
  id: string;
@@ -768,6 +806,8 @@ interface Theme {
768
806
  typography?: Record<string, string>;
769
807
  showcase?: Record<string, string>;
770
808
  semanticColors?: Record<string, string>;
809
+ transitions?: Record<string, string>;
810
+ overlay?: Record<string, string>;
771
811
  }
772
812
  interface ThemeContextType {
773
813
  currentTheme: string;
@@ -893,6 +933,12 @@ declare const themes: {
893
933
  "indigo-text": string;
894
934
  };
895
935
  };
936
+ transitions: {
937
+ "drawer-duration": string;
938
+ };
939
+ overlay: {
940
+ background: string;
941
+ };
896
942
  };
897
943
  dark: {
898
944
  name: string;
@@ -997,10 +1043,16 @@ declare const themes: {
997
1043
  "indigo-text": string;
998
1044
  };
999
1045
  };
1046
+ transitions: {
1047
+ "drawer-duration": string;
1048
+ };
1049
+ overlay: {
1050
+ background: string;
1051
+ };
1000
1052
  };
1001
1053
  };
1002
1054
  type ThemeId = keyof typeof themes;
1003
1055
 
1004
1056
  declare function cn(...inputs: ClassValue[]): string;
1005
1057
 
1006
- export { Alert, Badge, Button, Card, CardActionArea, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, CardTitle, Checkbox, CheckboxGroup, CodeSnippet, Container, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Divider, Drawer, type NavItem$1 as DrawerNavItem, type NavSection$1 as DrawerNavSection, type DrawerProps, EmptyState, Form, type FormContextValue, FormControl, type FormControlContextValue, FormControlLabel, type FormControlProps, type FormControlState, type FormFieldProps, FormHelperText, type FormState, Header, type HeaderProps, Input, Nav, type NavItem$2 as NavItem, type NavProps, type NavSection, RadioGroup, Rating, SectionLayout, Select, type SelectOption, type SelectProps, SidebarNav, type NavItem as SidebarNavItem, Slider, type SliderMark, type SliderProps, Spinner, Switch, type SwitchProps, type ThemeId, ThemeProvider, type ValidationFunction, type ValidationRule, cn, themes, useForm, useFormContext, useFormControl, useFormControlContext, useFormField, useTheme };
1058
+ export { Alert, Badge, Button, Card, CardActionArea, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, CardTitle, Checkbox, CheckboxGroup, CodeSnippet, Container, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Divider, Drawer, type NavItem$1 as DrawerNavItem, type NavSection$1 as DrawerNavSection, type DrawerProps, EmptyState, Form, type FormContextValue, FormControl, type FormControlContextValue, FormControlLabel, type FormControlProps, type FormControlState, type FormFieldProps, FormHelperText, type FormState, Input, Nav, type NavItem$2 as NavItem, type NavProps, type NavSection, RadioGroup, Rating, SectionLayout, Select, type SelectOption, type SelectProps, SidebarNav, type NavItem as SidebarNavItem, Slider, type SliderMark, type SliderProps, Spinner, Switch, type SwitchProps, Textarea, type TextareaProps, type ThemeId, ThemeProvider, type ValidationFunction, type ValidationRule, cn, themes, useForm, useFormContext, useFormControl, useFormControlContext, useFormField, useTheme };
package/dist/index.d.ts CHANGED
@@ -76,6 +76,36 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
76
76
  }
77
77
  declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
78
78
 
79
+ interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "rows"> {
80
+ /** Field name - required when used inside Form */
81
+ name?: string;
82
+ label?: string;
83
+ error?: string;
84
+ helperText?: string;
85
+ fullWidth?: boolean;
86
+ /** Custom validation function that returns error message or undefined if valid */
87
+ validate?: ValidationFunction;
88
+ /** Callback when validation error changes */
89
+ onValidationError?: (error: string | undefined) => void;
90
+ /** Custom error messages for built-in validations */
91
+ errorMessages?: {
92
+ required?: string;
93
+ minLength?: string;
94
+ maxLength?: string;
95
+ };
96
+ /** Number of visible text rows */
97
+ rows?: number;
98
+ /** Allow vertical resizing */
99
+ resize?: "none" | "vertical" | "horizontal" | "both";
100
+ /** Auto-resize to fit content */
101
+ autoResize?: boolean;
102
+ /** Show character count */
103
+ showCharacterCount?: boolean;
104
+ /** Maximum height when auto-resizing (in pixels) */
105
+ maxHeight?: number;
106
+ }
107
+ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
108
+
79
109
  interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "variant" | "accentColor"> {
80
110
  variant?: "default" | "bordered" | "elevated" | "accent";
81
111
  padding?: "none" | "sm" | "md" | "lg";
@@ -696,6 +726,16 @@ interface NavProps extends React.HTMLAttributes<HTMLElement> {
696
726
  sticky?: boolean;
697
727
  activeId?: string;
698
728
  onItemClick?: (item: NavItem$2) => void;
729
+ /** Remove bottom border for seamless hero integration */
730
+ borderless?: boolean;
731
+ /** Make background transparent */
732
+ transparent?: boolean;
733
+ /** Add backdrop blur effect (glassmorphism) */
734
+ blur?: boolean;
735
+ /** Position of the nav (fixed, sticky, or static) */
736
+ position?: "fixed" | "sticky" | "static";
737
+ /** Auto-hide nav on scroll down, show on scroll up */
738
+ autoHideOnScroll?: boolean;
699
739
  }
700
740
  declare const Nav: React.ForwardRefExoticComponent<NavProps & React.RefAttributes<HTMLElement>>;
701
741
 
@@ -720,16 +760,14 @@ interface DrawerProps {
720
760
  homeUrl?: string;
721
761
  autoHideOnScroll?: boolean;
722
762
  headerActions?: React.ReactNode;
763
+ /** Remove bottom border from mobile header */
764
+ borderless?: boolean;
765
+ /** Make mobile header background transparent */
766
+ transparent?: boolean;
767
+ /** Add backdrop blur effect to mobile header (glassmorphism) */
768
+ blur?: boolean;
723
769
  }
724
- declare function Drawer({ title, subtitle, items, sections, activeItem, onItemClick, footer, position, homeUrl, autoHideOnScroll, headerActions, }: DrawerProps): react_jsx_runtime.JSX.Element;
725
-
726
- interface HeaderProps {
727
- children: React.ReactNode;
728
- autoHideOnScroll?: boolean;
729
- className?: string;
730
- position?: "fixed" | "sticky" | "static";
731
- }
732
- declare function Header({ children, autoHideOnScroll, className, position, }: HeaderProps): react_jsx_runtime.JSX.Element;
770
+ declare function Drawer({ title, subtitle, items, sections, activeItem, onItemClick, footer, position, homeUrl, autoHideOnScroll, headerActions, borderless, transparent, blur, }: DrawerProps): react_jsx_runtime.JSX.Element;
733
771
 
734
772
  interface NavItem {
735
773
  id: string;
@@ -768,6 +806,8 @@ interface Theme {
768
806
  typography?: Record<string, string>;
769
807
  showcase?: Record<string, string>;
770
808
  semanticColors?: Record<string, string>;
809
+ transitions?: Record<string, string>;
810
+ overlay?: Record<string, string>;
771
811
  }
772
812
  interface ThemeContextType {
773
813
  currentTheme: string;
@@ -893,6 +933,12 @@ declare const themes: {
893
933
  "indigo-text": string;
894
934
  };
895
935
  };
936
+ transitions: {
937
+ "drawer-duration": string;
938
+ };
939
+ overlay: {
940
+ background: string;
941
+ };
896
942
  };
897
943
  dark: {
898
944
  name: string;
@@ -997,10 +1043,16 @@ declare const themes: {
997
1043
  "indigo-text": string;
998
1044
  };
999
1045
  };
1046
+ transitions: {
1047
+ "drawer-duration": string;
1048
+ };
1049
+ overlay: {
1050
+ background: string;
1051
+ };
1000
1052
  };
1001
1053
  };
1002
1054
  type ThemeId = keyof typeof themes;
1003
1055
 
1004
1056
  declare function cn(...inputs: ClassValue[]): string;
1005
1057
 
1006
- export { Alert, Badge, Button, Card, CardActionArea, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, CardTitle, Checkbox, CheckboxGroup, CodeSnippet, Container, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Divider, Drawer, type NavItem$1 as DrawerNavItem, type NavSection$1 as DrawerNavSection, type DrawerProps, EmptyState, Form, type FormContextValue, FormControl, type FormControlContextValue, FormControlLabel, type FormControlProps, type FormControlState, type FormFieldProps, FormHelperText, type FormState, Header, type HeaderProps, Input, Nav, type NavItem$2 as NavItem, type NavProps, type NavSection, RadioGroup, Rating, SectionLayout, Select, type SelectOption, type SelectProps, SidebarNav, type NavItem as SidebarNavItem, Slider, type SliderMark, type SliderProps, Spinner, Switch, type SwitchProps, type ThemeId, ThemeProvider, type ValidationFunction, type ValidationRule, cn, themes, useForm, useFormContext, useFormControl, useFormControlContext, useFormField, useTheme };
1058
+ export { Alert, Badge, Button, Card, CardActionArea, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, CardTitle, Checkbox, CheckboxGroup, CodeSnippet, Container, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Divider, Drawer, type NavItem$1 as DrawerNavItem, type NavSection$1 as DrawerNavSection, type DrawerProps, EmptyState, Form, type FormContextValue, FormControl, type FormControlContextValue, FormControlLabel, type FormControlProps, type FormControlState, type FormFieldProps, FormHelperText, type FormState, Input, Nav, type NavItem$2 as NavItem, type NavProps, type NavSection, RadioGroup, Rating, SectionLayout, Select, type SelectOption, type SelectProps, SidebarNav, type NavItem as SidebarNavItem, Slider, type SliderMark, type SliderProps, Spinner, Switch, type SwitchProps, Textarea, type TextareaProps, type ThemeId, ThemeProvider, type ValidationFunction, type ValidationRule, cn, themes, useForm, useFormContext, useFormControl, useFormControlContext, useFormField, useTheme };