@clasing/ui 0.1.1 → 0.1.9-beta.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.
- package/README.md +33 -0
- package/dist/index.d.ts +345 -38
- package/dist/index.es.js +4122 -1803
- package/dist/index.umd.js +16 -18
- package/dist/style.css +1 -1
- package/package.json +89 -85
- package/tailwind.config.js +386 -421
package/README.md
CHANGED
|
@@ -3,3 +3,36 @@
|
|
|
3
3
|
UI library for Clasing react/nextjs projects
|
|
4
4
|
|
|
5
5
|
## Initiliazing the project
|
|
6
|
+
|
|
7
|
+
- Ensure you have pnpm installed.
|
|
8
|
+
- run `pnpm install` and then `pnpm storybook`
|
|
9
|
+
|
|
10
|
+
## Installation Guide inside a React project
|
|
11
|
+
|
|
12
|
+
This guide will help you to install ClasingUI in your React project.
|
|
13
|
+
|
|
14
|
+
### Step 1: Install the package
|
|
15
|
+
|
|
16
|
+
To install the packages, you need to run the following command: `npm install @clasing/ui`, `yarn add @clasing/ui` or `pnpm add @clasing/ui`
|
|
17
|
+
|
|
18
|
+
### Step 2: Initial configuration
|
|
19
|
+
|
|
20
|
+
#### If you are not using TailwindCSS
|
|
21
|
+
|
|
22
|
+
If you are not using TailwindCSS in your project, you need to add the following line to your `index.tsx`, `layout.tsx` or root file: `import "@clasing/ui/styles"`
|
|
23
|
+
|
|
24
|
+
#### If you are using TailwindCSS
|
|
25
|
+
|
|
26
|
+
If you are using TailwindCSS in your project, you need to add the following line to your `tailwind.config.js` file (have in account that you should have the initial config of TailwindCSS):
|
|
27
|
+
|
|
28
|
+
- At `content` array, add `./node_modules/@clasing/ui/dist/index.umd.js`
|
|
29
|
+
- At `presets` array, add `require('@clasing/ui/tailwind.config.js')`
|
|
30
|
+
- Add the following line to your `index.tsx`, `layout.tsx` or root file: `import "@clasing/ui/styles"`
|
|
31
|
+
|
|
32
|
+
### Step 3: Using the components
|
|
33
|
+
|
|
34
|
+
Now you can use the components in your project. You can import the components like this: `import { Button } from "@clasing/ui"`
|
|
35
|
+
|
|
36
|
+
## Contributing
|
|
37
|
+
|
|
38
|
+
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,27 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
|
|
3
1
|
import { ClassProp } from 'class-variance-authority/types';
|
|
4
2
|
import { default as default_2 } from 'react';
|
|
3
|
+
import { Dispatch } from 'react';
|
|
5
4
|
import { ForwardRefExoticComponent } from 'react';
|
|
6
|
-
import {
|
|
5
|
+
import { HTMLAttributes } from 'react';
|
|
6
|
+
import { JSX } from 'react/jsx-runtime';
|
|
7
|
+
import { JSX as JSX_2 } from 'react';
|
|
8
|
+
import { Matcher } from 'react-day-picker';
|
|
9
|
+
import { Placement } from '@floating-ui/react';
|
|
10
|
+
import { ReactNode } from 'react';
|
|
7
11
|
import { RefAttributes } from 'react';
|
|
12
|
+
import { SetStateAction } from 'react';
|
|
8
13
|
import * as TablerIcons from '@tabler/icons-react';
|
|
9
14
|
import { VariantProps } from 'class-variance-authority';
|
|
10
15
|
|
|
16
|
+
declare interface AddToastProps {
|
|
17
|
+
title?: ToastProps['title'];
|
|
18
|
+
message: ToastProps['message'];
|
|
19
|
+
intent: ToastProps['intent'];
|
|
20
|
+
position?: PositionProps;
|
|
21
|
+
canClose?: boolean;
|
|
22
|
+
duration?: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
11
25
|
export declare const Avatar: ForwardRefExoticComponent<AvatarProps & RefAttributes<HTMLImageElement>>;
|
|
12
26
|
|
|
13
27
|
declare interface AvatarProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
@@ -17,59 +31,145 @@ declare interface AvatarProps extends React.ImgHTMLAttributes<HTMLImageElement>
|
|
|
17
31
|
export declare const Badge: ForwardRefExoticComponent<IBadgeProps & RefAttributes<HTMLSpanElement>>;
|
|
18
32
|
|
|
19
33
|
declare const badgeStyles: (props?: ({
|
|
20
|
-
|
|
21
|
-
intent?: "neutral" | "
|
|
22
|
-
size?: "
|
|
34
|
+
utility?: "error" | "warning" | "success" | "info" | null | undefined;
|
|
35
|
+
intent?: "neutral" | "brand" | "brand-subtle" | "brand-bolder" | "blue" | "blue-subtle" | "blue-bolder" | "yellow" | "yellow-subtle" | "yellow-bolder" | "violet-subtle" | "violet" | "violet-bolder" | null | undefined;
|
|
36
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
23
37
|
weight?: "bold" | "light" | "regular" | "semibold" | null | undefined;
|
|
24
38
|
rounded?: "rectangle" | "full" | null | undefined;
|
|
25
39
|
} & ClassProp) | undefined) => string;
|
|
26
40
|
|
|
27
41
|
export declare const Button: ForwardRefExoticComponent<IButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
28
42
|
|
|
43
|
+
export declare const buttonActiveStyles: (props?: ({
|
|
44
|
+
intent?: "outline" | "primary-red" | "primary-blue" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
45
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
46
|
+
rounded?: "sm" | "full" | null | undefined;
|
|
47
|
+
weight?: "bold" | "light" | "regular" | "semibold" | null | undefined;
|
|
48
|
+
} & ClassProp) | undefined) => string;
|
|
49
|
+
|
|
29
50
|
export declare const ButtonIcon: default_2.ForwardRefExoticComponent<IButtonIconProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
30
51
|
|
|
31
|
-
declare const
|
|
32
|
-
intent?: "outline" | "
|
|
33
|
-
size?: "
|
|
34
|
-
rounded?: "
|
|
52
|
+
export declare const buttonIconActiveStyles: (props?: ({
|
|
53
|
+
intent?: "outline" | "primary-red" | "primary-blue" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
54
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
55
|
+
rounded?: "sm" | "full" | null | undefined;
|
|
56
|
+
} & ClassProp) | undefined) => string;
|
|
57
|
+
|
|
58
|
+
export declare const buttonIconLoadingStyles: (props?: ({
|
|
59
|
+
intent?: "outline" | "primary-red" | "primary-blue" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
60
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
61
|
+
rounded?: "sm" | "full" | null | undefined;
|
|
62
|
+
} & ClassProp) | undefined) => string;
|
|
63
|
+
|
|
64
|
+
export declare const buttonIconStyles: (props?: ({
|
|
65
|
+
intent?: "outline" | "primary-red" | "primary-blue" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
66
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
67
|
+
rounded?: "sm" | "full" | null | undefined;
|
|
35
68
|
} & ClassProp) | undefined) => string;
|
|
36
69
|
|
|
37
70
|
export declare const ButtonLink: ForwardRefExoticComponent<IButtonLinkProps & RefAttributes<HTMLButtonElement>>;
|
|
38
71
|
|
|
39
|
-
declare const
|
|
40
|
-
intent?: "
|
|
41
|
-
size?: "
|
|
72
|
+
export declare const buttonLinkStyles: (props?: ({
|
|
73
|
+
intent?: "primary" | null | undefined;
|
|
74
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
42
75
|
weight?: "bold" | "light" | "regular" | "semibold" | null | undefined;
|
|
43
76
|
} & ClassProp) | undefined) => string;
|
|
44
77
|
|
|
45
|
-
declare const
|
|
46
|
-
intent?: "primary" | null | undefined;
|
|
47
|
-
size?: "
|
|
78
|
+
export declare const buttonLoadingStyles: (props?: ({
|
|
79
|
+
intent?: "outline" | "primary-red" | "primary-blue" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
80
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
81
|
+
rounded?: "sm" | "full" | null | undefined;
|
|
82
|
+
weight?: "bold" | "light" | "regular" | "semibold" | null | undefined;
|
|
83
|
+
} & ClassProp) | undefined) => string;
|
|
84
|
+
|
|
85
|
+
export declare const buttonStyles: (props?: ({
|
|
86
|
+
intent?: "outline" | "primary-red" | "primary-blue" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
87
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
88
|
+
rounded?: "sm" | "full" | null | undefined;
|
|
48
89
|
weight?: "bold" | "light" | "regular" | "semibold" | null | undefined;
|
|
49
90
|
} & ClassProp) | undefined) => string;
|
|
50
91
|
|
|
92
|
+
export declare const Calendar: React.FC<ICalendarProps>;
|
|
93
|
+
|
|
51
94
|
export declare const Card: ForwardRefExoticComponent<ICardProps & RefAttributes<HTMLDivElement>>;
|
|
52
95
|
|
|
53
96
|
declare const cardStyles: (props?: ({
|
|
54
|
-
intent?: "
|
|
55
|
-
shadow?: "none" | "
|
|
97
|
+
intent?: "default" | "outline" | null | undefined;
|
|
98
|
+
shadow?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
56
99
|
} & ClassProp) | undefined) => string;
|
|
57
100
|
|
|
58
|
-
declare
|
|
101
|
+
export declare const Checkbox: ForwardRefExoticComponent<CheckboxProps & RefAttributes<HTMLInputElement>>;
|
|
102
|
+
|
|
103
|
+
declare interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
104
|
+
label?: string;
|
|
105
|
+
helperText?: string;
|
|
106
|
+
error?: string;
|
|
107
|
+
touched?: boolean;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export declare const Chip: ForwardRefExoticComponent<IChipProps & RefAttributes<HTMLButtonElement>>;
|
|
111
|
+
|
|
112
|
+
export declare const chipStyles: (props?: ({
|
|
113
|
+
intent?: "error" | "disabled" | "selected" | "unselected" | null | undefined;
|
|
114
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
115
|
+
weight?: "bold" | "light" | "regular" | "semibold" | null | undefined;
|
|
116
|
+
} & ClassProp) | undefined) => string;
|
|
117
|
+
|
|
118
|
+
export declare const Datepicker: ForwardRefExoticComponent<IDatepickerProps & RefAttributes<HTMLInputElement>>;
|
|
119
|
+
|
|
120
|
+
export declare const DateRangePicker: ForwardRefExoticComponent<IDateRangePickerProps & RefAttributes<HTMLInputElement>>;
|
|
121
|
+
|
|
122
|
+
export declare const DayTimePicker: ({ availableHours, availableTimes, onSelectionChange, locale, intervalMinutes, singleSelection, singleSelectionPerDay, disabledDays, }: DayTimePickerProps) => JSX.Element;
|
|
123
|
+
|
|
124
|
+
declare interface DayTimePickerProps {
|
|
125
|
+
availableHours?: {
|
|
126
|
+
start: string;
|
|
127
|
+
end: string;
|
|
128
|
+
};
|
|
129
|
+
availableTimes?: {
|
|
130
|
+
[key in WeekDay]?: string[];
|
|
131
|
+
};
|
|
132
|
+
onSelectionChange?: (selectedTimes: {
|
|
133
|
+
[key in WeekDay]?: string[];
|
|
134
|
+
}) => void;
|
|
135
|
+
locale?: 'enGB' | 'enUS' | 'es';
|
|
136
|
+
intervalMinutes?: 30 | 60;
|
|
137
|
+
singleSelection?: boolean;
|
|
138
|
+
singleSelectionPerDay?: boolean;
|
|
139
|
+
disabledDays?: WeekDay[];
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export declare const Divider: ForwardRefExoticComponent<IDividerProps & RefAttributes<HTMLSpanElement>>;
|
|
143
|
+
|
|
144
|
+
declare type DropdownOption<T extends string | number | readonly string[] | undefined> = {
|
|
59
145
|
label: string;
|
|
60
146
|
value: T;
|
|
61
147
|
};
|
|
62
148
|
|
|
63
|
-
export declare const DropdownSelect: ForwardRefExoticComponent<DropdownSelectProps<any> & RefAttributes<
|
|
149
|
+
export declare const DropdownSelect: ForwardRefExoticComponent<DropdownSelectProps<any> & RefAttributes<HTMLDivElement>>;
|
|
64
150
|
|
|
65
|
-
declare interface DropdownSelectProps<T> extends React.SelectHTMLAttributes<
|
|
151
|
+
declare interface DropdownSelectProps<T extends string | number | readonly string[] | undefined> extends Omit<React.SelectHTMLAttributes<HTMLDivElement>, 'value' | 'onChange'> {
|
|
66
152
|
label?: string;
|
|
67
153
|
helperText?: string;
|
|
154
|
+
disabled?: boolean;
|
|
68
155
|
error?: string;
|
|
69
156
|
touched?: boolean;
|
|
70
157
|
iconName?: TablerIconName;
|
|
158
|
+
placement?: PopoverPlacement;
|
|
71
159
|
placeholder?: string;
|
|
160
|
+
canSearch?: boolean;
|
|
161
|
+
searchPlaceholder?: string;
|
|
162
|
+
canSelectAll?: boolean;
|
|
163
|
+
selectAllLabel?: string;
|
|
72
164
|
options?: DropdownOption<T>[];
|
|
165
|
+
value?: T;
|
|
166
|
+
onChange?: (value: T | null) => void;
|
|
167
|
+
dropdownWidth?: PopoverWidth;
|
|
168
|
+
asyncSearch?: boolean;
|
|
169
|
+
isLoading?: boolean;
|
|
170
|
+
onSearch?: (query: string) => void;
|
|
171
|
+
noOptionsMessage?: string;
|
|
172
|
+
disableSearchWhileLoading?: boolean;
|
|
73
173
|
}
|
|
74
174
|
|
|
75
175
|
declare interface IBadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeStyles> {
|
|
@@ -81,6 +181,7 @@ declare interface IBadgeProps extends React.HTMLAttributes<HTMLSpanElement>, Var
|
|
|
81
181
|
name: TablerIconName;
|
|
82
182
|
stroke?: number;
|
|
83
183
|
} | TablerIconName;
|
|
184
|
+
iconOnly?: boolean;
|
|
84
185
|
}
|
|
85
186
|
|
|
86
187
|
declare interface IButtonIconProps extends Omit<default_2.ButtonHTMLAttributes<HTMLButtonElement>, 'children'>, VariantProps<typeof buttonIconStyles> {
|
|
@@ -88,11 +189,13 @@ declare interface IButtonIconProps extends Omit<default_2.ButtonHTMLAttributes<H
|
|
|
88
189
|
name: TablerIconName;
|
|
89
190
|
stroke?: number;
|
|
90
191
|
} | TablerIconName;
|
|
192
|
+
iconText?: string;
|
|
91
193
|
isLoading?: boolean;
|
|
194
|
+
isActive?: boolean;
|
|
92
195
|
notification?: boolean;
|
|
93
196
|
}
|
|
94
197
|
|
|
95
|
-
declare interface IButtonLinkProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof
|
|
198
|
+
declare interface IButtonLinkProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonLinkStyles> {
|
|
96
199
|
iconLeft?: {
|
|
97
200
|
name: TablerIconName;
|
|
98
201
|
stroke?: number;
|
|
@@ -101,6 +204,8 @@ declare interface IButtonLinkProps extends React.ButtonHTMLAttributes<HTMLButton
|
|
|
101
204
|
name: TablerIconName;
|
|
102
205
|
stroke?: number;
|
|
103
206
|
} | TablerIconName;
|
|
207
|
+
iconTextLeft?: string;
|
|
208
|
+
iconTextRight?: string;
|
|
104
209
|
isLoading?: boolean;
|
|
105
210
|
}
|
|
106
211
|
|
|
@@ -113,82 +218,249 @@ declare interface IButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElem
|
|
|
113
218
|
name: TablerIconName;
|
|
114
219
|
stroke?: number;
|
|
115
220
|
} | TablerIconName;
|
|
221
|
+
iconTextLeft?: string;
|
|
222
|
+
iconTextRight?: string;
|
|
116
223
|
isLoading?: boolean;
|
|
224
|
+
isActive?: boolean;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
declare interface ICalendarProps {
|
|
228
|
+
locale?: 'enGB' | 'enUS' | 'es';
|
|
229
|
+
disabledDates?: string | string[] | Date | Date[] | undefined;
|
|
230
|
+
enabledDates?: string | string[] | Date | Date[] | undefined;
|
|
231
|
+
dropdownsSelectors?: boolean;
|
|
232
|
+
hideNavigation?: boolean;
|
|
233
|
+
showOutsideDays?: boolean;
|
|
234
|
+
minDate?: Date;
|
|
235
|
+
maxDate?: Date;
|
|
236
|
+
value?: string;
|
|
237
|
+
onChange?: (value: string | undefined) => void | undefined;
|
|
238
|
+
className?: string;
|
|
117
239
|
}
|
|
118
240
|
|
|
119
241
|
declare interface ICardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardStyles> {
|
|
120
242
|
}
|
|
121
243
|
|
|
244
|
+
declare interface IChipProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof chipStyles> {
|
|
245
|
+
iconLeft?: {
|
|
246
|
+
name: TablerIconName;
|
|
247
|
+
stroke?: number;
|
|
248
|
+
} | TablerIconName;
|
|
249
|
+
iconRight?: {
|
|
250
|
+
name: TablerIconName;
|
|
251
|
+
stroke?: number;
|
|
252
|
+
} | TablerIconName;
|
|
253
|
+
notification?: boolean;
|
|
254
|
+
}
|
|
255
|
+
|
|
122
256
|
export declare const IconComponent: ForwardRefExoticComponent<IIconComponentProps & RefAttributes<SVGSVGElement>>;
|
|
123
257
|
|
|
258
|
+
declare interface IDatepickerProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
259
|
+
label?: string;
|
|
260
|
+
helperText?: string;
|
|
261
|
+
error?: string;
|
|
262
|
+
touched?: boolean;
|
|
263
|
+
value?: string;
|
|
264
|
+
locale?: 'enGB' | 'enUS' | 'es';
|
|
265
|
+
placement?: PopoverPlacement;
|
|
266
|
+
placeholder?: string;
|
|
267
|
+
disabledDates?: string | string[] | Date | Date[] | undefined;
|
|
268
|
+
enabledDates?: string | string[] | Date | Date[] | undefined;
|
|
269
|
+
calendarDropdowns?: boolean;
|
|
270
|
+
hideNavigation?: boolean;
|
|
271
|
+
showOutsideDays?: boolean;
|
|
272
|
+
closeOnAction?: boolean;
|
|
273
|
+
minDate?: Date;
|
|
274
|
+
maxDate?: Date;
|
|
275
|
+
disabled?: boolean;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
declare interface IDateRangePickerProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
279
|
+
label?: string;
|
|
280
|
+
helperText?: string;
|
|
281
|
+
error?: string;
|
|
282
|
+
touched?: boolean;
|
|
283
|
+
startDate: string;
|
|
284
|
+
endDate: string;
|
|
285
|
+
calendarDropdowns?: boolean;
|
|
286
|
+
disabledDates?: Matcher | Matcher[] | undefined;
|
|
287
|
+
locale?: 'enGB' | 'enUS' | 'es';
|
|
288
|
+
placement?: PopoverPlacement;
|
|
289
|
+
placeholder?: string;
|
|
290
|
+
minDate?: Date;
|
|
291
|
+
maxDate?: Date;
|
|
292
|
+
disabled?: boolean;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
declare interface IDividerProps extends HTMLAttributes<HTMLSpanElement> {
|
|
296
|
+
orientation?: 'horizontal' | 'vertical';
|
|
297
|
+
}
|
|
298
|
+
|
|
124
299
|
declare interface IIconComponentProps {
|
|
125
|
-
iconName
|
|
300
|
+
iconName?: TablerIconName;
|
|
301
|
+
iconText?: string;
|
|
126
302
|
stroke?: number;
|
|
127
303
|
size?: number;
|
|
128
304
|
color?: string;
|
|
129
305
|
className?: string;
|
|
306
|
+
onClick?: () => void;
|
|
130
307
|
}
|
|
131
308
|
|
|
132
|
-
|
|
309
|
+
declare interface IInteractiveCardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof interactiveCardStyles> {
|
|
310
|
+
isActive?: boolean;
|
|
311
|
+
title?: string;
|
|
312
|
+
text?: string;
|
|
313
|
+
helperText?: string;
|
|
314
|
+
disabled?: boolean;
|
|
315
|
+
utilityBadge?: IBadgeProps['utility'];
|
|
316
|
+
colorBadge?: IBadgeProps['intent'];
|
|
317
|
+
badgeText?: string;
|
|
318
|
+
badgeSize?: 'xs' | 'sm' | 'md' | 'lg';
|
|
319
|
+
iconName?: TablerIconName;
|
|
320
|
+
iconText?: string;
|
|
321
|
+
tooltipText?: string;
|
|
322
|
+
tooltipTitle?: string;
|
|
323
|
+
tooltipIconName?: TablerIconName;
|
|
324
|
+
tooltipPlacement?: Placement;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export declare const Input: ForwardRefExoticComponent<InputProps & RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
|
|
133
328
|
|
|
134
|
-
declare interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
329
|
+
declare interface InputProps extends React.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement> {
|
|
135
330
|
label?: string;
|
|
136
331
|
helperText?: string;
|
|
137
332
|
error?: string;
|
|
138
333
|
touched?: boolean;
|
|
334
|
+
type?: 'text' | 'textarea' | 'password' | 'email' | 'number' | 'tel' | 'url' | 'color';
|
|
139
335
|
iconName?: {
|
|
140
336
|
name: TablerIconName;
|
|
141
337
|
stroke?: number;
|
|
142
338
|
} | TablerIconName;
|
|
143
339
|
}
|
|
144
340
|
|
|
341
|
+
export declare const InteractiveCard: ForwardRefExoticComponent<IInteractiveCardProps & RefAttributes<HTMLDivElement>>;
|
|
342
|
+
|
|
343
|
+
declare const interactiveCardStyles: (props?: ({
|
|
344
|
+
intent?: "default" | "outline" | null | undefined;
|
|
345
|
+
shadow?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
346
|
+
} & ClassProp) | undefined) => string;
|
|
347
|
+
|
|
145
348
|
declare interface IPopoverProps {
|
|
146
349
|
children: default_2.ReactNode;
|
|
147
|
-
trigger:
|
|
350
|
+
trigger: JSX_2.Element;
|
|
148
351
|
open?: boolean;
|
|
149
352
|
placement?: PopoverPlacement;
|
|
150
353
|
closeOnAction?: boolean;
|
|
354
|
+
close?: boolean;
|
|
355
|
+
className?: string;
|
|
356
|
+
onMouseDown?: (e: default_2.MouseEvent) => void;
|
|
357
|
+
onMouseUp?: (e: default_2.MouseEvent) => void;
|
|
358
|
+
popoverWidth?: 'as-trigger' | 'auto';
|
|
359
|
+
disabled?: boolean;
|
|
151
360
|
}
|
|
152
361
|
|
|
153
362
|
declare interface IProgressBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>, VariantProps<typeof progressBarStyles> {
|
|
154
363
|
progress: number;
|
|
155
364
|
}
|
|
156
365
|
|
|
366
|
+
declare interface ISelectableChipsProps {
|
|
367
|
+
id?: string;
|
|
368
|
+
label?: string;
|
|
369
|
+
options: Option_2[];
|
|
370
|
+
multiple?: boolean;
|
|
371
|
+
selectedOptions: Option_2['value'] | Option_2['value'][] | undefined;
|
|
372
|
+
setSelectedOptions: Dispatch<SetStateAction<Option_2['value'] | Option_2['value'][] | undefined>>;
|
|
373
|
+
className?: string;
|
|
374
|
+
disabled?: boolean;
|
|
375
|
+
helperText?: string;
|
|
376
|
+
error?: string;
|
|
377
|
+
touched?: boolean;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
declare interface ISkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
381
|
+
}
|
|
382
|
+
|
|
157
383
|
declare interface ISpinnerProps {
|
|
158
384
|
className?: string;
|
|
159
385
|
}
|
|
160
386
|
|
|
387
|
+
declare interface ISwitchProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof switchRootStyles> {
|
|
388
|
+
defaultChecked?: boolean;
|
|
389
|
+
checked?: boolean;
|
|
390
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
391
|
+
}
|
|
392
|
+
|
|
161
393
|
declare interface ITextProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof textStyles> {
|
|
162
|
-
as?: 'span' | 'p' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
394
|
+
as?: 'span' | 'p' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label';
|
|
163
395
|
className?: string;
|
|
164
396
|
}
|
|
165
397
|
|
|
166
|
-
|
|
398
|
+
declare interface ITooltipProps {
|
|
399
|
+
children: React.ReactNode;
|
|
400
|
+
trigger?: React.ReactNode;
|
|
401
|
+
className?: string;
|
|
402
|
+
placement?: Placement;
|
|
403
|
+
iconName?: TablerIconName;
|
|
404
|
+
arrow?: boolean;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export declare const Modal: ({ className, children, isOpen, setIsOpen, canClose, intent, overlay, closeButtonAriaLabel, closeOnClickOutside, }: ModalProps) => JSX.Element | null;
|
|
167
408
|
|
|
168
409
|
declare interface ModalProps {
|
|
169
410
|
className?: string;
|
|
170
|
-
children:
|
|
411
|
+
children: default_2.ReactNode;
|
|
171
412
|
isOpen: boolean;
|
|
172
|
-
setIsOpen
|
|
413
|
+
setIsOpen?: default_2.Dispatch<default_2.SetStateAction<boolean>>;
|
|
414
|
+
canClose?: boolean;
|
|
415
|
+
intent?: 'card' | 'sheet' | 'wizard' | 'fullscreen';
|
|
416
|
+
overlay?: 'blur' | 'opacity';
|
|
417
|
+
closeButtonAriaLabel?: string;
|
|
418
|
+
closeOnClickOutside?: boolean;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
declare type Option_2 = {
|
|
422
|
+
value: string | number | boolean | undefined | null;
|
|
423
|
+
label: string;
|
|
424
|
+
notification?: boolean;
|
|
425
|
+
};
|
|
426
|
+
export { Option_2 as Option }
|
|
427
|
+
|
|
428
|
+
declare interface OutsideClickHandlerProps {
|
|
429
|
+
ref: React.RefObject<HTMLElement | null>;
|
|
430
|
+
handler: () => void;
|
|
173
431
|
}
|
|
174
432
|
|
|
175
|
-
export declare const Popover:
|
|
433
|
+
export declare const Popover: default_2.ForwardRefExoticComponent<IPopoverProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
176
434
|
|
|
177
|
-
declare type PopoverPlacement =
|
|
435
|
+
declare type PopoverPlacement = Placement;
|
|
178
436
|
|
|
179
|
-
|
|
437
|
+
declare type PopoverWidth = 'as-trigger' | 'auto';
|
|
438
|
+
|
|
439
|
+
declare type PositionProps = 'top-right' | 'top-left' | 'top' | 'bottom-right' | 'bottom-left' | 'bottom';
|
|
440
|
+
|
|
441
|
+
export declare const ProgressBar: ({ progress, className, intent, size, rounded, ...props }: IProgressBarProps) => JSX.Element;
|
|
180
442
|
|
|
181
443
|
declare const progressBarStyles: (props?: ({
|
|
182
|
-
intent?: "
|
|
183
|
-
size?: "
|
|
184
|
-
rounded?: "
|
|
444
|
+
intent?: "brand" | "blue" | "yellow" | "green" | null | undefined;
|
|
445
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
446
|
+
rounded?: "sm" | "full" | null | undefined;
|
|
185
447
|
} & ClassProp) | undefined) => string;
|
|
186
448
|
|
|
187
|
-
export declare const
|
|
449
|
+
export declare const SelectableChips: ({ id, label, options, multiple, selectedOptions, setSelectedOptions, className, disabled, helperText, error, touched, }: ISelectableChipsProps) => JSX.Element | null;
|
|
450
|
+
|
|
451
|
+
export declare const Skeleton: ({ className, ...props }: ISkeletonProps) => JSX.Element;
|
|
452
|
+
|
|
453
|
+
export declare const Spinner: ({ className }: ISpinnerProps) => JSX.Element;
|
|
454
|
+
|
|
455
|
+
export declare const Switch: ForwardRefExoticComponent<ISwitchProps & RefAttributes<HTMLButtonElement>>;
|
|
456
|
+
|
|
457
|
+
declare const switchRootStyles: (props?: ({
|
|
458
|
+
switchSize?: "sm" | "md" | null | undefined;
|
|
459
|
+
} & ClassProp) | undefined) => string;
|
|
188
460
|
|
|
189
461
|
declare type TablerIconName = keyof typeof TablerIcons;
|
|
190
462
|
|
|
191
|
-
declare const Text_2: ({ as, intent, className, weight, ...props }: ITextProps) =>
|
|
463
|
+
declare const Text_2: ({ as, intent, className, weight, ...props }: ITextProps) => JSX.Element;
|
|
192
464
|
export { Text_2 as Text }
|
|
193
465
|
|
|
194
466
|
declare const textStyles: (props?: ({
|
|
@@ -196,4 +468,39 @@ declare const textStyles: (props?: ({
|
|
|
196
468
|
weight?: "bold" | "light" | "regular" | "semibold" | null | undefined;
|
|
197
469
|
} & ClassProp) | undefined) => string;
|
|
198
470
|
|
|
471
|
+
export declare const Toast: default_2.ForwardRefExoticComponent<ToastProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
472
|
+
|
|
473
|
+
declare type ToastContextType = (props: AddToastProps) => void;
|
|
474
|
+
|
|
475
|
+
declare interface ToastProps extends default_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof toastStyles> {
|
|
476
|
+
title?: string;
|
|
477
|
+
message: string;
|
|
478
|
+
canClose?: boolean;
|
|
479
|
+
onClose?: () => void;
|
|
480
|
+
position?: PositionProps;
|
|
481
|
+
duration?: number;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
export declare const ToastProvider: default_2.FC<ToastProviderProps>;
|
|
485
|
+
|
|
486
|
+
declare type ToastProviderProps = {
|
|
487
|
+
children: ReactNode;
|
|
488
|
+
position?: PositionProps;
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
declare const toastStyles: (props?: ({
|
|
492
|
+
intent?: "error" | "warning" | "success" | "info" | "neutral" | null | undefined;
|
|
493
|
+
} & ClassProp) | undefined) => string;
|
|
494
|
+
|
|
495
|
+
export declare const Tooltip: {
|
|
496
|
+
({ children, trigger, className, placement, iconName, arrow: isArrow, }: ITooltipProps): JSX.Element;
|
|
497
|
+
displayName: string;
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
export declare const useOutsideClick: ({ ref, handler }: OutsideClickHandlerProps) => void;
|
|
501
|
+
|
|
502
|
+
export declare const useToast: () => ToastContextType;
|
|
503
|
+
|
|
504
|
+
declare type WeekDay = 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY';
|
|
505
|
+
|
|
199
506
|
export { }
|