@clasing/ui 0.1.106 → 0.1.108

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 CHANGED
@@ -10,6 +10,7 @@ import { Placement } from '@floating-ui/react';
10
10
  import { ReactNode } from 'react';
11
11
  import { RefAttributes } from 'react';
12
12
  import { SetStateAction } from 'react';
13
+ import { SVGAttributes } from 'react';
13
14
  import * as TablerIcons from '@tabler/icons-react';
14
15
  import { VariantProps } from 'class-variance-authority';
15
16
 
@@ -29,17 +30,17 @@ export declare const Badge: ForwardRefExoticComponent<IBadgeProps & RefAttribute
29
30
 
30
31
  declare const badgeStyles: (props?: ({
31
32
  utility?: "error" | "info" | "success" | "warning" | null | undefined;
32
- intent?: "neutral" | "brand" | "brand-subtle" | "brand-bolder" | "blue" | "blue-subtle" | "blue-bolder" | "yellow" | "yellow-subtle" | "yellow-bolder" | "violet-subtle" | "violet" | "violet-bolder" | null | undefined;
33
+ intent?: "neutral" | "primary" | "yellow" | "blue" | "violet" | null | undefined;
33
34
  size?: "xs" | "sm" | "md" | "lg" | null | undefined;
34
35
  weight?: "light" | "regular" | "semibold" | "bold" | null | undefined;
35
- rounded?: "rectangle" | "full" | null | undefined;
36
+ rounded?: "sm" | "full" | null | undefined;
36
37
  } & ClassProp) | undefined) => string;
37
38
 
38
39
  export declare const Button: ForwardRefExoticComponent<IButtonProps & RefAttributes<HTMLButtonElement>>;
39
40
 
40
41
  export declare const buttonActiveStyles: (props?: ({
41
- intent?: "outline" | "primary-red" | "primary-blue" | "secondary" | "ghost" | "destructive" | null | undefined;
42
- size?: "sm" | "md" | "lg" | null | undefined;
42
+ intent?: "outline" | "primary" | "secondary" | "inverse" | "ghost" | "destructive" | null | undefined;
43
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
43
44
  rounded?: "sm" | "full" | null | undefined;
44
45
  weight?: "light" | "regular" | "semibold" | "bold" | null | undefined;
45
46
  } & ClassProp) | undefined) => string;
