analytica-frontend-lib 1.0.18 → 1.0.20
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.css +134 -8
- package/dist/index.d.mts +75 -32
- package/dist/index.d.ts +75 -32
- package/dist/index.js +248 -132
- package/dist/index.mjs +244 -129
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"Liberation Mono",
|
|
23
23
|
"Courier New",
|
|
24
24
|
monospace;
|
|
25
|
+
--color-white: #fff;
|
|
25
26
|
--spacing: 0.25rem;
|
|
26
27
|
--text-xs: 0.75rem;
|
|
27
28
|
--text-xs--line-height: calc(1 / 0.75);
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
--font-weight-bold: 700;
|
|
51
52
|
--font-weight-extrabold: 800;
|
|
52
53
|
--font-weight-black: 900;
|
|
54
|
+
--radius-xs: 0.125rem;
|
|
53
55
|
--radius-sm: 0.25rem;
|
|
54
56
|
--radius-md: 0.375rem;
|
|
55
57
|
--radius-lg: 0.5rem;
|
|
@@ -58,6 +60,7 @@
|
|
|
58
60
|
--default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
59
61
|
--default-font-family: var(--font-sans);
|
|
60
62
|
--default-mono-font-family: var(--font-mono);
|
|
63
|
+
--color-primary: #b3b3b3;
|
|
61
64
|
--color-primary-50: #999999;
|
|
62
65
|
--color-primary-100: #808080;
|
|
63
66
|
--color-primary-400: #525252;
|
|
@@ -79,10 +82,12 @@
|
|
|
79
82
|
--color-background-100: #f2f1f1;
|
|
80
83
|
--color-background-200: #dcdbdb;
|
|
81
84
|
--color-background-500: #8e8e8e;
|
|
85
|
+
--color-background-800: #414040;
|
|
82
86
|
--color-background-muted: #f7f8f7;
|
|
83
87
|
--color-border-50: #f3f3f3;
|
|
84
88
|
--color-border-100: #e6e6e6;
|
|
85
89
|
--color-border-200: #dddcdb;
|
|
90
|
+
--color-border-300: #d3d3d3;
|
|
86
91
|
--color-border-400: #a5a3a3;
|
|
87
92
|
--color-border-500: #8c8d8d;
|
|
88
93
|
--color-success: #e4fff4;
|
|
@@ -93,20 +98,30 @@
|
|
|
93
98
|
--color-success-600: #2a7948;
|
|
94
99
|
--color-success-700: #206f3e;
|
|
95
100
|
--color-success-800: #166534;
|
|
101
|
+
--color-error: #fee9e9;
|
|
96
102
|
--color-error-300: #f87171;
|
|
97
103
|
--color-error-400: #ef4444;
|
|
98
104
|
--color-error-500: #e63535;
|
|
99
105
|
--color-error-600: #dc2626;
|
|
100
106
|
--color-error-700: #b91c1c;
|
|
107
|
+
--color-error-800: #991b1b;
|
|
101
108
|
--color-warning: #fff9f5;
|
|
102
109
|
--color-warning-200: #fecdaa;
|
|
110
|
+
--color-warning-300: #fdad74;
|
|
103
111
|
--color-warning-800: #824417;
|
|
104
112
|
--color-info: #ecf8fe;
|
|
105
113
|
--color-info-200: #7ccff8;
|
|
114
|
+
--color-info-300: #57c2f6;
|
|
106
115
|
--color-info-800: #075a83;
|
|
107
116
|
--color-indicator-primary: #373737;
|
|
108
117
|
--color-indicator-info: #5399ec;
|
|
109
118
|
--color-indicator-error: #b91c1c;
|
|
119
|
+
--color-exam-1: #e3f1fb;
|
|
120
|
+
--color-exam-2: #fde5fa;
|
|
121
|
+
--color-exam-3: #fff4d1;
|
|
122
|
+
--color-exam-4: #ddf5e5;
|
|
123
|
+
--color-typography-1: #b00c9e;
|
|
124
|
+
--color-typography-2: #745A07;
|
|
110
125
|
--font-weight-hairline: 100;
|
|
111
126
|
--text-2xs: 0.625rem;
|
|
112
127
|
--text-2xs--line-height: calc(1 / 0.625);
|
|
@@ -337,6 +352,9 @@
|
|
|
337
352
|
.top-4 {
|
|
338
353
|
top: calc(var(--spacing) * 4);
|
|
339
354
|
}
|
|
355
|
+
.top-\[5px\] {
|
|
356
|
+
top: 5px;
|
|
357
|
+
}
|
|
340
358
|
.top-full {
|
|
341
359
|
top: 100%;
|
|
342
360
|
}
|
|
@@ -346,6 +364,9 @@
|
|
|
346
364
|
.right-4 {
|
|
347
365
|
right: calc(var(--spacing) * 4);
|
|
348
366
|
}
|
|
367
|
+
.right-\[10px\] {
|
|
368
|
+
right: 10px;
|
|
369
|
+
}
|
|
349
370
|
.bottom-4 {
|
|
350
371
|
bottom: calc(var(--spacing) * 4);
|
|
351
372
|
}
|
|
@@ -391,6 +412,9 @@
|
|
|
391
412
|
.my-4 {
|
|
392
413
|
margin-block: calc(var(--spacing) * 4);
|
|
393
414
|
}
|
|
415
|
+
.mt-0\.5 {
|
|
416
|
+
margin-top: calc(var(--spacing) * 0.5);
|
|
417
|
+
}
|
|
394
418
|
.mt-1 {
|
|
395
419
|
margin-top: calc(var(--spacing) * 1);
|
|
396
420
|
}
|
|
@@ -406,6 +430,9 @@
|
|
|
406
430
|
.mr-2 {
|
|
407
431
|
margin-right: calc(var(--spacing) * 2);
|
|
408
432
|
}
|
|
433
|
+
.mb-0\.5 {
|
|
434
|
+
margin-bottom: calc(var(--spacing) * 0.5);
|
|
435
|
+
}
|
|
409
436
|
.mb-2 {
|
|
410
437
|
margin-bottom: calc(var(--spacing) * 2);
|
|
411
438
|
}
|
|
@@ -424,6 +451,9 @@
|
|
|
424
451
|
.ml-2 {
|
|
425
452
|
margin-left: calc(var(--spacing) * 2);
|
|
426
453
|
}
|
|
454
|
+
.block {
|
|
455
|
+
display: block;
|
|
456
|
+
}
|
|
427
457
|
.flex {
|
|
428
458
|
display: flex;
|
|
429
459
|
}
|
|
@@ -436,6 +466,21 @@
|
|
|
436
466
|
.table {
|
|
437
467
|
display: table;
|
|
438
468
|
}
|
|
469
|
+
.size-3 {
|
|
470
|
+
width: calc(var(--spacing) * 3);
|
|
471
|
+
height: calc(var(--spacing) * 3);
|
|
472
|
+
}
|
|
473
|
+
.size-3\.5 {
|
|
474
|
+
width: calc(var(--spacing) * 3.5);
|
|
475
|
+
height: calc(var(--spacing) * 3.5);
|
|
476
|
+
}
|
|
477
|
+
.size-4 {
|
|
478
|
+
width: calc(var(--spacing) * 4);
|
|
479
|
+
height: calc(var(--spacing) * 4);
|
|
480
|
+
}
|
|
481
|
+
.h-2 {
|
|
482
|
+
height: calc(var(--spacing) * 2);
|
|
483
|
+
}
|
|
439
484
|
.h-4 {
|
|
440
485
|
height: calc(var(--spacing) * 4);
|
|
441
486
|
}
|
|
@@ -460,6 +505,9 @@
|
|
|
460
505
|
.h-px {
|
|
461
506
|
height: 1px;
|
|
462
507
|
}
|
|
508
|
+
.w-2 {
|
|
509
|
+
width: calc(var(--spacing) * 2);
|
|
510
|
+
}
|
|
463
511
|
.w-4 {
|
|
464
512
|
width: calc(var(--spacing) * 4);
|
|
465
513
|
}
|
|
@@ -475,6 +523,9 @@
|
|
|
475
523
|
.w-10 {
|
|
476
524
|
width: calc(var(--spacing) * 10);
|
|
477
525
|
}
|
|
526
|
+
.w-\[384px\] {
|
|
527
|
+
width: 384px;
|
|
528
|
+
}
|
|
478
529
|
.w-full {
|
|
479
530
|
width: 100%;
|
|
480
531
|
}
|
|
@@ -533,6 +584,9 @@
|
|
|
533
584
|
.gap-0\.5 {
|
|
534
585
|
gap: calc(var(--spacing) * 0.5);
|
|
535
586
|
}
|
|
587
|
+
.gap-1 {
|
|
588
|
+
gap: calc(var(--spacing) * 1);
|
|
589
|
+
}
|
|
536
590
|
.gap-1\.5 {
|
|
537
591
|
gap: calc(var(--spacing) * 1.5);
|
|
538
592
|
}
|
|
@@ -572,6 +626,9 @@
|
|
|
572
626
|
.rounded-xl {
|
|
573
627
|
border-radius: var(--radius-xl);
|
|
574
628
|
}
|
|
629
|
+
.rounded-xs {
|
|
630
|
+
border-radius: var(--radius-xs);
|
|
631
|
+
}
|
|
575
632
|
.border {
|
|
576
633
|
border-style: var(--tw-border-style);
|
|
577
634
|
border-width: 1px;
|
|
@@ -612,6 +669,9 @@
|
|
|
612
669
|
.border-border-200 {
|
|
613
670
|
border-color: var(--color-border-200);
|
|
614
671
|
}
|
|
672
|
+
.border-border-300 {
|
|
673
|
+
border-color: var(--color-border-300);
|
|
674
|
+
}
|
|
615
675
|
.border-border-400 {
|
|
616
676
|
border-color: var(--color-border-400);
|
|
617
677
|
}
|
|
@@ -639,6 +699,9 @@
|
|
|
639
699
|
.border-info-200 {
|
|
640
700
|
border-color: var(--color-info-200);
|
|
641
701
|
}
|
|
702
|
+
.border-info-300 {
|
|
703
|
+
border-color: var(--color-info-300);
|
|
704
|
+
}
|
|
642
705
|
.border-primary-600 {
|
|
643
706
|
border-color: var(--color-primary-600);
|
|
644
707
|
}
|
|
@@ -657,9 +720,15 @@
|
|
|
657
720
|
.border-success-500 {
|
|
658
721
|
border-color: var(--color-success-500);
|
|
659
722
|
}
|
|
723
|
+
.border-transparent {
|
|
724
|
+
border-color: transparent;
|
|
725
|
+
}
|
|
660
726
|
.border-warning-200 {
|
|
661
727
|
border-color: var(--color-warning-200);
|
|
662
728
|
}
|
|
729
|
+
.border-warning-300 {
|
|
730
|
+
border-color: var(--color-warning-300);
|
|
731
|
+
}
|
|
663
732
|
.\!bg-primary-50 {
|
|
664
733
|
background-color: var(--color-primary-50) !important;
|
|
665
734
|
}
|
|
@@ -675,9 +744,27 @@
|
|
|
675
744
|
.bg-border-200 {
|
|
676
745
|
background-color: var(--color-border-200);
|
|
677
746
|
}
|
|
747
|
+
.bg-error {
|
|
748
|
+
background-color: var(--color-error);
|
|
749
|
+
}
|
|
678
750
|
.bg-error-500 {
|
|
679
751
|
background-color: var(--color-error-500);
|
|
680
752
|
}
|
|
753
|
+
.bg-exam-1 {
|
|
754
|
+
background-color: var(--color-exam-1);
|
|
755
|
+
}
|
|
756
|
+
.bg-exam-2 {
|
|
757
|
+
background-color: var(--color-exam-2);
|
|
758
|
+
}
|
|
759
|
+
.bg-exam-3 {
|
|
760
|
+
background-color: var(--color-exam-3);
|
|
761
|
+
}
|
|
762
|
+
.bg-exam-4 {
|
|
763
|
+
background-color: var(--color-exam-4);
|
|
764
|
+
}
|
|
765
|
+
.bg-indicator-error {
|
|
766
|
+
background-color: var(--color-indicator-error);
|
|
767
|
+
}
|
|
681
768
|
.bg-info {
|
|
682
769
|
background-color: var(--color-info);
|
|
683
770
|
}
|
|
@@ -723,6 +810,9 @@
|
|
|
723
810
|
.p-8 {
|
|
724
811
|
padding: calc(var(--spacing) * 8);
|
|
725
812
|
}
|
|
813
|
+
.px-2 {
|
|
814
|
+
padding-inline: calc(var(--spacing) * 2);
|
|
815
|
+
}
|
|
726
816
|
.px-3\.5 {
|
|
727
817
|
padding-inline: calc(var(--spacing) * 3.5);
|
|
728
818
|
}
|
|
@@ -861,21 +951,39 @@
|
|
|
861
951
|
.text-background-500 {
|
|
862
952
|
color: var(--color-background-500);
|
|
863
953
|
}
|
|
954
|
+
.text-background-800 {
|
|
955
|
+
color: var(--color-background-800);
|
|
956
|
+
}
|
|
864
957
|
.text-error-500 {
|
|
865
958
|
color: var(--color-error-500);
|
|
866
959
|
}
|
|
867
960
|
.text-error-600 {
|
|
868
961
|
color: var(--color-error-600);
|
|
869
962
|
}
|
|
963
|
+
.text-error-700 {
|
|
964
|
+
color: var(--color-error-700);
|
|
965
|
+
}
|
|
966
|
+
.text-error-800 {
|
|
967
|
+
color: var(--color-error-800);
|
|
968
|
+
}
|
|
969
|
+
.text-info-200 {
|
|
970
|
+
color: var(--color-info-200);
|
|
971
|
+
}
|
|
870
972
|
.text-info-800 {
|
|
871
973
|
color: var(--color-info-800);
|
|
872
974
|
}
|
|
975
|
+
.text-primary {
|
|
976
|
+
color: var(--color-primary);
|
|
977
|
+
}
|
|
873
978
|
.text-primary-950 {
|
|
874
979
|
color: var(--color-primary-950);
|
|
875
980
|
}
|
|
876
981
|
.text-success-500 {
|
|
877
982
|
color: var(--color-success-500);
|
|
878
983
|
}
|
|
984
|
+
.text-success-700 {
|
|
985
|
+
color: var(--color-success-700);
|
|
986
|
+
}
|
|
879
987
|
.text-success-800 {
|
|
880
988
|
color: var(--color-success-800);
|
|
881
989
|
}
|
|
@@ -903,6 +1011,12 @@
|
|
|
903
1011
|
.text-text-950 {
|
|
904
1012
|
color: var(--color-text-950);
|
|
905
1013
|
}
|
|
1014
|
+
.text-typography-1 {
|
|
1015
|
+
color: var(--color-typography-1);
|
|
1016
|
+
}
|
|
1017
|
+
.text-typography-2 {
|
|
1018
|
+
color: var(--color-typography-2);
|
|
1019
|
+
}
|
|
906
1020
|
.text-warning-800 {
|
|
907
1021
|
color: var(--color-warning-800);
|
|
908
1022
|
}
|
|
@@ -975,6 +1089,9 @@
|
|
|
975
1089
|
.ring-primary-950 {
|
|
976
1090
|
--tw-ring-color: var(--color-primary-950);
|
|
977
1091
|
}
|
|
1092
|
+
.ring-white {
|
|
1093
|
+
--tw-ring-color: var(--color-white);
|
|
1094
|
+
}
|
|
978
1095
|
.ring-offset-0 {
|
|
979
1096
|
--tw-ring-offset-width: 0px;
|
|
980
1097
|
--tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
@@ -1186,6 +1303,11 @@
|
|
|
1186
1303
|
border-width: 0px;
|
|
1187
1304
|
}
|
|
1188
1305
|
}
|
|
1306
|
+
.focus-visible\:bg-background-50 {
|
|
1307
|
+
&:focus-visible {
|
|
1308
|
+
background-color: var(--color-background-50);
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1189
1311
|
.focus-visible\:bg-error-500 {
|
|
1190
1312
|
&:focus-visible {
|
|
1191
1313
|
background-color: var(--color-error-500);
|
|
@@ -1567,10 +1689,10 @@
|
|
|
1567
1689
|
--color-indicator-primary: #f7f7f7;
|
|
1568
1690
|
--color-indicator-info: #a1c7f5;
|
|
1569
1691
|
--color-indicator-error: #e84645;
|
|
1570
|
-
--color-
|
|
1571
|
-
--color-
|
|
1572
|
-
--color-
|
|
1573
|
-
--color-
|
|
1692
|
+
--color-exam-1: #e3f1fb;
|
|
1693
|
+
--color-exam-2: #fde5fa;
|
|
1694
|
+
--color-exam-3: #fff4d1;
|
|
1695
|
+
--color-exam-4: #ddf5e5;
|
|
1574
1696
|
--color-subject-1: #b7dfff;
|
|
1575
1697
|
--color-subject-2: #fbd1a5;
|
|
1576
1698
|
--color-subject-3: #b2e7e8;
|
|
@@ -1587,6 +1709,8 @@
|
|
|
1587
1709
|
--color-subject-14: #e7ec85;
|
|
1588
1710
|
--color-subject-15: #a2d7e2;
|
|
1589
1711
|
--color-subject-16: #badfc8;
|
|
1712
|
+
--color-typography-1: #b00c9e;
|
|
1713
|
+
--color-typography-2: #745A07;
|
|
1590
1714
|
--shadow-hard-shadow-1: -2px 2px 8px rgba(255, 255, 255, 0.1);
|
|
1591
1715
|
--shadow-hard-shadow-2: 0px 3px 10px rgba(255, 255, 255, 0.1);
|
|
1592
1716
|
--shadow-hard-shadow-3: 2px 2px 8px rgba(255, 255, 255, 0.1);
|
|
@@ -1726,10 +1850,10 @@
|
|
|
1726
1850
|
--color-indicator-primary: #373737;
|
|
1727
1851
|
--color-indicator-info: #5399ec;
|
|
1728
1852
|
--color-indicator-error: #b91c1c;
|
|
1729
|
-
--color-
|
|
1730
|
-
--color-
|
|
1731
|
-
--color-
|
|
1732
|
-
--color-
|
|
1853
|
+
--color-exam-1: #e3f1fb;
|
|
1854
|
+
--color-exam-2: #fde5fa;
|
|
1855
|
+
--color-exam-3: #fff4d1;
|
|
1856
|
+
--color-exam-4: #ddf5e5;
|
|
1733
1857
|
--color-subject-1: #b7dfff;
|
|
1734
1858
|
--color-subject-2: #fbd1a5;
|
|
1735
1859
|
--color-subject-3: #b2e7e8;
|
|
@@ -1746,6 +1870,8 @@
|
|
|
1746
1870
|
--color-subject-14: #e7ec85;
|
|
1747
1871
|
--color-subject-15: #a2d7e2;
|
|
1748
1872
|
--color-subject-16: #badfc8;
|
|
1873
|
+
--color-typography-1: #b00c9e;
|
|
1874
|
+
--color-typography-2: #745A07;
|
|
1749
1875
|
--shadow-hard-shadow-1: -2px 2px 8px rgba(38, 38, 38, 0.2);
|
|
1750
1876
|
--shadow-hard-shadow-2: 0px 3px 10px rgba(38, 38, 38, 0.2);
|
|
1751
1877
|
--shadow-hard-shadow-3: 2px 2px 8px rgba(38, 38, 38, 0.2);
|
package/dist/index.d.mts
CHANGED
|
@@ -185,40 +185,48 @@ type TextProps<T extends ElementType = 'p'> = BaseTextProps & {
|
|
|
185
185
|
*/
|
|
186
186
|
declare const Text: <T extends ElementType = "p">({ children, size, weight, color, as, className, ...props }: TextProps<T>) => react_jsx_runtime.JSX.Element;
|
|
187
187
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
188
|
+
/**
|
|
189
|
+
* Badge component props interface
|
|
190
|
+
*/
|
|
191
|
+
type BadgeProps = {
|
|
192
|
+
/** Content to be displayed inside the badge */
|
|
193
|
+
children?: ReactNode;
|
|
194
|
+
/** Ícone à direita do texto */
|
|
195
|
+
iconRight?: ReactNode;
|
|
196
|
+
/** Ícone à esquerda do texto */
|
|
197
|
+
iconLeft?: ReactNode;
|
|
198
|
+
/** Size of the badge */
|
|
199
|
+
size?: 'small' | 'medium' | 'large';
|
|
193
200
|
/** Visual variant of the badge */
|
|
194
|
-
variant?: 'solid' | 'outlined';
|
|
201
|
+
variant?: 'solid' | 'outlined' | 'exams' | 'resultStatus' | 'notification';
|
|
195
202
|
/** Action type of the badge */
|
|
196
|
-
action?: 'warning' | 'success' | 'info';
|
|
197
|
-
|
|
203
|
+
action?: 'error' | 'warning' | 'success' | 'info' | 'muted' | 'exam1' | 'exam2' | 'exam3' | 'exam4' | 'positive' | 'negative';
|
|
204
|
+
/** Additional CSS classes to apply */
|
|
205
|
+
className?: string;
|
|
206
|
+
notificationActive?: boolean;
|
|
198
207
|
} & HTMLAttributes<HTMLDivElement>;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
};
|
|
208
|
+
/**
|
|
209
|
+
* Badge component for Analytica Ensino platforms
|
|
210
|
+
*
|
|
211
|
+
* A flexible button component with multiple variants, sizes and actions.
|
|
212
|
+
* Fully compatible with Next.js 15 and React 19.
|
|
213
|
+
*
|
|
214
|
+
* @param children - The content to display inside the badge
|
|
215
|
+
* @param size - The size variant (extra-small, small, medium, large, extra-large)
|
|
216
|
+
* @param variant - The visual style variant (solid, outline, link)
|
|
217
|
+
* @param action - The action type (primary, positive, negative)
|
|
218
|
+
* @param className - Additional CSS classes
|
|
219
|
+
* @param props - All other standard div HTML attributes
|
|
220
|
+
* @returns A styled badge element
|
|
221
|
+
*
|
|
222
|
+
* @example
|
|
223
|
+
* ```tsx
|
|
224
|
+
* <Badge variant="solid" action="info" size="medium">
|
|
225
|
+
* Information
|
|
226
|
+
* </Badge>
|
|
227
|
+
* ```
|
|
228
|
+
*/
|
|
229
|
+
declare const Badge: ({ children, iconLeft, iconRight, size, variant, action, className, notificationActive, ...props }: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
222
230
|
|
|
223
231
|
/**
|
|
224
232
|
* CheckBox size variants
|
|
@@ -454,4 +462,39 @@ declare const IconButton: react.ForwardRefExoticComponent<{
|
|
|
454
462
|
className?: string;
|
|
455
463
|
} & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
|
|
456
464
|
|
|
457
|
-
|
|
465
|
+
type ToastPosition$1 = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'default';
|
|
466
|
+
type ToastProps = {
|
|
467
|
+
title: string;
|
|
468
|
+
description?: string;
|
|
469
|
+
onClose: () => void;
|
|
470
|
+
/** Visual variant of the badge */
|
|
471
|
+
variant?: 'solid' | 'outlined';
|
|
472
|
+
/** Action type of the badge */
|
|
473
|
+
action?: 'warning' | 'success' | 'info';
|
|
474
|
+
position?: ToastPosition$1;
|
|
475
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
476
|
+
declare const Toast: ({ variant, action, className, onClose, title, description, position, ...props }: ToastProps) => react_jsx_runtime.JSX.Element;
|
|
477
|
+
|
|
478
|
+
type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'default';
|
|
479
|
+
type ToastData = {
|
|
480
|
+
id: string;
|
|
481
|
+
title: string;
|
|
482
|
+
description?: string;
|
|
483
|
+
variant?: 'solid' | 'outlined';
|
|
484
|
+
action?: 'warning' | 'success' | 'info';
|
|
485
|
+
position?: ToastPosition;
|
|
486
|
+
};
|
|
487
|
+
type ToastStore = {
|
|
488
|
+
toasts: ToastData[];
|
|
489
|
+
addToast: (toast: Omit<ToastData, 'id'>) => void;
|
|
490
|
+
removeToast: (id: string) => void;
|
|
491
|
+
};
|
|
492
|
+
declare const useToastStore: zustand.UseBoundStore<zustand.StoreApi<ToastStore>>;
|
|
493
|
+
|
|
494
|
+
declare const Toaster: () => react_jsx_runtime.JSX.Element;
|
|
495
|
+
declare const useToast: () => {
|
|
496
|
+
addToast: (toast: Omit<ToastData, "id">) => void;
|
|
497
|
+
removeToast: (id: string) => void;
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
export { Badge, Button, CheckBox, type CheckBoxProps, DropdownMenu, DropdownMenuTrigger, IconButton, type IconButtonProps, IconRoundedButton, MenuContent, MenuItem, MenuLabel, MenuSeparator, NavButton, SelectionButton, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Text, Toast, type ToastData, Toaster, useToast, useToastStore };
|
package/dist/index.d.ts
CHANGED
|
@@ -185,40 +185,48 @@ type TextProps<T extends ElementType = 'p'> = BaseTextProps & {
|
|
|
185
185
|
*/
|
|
186
186
|
declare const Text: <T extends ElementType = "p">({ children, size, weight, color, as, className, ...props }: TextProps<T>) => react_jsx_runtime.JSX.Element;
|
|
187
187
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
188
|
+
/**
|
|
189
|
+
* Badge component props interface
|
|
190
|
+
*/
|
|
191
|
+
type BadgeProps = {
|
|
192
|
+
/** Content to be displayed inside the badge */
|
|
193
|
+
children?: ReactNode;
|
|
194
|
+
/** Ícone à direita do texto */
|
|
195
|
+
iconRight?: ReactNode;
|
|
196
|
+
/** Ícone à esquerda do texto */
|
|
197
|
+
iconLeft?: ReactNode;
|
|
198
|
+
/** Size of the badge */
|
|
199
|
+
size?: 'small' | 'medium' | 'large';
|
|
193
200
|
/** Visual variant of the badge */
|
|
194
|
-
variant?: 'solid' | 'outlined';
|
|
201
|
+
variant?: 'solid' | 'outlined' | 'exams' | 'resultStatus' | 'notification';
|
|
195
202
|
/** Action type of the badge */
|
|
196
|
-
action?: 'warning' | 'success' | 'info';
|
|
197
|
-
|
|
203
|
+
action?: 'error' | 'warning' | 'success' | 'info' | 'muted' | 'exam1' | 'exam2' | 'exam3' | 'exam4' | 'positive' | 'negative';
|
|
204
|
+
/** Additional CSS classes to apply */
|
|
205
|
+
className?: string;
|
|
206
|
+
notificationActive?: boolean;
|
|
198
207
|
} & HTMLAttributes<HTMLDivElement>;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
};
|
|
208
|
+
/**
|
|
209
|
+
* Badge component for Analytica Ensino platforms
|
|
210
|
+
*
|
|
211
|
+
* A flexible button component with multiple variants, sizes and actions.
|
|
212
|
+
* Fully compatible with Next.js 15 and React 19.
|
|
213
|
+
*
|
|
214
|
+
* @param children - The content to display inside the badge
|
|
215
|
+
* @param size - The size variant (extra-small, small, medium, large, extra-large)
|
|
216
|
+
* @param variant - The visual style variant (solid, outline, link)
|
|
217
|
+
* @param action - The action type (primary, positive, negative)
|
|
218
|
+
* @param className - Additional CSS classes
|
|
219
|
+
* @param props - All other standard div HTML attributes
|
|
220
|
+
* @returns A styled badge element
|
|
221
|
+
*
|
|
222
|
+
* @example
|
|
223
|
+
* ```tsx
|
|
224
|
+
* <Badge variant="solid" action="info" size="medium">
|
|
225
|
+
* Information
|
|
226
|
+
* </Badge>
|
|
227
|
+
* ```
|
|
228
|
+
*/
|
|
229
|
+
declare const Badge: ({ children, iconLeft, iconRight, size, variant, action, className, notificationActive, ...props }: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
222
230
|
|
|
223
231
|
/**
|
|
224
232
|
* CheckBox size variants
|
|
@@ -454,4 +462,39 @@ declare const IconButton: react.ForwardRefExoticComponent<{
|
|
|
454
462
|
className?: string;
|
|
455
463
|
} & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
|
|
456
464
|
|
|
457
|
-
|
|
465
|
+
type ToastPosition$1 = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'default';
|
|
466
|
+
type ToastProps = {
|
|
467
|
+
title: string;
|
|
468
|
+
description?: string;
|
|
469
|
+
onClose: () => void;
|
|
470
|
+
/** Visual variant of the badge */
|
|
471
|
+
variant?: 'solid' | 'outlined';
|
|
472
|
+
/** Action type of the badge */
|
|
473
|
+
action?: 'warning' | 'success' | 'info';
|
|
474
|
+
position?: ToastPosition$1;
|
|
475
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
476
|
+
declare const Toast: ({ variant, action, className, onClose, title, description, position, ...props }: ToastProps) => react_jsx_runtime.JSX.Element;
|
|
477
|
+
|
|
478
|
+
type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'default';
|
|
479
|
+
type ToastData = {
|
|
480
|
+
id: string;
|
|
481
|
+
title: string;
|
|
482
|
+
description?: string;
|
|
483
|
+
variant?: 'solid' | 'outlined';
|
|
484
|
+
action?: 'warning' | 'success' | 'info';
|
|
485
|
+
position?: ToastPosition;
|
|
486
|
+
};
|
|
487
|
+
type ToastStore = {
|
|
488
|
+
toasts: ToastData[];
|
|
489
|
+
addToast: (toast: Omit<ToastData, 'id'>) => void;
|
|
490
|
+
removeToast: (id: string) => void;
|
|
491
|
+
};
|
|
492
|
+
declare const useToastStore: zustand.UseBoundStore<zustand.StoreApi<ToastStore>>;
|
|
493
|
+
|
|
494
|
+
declare const Toaster: () => react_jsx_runtime.JSX.Element;
|
|
495
|
+
declare const useToast: () => {
|
|
496
|
+
addToast: (toast: Omit<ToastData, "id">) => void;
|
|
497
|
+
removeToast: (id: string) => void;
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
export { Badge, Button, CheckBox, type CheckBoxProps, DropdownMenu, DropdownMenuTrigger, IconButton, type IconButtonProps, IconRoundedButton, MenuContent, MenuItem, MenuLabel, MenuSeparator, NavButton, SelectionButton, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Text, Toast, type ToastData, Toaster, useToast, useToastStore };
|