@motor-hero/ui-kit 0.20.1 → 0.22.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/color-picker.d.ts +23 -0
- package/dist/components/color-picker.d.ts.map +1 -0
- package/dist/index.cjs +210 -130
- 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 +215 -136
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/components/color-picker.tsx +100 -0
- package/src/index.ts +2 -0
package/dist/index.cjs
CHANGED
|
@@ -32,6 +32,7 @@ var index_exports = {};
|
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
AppShell: () => AppShell,
|
|
34
34
|
AuthCard: () => AuthCard,
|
|
35
|
+
ColorPicker: () => ColorPicker,
|
|
35
36
|
Combobox: () => Combobox,
|
|
36
37
|
ConfirmDialog: () => ConfirmDialog,
|
|
37
38
|
DataTableWrapper: () => DataTableWrapper,
|
|
@@ -814,31 +815,109 @@ function Combobox({
|
|
|
814
815
|
] });
|
|
815
816
|
}
|
|
816
817
|
|
|
817
|
-
// src/components/
|
|
818
|
+
// src/components/color-picker.tsx
|
|
819
|
+
var PopoverPrimitive2 = __toESM(require("@radix-ui/react-popover"), 1);
|
|
820
|
+
var import_lucide_react5 = require("lucide-react");
|
|
821
|
+
var React6 = __toESM(require("react"), 1);
|
|
822
|
+
var import_react_colorful = require("react-colorful");
|
|
818
823
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
824
|
+
function ColorPicker({
|
|
825
|
+
value,
|
|
826
|
+
onChange,
|
|
827
|
+
placeholder = "Selecionar cor",
|
|
828
|
+
disabled,
|
|
829
|
+
id,
|
|
830
|
+
className,
|
|
831
|
+
"aria-invalid": ariaInvalid,
|
|
832
|
+
"aria-describedby": ariaDescribedby
|
|
833
|
+
}) {
|
|
834
|
+
const [open, setOpen] = React6.useState(false);
|
|
835
|
+
const color = value || "";
|
|
836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(PopoverPrimitive2.Root, { open, onOpenChange: setOpen, modal: true, children: [
|
|
837
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverPrimitive2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
838
|
+
"button",
|
|
839
|
+
{
|
|
840
|
+
type: "button",
|
|
841
|
+
id,
|
|
842
|
+
"aria-invalid": ariaInvalid,
|
|
843
|
+
"aria-describedby": ariaDescribedby,
|
|
844
|
+
disabled,
|
|
845
|
+
className: cn(
|
|
846
|
+
"flex h-9 w-full cursor-pointer items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive",
|
|
847
|
+
className
|
|
848
|
+
),
|
|
849
|
+
children: [
|
|
850
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "flex items-center gap-2 truncate", children: [
|
|
851
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
852
|
+
"span",
|
|
853
|
+
{
|
|
854
|
+
"aria-hidden": true,
|
|
855
|
+
className: cn(
|
|
856
|
+
"h-5 w-5 shrink-0 rounded border border-border",
|
|
857
|
+
!color && "bg-[length:8px_8px] bg-[position:0_0,4px_4px]"
|
|
858
|
+
),
|
|
859
|
+
style: color ? { backgroundColor: color } : {
|
|
860
|
+
backgroundImage: "linear-gradient(45deg,var(--color-muted) 25%,transparent 25%,transparent 75%,var(--color-muted) 75%),linear-gradient(45deg,var(--color-muted) 25%,transparent 25%,transparent 75%,var(--color-muted) 75%)"
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
),
|
|
864
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: cn("truncate", !color && "text-muted-foreground"), children: color || placeholder })
|
|
865
|
+
] }),
|
|
866
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.ChevronsUpDown, { className: "h-4 w-4 shrink-0 opacity-50" })
|
|
867
|
+
]
|
|
868
|
+
}
|
|
869
|
+
) }),
|
|
870
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
871
|
+
PopoverPrimitive2.Content,
|
|
872
|
+
{
|
|
873
|
+
align: "start",
|
|
874
|
+
sideOffset: 4,
|
|
875
|
+
className: "z-50 w-56 rounded-md border bg-popover p-3 text-popover-foreground shadow-md",
|
|
876
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "mh-color-picker flex flex-col gap-3", children: [
|
|
877
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_colorful.HexColorPicker, { color, onChange }),
|
|
878
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
879
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-sm text-muted-foreground", children: "#" }),
|
|
880
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
881
|
+
import_react_colorful.HexColorInput,
|
|
882
|
+
{
|
|
883
|
+
color,
|
|
884
|
+
onChange,
|
|
885
|
+
prefixed: false,
|
|
886
|
+
className: "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm uppercase shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
887
|
+
}
|
|
888
|
+
)
|
|
889
|
+
] })
|
|
890
|
+
] })
|
|
891
|
+
}
|
|
892
|
+
) })
|
|
893
|
+
] });
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
// src/components/stat-card.tsx
|
|
897
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
819
898
|
function StatCard({ label, value, detail, icon, isLoading }) {
|
|
820
899
|
if (isLoading) {
|
|
821
|
-
return /* @__PURE__ */ (0,
|
|
822
|
-
/* @__PURE__ */ (0,
|
|
823
|
-
/* @__PURE__ */ (0,
|
|
824
|
-
/* @__PURE__ */ (0,
|
|
900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rounded-lg border bg-card p-6 shadow-sm", children: [
|
|
901
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center justify-between pb-2", children: [
|
|
902
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
|
|
903
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "h-4 w-4 animate-pulse rounded bg-muted" })
|
|
825
904
|
] }),
|
|
826
|
-
/* @__PURE__ */ (0,
|
|
827
|
-
/* @__PURE__ */ (0,
|
|
905
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "mt-2 h-7 w-16 animate-pulse rounded bg-muted" }),
|
|
906
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "mt-1 h-4 w-20 animate-pulse rounded bg-muted" })
|
|
828
907
|
] });
|
|
829
908
|
}
|
|
830
|
-
return /* @__PURE__ */ (0,
|
|
831
|
-
/* @__PURE__ */ (0,
|
|
832
|
-
/* @__PURE__ */ (0,
|
|
833
|
-
icon && /* @__PURE__ */ (0,
|
|
909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "rounded-lg border bg-card p-6 shadow-sm", children: [
|
|
910
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center justify-between pb-2", children: [
|
|
911
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-sm font-medium text-muted-foreground", children: label }),
|
|
912
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-muted-foreground", children: icon })
|
|
834
913
|
] }),
|
|
835
|
-
/* @__PURE__ */ (0,
|
|
836
|
-
detail && /* @__PURE__ */ (0,
|
|
914
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "text-2xl font-bold", children: value }),
|
|
915
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-xs text-muted-foreground", children: detail })
|
|
837
916
|
] });
|
|
838
917
|
}
|
|
839
918
|
|
|
840
919
|
// src/components/data-table-wrapper.tsx
|
|
841
|
-
var
|
|
920
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
842
921
|
function DataTableWrapper({
|
|
843
922
|
children,
|
|
844
923
|
isEmpty,
|
|
@@ -851,15 +930,15 @@ function DataTableWrapper({
|
|
|
851
930
|
hasNextPage = false,
|
|
852
931
|
hasPreviousPage = false
|
|
853
932
|
}) {
|
|
854
|
-
return /* @__PURE__ */ (0,
|
|
855
|
-
/* @__PURE__ */ (0,
|
|
856
|
-
!isLoading && isEmpty && /* @__PURE__ */ (0,
|
|
857
|
-
emptyIcon && /* @__PURE__ */ (0,
|
|
858
|
-
/* @__PURE__ */ (0,
|
|
859
|
-
emptyDescription && /* @__PURE__ */ (0,
|
|
933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "space-y-4", children: [
|
|
934
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "overflow-x-auto rounded-md border", children }),
|
|
935
|
+
!isLoading && isEmpty && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
|
|
936
|
+
emptyIcon && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "mb-4 text-muted-foreground", children: emptyIcon }),
|
|
937
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h3", { className: "text-lg font-semibold tracking-tight", children: emptyTitle }),
|
|
938
|
+
emptyDescription && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: emptyDescription })
|
|
860
939
|
] }),
|
|
861
|
-
page !== void 0 && onPageChange && /* @__PURE__ */ (0,
|
|
862
|
-
/* @__PURE__ */ (0,
|
|
940
|
+
page !== void 0 && onPageChange && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center justify-end gap-4", children: [
|
|
941
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
863
942
|
"button",
|
|
864
943
|
{
|
|
865
944
|
type: "button",
|
|
@@ -869,11 +948,11 @@ function DataTableWrapper({
|
|
|
869
948
|
children: "Anterior"
|
|
870
949
|
}
|
|
871
950
|
),
|
|
872
|
-
/* @__PURE__ */ (0,
|
|
951
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "text-sm text-muted-foreground", children: [
|
|
873
952
|
"P\xE1gina ",
|
|
874
953
|
page
|
|
875
954
|
] }),
|
|
876
|
-
/* @__PURE__ */ (0,
|
|
955
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
877
956
|
"button",
|
|
878
957
|
{
|
|
879
958
|
type: "button",
|
|
@@ -889,7 +968,7 @@ function DataTableWrapper({
|
|
|
889
968
|
|
|
890
969
|
// src/components/mobile-card-list.tsx
|
|
891
970
|
var import_react4 = require("react");
|
|
892
|
-
var
|
|
971
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
893
972
|
var SCROLL_THRESHOLD = 8;
|
|
894
973
|
function MobileCardList({
|
|
895
974
|
data,
|
|
@@ -920,26 +999,26 @@ function MobileCardList({
|
|
|
920
999
|
}
|
|
921
1000
|
};
|
|
922
1001
|
if (isLoading) {
|
|
923
|
-
return /* @__PURE__ */ (0,
|
|
924
|
-
/* @__PURE__ */ (0,
|
|
925
|
-
/* @__PURE__ */ (0,
|
|
926
|
-
/* @__PURE__ */ (0,
|
|
1002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: `space-y-3 ${className ?? ""}`, children: Array.from({ length: loadingCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "rounded-xl border p-4", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-3", children: [
|
|
1003
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex justify-between", children: [
|
|
1004
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "h-5 w-32 animate-pulse rounded bg-muted" }),
|
|
1005
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "h-5 w-16 animate-pulse rounded bg-muted" })
|
|
927
1006
|
] }),
|
|
928
|
-
/* @__PURE__ */ (0,
|
|
929
|
-
/* @__PURE__ */ (0,
|
|
930
|
-
/* @__PURE__ */ (0,
|
|
931
|
-
/* @__PURE__ */ (0,
|
|
1007
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "h-4 w-48 animate-pulse rounded bg-muted" }),
|
|
1008
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex justify-between", children: [
|
|
1009
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
|
|
1010
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "h-4 w-20 animate-pulse rounded bg-muted" })
|
|
932
1011
|
] })
|
|
933
1012
|
] }) }, i)) });
|
|
934
1013
|
}
|
|
935
|
-
return /* @__PURE__ */ (0,
|
|
1014
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
936
1015
|
"div",
|
|
937
1016
|
{
|
|
938
1017
|
className: `space-y-3 ${className ?? ""}`,
|
|
939
1018
|
onTouchStart,
|
|
940
1019
|
onTouchMove,
|
|
941
1020
|
onClickCapture,
|
|
942
|
-
children: data.map((item, index) => /* @__PURE__ */ (0,
|
|
1021
|
+
children: data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
943
1022
|
"div",
|
|
944
1023
|
{
|
|
945
1024
|
className: "rounded-xl border p-4 transition-all duration-150 hover:border-foreground/20 active:scale-[0.99]",
|
|
@@ -952,7 +1031,7 @@ function MobileCardList({
|
|
|
952
1031
|
}
|
|
953
1032
|
|
|
954
1033
|
// src/components/responsive-data-view.tsx
|
|
955
|
-
var
|
|
1034
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
956
1035
|
function ResponsiveDataView({
|
|
957
1036
|
table,
|
|
958
1037
|
cards,
|
|
@@ -963,13 +1042,13 @@ function ResponsiveDataView({
|
|
|
963
1042
|
emptyDescription,
|
|
964
1043
|
pagination
|
|
965
1044
|
}) {
|
|
966
|
-
return /* @__PURE__ */ (0,
|
|
967
|
-
/* @__PURE__ */ (0,
|
|
968
|
-
/* @__PURE__ */ (0,
|
|
969
|
-
!isLoading && isEmpty && /* @__PURE__ */ (0,
|
|
970
|
-
emptyIcon && /* @__PURE__ */ (0,
|
|
971
|
-
/* @__PURE__ */ (0,
|
|
972
|
-
emptyDescription && /* @__PURE__ */ (0,
|
|
1045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "space-y-4", children: [
|
|
1046
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "hidden overflow-x-auto rounded-md border md:block", children: table }),
|
|
1047
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "md:hidden", children: cards }),
|
|
1048
|
+
!isLoading && isEmpty && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
|
|
1049
|
+
emptyIcon && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "mb-4 text-muted-foreground", children: emptyIcon }),
|
|
1050
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h3", { className: "text-lg font-semibold tracking-tight", children: emptyTitle }),
|
|
1051
|
+
emptyDescription && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: emptyDescription })
|
|
973
1052
|
] }),
|
|
974
1053
|
pagination
|
|
975
1054
|
] });
|
|
@@ -977,10 +1056,10 @@ function ResponsiveDataView({
|
|
|
977
1056
|
|
|
978
1057
|
// src/components/toaster.tsx
|
|
979
1058
|
var import_sonner = require("sonner");
|
|
980
|
-
var
|
|
1059
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
981
1060
|
function Toaster(props) {
|
|
982
1061
|
const { theme = "system" } = useTheme();
|
|
983
|
-
return /* @__PURE__ */ (0,
|
|
1062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
984
1063
|
import_sonner.Toaster,
|
|
985
1064
|
{
|
|
986
1065
|
theme,
|
|
@@ -1001,18 +1080,18 @@ function Toaster(props) {
|
|
|
1001
1080
|
}
|
|
1002
1081
|
|
|
1003
1082
|
// src/components/app-shell.tsx
|
|
1004
|
-
var
|
|
1083
|
+
var import_lucide_react7 = require("lucide-react");
|
|
1005
1084
|
var import_react7 = require("react");
|
|
1006
1085
|
|
|
1007
1086
|
// src/components/sidebar-nav.tsx
|
|
1008
1087
|
var import_react5 = require("react");
|
|
1009
1088
|
|
|
1010
1089
|
// src/components/types.tsx
|
|
1011
|
-
var
|
|
1012
|
-
var defaultRenderLink = ({ children, ...props }) => /* @__PURE__ */ (0,
|
|
1090
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1091
|
+
var defaultRenderLink = ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { ...props, children });
|
|
1013
1092
|
|
|
1014
1093
|
// src/components/sidebar-nav.tsx
|
|
1015
|
-
var
|
|
1094
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1016
1095
|
function defaultIsActive(item, activePath) {
|
|
1017
1096
|
if (item.href === "/") return activePath === "/";
|
|
1018
1097
|
return activePath === item.href || activePath.startsWith(item.href + "/");
|
|
@@ -1027,7 +1106,7 @@ function SidebarNav({
|
|
|
1027
1106
|
onNavigate
|
|
1028
1107
|
}) {
|
|
1029
1108
|
const visible = items.filter((item) => !item.adminOnly || isAdmin);
|
|
1030
|
-
return /* @__PURE__ */ (0,
|
|
1109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("nav", { className: "flex flex-col gap-1", children: visible.map((item) => {
|
|
1031
1110
|
const active = isActive(item, activePath);
|
|
1032
1111
|
const link = renderLink({
|
|
1033
1112
|
href: item.href,
|
|
@@ -1039,21 +1118,21 @@ function SidebarNav({
|
|
|
1039
1118
|
active ? "bg-accent text-accent-foreground font-semibold" : "text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
|
1040
1119
|
isCollapsed && "justify-center px-2"
|
|
1041
1120
|
),
|
|
1042
|
-
children: /* @__PURE__ */ (0,
|
|
1043
|
-
item.icon && /* @__PURE__ */ (0,
|
|
1044
|
-
!isCollapsed && /* @__PURE__ */ (0,
|
|
1121
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
1122
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "shrink-0", children: item.icon }),
|
|
1123
|
+
!isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "truncate", children: item.label })
|
|
1045
1124
|
] })
|
|
1046
1125
|
});
|
|
1047
|
-
return /* @__PURE__ */ (0,
|
|
1126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react5.Fragment, { children: link }, item.href);
|
|
1048
1127
|
}) });
|
|
1049
1128
|
}
|
|
1050
1129
|
|
|
1051
1130
|
// src/components/user-menu.tsx
|
|
1052
1131
|
var DropdownMenu2 = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
1053
|
-
var
|
|
1132
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1054
1133
|
var import_react6 = require("react");
|
|
1055
1134
|
var import_vaul2 = require("vaul");
|
|
1056
|
-
var
|
|
1135
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1057
1136
|
function initials(user) {
|
|
1058
1137
|
const source = user?.name?.trim() || user?.email?.trim();
|
|
1059
1138
|
if (!source) return "";
|
|
@@ -1074,50 +1153,50 @@ function UserMenu({
|
|
|
1074
1153
|
const isDesktop = useIsDesktop();
|
|
1075
1154
|
const [open, setOpen] = (0, import_react6.useState)(false);
|
|
1076
1155
|
const label = initials(user);
|
|
1077
|
-
const trigger = /* @__PURE__ */ (0,
|
|
1156
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1078
1157
|
"button",
|
|
1079
1158
|
{
|
|
1080
1159
|
type: "button",
|
|
1081
1160
|
className: "inline-flex h-9 w-9 items-center justify-center overflow-hidden rounded-full border border-input bg-background text-xs font-semibold shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1082
1161
|
"aria-label": "Menu do usu\xE1rio",
|
|
1083
1162
|
"data-testid": "user-menu",
|
|
1084
|
-
children: user?.avatarUrl ? /* @__PURE__ */ (0,
|
|
1163
|
+
children: user?.avatarUrl ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1085
1164
|
"img",
|
|
1086
1165
|
{
|
|
1087
1166
|
src: user.avatarUrl,
|
|
1088
1167
|
alt: user.name ?? user.email ?? "Avatar",
|
|
1089
1168
|
className: "h-full w-full object-cover"
|
|
1090
1169
|
}
|
|
1091
|
-
) : label ? /* @__PURE__ */ (0,
|
|
1170
|
+
) : label ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: label }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react6.User, { className: "h-4 w-4" })
|
|
1092
1171
|
}
|
|
1093
1172
|
);
|
|
1094
|
-
const userInfo = (user?.name || user?.email) && /* @__PURE__ */ (0,
|
|
1095
|
-
user.name && /* @__PURE__ */ (0,
|
|
1096
|
-
user.email && /* @__PURE__ */ (0,
|
|
1173
|
+
const userInfo = (user?.name || user?.email) && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "px-2 py-1.5", children: [
|
|
1174
|
+
user.name && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "truncate text-sm font-medium", children: user.name }),
|
|
1175
|
+
user.email && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "truncate text-xs text-muted-foreground", children: user.email })
|
|
1097
1176
|
] });
|
|
1098
1177
|
if (isDesktop) {
|
|
1099
|
-
return /* @__PURE__ */ (0,
|
|
1100
|
-
/* @__PURE__ */ (0,
|
|
1101
|
-
/* @__PURE__ */ (0,
|
|
1178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(DropdownMenu2.Root, { open, onOpenChange: setOpen, children: [
|
|
1179
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenu2.Trigger, { asChild: true, children: trigger }),
|
|
1180
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenu2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1102
1181
|
DropdownMenu2.Content,
|
|
1103
1182
|
{
|
|
1104
1183
|
align,
|
|
1105
1184
|
sideOffset: 6,
|
|
1106
1185
|
className: "z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",
|
|
1107
1186
|
children: [
|
|
1108
|
-
userInfo && /* @__PURE__ */ (0,
|
|
1187
|
+
userInfo && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
1109
1188
|
userInfo,
|
|
1110
|
-
/* @__PURE__ */ (0,
|
|
1189
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenu2.Separator, { className: "-mx-1 my-1 h-px bg-border" })
|
|
1111
1190
|
] }),
|
|
1112
1191
|
items.map(
|
|
1113
|
-
(item) => item.href ? /* @__PURE__ */ (0,
|
|
1192
|
+
(item) => item.href ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenu2.Item, { asChild: true, children: renderLink({
|
|
1114
1193
|
href: item.href,
|
|
1115
1194
|
className: itemClass,
|
|
1116
|
-
children: /* @__PURE__ */ (0,
|
|
1195
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
1117
1196
|
item.icon,
|
|
1118
1197
|
item.label
|
|
1119
1198
|
] })
|
|
1120
|
-
}) }, item.label) : /* @__PURE__ */ (0,
|
|
1199
|
+
}) }, item.label) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1121
1200
|
DropdownMenu2.Item,
|
|
1122
1201
|
{
|
|
1123
1202
|
className: itemClass,
|
|
@@ -1130,9 +1209,9 @@ function UserMenu({
|
|
|
1130
1209
|
item.label
|
|
1131
1210
|
)
|
|
1132
1211
|
),
|
|
1133
|
-
onLogout && /* @__PURE__ */ (0,
|
|
1134
|
-
items.length > 0 && /* @__PURE__ */ (0,
|
|
1135
|
-
/* @__PURE__ */ (0,
|
|
1212
|
+
onLogout && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
1213
|
+
items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenu2.Separator, { className: "-mx-1 my-1 h-px bg-border" }),
|
|
1214
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1136
1215
|
DropdownMenu2.Item,
|
|
1137
1216
|
{
|
|
1138
1217
|
className: cn(
|
|
@@ -1141,7 +1220,7 @@ function UserMenu({
|
|
|
1141
1220
|
),
|
|
1142
1221
|
onClick: onLogout,
|
|
1143
1222
|
children: [
|
|
1144
|
-
/* @__PURE__ */ (0,
|
|
1223
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react6.LogOut, { className: "h-4 w-4" }),
|
|
1145
1224
|
logoutLabel
|
|
1146
1225
|
]
|
|
1147
1226
|
}
|
|
@@ -1152,19 +1231,19 @@ function UserMenu({
|
|
|
1152
1231
|
) })
|
|
1153
1232
|
] });
|
|
1154
1233
|
}
|
|
1155
|
-
return /* @__PURE__ */ (0,
|
|
1156
|
-
/* @__PURE__ */ (0,
|
|
1157
|
-
/* @__PURE__ */ (0,
|
|
1158
|
-
/* @__PURE__ */ (0,
|
|
1159
|
-
/* @__PURE__ */ (0,
|
|
1160
|
-
/* @__PURE__ */ (0,
|
|
1161
|
-
/* @__PURE__ */ (0,
|
|
1162
|
-
userInfo && /* @__PURE__ */ (0,
|
|
1234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_vaul2.Drawer.Root, { open, onOpenChange: setOpen, children: [
|
|
1235
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_vaul2.Drawer.Trigger, { asChild: true, children: trigger }),
|
|
1236
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_vaul2.Drawer.Portal, { children: [
|
|
1237
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_vaul2.Drawer.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
1238
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_vaul2.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: [
|
|
1239
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_vaul2.Drawer.Title, { className: "sr-only", children: "Menu do usu\xE1rio" }),
|
|
1240
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
1241
|
+
userInfo && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
1163
1242
|
userInfo,
|
|
1164
|
-
/* @__PURE__ */ (0,
|
|
1243
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "-mx-1 my-1 h-px bg-border" })
|
|
1165
1244
|
] }),
|
|
1166
1245
|
items.map(
|
|
1167
|
-
(item) => item.href ? /* @__PURE__ */ (0,
|
|
1246
|
+
(item) => item.href ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1168
1247
|
"span",
|
|
1169
1248
|
{
|
|
1170
1249
|
onClick: () => setOpen(false),
|
|
@@ -1172,14 +1251,14 @@ function UserMenu({
|
|
|
1172
1251
|
children: renderLink({
|
|
1173
1252
|
href: item.href,
|
|
1174
1253
|
className: sheetItemClass,
|
|
1175
|
-
children: /* @__PURE__ */ (0,
|
|
1254
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
1176
1255
|
item.icon,
|
|
1177
1256
|
item.label
|
|
1178
1257
|
] })
|
|
1179
1258
|
})
|
|
1180
1259
|
},
|
|
1181
1260
|
item.label
|
|
1182
|
-
) : /* @__PURE__ */ (0,
|
|
1261
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1183
1262
|
"button",
|
|
1184
1263
|
{
|
|
1185
1264
|
type: "button",
|
|
@@ -1196,9 +1275,9 @@ function UserMenu({
|
|
|
1196
1275
|
item.label
|
|
1197
1276
|
)
|
|
1198
1277
|
),
|
|
1199
|
-
onLogout && /* @__PURE__ */ (0,
|
|
1200
|
-
items.length > 0 && /* @__PURE__ */ (0,
|
|
1201
|
-
/* @__PURE__ */ (0,
|
|
1278
|
+
onLogout && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
1279
|
+
items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "-mx-1 my-1 h-px bg-border" }),
|
|
1280
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1202
1281
|
"button",
|
|
1203
1282
|
{
|
|
1204
1283
|
type: "button",
|
|
@@ -1208,7 +1287,7 @@ function UserMenu({
|
|
|
1208
1287
|
setOpen(false);
|
|
1209
1288
|
},
|
|
1210
1289
|
children: [
|
|
1211
|
-
/* @__PURE__ */ (0,
|
|
1290
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react6.LogOut, { className: "h-4 w-4" }),
|
|
1212
1291
|
logoutLabel
|
|
1213
1292
|
]
|
|
1214
1293
|
}
|
|
@@ -1220,7 +1299,7 @@ function UserMenu({
|
|
|
1220
1299
|
}
|
|
1221
1300
|
|
|
1222
1301
|
// src/components/app-shell.tsx
|
|
1223
|
-
var
|
|
1302
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1224
1303
|
function AppShell({
|
|
1225
1304
|
brand,
|
|
1226
1305
|
brandCollapsed,
|
|
@@ -1239,7 +1318,7 @@ function AppShell({
|
|
|
1239
1318
|
}) {
|
|
1240
1319
|
const [collapsed, setCollapsed] = (0, import_react7.useState)(defaultCollapsed);
|
|
1241
1320
|
const [mobileOpen, setMobileOpen] = (0, import_react7.useState)(false);
|
|
1242
|
-
const nav = (isCollapsed, onNavigate) => /* @__PURE__ */ (0,
|
|
1321
|
+
const nav = (isCollapsed, onNavigate) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1243
1322
|
SidebarNav,
|
|
1244
1323
|
{
|
|
1245
1324
|
items: navItems,
|
|
@@ -1251,8 +1330,8 @@ function AppShell({
|
|
|
1251
1330
|
onNavigate
|
|
1252
1331
|
}
|
|
1253
1332
|
);
|
|
1254
|
-
return /* @__PURE__ */ (0,
|
|
1255
|
-
/* @__PURE__ */ (0,
|
|
1333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex h-screen overflow-hidden bg-background", children: [
|
|
1334
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1256
1335
|
"aside",
|
|
1257
1336
|
{
|
|
1258
1337
|
className: cn(
|
|
@@ -1260,22 +1339,22 @@ function AppShell({
|
|
|
1260
1339
|
collapsed ? "w-16" : "w-60"
|
|
1261
1340
|
),
|
|
1262
1341
|
children: [
|
|
1263
|
-
/* @__PURE__ */ (0,
|
|
1264
|
-
/* @__PURE__ */ (0,
|
|
1265
|
-
collapsible && /* @__PURE__ */ (0,
|
|
1342
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex h-14 shrink-0 items-center border-b px-4", children: collapsed ? brandCollapsed ?? brand : brand }),
|
|
1343
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex-1 overflow-y-auto px-2 py-4", children: nav(collapsed) }),
|
|
1344
|
+
collapsible && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "border-t p-2", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1266
1345
|
"button",
|
|
1267
1346
|
{
|
|
1268
1347
|
type: "button",
|
|
1269
1348
|
onClick: () => setCollapsed((v) => !v),
|
|
1270
1349
|
className: "flex w-full items-center justify-center rounded-md px-2 py-2 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",
|
|
1271
1350
|
"aria-label": collapsed ? "Expandir menu" : "Recolher menu",
|
|
1272
|
-
children: collapsed ? /* @__PURE__ */ (0,
|
|
1351
|
+
children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react7.ChevronRight, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react7.ChevronLeft, { className: "h-4 w-4" })
|
|
1273
1352
|
}
|
|
1274
1353
|
) })
|
|
1275
1354
|
]
|
|
1276
1355
|
}
|
|
1277
1356
|
),
|
|
1278
|
-
/* @__PURE__ */ (0,
|
|
1357
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1279
1358
|
"div",
|
|
1280
1359
|
{
|
|
1281
1360
|
className: cn(
|
|
@@ -1284,8 +1363,8 @@ function AppShell({
|
|
|
1284
1363
|
),
|
|
1285
1364
|
onClick: () => setMobileOpen(false),
|
|
1286
1365
|
children: [
|
|
1287
|
-
/* @__PURE__ */ (0,
|
|
1288
|
-
/* @__PURE__ */ (0,
|
|
1366
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "absolute inset-0 bg-black/50" }),
|
|
1367
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1289
1368
|
"div",
|
|
1290
1369
|
{
|
|
1291
1370
|
className: cn(
|
|
@@ -1294,42 +1373,42 @@ function AppShell({
|
|
|
1294
1373
|
),
|
|
1295
1374
|
onClick: (e) => e.stopPropagation(),
|
|
1296
1375
|
children: [
|
|
1297
|
-
/* @__PURE__ */ (0,
|
|
1298
|
-
/* @__PURE__ */ (0,
|
|
1376
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex h-14 shrink-0 items-center border-b px-4", children: brand }),
|
|
1377
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex-1 overflow-y-auto px-2 py-4", children: nav(false, () => setMobileOpen(false)) })
|
|
1299
1378
|
]
|
|
1300
1379
|
}
|
|
1301
1380
|
)
|
|
1302
1381
|
]
|
|
1303
1382
|
}
|
|
1304
1383
|
),
|
|
1305
|
-
/* @__PURE__ */ (0,
|
|
1306
|
-
/* @__PURE__ */ (0,
|
|
1307
|
-
/* @__PURE__ */ (0,
|
|
1384
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
|
|
1385
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("header", { className: "flex h-14 shrink-0 items-center gap-2 border-b bg-background px-4", children: [
|
|
1386
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1308
1387
|
"button",
|
|
1309
1388
|
{
|
|
1310
1389
|
type: "button",
|
|
1311
1390
|
onClick: () => setMobileOpen(true),
|
|
1312
1391
|
className: "inline-flex h-9 w-9 items-center justify-center rounded-md border border-input bg-background shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground md:hidden",
|
|
1313
1392
|
"aria-label": "Abrir menu",
|
|
1314
|
-
children: /* @__PURE__ */ (0,
|
|
1393
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react7.Menu, { className: "h-4 w-4" })
|
|
1315
1394
|
}
|
|
1316
1395
|
),
|
|
1317
|
-
/* @__PURE__ */ (0,
|
|
1396
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
1318
1397
|
headerActions,
|
|
1319
|
-
(user || onLogout) && /* @__PURE__ */ (0,
|
|
1398
|
+
(user || onLogout) && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(UserMenu, { user, items: userMenuItems, onLogout, renderLink })
|
|
1320
1399
|
] })
|
|
1321
1400
|
] }),
|
|
1322
|
-
/* @__PURE__ */ (0,
|
|
1401
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("main", { className: "flex-1 overflow-y-auto", children })
|
|
1323
1402
|
] })
|
|
1324
1403
|
] });
|
|
1325
1404
|
}
|
|
1326
1405
|
|
|
1327
1406
|
// src/components/row-actions-menu.tsx
|
|
1328
1407
|
var DropdownMenu3 = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
1329
|
-
var
|
|
1408
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1330
1409
|
var import_react8 = require("react");
|
|
1331
1410
|
var import_vaul3 = require("vaul");
|
|
1332
|
-
var
|
|
1411
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1333
1412
|
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";
|
|
1334
1413
|
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";
|
|
1335
1414
|
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";
|
|
@@ -1343,20 +1422,20 @@ function RowActionsMenu({
|
|
|
1343
1422
|
const isDesktop = useIsDesktop();
|
|
1344
1423
|
const [open, setOpen] = (0, import_react8.useState)(false);
|
|
1345
1424
|
if (actions.length === 0) return null;
|
|
1346
|
-
const trigger = /* @__PURE__ */ (0,
|
|
1425
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1347
1426
|
"button",
|
|
1348
1427
|
{
|
|
1349
1428
|
type: "button",
|
|
1350
1429
|
disabled,
|
|
1351
1430
|
"aria-label": label,
|
|
1352
1431
|
className: triggerClass,
|
|
1353
|
-
children: /* @__PURE__ */ (0,
|
|
1432
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react8.MoreVertical, { className: "h-4 w-4" })
|
|
1354
1433
|
}
|
|
1355
1434
|
);
|
|
1356
1435
|
if (isDesktop) {
|
|
1357
|
-
return /* @__PURE__ */ (0,
|
|
1358
|
-
/* @__PURE__ */ (0,
|
|
1359
|
-
/* @__PURE__ */ (0,
|
|
1436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(DropdownMenu3.Root, { open, onOpenChange: setOpen, children: [
|
|
1437
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DropdownMenu3.Trigger, { asChild: true, children: trigger }),
|
|
1438
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DropdownMenu3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1360
1439
|
DropdownMenu3.Content,
|
|
1361
1440
|
{
|
|
1362
1441
|
align,
|
|
@@ -1367,7 +1446,7 @@ function RowActionsMenu({
|
|
|
1367
1446
|
itemClass2,
|
|
1368
1447
|
action.destructive && "text-destructive focus:bg-destructive/10"
|
|
1369
1448
|
);
|
|
1370
|
-
return action.href ? /* @__PURE__ */ (0,
|
|
1449
|
+
return action.href ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1371
1450
|
DropdownMenu3.Item,
|
|
1372
1451
|
{
|
|
1373
1452
|
asChild: true,
|
|
@@ -1375,14 +1454,14 @@ function RowActionsMenu({
|
|
|
1375
1454
|
children: renderLink({
|
|
1376
1455
|
href: action.href,
|
|
1377
1456
|
className: cls,
|
|
1378
|
-
children: /* @__PURE__ */ (0,
|
|
1457
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
1379
1458
|
action.icon,
|
|
1380
1459
|
action.label
|
|
1381
1460
|
] })
|
|
1382
1461
|
})
|
|
1383
1462
|
},
|
|
1384
1463
|
action.label
|
|
1385
|
-
) : /* @__PURE__ */ (0,
|
|
1464
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1386
1465
|
DropdownMenu3.Item,
|
|
1387
1466
|
{
|
|
1388
1467
|
className: cls,
|
|
@@ -1400,23 +1479,23 @@ function RowActionsMenu({
|
|
|
1400
1479
|
) })
|
|
1401
1480
|
] });
|
|
1402
1481
|
}
|
|
1403
|
-
return /* @__PURE__ */ (0,
|
|
1404
|
-
/* @__PURE__ */ (0,
|
|
1405
|
-
/* @__PURE__ */ (0,
|
|
1406
|
-
/* @__PURE__ */ (0,
|
|
1407
|
-
/* @__PURE__ */ (0,
|
|
1408
|
-
/* @__PURE__ */ (0,
|
|
1409
|
-
/* @__PURE__ */ (0,
|
|
1482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_vaul3.Drawer.Root, { open, onOpenChange: setOpen, children: [
|
|
1483
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_vaul3.Drawer.Trigger, { asChild: true, children: trigger }),
|
|
1484
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_vaul3.Drawer.Portal, { children: [
|
|
1485
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_vaul3.Drawer.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
1486
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_vaul3.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: [
|
|
1487
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_vaul3.Drawer.Title, { className: "sr-only", children: label }),
|
|
1488
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "mx-auto my-3 h-1.5 w-12 shrink-0 rounded-full bg-muted" }),
|
|
1410
1489
|
actions.map((action) => {
|
|
1411
1490
|
const cls = cn(
|
|
1412
1491
|
sheetItemClass2,
|
|
1413
1492
|
action.destructive && "text-destructive"
|
|
1414
1493
|
);
|
|
1415
|
-
const inner = /* @__PURE__ */ (0,
|
|
1494
|
+
const inner = /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
1416
1495
|
action.icon,
|
|
1417
1496
|
action.label
|
|
1418
1497
|
] });
|
|
1419
|
-
return action.href ? /* @__PURE__ */ (0,
|
|
1498
|
+
return action.href ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1420
1499
|
"span",
|
|
1421
1500
|
{
|
|
1422
1501
|
onClick: () => setOpen(false),
|
|
@@ -1428,7 +1507,7 @@ function RowActionsMenu({
|
|
|
1428
1507
|
})
|
|
1429
1508
|
},
|
|
1430
1509
|
action.label
|
|
1431
|
-
) : /* @__PURE__ */ (0,
|
|
1510
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1432
1511
|
"button",
|
|
1433
1512
|
{
|
|
1434
1513
|
type: "button",
|
|
@@ -1496,6 +1575,7 @@ function useCustomToast() {
|
|
|
1496
1575
|
0 && (module.exports = {
|
|
1497
1576
|
AppShell,
|
|
1498
1577
|
AuthCard,
|
|
1578
|
+
ColorPicker,
|
|
1499
1579
|
Combobox,
|
|
1500
1580
|
ConfirmDialog,
|
|
1501
1581
|
DataTableWrapper,
|