@clasing/ui 0.1.26 → 0.1.34
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 +51 -4
- package/dist/index.es.js +4345 -1469
- 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,16 @@ 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
|
+
declare type DropdownOption<T extends string | number | readonly string[] | undefined> = {
|
|
66
76
|
label: string;
|
|
67
77
|
value: T;
|
|
68
78
|
};
|
|
69
79
|
|
|
70
80
|
export declare const DropdownSelect: ForwardRefExoticComponent<DropdownSelectProps<any> & RefAttributes<HTMLDivElement>>;
|
|
71
81
|
|
|
72
|
-
declare interface DropdownSelectProps<T> extends React.SelectHTMLAttributes<HTMLDivElement> {
|
|
82
|
+
declare interface DropdownSelectProps<T extends string | number | readonly string[] | undefined> extends Omit<React.SelectHTMLAttributes<HTMLDivElement>, 'value' | 'onChange'> {
|
|
73
83
|
label?: string;
|
|
74
84
|
helperText?: string;
|
|
75
85
|
error?: string;
|
|
@@ -77,7 +87,8 @@ declare interface DropdownSelectProps<T> extends React.SelectHTMLAttributes<HTML
|
|
|
77
87
|
iconName?: TablerIconName;
|
|
78
88
|
placeholder?: string;
|
|
79
89
|
options?: DropdownOption<T>[];
|
|
80
|
-
|
|
90
|
+
value?: T;
|
|
91
|
+
onChange?: (value: T | null) => void;
|
|
81
92
|
}
|
|
82
93
|
|
|
83
94
|
declare interface IBadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeStyles> {
|
|
@@ -130,6 +141,16 @@ declare interface ICardProps extends React.HTMLAttributes<HTMLDivElement>, Varia
|
|
|
130
141
|
|
|
131
142
|
export declare const IconComponent: ForwardRefExoticComponent<IIconComponentProps & RefAttributes<SVGSVGElement>>;
|
|
132
143
|
|
|
144
|
+
declare interface IDatepickerProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
145
|
+
label?: string;
|
|
146
|
+
helperText?: string;
|
|
147
|
+
error?: string;
|
|
148
|
+
touched?: boolean;
|
|
149
|
+
value: string;
|
|
150
|
+
locale?: 'enGB' | 'enUS' | 'es';
|
|
151
|
+
placeholder?: string;
|
|
152
|
+
}
|
|
153
|
+
|
|
133
154
|
declare interface IIconComponentProps {
|
|
134
155
|
iconName: TablerIconName;
|
|
135
156
|
stroke?: number;
|
|
@@ -198,6 +219,8 @@ export declare const Popover: ({ children, trigger, open, placement, closeOnActi
|
|
|
198
219
|
|
|
199
220
|
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
221
|
|
|
222
|
+
declare type PositionProps = 'top-right' | 'top-left' | 'top' | 'bottom-right' | 'bottom-left' | 'bottom';
|
|
223
|
+
|
|
201
224
|
export declare const ProgressBar: ({ progress, className, intent, size, rounded, ...props }: IProgressBarProps) => JSX_2.Element;
|
|
202
225
|
|
|
203
226
|
declare const progressBarStyles: (props?: ({
|
|
@@ -218,6 +241,28 @@ declare const textStyles: (props?: ({
|
|
|
218
241
|
weight?: "bold" | "light" | "regular" | "semibold" | null | undefined;
|
|
219
242
|
} & ClassProp) | undefined) => string;
|
|
220
243
|
|
|
244
|
+
export declare const Toast: default_2.ForwardRefExoticComponent<ToastProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
245
|
+
|
|
246
|
+
declare type ToastContextType = (props: AddToastProps) => void;
|
|
247
|
+
|
|
248
|
+
declare interface ToastProps extends default_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof toastStyles> {
|
|
249
|
+
message: string;
|
|
250
|
+
onClose: () => void;
|
|
251
|
+
position?: PositionProps;
|
|
252
|
+
duration?: number;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export declare const ToastProvider: default_2.FC<ToastProviderProps>;
|
|
256
|
+
|
|
257
|
+
declare type ToastProviderProps = {
|
|
258
|
+
children: ReactNode;
|
|
259
|
+
position?: PositionProps;
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
declare const toastStyles: (props?: ({
|
|
263
|
+
intent?: "error" | "warning" | "success" | "info" | "neutral" | null | undefined;
|
|
264
|
+
} & ClassProp) | undefined) => string;
|
|
265
|
+
|
|
221
266
|
export declare const Tooltip: ForwardRefExoticComponent<ITooltipProps & RefAttributes<HTMLSpanElement>>;
|
|
222
267
|
|
|
223
268
|
declare const tooltipStyles: (props?: ({
|
|
@@ -230,4 +275,6 @@ declare const tooltipStyles: (props?: ({
|
|
|
230
275
|
|
|
231
276
|
export declare const useOutsideClick: ({ ref, handler }: OutsideClickHandlerProps) => void;
|
|
232
277
|
|
|
278
|
+
export declare const useToast: () => ToastContextType;
|
|
279
|
+
|
|
233
280
|
export { }
|