@motor-hero/ui-kit 0.36.3 → 0.37.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/components/rating.d.ts +10 -0
- package/dist/components/rating.d.ts.map +1 -0
- package/dist/index.cjs +357 -273
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +267 -184
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/components/form-field.tsx +1 -1
- package/src/components/rating.tsx +99 -0
- package/src/index.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -575,6 +575,88 @@ function ColorPicker({
|
|
|
575
575
|
] });
|
|
576
576
|
}
|
|
577
577
|
|
|
578
|
+
// src/components/rating.tsx
|
|
579
|
+
import * as ToggleGroup from "@radix-ui/react-toggle-group";
|
|
580
|
+
import { Star } from "lucide-react";
|
|
581
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
582
|
+
var MAX_STARS = 5;
|
|
583
|
+
var sizeClasses2 = {
|
|
584
|
+
sm: "h-4 w-4",
|
|
585
|
+
md: "h-5 w-5",
|
|
586
|
+
lg: "h-6 w-6"
|
|
587
|
+
};
|
|
588
|
+
function defaultLabel(value) {
|
|
589
|
+
return value > 0 ? `Avalia\xE7\xE3o: ${value} de ${MAX_STARS} estrelas` : "Avalia\xE7\xE3o: sem nota";
|
|
590
|
+
}
|
|
591
|
+
function Rating({
|
|
592
|
+
value = 0,
|
|
593
|
+
onChange,
|
|
594
|
+
readOnly = false,
|
|
595
|
+
size = "md",
|
|
596
|
+
className,
|
|
597
|
+
"aria-label": ariaLabel
|
|
598
|
+
}) {
|
|
599
|
+
const clamped = Math.min(MAX_STARS, Math.max(0, value));
|
|
600
|
+
const label = ariaLabel ?? defaultLabel(clamped);
|
|
601
|
+
if (readOnly) {
|
|
602
|
+
return /* @__PURE__ */ jsx8(
|
|
603
|
+
"div",
|
|
604
|
+
{
|
|
605
|
+
role: "img",
|
|
606
|
+
"aria-label": label,
|
|
607
|
+
className: cn("inline-flex items-center gap-0.5", className),
|
|
608
|
+
children: Array.from({ length: MAX_STARS }, (_, index) => /* @__PURE__ */ jsx8(
|
|
609
|
+
Star,
|
|
610
|
+
{
|
|
611
|
+
"aria-hidden": true,
|
|
612
|
+
className: cn(
|
|
613
|
+
sizeClasses2[size],
|
|
614
|
+
index < clamped ? "fill-amber-400 text-amber-400" : "text-muted-foreground"
|
|
615
|
+
)
|
|
616
|
+
},
|
|
617
|
+
index
|
|
618
|
+
))
|
|
619
|
+
}
|
|
620
|
+
);
|
|
621
|
+
}
|
|
622
|
+
return /* @__PURE__ */ jsx8(
|
|
623
|
+
ToggleGroup.Root,
|
|
624
|
+
{
|
|
625
|
+
type: "single",
|
|
626
|
+
value: clamped > 0 ? String(clamped) : "",
|
|
627
|
+
onValueChange: (next) => {
|
|
628
|
+
if (next) onChange?.(Number(next));
|
|
629
|
+
},
|
|
630
|
+
"aria-label": label,
|
|
631
|
+
className: cn("inline-flex items-center gap-0.5", className),
|
|
632
|
+
children: Array.from({ length: MAX_STARS }, (_, index) => {
|
|
633
|
+
const starValue = index + 1;
|
|
634
|
+
const filled = starValue <= clamped;
|
|
635
|
+
return /* @__PURE__ */ jsx8(
|
|
636
|
+
ToggleGroup.Item,
|
|
637
|
+
{
|
|
638
|
+
value: String(starValue),
|
|
639
|
+
"aria-label": `${starValue} ${starValue === 1 ? "estrela" : "estrelas"}`,
|
|
640
|
+
className: "inline-flex cursor-pointer items-center justify-center rounded-sm bg-transparent p-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
641
|
+
children: /* @__PURE__ */ jsx8(
|
|
642
|
+
Star,
|
|
643
|
+
{
|
|
644
|
+
"aria-hidden": true,
|
|
645
|
+
className: cn(
|
|
646
|
+
sizeClasses2[size],
|
|
647
|
+
"transition-colors",
|
|
648
|
+
filled ? "fill-amber-400 text-amber-400" : "text-muted-foreground hover:text-amber-400"
|
|
649
|
+
)
|
|
650
|
+
}
|
|
651
|
+
)
|
|
652
|
+
},
|
|
653
|
+
starValue
|
|
654
|
+
);
|
|
655
|
+
})
|
|
656
|
+
}
|
|
657
|
+
);
|
|
658
|
+
}
|
|
659
|
+
|
|
578
660
|
// src/components/combobox.tsx
|
|
579
661
|
import * as PopoverPrimitive2 from "@radix-ui/react-popover";
|
|
580
662
|
import { Command as CommandPrimitive } from "cmdk";
|
|
@@ -617,7 +699,7 @@ function useInfiniteScrollSentinel({
|
|
|
617
699
|
}
|
|
618
700
|
|
|
619
701
|
// src/components/combobox.tsx
|
|
620
|
-
import { jsx as
|
|
702
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
621
703
|
function Combobox({
|
|
622
704
|
options,
|
|
623
705
|
value,
|
|
@@ -680,8 +762,8 @@ function Combobox({
|
|
|
680
762
|
className
|
|
681
763
|
),
|
|
682
764
|
children: [
|
|
683
|
-
/* @__PURE__ */
|
|
684
|
-
/* @__PURE__ */
|
|
765
|
+
/* @__PURE__ */ jsx9("span", { className: cn("truncate", !selected && "text-muted-foreground"), children: selected ? selected.label : placeholder }),
|
|
766
|
+
/* @__PURE__ */ jsx9(ChevronsUpDown2, { className: "h-4 w-4 shrink-0 opacity-50" })
|
|
685
767
|
]
|
|
686
768
|
}
|
|
687
769
|
);
|
|
@@ -692,8 +774,8 @@ function Combobox({
|
|
|
692
774
|
className: "flex h-full w-full flex-col overflow-hidden",
|
|
693
775
|
children: [
|
|
694
776
|
/* @__PURE__ */ jsxs7("div", { className: "flex items-center border-b px-3", children: [
|
|
695
|
-
/* @__PURE__ */
|
|
696
|
-
/* @__PURE__ */
|
|
777
|
+
/* @__PURE__ */ jsx9(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
778
|
+
/* @__PURE__ */ jsx9(
|
|
697
779
|
CommandPrimitive.Input,
|
|
698
780
|
{
|
|
699
781
|
placeholder: searchPlaceholder,
|
|
@@ -708,7 +790,7 @@ function Combobox({
|
|
|
708
790
|
ref: listRef,
|
|
709
791
|
className: "max-h-[50vh] overflow-y-auto overflow-x-hidden p-1 sm:max-h-60",
|
|
710
792
|
children: [
|
|
711
|
-
!isServer && !showCreate && /* @__PURE__ */
|
|
793
|
+
!isServer && !showCreate && /* @__PURE__ */ jsx9(CommandPrimitive.Empty, { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }),
|
|
712
794
|
showCreate && /* @__PURE__ */ jsxs7(
|
|
713
795
|
CommandPrimitive.Item,
|
|
714
796
|
{
|
|
@@ -716,8 +798,8 @@ function Combobox({
|
|
|
716
798
|
onSelect: () => handleSelect(trimmedSearch),
|
|
717
799
|
className: "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-2.5 text-sm outline-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground sm:py-1.5",
|
|
718
800
|
children: [
|
|
719
|
-
/* @__PURE__ */
|
|
720
|
-
/* @__PURE__ */
|
|
801
|
+
/* @__PURE__ */ jsx9(Plus, { className: "h-4 w-4 shrink-0" }),
|
|
802
|
+
/* @__PURE__ */ jsx9("span", { className: "truncate", children: (formatCreateLabel ?? ((text) => `Usar "${text}"`))(
|
|
721
803
|
trimmedSearch
|
|
722
804
|
) })
|
|
723
805
|
]
|
|
@@ -731,7 +813,7 @@ function Combobox({
|
|
|
731
813
|
onSelect: () => handleSelect(option.value),
|
|
732
814
|
className: "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-2.5 text-sm outline-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 sm:py-1.5",
|
|
733
815
|
children: [
|
|
734
|
-
/* @__PURE__ */
|
|
816
|
+
/* @__PURE__ */ jsx9(
|
|
735
817
|
Check,
|
|
736
818
|
{
|
|
737
819
|
className: cn(
|
|
@@ -740,14 +822,14 @@ function Combobox({
|
|
|
740
822
|
)
|
|
741
823
|
}
|
|
742
824
|
),
|
|
743
|
-
/* @__PURE__ */
|
|
825
|
+
/* @__PURE__ */ jsx9("span", { className: "truncate", children: option.label })
|
|
744
826
|
]
|
|
745
827
|
},
|
|
746
828
|
option.value
|
|
747
829
|
)),
|
|
748
|
-
isServer && !loading && options.length === 0 && /* @__PURE__ */
|
|
749
|
-
isServer && loading && /* @__PURE__ */
|
|
750
|
-
isServer && hasMore && /* @__PURE__ */
|
|
830
|
+
isServer && !loading && options.length === 0 && /* @__PURE__ */ jsx9("div", { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }),
|
|
831
|
+
isServer && loading && /* @__PURE__ */ jsx9("div", { className: "flex items-center justify-center py-6", children: /* @__PURE__ */ jsx9(Loader2, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }),
|
|
832
|
+
isServer && hasMore && /* @__PURE__ */ jsx9("div", { ref: sentinelRef, "aria-hidden": true, className: "h-1" })
|
|
751
833
|
]
|
|
752
834
|
}
|
|
753
835
|
)
|
|
@@ -756,8 +838,8 @@ function Combobox({
|
|
|
756
838
|
);
|
|
757
839
|
if (isDesktop) {
|
|
758
840
|
return /* @__PURE__ */ jsxs7(PopoverPrimitive2.Root, { open, onOpenChange: handleOpenChange, children: [
|
|
759
|
-
/* @__PURE__ */
|
|
760
|
-
/* @__PURE__ */
|
|
841
|
+
/* @__PURE__ */ jsx9(PopoverPrimitive2.Trigger, { asChild: true, children: trigger }),
|
|
842
|
+
/* @__PURE__ */ jsx9(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx9(
|
|
761
843
|
PopoverPrimitive2.Content,
|
|
762
844
|
{
|
|
763
845
|
align: "start",
|
|
@@ -770,12 +852,12 @@ function Combobox({
|
|
|
770
852
|
] });
|
|
771
853
|
}
|
|
772
854
|
return /* @__PURE__ */ jsxs7(DrawerPrimitive2.Root, { open, onOpenChange: handleOpenChange, children: [
|
|
773
|
-
/* @__PURE__ */
|
|
855
|
+
/* @__PURE__ */ jsx9(DrawerPrimitive2.Trigger, { asChild: true, children: trigger }),
|
|
774
856
|
/* @__PURE__ */ jsxs7(DrawerPrimitive2.Portal, { children: [
|
|
775
|
-
/* @__PURE__ */
|
|
857
|
+
/* @__PURE__ */ jsx9(DrawerPrimitive2.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
776
858
|
/* @__PURE__ */ jsxs7(DrawerPrimitive2.Content, { className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85vh] flex-col rounded-t-2xl border bg-popover text-popover-foreground outline-none", children: [
|
|
777
|
-
/* @__PURE__ */
|
|
778
|
-
/* @__PURE__ */
|
|
859
|
+
/* @__PURE__ */ jsx9(DrawerPrimitive2.Title, { className: "sr-only", children: placeholder }),
|
|
860
|
+
/* @__PURE__ */ jsx9("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
779
861
|
command
|
|
780
862
|
] })
|
|
781
863
|
] })
|
|
@@ -784,7 +866,7 @@ function Combobox({
|
|
|
784
866
|
|
|
785
867
|
// src/components/confirm-dialog.tsx
|
|
786
868
|
import * as AlertDialog from "@radix-ui/react-alert-dialog";
|
|
787
|
-
import { jsx as
|
|
869
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
788
870
|
function ConfirmDialog({
|
|
789
871
|
open,
|
|
790
872
|
onOpenChange,
|
|
@@ -798,8 +880,8 @@ function ConfirmDialog({
|
|
|
798
880
|
blurBackdrop = true,
|
|
799
881
|
backdropClassName
|
|
800
882
|
}) {
|
|
801
|
-
return /* @__PURE__ */
|
|
802
|
-
/* @__PURE__ */
|
|
883
|
+
return /* @__PURE__ */ jsx10(AlertDialog.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs8(AlertDialog.Portal, { children: [
|
|
884
|
+
/* @__PURE__ */ jsx10(
|
|
803
885
|
AlertDialog.Overlay,
|
|
804
886
|
{
|
|
805
887
|
className: cn(
|
|
@@ -811,12 +893,12 @@ function ConfirmDialog({
|
|
|
811
893
|
),
|
|
812
894
|
/* @__PURE__ */ jsxs8(AlertDialog.Content, { className: "fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", children: [
|
|
813
895
|
/* @__PURE__ */ jsxs8("div", { className: "flex flex-col space-y-2 text-center sm:text-left", children: [
|
|
814
|
-
/* @__PURE__ */
|
|
815
|
-
/* @__PURE__ */
|
|
896
|
+
/* @__PURE__ */ jsx10(AlertDialog.Title, { className: "text-lg font-semibold", children: title }),
|
|
897
|
+
/* @__PURE__ */ jsx10(AlertDialog.Description, { className: "text-sm text-muted-foreground", children: description })
|
|
816
898
|
] }),
|
|
817
899
|
/* @__PURE__ */ jsxs8("div", { className: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", children: [
|
|
818
|
-
/* @__PURE__ */
|
|
819
|
-
/* @__PURE__ */
|
|
900
|
+
/* @__PURE__ */ jsx10(AlertDialog.Cancel, { className: "inline-flex h-9 items-center justify-center rounded-md border border-input bg-background px-4 text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 cursor-pointer", children: cancelLabel }),
|
|
901
|
+
/* @__PURE__ */ jsx10(
|
|
820
902
|
AlertDialog.Action,
|
|
821
903
|
{
|
|
822
904
|
onClick: onConfirm,
|
|
@@ -831,7 +913,7 @@ function ConfirmDialog({
|
|
|
831
913
|
}
|
|
832
914
|
|
|
833
915
|
// src/components/data-table-wrapper.tsx
|
|
834
|
-
import { jsx as
|
|
916
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
835
917
|
function DataTableWrapper({
|
|
836
918
|
children,
|
|
837
919
|
isEmpty,
|
|
@@ -845,14 +927,14 @@ function DataTableWrapper({
|
|
|
845
927
|
hasPreviousPage = false
|
|
846
928
|
}) {
|
|
847
929
|
return /* @__PURE__ */ jsxs9("div", { className: "space-y-4", children: [
|
|
848
|
-
/* @__PURE__ */
|
|
930
|
+
/* @__PURE__ */ jsx11("div", { className: "overflow-x-auto rounded-md border", children }),
|
|
849
931
|
!isLoading && isEmpty && /* @__PURE__ */ jsxs9("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
|
|
850
|
-
emptyIcon && /* @__PURE__ */
|
|
851
|
-
/* @__PURE__ */
|
|
852
|
-
emptyDescription && /* @__PURE__ */
|
|
932
|
+
emptyIcon && /* @__PURE__ */ jsx11("div", { className: "mb-4 text-muted-foreground", children: emptyIcon }),
|
|
933
|
+
/* @__PURE__ */ jsx11("h3", { className: "text-lg font-semibold tracking-tight", children: emptyTitle }),
|
|
934
|
+
emptyDescription && /* @__PURE__ */ jsx11("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: emptyDescription })
|
|
853
935
|
] }),
|
|
854
936
|
page !== void 0 && onPageChange && /* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-end gap-4", children: [
|
|
855
|
-
/* @__PURE__ */
|
|
937
|
+
/* @__PURE__ */ jsx11(
|
|
856
938
|
"button",
|
|
857
939
|
{
|
|
858
940
|
type: "button",
|
|
@@ -866,7 +948,7 @@ function DataTableWrapper({
|
|
|
866
948
|
"P\xE1gina ",
|
|
867
949
|
page
|
|
868
950
|
] }),
|
|
869
|
-
/* @__PURE__ */
|
|
951
|
+
/* @__PURE__ */ jsx11(
|
|
870
952
|
"button",
|
|
871
953
|
{
|
|
872
954
|
type: "button",
|
|
@@ -889,7 +971,7 @@ import { CalendarIcon, ChevronDown, ChevronLeft as ChevronLeft2, ChevronRight as
|
|
|
889
971
|
import * as React6 from "react";
|
|
890
972
|
import { DayPicker } from "react-day-picker";
|
|
891
973
|
import { Drawer as DrawerPrimitive3 } from "vaul";
|
|
892
|
-
import { Fragment as Fragment5, jsx as
|
|
974
|
+
import { Fragment as Fragment5, jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
893
975
|
var DATE_MASK = "__/__/____";
|
|
894
976
|
var TIME_MASK = "__:__";
|
|
895
977
|
var MASK_REPLACEMENT = { _: /\d/ };
|
|
@@ -956,9 +1038,9 @@ var calendarClassNames = {
|
|
|
956
1038
|
};
|
|
957
1039
|
var calendarComponents = {
|
|
958
1040
|
Chevron: ({ orientation }) => {
|
|
959
|
-
if (orientation === "left") return /* @__PURE__ */
|
|
960
|
-
if (orientation === "right") return /* @__PURE__ */
|
|
961
|
-
return /* @__PURE__ */
|
|
1041
|
+
if (orientation === "left") return /* @__PURE__ */ jsx12(ChevronLeft2, { className: "size-4" });
|
|
1042
|
+
if (orientation === "right") return /* @__PURE__ */ jsx12(ChevronRight2, { className: "size-4" });
|
|
1043
|
+
return /* @__PURE__ */ jsx12(ChevronDown, { className: "size-4" });
|
|
962
1044
|
}
|
|
963
1045
|
};
|
|
964
1046
|
var formatMonthDropdown = (date) => date.toLocaleString("pt-BR", { month: "short" });
|
|
@@ -1044,7 +1126,7 @@ function DatePickerImpl({
|
|
|
1044
1126
|
};
|
|
1045
1127
|
const canApply = withTime && !!pendingDate && !!parseStrict(pendingTime, TIME_FORMAT);
|
|
1046
1128
|
const trigger = /* @__PURE__ */ jsxs10("div", { ref: triggerRef, className: "relative", children: [
|
|
1047
|
-
/* @__PURE__ */
|
|
1129
|
+
/* @__PURE__ */ jsx12(
|
|
1048
1130
|
InputMask,
|
|
1049
1131
|
{
|
|
1050
1132
|
id,
|
|
@@ -1064,7 +1146,7 @@ function DatePickerImpl({
|
|
|
1064
1146
|
className: cn(triggerInputClass, className)
|
|
1065
1147
|
}
|
|
1066
1148
|
),
|
|
1067
|
-
/* @__PURE__ */
|
|
1149
|
+
/* @__PURE__ */ jsx12(
|
|
1068
1150
|
"button",
|
|
1069
1151
|
{
|
|
1070
1152
|
type: "button",
|
|
@@ -1074,12 +1156,12 @@ function DatePickerImpl({
|
|
|
1074
1156
|
"aria-expanded": open,
|
|
1075
1157
|
onClick: () => setOpen(!open),
|
|
1076
1158
|
className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground disabled:pointer-events-none disabled:opacity-50",
|
|
1077
|
-
children: withTime ? /* @__PURE__ */
|
|
1159
|
+
children: withTime ? /* @__PURE__ */ jsx12(Clock, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx12(CalendarIcon, { className: "h-4 w-4" })
|
|
1078
1160
|
}
|
|
1079
1161
|
)
|
|
1080
1162
|
] });
|
|
1081
1163
|
const content = /* @__PURE__ */ jsxs10("div", { className: withTime ? "p-3" : "", children: [
|
|
1082
|
-
/* @__PURE__ */
|
|
1164
|
+
/* @__PURE__ */ jsx12(
|
|
1083
1165
|
DayPicker,
|
|
1084
1166
|
{
|
|
1085
1167
|
mode: "single",
|
|
@@ -1099,8 +1181,8 @@ function DatePickerImpl({
|
|
|
1099
1181
|
),
|
|
1100
1182
|
withTime && /* @__PURE__ */ jsxs10(Fragment5, { children: [
|
|
1101
1183
|
/* @__PURE__ */ jsxs10("div", { className: "mt-2 flex items-center gap-2 border-t pt-3", children: [
|
|
1102
|
-
/* @__PURE__ */
|
|
1103
|
-
/* @__PURE__ */
|
|
1184
|
+
/* @__PURE__ */ jsx12("span", { className: "text-sm text-muted-foreground", children: "Hor\xE1rio" }),
|
|
1185
|
+
/* @__PURE__ */ jsx12(
|
|
1104
1186
|
InputMask,
|
|
1105
1187
|
{
|
|
1106
1188
|
mask: TIME_MASK,
|
|
@@ -1113,7 +1195,7 @@ function DatePickerImpl({
|
|
|
1113
1195
|
}
|
|
1114
1196
|
)
|
|
1115
1197
|
] }),
|
|
1116
|
-
/* @__PURE__ */
|
|
1198
|
+
/* @__PURE__ */ jsx12(
|
|
1117
1199
|
"button",
|
|
1118
1200
|
{
|
|
1119
1201
|
type: "button",
|
|
@@ -1127,8 +1209,8 @@ function DatePickerImpl({
|
|
|
1127
1209
|
] });
|
|
1128
1210
|
if (isDesktop) {
|
|
1129
1211
|
return /* @__PURE__ */ jsxs10(PopoverPrimitive3.Root, { open, onOpenChange: setOpen, children: [
|
|
1130
|
-
/* @__PURE__ */
|
|
1131
|
-
/* @__PURE__ */
|
|
1212
|
+
/* @__PURE__ */ jsx12(PopoverPrimitive3.Anchor, { asChild: true, children: trigger }),
|
|
1213
|
+
/* @__PURE__ */ jsx12(PopoverPrimitive3.Portal, { children: /* @__PURE__ */ jsx12(
|
|
1132
1214
|
PopoverPrimitive3.Content,
|
|
1133
1215
|
{
|
|
1134
1216
|
align: "start",
|
|
@@ -1146,7 +1228,7 @@ function DatePickerImpl({
|
|
|
1146
1228
|
return /* @__PURE__ */ jsxs10(DrawerPrimitive3.Root, { open, onOpenChange: setOpen, children: [
|
|
1147
1229
|
trigger,
|
|
1148
1230
|
/* @__PURE__ */ jsxs10(DrawerPrimitive3.Portal, { children: [
|
|
1149
|
-
/* @__PURE__ */
|
|
1231
|
+
/* @__PURE__ */ jsx12(DrawerPrimitive3.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
1150
1232
|
/* @__PURE__ */ jsxs10(
|
|
1151
1233
|
DrawerPrimitive3.Content,
|
|
1152
1234
|
{
|
|
@@ -1156,9 +1238,9 @@ function DatePickerImpl({
|
|
|
1156
1238
|
},
|
|
1157
1239
|
className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85vh] flex-col rounded-t-2xl border bg-popover text-popover-foreground outline-none",
|
|
1158
1240
|
children: [
|
|
1159
|
-
/* @__PURE__ */
|
|
1160
|
-
/* @__PURE__ */
|
|
1161
|
-
/* @__PURE__ */
|
|
1241
|
+
/* @__PURE__ */ jsx12(DrawerPrimitive3.Title, { className: "sr-only", children: withTime ? "Selecione a data e o hor\xE1rio" : "Selecione a data" }),
|
|
1242
|
+
/* @__PURE__ */ jsx12("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
1243
|
+
/* @__PURE__ */ jsx12("div", { className: "flex justify-center overflow-y-auto pb-4", children: content })
|
|
1162
1244
|
]
|
|
1163
1245
|
}
|
|
1164
1246
|
)
|
|
@@ -1166,20 +1248,20 @@ function DatePickerImpl({
|
|
|
1166
1248
|
] });
|
|
1167
1249
|
}
|
|
1168
1250
|
function DatePicker(props) {
|
|
1169
|
-
return /* @__PURE__ */
|
|
1251
|
+
return /* @__PURE__ */ jsx12(DatePickerImpl, { ...props });
|
|
1170
1252
|
}
|
|
1171
1253
|
function DateTimePicker(props) {
|
|
1172
|
-
return /* @__PURE__ */
|
|
1254
|
+
return /* @__PURE__ */ jsx12(DatePickerImpl, { ...props, withTime: true });
|
|
1173
1255
|
}
|
|
1174
1256
|
|
|
1175
1257
|
// src/components/empty-state.tsx
|
|
1176
|
-
import { jsx as
|
|
1258
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1177
1259
|
function EmptyState({ icon, title, description, action, className }) {
|
|
1178
1260
|
return /* @__PURE__ */ jsxs11("div", { className: `flex flex-col items-center justify-center py-16 text-center ${className ?? ""}`, children: [
|
|
1179
|
-
icon && /* @__PURE__ */
|
|
1180
|
-
/* @__PURE__ */
|
|
1181
|
-
description && /* @__PURE__ */
|
|
1182
|
-
action && /* @__PURE__ */
|
|
1261
|
+
icon && /* @__PURE__ */ jsx13("div", { className: "mb-4 text-muted-foreground", children: icon }),
|
|
1262
|
+
/* @__PURE__ */ jsx13("h3", { className: "text-lg font-semibold tracking-tight", children: title }),
|
|
1263
|
+
description && /* @__PURE__ */ jsx13("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: description }),
|
|
1264
|
+
action && /* @__PURE__ */ jsx13("div", { className: "mt-4", children: action })
|
|
1183
1265
|
] });
|
|
1184
1266
|
}
|
|
1185
1267
|
|
|
@@ -1188,7 +1270,7 @@ import * as PopoverPrimitive4 from "@radix-ui/react-popover";
|
|
|
1188
1270
|
import { ChevronDown as ChevronDown2, X as X3 } from "lucide-react";
|
|
1189
1271
|
import * as React7 from "react";
|
|
1190
1272
|
import { Drawer as DrawerPrimitive4 } from "vaul";
|
|
1191
|
-
import { jsx as
|
|
1273
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1192
1274
|
function FilterToolbar({
|
|
1193
1275
|
children,
|
|
1194
1276
|
isFilterActive = false,
|
|
@@ -1212,7 +1294,7 @@ function FilterToolbar({
|
|
|
1212
1294
|
onClick: onClear,
|
|
1213
1295
|
className: "inline-flex h-9 shrink-0 items-center justify-center gap-1.5 self-start rounded-md px-2.5 text-sm text-muted-foreground transition-colors hover:text-foreground sm:self-auto",
|
|
1214
1296
|
children: [
|
|
1215
|
-
/* @__PURE__ */
|
|
1297
|
+
/* @__PURE__ */ jsx14(X3, { className: "h-4 w-4" }),
|
|
1216
1298
|
clearLabel
|
|
1217
1299
|
]
|
|
1218
1300
|
}
|
|
@@ -1245,17 +1327,17 @@ function FilterPopover({
|
|
|
1245
1327
|
active ? "border-ring/60 text-foreground" : "text-muted-foreground"
|
|
1246
1328
|
),
|
|
1247
1329
|
children: [
|
|
1248
|
-
Icon && /* @__PURE__ */
|
|
1249
|
-
/* @__PURE__ */
|
|
1250
|
-
active && badge != null && /* @__PURE__ */
|
|
1251
|
-
/* @__PURE__ */
|
|
1330
|
+
Icon && /* @__PURE__ */ jsx14(Icon, { className: "h-4 w-4 shrink-0 opacity-70" }),
|
|
1331
|
+
/* @__PURE__ */ jsx14("span", { className: "truncate", children: label }),
|
|
1332
|
+
active && badge != null && /* @__PURE__ */ jsx14("span", { className: "inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 text-[10px] font-medium leading-none text-primary-foreground", children: badge }),
|
|
1333
|
+
/* @__PURE__ */ jsx14(ChevronDown2, { className: "h-4 w-4 shrink-0 opacity-50" })
|
|
1252
1334
|
]
|
|
1253
1335
|
}
|
|
1254
1336
|
);
|
|
1255
1337
|
if (isDesktop) {
|
|
1256
1338
|
return /* @__PURE__ */ jsxs12(PopoverPrimitive4.Root, { open, onOpenChange: setOpen, children: [
|
|
1257
|
-
/* @__PURE__ */
|
|
1258
|
-
/* @__PURE__ */
|
|
1339
|
+
/* @__PURE__ */ jsx14(PopoverPrimitive4.Trigger, { asChild: true, children: trigger }),
|
|
1340
|
+
/* @__PURE__ */ jsx14(PopoverPrimitive4.Portal, { children: /* @__PURE__ */ jsx14(
|
|
1259
1341
|
PopoverPrimitive4.Content,
|
|
1260
1342
|
{
|
|
1261
1343
|
align,
|
|
@@ -1276,13 +1358,13 @@ function FilterPopover({
|
|
|
1276
1358
|
] });
|
|
1277
1359
|
}
|
|
1278
1360
|
return /* @__PURE__ */ jsxs12(DrawerPrimitive4.Root, { open, onOpenChange: setOpen, children: [
|
|
1279
|
-
/* @__PURE__ */
|
|
1361
|
+
/* @__PURE__ */ jsx14(DrawerPrimitive4.Trigger, { asChild: true, children: trigger }),
|
|
1280
1362
|
/* @__PURE__ */ jsxs12(DrawerPrimitive4.Portal, { children: [
|
|
1281
|
-
/* @__PURE__ */
|
|
1363
|
+
/* @__PURE__ */ jsx14(DrawerPrimitive4.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
1282
1364
|
/* @__PURE__ */ jsxs12(DrawerPrimitive4.Content, { className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85vh] flex-col rounded-t-2xl border bg-popover text-popover-foreground outline-none", children: [
|
|
1283
|
-
/* @__PURE__ */
|
|
1284
|
-
/* @__PURE__ */
|
|
1285
|
-
/* @__PURE__ */
|
|
1365
|
+
/* @__PURE__ */ jsx14(DrawerPrimitive4.Title, { className: "sr-only", children: title ?? label }),
|
|
1366
|
+
/* @__PURE__ */ jsx14("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
1367
|
+
/* @__PURE__ */ jsx14("div", { className: "overflow-y-auto p-2", children: content })
|
|
1286
1368
|
] })
|
|
1287
1369
|
] })
|
|
1288
1370
|
] });
|
|
@@ -1316,7 +1398,7 @@ function FilterOptionList({
|
|
|
1316
1398
|
onClick: () => toggle(option.value),
|
|
1317
1399
|
className: "flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm transition-colors hover:bg-accent hover:text-accent-foreground",
|
|
1318
1400
|
children: [
|
|
1319
|
-
option.dotClassName && /* @__PURE__ */
|
|
1401
|
+
option.dotClassName && /* @__PURE__ */ jsx14(
|
|
1320
1402
|
"span",
|
|
1321
1403
|
{
|
|
1322
1404
|
className: cn(
|
|
@@ -1325,14 +1407,14 @@ function FilterOptionList({
|
|
|
1325
1407
|
)
|
|
1326
1408
|
}
|
|
1327
1409
|
),
|
|
1328
|
-
/* @__PURE__ */
|
|
1329
|
-
isChecked && /* @__PURE__ */
|
|
1410
|
+
/* @__PURE__ */ jsx14("span", { className: "flex-1 truncate", children: option.label }),
|
|
1411
|
+
isChecked && /* @__PURE__ */ jsx14("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full bg-primary" })
|
|
1330
1412
|
]
|
|
1331
1413
|
},
|
|
1332
1414
|
option.value
|
|
1333
1415
|
);
|
|
1334
1416
|
}),
|
|
1335
|
-
clearable && hasSelection && /* @__PURE__ */
|
|
1417
|
+
clearable && hasSelection && /* @__PURE__ */ jsx14(
|
|
1336
1418
|
"button",
|
|
1337
1419
|
{
|
|
1338
1420
|
type: "button",
|
|
@@ -1345,7 +1427,7 @@ function FilterOptionList({
|
|
|
1345
1427
|
}
|
|
1346
1428
|
|
|
1347
1429
|
// src/components/form-dialog.tsx
|
|
1348
|
-
import { jsx as
|
|
1430
|
+
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1349
1431
|
function FormDialogLayout({
|
|
1350
1432
|
title,
|
|
1351
1433
|
children,
|
|
@@ -1357,10 +1439,10 @@ function FormDialogLayout({
|
|
|
1357
1439
|
isDisabled = false
|
|
1358
1440
|
}) {
|
|
1359
1441
|
return /* @__PURE__ */ jsxs13("form", { onSubmit, children: [
|
|
1360
|
-
/* @__PURE__ */
|
|
1361
|
-
/* @__PURE__ */
|
|
1442
|
+
/* @__PURE__ */ jsx15("div", { className: "flex flex-col space-y-1.5 text-center sm:text-left", children: /* @__PURE__ */ jsx15("h2", { className: "text-lg font-semibold leading-none tracking-tight", children: title }) }),
|
|
1443
|
+
/* @__PURE__ */ jsx15("div", { className: "space-y-4 py-4", children }),
|
|
1362
1444
|
/* @__PURE__ */ jsxs13("div", { className: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", children: [
|
|
1363
|
-
/* @__PURE__ */
|
|
1445
|
+
/* @__PURE__ */ jsx15(
|
|
1364
1446
|
"button",
|
|
1365
1447
|
{
|
|
1366
1448
|
type: "button",
|
|
@@ -1369,7 +1451,7 @@ function FormDialogLayout({
|
|
|
1369
1451
|
children: cancelLabel
|
|
1370
1452
|
}
|
|
1371
1453
|
),
|
|
1372
|
-
/* @__PURE__ */
|
|
1454
|
+
/* @__PURE__ */ jsx15(
|
|
1373
1455
|
"button",
|
|
1374
1456
|
{
|
|
1375
1457
|
type: "submit",
|
|
@@ -1382,18 +1464,18 @@ function FormDialogLayout({
|
|
|
1382
1464
|
] });
|
|
1383
1465
|
}
|
|
1384
1466
|
function FormDialog({ onSubmit, ...rest }) {
|
|
1385
|
-
return /* @__PURE__ */
|
|
1467
|
+
return /* @__PURE__ */ jsx15(
|
|
1386
1468
|
BaseDialog,
|
|
1387
1469
|
{
|
|
1388
1470
|
...rest,
|
|
1389
|
-
contentWrapper: onSubmit ? (content) => /* @__PURE__ */
|
|
1471
|
+
contentWrapper: onSubmit ? (content) => /* @__PURE__ */ jsx15("form", { onSubmit, className: "flex min-h-0 flex-1 flex-col", children: content }) : void 0
|
|
1390
1472
|
}
|
|
1391
1473
|
);
|
|
1392
1474
|
}
|
|
1393
1475
|
|
|
1394
1476
|
// src/components/form-field.tsx
|
|
1395
1477
|
import { cloneElement, isValidElement, useId } from "react";
|
|
1396
|
-
import { jsx as
|
|
1478
|
+
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1397
1479
|
function FormField({ label, htmlFor, error, required, children, className }) {
|
|
1398
1480
|
const errorId = useId();
|
|
1399
1481
|
const field = error && isValidElement(children) ? cloneElement(children, {
|
|
@@ -1408,21 +1490,21 @@ function FormField({ label, htmlFor, error, required, children, className }) {
|
|
|
1408
1490
|
"label",
|
|
1409
1491
|
{
|
|
1410
1492
|
htmlFor,
|
|
1411
|
-
className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
1493
|
+
className: "block text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
1412
1494
|
children: [
|
|
1413
1495
|
label,
|
|
1414
|
-
required && /* @__PURE__ */
|
|
1496
|
+
required && /* @__PURE__ */ jsx16("span", { className: "ml-1 text-destructive", children: "*" })
|
|
1415
1497
|
]
|
|
1416
1498
|
}
|
|
1417
1499
|
),
|
|
1418
1500
|
field,
|
|
1419
|
-
error && /* @__PURE__ */
|
|
1501
|
+
error && /* @__PURE__ */ jsx16("p", { id: errorId, className: "text-sm text-destructive", children: error })
|
|
1420
1502
|
] });
|
|
1421
1503
|
}
|
|
1422
1504
|
|
|
1423
1505
|
// src/components/mobile-card-list.tsx
|
|
1424
1506
|
import { useRef as useRef3 } from "react";
|
|
1425
|
-
import { jsx as
|
|
1507
|
+
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1426
1508
|
var SCROLL_THRESHOLD = 8;
|
|
1427
1509
|
function MobileCardList({
|
|
1428
1510
|
data,
|
|
@@ -1453,26 +1535,26 @@ function MobileCardList({
|
|
|
1453
1535
|
}
|
|
1454
1536
|
};
|
|
1455
1537
|
if (isLoading) {
|
|
1456
|
-
return /* @__PURE__ */
|
|
1538
|
+
return /* @__PURE__ */ jsx17("div", { className: `space-y-3 ${className ?? ""}`, children: Array.from({ length: loadingCount }).map((_, i) => /* @__PURE__ */ jsx17("div", { className: "rounded-xl border p-4", children: /* @__PURE__ */ jsxs15("div", { className: "space-y-3", children: [
|
|
1457
1539
|
/* @__PURE__ */ jsxs15("div", { className: "flex justify-between", children: [
|
|
1458
|
-
/* @__PURE__ */
|
|
1459
|
-
/* @__PURE__ */
|
|
1540
|
+
/* @__PURE__ */ jsx17("div", { className: "h-5 w-32 animate-pulse rounded bg-muted" }),
|
|
1541
|
+
/* @__PURE__ */ jsx17("div", { className: "h-5 w-16 animate-pulse rounded bg-muted" })
|
|
1460
1542
|
] }),
|
|
1461
|
-
/* @__PURE__ */
|
|
1543
|
+
/* @__PURE__ */ jsx17("div", { className: "h-4 w-48 animate-pulse rounded bg-muted" }),
|
|
1462
1544
|
/* @__PURE__ */ jsxs15("div", { className: "flex justify-between", children: [
|
|
1463
|
-
/* @__PURE__ */
|
|
1464
|
-
/* @__PURE__ */
|
|
1545
|
+
/* @__PURE__ */ jsx17("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
|
|
1546
|
+
/* @__PURE__ */ jsx17("div", { className: "h-4 w-20 animate-pulse rounded bg-muted" })
|
|
1465
1547
|
] })
|
|
1466
1548
|
] }) }, i)) });
|
|
1467
1549
|
}
|
|
1468
|
-
return /* @__PURE__ */
|
|
1550
|
+
return /* @__PURE__ */ jsx17(
|
|
1469
1551
|
"div",
|
|
1470
1552
|
{
|
|
1471
1553
|
className: `space-y-3 ${className ?? ""}`,
|
|
1472
1554
|
onTouchStart,
|
|
1473
1555
|
onTouchMove,
|
|
1474
1556
|
onClickCapture,
|
|
1475
|
-
children: data.map((item, index) => /* @__PURE__ */
|
|
1557
|
+
children: data.map((item, index) => /* @__PURE__ */ jsx17(
|
|
1476
1558
|
"div",
|
|
1477
1559
|
{
|
|
1478
1560
|
className: "rounded-xl border p-4 transition-all duration-150 hover:border-foreground/20 active:scale-[0.99]",
|
|
@@ -1517,7 +1599,7 @@ function applyCompanyTheme(root, companyTheme, mode) {
|
|
|
1517
1599
|
}
|
|
1518
1600
|
|
|
1519
1601
|
// src/components/theme-provider.tsx
|
|
1520
|
-
import { jsx as
|
|
1602
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1521
1603
|
var initialState = {
|
|
1522
1604
|
theme: "system",
|
|
1523
1605
|
setTheme: () => null
|
|
@@ -1556,7 +1638,7 @@ function ThemeProvider({
|
|
|
1556
1638
|
setTheme(theme2);
|
|
1557
1639
|
}
|
|
1558
1640
|
};
|
|
1559
|
-
return /* @__PURE__ */
|
|
1641
|
+
return /* @__PURE__ */ jsx18(ThemeProviderContext.Provider, { ...props, value, children });
|
|
1560
1642
|
}
|
|
1561
1643
|
function useTheme() {
|
|
1562
1644
|
const context = useContext(ThemeProviderContext);
|
|
@@ -1567,23 +1649,23 @@ function useTheme() {
|
|
|
1567
1649
|
}
|
|
1568
1650
|
|
|
1569
1651
|
// src/components/mode-toggle.tsx
|
|
1570
|
-
import { jsx as
|
|
1652
|
+
import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1571
1653
|
function ModeToggle() {
|
|
1572
1654
|
const { setTheme } = useTheme();
|
|
1573
1655
|
return /* @__PURE__ */ jsxs16(DropdownMenu2.Root, { children: [
|
|
1574
|
-
/* @__PURE__ */
|
|
1656
|
+
/* @__PURE__ */ jsx19(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs16(
|
|
1575
1657
|
"button",
|
|
1576
1658
|
{
|
|
1577
1659
|
type: "button",
|
|
1578
1660
|
className: "relative inline-flex h-9 w-9 items-center justify-center rounded-md border border-input bg-background text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1579
1661
|
"aria-label": "Alternar tema",
|
|
1580
1662
|
children: [
|
|
1581
|
-
/* @__PURE__ */
|
|
1582
|
-
/* @__PURE__ */
|
|
1663
|
+
/* @__PURE__ */ jsx19(Sun, { className: "h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
|
|
1664
|
+
/* @__PURE__ */ jsx19(Moon, { className: "absolute inset-0 m-auto h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" })
|
|
1583
1665
|
]
|
|
1584
1666
|
}
|
|
1585
1667
|
) }),
|
|
1586
|
-
/* @__PURE__ */
|
|
1668
|
+
/* @__PURE__ */ jsx19(DropdownMenu2.Portal, { children: /* @__PURE__ */ jsxs16(
|
|
1587
1669
|
DropdownMenu2.Content,
|
|
1588
1670
|
{
|
|
1589
1671
|
align: "end",
|
|
@@ -1595,7 +1677,7 @@ function ModeToggle() {
|
|
|
1595
1677
|
className: "flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent",
|
|
1596
1678
|
onClick: () => setTheme("light"),
|
|
1597
1679
|
children: [
|
|
1598
|
-
/* @__PURE__ */
|
|
1680
|
+
/* @__PURE__ */ jsx19(Sun, { className: "h-4 w-4" }),
|
|
1599
1681
|
" Claro"
|
|
1600
1682
|
]
|
|
1601
1683
|
}
|
|
@@ -1606,7 +1688,7 @@ function ModeToggle() {
|
|
|
1606
1688
|
className: "flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent",
|
|
1607
1689
|
onClick: () => setTheme("dark"),
|
|
1608
1690
|
children: [
|
|
1609
|
-
/* @__PURE__ */
|
|
1691
|
+
/* @__PURE__ */ jsx19(Moon, { className: "h-4 w-4" }),
|
|
1610
1692
|
" Escuro"
|
|
1611
1693
|
]
|
|
1612
1694
|
}
|
|
@@ -1617,7 +1699,7 @@ function ModeToggle() {
|
|
|
1617
1699
|
className: "flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent",
|
|
1618
1700
|
onClick: () => setTheme("system"),
|
|
1619
1701
|
children: [
|
|
1620
|
-
/* @__PURE__ */
|
|
1702
|
+
/* @__PURE__ */ jsx19(Monitor, { className: "h-4 w-4" }),
|
|
1621
1703
|
" Sistema"
|
|
1622
1704
|
]
|
|
1623
1705
|
}
|
|
@@ -1634,7 +1716,7 @@ import { Command as CommandPrimitive2 } from "cmdk";
|
|
|
1634
1716
|
import { Check as Check2, ChevronsUpDown as ChevronsUpDown3, Loader2 as Loader22, Search as Search2, X as X4 } from "lucide-react";
|
|
1635
1717
|
import * as React8 from "react";
|
|
1636
1718
|
import { Drawer as DrawerPrimitive5 } from "vaul";
|
|
1637
|
-
import { jsx as
|
|
1719
|
+
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1638
1720
|
function MultiCombobox({
|
|
1639
1721
|
options,
|
|
1640
1722
|
value,
|
|
@@ -1697,13 +1779,13 @@ function MultiCombobox({
|
|
|
1697
1779
|
className
|
|
1698
1780
|
),
|
|
1699
1781
|
children: [
|
|
1700
|
-
selected.length === 0 ? /* @__PURE__ */
|
|
1782
|
+
selected.length === 0 ? /* @__PURE__ */ jsx20("span", { className: "text-muted-foreground", children: placeholder }) : selected.map((option) => /* @__PURE__ */ jsxs17(
|
|
1701
1783
|
"span",
|
|
1702
1784
|
{
|
|
1703
1785
|
className: "inline-flex items-center gap-1 rounded bg-secondary px-1.5 py-0.5 text-xs text-secondary-foreground",
|
|
1704
1786
|
children: [
|
|
1705
1787
|
option.label,
|
|
1706
|
-
/* @__PURE__ */
|
|
1788
|
+
/* @__PURE__ */ jsx20(
|
|
1707
1789
|
"button",
|
|
1708
1790
|
{
|
|
1709
1791
|
type: "button",
|
|
@@ -1715,14 +1797,14 @@ function MultiCombobox({
|
|
|
1715
1797
|
},
|
|
1716
1798
|
onPointerDown: (event) => event.stopPropagation(),
|
|
1717
1799
|
className: "rounded-sm opacity-60 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1718
|
-
children: /* @__PURE__ */
|
|
1800
|
+
children: /* @__PURE__ */ jsx20(X4, { className: "h-3 w-3" })
|
|
1719
1801
|
}
|
|
1720
1802
|
)
|
|
1721
1803
|
]
|
|
1722
1804
|
},
|
|
1723
1805
|
option.value
|
|
1724
1806
|
)),
|
|
1725
|
-
/* @__PURE__ */
|
|
1807
|
+
/* @__PURE__ */ jsx20(ChevronsUpDown3, { className: "ml-auto h-4 w-4 shrink-0 opacity-50" })
|
|
1726
1808
|
]
|
|
1727
1809
|
}
|
|
1728
1810
|
);
|
|
@@ -1733,8 +1815,8 @@ function MultiCombobox({
|
|
|
1733
1815
|
className: "flex h-full w-full flex-col overflow-hidden",
|
|
1734
1816
|
children: [
|
|
1735
1817
|
/* @__PURE__ */ jsxs17("div", { className: "flex items-center border-b px-3", children: [
|
|
1736
|
-
/* @__PURE__ */
|
|
1737
|
-
/* @__PURE__ */
|
|
1818
|
+
/* @__PURE__ */ jsx20(Search2, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
1819
|
+
/* @__PURE__ */ jsx20(
|
|
1738
1820
|
CommandPrimitive2.Input,
|
|
1739
1821
|
{
|
|
1740
1822
|
placeholder: searchPlaceholder,
|
|
@@ -1749,7 +1831,7 @@ function MultiCombobox({
|
|
|
1749
1831
|
ref: listRef,
|
|
1750
1832
|
className: "max-h-[50vh] overflow-y-auto overflow-x-hidden p-1 sm:max-h-60",
|
|
1751
1833
|
children: [
|
|
1752
|
-
!isServer && /* @__PURE__ */
|
|
1834
|
+
!isServer && /* @__PURE__ */ jsx20(CommandPrimitive2.Empty, { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }),
|
|
1753
1835
|
options.map((option) => /* @__PURE__ */ jsxs17(
|
|
1754
1836
|
CommandPrimitive2.Item,
|
|
1755
1837
|
{
|
|
@@ -1758,7 +1840,7 @@ function MultiCombobox({
|
|
|
1758
1840
|
onSelect: () => toggleValue(option.value),
|
|
1759
1841
|
className: "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-2.5 text-sm outline-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 sm:py-1.5",
|
|
1760
1842
|
children: [
|
|
1761
|
-
/* @__PURE__ */
|
|
1843
|
+
/* @__PURE__ */ jsx20(
|
|
1762
1844
|
Check2,
|
|
1763
1845
|
{
|
|
1764
1846
|
className: cn(
|
|
@@ -1767,14 +1849,14 @@ function MultiCombobox({
|
|
|
1767
1849
|
)
|
|
1768
1850
|
}
|
|
1769
1851
|
),
|
|
1770
|
-
/* @__PURE__ */
|
|
1852
|
+
/* @__PURE__ */ jsx20("span", { className: "truncate", children: option.label })
|
|
1771
1853
|
]
|
|
1772
1854
|
},
|
|
1773
1855
|
option.value
|
|
1774
1856
|
)),
|
|
1775
|
-
isServer && !loading && options.length === 0 && /* @__PURE__ */
|
|
1776
|
-
isServer && loading && /* @__PURE__ */
|
|
1777
|
-
isServer && hasMore && /* @__PURE__ */
|
|
1857
|
+
isServer && !loading && options.length === 0 && /* @__PURE__ */ jsx20("div", { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }),
|
|
1858
|
+
isServer && loading && /* @__PURE__ */ jsx20("div", { className: "flex items-center justify-center py-6", children: /* @__PURE__ */ jsx20(Loader22, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }),
|
|
1859
|
+
isServer && hasMore && /* @__PURE__ */ jsx20("div", { ref: sentinelRef, "aria-hidden": true, className: "h-1" })
|
|
1778
1860
|
]
|
|
1779
1861
|
}
|
|
1780
1862
|
)
|
|
@@ -1783,8 +1865,8 @@ function MultiCombobox({
|
|
|
1783
1865
|
);
|
|
1784
1866
|
if (isDesktop) {
|
|
1785
1867
|
return /* @__PURE__ */ jsxs17(PopoverPrimitive5.Root, { open, onOpenChange: setOpen, children: [
|
|
1786
|
-
/* @__PURE__ */
|
|
1787
|
-
/* @__PURE__ */
|
|
1868
|
+
/* @__PURE__ */ jsx20(PopoverPrimitive5.Trigger, { asChild: true, disabled, children: trigger }),
|
|
1869
|
+
/* @__PURE__ */ jsx20(PopoverPrimitive5.Portal, { children: /* @__PURE__ */ jsx20(
|
|
1788
1870
|
PopoverPrimitive5.Content,
|
|
1789
1871
|
{
|
|
1790
1872
|
align: "start",
|
|
@@ -1797,12 +1879,12 @@ function MultiCombobox({
|
|
|
1797
1879
|
] });
|
|
1798
1880
|
}
|
|
1799
1881
|
return /* @__PURE__ */ jsxs17(DrawerPrimitive5.Root, { open, onOpenChange: setOpen, children: [
|
|
1800
|
-
/* @__PURE__ */
|
|
1882
|
+
/* @__PURE__ */ jsx20(DrawerPrimitive5.Trigger, { asChild: true, disabled, children: trigger }),
|
|
1801
1883
|
/* @__PURE__ */ jsxs17(DrawerPrimitive5.Portal, { children: [
|
|
1802
|
-
/* @__PURE__ */
|
|
1884
|
+
/* @__PURE__ */ jsx20(DrawerPrimitive5.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
1803
1885
|
/* @__PURE__ */ jsxs17(DrawerPrimitive5.Content, { className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85vh] flex-col rounded-t-2xl border bg-popover text-popover-foreground outline-none", children: [
|
|
1804
|
-
/* @__PURE__ */
|
|
1805
|
-
/* @__PURE__ */
|
|
1886
|
+
/* @__PURE__ */ jsx20(DrawerPrimitive5.Title, { className: "sr-only", children: placeholder }),
|
|
1887
|
+
/* @__PURE__ */ jsx20("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
1806
1888
|
command
|
|
1807
1889
|
] })
|
|
1808
1890
|
] })
|
|
@@ -1810,7 +1892,7 @@ function MultiCombobox({
|
|
|
1810
1892
|
}
|
|
1811
1893
|
|
|
1812
1894
|
// src/components/page-header.tsx
|
|
1813
|
-
import { jsx as
|
|
1895
|
+
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1814
1896
|
function PageHeader({ title, description, action, className }) {
|
|
1815
1897
|
return /* @__PURE__ */ jsxs18(
|
|
1816
1898
|
"div",
|
|
@@ -1818,17 +1900,17 @@ function PageHeader({ title, description, action, className }) {
|
|
|
1818
1900
|
className: `flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between ${className ?? ""}`,
|
|
1819
1901
|
children: [
|
|
1820
1902
|
/* @__PURE__ */ jsxs18("div", { className: "min-w-0", children: [
|
|
1821
|
-
/* @__PURE__ */
|
|
1822
|
-
description && /* @__PURE__ */
|
|
1903
|
+
/* @__PURE__ */ jsx21("h1", { className: "truncate text-2xl font-semibold tracking-tight", children: title }),
|
|
1904
|
+
description && /* @__PURE__ */ jsx21("p", { className: "text-sm text-muted-foreground", children: description })
|
|
1823
1905
|
] }),
|
|
1824
|
-
action && /* @__PURE__ */
|
|
1906
|
+
action && /* @__PURE__ */ jsx21("div", { className: "shrink-0", children: action })
|
|
1825
1907
|
]
|
|
1826
1908
|
}
|
|
1827
1909
|
);
|
|
1828
1910
|
}
|
|
1829
1911
|
|
|
1830
1912
|
// src/components/pagination.tsx
|
|
1831
|
-
import { jsx as
|
|
1913
|
+
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1832
1914
|
var navButtonClass2 = "inline-flex h-8 items-center justify-center rounded-md border border-input bg-background px-3 text-xs font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground cursor-pointer disabled:pointer-events-none disabled:opacity-50";
|
|
1833
1915
|
function Pagination({
|
|
1834
1916
|
page,
|
|
@@ -1848,20 +1930,20 @@ function Pagination({
|
|
|
1848
1930
|
className: `flex items-center ${showPageSizeSelector ? "justify-between" : "justify-end"} gap-4 ${className ?? ""}`,
|
|
1849
1931
|
children: [
|
|
1850
1932
|
showPageSizeSelector && /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2", children: [
|
|
1851
|
-
/* @__PURE__ */
|
|
1852
|
-
/* @__PURE__ */
|
|
1933
|
+
/* @__PURE__ */ jsx22("label", { htmlFor: "pagination-page-size", className: "text-sm text-muted-foreground", children: "Itens por p\xE1gina" }),
|
|
1934
|
+
/* @__PURE__ */ jsx22(
|
|
1853
1935
|
"select",
|
|
1854
1936
|
{
|
|
1855
1937
|
id: "pagination-page-size",
|
|
1856
1938
|
value: pageSize,
|
|
1857
1939
|
onChange: (e) => onPageSizeChange?.(Number(e.target.value)),
|
|
1858
1940
|
className: "h-8 rounded-md border border-input bg-background px-2 text-xs font-medium shadow-sm transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring cursor-pointer",
|
|
1859
|
-
children: (pageSizeOptions ?? []).map((size) => /* @__PURE__ */
|
|
1941
|
+
children: (pageSizeOptions ?? []).map((size) => /* @__PURE__ */ jsx22("option", { value: size, children: size }, size))
|
|
1860
1942
|
}
|
|
1861
1943
|
)
|
|
1862
1944
|
] }),
|
|
1863
1945
|
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-4", children: [
|
|
1864
|
-
/* @__PURE__ */
|
|
1946
|
+
/* @__PURE__ */ jsx22(
|
|
1865
1947
|
"button",
|
|
1866
1948
|
{
|
|
1867
1949
|
type: "button",
|
|
@@ -1876,7 +1958,7 @@ function Pagination({
|
|
|
1876
1958
|
page,
|
|
1877
1959
|
totalPages ? ` de ${totalPages}` : ""
|
|
1878
1960
|
] }),
|
|
1879
|
-
/* @__PURE__ */
|
|
1961
|
+
/* @__PURE__ */ jsx22(
|
|
1880
1962
|
"button",
|
|
1881
1963
|
{
|
|
1882
1964
|
type: "button",
|
|
@@ -1895,11 +1977,11 @@ function Pagination({
|
|
|
1895
1977
|
// src/components/password-input.tsx
|
|
1896
1978
|
import { Eye, EyeOff } from "lucide-react";
|
|
1897
1979
|
import * as React9 from "react";
|
|
1898
|
-
import { jsx as
|
|
1980
|
+
import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1899
1981
|
var PasswordInput = React9.forwardRef(({ containerClassName, className, ...props }, ref) => {
|
|
1900
1982
|
const [visible, setVisible] = React9.useState(false);
|
|
1901
1983
|
return /* @__PURE__ */ jsxs20("div", { className: `relative ${containerClassName ?? ""}`, children: [
|
|
1902
|
-
/* @__PURE__ */
|
|
1984
|
+
/* @__PURE__ */ jsx23(
|
|
1903
1985
|
"input",
|
|
1904
1986
|
{
|
|
1905
1987
|
ref,
|
|
@@ -1908,7 +1990,7 @@ var PasswordInput = React9.forwardRef(({ containerClassName, className, ...props
|
|
|
1908
1990
|
...props
|
|
1909
1991
|
}
|
|
1910
1992
|
),
|
|
1911
|
-
/* @__PURE__ */
|
|
1993
|
+
/* @__PURE__ */ jsx23(
|
|
1912
1994
|
"button",
|
|
1913
1995
|
{
|
|
1914
1996
|
type: "button",
|
|
@@ -1916,7 +1998,7 @@ var PasswordInput = React9.forwardRef(({ containerClassName, className, ...props
|
|
|
1916
1998
|
"aria-label": visible ? "Ocultar senha" : "Mostrar senha",
|
|
1917
1999
|
tabIndex: -1,
|
|
1918
2000
|
className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground",
|
|
1919
|
-
children: visible ? /* @__PURE__ */
|
|
2001
|
+
children: visible ? /* @__PURE__ */ jsx23(EyeOff, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx23(Eye, { className: "h-4 w-4" })
|
|
1920
2002
|
}
|
|
1921
2003
|
)
|
|
1922
2004
|
] });
|
|
@@ -1924,8 +2006,8 @@ var PasswordInput = React9.forwardRef(({ containerClassName, className, ...props
|
|
|
1924
2006
|
PasswordInput.displayName = "PasswordInput";
|
|
1925
2007
|
|
|
1926
2008
|
// src/components/progress-bar.tsx
|
|
1927
|
-
import { jsx as
|
|
1928
|
-
var
|
|
2009
|
+
import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2010
|
+
var sizeClasses3 = {
|
|
1929
2011
|
sm: "h-1.5",
|
|
1930
2012
|
md: "h-2"
|
|
1931
2013
|
};
|
|
@@ -1940,14 +2022,14 @@ function ProgressBar({
|
|
|
1940
2022
|
const clamped = Math.min(100, Math.max(0, value));
|
|
1941
2023
|
return /* @__PURE__ */ jsxs21("div", { className: `space-y-1.5 ${className ?? ""}`, children: [
|
|
1942
2024
|
(label || valueLabel) && /* @__PURE__ */ jsxs21("div", { className: "flex items-baseline justify-between gap-2", children: [
|
|
1943
|
-
label && /* @__PURE__ */
|
|
1944
|
-
valueLabel && /* @__PURE__ */
|
|
2025
|
+
label && /* @__PURE__ */ jsx24("span", { className: "text-sm text-muted-foreground", children: label }),
|
|
2026
|
+
valueLabel && /* @__PURE__ */ jsx24("span", { className: "text-sm font-semibold", children: valueLabel })
|
|
1945
2027
|
] }),
|
|
1946
|
-
/* @__PURE__ */
|
|
2028
|
+
/* @__PURE__ */ jsx24(
|
|
1947
2029
|
"div",
|
|
1948
2030
|
{
|
|
1949
|
-
className: `w-full overflow-hidden rounded-full bg-muted ${
|
|
1950
|
-
children: /* @__PURE__ */
|
|
2031
|
+
className: `w-full overflow-hidden rounded-full bg-muted ${sizeClasses3[size]}`,
|
|
2032
|
+
children: /* @__PURE__ */ jsx24(
|
|
1951
2033
|
"div",
|
|
1952
2034
|
{
|
|
1953
2035
|
className: `h-full rounded-full transition-all duration-300 ${indicatorClassName ?? "bg-primary"}`,
|
|
@@ -1960,7 +2042,7 @@ function ProgressBar({
|
|
|
1960
2042
|
}
|
|
1961
2043
|
|
|
1962
2044
|
// src/components/responsive-data-view.tsx
|
|
1963
|
-
import { jsx as
|
|
2045
|
+
import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1964
2046
|
function ResponsiveDataView({
|
|
1965
2047
|
table,
|
|
1966
2048
|
cards,
|
|
@@ -1972,12 +2054,12 @@ function ResponsiveDataView({
|
|
|
1972
2054
|
pagination
|
|
1973
2055
|
}) {
|
|
1974
2056
|
return /* @__PURE__ */ jsxs22("div", { className: "space-y-4", children: [
|
|
1975
|
-
/* @__PURE__ */
|
|
1976
|
-
/* @__PURE__ */
|
|
2057
|
+
/* @__PURE__ */ jsx25("div", { className: "hidden overflow-x-auto rounded-md border md:block", children: table }),
|
|
2058
|
+
/* @__PURE__ */ jsx25("div", { className: "md:hidden", children: cards }),
|
|
1977
2059
|
!isLoading && isEmpty && /* @__PURE__ */ jsxs22("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
|
|
1978
|
-
emptyIcon && /* @__PURE__ */
|
|
1979
|
-
/* @__PURE__ */
|
|
1980
|
-
emptyDescription && /* @__PURE__ */
|
|
2060
|
+
emptyIcon && /* @__PURE__ */ jsx25("div", { className: "mb-4 text-muted-foreground", children: emptyIcon }),
|
|
2061
|
+
/* @__PURE__ */ jsx25("h3", { className: "text-lg font-semibold tracking-tight", children: emptyTitle }),
|
|
2062
|
+
emptyDescription && /* @__PURE__ */ jsx25("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: emptyDescription })
|
|
1981
2063
|
] }),
|
|
1982
2064
|
pagination
|
|
1983
2065
|
] });
|
|
@@ -1988,7 +2070,7 @@ import * as DropdownMenu3 from "@radix-ui/react-dropdown-menu";
|
|
|
1988
2070
|
import { MoreVertical } from "lucide-react";
|
|
1989
2071
|
import { useState as useState11 } from "react";
|
|
1990
2072
|
import { Drawer as DrawerPrimitive6 } from "vaul";
|
|
1991
|
-
import { Fragment as Fragment6, jsx as
|
|
2073
|
+
import { Fragment as Fragment6, jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1992
2074
|
var triggerClass = "inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50";
|
|
1993
2075
|
var itemClass2 = "flex w-full cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1994
2076
|
var sheetItemClass2 = "flex w-full cursor-pointer select-none items-center gap-3 rounded-md px-3 py-3 text-base outline-none transition-colors hover:bg-accent active:bg-accent disabled:pointer-events-none disabled:opacity-50";
|
|
@@ -2002,20 +2084,20 @@ function RowActionsMenu({
|
|
|
2002
2084
|
const isDesktop = useIsDesktop();
|
|
2003
2085
|
const [open, setOpen] = useState11(false);
|
|
2004
2086
|
if (actions.length === 0) return null;
|
|
2005
|
-
const trigger = /* @__PURE__ */
|
|
2087
|
+
const trigger = /* @__PURE__ */ jsx26(
|
|
2006
2088
|
"button",
|
|
2007
2089
|
{
|
|
2008
2090
|
type: "button",
|
|
2009
2091
|
disabled,
|
|
2010
2092
|
"aria-label": label,
|
|
2011
2093
|
className: triggerClass,
|
|
2012
|
-
children: /* @__PURE__ */
|
|
2094
|
+
children: /* @__PURE__ */ jsx26(MoreVertical, { className: "h-4 w-4" })
|
|
2013
2095
|
}
|
|
2014
2096
|
);
|
|
2015
2097
|
if (isDesktop) {
|
|
2016
2098
|
return /* @__PURE__ */ jsxs23(DropdownMenu3.Root, { open, onOpenChange: setOpen, modal: false, children: [
|
|
2017
|
-
/* @__PURE__ */
|
|
2018
|
-
/* @__PURE__ */
|
|
2099
|
+
/* @__PURE__ */ jsx26(DropdownMenu3.Trigger, { asChild: true, children: trigger }),
|
|
2100
|
+
/* @__PURE__ */ jsx26(DropdownMenu3.Portal, { children: /* @__PURE__ */ jsx26(
|
|
2019
2101
|
DropdownMenu3.Content,
|
|
2020
2102
|
{
|
|
2021
2103
|
align,
|
|
@@ -2026,7 +2108,7 @@ function RowActionsMenu({
|
|
|
2026
2108
|
itemClass2,
|
|
2027
2109
|
action.destructive && "text-destructive focus:bg-destructive/10"
|
|
2028
2110
|
);
|
|
2029
|
-
return action.href ? /* @__PURE__ */
|
|
2111
|
+
return action.href ? /* @__PURE__ */ jsx26(
|
|
2030
2112
|
DropdownMenu3.Item,
|
|
2031
2113
|
{
|
|
2032
2114
|
asChild: true,
|
|
@@ -2060,12 +2142,12 @@ function RowActionsMenu({
|
|
|
2060
2142
|
] });
|
|
2061
2143
|
}
|
|
2062
2144
|
return /* @__PURE__ */ jsxs23(DrawerPrimitive6.Root, { open, onOpenChange: setOpen, children: [
|
|
2063
|
-
/* @__PURE__ */
|
|
2145
|
+
/* @__PURE__ */ jsx26(DrawerPrimitive6.Trigger, { asChild: true, children: trigger }),
|
|
2064
2146
|
/* @__PURE__ */ jsxs23(DrawerPrimitive6.Portal, { children: [
|
|
2065
|
-
/* @__PURE__ */
|
|
2147
|
+
/* @__PURE__ */ jsx26(DrawerPrimitive6.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
2066
2148
|
/* @__PURE__ */ jsxs23(DrawerPrimitive6.Content, { className: "fixed inset-x-0 bottom-0 z-50 flex flex-col rounded-t-2xl border bg-popover p-2 pb-[max(0.5rem,env(safe-area-inset-bottom))] text-popover-foreground outline-none", children: [
|
|
2067
|
-
/* @__PURE__ */
|
|
2068
|
-
/* @__PURE__ */
|
|
2149
|
+
/* @__PURE__ */ jsx26(DrawerPrimitive6.Title, { className: "sr-only", children: label }),
|
|
2150
|
+
/* @__PURE__ */ jsx26("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
2069
2151
|
actions.map((action) => {
|
|
2070
2152
|
const cls = cn(
|
|
2071
2153
|
sheetItemClass2,
|
|
@@ -2075,7 +2157,7 @@ function RowActionsMenu({
|
|
|
2075
2157
|
action.icon,
|
|
2076
2158
|
action.label
|
|
2077
2159
|
] });
|
|
2078
|
-
return action.href ? /* @__PURE__ */
|
|
2160
|
+
return action.href ? /* @__PURE__ */ jsx26(
|
|
2079
2161
|
"span",
|
|
2080
2162
|
{
|
|
2081
2163
|
onClick: () => setOpen(false),
|
|
@@ -2087,7 +2169,7 @@ function RowActionsMenu({
|
|
|
2087
2169
|
})
|
|
2088
2170
|
},
|
|
2089
2171
|
action.label
|
|
2090
|
-
) : /* @__PURE__ */
|
|
2172
|
+
) : /* @__PURE__ */ jsx26(
|
|
2091
2173
|
"button",
|
|
2092
2174
|
{
|
|
2093
2175
|
type: "button",
|
|
@@ -2109,7 +2191,7 @@ function RowActionsMenu({
|
|
|
2109
2191
|
|
|
2110
2192
|
// src/components/search-input.tsx
|
|
2111
2193
|
import * as React10 from "react";
|
|
2112
|
-
import { jsx as
|
|
2194
|
+
import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2113
2195
|
var SearchInput = React10.forwardRef(
|
|
2114
2196
|
({ containerClassName, className, ...props }, ref) => {
|
|
2115
2197
|
return /* @__PURE__ */ jsxs24("div", { className: cn("relative flex-1", containerClassName), children: [
|
|
@@ -2128,12 +2210,12 @@ var SearchInput = React10.forwardRef(
|
|
|
2128
2210
|
"aria-hidden": "true",
|
|
2129
2211
|
className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground",
|
|
2130
2212
|
children: [
|
|
2131
|
-
/* @__PURE__ */
|
|
2132
|
-
/* @__PURE__ */
|
|
2213
|
+
/* @__PURE__ */ jsx27("circle", { cx: "11", cy: "11", r: "8" }),
|
|
2214
|
+
/* @__PURE__ */ jsx27("path", { d: "m21 21-4.3-4.3" })
|
|
2133
2215
|
]
|
|
2134
2216
|
}
|
|
2135
2217
|
),
|
|
2136
|
-
/* @__PURE__ */
|
|
2218
|
+
/* @__PURE__ */ jsx27(
|
|
2137
2219
|
"input",
|
|
2138
2220
|
{
|
|
2139
2221
|
ref,
|
|
@@ -2151,30 +2233,30 @@ var SearchInput = React10.forwardRef(
|
|
|
2151
2233
|
SearchInput.displayName = "SearchInput";
|
|
2152
2234
|
|
|
2153
2235
|
// src/components/stat-card.tsx
|
|
2154
|
-
import { jsx as
|
|
2236
|
+
import { jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2155
2237
|
function StatCard({ label, value, detail, icon, isLoading }) {
|
|
2156
2238
|
if (isLoading) {
|
|
2157
2239
|
return /* @__PURE__ */ jsxs25("div", { className: "rounded-lg border bg-card p-6 shadow-sm", children: [
|
|
2158
2240
|
/* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between pb-2", children: [
|
|
2159
|
-
/* @__PURE__ */
|
|
2160
|
-
/* @__PURE__ */
|
|
2241
|
+
/* @__PURE__ */ jsx28("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
|
|
2242
|
+
/* @__PURE__ */ jsx28("div", { className: "h-4 w-4 animate-pulse rounded bg-muted" })
|
|
2161
2243
|
] }),
|
|
2162
|
-
/* @__PURE__ */
|
|
2163
|
-
/* @__PURE__ */
|
|
2244
|
+
/* @__PURE__ */ jsx28("div", { className: "mt-2 h-7 w-16 animate-pulse rounded bg-muted" }),
|
|
2245
|
+
/* @__PURE__ */ jsx28("div", { className: "mt-1 h-4 w-20 animate-pulse rounded bg-muted" })
|
|
2164
2246
|
] });
|
|
2165
2247
|
}
|
|
2166
2248
|
return /* @__PURE__ */ jsxs25("div", { className: "rounded-lg border bg-card p-6 shadow-sm", children: [
|
|
2167
2249
|
/* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between pb-2", children: [
|
|
2168
|
-
/* @__PURE__ */
|
|
2169
|
-
icon && /* @__PURE__ */
|
|
2250
|
+
/* @__PURE__ */ jsx28("span", { className: "text-sm font-medium text-muted-foreground", children: label }),
|
|
2251
|
+
icon && /* @__PURE__ */ jsx28("span", { className: "text-muted-foreground", children: icon })
|
|
2170
2252
|
] }),
|
|
2171
|
-
/* @__PURE__ */
|
|
2172
|
-
detail && /* @__PURE__ */
|
|
2253
|
+
/* @__PURE__ */ jsx28("div", { className: "text-2xl font-bold", children: value }),
|
|
2254
|
+
detail && /* @__PURE__ */ jsx28("p", { className: "text-xs text-muted-foreground", children: detail })
|
|
2173
2255
|
] });
|
|
2174
2256
|
}
|
|
2175
2257
|
|
|
2176
2258
|
// src/components/status-badge.tsx
|
|
2177
|
-
import { jsx as
|
|
2259
|
+
import { jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2178
2260
|
var variantClasses = {
|
|
2179
2261
|
neutral: {
|
|
2180
2262
|
badge: "bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300",
|
|
@@ -2209,7 +2291,7 @@ function StatusBadge({
|
|
|
2209
2291
|
{
|
|
2210
2292
|
className: `inline-flex items-center gap-1.5 rounded-md px-2 py-0.5 text-xs font-medium ${classes.badge} ${className ?? ""}`,
|
|
2211
2293
|
children: [
|
|
2212
|
-
dot && /* @__PURE__ */
|
|
2294
|
+
dot && /* @__PURE__ */ jsx29(
|
|
2213
2295
|
"span",
|
|
2214
2296
|
{
|
|
2215
2297
|
className: `inline-block h-1.5 w-1.5 shrink-0 rounded-full ${classes.dot}`
|
|
@@ -2222,31 +2304,31 @@ function StatusBadge({
|
|
|
2222
2304
|
}
|
|
2223
2305
|
|
|
2224
2306
|
// src/components/status-dot.tsx
|
|
2225
|
-
import { jsx as
|
|
2307
|
+
import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2226
2308
|
function StatusDot({ active, label, className }) {
|
|
2227
2309
|
return /* @__PURE__ */ jsxs27("span", { className: `inline-flex items-center gap-2 ${className ?? ""}`, children: [
|
|
2228
|
-
/* @__PURE__ */
|
|
2310
|
+
/* @__PURE__ */ jsx30(
|
|
2229
2311
|
"span",
|
|
2230
2312
|
{
|
|
2231
2313
|
className: `h-2 w-2 rounded-full ${active ? "bg-green-500" : "bg-red-500"}`
|
|
2232
2314
|
}
|
|
2233
2315
|
),
|
|
2234
|
-
label && /* @__PURE__ */
|
|
2316
|
+
label && /* @__PURE__ */ jsx30("span", { children: label })
|
|
2235
2317
|
] });
|
|
2236
2318
|
}
|
|
2237
2319
|
|
|
2238
2320
|
// src/components/table-skeleton.tsx
|
|
2239
|
-
import { Fragment as Fragment7, jsx as
|
|
2321
|
+
import { Fragment as Fragment7, jsx as jsx31 } from "react/jsx-runtime";
|
|
2240
2322
|
function TableSkeleton({ rows = 5, columns = 4 }) {
|
|
2241
|
-
return /* @__PURE__ */
|
|
2323
|
+
return /* @__PURE__ */ jsx31(Fragment7, { children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsx31("tr", { className: "border-b transition-colors", children: Array.from({ length: columns }).map((_2, j) => /* @__PURE__ */ jsx31("td", { className: "p-4 align-middle", children: /* @__PURE__ */ jsx31("div", { className: "h-5 w-full animate-pulse rounded bg-muted" }) }, j)) }, i)) });
|
|
2242
2324
|
}
|
|
2243
2325
|
|
|
2244
2326
|
// src/components/toaster.tsx
|
|
2245
2327
|
import { Toaster as Sonner } from "sonner";
|
|
2246
|
-
import { jsx as
|
|
2328
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2247
2329
|
function Toaster(props) {
|
|
2248
2330
|
const { theme = "system" } = useTheme();
|
|
2249
|
-
return /* @__PURE__ */
|
|
2331
|
+
return /* @__PURE__ */ jsx32(
|
|
2250
2332
|
Sonner,
|
|
2251
2333
|
{
|
|
2252
2334
|
theme,
|
|
@@ -2370,6 +2452,7 @@ export {
|
|
|
2370
2452
|
Pagination,
|
|
2371
2453
|
PasswordInput,
|
|
2372
2454
|
ProgressBar,
|
|
2455
|
+
Rating,
|
|
2373
2456
|
ResponsiveDataView,
|
|
2374
2457
|
RowActionsMenu,
|
|
2375
2458
|
SearchInput,
|