@sigep/react 1.0.0 → 1.1.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/dist/index.d.mts +434 -2
- package/dist/index.d.ts +434 -2
- package/dist/index.js +1150 -6
- package/dist/index.mjs +1128 -5
- package/package.json +7 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,102 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
2
|
+
import { ComponentProps, ReactNode, InputHTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
3
3
|
import * as tailwind_variants from 'tailwind-variants';
|
|
4
4
|
import { VariantProps } from 'tailwind-variants';
|
|
5
5
|
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
6
6
|
|
|
7
|
+
declare const avatar: tailwind_variants.TVReturnType<{
|
|
8
|
+
size: {
|
|
9
|
+
sm: string;
|
|
10
|
+
md: string;
|
|
11
|
+
lg: string;
|
|
12
|
+
xl: string;
|
|
13
|
+
};
|
|
14
|
+
variant: {
|
|
15
|
+
primary: string;
|
|
16
|
+
secondary: string;
|
|
17
|
+
outline: string;
|
|
18
|
+
};
|
|
19
|
+
}, undefined, "inline-flex items-center justify-center rounded-full font-medium select-none overflow-hidden", tailwind_variants_dist_config_js.TVConfig<{
|
|
20
|
+
size: {
|
|
21
|
+
sm: string;
|
|
22
|
+
md: string;
|
|
23
|
+
lg: string;
|
|
24
|
+
xl: string;
|
|
25
|
+
};
|
|
26
|
+
variant: {
|
|
27
|
+
primary: string;
|
|
28
|
+
secondary: string;
|
|
29
|
+
outline: string;
|
|
30
|
+
};
|
|
31
|
+
}, {
|
|
32
|
+
size: {
|
|
33
|
+
sm: string;
|
|
34
|
+
md: string;
|
|
35
|
+
lg: string;
|
|
36
|
+
xl: string;
|
|
37
|
+
};
|
|
38
|
+
variant: {
|
|
39
|
+
primary: string;
|
|
40
|
+
secondary: string;
|
|
41
|
+
outline: string;
|
|
42
|
+
};
|
|
43
|
+
}>, {
|
|
44
|
+
size: {
|
|
45
|
+
sm: string;
|
|
46
|
+
md: string;
|
|
47
|
+
lg: string;
|
|
48
|
+
xl: string;
|
|
49
|
+
};
|
|
50
|
+
variant: {
|
|
51
|
+
primary: string;
|
|
52
|
+
secondary: string;
|
|
53
|
+
outline: string;
|
|
54
|
+
};
|
|
55
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
56
|
+
size: {
|
|
57
|
+
sm: string;
|
|
58
|
+
md: string;
|
|
59
|
+
lg: string;
|
|
60
|
+
xl: string;
|
|
61
|
+
};
|
|
62
|
+
variant: {
|
|
63
|
+
primary: string;
|
|
64
|
+
secondary: string;
|
|
65
|
+
outline: string;
|
|
66
|
+
};
|
|
67
|
+
}, undefined, "inline-flex items-center justify-center rounded-full font-medium select-none overflow-hidden", tailwind_variants_dist_config_js.TVConfig<{
|
|
68
|
+
size: {
|
|
69
|
+
sm: string;
|
|
70
|
+
md: string;
|
|
71
|
+
lg: string;
|
|
72
|
+
xl: string;
|
|
73
|
+
};
|
|
74
|
+
variant: {
|
|
75
|
+
primary: string;
|
|
76
|
+
secondary: string;
|
|
77
|
+
outline: string;
|
|
78
|
+
};
|
|
79
|
+
}, {
|
|
80
|
+
size: {
|
|
81
|
+
sm: string;
|
|
82
|
+
md: string;
|
|
83
|
+
lg: string;
|
|
84
|
+
xl: string;
|
|
85
|
+
};
|
|
86
|
+
variant: {
|
|
87
|
+
primary: string;
|
|
88
|
+
secondary: string;
|
|
89
|
+
outline: string;
|
|
90
|
+
};
|
|
91
|
+
}>, unknown, unknown, undefined>>;
|
|
92
|
+
type AvatarVariants = VariantProps<typeof avatar>;
|
|
93
|
+
interface AvatarProps extends ComponentProps<"div">, AvatarVariants {
|
|
94
|
+
name?: string;
|
|
95
|
+
src?: string;
|
|
96
|
+
alt?: string;
|
|
97
|
+
}
|
|
98
|
+
declare const Avatar: react.ForwardRefExoticComponent<Omit<AvatarProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
99
|
+
|
|
7
100
|
declare const button: tailwind_variants.TVReturnType<{
|
|
8
101
|
variant: {
|
|
9
102
|
primary: string;
|
|
@@ -94,4 +187,343 @@ interface ButtonProps extends ComponentProps<"button">, ButtonVariants {
|
|
|
94
187
|
}
|
|
95
188
|
declare const Button: react.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
96
189
|
|
|
97
|
-
|
|
190
|
+
declare const card: tailwind_variants.TVReturnType<{
|
|
191
|
+
variant: {
|
|
192
|
+
elevated: string;
|
|
193
|
+
outlined: string;
|
|
194
|
+
filled: string;
|
|
195
|
+
};
|
|
196
|
+
padding: {
|
|
197
|
+
none: string;
|
|
198
|
+
sm: string;
|
|
199
|
+
md: string;
|
|
200
|
+
lg: string;
|
|
201
|
+
};
|
|
202
|
+
}, undefined, "rounded-lg bg-white text-gray-900 overflow-hidden", tailwind_variants_dist_config_js.TVConfig<{
|
|
203
|
+
variant: {
|
|
204
|
+
elevated: string;
|
|
205
|
+
outlined: string;
|
|
206
|
+
filled: string;
|
|
207
|
+
};
|
|
208
|
+
padding: {
|
|
209
|
+
none: string;
|
|
210
|
+
sm: string;
|
|
211
|
+
md: string;
|
|
212
|
+
lg: string;
|
|
213
|
+
};
|
|
214
|
+
}, {
|
|
215
|
+
variant: {
|
|
216
|
+
elevated: string;
|
|
217
|
+
outlined: string;
|
|
218
|
+
filled: string;
|
|
219
|
+
};
|
|
220
|
+
padding: {
|
|
221
|
+
none: string;
|
|
222
|
+
sm: string;
|
|
223
|
+
md: string;
|
|
224
|
+
lg: string;
|
|
225
|
+
};
|
|
226
|
+
}>, {
|
|
227
|
+
variant: {
|
|
228
|
+
elevated: string;
|
|
229
|
+
outlined: string;
|
|
230
|
+
filled: string;
|
|
231
|
+
};
|
|
232
|
+
padding: {
|
|
233
|
+
none: string;
|
|
234
|
+
sm: string;
|
|
235
|
+
md: string;
|
|
236
|
+
lg: string;
|
|
237
|
+
};
|
|
238
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
239
|
+
variant: {
|
|
240
|
+
elevated: string;
|
|
241
|
+
outlined: string;
|
|
242
|
+
filled: string;
|
|
243
|
+
};
|
|
244
|
+
padding: {
|
|
245
|
+
none: string;
|
|
246
|
+
sm: string;
|
|
247
|
+
md: string;
|
|
248
|
+
lg: string;
|
|
249
|
+
};
|
|
250
|
+
}, undefined, "rounded-lg bg-white text-gray-900 overflow-hidden", tailwind_variants_dist_config_js.TVConfig<{
|
|
251
|
+
variant: {
|
|
252
|
+
elevated: string;
|
|
253
|
+
outlined: string;
|
|
254
|
+
filled: string;
|
|
255
|
+
};
|
|
256
|
+
padding: {
|
|
257
|
+
none: string;
|
|
258
|
+
sm: string;
|
|
259
|
+
md: string;
|
|
260
|
+
lg: string;
|
|
261
|
+
};
|
|
262
|
+
}, {
|
|
263
|
+
variant: {
|
|
264
|
+
elevated: string;
|
|
265
|
+
outlined: string;
|
|
266
|
+
filled: string;
|
|
267
|
+
};
|
|
268
|
+
padding: {
|
|
269
|
+
none: string;
|
|
270
|
+
sm: string;
|
|
271
|
+
md: string;
|
|
272
|
+
lg: string;
|
|
273
|
+
};
|
|
274
|
+
}>, unknown, unknown, undefined>>;
|
|
275
|
+
type CardVariants = VariantProps<typeof card>;
|
|
276
|
+
interface CardProps extends ComponentProps<"div">, CardVariants {
|
|
277
|
+
header?: ReactNode;
|
|
278
|
+
footer?: ReactNode;
|
|
279
|
+
}
|
|
280
|
+
declare const Card: react.ForwardRefExoticComponent<Omit<CardProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
281
|
+
|
|
282
|
+
declare const modal: tailwind_variants.TVReturnType<{
|
|
283
|
+
size: {
|
|
284
|
+
sm: string;
|
|
285
|
+
md: string;
|
|
286
|
+
lg: string;
|
|
287
|
+
full: string;
|
|
288
|
+
};
|
|
289
|
+
}, undefined, "relative flex flex-col rounded-lg bg-white text-gray-900 shadow-xl overflow-hidden", tailwind_variants_dist_config_js.TVConfig<{
|
|
290
|
+
size: {
|
|
291
|
+
sm: string;
|
|
292
|
+
md: string;
|
|
293
|
+
lg: string;
|
|
294
|
+
full: string;
|
|
295
|
+
};
|
|
296
|
+
}, {
|
|
297
|
+
size: {
|
|
298
|
+
sm: string;
|
|
299
|
+
md: string;
|
|
300
|
+
lg: string;
|
|
301
|
+
full: string;
|
|
302
|
+
};
|
|
303
|
+
}>, {
|
|
304
|
+
size: {
|
|
305
|
+
sm: string;
|
|
306
|
+
md: string;
|
|
307
|
+
lg: string;
|
|
308
|
+
full: string;
|
|
309
|
+
};
|
|
310
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
311
|
+
size: {
|
|
312
|
+
sm: string;
|
|
313
|
+
md: string;
|
|
314
|
+
lg: string;
|
|
315
|
+
full: string;
|
|
316
|
+
};
|
|
317
|
+
}, undefined, "relative flex flex-col rounded-lg bg-white text-gray-900 shadow-xl overflow-hidden", tailwind_variants_dist_config_js.TVConfig<{
|
|
318
|
+
size: {
|
|
319
|
+
sm: string;
|
|
320
|
+
md: string;
|
|
321
|
+
lg: string;
|
|
322
|
+
full: string;
|
|
323
|
+
};
|
|
324
|
+
}, {
|
|
325
|
+
size: {
|
|
326
|
+
sm: string;
|
|
327
|
+
md: string;
|
|
328
|
+
lg: string;
|
|
329
|
+
full: string;
|
|
330
|
+
};
|
|
331
|
+
}>, unknown, unknown, undefined>>;
|
|
332
|
+
type ModalVariants = VariantProps<typeof modal>;
|
|
333
|
+
interface ModalProps extends Omit<ComponentProps<"div">, "title">, ModalVariants {
|
|
334
|
+
isOpen: boolean;
|
|
335
|
+
onClose: () => void;
|
|
336
|
+
title?: ReactNode;
|
|
337
|
+
footer?: ReactNode;
|
|
338
|
+
}
|
|
339
|
+
declare const Modal: react.ForwardRefExoticComponent<Omit<ModalProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
340
|
+
|
|
341
|
+
type Placement = "top" | "bottom" | "left" | "right";
|
|
342
|
+
declare const tooltip: tailwind_variants.TVReturnType<{
|
|
343
|
+
variant: {
|
|
344
|
+
dark: string;
|
|
345
|
+
light: string;
|
|
346
|
+
};
|
|
347
|
+
}, undefined, "fixed z-[999999] pointer-events-none", tailwind_variants_dist_config_js.TVConfig<{
|
|
348
|
+
variant: {
|
|
349
|
+
dark: string;
|
|
350
|
+
light: string;
|
|
351
|
+
};
|
|
352
|
+
}, {
|
|
353
|
+
variant: {
|
|
354
|
+
dark: string;
|
|
355
|
+
light: string;
|
|
356
|
+
};
|
|
357
|
+
}>, {
|
|
358
|
+
variant: {
|
|
359
|
+
dark: string;
|
|
360
|
+
light: string;
|
|
361
|
+
};
|
|
362
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
363
|
+
variant: {
|
|
364
|
+
dark: string;
|
|
365
|
+
light: string;
|
|
366
|
+
};
|
|
367
|
+
}, undefined, "fixed z-[999999] pointer-events-none", tailwind_variants_dist_config_js.TVConfig<{
|
|
368
|
+
variant: {
|
|
369
|
+
dark: string;
|
|
370
|
+
light: string;
|
|
371
|
+
};
|
|
372
|
+
}, {
|
|
373
|
+
variant: {
|
|
374
|
+
dark: string;
|
|
375
|
+
light: string;
|
|
376
|
+
};
|
|
377
|
+
}>, unknown, unknown, undefined>>;
|
|
378
|
+
type TooltipVariants = VariantProps<typeof tooltip>;
|
|
379
|
+
interface TooltipProps extends Omit<ComponentProps<"span">, "content">, TooltipVariants {
|
|
380
|
+
content: ReactNode;
|
|
381
|
+
placement?: Placement;
|
|
382
|
+
offset?: number;
|
|
383
|
+
disabled?: boolean;
|
|
384
|
+
delayShow?: number;
|
|
385
|
+
delayHide?: number;
|
|
386
|
+
}
|
|
387
|
+
declare const Tooltip: react.ForwardRefExoticComponent<Omit<TooltipProps, "ref"> & react.RefAttributes<HTMLSpanElement>>;
|
|
388
|
+
|
|
389
|
+
interface InputBaseProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "size"> {
|
|
390
|
+
label?: string;
|
|
391
|
+
error?: boolean;
|
|
392
|
+
errorMessage?: string;
|
|
393
|
+
required?: boolean;
|
|
394
|
+
size?: "sm" | "md" | "lg";
|
|
395
|
+
leftIcon?: ReactNode;
|
|
396
|
+
rightIcon?: ReactNode;
|
|
397
|
+
classContainer?: string;
|
|
398
|
+
classInput?: string;
|
|
399
|
+
}
|
|
400
|
+
interface InputStringProps extends InputBaseProps {
|
|
401
|
+
value?: string;
|
|
402
|
+
onChange?: (value: string) => void;
|
|
403
|
+
showClearButton?: boolean;
|
|
404
|
+
}
|
|
405
|
+
interface InputEmailProps extends InputBaseProps {
|
|
406
|
+
value?: string;
|
|
407
|
+
onChange?: (value: string) => void;
|
|
408
|
+
}
|
|
409
|
+
interface InputPasswordProps extends InputBaseProps {
|
|
410
|
+
value?: string;
|
|
411
|
+
onChange?: (value: string) => void;
|
|
412
|
+
}
|
|
413
|
+
interface InputNumberProps extends InputBaseProps {
|
|
414
|
+
value?: number;
|
|
415
|
+
onChange?: (value: number | undefined) => void;
|
|
416
|
+
min?: number;
|
|
417
|
+
max?: number;
|
|
418
|
+
}
|
|
419
|
+
interface InputCPFProps extends InputBaseProps {
|
|
420
|
+
value?: string;
|
|
421
|
+
onChange?: (value: string) => void;
|
|
422
|
+
}
|
|
423
|
+
interface InputCNPJProps extends InputBaseProps {
|
|
424
|
+
value?: string;
|
|
425
|
+
onChange?: (value: string) => void;
|
|
426
|
+
}
|
|
427
|
+
interface InputPhoneProps extends InputBaseProps {
|
|
428
|
+
value?: string;
|
|
429
|
+
onChange?: (value: string) => void;
|
|
430
|
+
}
|
|
431
|
+
interface InputCurrencyProps extends InputBaseProps {
|
|
432
|
+
value?: number;
|
|
433
|
+
onChange?: (value: number | undefined) => void;
|
|
434
|
+
prefix?: string;
|
|
435
|
+
decimalScale?: number;
|
|
436
|
+
allowNegative?: boolean;
|
|
437
|
+
}
|
|
438
|
+
interface InputCepProps extends InputBaseProps {
|
|
439
|
+
value?: string;
|
|
440
|
+
onChange?: (value: string) => void;
|
|
441
|
+
}
|
|
442
|
+
interface InputCheckboxProps {
|
|
443
|
+
label?: string;
|
|
444
|
+
checked?: boolean;
|
|
445
|
+
indeterminate?: boolean;
|
|
446
|
+
onChange?: (checked: boolean) => void;
|
|
447
|
+
disabled?: boolean;
|
|
448
|
+
error?: boolean;
|
|
449
|
+
labelPosition?: "left" | "right";
|
|
450
|
+
className?: string;
|
|
451
|
+
name?: string;
|
|
452
|
+
required?: boolean;
|
|
453
|
+
}
|
|
454
|
+
interface InputRadioOption {
|
|
455
|
+
label: string;
|
|
456
|
+
value: string | number;
|
|
457
|
+
disabled?: boolean;
|
|
458
|
+
}
|
|
459
|
+
interface InputRadioProps {
|
|
460
|
+
label?: string;
|
|
461
|
+
options: InputRadioOption[];
|
|
462
|
+
value?: string | number;
|
|
463
|
+
onChange?: (value: string | number) => void;
|
|
464
|
+
disabled?: boolean;
|
|
465
|
+
error?: boolean;
|
|
466
|
+
required?: boolean;
|
|
467
|
+
name: string;
|
|
468
|
+
className?: string;
|
|
469
|
+
direction?: "horizontal" | "vertical";
|
|
470
|
+
}
|
|
471
|
+
interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange" | "size"> {
|
|
472
|
+
label?: string;
|
|
473
|
+
error?: boolean;
|
|
474
|
+
errorMessage?: string;
|
|
475
|
+
required?: boolean;
|
|
476
|
+
size?: "sm" | "md" | "lg";
|
|
477
|
+
classInput?: string;
|
|
478
|
+
value?: string;
|
|
479
|
+
onChange?: (value: string) => void;
|
|
480
|
+
rows?: number;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
declare const InputString: react.ForwardRefExoticComponent<InputStringProps & react.RefAttributes<HTMLInputElement>>;
|
|
484
|
+
|
|
485
|
+
declare const InputEmail: react.ForwardRefExoticComponent<InputEmailProps & react.RefAttributes<HTMLInputElement>>;
|
|
486
|
+
|
|
487
|
+
declare const InputPassword: react.ForwardRefExoticComponent<InputPasswordProps & react.RefAttributes<HTMLInputElement>>;
|
|
488
|
+
|
|
489
|
+
declare const InputNumber: react.ForwardRefExoticComponent<InputNumberProps & react.RefAttributes<HTMLInputElement>>;
|
|
490
|
+
|
|
491
|
+
declare const InputCPF: react.ForwardRefExoticComponent<InputCPFProps & react.RefAttributes<HTMLInputElement>>;
|
|
492
|
+
|
|
493
|
+
declare const InputCNPJ: react.ForwardRefExoticComponent<InputCNPJProps & react.RefAttributes<HTMLInputElement>>;
|
|
494
|
+
|
|
495
|
+
declare const InputPhone: react.ForwardRefExoticComponent<InputPhoneProps & react.RefAttributes<HTMLInputElement>>;
|
|
496
|
+
|
|
497
|
+
declare const InputCurrency: react.ForwardRefExoticComponent<InputCurrencyProps & react.RefAttributes<HTMLInputElement>>;
|
|
498
|
+
|
|
499
|
+
declare const InputCep: react.ForwardRefExoticComponent<InputCepProps & react.RefAttributes<HTMLInputElement>>;
|
|
500
|
+
|
|
501
|
+
declare const InputCheckbox: react.ForwardRefExoticComponent<InputCheckboxProps & react.RefAttributes<HTMLButtonElement>>;
|
|
502
|
+
|
|
503
|
+
declare const InputRadio: react.ForwardRefExoticComponent<InputRadioProps & react.RefAttributes<HTMLDivElement>>;
|
|
504
|
+
|
|
505
|
+
declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
506
|
+
|
|
507
|
+
interface InputWrapperProps {
|
|
508
|
+
label?: string;
|
|
509
|
+
error?: boolean;
|
|
510
|
+
errorMessage?: string;
|
|
511
|
+
required?: boolean;
|
|
512
|
+
disabled?: boolean;
|
|
513
|
+
size?: 'sm' | 'md' | 'lg';
|
|
514
|
+
children: ReactNode;
|
|
515
|
+
className?: string;
|
|
516
|
+
classContainer?: string;
|
|
517
|
+
htmlFor?: string;
|
|
518
|
+
}
|
|
519
|
+
declare const InputWrapper: react.ForwardRefExoticComponent<InputWrapperProps & react.RefAttributes<HTMLDivElement>>;
|
|
520
|
+
|
|
521
|
+
declare function maskCPF(value: string): string;
|
|
522
|
+
declare function maskCNPJ(value: string): string;
|
|
523
|
+
declare function maskPhone(value: string): string;
|
|
524
|
+
declare function maskCEP(value: string): string;
|
|
525
|
+
declare function unmask(value: string): string;
|
|
526
|
+
declare function maskCurrency(value: number, prefix?: string, decimalScale?: number): string;
|
|
527
|
+
declare function unmaskCurrency(value: string): number;
|
|
528
|
+
|
|
529
|
+
export { Avatar, type AvatarProps, Button, type ButtonProps, Card, type CardProps, type InputBaseProps, InputCNPJ, type InputCNPJProps, InputCPF, type InputCPFProps, InputCep, type InputCepProps, InputCheckbox, type InputCheckboxProps, InputCurrency, type InputCurrencyProps, InputEmail, type InputEmailProps, InputNumber, type InputNumberProps, InputPassword, type InputPasswordProps, InputPhone, type InputPhoneProps, InputRadio, type InputRadioOption, type InputRadioProps, InputString, type InputStringProps, InputWrapper, Modal, type ModalProps, Textarea, type TextareaProps, Tooltip, type TooltipProps as TooltipComponentProps, avatar, button, card, maskCEP, maskCNPJ, maskCPF, maskCurrency, maskPhone, modal, tooltip, unmask, unmaskCurrency };
|