@clasing/ui 0.1.25 → 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 +76 -24
- package/dist/index.es.js +4498 -1566
- package/dist/index.umd.js +10 -10
- package/dist/style.css +1 -1
- package/package.json +5 -3
- package/tailwind.config.js +108 -196
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> {
|
|
@@ -15,9 +23,9 @@ declare interface AvatarProps extends React.ImgHTMLAttributes<HTMLImageElement>
|
|
|
15
23
|
export declare const Badge: ForwardRefExoticComponent<IBadgeProps & RefAttributes<HTMLSpanElement>>;
|
|
16
24
|
|
|
17
25
|
declare const badgeStyles: (props?: ({
|
|
18
|
-
|
|
19
|
-
intent?: "neutral" | "
|
|
20
|
-
size?: "
|
|
26
|
+
utility?: "error" | "warning" | "success" | "info" | null | undefined;
|
|
27
|
+
intent?: "neutral" | "brand" | "brand-subtle" | "blue" | "blue-subtle" | "yellow" | "yellow-subtle" | null | undefined;
|
|
28
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
21
29
|
weight?: "bold" | "light" | "regular" | "semibold" | null | undefined;
|
|
22
30
|
rounded?: "rectangle" | "full" | null | undefined;
|
|
23
31
|
} & ClassProp) | undefined) => string;
|
|
@@ -27,22 +35,22 @@ 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;
|
|
31
|
-
size?: "
|
|
32
|
-
rounded?: "
|
|
38
|
+
intent?: "outline" | "fill" | "ghost" | "destructive" | null | undefined;
|
|
39
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
40
|
+
rounded?: "sm" | "full" | null | undefined;
|
|
33
41
|
} & ClassProp) | undefined) => string;
|
|
34
42
|
|
|
35
43
|
export declare const ButtonLink: ForwardRefExoticComponent<IButtonLinkProps & RefAttributes<HTMLButtonElement>>;
|
|
36
44
|
|
|
37
|
-
declare const
|
|
38
|
-
intent?: "
|
|
39
|
-
size?: "
|
|
45
|
+
export declare const buttonLinkStyles: (props?: ({
|
|
46
|
+
intent?: "primary" | null | undefined;
|
|
47
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
40
48
|
weight?: "bold" | "light" | "regular" | "semibold" | null | undefined;
|
|
41
49
|
} & ClassProp) | undefined) => string;
|
|
42
50
|
|
|
43
|
-
declare const
|
|
44
|
-
intent?: "primary" | null | undefined;
|
|
45
|
-
size?: "
|
|
51
|
+
export declare const buttonStyles: (props?: ({
|
|
52
|
+
intent?: "outline" | "primary" | "secondary" | "tertiary" | "ghost" | "destructive" | null | undefined;
|
|
53
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
46
54
|
weight?: "bold" | "light" | "regular" | "semibold" | null | undefined;
|
|
47
55
|
} & ClassProp) | undefined) => string;
|
|
48
56
|
|
|
@@ -50,7 +58,7 @@ export declare const Card: ForwardRefExoticComponent<ICardProps & RefAttributes<
|
|
|
50
58
|
|
|
51
59
|
declare const cardStyles: (props?: ({
|
|
52
60
|
intent?: "outline" | "default" | null | undefined;
|
|
53
|
-
shadow?: "none" | "
|
|
61
|
+
shadow?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
54
62
|
} & ClassProp) | undefined) => string;
|
|
55
63
|
|
|
56
64
|
export declare const Checkbox: ForwardRefExoticComponent<CheckboxProps & RefAttributes<HTMLInputElement>>;
|
|
@@ -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,6 +87,8 @@ declare interface DropdownSelectProps<T> extends React.SelectHTMLAttributes<HTML
|
|
|
77
87
|
iconName?: TablerIconName;
|
|
78
88
|
placeholder?: string;
|
|
79
89
|
options?: DropdownOption<T>[];
|
|
90
|
+
value?: T;
|
|
91
|
+
onChange?: (value: T | null) => void;
|
|
80
92
|
}
|
|
81
93
|
|
|
82
94
|
declare interface IBadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeStyles> {
|
|
@@ -88,6 +100,7 @@ declare interface IBadgeProps extends React.HTMLAttributes<HTMLSpanElement>, Var
|
|
|
88
100
|
name: TablerIconName;
|
|
89
101
|
stroke?: number;
|
|
90
102
|
} | TablerIconName;
|
|
103
|
+
iconOnly?: boolean;
|
|
91
104
|
}
|
|
92
105
|
|
|
93
106
|
declare interface IButtonIconProps extends Omit<default_2.ButtonHTMLAttributes<HTMLButtonElement>, 'children'>, VariantProps<typeof buttonIconStyles> {
|
|
@@ -99,7 +112,7 @@ declare interface IButtonIconProps extends Omit<default_2.ButtonHTMLAttributes<H
|
|
|
99
112
|
notification?: boolean;
|
|
100
113
|
}
|
|
101
114
|
|
|
102
|
-
declare interface IButtonLinkProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof
|
|
115
|
+
declare interface IButtonLinkProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonLinkStyles> {
|
|
103
116
|
iconLeft?: {
|
|
104
117
|
name: TablerIconName;
|
|
105
118
|
stroke?: number;
|
|
@@ -128,12 +141,23 @@ declare interface ICardProps extends React.HTMLAttributes<HTMLDivElement>, Varia
|
|
|
128
141
|
|
|
129
142
|
export declare const IconComponent: ForwardRefExoticComponent<IIconComponentProps & RefAttributes<SVGSVGElement>>;
|
|
130
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
|
+
|
|
131
154
|
declare interface IIconComponentProps {
|
|
132
155
|
iconName: TablerIconName;
|
|
133
156
|
stroke?: number;
|
|
134
157
|
size?: number;
|
|
135
158
|
color?: string;
|
|
136
159
|
className?: string;
|
|
160
|
+
onClick?: () => void;
|
|
137
161
|
}
|
|
138
162
|
|
|
139
163
|
export declare const Input: ForwardRefExoticComponent<InputProps & RefAttributes<HTMLInputElement>>;
|
|
@@ -156,6 +180,7 @@ declare interface IPopoverProps {
|
|
|
156
180
|
open?: boolean;
|
|
157
181
|
placement?: PopoverPlacement;
|
|
158
182
|
closeOnAction?: boolean;
|
|
183
|
+
className?: string;
|
|
159
184
|
}
|
|
160
185
|
|
|
161
186
|
declare interface IProgressBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>, VariantProps<typeof progressBarStyles> {
|
|
@@ -175,13 +200,14 @@ declare interface ITooltipProps extends React.HTMLAttributes<HTMLSpanElement>, V
|
|
|
175
200
|
content: string;
|
|
176
201
|
}
|
|
177
202
|
|
|
178
|
-
export declare const Modal: ({ className, children, isOpen, setIsOpen, }: ModalProps) => JSX_2.Element;
|
|
203
|
+
export declare const Modal: ({ className, children, isOpen, setIsOpen, canClose, }: ModalProps) => JSX_2.Element;
|
|
179
204
|
|
|
180
205
|
declare interface ModalProps {
|
|
181
206
|
className?: string;
|
|
182
207
|
children: React.ReactNode;
|
|
183
208
|
isOpen: boolean;
|
|
184
209
|
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
210
|
+
canClose?: boolean;
|
|
185
211
|
}
|
|
186
212
|
|
|
187
213
|
declare interface OutsideClickHandlerProps {
|
|
@@ -189,16 +215,18 @@ declare interface OutsideClickHandlerProps {
|
|
|
189
215
|
handler: () => void;
|
|
190
216
|
}
|
|
191
217
|
|
|
192
|
-
export declare const Popover: ({ children, trigger, open, placement, closeOnAction, }: IPopoverProps) => JSX_2.Element;
|
|
218
|
+
export declare const Popover: ({ children, trigger, open, placement, closeOnAction, className, }: IPopoverProps) => JSX_2.Element;
|
|
193
219
|
|
|
194
|
-
declare type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right' | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
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';
|
|
221
|
+
|
|
222
|
+
declare type PositionProps = 'top-right' | 'top-left' | 'top' | 'bottom-right' | 'bottom-left' | 'bottom';
|
|
195
223
|
|
|
196
224
|
export declare const ProgressBar: ({ progress, className, intent, size, rounded, ...props }: IProgressBarProps) => JSX_2.Element;
|
|
197
225
|
|
|
198
226
|
declare const progressBarStyles: (props?: ({
|
|
199
|
-
intent?: "
|
|
200
|
-
size?: "
|
|
201
|
-
rounded?: "
|
|
227
|
+
intent?: "brand" | "blue" | "yellow" | "green" | null | undefined;
|
|
228
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
229
|
+
rounded?: "sm" | "full" | null | undefined;
|
|
202
230
|
} & ClassProp) | undefined) => string;
|
|
203
231
|
|
|
204
232
|
export declare const Spinner: ({ className }: ISpinnerProps) => JSX_2.Element;
|
|
@@ -213,16 +241,40 @@ declare const textStyles: (props?: ({
|
|
|
213
241
|
weight?: "bold" | "light" | "regular" | "semibold" | null | undefined;
|
|
214
242
|
} & ClassProp) | undefined) => string;
|
|
215
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
|
+
|
|
216
266
|
export declare const Tooltip: ForwardRefExoticComponent<ITooltipProps & RefAttributes<HTMLSpanElement>>;
|
|
217
267
|
|
|
218
268
|
declare const tooltipStyles: (props?: ({
|
|
219
|
-
shadow?: "none" | "
|
|
269
|
+
shadow?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
220
270
|
placement?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
221
271
|
delay?: 0 | 200 | 75 | 100 | 150 | 300 | 500 | null | undefined;
|
|
222
272
|
closeDelay?: 0 | 200 | 75 | 100 | 150 | 300 | 500 | null | undefined;
|
|
223
|
-
rounded?: "
|
|
273
|
+
rounded?: "sm" | "full" | null | undefined;
|
|
224
274
|
} & ClassProp) | undefined) => string;
|
|
225
275
|
|
|
226
276
|
export declare const useOutsideClick: ({ ref, handler }: OutsideClickHandlerProps) => void;
|
|
227
277
|
|
|
278
|
+
export declare const useToast: () => ToastContextType;
|
|
279
|
+
|
|
228
280
|
export { }
|