@mahatisystems/mahati-ui-components 0.1.1

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.
@@ -0,0 +1,159 @@
1
+ import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
2
+ import * as React from 'react';
3
+ import React__default from 'react';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ declare const buttonVariants: (props?: ({
7
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
8
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
9
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
10
+ interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
11
+ asChild?: boolean;
12
+ }
13
+ declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
14
+
15
+ declare const cardVariants: (props?: ({
16
+ variant?: "default" | "outline" | "elevated" | "subtle" | "figma" | null | undefined;
17
+ size?: "default" | "sm" | "lg" | "figma" | null | undefined;
18
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
19
+ interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'content'>, VariantProps<typeof cardVariants> {
20
+ title?: string;
21
+ cardContent?: React.ReactNode;
22
+ cardBackContent?: React.ReactNode;
23
+ collapsible?: boolean;
24
+ flippable?: boolean;
25
+ backgroundColor?: string;
26
+ borderRadius?: string;
27
+ defaultOpen?: boolean;
28
+ onFlip?: (isFlipped: boolean) => void;
29
+ }
30
+ declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
31
+
32
+ interface ModalProps {
33
+ isOpen: boolean;
34
+ onClose: () => void;
35
+ title?: string;
36
+ children: React__default.ReactNode;
37
+ className?: string;
38
+ }
39
+ declare const Modal: React__default.FC<ModalProps>;
40
+
41
+ interface FormContainerProps {
42
+ children: React__default.ReactNode;
43
+ onSubmit?: (e: React__default.FormEvent) => void;
44
+ className?: string;
45
+ }
46
+ declare const FormContainer: React__default.FC<FormContainerProps>;
47
+
48
+ interface InputProps {
49
+ type?: string;
50
+ name?: string;
51
+ placeholder: string;
52
+ onChange: (e: React__default.ChangeEvent<HTMLInputElement>) => void;
53
+ hasError?: boolean;
54
+ errorMessage?: string;
55
+ value?: string;
56
+ className?: string;
57
+ }
58
+ declare const Input: React__default.FC<InputProps>;
59
+
60
+ interface Tab {
61
+ id?: string;
62
+ label: string;
63
+ icon?: React__default.ReactNode;
64
+ content: React__default.ReactNode;
65
+ disabled?: boolean;
66
+ }
67
+ interface MahatiTabbedInterfaceProps {
68
+ tabs: Tab[];
69
+ variant?: "basic" | "pill" | "dark" | "underline" | "shadow" | "glass" | "gradient" | "square";
70
+ defaultActiveTab?: number;
71
+ className?: string;
72
+ onTabChange?: (tabIndex: number) => void;
73
+ }
74
+ declare const TabbedInterface: React__default.FC<MahatiTabbedInterfaceProps>;
75
+
76
+ interface TableProps$1 {
77
+ headers: {
78
+ label: string;
79
+ key: string;
80
+ }[];
81
+ data: {
82
+ [key: string]: unknown;
83
+ }[];
84
+ page?: number;
85
+ setPage?: (page: number) => void;
86
+ limit?: number;
87
+ setLimit?: (limit: number) => void;
88
+ totalCount?: number;
89
+ highlightRowColor?: string;
90
+ actions?: (row: unknown) => React__default.ReactNode;
91
+ paginationRequired?: boolean;
92
+ paginationPosition?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
93
+ onDownloadPDF?: (data: any[], headers: any[]) => void;
94
+ onDownloadExcel?: (data: any[], headers: any[]) => void;
95
+ searchable?: boolean;
96
+ searchTerm?: string;
97
+ onSearch?: (term: string, mode: "startsWith" | "includes") => void;
98
+ searchModeOptions?: ("startsWith" | "includes")[];
99
+ onResetSearch?: () => void;
100
+ }
101
+ declare const Table: React__default.FC<TableProps$1>;
102
+
103
+ interface TableProps {
104
+ headers: {
105
+ label: string;
106
+ key: string;
107
+ }[];
108
+ data: {
109
+ [key: string]: unknown;
110
+ }[];
111
+ page?: number;
112
+ setPage?: (page: number) => void;
113
+ limit?: number;
114
+ setLimit?: (limit: number) => void;
115
+ totalCount?: number;
116
+ highlightRowColor?: string;
117
+ actions?: (row: unknown) => React__default.ReactNode;
118
+ paginationRequired?: boolean;
119
+ paginationPosition?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
120
+ onDownloadPDF?: (data: any[], headers: any[]) => void;
121
+ onDownloadExcel?: (data: any[], headers: any[]) => void;
122
+ searchable?: boolean;
123
+ searchTerm?: string;
124
+ onSearch?: (term: string, mode: "startsWith" | "includes") => void;
125
+ searchModeOptions?: ("startsWith" | "includes")[];
126
+ onResetSearch?: () => void;
127
+ }
128
+ declare const TableTailwind: React__default.FC<TableProps>;
129
+
130
+ interface TooltipProps {
131
+ text?: string;
132
+ position?: "top" | "right" | "bottom" | "left";
133
+ children: React__default.ReactNode;
134
+ variant?: "default" | "transparent";
135
+ className?: string;
136
+ textColor?: string;
137
+ backgroundColor?: string;
138
+ image?: {
139
+ src: string;
140
+ alt?: string;
141
+ width?: number;
142
+ height?: number;
143
+ };
144
+ animation?: {
145
+ component: React__default.ComponentType<any>;
146
+ props?: any;
147
+ triggerDelay?: number;
148
+ };
149
+ }
150
+ declare const Tooltip: React__default.FC<TooltipProps>;
151
+
152
+ interface DropdownProps {
153
+ options: string[];
154
+ onSelect: (option: string) => void;
155
+ variant?: "basic" | "outline" | "pill" | "dark" | "underline" | "shadow" | "glass" | "gradient";
156
+ }
157
+ declare const Dropdown: React__default.FC<DropdownProps>;
158
+
159
+ export { Button as MahatiButton, Card as MahatiCard, Dropdown as MahatiDropdown, FormContainer as MahatiFormContainer, Input as MahatiInput, Modal as MahatiModal, TabbedInterface as MahatiTabbedInterface, Table as MahatiTable, TableTailwind as MahatiTableTailwind, Tooltip as MahatiTooltip };