@clasing/ui 0.1.26 → 0.1.35
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.ts +68 -4
- package/dist/index.es.js +4531 -1476
- package/dist/index.umd.js +10 -10
- package/dist/style.css +1 -1
- package/package.json +88 -88
- package/tailwind.config.js +47 -0
package/dist/index.d.ts
CHANGED
|
@@ -2,10 +2,18 @@ import { ClassProp } from 'class-variance-authority/types';
|
|
|
2
2
|
import { default as default_2 } from 'react';
|
|
3
3
|
import { ForwardRefExoticComponent } from 'react';
|
|
4
4
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
5
|
+
import { ReactNode } from 'react';
|
|
5
6
|
import { RefAttributes } from 'react';
|
|
6
7
|
import * as TablerIcons from '@tabler/icons-react';
|
|
7
8
|
import { VariantProps } from 'class-variance-authority';
|
|
8
9
|
|
|
10
|
+
declare interface AddToastProps {
|
|
11
|
+
message: ToastProps['message'];
|
|
12
|
+
intent: ToastProps['intent'];
|
|
13
|
+
position?: PositionProps;
|
|
14
|
+
duration?: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
export declare const Avatar: ForwardRefExoticComponent<AvatarProps & RefAttributes<HTMLImageElement>>;
|
|
10
18
|
|
|
11
19
|
declare interface AvatarProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
@@ -27,7 +35,7 @@ export declare const Button: ForwardRefExoticComponent<IButtonProps & RefAttribu
|
|
|
27
35
|
export declare const ButtonIcon: default_2.ForwardRefExoticComponent<IButtonIconProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
28
36
|
|
|
29
37
|
declare const buttonIconStyles: (props?: ({
|
|
30
|
-
intent?: "outline" | "fill" | "ghost" | null | undefined;
|
|
38
|
+
intent?: "outline" | "fill" | "ghost" | "destructive" | null | undefined;
|
|
31
39
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
32
40
|
rounded?: "sm" | "full" | null | undefined;
|
|
33
41
|
} & ClassProp) | undefined) => string;
|
|
@@ -62,14 +70,18 @@ declare interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputEleme
|
|
|
62
70
|
touched?: boolean;
|
|
63
71
|
}
|
|
64
72
|
|
|
65
|
-
declare
|
|
73
|
+
export declare const Datepicker: ForwardRefExoticComponent<IDatepickerProps & RefAttributes<HTMLInputElement>>;
|
|
74
|
+
|
|
75
|
+
export declare const DateRangePicker: ForwardRefExoticComponent<IDateRangePickerProps & RefAttributes<HTMLInputElement>>;
|
|
76
|
+
|
|
77
|
+
declare type DropdownOption<T extends string | number | readonly string[] | undefined> = {
|
|
66
78
|
label: string;
|
|
67
79
|
value: T;
|
|
68
80
|
};
|
|
69
81
|
|
|
70
82
|
export declare const DropdownSelect: ForwardRefExoticComponent<DropdownSelectProps<any> & RefAttributes<HTMLDivElement>>;
|
|
71
83
|
|
|
72
|
-
declare interface DropdownSelectProps<T> extends React.SelectHTMLAttributes<HTMLDivElement> {
|
|
84
|
+
declare interface DropdownSelectProps<T extends string | number | readonly string[] | undefined> extends Omit<React.SelectHTMLAttributes<HTMLDivElement>, 'value' | 'onChange'> {
|
|
73
85
|
label?: string;
|
|
74
86
|
helperText?: string;
|
|
75
87
|
error?: string;
|
|
@@ -77,7 +89,8 @@ declare interface DropdownSelectProps<T> extends React.SelectHTMLAttributes<HTML
|
|
|
77
89
|
iconName?: TablerIconName;
|
|
78
90
|
placeholder?: string;
|
|
79
91
|
options?: DropdownOption<T>[];
|
|
80
|
-
|
|
92
|
+
value?: T;
|
|
93
|
+
onChange?: (value: T | null) => void;
|
|
81
94
|
}
|
|
82
95
|
|
|
83
96
|
declare interface IBadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeStyles> {
|
|
@@ -130,6 +143,31 @@ declare interface ICardProps extends React.HTMLAttributes<HTMLDivElement>, Varia
|
|
|
130
143
|
|
|
131
144
|
export declare const IconComponent: ForwardRefExoticComponent<IIconComponentProps & RefAttributes<SVGSVGElement>>;
|
|
132
145
|
|
|
146
|
+
declare interface IDatepickerProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
147
|
+
label?: string;
|
|
148
|
+
helperText?: string;
|
|
149
|
+
error?: string;
|
|
150
|
+
touched?: boolean;
|
|
151
|
+
value: string;
|
|
152
|
+
locale?: 'enGB' | 'enUS' | 'es';
|
|
153
|
+
placeholder?: string;
|
|
154
|
+
minDate?: Date;
|
|
155
|
+
maxDate?: Date;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
declare interface IDateRangePickerProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
159
|
+
label?: string;
|
|
160
|
+
helperText?: string;
|
|
161
|
+
error?: string;
|
|
162
|
+
touched?: boolean;
|
|
163
|
+
startDate: string;
|
|
164
|
+
endDate: string;
|
|
165
|
+
locale?: 'enGB' | 'enUS' | 'es';
|
|
166
|
+
placeholder?: string;
|
|
167
|
+
minDate?: Date;
|
|
168
|
+
maxDate?: Date;
|
|
169
|
+
}
|
|
170
|
+
|
|
133
171
|
declare interface IIconComponentProps {
|
|
134
172
|
iconName: TablerIconName;
|
|
135
173
|
stroke?: number;
|
|
@@ -198,6 +236,8 @@ export declare const Popover: ({ children, trigger, open, placement, closeOnActi
|
|
|
198
236
|
|
|
199
237
|
declare type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right' | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-right-corner' | 'top-left-corner' | 'bottom-right-corner' | 'bottom-left-corner';
|
|
200
238
|
|
|
239
|
+
declare type PositionProps = 'top-right' | 'top-left' | 'top' | 'bottom-right' | 'bottom-left' | 'bottom';
|
|
240
|
+
|
|
201
241
|
export declare const ProgressBar: ({ progress, className, intent, size, rounded, ...props }: IProgressBarProps) => JSX_2.Element;
|
|
202
242
|
|
|
203
243
|
declare const progressBarStyles: (props?: ({
|
|
@@ -218,6 +258,28 @@ declare const textStyles: (props?: ({
|
|
|
218
258
|
weight?: "bold" | "light" | "regular" | "semibold" | null | undefined;
|
|
219
259
|
} & ClassProp) | undefined) => string;
|
|
220
260
|
|
|
261
|
+
export declare const Toast: default_2.ForwardRefExoticComponent<ToastProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
262
|
+
|
|
263
|
+
declare type ToastContextType = (props: AddToastProps) => void;
|
|
264
|
+
|
|
265
|
+
declare interface ToastProps extends default_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof toastStyles> {
|
|
266
|
+
message: string;
|
|
267
|
+
onClose: () => void;
|
|
268
|
+
position?: PositionProps;
|
|
269
|
+
duration?: number;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export declare const ToastProvider: default_2.FC<ToastProviderProps>;
|
|
273
|
+
|
|
274
|
+
declare type ToastProviderProps = {
|
|
275
|
+
children: ReactNode;
|
|
276
|
+
position?: PositionProps;
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
declare const toastStyles: (props?: ({
|
|
280
|
+
intent?: "error" | "warning" | "success" | "info" | "neutral" | null | undefined;
|
|
281
|
+
} & ClassProp) | undefined) => string;
|
|
282
|
+
|
|
221
283
|
export declare const Tooltip: ForwardRefExoticComponent<ITooltipProps & RefAttributes<HTMLSpanElement>>;
|
|
222
284
|
|
|
223
285
|
declare const tooltipStyles: (props?: ({
|
|
@@ -230,4 +292,6 @@ declare const tooltipStyles: (props?: ({
|
|
|
230
292
|
|
|
231
293
|
export declare const useOutsideClick: ({ ref, handler }: OutsideClickHandlerProps) => void;
|
|
232
294
|
|
|
295
|
+
export declare const useToast: () => ToastContextType;
|
|
296
|
+
|
|
233
297
|
export { }
|