@motor-hero/ui-kit 0.51.1 → 0.52.0
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.map +1 -1
- package/dist/index.cjs +30 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +148 -129
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/rating.tsx +30 -13
package/dist/index.js
CHANGED
|
@@ -600,15 +600,16 @@ function ColorPicker({
|
|
|
600
600
|
// src/components/rating.tsx
|
|
601
601
|
import * as ToggleGroup from "@radix-ui/react-toggle-group";
|
|
602
602
|
import { Star } from "lucide-react";
|
|
603
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
603
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
604
604
|
var MAX_STARS = 5;
|
|
605
605
|
var sizeClasses2 = {
|
|
606
606
|
sm: "h-4 w-4",
|
|
607
607
|
md: "h-5 w-5",
|
|
608
608
|
lg: "h-6 w-6"
|
|
609
609
|
};
|
|
610
|
+
var formatNote = (value) => value.toLocaleString("pt-BR", { maximumFractionDigits: 1 });
|
|
610
611
|
function defaultLabel(value) {
|
|
611
|
-
return value > 0 ? `
|
|
612
|
+
return value > 0 ? `Nota ${formatNote(value)} de ${MAX_STARS}` : "Avalia\xE7\xE3o: sem nota";
|
|
612
613
|
}
|
|
613
614
|
function Rating({
|
|
614
615
|
value = 0,
|
|
@@ -627,17 +628,35 @@ function Rating({
|
|
|
627
628
|
role: "img",
|
|
628
629
|
"aria-label": label,
|
|
629
630
|
className: cn("inline-flex items-center gap-0.5", className),
|
|
630
|
-
children: Array.from({ length: MAX_STARS }, (_, index) =>
|
|
631
|
-
|
|
632
|
-
{
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
631
|
+
children: Array.from({ length: MAX_STARS }, (_, index) => {
|
|
632
|
+
const fill = Math.min(1, Math.max(0, clamped - index));
|
|
633
|
+
return /* @__PURE__ */ jsxs7("span", { className: "relative inline-flex", children: [
|
|
634
|
+
/* @__PURE__ */ jsx8(
|
|
635
|
+
Star,
|
|
636
|
+
{
|
|
637
|
+
"aria-hidden": true,
|
|
638
|
+
className: cn(sizeClasses2[size], "text-muted-foreground")
|
|
639
|
+
}
|
|
640
|
+
),
|
|
641
|
+
fill > 0 && /* @__PURE__ */ jsx8(
|
|
642
|
+
"span",
|
|
643
|
+
{
|
|
644
|
+
className: "absolute inset-y-0 left-0 overflow-hidden",
|
|
645
|
+
style: { width: `${fill * 100}%` },
|
|
646
|
+
children: /* @__PURE__ */ jsx8(
|
|
647
|
+
Star,
|
|
648
|
+
{
|
|
649
|
+
"aria-hidden": true,
|
|
650
|
+
className: cn(
|
|
651
|
+
sizeClasses2[size],
|
|
652
|
+
"max-w-none fill-amber-400 text-amber-400"
|
|
653
|
+
)
|
|
654
|
+
}
|
|
655
|
+
)
|
|
656
|
+
}
|
|
637
657
|
)
|
|
638
|
-
},
|
|
639
|
-
|
|
640
|
-
))
|
|
658
|
+
] }, index);
|
|
659
|
+
})
|
|
641
660
|
}
|
|
642
661
|
);
|
|
643
662
|
}
|
|
@@ -726,7 +745,7 @@ function useInfiniteScrollSentinel({
|
|
|
726
745
|
}
|
|
727
746
|
|
|
728
747
|
// src/components/combobox.tsx
|
|
729
|
-
import { jsx as jsx9, jsxs as
|
|
748
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
730
749
|
function Combobox({
|
|
731
750
|
options,
|
|
732
751
|
value,
|
|
@@ -784,7 +803,7 @@ function Combobox({
|
|
|
784
803
|
loading,
|
|
785
804
|
onLoadMore
|
|
786
805
|
});
|
|
787
|
-
const trigger = /* @__PURE__ */
|
|
806
|
+
const trigger = /* @__PURE__ */ jsxs8(
|
|
788
807
|
"button",
|
|
789
808
|
{
|
|
790
809
|
type: "button",
|
|
@@ -811,14 +830,14 @@ function Combobox({
|
|
|
811
830
|
]
|
|
812
831
|
}
|
|
813
832
|
);
|
|
814
|
-
const command = /* @__PURE__ */
|
|
833
|
+
const command = /* @__PURE__ */ jsxs8(
|
|
815
834
|
CommandPrimitive,
|
|
816
835
|
{
|
|
817
836
|
shouldFilter: !isServer,
|
|
818
837
|
filter: filterByKeywords,
|
|
819
838
|
className: "flex h-full w-full flex-col overflow-hidden",
|
|
820
839
|
children: [
|
|
821
|
-
/* @__PURE__ */
|
|
840
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center border-b px-3", children: [
|
|
822
841
|
/* @__PURE__ */ jsx9(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
823
842
|
/* @__PURE__ */ jsx9(
|
|
824
843
|
CommandPrimitive.Input,
|
|
@@ -829,14 +848,14 @@ function Combobox({
|
|
|
829
848
|
}
|
|
830
849
|
)
|
|
831
850
|
] }),
|
|
832
|
-
/* @__PURE__ */
|
|
851
|
+
/* @__PURE__ */ jsxs8(
|
|
833
852
|
CommandPrimitive.List,
|
|
834
853
|
{
|
|
835
854
|
ref: listRef,
|
|
836
855
|
className: "max-h-[50dvh] overflow-y-auto overflow-x-hidden p-1 sm:max-h-60",
|
|
837
856
|
children: [
|
|
838
857
|
!isServer && !showCreate && /* @__PURE__ */ jsx9(CommandPrimitive.Empty, { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }),
|
|
839
|
-
showCreate && /* @__PURE__ */
|
|
858
|
+
showCreate && /* @__PURE__ */ jsxs8(
|
|
840
859
|
CommandPrimitive.Item,
|
|
841
860
|
{
|
|
842
861
|
value: trimmedSearch,
|
|
@@ -851,7 +870,7 @@ function Combobox({
|
|
|
851
870
|
]
|
|
852
871
|
}
|
|
853
872
|
),
|
|
854
|
-
options.map((option) => /* @__PURE__ */
|
|
873
|
+
options.map((option) => /* @__PURE__ */ jsxs8(
|
|
855
874
|
CommandPrimitive.Item,
|
|
856
875
|
{
|
|
857
876
|
value: option.value,
|
|
@@ -885,7 +904,7 @@ function Combobox({
|
|
|
885
904
|
}
|
|
886
905
|
);
|
|
887
906
|
if (isDesktop) {
|
|
888
|
-
return /* @__PURE__ */
|
|
907
|
+
return /* @__PURE__ */ jsxs8(PopoverPrimitive2.Root, { open, onOpenChange: handleOpenChange, children: [
|
|
889
908
|
/* @__PURE__ */ jsx9(PopoverPrimitive2.Trigger, { asChild: true, children: trigger }),
|
|
890
909
|
/* @__PURE__ */ jsx9(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx9(
|
|
891
910
|
PopoverPrimitive2.Content,
|
|
@@ -899,11 +918,11 @@ function Combobox({
|
|
|
899
918
|
) })
|
|
900
919
|
] });
|
|
901
920
|
}
|
|
902
|
-
return /* @__PURE__ */
|
|
921
|
+
return /* @__PURE__ */ jsxs8(DrawerPrimitive2.Root, { open, onOpenChange: handleOpenChange, children: [
|
|
903
922
|
/* @__PURE__ */ jsx9(DrawerPrimitive2.Trigger, { asChild: true, children: trigger }),
|
|
904
|
-
/* @__PURE__ */
|
|
923
|
+
/* @__PURE__ */ jsxs8(DrawerPrimitive2.Portal, { children: [
|
|
905
924
|
/* @__PURE__ */ jsx9(DrawerPrimitive2.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
906
|
-
/* @__PURE__ */
|
|
925
|
+
/* @__PURE__ */ jsxs8(DrawerPrimitive2.Content, { className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85dvh] flex-col rounded-t-2xl border bg-popover text-popover-foreground outline-none", children: [
|
|
907
926
|
/* @__PURE__ */ jsx9(DrawerPrimitive2.Title, { className: "sr-only", children: placeholder }),
|
|
908
927
|
/* @__PURE__ */ jsx9("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
909
928
|
command
|
|
@@ -916,7 +935,7 @@ var optionKeywords = (option) => option.description ? [option.label, option.desc
|
|
|
916
935
|
function OptionText({ option }) {
|
|
917
936
|
if (!option.description)
|
|
918
937
|
return /* @__PURE__ */ jsx9("span", { className: "truncate", children: option.label });
|
|
919
|
-
return /* @__PURE__ */
|
|
938
|
+
return /* @__PURE__ */ jsxs8("span", { className: "flex min-w-0 flex-col", children: [
|
|
920
939
|
/* @__PURE__ */ jsx9("span", { className: "truncate", children: option.label }),
|
|
921
940
|
/* @__PURE__ */ jsx9(
|
|
922
941
|
"span",
|
|
@@ -931,7 +950,7 @@ function OptionText({ option }) {
|
|
|
931
950
|
|
|
932
951
|
// src/components/confirm-dialog.tsx
|
|
933
952
|
import * as AlertDialog from "@radix-ui/react-alert-dialog";
|
|
934
|
-
import { jsx as jsx10, jsxs as
|
|
953
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
935
954
|
function ConfirmDialog({
|
|
936
955
|
open,
|
|
937
956
|
onOpenChange,
|
|
@@ -945,7 +964,7 @@ function ConfirmDialog({
|
|
|
945
964
|
blurBackdrop = true,
|
|
946
965
|
backdropClassName
|
|
947
966
|
}) {
|
|
948
|
-
return /* @__PURE__ */ jsx10(AlertDialog.Root, { open, onOpenChange, children: /* @__PURE__ */
|
|
967
|
+
return /* @__PURE__ */ jsx10(AlertDialog.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs9(AlertDialog.Portal, { children: [
|
|
949
968
|
/* @__PURE__ */ jsx10(
|
|
950
969
|
AlertDialog.Overlay,
|
|
951
970
|
{
|
|
@@ -956,12 +975,12 @@ function ConfirmDialog({
|
|
|
956
975
|
)
|
|
957
976
|
}
|
|
958
977
|
),
|
|
959
|
-
/* @__PURE__ */
|
|
960
|
-
/* @__PURE__ */
|
|
978
|
+
/* @__PURE__ */ jsxs9(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: [
|
|
979
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex flex-col space-y-2 text-center sm:text-left", children: [
|
|
961
980
|
/* @__PURE__ */ jsx10(AlertDialog.Title, { className: "text-lg font-semibold", children: title }),
|
|
962
981
|
/* @__PURE__ */ jsx10(AlertDialog.Description, { className: "text-sm text-muted-foreground", children: description })
|
|
963
982
|
] }),
|
|
964
|
-
/* @__PURE__ */
|
|
983
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", children: [
|
|
965
984
|
/* @__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 }),
|
|
966
985
|
/* @__PURE__ */ jsx10(
|
|
967
986
|
AlertDialog.Action,
|
|
@@ -978,7 +997,7 @@ function ConfirmDialog({
|
|
|
978
997
|
}
|
|
979
998
|
|
|
980
999
|
// src/components/data-table-wrapper.tsx
|
|
981
|
-
import { jsx as jsx11, jsxs as
|
|
1000
|
+
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
982
1001
|
function DataTableWrapper({
|
|
983
1002
|
children,
|
|
984
1003
|
isEmpty,
|
|
@@ -991,14 +1010,14 @@ function DataTableWrapper({
|
|
|
991
1010
|
hasNextPage = false,
|
|
992
1011
|
hasPreviousPage = false
|
|
993
1012
|
}) {
|
|
994
|
-
return /* @__PURE__ */
|
|
1013
|
+
return /* @__PURE__ */ jsxs10("div", { className: "space-y-4", children: [
|
|
995
1014
|
/* @__PURE__ */ jsx11("div", { className: "overflow-x-auto rounded-md border", children }),
|
|
996
|
-
!isLoading && isEmpty && /* @__PURE__ */
|
|
1015
|
+
!isLoading && isEmpty && /* @__PURE__ */ jsxs10("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
|
|
997
1016
|
emptyIcon && /* @__PURE__ */ jsx11("div", { className: "mb-4 text-muted-foreground", children: emptyIcon }),
|
|
998
1017
|
/* @__PURE__ */ jsx11("h3", { className: "text-lg font-semibold tracking-tight", children: emptyTitle }),
|
|
999
1018
|
emptyDescription && /* @__PURE__ */ jsx11("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: emptyDescription })
|
|
1000
1019
|
] }),
|
|
1001
|
-
page !== void 0 && onPageChange && /* @__PURE__ */
|
|
1020
|
+
page !== void 0 && onPageChange && /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-end gap-4", children: [
|
|
1002
1021
|
/* @__PURE__ */ jsx11(
|
|
1003
1022
|
"button",
|
|
1004
1023
|
{
|
|
@@ -1009,7 +1028,7 @@ function DataTableWrapper({
|
|
|
1009
1028
|
children: "Anterior"
|
|
1010
1029
|
}
|
|
1011
1030
|
),
|
|
1012
|
-
/* @__PURE__ */
|
|
1031
|
+
/* @__PURE__ */ jsxs10("span", { className: "text-sm text-muted-foreground", children: [
|
|
1013
1032
|
"P\xE1gina ",
|
|
1014
1033
|
page
|
|
1015
1034
|
] }),
|
|
@@ -1036,7 +1055,7 @@ import { CalendarIcon, ChevronDown, ChevronLeft as ChevronLeft2, ChevronRight as
|
|
|
1036
1055
|
import * as React6 from "react";
|
|
1037
1056
|
import { DayPicker } from "react-day-picker";
|
|
1038
1057
|
import { Drawer as DrawerPrimitive3 } from "vaul";
|
|
1039
|
-
import { Fragment as Fragment5, jsx as jsx12, jsxs as
|
|
1058
|
+
import { Fragment as Fragment5, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1040
1059
|
var DATE_MASK = "__/__/____";
|
|
1041
1060
|
var TIME_MASK = "__:__";
|
|
1042
1061
|
var MASK_REPLACEMENT = { _: /\d/ };
|
|
@@ -1191,7 +1210,7 @@ function DatePickerImpl({
|
|
|
1191
1210
|
}
|
|
1192
1211
|
};
|
|
1193
1212
|
const canApply = withTime && !!pendingDate && !!parseStrict(pendingTime, TIME_FORMAT);
|
|
1194
|
-
const trigger = /* @__PURE__ */
|
|
1213
|
+
const trigger = /* @__PURE__ */ jsxs11("div", { ref: triggerRef, className: "relative", children: [
|
|
1195
1214
|
/* @__PURE__ */ jsx12(
|
|
1196
1215
|
InputMask,
|
|
1197
1216
|
{
|
|
@@ -1226,7 +1245,7 @@ function DatePickerImpl({
|
|
|
1226
1245
|
}
|
|
1227
1246
|
)
|
|
1228
1247
|
] });
|
|
1229
|
-
const content = /* @__PURE__ */
|
|
1248
|
+
const content = /* @__PURE__ */ jsxs11("div", { className: withTime ? "p-3" : "", children: [
|
|
1230
1249
|
/* @__PURE__ */ jsx12(
|
|
1231
1250
|
DayPicker,
|
|
1232
1251
|
{
|
|
@@ -1245,8 +1264,8 @@ function DatePickerImpl({
|
|
|
1245
1264
|
components: calendarComponents
|
|
1246
1265
|
}
|
|
1247
1266
|
),
|
|
1248
|
-
withTime && /* @__PURE__ */
|
|
1249
|
-
/* @__PURE__ */
|
|
1267
|
+
withTime && /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
1268
|
+
/* @__PURE__ */ jsxs11("div", { className: "mt-2 flex items-center gap-2 border-t pt-3", children: [
|
|
1250
1269
|
/* @__PURE__ */ jsx12("span", { className: "text-sm text-muted-foreground", children: "Hor\xE1rio" }),
|
|
1251
1270
|
/* @__PURE__ */ jsx12(
|
|
1252
1271
|
InputMask,
|
|
@@ -1274,7 +1293,7 @@ function DatePickerImpl({
|
|
|
1274
1293
|
] })
|
|
1275
1294
|
] });
|
|
1276
1295
|
if (isDesktop) {
|
|
1277
|
-
return /* @__PURE__ */
|
|
1296
|
+
return /* @__PURE__ */ jsxs11(PopoverPrimitive3.Root, { open, onOpenChange: setOpen, children: [
|
|
1278
1297
|
/* @__PURE__ */ jsx12(PopoverPrimitive3.Anchor, { asChild: true, children: trigger }),
|
|
1279
1298
|
/* @__PURE__ */ jsx12(PopoverPrimitive3.Portal, { children: /* @__PURE__ */ jsx12(
|
|
1280
1299
|
PopoverPrimitive3.Content,
|
|
@@ -1291,11 +1310,11 @@ function DatePickerImpl({
|
|
|
1291
1310
|
) })
|
|
1292
1311
|
] });
|
|
1293
1312
|
}
|
|
1294
|
-
return /* @__PURE__ */
|
|
1313
|
+
return /* @__PURE__ */ jsxs11(DrawerPrimitive3.Root, { open, onOpenChange: setOpen, children: [
|
|
1295
1314
|
trigger,
|
|
1296
|
-
/* @__PURE__ */
|
|
1315
|
+
/* @__PURE__ */ jsxs11(DrawerPrimitive3.Portal, { children: [
|
|
1297
1316
|
/* @__PURE__ */ jsx12(DrawerPrimitive3.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
1298
|
-
/* @__PURE__ */
|
|
1317
|
+
/* @__PURE__ */ jsxs11(
|
|
1299
1318
|
DrawerPrimitive3.Content,
|
|
1300
1319
|
{
|
|
1301
1320
|
onOpenAutoFocus: (event) => event.preventDefault(),
|
|
@@ -1321,9 +1340,9 @@ function DateTimePicker(props) {
|
|
|
1321
1340
|
}
|
|
1322
1341
|
|
|
1323
1342
|
// src/components/empty-state.tsx
|
|
1324
|
-
import { jsx as jsx13, jsxs as
|
|
1343
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1325
1344
|
function EmptyState({ icon, title, description, action, className }) {
|
|
1326
|
-
return /* @__PURE__ */
|
|
1345
|
+
return /* @__PURE__ */ jsxs12("div", { className: `flex flex-col items-center justify-center py-16 text-center ${className ?? ""}`, children: [
|
|
1327
1346
|
icon && /* @__PURE__ */ jsx13("div", { className: "mb-4 text-muted-foreground", children: icon }),
|
|
1328
1347
|
/* @__PURE__ */ jsx13("h3", { className: "text-lg font-semibold tracking-tight", children: title }),
|
|
1329
1348
|
description && /* @__PURE__ */ jsx13("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: description }),
|
|
@@ -1336,7 +1355,7 @@ import * as PopoverPrimitive4 from "@radix-ui/react-popover";
|
|
|
1336
1355
|
import { ChevronDown as ChevronDown2, X as X3 } from "lucide-react";
|
|
1337
1356
|
import * as React7 from "react";
|
|
1338
1357
|
import { Drawer as DrawerPrimitive4 } from "vaul";
|
|
1339
|
-
import { jsx as jsx14, jsxs as
|
|
1358
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1340
1359
|
function FilterToolbar({
|
|
1341
1360
|
children,
|
|
1342
1361
|
isFilterActive = false,
|
|
@@ -1344,7 +1363,7 @@ function FilterToolbar({
|
|
|
1344
1363
|
clearLabel = "Limpar filtros",
|
|
1345
1364
|
className
|
|
1346
1365
|
}) {
|
|
1347
|
-
return /* @__PURE__ */
|
|
1366
|
+
return /* @__PURE__ */ jsxs13(
|
|
1348
1367
|
"div",
|
|
1349
1368
|
{
|
|
1350
1369
|
className: cn(
|
|
@@ -1353,7 +1372,7 @@ function FilterToolbar({
|
|
|
1353
1372
|
),
|
|
1354
1373
|
children: [
|
|
1355
1374
|
children,
|
|
1356
|
-
isFilterActive && onClear && /* @__PURE__ */
|
|
1375
|
+
isFilterActive && onClear && /* @__PURE__ */ jsxs13(
|
|
1357
1376
|
"button",
|
|
1358
1377
|
{
|
|
1359
1378
|
type: "button",
|
|
@@ -1383,7 +1402,7 @@ function FilterPopover({
|
|
|
1383
1402
|
const isDesktop = useIsDesktop();
|
|
1384
1403
|
const close = React7.useCallback(() => setOpen(false), []);
|
|
1385
1404
|
const content = typeof children === "function" ? children({ close }) : children;
|
|
1386
|
-
const trigger = /* @__PURE__ */
|
|
1405
|
+
const trigger = /* @__PURE__ */ jsxs13(
|
|
1387
1406
|
"button",
|
|
1388
1407
|
{
|
|
1389
1408
|
type: "button",
|
|
@@ -1401,7 +1420,7 @@ function FilterPopover({
|
|
|
1401
1420
|
}
|
|
1402
1421
|
);
|
|
1403
1422
|
if (isDesktop) {
|
|
1404
|
-
return /* @__PURE__ */
|
|
1423
|
+
return /* @__PURE__ */ jsxs13(PopoverPrimitive4.Root, { open, onOpenChange: setOpen, children: [
|
|
1405
1424
|
/* @__PURE__ */ jsx14(PopoverPrimitive4.Trigger, { asChild: true, children: trigger }),
|
|
1406
1425
|
/* @__PURE__ */ jsx14(PopoverPrimitive4.Portal, { children: /* @__PURE__ */ jsx14(
|
|
1407
1426
|
PopoverPrimitive4.Content,
|
|
@@ -1423,11 +1442,11 @@ function FilterPopover({
|
|
|
1423
1442
|
) })
|
|
1424
1443
|
] });
|
|
1425
1444
|
}
|
|
1426
|
-
return /* @__PURE__ */
|
|
1445
|
+
return /* @__PURE__ */ jsxs13(DrawerPrimitive4.Root, { open, onOpenChange: setOpen, children: [
|
|
1427
1446
|
/* @__PURE__ */ jsx14(DrawerPrimitive4.Trigger, { asChild: true, children: trigger }),
|
|
1428
|
-
/* @__PURE__ */
|
|
1447
|
+
/* @__PURE__ */ jsxs13(DrawerPrimitive4.Portal, { children: [
|
|
1429
1448
|
/* @__PURE__ */ jsx14(DrawerPrimitive4.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
1430
|
-
/* @__PURE__ */
|
|
1449
|
+
/* @__PURE__ */ jsxs13(DrawerPrimitive4.Content, { className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85dvh] flex-col rounded-t-2xl border bg-popover text-popover-foreground outline-none", children: [
|
|
1431
1450
|
/* @__PURE__ */ jsx14(DrawerPrimitive4.Title, { className: "sr-only", children: title ?? label }),
|
|
1432
1451
|
/* @__PURE__ */ jsx14("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
1433
1452
|
/* @__PURE__ */ jsx14("div", { className: "overflow-y-auto p-2", children: content })
|
|
@@ -1454,10 +1473,10 @@ function FilterOptionList({
|
|
|
1454
1473
|
selected.includes(optionValue) ? selected.filter((v) => v !== optionValue) : [...selected, optionValue]
|
|
1455
1474
|
);
|
|
1456
1475
|
};
|
|
1457
|
-
return /* @__PURE__ */
|
|
1476
|
+
return /* @__PURE__ */ jsxs13("div", { className: "flex flex-col p-1", children: [
|
|
1458
1477
|
options.map((option) => {
|
|
1459
1478
|
const isChecked = selected.includes(option.value);
|
|
1460
|
-
return /* @__PURE__ */
|
|
1479
|
+
return /* @__PURE__ */ jsxs13(
|
|
1461
1480
|
"button",
|
|
1462
1481
|
{
|
|
1463
1482
|
type: "button",
|
|
@@ -1493,7 +1512,7 @@ function FilterOptionList({
|
|
|
1493
1512
|
}
|
|
1494
1513
|
|
|
1495
1514
|
// src/components/form-dialog.tsx
|
|
1496
|
-
import { jsx as jsx15, jsxs as
|
|
1515
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1497
1516
|
function FormDialogLayout({
|
|
1498
1517
|
title,
|
|
1499
1518
|
children,
|
|
@@ -1504,10 +1523,10 @@ function FormDialogLayout({
|
|
|
1504
1523
|
isSubmitting = false,
|
|
1505
1524
|
isDisabled = false
|
|
1506
1525
|
}) {
|
|
1507
|
-
return /* @__PURE__ */
|
|
1526
|
+
return /* @__PURE__ */ jsxs14("form", { onSubmit, children: [
|
|
1508
1527
|
/* @__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 }) }),
|
|
1509
1528
|
/* @__PURE__ */ jsx15("div", { className: "space-y-4 py-4", children }),
|
|
1510
|
-
/* @__PURE__ */
|
|
1529
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", children: [
|
|
1511
1530
|
/* @__PURE__ */ jsx15(
|
|
1512
1531
|
"button",
|
|
1513
1532
|
{
|
|
@@ -1545,7 +1564,7 @@ function FormDialog({ onSubmit, ...rest }) {
|
|
|
1545
1564
|
|
|
1546
1565
|
// src/components/form-field.tsx
|
|
1547
1566
|
import { cloneElement, isValidElement, useId } from "react";
|
|
1548
|
-
import { jsx as jsx16, jsxs as
|
|
1567
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1549
1568
|
function FormField({ label, htmlFor, error, required, children, className }) {
|
|
1550
1569
|
const errorId = useId();
|
|
1551
1570
|
const field = error && isValidElement(children) ? cloneElement(children, {
|
|
@@ -1555,8 +1574,8 @@ function FormField({ label, htmlFor, error, required, children, className }) {
|
|
|
1555
1574
|
errorId
|
|
1556
1575
|
].filter(Boolean).join(" ")
|
|
1557
1576
|
}) : children;
|
|
1558
|
-
return /* @__PURE__ */
|
|
1559
|
-
/* @__PURE__ */
|
|
1577
|
+
return /* @__PURE__ */ jsxs15("div", { className: `space-y-2 ${className ?? ""}`, children: [
|
|
1578
|
+
/* @__PURE__ */ jsxs15(
|
|
1560
1579
|
"label",
|
|
1561
1580
|
{
|
|
1562
1581
|
htmlFor,
|
|
@@ -1599,7 +1618,7 @@ function HighlightPill({
|
|
|
1599
1618
|
|
|
1600
1619
|
// src/components/mobile-card-list.tsx
|
|
1601
1620
|
import { useRef as useRef4 } from "react";
|
|
1602
|
-
import { jsx as jsx18, jsxs as
|
|
1621
|
+
import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1603
1622
|
var SCROLL_THRESHOLD = 8;
|
|
1604
1623
|
function MobileCardList({
|
|
1605
1624
|
data,
|
|
@@ -1630,13 +1649,13 @@ function MobileCardList({
|
|
|
1630
1649
|
}
|
|
1631
1650
|
};
|
|
1632
1651
|
if (isLoading) {
|
|
1633
|
-
return /* @__PURE__ */ jsx18("div", { className: `space-y-3 ${className ?? ""}`, children: Array.from({ length: loadingCount }).map((_, i) => /* @__PURE__ */ jsx18("div", { className: "rounded-xl border p-4", children: /* @__PURE__ */
|
|
1634
|
-
/* @__PURE__ */
|
|
1652
|
+
return /* @__PURE__ */ jsx18("div", { className: `space-y-3 ${className ?? ""}`, children: Array.from({ length: loadingCount }).map((_, i) => /* @__PURE__ */ jsx18("div", { className: "rounded-xl border p-4", children: /* @__PURE__ */ jsxs16("div", { className: "space-y-3", children: [
|
|
1653
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex justify-between", children: [
|
|
1635
1654
|
/* @__PURE__ */ jsx18("div", { className: "h-5 w-32 animate-pulse rounded bg-muted" }),
|
|
1636
1655
|
/* @__PURE__ */ jsx18("div", { className: "h-5 w-16 animate-pulse rounded bg-muted" })
|
|
1637
1656
|
] }),
|
|
1638
1657
|
/* @__PURE__ */ jsx18("div", { className: "h-4 w-48 animate-pulse rounded bg-muted" }),
|
|
1639
|
-
/* @__PURE__ */
|
|
1658
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex justify-between", children: [
|
|
1640
1659
|
/* @__PURE__ */ jsx18("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
|
|
1641
1660
|
/* @__PURE__ */ jsx18("div", { className: "h-4 w-20 animate-pulse rounded bg-muted" })
|
|
1642
1661
|
] })
|
|
@@ -1744,11 +1763,11 @@ function useTheme() {
|
|
|
1744
1763
|
}
|
|
1745
1764
|
|
|
1746
1765
|
// src/components/mode-toggle.tsx
|
|
1747
|
-
import { jsx as jsx20, jsxs as
|
|
1766
|
+
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1748
1767
|
function ModeToggle() {
|
|
1749
1768
|
const { setTheme } = useTheme();
|
|
1750
|
-
return /* @__PURE__ */
|
|
1751
|
-
/* @__PURE__ */ jsx20(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */
|
|
1769
|
+
return /* @__PURE__ */ jsxs17(DropdownMenu2.Root, { children: [
|
|
1770
|
+
/* @__PURE__ */ jsx20(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs17(
|
|
1752
1771
|
"button",
|
|
1753
1772
|
{
|
|
1754
1773
|
type: "button",
|
|
@@ -1760,13 +1779,13 @@ function ModeToggle() {
|
|
|
1760
1779
|
]
|
|
1761
1780
|
}
|
|
1762
1781
|
) }),
|
|
1763
|
-
/* @__PURE__ */ jsx20(DropdownMenu2.Portal, { children: /* @__PURE__ */
|
|
1782
|
+
/* @__PURE__ */ jsx20(DropdownMenu2.Portal, { children: /* @__PURE__ */ jsxs17(
|
|
1764
1783
|
DropdownMenu2.Content,
|
|
1765
1784
|
{
|
|
1766
1785
|
align: "end",
|
|
1767
1786
|
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",
|
|
1768
1787
|
children: [
|
|
1769
|
-
/* @__PURE__ */
|
|
1788
|
+
/* @__PURE__ */ jsxs17(
|
|
1770
1789
|
DropdownMenu2.Item,
|
|
1771
1790
|
{
|
|
1772
1791
|
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",
|
|
@@ -1777,7 +1796,7 @@ function ModeToggle() {
|
|
|
1777
1796
|
]
|
|
1778
1797
|
}
|
|
1779
1798
|
),
|
|
1780
|
-
/* @__PURE__ */
|
|
1799
|
+
/* @__PURE__ */ jsxs17(
|
|
1781
1800
|
DropdownMenu2.Item,
|
|
1782
1801
|
{
|
|
1783
1802
|
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",
|
|
@@ -1788,7 +1807,7 @@ function ModeToggle() {
|
|
|
1788
1807
|
]
|
|
1789
1808
|
}
|
|
1790
1809
|
),
|
|
1791
|
-
/* @__PURE__ */
|
|
1810
|
+
/* @__PURE__ */ jsxs17(
|
|
1792
1811
|
DropdownMenu2.Item,
|
|
1793
1812
|
{
|
|
1794
1813
|
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",
|
|
@@ -1811,7 +1830,7 @@ import { Command as CommandPrimitive2 } from "cmdk";
|
|
|
1811
1830
|
import { Check as Check2, ChevronsUpDown as ChevronsUpDown3, Loader2 as Loader22, Search as Search2, X as X4 } from "lucide-react";
|
|
1812
1831
|
import * as React8 from "react";
|
|
1813
1832
|
import { Drawer as DrawerPrimitive5 } from "vaul";
|
|
1814
|
-
import { jsx as jsx21, jsxs as
|
|
1833
|
+
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1815
1834
|
function MultiCombobox({
|
|
1816
1835
|
options,
|
|
1817
1836
|
value,
|
|
@@ -1862,7 +1881,7 @@ function MultiCombobox({
|
|
|
1862
1881
|
const removeValue = (optionValue) => {
|
|
1863
1882
|
onChange(value.filter((v) => v !== optionValue));
|
|
1864
1883
|
};
|
|
1865
|
-
const trigger = /* @__PURE__ */
|
|
1884
|
+
const trigger = /* @__PURE__ */ jsxs18(
|
|
1866
1885
|
"div",
|
|
1867
1886
|
{
|
|
1868
1887
|
id,
|
|
@@ -1884,7 +1903,7 @@ function MultiCombobox({
|
|
|
1884
1903
|
className
|
|
1885
1904
|
),
|
|
1886
1905
|
children: [
|
|
1887
|
-
selected.length === 0 ? /* @__PURE__ */ jsx21("span", { className: "text-muted-foreground", children: placeholder }) : selected.map((option) => /* @__PURE__ */
|
|
1906
|
+
selected.length === 0 ? /* @__PURE__ */ jsx21("span", { className: "text-muted-foreground", children: placeholder }) : selected.map((option) => /* @__PURE__ */ jsxs18(
|
|
1888
1907
|
"span",
|
|
1889
1908
|
{
|
|
1890
1909
|
title: option.description,
|
|
@@ -1914,14 +1933,14 @@ function MultiCombobox({
|
|
|
1914
1933
|
]
|
|
1915
1934
|
}
|
|
1916
1935
|
);
|
|
1917
|
-
const command = /* @__PURE__ */
|
|
1936
|
+
const command = /* @__PURE__ */ jsxs18(
|
|
1918
1937
|
CommandPrimitive2,
|
|
1919
1938
|
{
|
|
1920
1939
|
shouldFilter: !isServer,
|
|
1921
1940
|
filter: filterByKeywords,
|
|
1922
1941
|
className: "flex h-full w-full flex-col overflow-hidden",
|
|
1923
1942
|
children: [
|
|
1924
|
-
/* @__PURE__ */
|
|
1943
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center border-b px-3", children: [
|
|
1925
1944
|
/* @__PURE__ */ jsx21(Search2, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
1926
1945
|
/* @__PURE__ */ jsx21(
|
|
1927
1946
|
CommandPrimitive2.Input,
|
|
@@ -1932,14 +1951,14 @@ function MultiCombobox({
|
|
|
1932
1951
|
}
|
|
1933
1952
|
)
|
|
1934
1953
|
] }),
|
|
1935
|
-
/* @__PURE__ */
|
|
1954
|
+
/* @__PURE__ */ jsxs18(
|
|
1936
1955
|
CommandPrimitive2.List,
|
|
1937
1956
|
{
|
|
1938
1957
|
ref: listRef,
|
|
1939
1958
|
className: "max-h-[50dvh] overflow-y-auto overflow-x-hidden p-1 sm:max-h-60",
|
|
1940
1959
|
children: [
|
|
1941
1960
|
!isServer && /* @__PURE__ */ jsx21(CommandPrimitive2.Empty, { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }),
|
|
1942
|
-
options.map((option) => /* @__PURE__ */
|
|
1961
|
+
options.map((option) => /* @__PURE__ */ jsxs18(
|
|
1943
1962
|
CommandPrimitive2.Item,
|
|
1944
1963
|
{
|
|
1945
1964
|
value: option.value,
|
|
@@ -1972,7 +1991,7 @@ function MultiCombobox({
|
|
|
1972
1991
|
}
|
|
1973
1992
|
);
|
|
1974
1993
|
if (isDesktop) {
|
|
1975
|
-
return /* @__PURE__ */
|
|
1994
|
+
return /* @__PURE__ */ jsxs18(PopoverPrimitive5.Root, { open, onOpenChange: handleOpenChange, children: [
|
|
1976
1995
|
/* @__PURE__ */ jsx21(PopoverPrimitive5.Trigger, { asChild: true, disabled, children: trigger }),
|
|
1977
1996
|
/* @__PURE__ */ jsx21(PopoverPrimitive5.Portal, { children: /* @__PURE__ */ jsx21(
|
|
1978
1997
|
PopoverPrimitive5.Content,
|
|
@@ -1986,11 +2005,11 @@ function MultiCombobox({
|
|
|
1986
2005
|
) })
|
|
1987
2006
|
] });
|
|
1988
2007
|
}
|
|
1989
|
-
return /* @__PURE__ */
|
|
2008
|
+
return /* @__PURE__ */ jsxs18(DrawerPrimitive5.Root, { open, onOpenChange: handleOpenChange, children: [
|
|
1990
2009
|
/* @__PURE__ */ jsx21(DrawerPrimitive5.Trigger, { asChild: true, disabled, children: trigger }),
|
|
1991
|
-
/* @__PURE__ */
|
|
2010
|
+
/* @__PURE__ */ jsxs18(DrawerPrimitive5.Portal, { children: [
|
|
1992
2011
|
/* @__PURE__ */ jsx21(DrawerPrimitive5.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
1993
|
-
/* @__PURE__ */
|
|
2012
|
+
/* @__PURE__ */ jsxs18(DrawerPrimitive5.Content, { className: "fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[85dvh] flex-col rounded-t-2xl border bg-popover text-popover-foreground outline-none", children: [
|
|
1994
2013
|
/* @__PURE__ */ jsx21(DrawerPrimitive5.Title, { className: "sr-only", children: placeholder }),
|
|
1995
2014
|
/* @__PURE__ */ jsx21("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
1996
2015
|
command
|
|
@@ -2000,14 +2019,14 @@ function MultiCombobox({
|
|
|
2000
2019
|
}
|
|
2001
2020
|
|
|
2002
2021
|
// src/components/page-header.tsx
|
|
2003
|
-
import { jsx as jsx22, jsxs as
|
|
2022
|
+
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2004
2023
|
function PageHeader({ title, description, action, className }) {
|
|
2005
|
-
return /* @__PURE__ */
|
|
2024
|
+
return /* @__PURE__ */ jsxs19(
|
|
2006
2025
|
"div",
|
|
2007
2026
|
{
|
|
2008
2027
|
className: `flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between ${className ?? ""}`,
|
|
2009
2028
|
children: [
|
|
2010
|
-
/* @__PURE__ */
|
|
2029
|
+
/* @__PURE__ */ jsxs19("div", { className: "min-w-0", children: [
|
|
2011
2030
|
/* @__PURE__ */ jsx22("h1", { className: "truncate text-2xl font-semibold tracking-tight", children: title }),
|
|
2012
2031
|
description && /* @__PURE__ */ jsx22("p", { className: "text-sm text-muted-foreground", children: description })
|
|
2013
2032
|
] }),
|
|
@@ -2019,7 +2038,7 @@ function PageHeader({ title, description, action, className }) {
|
|
|
2019
2038
|
|
|
2020
2039
|
// src/components/pagination.tsx
|
|
2021
2040
|
import { useId as useId2, useState as useState11 } from "react";
|
|
2022
|
-
import { jsx as jsx23, jsxs as
|
|
2041
|
+
import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2023
2042
|
var navButtonClass2 = "inline-flex h-8 max-sm:h-10 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";
|
|
2024
2043
|
function Pagination({
|
|
2025
2044
|
page,
|
|
@@ -2034,12 +2053,12 @@ function Pagination({
|
|
|
2034
2053
|
pageSizeOptions,
|
|
2035
2054
|
className
|
|
2036
2055
|
}) {
|
|
2037
|
-
return /* @__PURE__ */
|
|
2056
|
+
return /* @__PURE__ */ jsxs20(
|
|
2038
2057
|
"div",
|
|
2039
2058
|
{
|
|
2040
2059
|
className: `flex flex-wrap items-center ${showPageSizeSelector ? "justify-between" : "justify-end"} gap-x-4 gap-y-2 ${className ?? ""}`,
|
|
2041
2060
|
children: [
|
|
2042
|
-
showPageSizeSelector && /* @__PURE__ */
|
|
2061
|
+
showPageSizeSelector && /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
|
|
2043
2062
|
/* @__PURE__ */ jsx23("label", { htmlFor: "pagination-page-size", className: "text-sm text-muted-foreground", children: "Itens por p\xE1gina" }),
|
|
2044
2063
|
/* @__PURE__ */ jsx23(
|
|
2045
2064
|
"select",
|
|
@@ -2052,7 +2071,7 @@ function Pagination({
|
|
|
2052
2071
|
}
|
|
2053
2072
|
)
|
|
2054
2073
|
] }),
|
|
2055
|
-
/* @__PURE__ */
|
|
2074
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-4", children: [
|
|
2056
2075
|
/* @__PURE__ */ jsx23(
|
|
2057
2076
|
"button",
|
|
2058
2077
|
{
|
|
@@ -2063,7 +2082,7 @@ function Pagination({
|
|
|
2063
2082
|
children: "Anterior"
|
|
2064
2083
|
}
|
|
2065
2084
|
),
|
|
2066
|
-
showPageJump && totalPages !== void 0 ? /* @__PURE__ */ jsx23(PageJumpInput, { page, totalPages, onPageChange }) : /* @__PURE__ */
|
|
2085
|
+
showPageJump && totalPages !== void 0 ? /* @__PURE__ */ jsx23(PageJumpInput, { page, totalPages, onPageChange }) : /* @__PURE__ */ jsxs20("span", { className: "text-sm text-muted-foreground", children: [
|
|
2067
2086
|
"P\xE1gina ",
|
|
2068
2087
|
page,
|
|
2069
2088
|
totalPages ? ` de ${totalPages}` : ""
|
|
@@ -2098,7 +2117,7 @@ function PageJumpInput({ page, totalPages, onPageChange }) {
|
|
|
2098
2117
|
const target = Math.max(1, Math.min(Number(draft), totalPages));
|
|
2099
2118
|
if (target !== page) onPageChange(target);
|
|
2100
2119
|
};
|
|
2101
|
-
return /* @__PURE__ */
|
|
2120
|
+
return /* @__PURE__ */ jsxs20("span", { className: "flex items-center gap-1.5 whitespace-nowrap text-sm text-muted-foreground", children: [
|
|
2102
2121
|
/* @__PURE__ */ jsx23("label", { htmlFor: inputId, className: "max-sm:sr-only", children: "P\xE1gina" }),
|
|
2103
2122
|
/* @__PURE__ */ jsx23(
|
|
2104
2123
|
"input",
|
|
@@ -2121,7 +2140,7 @@ function PageJumpInput({ page, totalPages, onPageChange }) {
|
|
|
2121
2140
|
className: "h-8 max-sm:h-10 rounded-md border border-input bg-background px-1.5 text-center text-xs font-medium tabular-nums text-foreground shadow-sm transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
2122
2141
|
}
|
|
2123
2142
|
),
|
|
2124
|
-
/* @__PURE__ */
|
|
2143
|
+
/* @__PURE__ */ jsxs20("span", { children: [
|
|
2125
2144
|
"de ",
|
|
2126
2145
|
totalPages
|
|
2127
2146
|
] })
|
|
@@ -2131,10 +2150,10 @@ function PageJumpInput({ page, totalPages, onPageChange }) {
|
|
|
2131
2150
|
// src/components/password-input.tsx
|
|
2132
2151
|
import { Eye, EyeOff } from "lucide-react";
|
|
2133
2152
|
import * as React9 from "react";
|
|
2134
|
-
import { jsx as jsx24, jsxs as
|
|
2153
|
+
import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2135
2154
|
var PasswordInput = React9.forwardRef(({ containerClassName, className, ...props }, ref) => {
|
|
2136
2155
|
const [visible, setVisible] = React9.useState(false);
|
|
2137
|
-
return /* @__PURE__ */
|
|
2156
|
+
return /* @__PURE__ */ jsxs21("div", { className: `relative ${containerClassName ?? ""}`, children: [
|
|
2138
2157
|
/* @__PURE__ */ jsx24(
|
|
2139
2158
|
"input",
|
|
2140
2159
|
{
|
|
@@ -2160,7 +2179,7 @@ var PasswordInput = React9.forwardRef(({ containerClassName, className, ...props
|
|
|
2160
2179
|
PasswordInput.displayName = "PasswordInput";
|
|
2161
2180
|
|
|
2162
2181
|
// src/components/progress-bar.tsx
|
|
2163
|
-
import { jsx as jsx25, jsxs as
|
|
2182
|
+
import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2164
2183
|
var sizeClasses3 = {
|
|
2165
2184
|
sm: "h-1.5",
|
|
2166
2185
|
md: "h-2"
|
|
@@ -2174,8 +2193,8 @@ function ProgressBar({
|
|
|
2174
2193
|
indicatorClassName
|
|
2175
2194
|
}) {
|
|
2176
2195
|
const clamped = Math.min(100, Math.max(0, value));
|
|
2177
|
-
return /* @__PURE__ */
|
|
2178
|
-
(label || valueLabel) && /* @__PURE__ */
|
|
2196
|
+
return /* @__PURE__ */ jsxs22("div", { className: `space-y-1.5 ${className ?? ""}`, children: [
|
|
2197
|
+
(label || valueLabel) && /* @__PURE__ */ jsxs22("div", { className: "flex items-baseline justify-between gap-2", children: [
|
|
2179
2198
|
label && /* @__PURE__ */ jsx25("span", { className: "text-sm text-muted-foreground", children: label }),
|
|
2180
2199
|
valueLabel && /* @__PURE__ */ jsx25("span", { className: "text-sm font-semibold", children: valueLabel })
|
|
2181
2200
|
] }),
|
|
@@ -2196,7 +2215,7 @@ function ProgressBar({
|
|
|
2196
2215
|
}
|
|
2197
2216
|
|
|
2198
2217
|
// src/components/responsive-data-view.tsx
|
|
2199
|
-
import { jsx as jsx26, jsxs as
|
|
2218
|
+
import { jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2200
2219
|
var BREAKPOINT_CLASSES = {
|
|
2201
2220
|
md: { table: "md:block", cards: "md:hidden" },
|
|
2202
2221
|
lg: { table: "lg:block", cards: "lg:hidden" },
|
|
@@ -2228,7 +2247,7 @@ function ResponsiveDataView({
|
|
|
2228
2247
|
}
|
|
2229
2248
|
const busyClass = isBusy && "pointer-events-none opacity-50";
|
|
2230
2249
|
const visibility = BREAKPOINT_CLASSES[breakpoint];
|
|
2231
|
-
return /* @__PURE__ */
|
|
2250
|
+
return /* @__PURE__ */ jsxs23("div", { className: "space-y-4", children: [
|
|
2232
2251
|
/* @__PURE__ */ jsx26(
|
|
2233
2252
|
"div",
|
|
2234
2253
|
{
|
|
@@ -2251,7 +2270,7 @@ import * as DropdownMenu3 from "@radix-ui/react-dropdown-menu";
|
|
|
2251
2270
|
import { ChevronRight as ChevronRight3, MoreVertical } from "lucide-react";
|
|
2252
2271
|
import { useState as useState13 } from "react";
|
|
2253
2272
|
import { Drawer as DrawerPrimitive6 } from "vaul";
|
|
2254
|
-
import { Fragment as Fragment6, jsx as jsx27, jsxs as
|
|
2273
|
+
import { Fragment as Fragment6, jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2255
2274
|
var triggerClass = "inline-flex h-8 w-8 max-sm:h-10 max-sm:w-10 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";
|
|
2256
2275
|
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";
|
|
2257
2276
|
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";
|
|
@@ -2276,7 +2295,7 @@ function RowActionsMenu({
|
|
|
2276
2295
|
}
|
|
2277
2296
|
);
|
|
2278
2297
|
if (isDesktop) {
|
|
2279
|
-
return /* @__PURE__ */
|
|
2298
|
+
return /* @__PURE__ */ jsxs24(DropdownMenu3.Root, { open, onOpenChange: setOpen, modal: false, children: [
|
|
2280
2299
|
/* @__PURE__ */ jsx27(DropdownMenu3.Trigger, { asChild: true, children: trigger }),
|
|
2281
2300
|
/* @__PURE__ */ jsx27(DropdownMenu3.Portal, { children: /* @__PURE__ */ jsx27(
|
|
2282
2301
|
DropdownMenu3.Content,
|
|
@@ -2290,8 +2309,8 @@ function RowActionsMenu({
|
|
|
2290
2309
|
action.destructive && "text-destructive focus:bg-destructive/10"
|
|
2291
2310
|
);
|
|
2292
2311
|
if (action.children?.length) {
|
|
2293
|
-
return /* @__PURE__ */
|
|
2294
|
-
/* @__PURE__ */
|
|
2312
|
+
return /* @__PURE__ */ jsxs24(DropdownMenu3.Sub, { children: [
|
|
2313
|
+
/* @__PURE__ */ jsxs24(
|
|
2295
2314
|
DropdownMenu3.SubTrigger,
|
|
2296
2315
|
{
|
|
2297
2316
|
className: cls,
|
|
@@ -2308,7 +2327,7 @@ function RowActionsMenu({
|
|
|
2308
2327
|
{
|
|
2309
2328
|
sideOffset: 4,
|
|
2310
2329
|
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",
|
|
2311
|
-
children: action.children.map((child) => /* @__PURE__ */
|
|
2330
|
+
children: action.children.map((child) => /* @__PURE__ */ jsxs24(
|
|
2312
2331
|
DropdownMenu3.Item,
|
|
2313
2332
|
{
|
|
2314
2333
|
className: cn(
|
|
@@ -2336,14 +2355,14 @@ function RowActionsMenu({
|
|
|
2336
2355
|
children: renderLink({
|
|
2337
2356
|
href: action.href,
|
|
2338
2357
|
className: cls,
|
|
2339
|
-
children: /* @__PURE__ */
|
|
2358
|
+
children: /* @__PURE__ */ jsxs24(Fragment6, { children: [
|
|
2340
2359
|
action.icon,
|
|
2341
2360
|
action.label
|
|
2342
2361
|
] })
|
|
2343
2362
|
})
|
|
2344
2363
|
},
|
|
2345
2364
|
action.label
|
|
2346
|
-
) : /* @__PURE__ */
|
|
2365
|
+
) : /* @__PURE__ */ jsxs24(
|
|
2347
2366
|
DropdownMenu3.Item,
|
|
2348
2367
|
{
|
|
2349
2368
|
className: cls,
|
|
@@ -2361,11 +2380,11 @@ function RowActionsMenu({
|
|
|
2361
2380
|
) })
|
|
2362
2381
|
] });
|
|
2363
2382
|
}
|
|
2364
|
-
return /* @__PURE__ */
|
|
2383
|
+
return /* @__PURE__ */ jsxs24(DrawerPrimitive6.Root, { open, onOpenChange: setOpen, children: [
|
|
2365
2384
|
/* @__PURE__ */ jsx27(DrawerPrimitive6.Trigger, { asChild: true, children: trigger }),
|
|
2366
|
-
/* @__PURE__ */
|
|
2385
|
+
/* @__PURE__ */ jsxs24(DrawerPrimitive6.Portal, { children: [
|
|
2367
2386
|
/* @__PURE__ */ jsx27(DrawerPrimitive6.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
2368
|
-
/* @__PURE__ */
|
|
2387
|
+
/* @__PURE__ */ jsxs24(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: [
|
|
2369
2388
|
/* @__PURE__ */ jsx27(DrawerPrimitive6.Title, { className: "sr-only", children: label }),
|
|
2370
2389
|
/* @__PURE__ */ jsx27("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
2371
2390
|
actions.map((action) => {
|
|
@@ -2373,18 +2392,18 @@ function RowActionsMenu({
|
|
|
2373
2392
|
sheetItemClass2,
|
|
2374
2393
|
action.destructive && "text-destructive"
|
|
2375
2394
|
);
|
|
2376
|
-
const inner = /* @__PURE__ */
|
|
2395
|
+
const inner = /* @__PURE__ */ jsxs24(Fragment6, { children: [
|
|
2377
2396
|
action.icon,
|
|
2378
2397
|
action.label
|
|
2379
2398
|
] });
|
|
2380
2399
|
if (action.children?.length) {
|
|
2381
|
-
return /* @__PURE__ */
|
|
2400
|
+
return /* @__PURE__ */ jsxs24("div", { children: [
|
|
2382
2401
|
/* @__PURE__ */ jsx27("div", { className: "mx-3 my-1 h-px bg-border" }),
|
|
2383
|
-
/* @__PURE__ */
|
|
2402
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-3 px-3 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: [
|
|
2384
2403
|
action.icon,
|
|
2385
2404
|
action.label
|
|
2386
2405
|
] }),
|
|
2387
|
-
action.children.map((child) => /* @__PURE__ */
|
|
2406
|
+
action.children.map((child) => /* @__PURE__ */ jsxs24(
|
|
2388
2407
|
"button",
|
|
2389
2408
|
{
|
|
2390
2409
|
type: "button",
|
|
@@ -2441,11 +2460,11 @@ function RowActionsMenu({
|
|
|
2441
2460
|
|
|
2442
2461
|
// src/components/search-input.tsx
|
|
2443
2462
|
import * as React10 from "react";
|
|
2444
|
-
import { jsx as jsx28, jsxs as
|
|
2463
|
+
import { jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2445
2464
|
var SearchInput = React10.forwardRef(
|
|
2446
2465
|
({ containerClassName, className, ...props }, ref) => {
|
|
2447
|
-
return /* @__PURE__ */
|
|
2448
|
-
/* @__PURE__ */
|
|
2466
|
+
return /* @__PURE__ */ jsxs25("div", { className: cn("relative flex-1", containerClassName), children: [
|
|
2467
|
+
/* @__PURE__ */ jsxs25(
|
|
2449
2468
|
"svg",
|
|
2450
2469
|
{
|
|
2451
2470
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2483,11 +2502,11 @@ var SearchInput = React10.forwardRef(
|
|
|
2483
2502
|
SearchInput.displayName = "SearchInput";
|
|
2484
2503
|
|
|
2485
2504
|
// src/components/stat-card.tsx
|
|
2486
|
-
import { jsx as jsx29, jsxs as
|
|
2505
|
+
import { jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2487
2506
|
function StatCard({ label, value, detail, icon, isLoading }) {
|
|
2488
2507
|
if (isLoading) {
|
|
2489
|
-
return /* @__PURE__ */
|
|
2490
|
-
/* @__PURE__ */
|
|
2508
|
+
return /* @__PURE__ */ jsxs26("div", { className: "rounded-lg border bg-card p-6 shadow-sm", children: [
|
|
2509
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between pb-2", children: [
|
|
2491
2510
|
/* @__PURE__ */ jsx29("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
|
|
2492
2511
|
/* @__PURE__ */ jsx29("div", { className: "h-4 w-4 animate-pulse rounded bg-muted" })
|
|
2493
2512
|
] }),
|
|
@@ -2495,8 +2514,8 @@ function StatCard({ label, value, detail, icon, isLoading }) {
|
|
|
2495
2514
|
/* @__PURE__ */ jsx29("div", { className: "mt-1 h-4 w-20 animate-pulse rounded bg-muted" })
|
|
2496
2515
|
] });
|
|
2497
2516
|
}
|
|
2498
|
-
return /* @__PURE__ */
|
|
2499
|
-
/* @__PURE__ */
|
|
2517
|
+
return /* @__PURE__ */ jsxs26("div", { className: "rounded-lg border bg-card p-6 shadow-sm", children: [
|
|
2518
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between pb-2", children: [
|
|
2500
2519
|
/* @__PURE__ */ jsx29("span", { className: "text-sm font-medium text-muted-foreground", children: label }),
|
|
2501
2520
|
icon && /* @__PURE__ */ jsx29("span", { className: "text-muted-foreground", children: icon })
|
|
2502
2521
|
] }),
|
|
@@ -2506,7 +2525,7 @@ function StatCard({ label, value, detail, icon, isLoading }) {
|
|
|
2506
2525
|
}
|
|
2507
2526
|
|
|
2508
2527
|
// src/components/status-badge.tsx
|
|
2509
|
-
import { jsx as jsx30, jsxs as
|
|
2528
|
+
import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2510
2529
|
var variantClasses = {
|
|
2511
2530
|
neutral: {
|
|
2512
2531
|
badge: "bg-[var(--status-neutral-surface,#f3f4f6)] text-[var(--status-neutral-text,#374151)]",
|
|
@@ -2536,7 +2555,7 @@ function StatusBadge({
|
|
|
2536
2555
|
children
|
|
2537
2556
|
}) {
|
|
2538
2557
|
const classes = variantClasses[variant];
|
|
2539
|
-
return /* @__PURE__ */
|
|
2558
|
+
return /* @__PURE__ */ jsxs27(
|
|
2540
2559
|
"span",
|
|
2541
2560
|
{
|
|
2542
2561
|
className: `inline-flex items-center gap-1.5 rounded-md px-2 py-0.5 text-xs font-medium ${classes.badge} ${className ?? ""}`,
|
|
@@ -2554,9 +2573,9 @@ function StatusBadge({
|
|
|
2554
2573
|
}
|
|
2555
2574
|
|
|
2556
2575
|
// src/components/status-dot.tsx
|
|
2557
|
-
import { jsx as jsx31, jsxs as
|
|
2576
|
+
import { jsx as jsx31, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2558
2577
|
function StatusDot({ active, label, className }) {
|
|
2559
|
-
return /* @__PURE__ */
|
|
2578
|
+
return /* @__PURE__ */ jsxs28("span", { className: `inline-flex items-center gap-2 ${className ?? ""}`, children: [
|
|
2560
2579
|
/* @__PURE__ */ jsx31(
|
|
2561
2580
|
"span",
|
|
2562
2581
|
{
|
|
@@ -2651,7 +2670,7 @@ function useVersionCheck({
|
|
|
2651
2670
|
}
|
|
2652
2671
|
|
|
2653
2672
|
// src/components/update-banner.tsx
|
|
2654
|
-
import { jsx as jsx34, jsxs as
|
|
2673
|
+
import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2655
2674
|
function UpdateBanner({
|
|
2656
2675
|
title = "Nova vers\xE3o dispon\xEDvel",
|
|
2657
2676
|
description = "Atualize para continuar na vers\xE3o mais recente.",
|
|
@@ -2661,7 +2680,7 @@ function UpdateBanner({
|
|
|
2661
2680
|
}) {
|
|
2662
2681
|
const { updateAvailable, reload } = useVersionCheck(options);
|
|
2663
2682
|
if (!updateAvailable) return null;
|
|
2664
|
-
return /* @__PURE__ */
|
|
2683
|
+
return /* @__PURE__ */ jsxs29(
|
|
2665
2684
|
"div",
|
|
2666
2685
|
{
|
|
2667
2686
|
role: "status",
|
|
@@ -2672,7 +2691,7 @@ function UpdateBanner({
|
|
|
2672
2691
|
className
|
|
2673
2692
|
),
|
|
2674
2693
|
children: [
|
|
2675
|
-
/* @__PURE__ */
|
|
2694
|
+
/* @__PURE__ */ jsxs29("span", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2676
2695
|
/* @__PURE__ */ jsx34(RefreshCw, { className: "h-4 w-4 shrink-0 animate-spin [animation-duration:3s]", "aria-hidden": true }),
|
|
2677
2696
|
/* @__PURE__ */ jsx34("span", { className: "font-medium", children: title }),
|
|
2678
2697
|
/* @__PURE__ */ jsx34("span", { className: "hidden truncate opacity-80 sm:inline", children: description })
|