@@ -47,20 +48,20 @@ export declare const buttonActiveStyles: (props?: ({
47
48
  export declare const ButtonIcon: default_2.ForwardRefExoticComponent<IButtonIconProps & default_2.RefAttributes<HTMLButtonElement>>;
48
49
 
49
50
  export declare const buttonIconActiveStyles: (props?: ({
50
- intent?: "outline" | "primary-red" | "primary-blue" | "secondary" | "ghost" | "destructive" | null | undefined;
51
- size?: "sm" | "md" | "lg" | null | undefined;
51
+ intent?: "primary" | "destructive" | null | undefined;
52
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
52
53
  rounded?: "sm" | "full" | null | undefined;
53
54
  } & ClassProp) | undefined) => string;
54
55
 
55
56
  export declare const buttonIconLoadingStyles: (props?: ({
56
- intent?: "outline" | "primary-red" | "primary-blue" | "secondary" | "ghost" | "destructive" | null | undefined;
57
- size?: "sm" | "md" | "lg" | null | undefined;
57
+ intent?: "primary" | "destructive" | null | undefined;
58
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
58
59
  rounded?: "sm" | "full" | null | undefined;
59
60
  } & ClassProp) | undefined) => string;
60
61
 
61
62
  export declare const buttonIconStyles: (props?: ({
62
- intent?: "outline" | "primary-red" | "primary-blue" | "secondary" | "ghost" | "destructive" | null | undefined;
63
- size?: "sm" | "md" | "lg" | null | undefined;
63
+ intent?: "primary" | "destructive" | null | undefined;
64
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
64
65
  rounded?: "sm" | "full" | null | undefined;
65
66
  } & ClassProp) | undefined) => string;
66
67
 
@@ -69,19 +70,20 @@ export declare const ButtonLink: ForwardRefExoticComponent<IButtonLinkProps & Re
69
70
  export declare const buttonLinkStyles: (props?: ({
70
71
  intent?: "primary" | null | undefined;
71
72
  size?: "sm" | "md" | "lg" | null | undefined;
73
+ rounded?: "sm" | "full" | null | undefined;
72
74
  weight?: "light" | "regular" | "semibold" | "bold" | null | undefined;
73
75
  } & ClassProp) | undefined) => string;
74
76
 
75
77
  export declare const buttonLoadingStyles: (props?: ({
76
- intent?: "outline" | "primary-red" | "primary-blue" | "secondary" | "ghost" | "destructive" | null | undefined;
77
- size?: "sm" | "md" | "lg" | null | undefined;
78
+ intent?: "outline" | "primary" | "secondary" | "inverse" | "ghost" | "destructive" | null | undefined;
79
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
78
80
  rounded?: "sm" | "full" | null | undefined;
79
81
  weight?: "light" | "regular" | "semibold" | "bold" | null | undefined;
80
82
  } & ClassProp) | undefined) => string;
81
83
 
82
84
  export declare const buttonStyles: (props?: ({
83
- intent?: "outline" | "primary-red" | "primary-blue" | "secondary" | "ghost" | "destructive" | null | undefined;
84
- size?: "sm" | "md" | "lg" | null | undefined;
85
+ intent?: "outline" | "primary" | "secondary" | "inverse" | "ghost" | "destructive" | null | undefined;
86
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
85
87
  rounded?: "sm" | "full" | null | undefined;
86
88
  weight?: "light" | "regular" | "semibold" | "bold" | null | undefined;
87
89
  } & ClassProp) | undefined) => string;
@@ -105,7 +107,7 @@ declare interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputEleme
105
107
  touched?: boolean;
106
108
  }
107
109
 
108
- export declare const Chip: ForwardRefExoticComponent<IChipProps & RefAttributes<HTMLButtonElement>>;
110
+ export declare const Chip: default_2.ForwardRefExoticComponent<IChipProps & default_2.RefAttributes<HTMLDivElement | HTMLButtonElement>>;
109
111
 
110
112
  export declare const chipStyles: (props?: ({
111
113
  intent?: "error" | "selected" | "unselected" | null | undefined;
@@ -142,6 +144,7 @@ export declare const Divider: ForwardRefExoticComponent<IDividerProps & RefAttri
142
144
  declare type DropdownOption<T extends string | number | readonly string[] | undefined> = {
143
145
  label: string;
144
146
  value: T;
147
+ component?: React.ReactNode;
145
148
  };
146
149
 
147
150
  export declare const DropdownSelect: ForwardRefExoticComponent<DropdownSelectProps<any> & RefAttributes<HTMLDivElement>>;
@@ -152,6 +155,8 @@ declare interface DropdownSelectProps<T extends string | number | readonly strin
152
155
  disabled?: boolean;
153
156
  error?: string;
154
157
  touched?: boolean;
158
+ triggerSize?: 'sm' | 'md' | 'lg';
159
+ rounded?: 'sm' | 'full';
155
160
  iconName?: TablerIconName;
156
161
  placement?: PopoverPlacement;
157
162
  placeholder?: string;
@@ -168,6 +173,7 @@ declare interface DropdownSelectProps<T extends string | number | readonly strin
168
173
  onSearch?: (query: string) => void;
169
174
  noOptionsMessage?: string;
170
175
  disableSearchWhileLoading?: boolean;
176
+ dropdownClassName?: string;
171
177
  }
172
178
 
173
179
  declare interface IAlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertStyles> {
@@ -180,11 +186,11 @@ declare interface IAlertProps extends React.HTMLAttributes<HTMLDivElement>, Vari
180
186
  declare interface IBadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeStyles> {
181
187
  iconLeft?: {
182
188
  name: TablerIconName;
183
- stroke?: number;
189
+ stroke?: string;
184
190
  } | TablerIconName;
185
191
  iconRight?: {
186
192
  name: TablerIconName;
187
- stroke?: number;
193
+ stroke?: string;
188
194
  } | TablerIconName;
189
195
  iconOnly?: boolean;
190
196
  }
@@ -192,22 +198,21 @@ declare interface IBadgeProps extends React.HTMLAttributes<HTMLSpanElement>, Var
192
198
  declare interface IButtonIconProps extends Omit<default_2.ButtonHTMLAttributes<HTMLButtonElement>, 'children'>, VariantProps<typeof buttonIconStyles> {
193
199
  iconName: {
194
200
  name: TablerIconName;
195
- stroke?: number;
201
+ stroke?: string;
196
202
  } | TablerIconName;
197
203
  iconText?: string;
198
204
  isLoading?: boolean;
199
205
  isActive?: boolean;
200
- notification?: boolean;
201
206
  }
202
207
 
203
208
  declare interface IButtonLinkProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonLinkStyles> {
204
209
  iconLeft?: {
205
210
  name: TablerIconName;
206
- stroke?: number;
211
+ stroke?: string;
207
212
  } | TablerIconName;
208
213
  iconRight?: {
209
214
  name: TablerIconName;
210
- stroke?: number;
215
+ stroke?: string;
211
216
  } | TablerIconName;
212
217
  iconTextLeft?: string;
213
218
  iconTextRight?: string;
@@ -217,11 +222,11 @@ declare interface IButtonLinkProps extends React.ButtonHTMLAttributes<HTMLButton
217
222
  declare interface IButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonStyles> {
218
223
  iconLeft?: {
219
224
  name: TablerIconName;
220
- stroke?: number;
225
+ stroke?: string;
221
226
  } | TablerIconName;
222
227
  iconRight?: {
223
228
  name: TablerIconName;
224
- stroke?: number;
229
+ stroke?: string;
225
230
  } | TablerIconName;
226
231
  iconTextLeft?: string;
227
232
  iconTextRight?: string;
@@ -246,16 +251,20 @@ declare interface ICalendarProps {
246
251
  declare interface ICardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardStyles> {
247
252
  }
248
253
 
249
- declare interface IChipProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof chipStyles> {
254
+ declare interface IChipProps extends VariantProps<typeof chipStyles> {
250
255
  iconLeft?: {
251
256
  name: TablerIconName;
252
- stroke?: number;
257
+ stroke?: string;
253
258
  } | TablerIconName;
254
259
  iconRight?: {
255
260
  name: TablerIconName;
256
- stroke?: number;
261
+ stroke?: string;
257
262
  } | TablerIconName;
258
263
  notification?: boolean;
264
+ onClick?: () => void;
265
+ disabled?: boolean;
266
+ className?: string;
267
+ children?: default_2.ReactNode;
259
268
  }
260
269
 
261
270
  export declare const IconComponent: ForwardRefExoticComponent<IIconComponentProps & RefAttributes<SVGSVGElement>>;
@@ -267,6 +276,8 @@ declare interface IDatepickerProps extends React.InputHTMLAttributes<HTMLInputEl
267
276
  touched?: boolean;
268
277
  value?: string;
269
278
  locale?: 'enGB' | 'enUS' | 'es';
279
+ triggerSize?: 'sm' | 'md' | 'lg';
280
+ rounded?: 'sm' | 'full';
270
281
  placement?: PopoverPlacement;
271
282
  placeholder?: string;
272
283
  disabledDates?: string | string[] | Date | Date[] | undefined;
@@ -285,6 +296,8 @@ declare interface IDateRangePickerProps extends React.InputHTMLAttributes<HTMLIn
285
296
  helperText?: string;
286
297
  error?: string;
287
298
  touched?: boolean;
299
+ triggerSize?: 'sm' | 'md' | 'lg';
300
+ rounded?: 'sm' | 'full';
288
301
  startDate: string;
289
302
  endDate: string;
290
303
  calendarDropdowns?: boolean;
@@ -301,13 +314,11 @@ declare interface IDividerProps extends HTMLAttributes<HTMLSpanElement> {
301
314
  orientation?: 'horizontal' | 'vertical';
302
315
  }
303
316
 
304
- declare interface IIconComponentProps {
317
+ declare interface IIconComponentProps extends SVGAttributes<SVGElement> {
305
318
  iconName?: TablerIconName;
306
319
  iconText?: string;
307
- stroke?: number;
308
320
  size?: number;
309
321
  color?: string;
310
- className?: string;
311
322
  onClick?: () => void;
312
323
  }
313
324
 
@@ -331,7 +342,7 @@ declare interface IInteractiveCardProps extends React.HTMLAttributes<HTMLDivElem
331
342
 
332
343
  export declare const Input: ForwardRefExoticComponent<InputProps & RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
333
344
 
334
- declare interface InputProps extends React.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement> {
345
+ declare interface InputProps extends React.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement>, VariantProps<typeof inputStyles> {
335
346
  label?: string;
336
347
  helperText?: string;
337
348
  error?: string;
@@ -339,10 +350,16 @@ declare interface InputProps extends React.InputHTMLAttributes<HTMLInputElement
339
350
  type?: 'text' | 'textarea' | 'password' | 'email' | 'number' | 'tel' | 'url' | 'color';
340
351
  iconName?: {
341
352
  name: TablerIconName;
342
- stroke?: number;
353
+ stroke?: string;
343
354
  } | TablerIconName;
344
355
  }
345
356
 
357
+ declare const inputStyles: (props?: ({
358
+ inputSize?: "sm" | "md" | "lg" | null | undefined;
359
+ rounded?: "sm" | "full" | null | undefined;
360
+ defaultVariants?: "rounded" | "inputSize" | null | undefined;
361
+ } & ClassProp) | undefined) => string;
362
+
346
363
  export declare const InteractiveCard: ForwardRefExoticComponent<IInteractiveCardProps & RefAttributes<HTMLDivElement>>;
347
364
 
348
365
  declare const interactiveCardStyles: (props?: ({
@@ -360,7 +377,7 @@ declare interface IPopoverProps {
360
377
  className?: string;
361
378
  onMouseDown?: (e: default_2.MouseEvent) => void;
362
379
  onMouseUp?: (e: default_2.MouseEvent) => void;
363
- popoverWidth?: 'as-trigger' | 'auto';
380
+ popoverWidth?: 'as-trigger' | 'min-as-trigger' | 'auto';
364
381
  disabled?: boolean;
365
382
  }
366
383
 
@@ -419,7 +436,7 @@ declare interface ModalProps {
419
436
  setIsOpen?: default_2.Dispatch<default_2.SetStateAction<boolean>>;
420
437
  canClose?: boolean;
421
438
  intent?: 'card' | 'sheet' | 'wizard' | 'fullscreen';
422
- overlay?: 'blur' | 'opacity';
439
+ overlay?: 'blur-sm' | 'opacity';
423
440
  closeButtonAriaLabel?: string;
424
441
  closeOnClickOutside?: boolean;
425
442
  }
@@ -447,7 +464,7 @@ declare type PositionProps = 'top-left' | 'top' | 'top-right' | 'bottom-left' |
447
464
  export declare const ProgressBar: ({ progress, className, intent, size, rounded, ...props }: IProgressBarProps) => JSX.Element;
448
465
 
449
466
  declare const progressBarStyles: (props?: ({
450
- intent?: "brand" | "blue" | "yellow" | "green" | null | undefined;
467
+ intent?: "error" | "success" | "warning" | "primary" | "yellow" | "blue" | "violet" | null | undefined;
451
468
  size?: "sm" | "md" | "lg" | null | undefined;
452
469
  rounded?: "sm" | "full" | null | undefined;
453
470
  } & ClassProp) | undefined) => string;