@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.cjs
CHANGED
|
@@ -53,6 +53,7 @@ __export(index_exports, {
|
|
|
53
53
|
Pagination: () => Pagination,
|
|
54
54
|
PasswordInput: () => PasswordInput,
|
|
55
55
|
ProgressBar: () => ProgressBar,
|
|
56
|
+
Rating: () => Rating,
|
|
56
57
|
ResponsiveDataView: () => ResponsiveDataView,
|
|
57
58
|
RowActionsMenu: () => RowActionsMenu,
|
|
58
59
|
SearchInput: () => SearchInput,
|
|
@@ -651,10 +652,92 @@ function ColorPicker({
|
|
|
651
652
|
] });
|
|
652
653
|
}
|
|
653
654
|
|
|
655
|
+
// src/components/rating.tsx
|
|
656
|
+
var ToggleGroup = __toESM(require("@radix-ui/react-toggle-group"), 1);
|
|
657
|
+
var import_lucide_react5 = require("lucide-react");
|
|
658
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
659
|
+
var MAX_STARS = 5;
|
|
660
|
+
var sizeClasses2 = {
|
|
661
|
+
sm: "h-4 w-4",
|
|
662
|
+
md: "h-5 w-5",
|
|
663
|
+
lg: "h-6 w-6"
|
|
664
|
+
};
|
|
665
|
+
function defaultLabel(value) {
|
|
666
|
+
return value > 0 ? `Avalia\xE7\xE3o: ${value} de ${MAX_STARS} estrelas` : "Avalia\xE7\xE3o: sem nota";
|
|
667
|
+
}
|
|
668
|
+
function Rating({
|
|
669
|
+
value = 0,
|
|
670
|
+
onChange,
|
|
671
|
+
readOnly = false,
|
|
672
|
+
size = "md",
|
|
673
|
+
className,
|
|
674
|
+
"aria-label": ariaLabel
|
|
675
|
+
}) {
|
|
676
|
+
const clamped = Math.min(MAX_STARS, Math.max(0, value));
|
|
677
|
+
const label = ariaLabel ?? defaultLabel(clamped);
|
|
678
|
+
if (readOnly) {
|
|
679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
680
|
+
"div",
|
|
681
|
+
{
|
|
682
|
+
role: "img",
|
|
683
|
+
"aria-label": label,
|
|
684
|
+
className: cn("inline-flex items-center gap-0.5", className),
|
|
685
|
+
children: Array.from({ length: MAX_STARS }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
686
|
+
import_lucide_react5.Star,
|
|
687
|
+
{
|
|
688
|
+
"aria-hidden": true,
|
|
689
|
+
className: cn(
|
|
690
|
+
sizeClasses2[size],
|
|
691
|
+
index < clamped ? "fill-amber-400 text-amber-400" : "text-muted-foreground"
|
|
692
|
+
)
|
|
693
|
+
},
|
|
694
|
+
index
|
|
695
|
+
))
|
|
696
|
+
}
|
|
697
|
+
);
|
|
698
|
+
}
|
|
699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
700
|
+
ToggleGroup.Root,
|
|
701
|
+
{
|
|
702
|
+
type: "single",
|
|
703
|
+
value: clamped > 0 ? String(clamped) : "",
|
|
704
|
+
onValueChange: (next) => {
|
|
705
|
+
if (next) onChange?.(Number(next));
|
|
706
|
+
},
|
|
707
|
+
"aria-label": label,
|
|
708
|
+
className: cn("inline-flex items-center gap-0.5", className),
|
|
709
|
+
children: Array.from({ length: MAX_STARS }, (_, index) => {
|
|
710
|
+
const starValue = index + 1;
|
|
711
|
+
const filled = starValue <= clamped;
|
|
712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
713
|
+
ToggleGroup.Item,
|
|
714
|
+
{
|
|
715
|
+
value: String(starValue),
|
|
716
|
+
"aria-label": `${starValue} ${starValue === 1 ? "estrela" : "estrelas"}`,
|
|
717
|
+
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",
|
|
718
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
719
|
+
import_lucide_react5.Star,
|
|
720
|
+
{
|
|
721
|
+
"aria-hidden": true,
|
|
722
|
+
className: cn(
|
|
723
|
+
sizeClasses2[size],
|
|
724
|
+
"transition-colors",
|
|
725
|
+
filled ? "fill-amber-400 text-amber-400" : "text-muted-foreground hover:text-amber-400"
|
|
726
|
+
)
|
|
727
|
+
}
|
|
728
|
+
)
|
|
729
|
+
},
|
|
730
|
+
starValue
|
|
731
|
+
);
|
|
732
|
+
})
|
|
733
|
+
}
|
|
734
|
+
);
|
|
735
|
+
}
|
|
736
|
+
|
|
654
737
|
// src/components/combobox.tsx
|
|
655
738
|
var PopoverPrimitive2 = __toESM(require("@radix-ui/react-popover"), 1);
|
|
656
739
|
var import_cmdk = require("cmdk");
|
|
657
|
-
var
|
|
740
|
+
var import_lucide_react6 = require("lucide-react");
|
|
658
741
|
var React5 = __toESM(require("react"), 1);
|
|
659
742
|
var import_vaul2 = require("vaul");
|
|
660
743
|
|
|
@@ -693,7 +776,7 @@ function useInfiniteScrollSentinel({
|
|
|
693
776
|
}
|
|
694
777
|
|
|
695
778
|
// src/components/combobox.tsx
|
|
696
|
-
var
|
|
779
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
697
780
|
function Combobox({
|
|
698
781
|
options,
|
|
699
782
|
value,
|
|
@@ -741,7 +824,7 @@ function Combobox({
|
|
|
741
824
|
loading,
|
|
742
825
|
onLoadMore
|
|
743
826
|
});
|
|
744
|
-
const trigger = /* @__PURE__ */ (0,
|
|
827
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
745
828
|
"button",
|
|
746
829
|
{
|
|
747
830
|
type: "button",
|
|
@@ -756,20 +839,20 @@ function Combobox({
|
|
|
756
839
|
className
|
|
757
840
|
),
|
|
758
841
|
children: [
|
|
759
|
-
/* @__PURE__ */ (0,
|
|
760
|
-
/* @__PURE__ */ (0,
|
|
842
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn("truncate", !selected && "text-muted-foreground"), children: selected ? selected.label : placeholder }),
|
|
843
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react6.ChevronsUpDown, { className: "h-4 w-4 shrink-0 opacity-50" })
|
|
761
844
|
]
|
|
762
845
|
}
|
|
763
846
|
);
|
|
764
|
-
const command = /* @__PURE__ */ (0,
|
|
847
|
+
const command = /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
765
848
|
import_cmdk.Command,
|
|
766
849
|
{
|
|
767
850
|
shouldFilter: !isServer,
|
|
768
851
|
className: "flex h-full w-full flex-col overflow-hidden",
|
|
769
852
|
children: [
|
|
770
|
-
/* @__PURE__ */ (0,
|
|
771
|
-
/* @__PURE__ */ (0,
|
|
772
|
-
/* @__PURE__ */ (0,
|
|
853
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center border-b px-3", children: [
|
|
854
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react6.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
855
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
773
856
|
import_cmdk.Command.Input,
|
|
774
857
|
{
|
|
775
858
|
placeholder: searchPlaceholder,
|
|
@@ -778,28 +861,28 @@ function Combobox({
|
|
|
778
861
|
}
|
|
779
862
|
)
|
|
780
863
|
] }),
|
|
781
|
-
/* @__PURE__ */ (0,
|
|
864
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
782
865
|
import_cmdk.Command.List,
|
|
783
866
|
{
|
|
784
867
|
ref: listRef,
|
|
785
868
|
className: "max-h-[50vh] overflow-y-auto overflow-x-hidden p-1 sm:max-h-60",
|
|
786
869
|
children: [
|
|
787
|
-
!isServer && !showCreate && /* @__PURE__ */ (0,
|
|
788
|
-
showCreate && /* @__PURE__ */ (0,
|
|
870
|
+
!isServer && !showCreate && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_cmdk.Command.Empty, { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }),
|
|
871
|
+
showCreate && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
789
872
|
import_cmdk.Command.Item,
|
|
790
873
|
{
|
|
791
874
|
value: trimmedSearch,
|
|
792
875
|
onSelect: () => handleSelect(trimmedSearch),
|
|
793
876
|
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",
|
|
794
877
|
children: [
|
|
795
|
-
/* @__PURE__ */ (0,
|
|
796
|
-
/* @__PURE__ */ (0,
|
|
878
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react6.Plus, { className: "h-4 w-4 shrink-0" }),
|
|
879
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "truncate", children: (formatCreateLabel ?? ((text) => `Usar "${text}"`))(
|
|
797
880
|
trimmedSearch
|
|
798
881
|
) })
|
|
799
882
|
]
|
|
800
883
|
}
|
|
801
884
|
),
|
|
802
|
-
options.map((option) => /* @__PURE__ */ (0,
|
|
885
|
+
options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
803
886
|
import_cmdk.Command.Item,
|
|
804
887
|
{
|
|
805
888
|
value: isServer ? option.value : option.label,
|
|
@@ -807,8 +890,8 @@ function Combobox({
|
|
|
807
890
|
onSelect: () => handleSelect(option.value),
|
|
808
891
|
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",
|
|
809
892
|
children: [
|
|
810
|
-
/* @__PURE__ */ (0,
|
|
811
|
-
|
|
893
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
894
|
+
import_lucide_react6.Check,
|
|
812
895
|
{
|
|
813
896
|
className: cn(
|
|
814
897
|
"h-4 w-4 shrink-0",
|
|
@@ -816,14 +899,14 @@ function Combobox({
|
|
|
816
899
|
)
|
|
817
900
|
}
|
|
818
901
|
),
|
|
819
|
-
/* @__PURE__ */ (0,
|
|
902
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "truncate", children: option.label })
|
|
820
903
|
]
|
|
821
904
|
},
|
|
822
905
|
option.value
|
|
823
906
|
)),
|
|
824
|
-
isServer && !loading && options.length === 0 && /* @__PURE__ */ (0,
|
|
825
|
-
isServer && loading && /* @__PURE__ */ (0,
|
|
826
|
-
isServer && hasMore && /* @__PURE__ */ (0,
|
|
907
|
+
isServer && !loading && options.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }),
|
|
908
|
+
isServer && loading && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex items-center justify-center py-6", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react6.Loader2, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }),
|
|
909
|
+
isServer && hasMore && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { ref: sentinelRef, "aria-hidden": true, className: "h-1" })
|
|
827
910
|
]
|
|
828
911
|
}
|
|
829
912
|
)
|
|
@@ -831,9 +914,9 @@ function Combobox({
|
|
|
831
914
|
}
|
|
832
915
|
);
|
|
833
916
|
if (isDesktop) {
|
|
834
|
-
return /* @__PURE__ */ (0,
|
|
835
|
-
/* @__PURE__ */ (0,
|
|
836
|
-
/* @__PURE__ */ (0,
|
|
917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(PopoverPrimitive2.Root, { open, onOpenChange: handleOpenChange, children: [
|
|
918
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PopoverPrimitive2.Trigger, { asChild: true, children: trigger }),
|
|
919
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
837
920
|
PopoverPrimitive2.Content,
|
|
838
921
|
{
|
|
839
922
|
align: "start",
|
|
@@ -845,13 +928,13 @@ function Combobox({
|
|
|
845
928
|
) })
|
|
846
929
|
] });
|
|
847
930
|
}
|
|
848
|
-
return /* @__PURE__ */ (0,
|
|
849
|
-
/* @__PURE__ */ (0,
|
|
850
|
-
/* @__PURE__ */ (0,
|
|
851
|
-
/* @__PURE__ */ (0,
|
|
852
|
-
/* @__PURE__ */ (0,
|
|
853
|
-
/* @__PURE__ */ (0,
|
|
854
|
-
/* @__PURE__ */ (0,
|
|
931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_vaul2.Drawer.Root, { open, onOpenChange: handleOpenChange, children: [
|
|
932
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_vaul2.Drawer.Trigger, { asChild: true, children: trigger }),
|
|
933
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_vaul2.Drawer.Portal, { children: [
|
|
934
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_vaul2.Drawer.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
935
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_vaul2.Drawer.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: [
|
|
936
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_vaul2.Drawer.Title, { className: "sr-only", children: placeholder }),
|
|
937
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
855
938
|
command
|
|
856
939
|
] })
|
|
857
940
|
] })
|
|
@@ -860,7 +943,7 @@ function Combobox({
|
|
|
860
943
|
|
|
861
944
|
// src/components/confirm-dialog.tsx
|
|
862
945
|
var AlertDialog = __toESM(require("@radix-ui/react-alert-dialog"), 1);
|
|
863
|
-
var
|
|
946
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
864
947
|
function ConfirmDialog({
|
|
865
948
|
open,
|
|
866
949
|
onOpenChange,
|
|
@@ -874,8 +957,8 @@ function ConfirmDialog({
|
|
|
874
957
|
blurBackdrop = true,
|
|
875
958
|
backdropClassName
|
|
876
959
|
}) {
|
|
877
|
-
return /* @__PURE__ */ (0,
|
|
878
|
-
/* @__PURE__ */ (0,
|
|
960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(AlertDialog.Root, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(AlertDialog.Portal, { children: [
|
|
961
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
879
962
|
AlertDialog.Overlay,
|
|
880
963
|
{
|
|
881
964
|
className: cn(
|
|
@@ -885,14 +968,14 @@ function ConfirmDialog({
|
|
|
885
968
|
)
|
|
886
969
|
}
|
|
887
970
|
),
|
|
888
|
-
/* @__PURE__ */ (0,
|
|
889
|
-
/* @__PURE__ */ (0,
|
|
890
|
-
/* @__PURE__ */ (0,
|
|
891
|
-
/* @__PURE__ */ (0,
|
|
971
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(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: [
|
|
972
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col space-y-2 text-center sm:text-left", children: [
|
|
973
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(AlertDialog.Title, { className: "text-lg font-semibold", children: title }),
|
|
974
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(AlertDialog.Description, { className: "text-sm text-muted-foreground", children: description })
|
|
892
975
|
] }),
|
|
893
|
-
/* @__PURE__ */ (0,
|
|
894
|
-
/* @__PURE__ */ (0,
|
|
895
|
-
/* @__PURE__ */ (0,
|
|
976
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", children: [
|
|
977
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(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 }),
|
|
978
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
896
979
|
AlertDialog.Action,
|
|
897
980
|
{
|
|
898
981
|
onClick: onConfirm,
|
|
@@ -907,7 +990,7 @@ function ConfirmDialog({
|
|
|
907
990
|
}
|
|
908
991
|
|
|
909
992
|
// src/components/data-table-wrapper.tsx
|
|
910
|
-
var
|
|
993
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
911
994
|
function DataTableWrapper({
|
|
912
995
|
children,
|
|
913
996
|
isEmpty,
|
|
@@ -920,15 +1003,15 @@ function DataTableWrapper({
|
|
|
920
1003
|
hasNextPage = false,
|
|
921
1004
|
hasPreviousPage = false
|
|
922
1005
|
}) {
|
|
923
|
-
return /* @__PURE__ */ (0,
|
|
924
|
-
/* @__PURE__ */ (0,
|
|
925
|
-
!isLoading && isEmpty && /* @__PURE__ */ (0,
|
|
926
|
-
emptyIcon && /* @__PURE__ */ (0,
|
|
927
|
-
/* @__PURE__ */ (0,
|
|
928
|
-
emptyDescription && /* @__PURE__ */ (0,
|
|
1006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "space-y-4", children: [
|
|
1007
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "overflow-x-auto rounded-md border", children }),
|
|
1008
|
+
!isLoading && isEmpty && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
|
|
1009
|
+
emptyIcon && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "mb-4 text-muted-foreground", children: emptyIcon }),
|
|
1010
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h3", { className: "text-lg font-semibold tracking-tight", children: emptyTitle }),
|
|
1011
|
+
emptyDescription && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: emptyDescription })
|
|
929
1012
|
] }),
|
|
930
|
-
page !== void 0 && onPageChange && /* @__PURE__ */ (0,
|
|
931
|
-
/* @__PURE__ */ (0,
|
|
1013
|
+
page !== void 0 && onPageChange && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-end gap-4", children: [
|
|
1014
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
932
1015
|
"button",
|
|
933
1016
|
{
|
|
934
1017
|
type: "button",
|
|
@@ -938,11 +1021,11 @@ function DataTableWrapper({
|
|
|
938
1021
|
children: "Anterior"
|
|
939
1022
|
}
|
|
940
1023
|
),
|
|
941
|
-
/* @__PURE__ */ (0,
|
|
1024
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "text-sm text-muted-foreground", children: [
|
|
942
1025
|
"P\xE1gina ",
|
|
943
1026
|
page
|
|
944
1027
|
] }),
|
|
945
|
-
/* @__PURE__ */ (0,
|
|
1028
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
946
1029
|
"button",
|
|
947
1030
|
{
|
|
948
1031
|
type: "button",
|
|
@@ -961,11 +1044,11 @@ var PopoverPrimitive3 = __toESM(require("@radix-ui/react-popover"), 1);
|
|
|
961
1044
|
var import_mask = require("@react-input/mask");
|
|
962
1045
|
var import_date_fns = require("date-fns");
|
|
963
1046
|
var import_locale = require("date-fns/locale");
|
|
964
|
-
var
|
|
1047
|
+
var import_lucide_react7 = require("lucide-react");
|
|
965
1048
|
var React6 = __toESM(require("react"), 1);
|
|
966
1049
|
var import_react_day_picker = require("react-day-picker");
|
|
967
1050
|
var import_vaul3 = require("vaul");
|
|
968
|
-
var
|
|
1051
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
969
1052
|
var DATE_MASK = "__/__/____";
|
|
970
1053
|
var TIME_MASK = "__:__";
|
|
971
1054
|
var MASK_REPLACEMENT = { _: /\d/ };
|
|
@@ -1032,9 +1115,9 @@ var calendarClassNames = {
|
|
|
1032
1115
|
};
|
|
1033
1116
|
var calendarComponents = {
|
|
1034
1117
|
Chevron: ({ orientation }) => {
|
|
1035
|
-
if (orientation === "left") return /* @__PURE__ */ (0,
|
|
1036
|
-
if (orientation === "right") return /* @__PURE__ */ (0,
|
|
1037
|
-
return /* @__PURE__ */ (0,
|
|
1118
|
+
if (orientation === "left") return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.ChevronLeft, { className: "size-4" });
|
|
1119
|
+
if (orientation === "right") return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.ChevronRight, { className: "size-4" });
|
|
1120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.ChevronDown, { className: "size-4" });
|
|
1038
1121
|
}
|
|
1039
1122
|
};
|
|
1040
1123
|
var formatMonthDropdown = (date) => date.toLocaleString("pt-BR", { month: "short" });
|
|
@@ -1119,8 +1202,8 @@ function DatePickerImpl({
|
|
|
1119
1202
|
}
|
|
1120
1203
|
};
|
|
1121
1204
|
const canApply = withTime && !!pendingDate && !!parseStrict(pendingTime, TIME_FORMAT);
|
|
1122
|
-
const trigger = /* @__PURE__ */ (0,
|
|
1123
|
-
/* @__PURE__ */ (0,
|
|
1205
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { ref: triggerRef, className: "relative", children: [
|
|
1206
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1124
1207
|
import_mask.InputMask,
|
|
1125
1208
|
{
|
|
1126
1209
|
id,
|
|
@@ -1140,7 +1223,7 @@ function DatePickerImpl({
|
|
|
1140
1223
|
className: cn(triggerInputClass, className)
|
|
1141
1224
|
}
|
|
1142
1225
|
),
|
|
1143
|
-
/* @__PURE__ */ (0,
|
|
1226
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1144
1227
|
"button",
|
|
1145
1228
|
{
|
|
1146
1229
|
type: "button",
|
|
@@ -1150,12 +1233,12 @@ function DatePickerImpl({
|
|
|
1150
1233
|
"aria-expanded": open,
|
|
1151
1234
|
onClick: () => setOpen(!open),
|
|
1152
1235
|
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",
|
|
1153
|
-
children: withTime ? /* @__PURE__ */ (0,
|
|
1236
|
+
children: withTime ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.Clock, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.CalendarIcon, { className: "h-4 w-4" })
|
|
1154
1237
|
}
|
|
1155
1238
|
)
|
|
1156
1239
|
] });
|
|
1157
|
-
const content = /* @__PURE__ */ (0,
|
|
1158
|
-
/* @__PURE__ */ (0,
|
|
1240
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: withTime ? "p-3" : "", children: [
|
|
1241
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1159
1242
|
import_react_day_picker.DayPicker,
|
|
1160
1243
|
{
|
|
1161
1244
|
mode: "single",
|
|
@@ -1173,10 +1256,10 @@ function DatePickerImpl({
|
|
|
1173
1256
|
components: calendarComponents
|
|
1174
1257
|
}
|
|
1175
1258
|
),
|
|
1176
|
-
withTime && /* @__PURE__ */ (0,
|
|
1177
|
-
/* @__PURE__ */ (0,
|
|
1178
|
-
/* @__PURE__ */ (0,
|
|
1179
|
-
/* @__PURE__ */ (0,
|
|
1259
|
+
withTime && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
1260
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "mt-2 flex items-center gap-2 border-t pt-3", children: [
|
|
1261
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-sm text-muted-foreground", children: "Hor\xE1rio" }),
|
|
1262
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1180
1263
|
import_mask.InputMask,
|
|
1181
1264
|
{
|
|
1182
1265
|
mask: TIME_MASK,
|
|
@@ -1189,7 +1272,7 @@ function DatePickerImpl({
|
|
|
1189
1272
|
}
|
|
1190
1273
|
)
|
|
1191
1274
|
] }),
|
|
1192
|
-
/* @__PURE__ */ (0,
|
|
1275
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1193
1276
|
"button",
|
|
1194
1277
|
{
|
|
1195
1278
|
type: "button",
|
|
@@ -1202,9 +1285,9 @@ function DatePickerImpl({
|
|
|
1202
1285
|
] })
|
|
1203
1286
|
] });
|
|
1204
1287
|
if (isDesktop) {
|
|
1205
|
-
return /* @__PURE__ */ (0,
|
|
1206
|
-
/* @__PURE__ */ (0,
|
|
1207
|
-
/* @__PURE__ */ (0,
|
|
1288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(PopoverPrimitive3.Root, { open, onOpenChange: setOpen, children: [
|
|
1289
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PopoverPrimitive3.Anchor, { asChild: true, children: trigger }),
|
|
1290
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PopoverPrimitive3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1208
1291
|
PopoverPrimitive3.Content,
|
|
1209
1292
|
{
|
|
1210
1293
|
align: "start",
|
|
@@ -1219,11 +1302,11 @@ function DatePickerImpl({
|
|
|
1219
1302
|
) })
|
|
1220
1303
|
] });
|
|
1221
1304
|
}
|
|
1222
|
-
return /* @__PURE__ */ (0,
|
|
1305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_vaul3.Drawer.Root, { open, onOpenChange: setOpen, children: [
|
|
1223
1306
|
trigger,
|
|
1224
|
-
/* @__PURE__ */ (0,
|
|
1225
|
-
/* @__PURE__ */ (0,
|
|
1226
|
-
/* @__PURE__ */ (0,
|
|
1307
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_vaul3.Drawer.Portal, { children: [
|
|
1308
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_vaul3.Drawer.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
1309
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1227
1310
|
import_vaul3.Drawer.Content,
|
|
1228
1311
|
{
|
|
1229
1312
|
onOpenAutoFocus: (event) => event.preventDefault(),
|
|
@@ -1232,9 +1315,9 @@ function DatePickerImpl({
|
|
|
1232
1315
|
},
|
|
1233
1316
|
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",
|
|
1234
1317
|
children: [
|
|
1235
|
-
/* @__PURE__ */ (0,
|
|
1236
|
-
/* @__PURE__ */ (0,
|
|
1237
|
-
/* @__PURE__ */ (0,
|
|
1318
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_vaul3.Drawer.Title, { className: "sr-only", children: withTime ? "Selecione a data e o hor\xE1rio" : "Selecione a data" }),
|
|
1319
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
1320
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex justify-center overflow-y-auto pb-4", children: content })
|
|
1238
1321
|
]
|
|
1239
1322
|
}
|
|
1240
1323
|
)
|
|
@@ -1242,29 +1325,29 @@ function DatePickerImpl({
|
|
|
1242
1325
|
] });
|
|
1243
1326
|
}
|
|
1244
1327
|
function DatePicker(props) {
|
|
1245
|
-
return /* @__PURE__ */ (0,
|
|
1328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DatePickerImpl, { ...props });
|
|
1246
1329
|
}
|
|
1247
1330
|
function DateTimePicker(props) {
|
|
1248
|
-
return /* @__PURE__ */ (0,
|
|
1331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DatePickerImpl, { ...props, withTime: true });
|
|
1249
1332
|
}
|
|
1250
1333
|
|
|
1251
1334
|
// src/components/empty-state.tsx
|
|
1252
|
-
var
|
|
1335
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1253
1336
|
function EmptyState({ icon, title, description, action, className }) {
|
|
1254
|
-
return /* @__PURE__ */ (0,
|
|
1255
|
-
icon && /* @__PURE__ */ (0,
|
|
1256
|
-
/* @__PURE__ */ (0,
|
|
1257
|
-
description && /* @__PURE__ */ (0,
|
|
1258
|
-
action && /* @__PURE__ */ (0,
|
|
1337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: `flex flex-col items-center justify-center py-16 text-center ${className ?? ""}`, children: [
|
|
1338
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "mb-4 text-muted-foreground", children: icon }),
|
|
1339
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h3", { className: "text-lg font-semibold tracking-tight", children: title }),
|
|
1340
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: description }),
|
|
1341
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "mt-4", children: action })
|
|
1259
1342
|
] });
|
|
1260
1343
|
}
|
|
1261
1344
|
|
|
1262
1345
|
// src/components/filter-toolbar.tsx
|
|
1263
1346
|
var PopoverPrimitive4 = __toESM(require("@radix-ui/react-popover"), 1);
|
|
1264
|
-
var
|
|
1347
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1265
1348
|
var React7 = __toESM(require("react"), 1);
|
|
1266
1349
|
var import_vaul4 = require("vaul");
|
|
1267
|
-
var
|
|
1350
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1268
1351
|
function FilterToolbar({
|
|
1269
1352
|
children,
|
|
1270
1353
|
isFilterActive = false,
|
|
@@ -1272,7 +1355,7 @@ function FilterToolbar({
|
|
|
1272
1355
|
clearLabel = "Limpar filtros",
|
|
1273
1356
|
className
|
|
1274
1357
|
}) {
|
|
1275
|
-
return /* @__PURE__ */ (0,
|
|
1358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1276
1359
|
"div",
|
|
1277
1360
|
{
|
|
1278
1361
|
className: cn(
|
|
@@ -1281,14 +1364,14 @@ function FilterToolbar({
|
|
|
1281
1364
|
),
|
|
1282
1365
|
children: [
|
|
1283
1366
|
children,
|
|
1284
|
-
isFilterActive && onClear && /* @__PURE__ */ (0,
|
|
1367
|
+
isFilterActive && onClear && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1285
1368
|
"button",
|
|
1286
1369
|
{
|
|
1287
1370
|
type: "button",
|
|
1288
1371
|
onClick: onClear,
|
|
1289
1372
|
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",
|
|
1290
1373
|
children: [
|
|
1291
|
-
/* @__PURE__ */ (0,
|
|
1374
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react8.X, { className: "h-4 w-4" }),
|
|
1292
1375
|
clearLabel
|
|
1293
1376
|
]
|
|
1294
1377
|
}
|
|
@@ -1311,7 +1394,7 @@ function FilterPopover({
|
|
|
1311
1394
|
const isDesktop = useIsDesktop();
|
|
1312
1395
|
const close = React7.useCallback(() => setOpen(false), []);
|
|
1313
1396
|
const content = typeof children === "function" ? children({ close }) : children;
|
|
1314
|
-
const trigger = /* @__PURE__ */ (0,
|
|
1397
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1315
1398
|
"button",
|
|
1316
1399
|
{
|
|
1317
1400
|
type: "button",
|
|
@@ -1321,17 +1404,17 @@ function FilterPopover({
|
|
|
1321
1404
|
active ? "border-ring/60 text-foreground" : "text-muted-foreground"
|
|
1322
1405
|
),
|
|
1323
1406
|
children: [
|
|
1324
|
-
Icon && /* @__PURE__ */ (0,
|
|
1325
|
-
/* @__PURE__ */ (0,
|
|
1326
|
-
active && badge != null && /* @__PURE__ */ (0,
|
|
1327
|
-
/* @__PURE__ */ (0,
|
|
1407
|
+
Icon && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { className: "h-4 w-4 shrink-0 opacity-70" }),
|
|
1408
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "truncate", children: label }),
|
|
1409
|
+
active && badge != null && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("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 }),
|
|
1410
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react8.ChevronDown, { className: "h-4 w-4 shrink-0 opacity-50" })
|
|
1328
1411
|
]
|
|
1329
1412
|
}
|
|
1330
1413
|
);
|
|
1331
1414
|
if (isDesktop) {
|
|
1332
|
-
return /* @__PURE__ */ (0,
|
|
1333
|
-
/* @__PURE__ */ (0,
|
|
1334
|
-
/* @__PURE__ */ (0,
|
|
1415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(PopoverPrimitive4.Root, { open, onOpenChange: setOpen, children: [
|
|
1416
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PopoverPrimitive4.Trigger, { asChild: true, children: trigger }),
|
|
1417
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PopoverPrimitive4.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1335
1418
|
PopoverPrimitive4.Content,
|
|
1336
1419
|
{
|
|
1337
1420
|
align,
|
|
@@ -1351,14 +1434,14 @@ function FilterPopover({
|
|
|
1351
1434
|
) })
|
|
1352
1435
|
] });
|
|
1353
1436
|
}
|
|
1354
|
-
return /* @__PURE__ */ (0,
|
|
1355
|
-
/* @__PURE__ */ (0,
|
|
1356
|
-
/* @__PURE__ */ (0,
|
|
1357
|
-
/* @__PURE__ */ (0,
|
|
1358
|
-
/* @__PURE__ */ (0,
|
|
1359
|
-
/* @__PURE__ */ (0,
|
|
1360
|
-
/* @__PURE__ */ (0,
|
|
1361
|
-
/* @__PURE__ */ (0,
|
|
1437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_vaul4.Drawer.Root, { open, onOpenChange: setOpen, children: [
|
|
1438
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_vaul4.Drawer.Trigger, { asChild: true, children: trigger }),
|
|
1439
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_vaul4.Drawer.Portal, { children: [
|
|
1440
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_vaul4.Drawer.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
1441
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_vaul4.Drawer.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: [
|
|
1442
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_vaul4.Drawer.Title, { className: "sr-only", children: title ?? label }),
|
|
1443
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
1444
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "overflow-y-auto p-2", children: content })
|
|
1362
1445
|
] })
|
|
1363
1446
|
] })
|
|
1364
1447
|
] });
|
|
@@ -1382,17 +1465,17 @@ function FilterOptionList({
|
|
|
1382
1465
|
selected.includes(optionValue) ? selected.filter((v) => v !== optionValue) : [...selected, optionValue]
|
|
1383
1466
|
);
|
|
1384
1467
|
};
|
|
1385
|
-
return /* @__PURE__ */ (0,
|
|
1468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col p-1", children: [
|
|
1386
1469
|
options.map((option) => {
|
|
1387
1470
|
const isChecked = selected.includes(option.value);
|
|
1388
|
-
return /* @__PURE__ */ (0,
|
|
1471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1389
1472
|
"button",
|
|
1390
1473
|
{
|
|
1391
1474
|
type: "button",
|
|
1392
1475
|
onClick: () => toggle(option.value),
|
|
1393
1476
|
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",
|
|
1394
1477
|
children: [
|
|
1395
|
-
option.dotClassName && /* @__PURE__ */ (0,
|
|
1478
|
+
option.dotClassName && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1396
1479
|
"span",
|
|
1397
1480
|
{
|
|
1398
1481
|
className: cn(
|
|
@@ -1401,14 +1484,14 @@ function FilterOptionList({
|
|
|
1401
1484
|
)
|
|
1402
1485
|
}
|
|
1403
1486
|
),
|
|
1404
|
-
/* @__PURE__ */ (0,
|
|
1405
|
-
isChecked && /* @__PURE__ */ (0,
|
|
1487
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "flex-1 truncate", children: option.label }),
|
|
1488
|
+
isChecked && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full bg-primary" })
|
|
1406
1489
|
]
|
|
1407
1490
|
},
|
|
1408
1491
|
option.value
|
|
1409
1492
|
);
|
|
1410
1493
|
}),
|
|
1411
|
-
clearable && hasSelection && /* @__PURE__ */ (0,
|
|
1494
|
+
clearable && hasSelection && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1412
1495
|
"button",
|
|
1413
1496
|
{
|
|
1414
1497
|
type: "button",
|
|
@@ -1421,7 +1504,7 @@ function FilterOptionList({
|
|
|
1421
1504
|
}
|
|
1422
1505
|
|
|
1423
1506
|
// src/components/form-dialog.tsx
|
|
1424
|
-
var
|
|
1507
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1425
1508
|
function FormDialogLayout({
|
|
1426
1509
|
title,
|
|
1427
1510
|
children,
|
|
@@ -1432,11 +1515,11 @@ function FormDialogLayout({
|
|
|
1432
1515
|
isSubmitting = false,
|
|
1433
1516
|
isDisabled = false
|
|
1434
1517
|
}) {
|
|
1435
|
-
return /* @__PURE__ */ (0,
|
|
1436
|
-
/* @__PURE__ */ (0,
|
|
1437
|
-
/* @__PURE__ */ (0,
|
|
1438
|
-
/* @__PURE__ */ (0,
|
|
1439
|
-
/* @__PURE__ */ (0,
|
|
1518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("form", { onSubmit, children: [
|
|
1519
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex flex-col space-y-1.5 text-center sm:text-left", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h2", { className: "text-lg font-semibold leading-none tracking-tight", children: title }) }),
|
|
1520
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "space-y-4 py-4", children }),
|
|
1521
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", children: [
|
|
1522
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1440
1523
|
"button",
|
|
1441
1524
|
{
|
|
1442
1525
|
type: "button",
|
|
@@ -1445,7 +1528,7 @@ function FormDialogLayout({
|
|
|
1445
1528
|
children: cancelLabel
|
|
1446
1529
|
}
|
|
1447
1530
|
),
|
|
1448
|
-
/* @__PURE__ */ (0,
|
|
1531
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1449
1532
|
"button",
|
|
1450
1533
|
{
|
|
1451
1534
|
type: "submit",
|
|
@@ -1458,18 +1541,18 @@ function FormDialogLayout({
|
|
|
1458
1541
|
] });
|
|
1459
1542
|
}
|
|
1460
1543
|
function FormDialog({ onSubmit, ...rest }) {
|
|
1461
|
-
return /* @__PURE__ */ (0,
|
|
1544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1462
1545
|
BaseDialog,
|
|
1463
1546
|
{
|
|
1464
1547
|
...rest,
|
|
1465
|
-
contentWrapper: onSubmit ? (content) => /* @__PURE__ */ (0,
|
|
1548
|
+
contentWrapper: onSubmit ? (content) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("form", { onSubmit, className: "flex min-h-0 flex-1 flex-col", children: content }) : void 0
|
|
1466
1549
|
}
|
|
1467
1550
|
);
|
|
1468
1551
|
}
|
|
1469
1552
|
|
|
1470
1553
|
// src/components/form-field.tsx
|
|
1471
1554
|
var import_react4 = require("react");
|
|
1472
|
-
var
|
|
1555
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1473
1556
|
function FormField({ label, htmlFor, error, required, children, className }) {
|
|
1474
1557
|
const errorId = (0, import_react4.useId)();
|
|
1475
1558
|
const field = error && (0, import_react4.isValidElement)(children) ? (0, import_react4.cloneElement)(children, {
|
|
@@ -1479,26 +1562,26 @@ function FormField({ label, htmlFor, error, required, children, className }) {
|
|
|
1479
1562
|
errorId
|
|
1480
1563
|
].filter(Boolean).join(" ")
|
|
1481
1564
|
}) : children;
|
|
1482
|
-
return /* @__PURE__ */ (0,
|
|
1483
|
-
/* @__PURE__ */ (0,
|
|
1565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: `space-y-2 ${className ?? ""}`, children: [
|
|
1566
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1484
1567
|
"label",
|
|
1485
1568
|
{
|
|
1486
1569
|
htmlFor,
|
|
1487
|
-
className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
1570
|
+
className: "block text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
1488
1571
|
children: [
|
|
1489
1572
|
label,
|
|
1490
|
-
required && /* @__PURE__ */ (0,
|
|
1573
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "ml-1 text-destructive", children: "*" })
|
|
1491
1574
|
]
|
|
1492
1575
|
}
|
|
1493
1576
|
),
|
|
1494
1577
|
field,
|
|
1495
|
-
error && /* @__PURE__ */ (0,
|
|
1578
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { id: errorId, className: "text-sm text-destructive", children: error })
|
|
1496
1579
|
] });
|
|
1497
1580
|
}
|
|
1498
1581
|
|
|
1499
1582
|
// src/components/mobile-card-list.tsx
|
|
1500
1583
|
var import_react5 = require("react");
|
|
1501
|
-
var
|
|
1584
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1502
1585
|
var SCROLL_THRESHOLD = 8;
|
|
1503
1586
|
function MobileCardList({
|
|
1504
1587
|
data,
|
|
@@ -1529,26 +1612,26 @@ function MobileCardList({
|
|
|
1529
1612
|
}
|
|
1530
1613
|
};
|
|
1531
1614
|
if (isLoading) {
|
|
1532
|
-
return /* @__PURE__ */ (0,
|
|
1533
|
-
/* @__PURE__ */ (0,
|
|
1534
|
-
/* @__PURE__ */ (0,
|
|
1535
|
-
/* @__PURE__ */ (0,
|
|
1615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: `space-y-3 ${className ?? ""}`, children: Array.from({ length: loadingCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "rounded-xl border p-4", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "space-y-3", children: [
|
|
1616
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex justify-between", children: [
|
|
1617
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-5 w-32 animate-pulse rounded bg-muted" }),
|
|
1618
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-5 w-16 animate-pulse rounded bg-muted" })
|
|
1536
1619
|
] }),
|
|
1537
|
-
/* @__PURE__ */ (0,
|
|
1538
|
-
/* @__PURE__ */ (0,
|
|
1539
|
-
/* @__PURE__ */ (0,
|
|
1540
|
-
/* @__PURE__ */ (0,
|
|
1620
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-4 w-48 animate-pulse rounded bg-muted" }),
|
|
1621
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex justify-between", children: [
|
|
1622
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
|
|
1623
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-4 w-20 animate-pulse rounded bg-muted" })
|
|
1541
1624
|
] })
|
|
1542
1625
|
] }) }, i)) });
|
|
1543
1626
|
}
|
|
1544
|
-
return /* @__PURE__ */ (0,
|
|
1627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1545
1628
|
"div",
|
|
1546
1629
|
{
|
|
1547
1630
|
className: `space-y-3 ${className ?? ""}`,
|
|
1548
1631
|
onTouchStart,
|
|
1549
1632
|
onTouchMove,
|
|
1550
1633
|
onClickCapture,
|
|
1551
|
-
children: data.map((item, index) => /* @__PURE__ */ (0,
|
|
1634
|
+
children: data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1552
1635
|
"div",
|
|
1553
1636
|
{
|
|
1554
1637
|
className: "rounded-xl border p-4 transition-all duration-150 hover:border-foreground/20 active:scale-[0.99]",
|
|
@@ -1562,7 +1645,7 @@ function MobileCardList({
|
|
|
1562
1645
|
|
|
1563
1646
|
// src/components/mode-toggle.tsx
|
|
1564
1647
|
var DropdownMenu2 = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
1565
|
-
var
|
|
1648
|
+
var import_lucide_react9 = require("lucide-react");
|
|
1566
1649
|
|
|
1567
1650
|
// src/components/theme-provider.tsx
|
|
1568
1651
|
var import_react6 = require("react");
|
|
@@ -1593,7 +1676,7 @@ function applyCompanyTheme(root, companyTheme, mode) {
|
|
|
1593
1676
|
}
|
|
1594
1677
|
|
|
1595
1678
|
// src/components/theme-provider.tsx
|
|
1596
|
-
var
|
|
1679
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1597
1680
|
var initialState = {
|
|
1598
1681
|
theme: "system",
|
|
1599
1682
|
setTheme: () => null
|
|
@@ -1632,7 +1715,7 @@ function ThemeProvider({
|
|
|
1632
1715
|
setTheme(theme2);
|
|
1633
1716
|
}
|
|
1634
1717
|
};
|
|
1635
|
-
return /* @__PURE__ */ (0,
|
|
1718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ThemeProviderContext.Provider, { ...props, value, children });
|
|
1636
1719
|
}
|
|
1637
1720
|
function useTheme() {
|
|
1638
1721
|
const context = (0, import_react6.useContext)(ThemeProviderContext);
|
|
@@ -1643,57 +1726,57 @@ function useTheme() {
|
|
|
1643
1726
|
}
|
|
1644
1727
|
|
|
1645
1728
|
// src/components/mode-toggle.tsx
|
|
1646
|
-
var
|
|
1729
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1647
1730
|
function ModeToggle() {
|
|
1648
1731
|
const { setTheme } = useTheme();
|
|
1649
|
-
return /* @__PURE__ */ (0,
|
|
1650
|
-
/* @__PURE__ */ (0,
|
|
1732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(DropdownMenu2.Root, { children: [
|
|
1733
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1651
1734
|
"button",
|
|
1652
1735
|
{
|
|
1653
1736
|
type: "button",
|
|
1654
1737
|
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",
|
|
1655
1738
|
"aria-label": "Alternar tema",
|
|
1656
1739
|
children: [
|
|
1657
|
-
/* @__PURE__ */ (0,
|
|
1658
|
-
/* @__PURE__ */ (0,
|
|
1740
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react9.Sun, { className: "h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
|
|
1741
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react9.Moon, { className: "absolute inset-0 m-auto h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" })
|
|
1659
1742
|
]
|
|
1660
1743
|
}
|
|
1661
1744
|
) }),
|
|
1662
|
-
/* @__PURE__ */ (0,
|
|
1745
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DropdownMenu2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1663
1746
|
DropdownMenu2.Content,
|
|
1664
1747
|
{
|
|
1665
1748
|
align: "end",
|
|
1666
1749
|
className: "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",
|
|
1667
1750
|
children: [
|
|
1668
|
-
/* @__PURE__ */ (0,
|
|
1751
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1669
1752
|
DropdownMenu2.Item,
|
|
1670
1753
|
{
|
|
1671
1754
|
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",
|
|
1672
1755
|
onClick: () => setTheme("light"),
|
|
1673
1756
|
children: [
|
|
1674
|
-
/* @__PURE__ */ (0,
|
|
1757
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react9.Sun, { className: "h-4 w-4" }),
|
|
1675
1758
|
" Claro"
|
|
1676
1759
|
]
|
|
1677
1760
|
}
|
|
1678
1761
|
),
|
|
1679
|
-
/* @__PURE__ */ (0,
|
|
1762
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1680
1763
|
DropdownMenu2.Item,
|
|
1681
1764
|
{
|
|
1682
1765
|
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",
|
|
1683
1766
|
onClick: () => setTheme("dark"),
|
|
1684
1767
|
children: [
|
|
1685
|
-
/* @__PURE__ */ (0,
|
|
1768
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react9.Moon, { className: "h-4 w-4" }),
|
|
1686
1769
|
" Escuro"
|
|
1687
1770
|
]
|
|
1688
1771
|
}
|
|
1689
1772
|
),
|
|
1690
|
-
/* @__PURE__ */ (0,
|
|
1773
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1691
1774
|
DropdownMenu2.Item,
|
|
1692
1775
|
{
|
|
1693
1776
|
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",
|
|
1694
1777
|
onClick: () => setTheme("system"),
|
|
1695
1778
|
children: [
|
|
1696
|
-
/* @__PURE__ */ (0,
|
|
1779
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react9.Monitor, { className: "h-4 w-4" }),
|
|
1697
1780
|
" Sistema"
|
|
1698
1781
|
]
|
|
1699
1782
|
}
|
|
@@ -1707,10 +1790,10 @@ function ModeToggle() {
|
|
|
1707
1790
|
// src/components/multi-combobox.tsx
|
|
1708
1791
|
var PopoverPrimitive5 = __toESM(require("@radix-ui/react-popover"), 1);
|
|
1709
1792
|
var import_cmdk2 = require("cmdk");
|
|
1710
|
-
var
|
|
1793
|
+
var import_lucide_react10 = require("lucide-react");
|
|
1711
1794
|
var React8 = __toESM(require("react"), 1);
|
|
1712
1795
|
var import_vaul5 = require("vaul");
|
|
1713
|
-
var
|
|
1796
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1714
1797
|
function MultiCombobox({
|
|
1715
1798
|
options,
|
|
1716
1799
|
value,
|
|
@@ -1751,7 +1834,7 @@ function MultiCombobox({
|
|
|
1751
1834
|
const removeValue = (optionValue) => {
|
|
1752
1835
|
onChange(value.filter((v) => v !== optionValue));
|
|
1753
1836
|
};
|
|
1754
|
-
const trigger = /* @__PURE__ */ (0,
|
|
1837
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1755
1838
|
"div",
|
|
1756
1839
|
{
|
|
1757
1840
|
id,
|
|
@@ -1773,13 +1856,13 @@ function MultiCombobox({
|
|
|
1773
1856
|
className
|
|
1774
1857
|
),
|
|
1775
1858
|
children: [
|
|
1776
|
-
selected.length === 0 ? /* @__PURE__ */ (0,
|
|
1859
|
+
selected.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-muted-foreground", children: placeholder }) : selected.map((option) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1777
1860
|
"span",
|
|
1778
1861
|
{
|
|
1779
1862
|
className: "inline-flex items-center gap-1 rounded bg-secondary px-1.5 py-0.5 text-xs text-secondary-foreground",
|
|
1780
1863
|
children: [
|
|
1781
1864
|
option.label,
|
|
1782
|
-
/* @__PURE__ */ (0,
|
|
1865
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1783
1866
|
"button",
|
|
1784
1867
|
{
|
|
1785
1868
|
type: "button",
|
|
@@ -1791,26 +1874,26 @@ function MultiCombobox({
|
|
|
1791
1874
|
},
|
|
1792
1875
|
onPointerDown: (event) => event.stopPropagation(),
|
|
1793
1876
|
className: "rounded-sm opacity-60 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1794
|
-
children: /* @__PURE__ */ (0,
|
|
1877
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react10.X, { className: "h-3 w-3" })
|
|
1795
1878
|
}
|
|
1796
1879
|
)
|
|
1797
1880
|
]
|
|
1798
1881
|
},
|
|
1799
1882
|
option.value
|
|
1800
1883
|
)),
|
|
1801
|
-
/* @__PURE__ */ (0,
|
|
1884
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react10.ChevronsUpDown, { className: "ml-auto h-4 w-4 shrink-0 opacity-50" })
|
|
1802
1885
|
]
|
|
1803
1886
|
}
|
|
1804
1887
|
);
|
|
1805
|
-
const command = /* @__PURE__ */ (0,
|
|
1888
|
+
const command = /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1806
1889
|
import_cmdk2.Command,
|
|
1807
1890
|
{
|
|
1808
1891
|
shouldFilter: !isServer,
|
|
1809
1892
|
className: "flex h-full w-full flex-col overflow-hidden",
|
|
1810
1893
|
children: [
|
|
1811
|
-
/* @__PURE__ */ (0,
|
|
1812
|
-
/* @__PURE__ */ (0,
|
|
1813
|
-
/* @__PURE__ */ (0,
|
|
1894
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center border-b px-3", children: [
|
|
1895
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react10.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
1896
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1814
1897
|
import_cmdk2.Command.Input,
|
|
1815
1898
|
{
|
|
1816
1899
|
placeholder: searchPlaceholder,
|
|
@@ -1819,14 +1902,14 @@ function MultiCombobox({
|
|
|
1819
1902
|
}
|
|
1820
1903
|
)
|
|
1821
1904
|
] }),
|
|
1822
|
-
/* @__PURE__ */ (0,
|
|
1905
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1823
1906
|
import_cmdk2.Command.List,
|
|
1824
1907
|
{
|
|
1825
1908
|
ref: listRef,
|
|
1826
1909
|
className: "max-h-[50vh] overflow-y-auto overflow-x-hidden p-1 sm:max-h-60",
|
|
1827
1910
|
children: [
|
|
1828
|
-
!isServer && /* @__PURE__ */ (0,
|
|
1829
|
-
options.map((option) => /* @__PURE__ */ (0,
|
|
1911
|
+
!isServer && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_cmdk2.Command.Empty, { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }),
|
|
1912
|
+
options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1830
1913
|
import_cmdk2.Command.Item,
|
|
1831
1914
|
{
|
|
1832
1915
|
value: isServer ? option.value : option.label,
|
|
@@ -1834,8 +1917,8 @@ function MultiCombobox({
|
|
|
1834
1917
|
onSelect: () => toggleValue(option.value),
|
|
1835
1918
|
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",
|
|
1836
1919
|
children: [
|
|
1837
|
-
/* @__PURE__ */ (0,
|
|
1838
|
-
|
|
1920
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1921
|
+
import_lucide_react10.Check,
|
|
1839
1922
|
{
|
|
1840
1923
|
className: cn(
|
|
1841
1924
|
"h-4 w-4 shrink-0",
|
|
@@ -1843,14 +1926,14 @@ function MultiCombobox({
|
|
|
1843
1926
|
)
|
|
1844
1927
|
}
|
|
1845
1928
|
),
|
|
1846
|
-
/* @__PURE__ */ (0,
|
|
1929
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "truncate", children: option.label })
|
|
1847
1930
|
]
|
|
1848
1931
|
},
|
|
1849
1932
|
option.value
|
|
1850
1933
|
)),
|
|
1851
|
-
isServer && !loading && options.length === 0 && /* @__PURE__ */ (0,
|
|
1852
|
-
isServer && loading && /* @__PURE__ */ (0,
|
|
1853
|
-
isServer && hasMore && /* @__PURE__ */ (0,
|
|
1934
|
+
isServer && !loading && options.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }),
|
|
1935
|
+
isServer && loading && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex items-center justify-center py-6", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react10.Loader2, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }),
|
|
1936
|
+
isServer && hasMore && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { ref: sentinelRef, "aria-hidden": true, className: "h-1" })
|
|
1854
1937
|
]
|
|
1855
1938
|
}
|
|
1856
1939
|
)
|
|
@@ -1858,9 +1941,9 @@ function MultiCombobox({
|
|
|
1858
1941
|
}
|
|
1859
1942
|
);
|
|
1860
1943
|
if (isDesktop) {
|
|
1861
|
-
return /* @__PURE__ */ (0,
|
|
1862
|
-
/* @__PURE__ */ (0,
|
|
1863
|
-
/* @__PURE__ */ (0,
|
|
1944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(PopoverPrimitive5.Root, { open, onOpenChange: setOpen, children: [
|
|
1945
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PopoverPrimitive5.Trigger, { asChild: true, disabled, children: trigger }),
|
|
1946
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PopoverPrimitive5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1864
1947
|
PopoverPrimitive5.Content,
|
|
1865
1948
|
{
|
|
1866
1949
|
align: "start",
|
|
@@ -1872,13 +1955,13 @@ function MultiCombobox({
|
|
|
1872
1955
|
) })
|
|
1873
1956
|
] });
|
|
1874
1957
|
}
|
|
1875
|
-
return /* @__PURE__ */ (0,
|
|
1876
|
-
/* @__PURE__ */ (0,
|
|
1877
|
-
/* @__PURE__ */ (0,
|
|
1878
|
-
/* @__PURE__ */ (0,
|
|
1879
|
-
/* @__PURE__ */ (0,
|
|
1880
|
-
/* @__PURE__ */ (0,
|
|
1881
|
-
/* @__PURE__ */ (0,
|
|
1958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_vaul5.Drawer.Root, { open, onOpenChange: setOpen, children: [
|
|
1959
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_vaul5.Drawer.Trigger, { asChild: true, disabled, children: trigger }),
|
|
1960
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_vaul5.Drawer.Portal, { children: [
|
|
1961
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_vaul5.Drawer.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
1962
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_vaul5.Drawer.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: [
|
|
1963
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_vaul5.Drawer.Title, { className: "sr-only", children: placeholder }),
|
|
1964
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
1882
1965
|
command
|
|
1883
1966
|
] })
|
|
1884
1967
|
] })
|
|
@@ -1886,25 +1969,25 @@ function MultiCombobox({
|
|
|
1886
1969
|
}
|
|
1887
1970
|
|
|
1888
1971
|
// src/components/page-header.tsx
|
|
1889
|
-
var
|
|
1972
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1890
1973
|
function PageHeader({ title, description, action, className }) {
|
|
1891
|
-
return /* @__PURE__ */ (0,
|
|
1974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1892
1975
|
"div",
|
|
1893
1976
|
{
|
|
1894
1977
|
className: `flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between ${className ?? ""}`,
|
|
1895
1978
|
children: [
|
|
1896
|
-
/* @__PURE__ */ (0,
|
|
1897
|
-
/* @__PURE__ */ (0,
|
|
1898
|
-
description && /* @__PURE__ */ (0,
|
|
1979
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "min-w-0", children: [
|
|
1980
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h1", { className: "truncate text-2xl font-semibold tracking-tight", children: title }),
|
|
1981
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-sm text-muted-foreground", children: description })
|
|
1899
1982
|
] }),
|
|
1900
|
-
action && /* @__PURE__ */ (0,
|
|
1983
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "shrink-0", children: action })
|
|
1901
1984
|
]
|
|
1902
1985
|
}
|
|
1903
1986
|
);
|
|
1904
1987
|
}
|
|
1905
1988
|
|
|
1906
1989
|
// src/components/pagination.tsx
|
|
1907
|
-
var
|
|
1990
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1908
1991
|
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";
|
|
1909
1992
|
function Pagination({
|
|
1910
1993
|
page,
|
|
@@ -1918,26 +2001,26 @@ function Pagination({
|
|
|
1918
2001
|
pageSizeOptions,
|
|
1919
2002
|
className
|
|
1920
2003
|
}) {
|
|
1921
|
-
return /* @__PURE__ */ (0,
|
|
2004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1922
2005
|
"div",
|
|
1923
2006
|
{
|
|
1924
2007
|
className: `flex items-center ${showPageSizeSelector ? "justify-between" : "justify-end"} gap-4 ${className ?? ""}`,
|
|
1925
2008
|
children: [
|
|
1926
|
-
showPageSizeSelector && /* @__PURE__ */ (0,
|
|
1927
|
-
/* @__PURE__ */ (0,
|
|
1928
|
-
/* @__PURE__ */ (0,
|
|
2009
|
+
showPageSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
2010
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { htmlFor: "pagination-page-size", className: "text-sm text-muted-foreground", children: "Itens por p\xE1gina" }),
|
|
2011
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1929
2012
|
"select",
|
|
1930
2013
|
{
|
|
1931
2014
|
id: "pagination-page-size",
|
|
1932
2015
|
value: pageSize,
|
|
1933
2016
|
onChange: (e) => onPageSizeChange?.(Number(e.target.value)),
|
|
1934
2017
|
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",
|
|
1935
|
-
children: (pageSizeOptions ?? []).map((size) => /* @__PURE__ */ (0,
|
|
2018
|
+
children: (pageSizeOptions ?? []).map((size) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: size, children: size }, size))
|
|
1936
2019
|
}
|
|
1937
2020
|
)
|
|
1938
2021
|
] }),
|
|
1939
|
-
/* @__PURE__ */ (0,
|
|
1940
|
-
/* @__PURE__ */ (0,
|
|
2022
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
2023
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1941
2024
|
"button",
|
|
1942
2025
|
{
|
|
1943
2026
|
type: "button",
|
|
@@ -1947,12 +2030,12 @@ function Pagination({
|
|
|
1947
2030
|
children: "Anterior"
|
|
1948
2031
|
}
|
|
1949
2032
|
),
|
|
1950
|
-
/* @__PURE__ */ (0,
|
|
2033
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "text-sm text-muted-foreground", children: [
|
|
1951
2034
|
"P\xE1gina ",
|
|
1952
2035
|
page,
|
|
1953
2036
|
totalPages ? ` de ${totalPages}` : ""
|
|
1954
2037
|
] }),
|
|
1955
|
-
/* @__PURE__ */ (0,
|
|
2038
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1956
2039
|
"button",
|
|
1957
2040
|
{
|
|
1958
2041
|
type: "button",
|
|
@@ -1969,13 +2052,13 @@ function Pagination({
|
|
|
1969
2052
|
}
|
|
1970
2053
|
|
|
1971
2054
|
// src/components/password-input.tsx
|
|
1972
|
-
var
|
|
2055
|
+
var import_lucide_react11 = require("lucide-react");
|
|
1973
2056
|
var React9 = __toESM(require("react"), 1);
|
|
1974
|
-
var
|
|
2057
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1975
2058
|
var PasswordInput = React9.forwardRef(({ containerClassName, className, ...props }, ref) => {
|
|
1976
2059
|
const [visible, setVisible] = React9.useState(false);
|
|
1977
|
-
return /* @__PURE__ */ (0,
|
|
1978
|
-
/* @__PURE__ */ (0,
|
|
2060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: `relative ${containerClassName ?? ""}`, children: [
|
|
2061
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1979
2062
|
"input",
|
|
1980
2063
|
{
|
|
1981
2064
|
ref,
|
|
@@ -1984,7 +2067,7 @@ var PasswordInput = React9.forwardRef(({ containerClassName, className, ...props
|
|
|
1984
2067
|
...props
|
|
1985
2068
|
}
|
|
1986
2069
|
),
|
|
1987
|
-
/* @__PURE__ */ (0,
|
|
2070
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1988
2071
|
"button",
|
|
1989
2072
|
{
|
|
1990
2073
|
type: "button",
|
|
@@ -1992,7 +2075,7 @@ var PasswordInput = React9.forwardRef(({ containerClassName, className, ...props
|
|
|
1992
2075
|
"aria-label": visible ? "Ocultar senha" : "Mostrar senha",
|
|
1993
2076
|
tabIndex: -1,
|
|
1994
2077
|
className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground",
|
|
1995
|
-
children: visible ? /* @__PURE__ */ (0,
|
|
2078
|
+
children: visible ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react11.EyeOff, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react11.Eye, { className: "h-4 w-4" })
|
|
1996
2079
|
}
|
|
1997
2080
|
)
|
|
1998
2081
|
] });
|
|
@@ -2000,8 +2083,8 @@ var PasswordInput = React9.forwardRef(({ containerClassName, className, ...props
|
|
|
2000
2083
|
PasswordInput.displayName = "PasswordInput";
|
|
2001
2084
|
|
|
2002
2085
|
// src/components/progress-bar.tsx
|
|
2003
|
-
var
|
|
2004
|
-
var
|
|
2086
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2087
|
+
var sizeClasses3 = {
|
|
2005
2088
|
sm: "h-1.5",
|
|
2006
2089
|
md: "h-2"
|
|
2007
2090
|
};
|
|
@@ -2014,16 +2097,16 @@ function ProgressBar({
|
|
|
2014
2097
|
indicatorClassName
|
|
2015
2098
|
}) {
|
|
2016
2099
|
const clamped = Math.min(100, Math.max(0, value));
|
|
2017
|
-
return /* @__PURE__ */ (0,
|
|
2018
|
-
(label || valueLabel) && /* @__PURE__ */ (0,
|
|
2019
|
-
label && /* @__PURE__ */ (0,
|
|
2020
|
-
valueLabel && /* @__PURE__ */ (0,
|
|
2100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: `space-y-1.5 ${className ?? ""}`, children: [
|
|
2101
|
+
(label || valueLabel) && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-baseline justify-between gap-2", children: [
|
|
2102
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-sm text-muted-foreground", children: label }),
|
|
2103
|
+
valueLabel && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-sm font-semibold", children: valueLabel })
|
|
2021
2104
|
] }),
|
|
2022
|
-
/* @__PURE__ */ (0,
|
|
2105
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2023
2106
|
"div",
|
|
2024
2107
|
{
|
|
2025
|
-
className: `w-full overflow-hidden rounded-full bg-muted ${
|
|
2026
|
-
children: /* @__PURE__ */ (0,
|
|
2108
|
+
className: `w-full overflow-hidden rounded-full bg-muted ${sizeClasses3[size]}`,
|
|
2109
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2027
2110
|
"div",
|
|
2028
2111
|
{
|
|
2029
2112
|
className: `h-full rounded-full transition-all duration-300 ${indicatorClassName ?? "bg-primary"}`,
|
|
@@ -2036,7 +2119,7 @@ function ProgressBar({
|
|
|
2036
2119
|
}
|
|
2037
2120
|
|
|
2038
2121
|
// src/components/responsive-data-view.tsx
|
|
2039
|
-
var
|
|
2122
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2040
2123
|
function ResponsiveDataView({
|
|
2041
2124
|
table,
|
|
2042
2125
|
cards,
|
|
@@ -2047,13 +2130,13 @@ function ResponsiveDataView({
|
|
|
2047
2130
|
emptyDescription,
|
|
2048
2131
|
pagination
|
|
2049
2132
|
}) {
|
|
2050
|
-
return /* @__PURE__ */ (0,
|
|
2051
|
-
/* @__PURE__ */ (0,
|
|
2052
|
-
/* @__PURE__ */ (0,
|
|
2053
|
-
!isLoading && isEmpty && /* @__PURE__ */ (0,
|
|
2054
|
-
emptyIcon && /* @__PURE__ */ (0,
|
|
2055
|
-
/* @__PURE__ */ (0,
|
|
2056
|
-
emptyDescription && /* @__PURE__ */ (0,
|
|
2133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-4", children: [
|
|
2134
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "hidden overflow-x-auto rounded-md border md:block", children: table }),
|
|
2135
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "md:hidden", children: cards }),
|
|
2136
|
+
!isLoading && isEmpty && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
|
|
2137
|
+
emptyIcon && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "mb-4 text-muted-foreground", children: emptyIcon }),
|
|
2138
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h3", { className: "text-lg font-semibold tracking-tight", children: emptyTitle }),
|
|
2139
|
+
emptyDescription && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: emptyDescription })
|
|
2057
2140
|
] }),
|
|
2058
2141
|
pagination
|
|
2059
2142
|
] });
|
|
@@ -2061,10 +2144,10 @@ function ResponsiveDataView({
|
|
|
2061
2144
|
|
|
2062
2145
|
// src/components/row-actions-menu.tsx
|
|
2063
2146
|
var DropdownMenu3 = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
2064
|
-
var
|
|
2147
|
+
var import_lucide_react12 = require("lucide-react");
|
|
2065
2148
|
var import_react7 = require("react");
|
|
2066
2149
|
var import_vaul6 = require("vaul");
|
|
2067
|
-
var
|
|
2150
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2068
2151
|
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";
|
|
2069
2152
|
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";
|
|
2070
2153
|
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";
|
|
@@ -2078,20 +2161,20 @@ function RowActionsMenu({
|
|
|
2078
2161
|
const isDesktop = useIsDesktop();
|
|
2079
2162
|
const [open, setOpen] = (0, import_react7.useState)(false);
|
|
2080
2163
|
if (actions.length === 0) return null;
|
|
2081
|
-
const trigger = /* @__PURE__ */ (0,
|
|
2164
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2082
2165
|
"button",
|
|
2083
2166
|
{
|
|
2084
2167
|
type: "button",
|
|
2085
2168
|
disabled,
|
|
2086
2169
|
"aria-label": label,
|
|
2087
2170
|
className: triggerClass,
|
|
2088
|
-
children: /* @__PURE__ */ (0,
|
|
2171
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react12.MoreVertical, { className: "h-4 w-4" })
|
|
2089
2172
|
}
|
|
2090
2173
|
);
|
|
2091
2174
|
if (isDesktop) {
|
|
2092
|
-
return /* @__PURE__ */ (0,
|
|
2093
|
-
/* @__PURE__ */ (0,
|
|
2094
|
-
/* @__PURE__ */ (0,
|
|
2175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DropdownMenu3.Root, { open, onOpenChange: setOpen, modal: false, children: [
|
|
2176
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DropdownMenu3.Trigger, { asChild: true, children: trigger }),
|
|
2177
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DropdownMenu3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2095
2178
|
DropdownMenu3.Content,
|
|
2096
2179
|
{
|
|
2097
2180
|
align,
|
|
@@ -2102,7 +2185,7 @@ function RowActionsMenu({
|
|
|
2102
2185
|
itemClass2,
|
|
2103
2186
|
action.destructive && "text-destructive focus:bg-destructive/10"
|
|
2104
2187
|
);
|
|
2105
|
-
return action.href ? /* @__PURE__ */ (0,
|
|
2188
|
+
return action.href ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2106
2189
|
DropdownMenu3.Item,
|
|
2107
2190
|
{
|
|
2108
2191
|
asChild: true,
|
|
@@ -2110,14 +2193,14 @@ function RowActionsMenu({
|
|
|
2110
2193
|
children: renderLink({
|
|
2111
2194
|
href: action.href,
|
|
2112
2195
|
className: cls,
|
|
2113
|
-
children: /* @__PURE__ */ (0,
|
|
2196
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
2114
2197
|
action.icon,
|
|
2115
2198
|
action.label
|
|
2116
2199
|
] })
|
|
2117
2200
|
})
|
|
2118
2201
|
},
|
|
2119
2202
|
action.label
|
|
2120
|
-
) : /* @__PURE__ */ (0,
|
|
2203
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2121
2204
|
DropdownMenu3.Item,
|
|
2122
2205
|
{
|
|
2123
2206
|
className: cls,
|
|
@@ -2135,23 +2218,23 @@ function RowActionsMenu({
|
|
|
2135
2218
|
) })
|
|
2136
2219
|
] });
|
|
2137
2220
|
}
|
|
2138
|
-
return /* @__PURE__ */ (0,
|
|
2139
|
-
/* @__PURE__ */ (0,
|
|
2140
|
-
/* @__PURE__ */ (0,
|
|
2141
|
-
/* @__PURE__ */ (0,
|
|
2142
|
-
/* @__PURE__ */ (0,
|
|
2143
|
-
/* @__PURE__ */ (0,
|
|
2144
|
-
/* @__PURE__ */ (0,
|
|
2221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_vaul6.Drawer.Root, { open, onOpenChange: setOpen, children: [
|
|
2222
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_vaul6.Drawer.Trigger, { asChild: true, children: trigger }),
|
|
2223
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_vaul6.Drawer.Portal, { children: [
|
|
2224
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_vaul6.Drawer.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
2225
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_vaul6.Drawer.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: [
|
|
2226
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_vaul6.Drawer.Title, { className: "sr-only", children: label }),
|
|
2227
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
2145
2228
|
actions.map((action) => {
|
|
2146
2229
|
const cls = cn(
|
|
2147
2230
|
sheetItemClass2,
|
|
2148
2231
|
action.destructive && "text-destructive"
|
|
2149
2232
|
);
|
|
2150
|
-
const inner = /* @__PURE__ */ (0,
|
|
2233
|
+
const inner = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
2151
2234
|
action.icon,
|
|
2152
2235
|
action.label
|
|
2153
2236
|
] });
|
|
2154
|
-
return action.href ? /* @__PURE__ */ (0,
|
|
2237
|
+
return action.href ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2155
2238
|
"span",
|
|
2156
2239
|
{
|
|
2157
2240
|
onClick: () => setOpen(false),
|
|
@@ -2163,7 +2246,7 @@ function RowActionsMenu({
|
|
|
2163
2246
|
})
|
|
2164
2247
|
},
|
|
2165
2248
|
action.label
|
|
2166
|
-
) : /* @__PURE__ */ (0,
|
|
2249
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2167
2250
|
"button",
|
|
2168
2251
|
{
|
|
2169
2252
|
type: "button",
|
|
@@ -2185,11 +2268,11 @@ function RowActionsMenu({
|
|
|
2185
2268
|
|
|
2186
2269
|
// src/components/search-input.tsx
|
|
2187
2270
|
var React10 = __toESM(require("react"), 1);
|
|
2188
|
-
var
|
|
2271
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2189
2272
|
var SearchInput = React10.forwardRef(
|
|
2190
2273
|
({ containerClassName, className, ...props }, ref) => {
|
|
2191
|
-
return /* @__PURE__ */ (0,
|
|
2192
|
-
/* @__PURE__ */ (0,
|
|
2274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: cn("relative flex-1", containerClassName), children: [
|
|
2275
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2193
2276
|
"svg",
|
|
2194
2277
|
{
|
|
2195
2278
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2204,12 +2287,12 @@ var SearchInput = React10.forwardRef(
|
|
|
2204
2287
|
"aria-hidden": "true",
|
|
2205
2288
|
className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground",
|
|
2206
2289
|
children: [
|
|
2207
|
-
/* @__PURE__ */ (0,
|
|
2208
|
-
/* @__PURE__ */ (0,
|
|
2290
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
|
|
2291
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("path", { d: "m21 21-4.3-4.3" })
|
|
2209
2292
|
]
|
|
2210
2293
|
}
|
|
2211
2294
|
),
|
|
2212
|
-
/* @__PURE__ */ (0,
|
|
2295
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2213
2296
|
"input",
|
|
2214
2297
|
{
|
|
2215
2298
|
ref,
|
|
@@ -2227,30 +2310,30 @@ var SearchInput = React10.forwardRef(
|
|
|
2227
2310
|
SearchInput.displayName = "SearchInput";
|
|
2228
2311
|
|
|
2229
2312
|
// src/components/stat-card.tsx
|
|
2230
|
-
var
|
|
2313
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2231
2314
|
function StatCard({ label, value, detail, icon, isLoading }) {
|
|
2232
2315
|
if (isLoading) {
|
|
2233
|
-
return /* @__PURE__ */ (0,
|
|
2234
|
-
/* @__PURE__ */ (0,
|
|
2235
|
-
/* @__PURE__ */ (0,
|
|
2236
|
-
/* @__PURE__ */ (0,
|
|
2316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "rounded-lg border bg-card p-6 shadow-sm", children: [
|
|
2317
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center justify-between pb-2", children: [
|
|
2318
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
|
|
2319
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "h-4 w-4 animate-pulse rounded bg-muted" })
|
|
2237
2320
|
] }),
|
|
2238
|
-
/* @__PURE__ */ (0,
|
|
2239
|
-
/* @__PURE__ */ (0,
|
|
2321
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "mt-2 h-7 w-16 animate-pulse rounded bg-muted" }),
|
|
2322
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "mt-1 h-4 w-20 animate-pulse rounded bg-muted" })
|
|
2240
2323
|
] });
|
|
2241
2324
|
}
|
|
2242
|
-
return /* @__PURE__ */ (0,
|
|
2243
|
-
/* @__PURE__ */ (0,
|
|
2244
|
-
/* @__PURE__ */ (0,
|
|
2245
|
-
icon && /* @__PURE__ */ (0,
|
|
2325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "rounded-lg border bg-card p-6 shadow-sm", children: [
|
|
2326
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center justify-between pb-2", children: [
|
|
2327
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-sm font-medium text-muted-foreground", children: label }),
|
|
2328
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-muted-foreground", children: icon })
|
|
2246
2329
|
] }),
|
|
2247
|
-
/* @__PURE__ */ (0,
|
|
2248
|
-
detail && /* @__PURE__ */ (0,
|
|
2330
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "text-2xl font-bold", children: value }),
|
|
2331
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-xs text-muted-foreground", children: detail })
|
|
2249
2332
|
] });
|
|
2250
2333
|
}
|
|
2251
2334
|
|
|
2252
2335
|
// src/components/status-badge.tsx
|
|
2253
|
-
var
|
|
2336
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2254
2337
|
var variantClasses = {
|
|
2255
2338
|
neutral: {
|
|
2256
2339
|
badge: "bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300",
|
|
@@ -2280,12 +2363,12 @@ function StatusBadge({
|
|
|
2280
2363
|
children
|
|
2281
2364
|
}) {
|
|
2282
2365
|
const classes = variantClasses[variant];
|
|
2283
|
-
return /* @__PURE__ */ (0,
|
|
2366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2284
2367
|
"span",
|
|
2285
2368
|
{
|
|
2286
2369
|
className: `inline-flex items-center gap-1.5 rounded-md px-2 py-0.5 text-xs font-medium ${classes.badge} ${className ?? ""}`,
|
|
2287
2370
|
children: [
|
|
2288
|
-
dot && /* @__PURE__ */ (0,
|
|
2371
|
+
dot && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2289
2372
|
"span",
|
|
2290
2373
|
{
|
|
2291
2374
|
className: `inline-block h-1.5 w-1.5 shrink-0 rounded-full ${classes.dot}`
|
|
@@ -2298,31 +2381,31 @@ function StatusBadge({
|
|
|
2298
2381
|
}
|
|
2299
2382
|
|
|
2300
2383
|
// src/components/status-dot.tsx
|
|
2301
|
-
var
|
|
2384
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2302
2385
|
function StatusDot({ active, label, className }) {
|
|
2303
|
-
return /* @__PURE__ */ (0,
|
|
2304
|
-
/* @__PURE__ */ (0,
|
|
2386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: `inline-flex items-center gap-2 ${className ?? ""}`, children: [
|
|
2387
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2305
2388
|
"span",
|
|
2306
2389
|
{
|
|
2307
2390
|
className: `h-2 w-2 rounded-full ${active ? "bg-green-500" : "bg-red-500"}`
|
|
2308
2391
|
}
|
|
2309
2392
|
),
|
|
2310
|
-
label && /* @__PURE__ */ (0,
|
|
2393
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: label })
|
|
2311
2394
|
] });
|
|
2312
2395
|
}
|
|
2313
2396
|
|
|
2314
2397
|
// src/components/table-skeleton.tsx
|
|
2315
|
-
var
|
|
2398
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2316
2399
|
function TableSkeleton({ rows = 5, columns = 4 }) {
|
|
2317
|
-
return /* @__PURE__ */ (0,
|
|
2400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, { children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("tr", { className: "border-b transition-colors", children: Array.from({ length: columns }).map((_2, j) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("td", { className: "p-4 align-middle", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "h-5 w-full animate-pulse rounded bg-muted" }) }, j)) }, i)) });
|
|
2318
2401
|
}
|
|
2319
2402
|
|
|
2320
2403
|
// src/components/toaster.tsx
|
|
2321
2404
|
var import_sonner = require("sonner");
|
|
2322
|
-
var
|
|
2405
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2323
2406
|
function Toaster(props) {
|
|
2324
2407
|
const { theme = "system" } = useTheme();
|
|
2325
|
-
return /* @__PURE__ */ (0,
|
|
2408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2326
2409
|
import_sonner.Toaster,
|
|
2327
2410
|
{
|
|
2328
2411
|
theme,
|
|
@@ -2447,6 +2530,7 @@ function extractApiError(err, fallbackMessage = "Ocorreu um erro inesperado.") {
|
|
|
2447
2530
|
Pagination,
|
|
2448
2531
|
PasswordInput,
|
|
2449
2532
|
ProgressBar,
|
|
2533
|
+
Rating,
|
|
2450
2534
|
ResponsiveDataView,
|
|
2451
2535
|
RowActionsMenu,
|
|
2452
2536
|
SearchInput,
|