@mlw-packages/react-components 1.3.9 → 1.3.11
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 +135 -53
- package/dist/index.d.mts +10 -48
- package/dist/index.d.ts +10 -48
- package/dist/index.js +106 -31
- package/dist/index.mjs +106 -31
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -489,6 +489,9 @@ body {
|
|
|
489
489
|
.z-50 {
|
|
490
490
|
z-index: 50;
|
|
491
491
|
}
|
|
492
|
+
.z-\[9999\] {
|
|
493
|
+
z-index: 9999;
|
|
494
|
+
}
|
|
492
495
|
.col-span-1 {
|
|
493
496
|
grid-column: span 1 / span 1;
|
|
494
497
|
}
|
|
@@ -546,9 +549,6 @@ body {
|
|
|
546
549
|
.-mt-4 {
|
|
547
550
|
margin-top: -1rem;
|
|
548
551
|
}
|
|
549
|
-
.mb-1 {
|
|
550
|
-
margin-bottom: 0.25rem;
|
|
551
|
-
}
|
|
552
552
|
.mb-2 {
|
|
553
553
|
margin-bottom: 0.5rem;
|
|
554
554
|
}
|
|
@@ -726,9 +726,6 @@ body {
|
|
|
726
726
|
.h-\[120px\] {
|
|
727
727
|
height: 120px;
|
|
728
728
|
}
|
|
729
|
-
.h-\[16px\] {
|
|
730
|
-
height: 16px;
|
|
731
|
-
}
|
|
732
729
|
.h-\[1px\] {
|
|
733
730
|
height: 1px;
|
|
734
731
|
}
|
|
@@ -885,10 +882,6 @@ body {
|
|
|
885
882
|
.w-auto {
|
|
886
883
|
width: auto;
|
|
887
884
|
}
|
|
888
|
-
.w-fit {
|
|
889
|
-
width: -moz-fit-content;
|
|
890
|
-
width: fit-content;
|
|
891
|
-
}
|
|
892
885
|
.w-full {
|
|
893
886
|
width: 100%;
|
|
894
887
|
}
|
|
@@ -908,9 +901,6 @@ body {
|
|
|
908
901
|
.min-w-\[150px\] {
|
|
909
902
|
min-width: 150px;
|
|
910
903
|
}
|
|
911
|
-
.min-w-\[200px\] {
|
|
912
|
-
min-width: 200px;
|
|
913
|
-
}
|
|
914
904
|
.min-w-\[8rem\] {
|
|
915
905
|
min-width: 8rem;
|
|
916
906
|
}
|
|
@@ -1018,6 +1008,14 @@ body {
|
|
|
1018
1008
|
.animate-pulse {
|
|
1019
1009
|
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
1020
1010
|
}
|
|
1011
|
+
@keyframes spin {
|
|
1012
|
+
to {
|
|
1013
|
+
transform: rotate(360deg);
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
.animate-spin {
|
|
1017
|
+
animation: spin 1s linear infinite;
|
|
1018
|
+
}
|
|
1021
1019
|
.cursor-default {
|
|
1022
1020
|
cursor: default;
|
|
1023
1021
|
}
|
|
@@ -1053,9 +1051,6 @@ body {
|
|
|
1053
1051
|
.flex-wrap {
|
|
1054
1052
|
flex-wrap: wrap;
|
|
1055
1053
|
}
|
|
1056
|
-
.place-items-end {
|
|
1057
|
-
place-items: end;
|
|
1058
|
-
}
|
|
1059
1054
|
.content-start {
|
|
1060
1055
|
align-content: flex-start;
|
|
1061
1056
|
}
|
|
@@ -1071,9 +1066,6 @@ body {
|
|
|
1071
1066
|
.justify-start {
|
|
1072
1067
|
justify-content: flex-start;
|
|
1073
1068
|
}
|
|
1074
|
-
.justify-end {
|
|
1075
|
-
justify-content: flex-end;
|
|
1076
|
-
}
|
|
1077
1069
|
.justify-center {
|
|
1078
1070
|
justify-content: center;
|
|
1079
1071
|
}
|
|
@@ -1295,6 +1287,9 @@ body {
|
|
|
1295
1287
|
.border-l {
|
|
1296
1288
|
border-left-width: 1px;
|
|
1297
1289
|
}
|
|
1290
|
+
.border-l-8 {
|
|
1291
|
+
border-left-width: 8px;
|
|
1292
|
+
}
|
|
1298
1293
|
.border-r {
|
|
1299
1294
|
border-right-width: 1px;
|
|
1300
1295
|
}
|
|
@@ -1395,6 +1390,10 @@ body {
|
|
|
1395
1390
|
.bg-primary\/20 {
|
|
1396
1391
|
background-color: hsl(var(--primary) / 0.2);
|
|
1397
1392
|
}
|
|
1393
|
+
.bg-red-500 {
|
|
1394
|
+
--tw-bg-opacity: 1;
|
|
1395
|
+
background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1));
|
|
1396
|
+
}
|
|
1398
1397
|
.bg-secondary {
|
|
1399
1398
|
background-color: hsl(var(--secondary));
|
|
1400
1399
|
}
|
|
@@ -1662,6 +1661,10 @@ body {
|
|
|
1662
1661
|
.tracking-widest {
|
|
1663
1662
|
letter-spacing: 0.1em;
|
|
1664
1663
|
}
|
|
1664
|
+
.text-blue-600 {
|
|
1665
|
+
--tw-text-opacity: 1;
|
|
1666
|
+
color: rgb(37 99 235 / var(--tw-text-opacity, 1));
|
|
1667
|
+
}
|
|
1665
1668
|
.text-card-foreground {
|
|
1666
1669
|
color: hsl(var(--card-foreground));
|
|
1667
1670
|
}
|
|
@@ -1689,6 +1692,14 @@ body {
|
|
|
1689
1692
|
--tw-text-opacity: 1;
|
|
1690
1693
|
color: rgb(55 65 81 / var(--tw-text-opacity, 1));
|
|
1691
1694
|
}
|
|
1695
|
+
.text-gray-900 {
|
|
1696
|
+
--tw-text-opacity: 1;
|
|
1697
|
+
color: rgb(17 24 39 / var(--tw-text-opacity, 1));
|
|
1698
|
+
}
|
|
1699
|
+
.text-green-600 {
|
|
1700
|
+
--tw-text-opacity: 1;
|
|
1701
|
+
color: rgb(22 163 74 / var(--tw-text-opacity, 1));
|
|
1702
|
+
}
|
|
1692
1703
|
.text-muted-foreground {
|
|
1693
1704
|
color: hsl(var(--muted-foreground));
|
|
1694
1705
|
}
|
|
@@ -1713,6 +1724,10 @@ body {
|
|
|
1713
1724
|
--tw-text-opacity: 1;
|
|
1714
1725
|
color: rgb(239 68 68 / var(--tw-text-opacity, 1));
|
|
1715
1726
|
}
|
|
1727
|
+
.text-red-600 {
|
|
1728
|
+
--tw-text-opacity: 1;
|
|
1729
|
+
color: rgb(220 38 38 / var(--tw-text-opacity, 1));
|
|
1730
|
+
}
|
|
1716
1731
|
.text-secondary-foreground {
|
|
1717
1732
|
color: hsl(var(--secondary-foreground));
|
|
1718
1733
|
}
|
|
@@ -1732,6 +1747,10 @@ body {
|
|
|
1732
1747
|
--tw-text-opacity: 1;
|
|
1733
1748
|
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
|
|
1734
1749
|
}
|
|
1750
|
+
.text-yellow-600 {
|
|
1751
|
+
--tw-text-opacity: 1;
|
|
1752
|
+
color: rgb(202 138 4 / var(--tw-text-opacity, 1));
|
|
1753
|
+
}
|
|
1735
1754
|
.text-zinc-100 {
|
|
1736
1755
|
--tw-text-opacity: 1;
|
|
1737
1756
|
color: rgb(244 244 245 / var(--tw-text-opacity, 1));
|
|
@@ -2305,9 +2324,15 @@ body {
|
|
|
2305
2324
|
.hover\:bg-muted\/50:hover {
|
|
2306
2325
|
background-color: hsl(var(--muted) / 0.5);
|
|
2307
2326
|
}
|
|
2327
|
+
.hover\:bg-muted\/80:hover {
|
|
2328
|
+
background-color: hsl(var(--muted) / 0.8);
|
|
2329
|
+
}
|
|
2308
2330
|
.hover\:bg-primary:hover {
|
|
2309
2331
|
background-color: hsl(var(--primary));
|
|
2310
2332
|
}
|
|
2333
|
+
.hover\:bg-primary\/80:hover {
|
|
2334
|
+
background-color: hsl(var(--primary) / 0.8);
|
|
2335
|
+
}
|
|
2311
2336
|
.hover\:bg-slate-900:hover {
|
|
2312
2337
|
--tw-bg-opacity: 1;
|
|
2313
2338
|
background-color: rgb(15 23 42 / var(--tw-bg-opacity, 1));
|
|
@@ -2474,35 +2499,9 @@ body {
|
|
|
2474
2499
|
.group\/menu-item:hover .group-hover\/menu-item\:opacity-100 {
|
|
2475
2500
|
opacity: 1;
|
|
2476
2501
|
}
|
|
2477
|
-
.group.toaster .group-\[\.toaster\]\:border-border {
|
|
2478
|
-
border-color: hsl(var(--border));
|
|
2479
|
-
}
|
|
2480
|
-
.group.toast .group-\[\.toast\]\:bg-muted {
|
|
2481
|
-
background-color: hsl(var(--muted));
|
|
2482
|
-
}
|
|
2483
|
-
.group.toast .group-\[\.toast\]\:bg-primary {
|
|
2484
|
-
background-color: hsl(var(--primary));
|
|
2485
|
-
}
|
|
2486
|
-
.group.toaster .group-\[\.toaster\]\:bg-background {
|
|
2487
|
-
background-color: hsl(var(--background));
|
|
2488
|
-
}
|
|
2489
2502
|
.group.toast .group-\[\.toast\]\:text-muted-foreground {
|
|
2490
2503
|
color: hsl(var(--muted-foreground));
|
|
2491
2504
|
}
|
|
2492
|
-
.group.toast .group-\[\.toast\]\:text-primary-foreground {
|
|
2493
|
-
color: hsl(var(--primary-foreground));
|
|
2494
|
-
}
|
|
2495
|
-
.group.toaster .group-\[\.toaster\]\:text-foreground {
|
|
2496
|
-
color: hsl(var(--foreground));
|
|
2497
|
-
}
|
|
2498
|
-
.group.toaster .group-\[\.toaster\]\:shadow-lg {
|
|
2499
|
-
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
2500
|
-
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
|
|
2501
|
-
box-shadow:
|
|
2502
|
-
var(--tw-ring-offset-shadow, 0 0 #0000),
|
|
2503
|
-
var(--tw-ring-shadow, 0 0 #0000),
|
|
2504
|
-
var(--tw-shadow);
|
|
2505
|
-
}
|
|
2506
2505
|
.peer:focus ~ .peer-focus\:shadow-lg {
|
|
2507
2506
|
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
2508
2507
|
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
|
|
@@ -2644,6 +2643,22 @@ body {
|
|
|
2644
2643
|
.data-\[active\=true\]\:border-ring[data-active=true] {
|
|
2645
2644
|
border-color: hsl(var(--ring));
|
|
2646
2645
|
}
|
|
2646
|
+
.data-\[type\=error\]\:border-l-red-500[data-type=error] {
|
|
2647
|
+
--tw-border-opacity: 1;
|
|
2648
|
+
border-left-color: rgb(239 68 68 / var(--tw-border-opacity, 1));
|
|
2649
|
+
}
|
|
2650
|
+
.data-\[type\=info\]\:border-l-blue-500[data-type=info] {
|
|
2651
|
+
--tw-border-opacity: 1;
|
|
2652
|
+
border-left-color: rgb(59 130 246 / var(--tw-border-opacity, 1));
|
|
2653
|
+
}
|
|
2654
|
+
.data-\[type\=success\]\:border-l-green-500[data-type=success] {
|
|
2655
|
+
--tw-border-opacity: 1;
|
|
2656
|
+
border-left-color: rgb(34 197 94 / var(--tw-border-opacity, 1));
|
|
2657
|
+
}
|
|
2658
|
+
.data-\[type\=warning\]\:border-l-yellow-500[data-type=warning] {
|
|
2659
|
+
--tw-border-opacity: 1;
|
|
2660
|
+
border-left-color: rgb(234 179 8 / var(--tw-border-opacity, 1));
|
|
2661
|
+
}
|
|
2647
2662
|
.data-\[selected\=true\]\:bg-primary[data-selected=true] {
|
|
2648
2663
|
background-color: hsl(var(--primary));
|
|
2649
2664
|
}
|
|
@@ -2666,6 +2681,22 @@ body {
|
|
|
2666
2681
|
.data-\[state\=unchecked\]\:bg-input[data-state=unchecked] {
|
|
2667
2682
|
background-color: hsl(var(--input));
|
|
2668
2683
|
}
|
|
2684
|
+
.data-\[type\=error\]\:bg-red-50[data-type=error] {
|
|
2685
|
+
--tw-bg-opacity: 1;
|
|
2686
|
+
background-color: rgb(254 242 242 / var(--tw-bg-opacity, 1));
|
|
2687
|
+
}
|
|
2688
|
+
.data-\[type\=info\]\:bg-blue-50[data-type=info] {
|
|
2689
|
+
--tw-bg-opacity: 1;
|
|
2690
|
+
background-color: rgb(239 246 255 / var(--tw-bg-opacity, 1));
|
|
2691
|
+
}
|
|
2692
|
+
.data-\[type\=success\]\:bg-green-50[data-type=success] {
|
|
2693
|
+
--tw-bg-opacity: 1;
|
|
2694
|
+
background-color: rgb(240 253 244 / var(--tw-bg-opacity, 1));
|
|
2695
|
+
}
|
|
2696
|
+
.data-\[type\=warning\]\:bg-yellow-50[data-type=warning] {
|
|
2697
|
+
--tw-bg-opacity: 1;
|
|
2698
|
+
background-color: rgb(254 252 232 / var(--tw-bg-opacity, 1));
|
|
2699
|
+
}
|
|
2669
2700
|
.data-\[active\=true\]\:font-medium[data-active=true] {
|
|
2670
2701
|
font-weight: 500;
|
|
2671
2702
|
}
|
|
@@ -2681,14 +2712,6 @@ body {
|
|
|
2681
2712
|
.data-\[state\=open\]\:text-muted-foreground[data-state=open] {
|
|
2682
2713
|
color: hsl(var(--muted-foreground));
|
|
2683
2714
|
}
|
|
2684
|
-
.data-\[type\=error\]\:text-red-500[data-type=error] {
|
|
2685
|
-
--tw-text-opacity: 1;
|
|
2686
|
-
color: rgb(239 68 68 / var(--tw-text-opacity, 1));
|
|
2687
|
-
}
|
|
2688
|
-
.data-\[type\=success\]\:text-green-500[data-type=success] {
|
|
2689
|
-
--tw-text-opacity: 1;
|
|
2690
|
-
color: rgb(34 197 94 / var(--tw-text-opacity, 1));
|
|
2691
|
-
}
|
|
2692
2715
|
.data-\[disabled\=true\]\:opacity-50[data-disabled=true] {
|
|
2693
2716
|
opacity: 0.5;
|
|
2694
2717
|
}
|
|
@@ -2937,6 +2960,10 @@ body {
|
|
|
2937
2960
|
--tw-bg-opacity: 1;
|
|
2938
2961
|
background-color: hsl(231 15% 19% / var(--tw-bg-opacity, 1));
|
|
2939
2962
|
}
|
|
2963
|
+
.dark\:bg-gray-900:is(.dark *) {
|
|
2964
|
+
--tw-bg-opacity: 1;
|
|
2965
|
+
background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1));
|
|
2966
|
+
}
|
|
2940
2967
|
.dark\:bg-input\/30:is(.dark *) {
|
|
2941
2968
|
background-color: hsl(var(--input) / 0.3);
|
|
2942
2969
|
}
|
|
@@ -2967,14 +2994,30 @@ body {
|
|
|
2967
2994
|
--tw-text-opacity: 1;
|
|
2968
2995
|
color: rgb(0 0 0 / var(--tw-text-opacity, 1));
|
|
2969
2996
|
}
|
|
2997
|
+
.dark\:text-blue-400:is(.dark *) {
|
|
2998
|
+
--tw-text-opacity: 1;
|
|
2999
|
+
color: rgb(96 165 250 / var(--tw-text-opacity, 1));
|
|
3000
|
+
}
|
|
3001
|
+
.dark\:text-gray-100:is(.dark *) {
|
|
3002
|
+
--tw-text-opacity: 1;
|
|
3003
|
+
color: rgb(243 244 246 / var(--tw-text-opacity, 1));
|
|
3004
|
+
}
|
|
2970
3005
|
.dark\:text-gray-300:is(.dark *) {
|
|
2971
3006
|
--tw-text-opacity: 1;
|
|
2972
3007
|
color: rgb(209 213 219 / var(--tw-text-opacity, 1));
|
|
2973
3008
|
}
|
|
3009
|
+
.dark\:text-green-400:is(.dark *) {
|
|
3010
|
+
--tw-text-opacity: 1;
|
|
3011
|
+
color: rgb(74 222 128 / var(--tw-text-opacity, 1));
|
|
3012
|
+
}
|
|
2974
3013
|
.dark\:text-neutral-300:is(.dark *) {
|
|
2975
3014
|
--tw-text-opacity: 1;
|
|
2976
3015
|
color: rgb(212 212 212 / var(--tw-text-opacity, 1));
|
|
2977
3016
|
}
|
|
3017
|
+
.dark\:text-red-400:is(.dark *) {
|
|
3018
|
+
--tw-text-opacity: 1;
|
|
3019
|
+
color: rgb(248 113 113 / var(--tw-text-opacity, 1));
|
|
3020
|
+
}
|
|
2978
3021
|
.dark\:text-slate-400:is(.dark *) {
|
|
2979
3022
|
--tw-text-opacity: 1;
|
|
2980
3023
|
color: rgb(148 163 184 / var(--tw-text-opacity, 1));
|
|
@@ -2991,6 +3034,14 @@ body {
|
|
|
2991
3034
|
--tw-text-opacity: 1;
|
|
2992
3035
|
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
|
|
2993
3036
|
}
|
|
3037
|
+
.dark\:text-yellow-400:is(.dark *) {
|
|
3038
|
+
--tw-text-opacity: 1;
|
|
3039
|
+
color: rgb(250 204 21 / var(--tw-text-opacity, 1));
|
|
3040
|
+
}
|
|
3041
|
+
.dark\:text-zinc-400:is(.dark *) {
|
|
3042
|
+
--tw-text-opacity: 1;
|
|
3043
|
+
color: rgb(161 161 170 / var(--tw-text-opacity, 1));
|
|
3044
|
+
}
|
|
2994
3045
|
.dark\:hover\:bg-slate-50:hover:is(.dark *) {
|
|
2995
3046
|
--tw-bg-opacity: 1;
|
|
2996
3047
|
background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1));
|
|
@@ -3007,6 +3058,9 @@ body {
|
|
|
3007
3058
|
--tw-text-opacity: 1;
|
|
3008
3059
|
color: rgb(15 23 42 / var(--tw-text-opacity, 1));
|
|
3009
3060
|
}
|
|
3061
|
+
.group.toast .dark\:group-\[\.toast\]\:text-muted-foreground\/80:is(.dark *) {
|
|
3062
|
+
color: hsl(var(--muted-foreground) / 0.8);
|
|
3063
|
+
}
|
|
3010
3064
|
.dark\:aria-selected\:bg-primary[aria-selected=true]:is(.dark *) {
|
|
3011
3065
|
background-color: hsl(var(--primary));
|
|
3012
3066
|
}
|
|
@@ -3028,6 +3082,34 @@ body {
|
|
|
3028
3082
|
--tw-text-opacity: 1;
|
|
3029
3083
|
color: rgb(248 250 252 / var(--tw-text-opacity, 1));
|
|
3030
3084
|
}
|
|
3085
|
+
.dark\:data-\[type\=error\]\:bg-red-900\/30[data-type=error]:is(.dark *) {
|
|
3086
|
+
background-color: rgb(127 29 29 / 0.3);
|
|
3087
|
+
}
|
|
3088
|
+
.dark\:data-\[type\=info\]\:bg-blue-900\/30[data-type=info]:is(.dark *) {
|
|
3089
|
+
background-color: rgb(30 58 138 / 0.3);
|
|
3090
|
+
}
|
|
3091
|
+
.dark\:data-\[type\=success\]\:bg-green-900\/30[data-type=success]:is(.dark *) {
|
|
3092
|
+
background-color: rgb(20 83 45 / 0.3);
|
|
3093
|
+
}
|
|
3094
|
+
.dark\:data-\[type\=warning\]\:bg-yellow-900\/30[data-type=warning]:is(.dark *) {
|
|
3095
|
+
background-color: rgb(113 63 18 / 0.3);
|
|
3096
|
+
}
|
|
3097
|
+
.dark\:data-\[type\=error\]\:text-red-400[data-type=error]:is(.dark *) {
|
|
3098
|
+
--tw-text-opacity: 1;
|
|
3099
|
+
color: rgb(248 113 113 / var(--tw-text-opacity, 1));
|
|
3100
|
+
}
|
|
3101
|
+
.dark\:data-\[type\=info\]\:text-blue-400[data-type=info]:is(.dark *) {
|
|
3102
|
+
--tw-text-opacity: 1;
|
|
3103
|
+
color: rgb(96 165 250 / var(--tw-text-opacity, 1));
|
|
3104
|
+
}
|
|
3105
|
+
.dark\:data-\[type\=success\]\:text-green-400[data-type=success]:is(.dark *) {
|
|
3106
|
+
--tw-text-opacity: 1;
|
|
3107
|
+
color: rgb(74 222 128 / var(--tw-text-opacity, 1));
|
|
3108
|
+
}
|
|
3109
|
+
.dark\:data-\[type\=warning\]\:text-yellow-400[data-type=warning]:is(.dark *) {
|
|
3110
|
+
--tw-text-opacity: 1;
|
|
3111
|
+
color: rgb(250 204 21 / var(--tw-text-opacity, 1));
|
|
3112
|
+
}
|
|
3031
3113
|
@media (min-width: 640px) {
|
|
3032
3114
|
.sm\:mt-0 {
|
|
3033
3115
|
margin-top: 0px;
|
package/dist/index.d.mts
CHANGED
|
@@ -18,7 +18,6 @@ import * as SelectPrimitive from '@radix-ui/react-select';
|
|
|
18
18
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
19
19
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
20
20
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
21
|
-
import * as sonner from 'sonner';
|
|
22
21
|
import { Toaster as Toaster$1 } from 'sonner';
|
|
23
22
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
24
23
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
@@ -376,51 +375,12 @@ declare const SlideBase: React$1.ForwardRefExoticComponent<SliderBaseProps & Rea
|
|
|
376
375
|
|
|
377
376
|
type ToasterProps = React.ComponentProps<typeof Toaster$1>;
|
|
378
377
|
declare const Toaster: ({ ...props }: ToasterProps) => react_jsx_runtime.JSX.Element;
|
|
379
|
-
declare const toast:
|
|
380
|
-
success: (message:
|
|
381
|
-
|
|
382
|
-
warning: (message:
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
message: (message: (React$1.ReactNode | (() => React.ReactNode)) | React.ReactNode, data?: sonner.ExternalToast) => string | number;
|
|
386
|
-
promise: <ToastData>(promise: Promise<ToastData> | (() => Promise<ToastData>), data?: {
|
|
387
|
-
icon?: React$1.ReactNode;
|
|
388
|
-
className?: string | undefined;
|
|
389
|
-
id?: number | string | undefined;
|
|
390
|
-
style?: React.CSSProperties | undefined;
|
|
391
|
-
onDismiss?: ((toast: sonner.ToastT) => void) | undefined;
|
|
392
|
-
position?: ("top-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "bottom-center") | undefined;
|
|
393
|
-
duration?: number | undefined;
|
|
394
|
-
cancel?: React$1.ReactNode | sonner.Action;
|
|
395
|
-
invert?: boolean | undefined;
|
|
396
|
-
richColors?: boolean | undefined;
|
|
397
|
-
closeButton?: boolean | undefined;
|
|
398
|
-
dismissible?: boolean | undefined;
|
|
399
|
-
action?: React$1.ReactNode | sonner.Action;
|
|
400
|
-
onAutoClose?: ((toast: sonner.ToastT) => void) | undefined;
|
|
401
|
-
cancelButtonStyle?: React.CSSProperties | undefined;
|
|
402
|
-
actionButtonStyle?: React.CSSProperties | undefined;
|
|
403
|
-
unstyled?: boolean | undefined;
|
|
404
|
-
classNames?: sonner.ToastClassnames | undefined;
|
|
405
|
-
descriptionClassName?: string | undefined;
|
|
406
|
-
} & {
|
|
407
|
-
loading?: string | React.ReactNode;
|
|
408
|
-
success?: React$1.ReactNode | ((data: ToastData) => React.ReactNode | string | Promise<React.ReactNode | string>);
|
|
409
|
-
error?: React$1.ReactNode | ((data: any) => React.ReactNode | string | Promise<React.ReactNode | string>);
|
|
410
|
-
description?: React$1.ReactNode | ((data: any) => React.ReactNode | string | Promise<React.ReactNode | string>);
|
|
411
|
-
finally?: () => void | Promise<void>;
|
|
412
|
-
}) => (string & {
|
|
413
|
-
unwrap: () => Promise<ToastData>;
|
|
414
|
-
}) | (number & {
|
|
415
|
-
unwrap: () => Promise<ToastData>;
|
|
416
|
-
}) | {
|
|
417
|
-
unwrap: () => Promise<ToastData>;
|
|
418
|
-
};
|
|
419
|
-
dismiss: (id?: number | string) => string | number;
|
|
420
|
-
loading: (message: (React$1.ReactNode | (() => React.ReactNode)) | React.ReactNode, data?: sonner.ExternalToast) => string | number;
|
|
421
|
-
} & {
|
|
422
|
-
getHistory: () => (sonner.ToastT | sonner.ToastToDismiss)[];
|
|
423
|
-
getToasts: () => (sonner.ToastT | sonner.ToastToDismiss)[];
|
|
378
|
+
declare const toast: {
|
|
379
|
+
success: (message: string) => string | number;
|
|
380
|
+
error: (message: string) => string | number;
|
|
381
|
+
warning: (message: string) => string | number;
|
|
382
|
+
info: (message: string) => string | number;
|
|
383
|
+
loading: (message: string) => string | number;
|
|
424
384
|
};
|
|
425
385
|
|
|
426
386
|
declare const SwitchBase: React$1.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
@@ -503,15 +463,17 @@ interface ComboboxProps<T extends string> {
|
|
|
503
463
|
placeholder?: string;
|
|
504
464
|
searchPlaceholder?: string;
|
|
505
465
|
label?: string;
|
|
466
|
+
labelClassname?: string;
|
|
506
467
|
}
|
|
507
|
-
declare function Combobox<T extends string>({ items, selected, onChange, placeholder, searchPlaceholder, label, }: ComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
468
|
+
declare function Combobox<T extends string>({ items, selected, onChange, placeholder, searchPlaceholder, label, labelClassname }: ComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
508
469
|
|
|
509
470
|
interface MultiComboboxProps<T extends string> extends Omit<ComboboxProps<T>, "selected" | "onChange"> {
|
|
510
471
|
label?: string;
|
|
511
472
|
selected: T[];
|
|
512
473
|
onChange: (value: T[]) => void;
|
|
474
|
+
labelClassname?: string;
|
|
513
475
|
}
|
|
514
|
-
declare function MultiCombobox<T extends string>({ items, selected, onChange, placeholder, searchPlaceholder, label, }: MultiComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
476
|
+
declare function MultiCombobox<T extends string>({ items, selected, onChange, placeholder, searchPlaceholder, label, labelClassname, }: MultiComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
515
477
|
|
|
516
478
|
interface SelectItem$1<T extends string> {
|
|
517
479
|
label: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,6 @@ import * as SelectPrimitive from '@radix-ui/react-select';
|
|
|
18
18
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
19
19
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
20
20
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
21
|
-
import * as sonner from 'sonner';
|
|
22
21
|
import { Toaster as Toaster$1 } from 'sonner';
|
|
23
22
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
24
23
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
@@ -376,51 +375,12 @@ declare const SlideBase: React$1.ForwardRefExoticComponent<SliderBaseProps & Rea
|
|
|
376
375
|
|
|
377
376
|
type ToasterProps = React.ComponentProps<typeof Toaster$1>;
|
|
378
377
|
declare const Toaster: ({ ...props }: ToasterProps) => react_jsx_runtime.JSX.Element;
|
|
379
|
-
declare const toast:
|
|
380
|
-
success: (message:
|
|
381
|
-
|
|
382
|
-
warning: (message:
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
message: (message: (React$1.ReactNode | (() => React.ReactNode)) | React.ReactNode, data?: sonner.ExternalToast) => string | number;
|
|
386
|
-
promise: <ToastData>(promise: Promise<ToastData> | (() => Promise<ToastData>), data?: {
|
|
387
|
-
icon?: React$1.ReactNode;
|
|
388
|
-
className?: string | undefined;
|
|
389
|
-
id?: number | string | undefined;
|
|
390
|
-
style?: React.CSSProperties | undefined;
|
|
391
|
-
onDismiss?: ((toast: sonner.ToastT) => void) | undefined;
|
|
392
|
-
position?: ("top-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "bottom-center") | undefined;
|
|
393
|
-
duration?: number | undefined;
|
|
394
|
-
cancel?: React$1.ReactNode | sonner.Action;
|
|
395
|
-
invert?: boolean | undefined;
|
|
396
|
-
richColors?: boolean | undefined;
|
|
397
|
-
closeButton?: boolean | undefined;
|
|
398
|
-
dismissible?: boolean | undefined;
|
|
399
|
-
action?: React$1.ReactNode | sonner.Action;
|
|
400
|
-
onAutoClose?: ((toast: sonner.ToastT) => void) | undefined;
|
|
401
|
-
cancelButtonStyle?: React.CSSProperties | undefined;
|
|
402
|
-
actionButtonStyle?: React.CSSProperties | undefined;
|
|
403
|
-
unstyled?: boolean | undefined;
|
|
404
|
-
classNames?: sonner.ToastClassnames | undefined;
|
|
405
|
-
descriptionClassName?: string | undefined;
|
|
406
|
-
} & {
|
|
407
|
-
loading?: string | React.ReactNode;
|
|
408
|
-
success?: React$1.ReactNode | ((data: ToastData) => React.ReactNode | string | Promise<React.ReactNode | string>);
|
|
409
|
-
error?: React$1.ReactNode | ((data: any) => React.ReactNode | string | Promise<React.ReactNode | string>);
|
|
410
|
-
description?: React$1.ReactNode | ((data: any) => React.ReactNode | string | Promise<React.ReactNode | string>);
|
|
411
|
-
finally?: () => void | Promise<void>;
|
|
412
|
-
}) => (string & {
|
|
413
|
-
unwrap: () => Promise<ToastData>;
|
|
414
|
-
}) | (number & {
|
|
415
|
-
unwrap: () => Promise<ToastData>;
|
|
416
|
-
}) | {
|
|
417
|
-
unwrap: () => Promise<ToastData>;
|
|
418
|
-
};
|
|
419
|
-
dismiss: (id?: number | string) => string | number;
|
|
420
|
-
loading: (message: (React$1.ReactNode | (() => React.ReactNode)) | React.ReactNode, data?: sonner.ExternalToast) => string | number;
|
|
421
|
-
} & {
|
|
422
|
-
getHistory: () => (sonner.ToastT | sonner.ToastToDismiss)[];
|
|
423
|
-
getToasts: () => (sonner.ToastT | sonner.ToastToDismiss)[];
|
|
378
|
+
declare const toast: {
|
|
379
|
+
success: (message: string) => string | number;
|
|
380
|
+
error: (message: string) => string | number;
|
|
381
|
+
warning: (message: string) => string | number;
|
|
382
|
+
info: (message: string) => string | number;
|
|
383
|
+
loading: (message: string) => string | number;
|
|
424
384
|
};
|
|
425
385
|
|
|
426
386
|
declare const SwitchBase: React$1.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
@@ -503,15 +463,17 @@ interface ComboboxProps<T extends string> {
|
|
|
503
463
|
placeholder?: string;
|
|
504
464
|
searchPlaceholder?: string;
|
|
505
465
|
label?: string;
|
|
466
|
+
labelClassname?: string;
|
|
506
467
|
}
|
|
507
|
-
declare function Combobox<T extends string>({ items, selected, onChange, placeholder, searchPlaceholder, label, }: ComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
468
|
+
declare function Combobox<T extends string>({ items, selected, onChange, placeholder, searchPlaceholder, label, labelClassname }: ComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
508
469
|
|
|
509
470
|
interface MultiComboboxProps<T extends string> extends Omit<ComboboxProps<T>, "selected" | "onChange"> {
|
|
510
471
|
label?: string;
|
|
511
472
|
selected: T[];
|
|
512
473
|
onChange: (value: T[]) => void;
|
|
474
|
+
labelClassname?: string;
|
|
513
475
|
}
|
|
514
|
-
declare function MultiCombobox<T extends string>({ items, selected, onChange, placeholder, searchPlaceholder, label, }: MultiComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
476
|
+
declare function MultiCombobox<T extends string>({ items, selected, onChange, placeholder, searchPlaceholder, label, labelClassname, }: MultiComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
515
477
|
|
|
516
478
|
interface SelectItem$1<T extends string> {
|
|
517
479
|
label: string;
|
package/dist/index.js
CHANGED
|
@@ -217,7 +217,7 @@ var buttonVariantsBase = (0, import_class_variance_authority.cva)(
|
|
|
217
217
|
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
|
|
218
218
|
disabled:pointer-events-none disabled:opacity-50
|
|
219
219
|
active:scale-[0.97]
|
|
220
|
-
[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0
|
|
220
|
+
[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-transparent
|
|
221
221
|
`,
|
|
222
222
|
{
|
|
223
223
|
variants: {
|
|
@@ -230,9 +230,9 @@ var buttonVariantsBase = (0, import_class_variance_authority.cva)(
|
|
|
230
230
|
link: "text-primary underline-offset-4 hover:underline"
|
|
231
231
|
},
|
|
232
232
|
size: {
|
|
233
|
-
default: "
|
|
234
|
-
sm: "
|
|
235
|
-
lg: "
|
|
233
|
+
default: "px-4 py-1.5",
|
|
234
|
+
sm: "rounded-md px-3 text-xs",
|
|
235
|
+
lg: "rounded-md px-8",
|
|
236
236
|
icon: "h-9 w-9"
|
|
237
237
|
}
|
|
238
238
|
},
|
|
@@ -265,7 +265,7 @@ var ButtonGroupBase = React.forwardRef(
|
|
|
265
265
|
className: cn(
|
|
266
266
|
"inline-flex",
|
|
267
267
|
orientation === "vertical" ? "flex-col" : "flex-row",
|
|
268
|
-
"rounded-md overflow-hidden
|
|
268
|
+
"rounded-md overflow-hidden isolate",
|
|
269
269
|
className
|
|
270
270
|
),
|
|
271
271
|
...props,
|
|
@@ -632,8 +632,7 @@ var InputBase = React6.forwardRef(
|
|
|
632
632
|
{
|
|
633
633
|
className: cn(
|
|
634
634
|
"flex items-center rounded-md transition focus-within:ring-1 focus-within:ring-ring focus-within:border-ring bg-white dark:bg-[hsl(231,15%,19%)] overflow-hidden",
|
|
635
|
-
type !== "
|
|
636
|
-
(type === "file" || type === "number") && "border-none"
|
|
635
|
+
type !== "file" && "border"
|
|
637
636
|
),
|
|
638
637
|
children: [
|
|
639
638
|
leftIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex items-center justify-center px-2", children: leftIcon }),
|
|
@@ -642,7 +641,7 @@ var InputBase = React6.forwardRef(
|
|
|
642
641
|
{
|
|
643
642
|
type,
|
|
644
643
|
className: cn(
|
|
645
|
-
"w-full flex-1 text-sm
|
|
644
|
+
"w-full flex-1 text-sm py-1.5 px-3 focus:outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 bg-white dark:bg-[hsl(231,15%,19%)]",
|
|
646
645
|
className
|
|
647
646
|
),
|
|
648
647
|
ref,
|
|
@@ -1078,7 +1077,7 @@ var DropDownMenuSubContentBase = React10.forwardRef(({ className, ...props }, re
|
|
|
1078
1077
|
{
|
|
1079
1078
|
ref,
|
|
1080
1079
|
className: cn(
|
|
1081
|
-
"
|
|
1080
|
+
" min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1082
1081
|
className
|
|
1083
1082
|
),
|
|
1084
1083
|
...props
|
|
@@ -1090,8 +1089,8 @@ var DropDownMenuContentBase = React10.forwardRef(({ className, sideOffset = 4, .
|
|
|
1090
1089
|
sideOffset,
|
|
1091
1090
|
forceMount: true,
|
|
1092
1091
|
ref,
|
|
1092
|
+
className: cn("z-[9999] p-0", className),
|
|
1093
1093
|
...props,
|
|
1094
|
-
className: cn("p-0", className),
|
|
1095
1094
|
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_framer_motion.AnimatePresence, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1096
1095
|
import_framer_motion.motion.div,
|
|
1097
1096
|
{
|
|
@@ -1100,7 +1099,7 @@ var DropDownMenuContentBase = React10.forwardRef(({ className, sideOffset = 4, .
|
|
|
1100
1099
|
exit: { opacity: 0, scale: 0.95, y: 5 },
|
|
1101
1100
|
transition: { duration: 0.2, ease: "easeOut" },
|
|
1102
1101
|
className: cn(
|
|
1103
|
-
"
|
|
1102
|
+
"min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1104
1103
|
className
|
|
1105
1104
|
),
|
|
1106
1105
|
children: props.children
|
|
@@ -1430,7 +1429,7 @@ function ComboboxBase({
|
|
|
1430
1429
|
errorMessage
|
|
1431
1430
|
}) {
|
|
1432
1431
|
const [open, setOpen] = (0, import_react4.useState)(false);
|
|
1433
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "col-span-1 w-full
|
|
1432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "col-span-1 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(PopoverBase, { open, onOpenChange: setOpen, modal: true, children: [
|
|
1434
1433
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1435
1434
|
PopoverTriggerBase,
|
|
1436
1435
|
{
|
|
@@ -1443,7 +1442,7 @@ function ComboboxBase({
|
|
|
1443
1442
|
role: "combobox",
|
|
1444
1443
|
"aria-expanded": open,
|
|
1445
1444
|
className: cn(
|
|
1446
|
-
"flex
|
|
1445
|
+
"flex items-start gap-2 justify-between h-full",
|
|
1447
1446
|
errorMessage && "border-red-500"
|
|
1448
1447
|
),
|
|
1449
1448
|
children: [
|
|
@@ -1501,13 +1500,13 @@ function Combobox({
|
|
|
1501
1500
|
onChange,
|
|
1502
1501
|
placeholder,
|
|
1503
1502
|
searchPlaceholder,
|
|
1504
|
-
label
|
|
1503
|
+
label,
|
|
1504
|
+
labelClassname
|
|
1505
1505
|
}) {
|
|
1506
1506
|
const selectedItem = items.find((item) => item.value === selected);
|
|
1507
|
-
const renderSelected = (0, import_react5.useMemo)(
|
|
1508
|
-
()
|
|
1509
|
-
|
|
1510
|
-
);
|
|
1507
|
+
const renderSelected = (0, import_react5.useMemo)(() => {
|
|
1508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: cn("truncate", !selectedItem && "text-gray-500"), children: selectedItem?.label ?? placeholder ?? "Selecione uma op\xE7\xE3o..." });
|
|
1509
|
+
}, [placeholder, selectedItem]);
|
|
1511
1510
|
const checkIsSelected = (0, import_react5.useCallback)(
|
|
1512
1511
|
(value) => selected == null ? false : selected == value,
|
|
1513
1512
|
[selected]
|
|
@@ -1519,7 +1518,7 @@ function Combobox({
|
|
|
1519
1518
|
[selected, onChange]
|
|
1520
1519
|
);
|
|
1521
1520
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col gap-1 w-full min-w-[150px]", children: [
|
|
1522
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(LabelBase_default, { children: label }),
|
|
1521
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(LabelBase_default, { className: labelClassname, children: label }),
|
|
1523
1522
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1524
1523
|
ComboboxBase,
|
|
1525
1524
|
{
|
|
@@ -1543,7 +1542,8 @@ function MultiCombobox({
|
|
|
1543
1542
|
onChange,
|
|
1544
1543
|
placeholder,
|
|
1545
1544
|
searchPlaceholder,
|
|
1546
|
-
label
|
|
1545
|
+
label,
|
|
1546
|
+
labelClassname
|
|
1547
1547
|
}) {
|
|
1548
1548
|
const selectedItems = items.filter((item) => selected.includes(item.value));
|
|
1549
1549
|
const checkIsSelected = (0, import_react6.useCallback)(
|
|
@@ -1562,8 +1562,9 @@ function MultiCombobox({
|
|
|
1562
1562
|
[selected, onChange]
|
|
1563
1563
|
);
|
|
1564
1564
|
const renderSelected = (0, import_react6.useMemo)(() => {
|
|
1565
|
-
if (selectedItems.length === 0)
|
|
1566
|
-
return placeholder ?? "Selecione uma op\xE7\xE3o...";
|
|
1565
|
+
if (selectedItems.length === 0) {
|
|
1566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-gray-500", children: placeholder ?? "Selecione uma op\xE7\xE3o..." });
|
|
1567
|
+
}
|
|
1567
1568
|
const items2 = selectedItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1568
1569
|
"div",
|
|
1569
1570
|
{
|
|
@@ -1596,7 +1597,7 @@ function MultiCombobox({
|
|
|
1596
1597
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex flex-wrap gap-2", children: items2 });
|
|
1597
1598
|
}, [handleSelection, placeholder, selectedItems]);
|
|
1598
1599
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1 w-full min-w-[150px]", children: [
|
|
1599
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(LabelBase_default, { children: label }),
|
|
1600
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(LabelBase_default, { className: labelClassname, children: label }),
|
|
1600
1601
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1601
1602
|
ComboboxBase,
|
|
1602
1603
|
{
|
|
@@ -3023,8 +3024,10 @@ var SlideBase = React23.forwardRef(
|
|
|
3023
3024
|
SlideBase.displayName = "SlideBase";
|
|
3024
3025
|
|
|
3025
3026
|
// src/components/ui/SonnerBase.tsx
|
|
3027
|
+
var import_phosphor_react15 = require("phosphor-react");
|
|
3026
3028
|
var import_sonner = require("sonner");
|
|
3027
3029
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3030
|
+
var iconBaseClass = "w-5 h-auto";
|
|
3028
3031
|
var Toaster = ({ ...props }) => {
|
|
3029
3032
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3030
3033
|
import_sonner.Toaster,
|
|
@@ -3033,19 +3036,91 @@ var Toaster = ({ ...props }) => {
|
|
|
3033
3036
|
position: "top-center",
|
|
3034
3037
|
toastOptions: {
|
|
3035
3038
|
classNames: {
|
|
3036
|
-
toast: `
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3039
|
+
toast: `
|
|
3040
|
+
group toast
|
|
3041
|
+
bg-white dark:bg-gray-900
|
|
3042
|
+
text-gray-900 dark:text-gray-100
|
|
3043
|
+
shadow-lg rounded-md
|
|
3044
|
+
border-l-8
|
|
3045
|
+
border-border
|
|
3046
|
+
flex items-center gap-3
|
|
3047
|
+
data-[type=success]:border-l-green-500 data-[type=success]:bg-green-50 dark:data-[type=success]:bg-green-900/30 dark:data-[type=success]:text-green-400
|
|
3048
|
+
data-[type=error]:border-l-red-500 data-[type=error]:bg-red-50 dark:data-[type=error]:bg-red-900/30 dark:data-[type=error]:text-red-400
|
|
3049
|
+
data-[type=warning]:border-l-yellow-500 data-[type=warning]:bg-yellow-50 dark:data-[type=warning]:bg-yellow-900/30 dark:data-[type=warning]:text-yellow-400
|
|
3050
|
+
data-[type=info]:border-l-blue-500 data-[type=info]:bg-blue-50 dark:data-[type=info]:bg-blue-900/30 dark:data-[type=info]:text-blue-400
|
|
3051
|
+
`,
|
|
3052
|
+
description: `
|
|
3053
|
+
text-sm
|
|
3054
|
+
group-[.toast]:text-muted-foreground
|
|
3055
|
+
dark:group-[.toast]:text-muted-foreground/80
|
|
3056
|
+
`,
|
|
3057
|
+
actionButton: `
|
|
3058
|
+
ml-auto
|
|
3059
|
+
rounded-md px-3 py-1 text-sm font-semibold
|
|
3060
|
+
bg-primary text-primary-foreground
|
|
3061
|
+
hover:bg-primary/80
|
|
3062
|
+
transition-colors duration-200
|
|
3063
|
+
`,
|
|
3064
|
+
cancelButton: `
|
|
3065
|
+
ml-2
|
|
3066
|
+
rounded-md px-3 py-1 text-sm font-semibold
|
|
3067
|
+
bg-muted text-muted-foreground
|
|
3068
|
+
hover:bg-muted/80
|
|
3069
|
+
transition-colors duration-200
|
|
3070
|
+
`
|
|
3042
3071
|
}
|
|
3043
3072
|
},
|
|
3044
3073
|
...props
|
|
3045
3074
|
}
|
|
3046
3075
|
);
|
|
3047
3076
|
};
|
|
3048
|
-
var toast =
|
|
3077
|
+
var toast = {
|
|
3078
|
+
success: (message) => import_sonner.toast.success(message, {
|
|
3079
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3080
|
+
import_phosphor_react15.CheckCircle,
|
|
3081
|
+
{
|
|
3082
|
+
className: `${iconBaseClass} text-green-600 dark:text-green-400`,
|
|
3083
|
+
weight: "fill"
|
|
3084
|
+
}
|
|
3085
|
+
)
|
|
3086
|
+
}),
|
|
3087
|
+
error: (message) => import_sonner.toast.error(message, {
|
|
3088
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3089
|
+
import_phosphor_react15.XCircle,
|
|
3090
|
+
{
|
|
3091
|
+
className: `${iconBaseClass} text-red-600 dark:text-red-400`,
|
|
3092
|
+
weight: "fill"
|
|
3093
|
+
}
|
|
3094
|
+
)
|
|
3095
|
+
}),
|
|
3096
|
+
warning: (message) => import_sonner.toast.warning(message, {
|
|
3097
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3098
|
+
import_phosphor_react15.Warning,
|
|
3099
|
+
{
|
|
3100
|
+
className: `${iconBaseClass} text-yellow-600 dark:text-yellow-400`,
|
|
3101
|
+
weight: "fill"
|
|
3102
|
+
}
|
|
3103
|
+
)
|
|
3104
|
+
}),
|
|
3105
|
+
info: (message) => import_sonner.toast.info(message, {
|
|
3106
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3107
|
+
import_phosphor_react15.Info,
|
|
3108
|
+
{
|
|
3109
|
+
className: `${iconBaseClass} text-blue-600 dark:text-blue-400`,
|
|
3110
|
+
weight: "fill"
|
|
3111
|
+
}
|
|
3112
|
+
)
|
|
3113
|
+
}),
|
|
3114
|
+
loading: (message) => (0, import_sonner.toast)(message, {
|
|
3115
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3116
|
+
import_phosphor_react15.Spinner,
|
|
3117
|
+
{
|
|
3118
|
+
className: `${iconBaseClass} animate-spin text-zinc-500 dark:text-zinc-400`,
|
|
3119
|
+
weight: "fill"
|
|
3120
|
+
}
|
|
3121
|
+
)
|
|
3122
|
+
})
|
|
3123
|
+
};
|
|
3049
3124
|
|
|
3050
3125
|
// src/components/ui/SwitchBase.tsx
|
|
3051
3126
|
var React24 = __toESM(require("react"));
|
|
@@ -3058,7 +3133,7 @@ var SwitchBase = React24.forwardRef(({ className, ...props }, ref) => {
|
|
|
3058
3133
|
...props,
|
|
3059
3134
|
ref,
|
|
3060
3135
|
className: cn(
|
|
3061
|
-
"peer relative inline-flex
|
|
3136
|
+
"peer relative inline-flex w-12 cursor-pointer items-center rounded-full border-2 border-transparent shadow-md transition-colors duration-300 ease-in-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input data-[state=checked]:shadow-[0_0_15px_4px_var(--tw-shadow-color)] data-[state=checked]:shadow-primary/30",
|
|
3062
3137
|
className
|
|
3063
3138
|
),
|
|
3064
3139
|
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
package/dist/index.mjs
CHANGED
|
@@ -24,7 +24,7 @@ var buttonVariantsBase = cva(
|
|
|
24
24
|
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
|
|
25
25
|
disabled:pointer-events-none disabled:opacity-50
|
|
26
26
|
active:scale-[0.97]
|
|
27
|
-
[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0
|
|
27
|
+
[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-transparent
|
|
28
28
|
`,
|
|
29
29
|
{
|
|
30
30
|
variants: {
|
|
@@ -37,9 +37,9 @@ var buttonVariantsBase = cva(
|
|
|
37
37
|
link: "text-primary underline-offset-4 hover:underline"
|
|
38
38
|
},
|
|
39
39
|
size: {
|
|
40
|
-
default: "
|
|
41
|
-
sm: "
|
|
42
|
-
lg: "
|
|
40
|
+
default: "px-4 py-1.5",
|
|
41
|
+
sm: "rounded-md px-3 text-xs",
|
|
42
|
+
lg: "rounded-md px-8",
|
|
43
43
|
icon: "h-9 w-9"
|
|
44
44
|
}
|
|
45
45
|
},
|
|
@@ -72,7 +72,7 @@ var ButtonGroupBase = React.forwardRef(
|
|
|
72
72
|
className: cn(
|
|
73
73
|
"inline-flex",
|
|
74
74
|
orientation === "vertical" ? "flex-col" : "flex-row",
|
|
75
|
-
"rounded-md overflow-hidden
|
|
75
|
+
"rounded-md overflow-hidden isolate",
|
|
76
76
|
className
|
|
77
77
|
),
|
|
78
78
|
...props,
|
|
@@ -439,8 +439,7 @@ var InputBase = React6.forwardRef(
|
|
|
439
439
|
{
|
|
440
440
|
className: cn(
|
|
441
441
|
"flex items-center rounded-md transition focus-within:ring-1 focus-within:ring-ring focus-within:border-ring bg-white dark:bg-[hsl(231,15%,19%)] overflow-hidden",
|
|
442
|
-
type !== "
|
|
443
|
-
(type === "file" || type === "number") && "border-none"
|
|
442
|
+
type !== "file" && "border"
|
|
444
443
|
),
|
|
445
444
|
children: [
|
|
446
445
|
leftIcon && /* @__PURE__ */ jsx7("div", { className: "flex items-center justify-center px-2", children: leftIcon }),
|
|
@@ -449,7 +448,7 @@ var InputBase = React6.forwardRef(
|
|
|
449
448
|
{
|
|
450
449
|
type,
|
|
451
450
|
className: cn(
|
|
452
|
-
"w-full flex-1 text-sm
|
|
451
|
+
"w-full flex-1 text-sm py-1.5 px-3 focus:outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 bg-white dark:bg-[hsl(231,15%,19%)]",
|
|
453
452
|
className
|
|
454
453
|
),
|
|
455
454
|
ref,
|
|
@@ -885,7 +884,7 @@ var DropDownMenuSubContentBase = React10.forwardRef(({ className, ...props }, re
|
|
|
885
884
|
{
|
|
886
885
|
ref,
|
|
887
886
|
className: cn(
|
|
888
|
-
"
|
|
887
|
+
" min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
889
888
|
className
|
|
890
889
|
),
|
|
891
890
|
...props
|
|
@@ -897,8 +896,8 @@ var DropDownMenuContentBase = React10.forwardRef(({ className, sideOffset = 4, .
|
|
|
897
896
|
sideOffset,
|
|
898
897
|
forceMount: true,
|
|
899
898
|
ref,
|
|
899
|
+
className: cn("z-[9999] p-0", className),
|
|
900
900
|
...props,
|
|
901
|
-
className: cn("p-0", className),
|
|
902
901
|
children: /* @__PURE__ */ jsx11(AnimatePresence, { children: /* @__PURE__ */ jsx11(
|
|
903
902
|
motion.div,
|
|
904
903
|
{
|
|
@@ -907,7 +906,7 @@ var DropDownMenuContentBase = React10.forwardRef(({ className, sideOffset = 4, .
|
|
|
907
906
|
exit: { opacity: 0, scale: 0.95, y: 5 },
|
|
908
907
|
transition: { duration: 0.2, ease: "easeOut" },
|
|
909
908
|
className: cn(
|
|
910
|
-
"
|
|
909
|
+
"min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
911
910
|
className
|
|
912
911
|
),
|
|
913
912
|
children: props.children
|
|
@@ -1237,7 +1236,7 @@ function ComboboxBase({
|
|
|
1237
1236
|
errorMessage
|
|
1238
1237
|
}) {
|
|
1239
1238
|
const [open, setOpen] = useState4(false);
|
|
1240
|
-
return /* @__PURE__ */ jsx16("div", { className: "col-span-1 w-full
|
|
1239
|
+
return /* @__PURE__ */ jsx16("div", { className: "col-span-1 w-full", children: /* @__PURE__ */ jsxs9(PopoverBase, { open, onOpenChange: setOpen, modal: true, children: [
|
|
1241
1240
|
/* @__PURE__ */ jsx16(
|
|
1242
1241
|
PopoverTriggerBase,
|
|
1243
1242
|
{
|
|
@@ -1250,7 +1249,7 @@ function ComboboxBase({
|
|
|
1250
1249
|
role: "combobox",
|
|
1251
1250
|
"aria-expanded": open,
|
|
1252
1251
|
className: cn(
|
|
1253
|
-
"flex
|
|
1252
|
+
"flex items-start gap-2 justify-between h-full",
|
|
1254
1253
|
errorMessage && "border-red-500"
|
|
1255
1254
|
),
|
|
1256
1255
|
children: [
|
|
@@ -1308,13 +1307,13 @@ function Combobox({
|
|
|
1308
1307
|
onChange,
|
|
1309
1308
|
placeholder,
|
|
1310
1309
|
searchPlaceholder,
|
|
1311
|
-
label
|
|
1310
|
+
label,
|
|
1311
|
+
labelClassname
|
|
1312
1312
|
}) {
|
|
1313
1313
|
const selectedItem = items.find((item) => item.value === selected);
|
|
1314
|
-
const renderSelected = useMemo(
|
|
1315
|
-
()
|
|
1316
|
-
|
|
1317
|
-
);
|
|
1314
|
+
const renderSelected = useMemo(() => {
|
|
1315
|
+
return /* @__PURE__ */ jsx17("span", { className: cn("truncate", !selectedItem && "text-gray-500"), children: selectedItem?.label ?? placeholder ?? "Selecione uma op\xE7\xE3o..." });
|
|
1316
|
+
}, [placeholder, selectedItem]);
|
|
1318
1317
|
const checkIsSelected = useCallback(
|
|
1319
1318
|
(value) => selected == null ? false : selected == value,
|
|
1320
1319
|
[selected]
|
|
@@ -1326,7 +1325,7 @@ function Combobox({
|
|
|
1326
1325
|
[selected, onChange]
|
|
1327
1326
|
);
|
|
1328
1327
|
return /* @__PURE__ */ jsxs10("div", { className: "flex flex-col gap-1 w-full min-w-[150px]", children: [
|
|
1329
|
-
label && /* @__PURE__ */ jsx17(LabelBase_default, { children: label }),
|
|
1328
|
+
label && /* @__PURE__ */ jsx17(LabelBase_default, { className: labelClassname, children: label }),
|
|
1330
1329
|
/* @__PURE__ */ jsx17(
|
|
1331
1330
|
ComboboxBase,
|
|
1332
1331
|
{
|
|
@@ -1350,7 +1349,8 @@ function MultiCombobox({
|
|
|
1350
1349
|
onChange,
|
|
1351
1350
|
placeholder,
|
|
1352
1351
|
searchPlaceholder,
|
|
1353
|
-
label
|
|
1352
|
+
label,
|
|
1353
|
+
labelClassname
|
|
1354
1354
|
}) {
|
|
1355
1355
|
const selectedItems = items.filter((item) => selected.includes(item.value));
|
|
1356
1356
|
const checkIsSelected = useCallback2(
|
|
@@ -1369,8 +1369,9 @@ function MultiCombobox({
|
|
|
1369
1369
|
[selected, onChange]
|
|
1370
1370
|
);
|
|
1371
1371
|
const renderSelected = useMemo2(() => {
|
|
1372
|
-
if (selectedItems.length === 0)
|
|
1373
|
-
return placeholder ?? "Selecione uma op\xE7\xE3o...";
|
|
1372
|
+
if (selectedItems.length === 0) {
|
|
1373
|
+
return /* @__PURE__ */ jsx18("span", { className: "text-gray-500", children: placeholder ?? "Selecione uma op\xE7\xE3o..." });
|
|
1374
|
+
}
|
|
1374
1375
|
const items2 = selectedItems.map((item) => /* @__PURE__ */ jsxs11(
|
|
1375
1376
|
"div",
|
|
1376
1377
|
{
|
|
@@ -1403,7 +1404,7 @@ function MultiCombobox({
|
|
|
1403
1404
|
return /* @__PURE__ */ jsx18("div", { className: "flex flex-wrap gap-2", children: items2 });
|
|
1404
1405
|
}, [handleSelection, placeholder, selectedItems]);
|
|
1405
1406
|
return /* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-1 w-full min-w-[150px]", children: [
|
|
1406
|
-
label && /* @__PURE__ */ jsx18(LabelBase_default, { children: label }),
|
|
1407
|
+
label && /* @__PURE__ */ jsx18(LabelBase_default, { className: labelClassname, children: label }),
|
|
1407
1408
|
/* @__PURE__ */ jsx18(
|
|
1408
1409
|
ComboboxBase,
|
|
1409
1410
|
{
|
|
@@ -2834,8 +2835,10 @@ var SlideBase = React23.forwardRef(
|
|
|
2834
2835
|
SlideBase.displayName = "SlideBase";
|
|
2835
2836
|
|
|
2836
2837
|
// src/components/ui/SonnerBase.tsx
|
|
2838
|
+
import { CheckCircle, XCircle, Info, Warning, Spinner } from "phosphor-react";
|
|
2837
2839
|
import { Toaster as Sonner, toast as sonnertoast } from "sonner";
|
|
2838
2840
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2841
|
+
var iconBaseClass = "w-5 h-auto";
|
|
2839
2842
|
var Toaster = ({ ...props }) => {
|
|
2840
2843
|
return /* @__PURE__ */ jsx33(
|
|
2841
2844
|
Sonner,
|
|
@@ -2844,19 +2847,91 @@ var Toaster = ({ ...props }) => {
|
|
|
2844
2847
|
position: "top-center",
|
|
2845
2848
|
toastOptions: {
|
|
2846
2849
|
classNames: {
|
|
2847
|
-
toast: `
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2850
|
+
toast: `
|
|
2851
|
+
group toast
|
|
2852
|
+
bg-white dark:bg-gray-900
|
|
2853
|
+
text-gray-900 dark:text-gray-100
|
|
2854
|
+
shadow-lg rounded-md
|
|
2855
|
+
border-l-8
|
|
2856
|
+
border-border
|
|
2857
|
+
flex items-center gap-3
|
|
2858
|
+
data-[type=success]:border-l-green-500 data-[type=success]:bg-green-50 dark:data-[type=success]:bg-green-900/30 dark:data-[type=success]:text-green-400
|
|
2859
|
+
data-[type=error]:border-l-red-500 data-[type=error]:bg-red-50 dark:data-[type=error]:bg-red-900/30 dark:data-[type=error]:text-red-400
|
|
2860
|
+
data-[type=warning]:border-l-yellow-500 data-[type=warning]:bg-yellow-50 dark:data-[type=warning]:bg-yellow-900/30 dark:data-[type=warning]:text-yellow-400
|
|
2861
|
+
data-[type=info]:border-l-blue-500 data-[type=info]:bg-blue-50 dark:data-[type=info]:bg-blue-900/30 dark:data-[type=info]:text-blue-400
|
|
2862
|
+
`,
|
|
2863
|
+
description: `
|
|
2864
|
+
text-sm
|
|
2865
|
+
group-[.toast]:text-muted-foreground
|
|
2866
|
+
dark:group-[.toast]:text-muted-foreground/80
|
|
2867
|
+
`,
|
|
2868
|
+
actionButton: `
|
|
2869
|
+
ml-auto
|
|
2870
|
+
rounded-md px-3 py-1 text-sm font-semibold
|
|
2871
|
+
bg-primary text-primary-foreground
|
|
2872
|
+
hover:bg-primary/80
|
|
2873
|
+
transition-colors duration-200
|
|
2874
|
+
`,
|
|
2875
|
+
cancelButton: `
|
|
2876
|
+
ml-2
|
|
2877
|
+
rounded-md px-3 py-1 text-sm font-semibold
|
|
2878
|
+
bg-muted text-muted-foreground
|
|
2879
|
+
hover:bg-muted/80
|
|
2880
|
+
transition-colors duration-200
|
|
2881
|
+
`
|
|
2853
2882
|
}
|
|
2854
2883
|
},
|
|
2855
2884
|
...props
|
|
2856
2885
|
}
|
|
2857
2886
|
);
|
|
2858
2887
|
};
|
|
2859
|
-
var toast =
|
|
2888
|
+
var toast = {
|
|
2889
|
+
success: (message) => sonnertoast.success(message, {
|
|
2890
|
+
icon: /* @__PURE__ */ jsx33(
|
|
2891
|
+
CheckCircle,
|
|
2892
|
+
{
|
|
2893
|
+
className: `${iconBaseClass} text-green-600 dark:text-green-400`,
|
|
2894
|
+
weight: "fill"
|
|
2895
|
+
}
|
|
2896
|
+
)
|
|
2897
|
+
}),
|
|
2898
|
+
error: (message) => sonnertoast.error(message, {
|
|
2899
|
+
icon: /* @__PURE__ */ jsx33(
|
|
2900
|
+
XCircle,
|
|
2901
|
+
{
|
|
2902
|
+
className: `${iconBaseClass} text-red-600 dark:text-red-400`,
|
|
2903
|
+
weight: "fill"
|
|
2904
|
+
}
|
|
2905
|
+
)
|
|
2906
|
+
}),
|
|
2907
|
+
warning: (message) => sonnertoast.warning(message, {
|
|
2908
|
+
icon: /* @__PURE__ */ jsx33(
|
|
2909
|
+
Warning,
|
|
2910
|
+
{
|
|
2911
|
+
className: `${iconBaseClass} text-yellow-600 dark:text-yellow-400`,
|
|
2912
|
+
weight: "fill"
|
|
2913
|
+
}
|
|
2914
|
+
)
|
|
2915
|
+
}),
|
|
2916
|
+
info: (message) => sonnertoast.info(message, {
|
|
2917
|
+
icon: /* @__PURE__ */ jsx33(
|
|
2918
|
+
Info,
|
|
2919
|
+
{
|
|
2920
|
+
className: `${iconBaseClass} text-blue-600 dark:text-blue-400`,
|
|
2921
|
+
weight: "fill"
|
|
2922
|
+
}
|
|
2923
|
+
)
|
|
2924
|
+
}),
|
|
2925
|
+
loading: (message) => sonnertoast(message, {
|
|
2926
|
+
icon: /* @__PURE__ */ jsx33(
|
|
2927
|
+
Spinner,
|
|
2928
|
+
{
|
|
2929
|
+
className: `${iconBaseClass} animate-spin text-zinc-500 dark:text-zinc-400`,
|
|
2930
|
+
weight: "fill"
|
|
2931
|
+
}
|
|
2932
|
+
)
|
|
2933
|
+
})
|
|
2934
|
+
};
|
|
2860
2935
|
|
|
2861
2936
|
// src/components/ui/SwitchBase.tsx
|
|
2862
2937
|
import * as React24 from "react";
|
|
@@ -2869,7 +2944,7 @@ var SwitchBase = React24.forwardRef(({ className, ...props }, ref) => {
|
|
|
2869
2944
|
...props,
|
|
2870
2945
|
ref,
|
|
2871
2946
|
className: cn(
|
|
2872
|
-
"peer relative inline-flex
|
|
2947
|
+
"peer relative inline-flex w-12 cursor-pointer items-center rounded-full border-2 border-transparent shadow-md transition-colors duration-300 ease-in-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input data-[state=checked]:shadow-[0_0_15px_4px_var(--tw-shadow-color)] data-[state=checked]:shadow-primary/30",
|
|
2873
2948
|
className
|
|
2874
2949
|
),
|
|
2875
2950
|
children: /* @__PURE__ */ jsx34(
|