@tree-ia/design-system 1.5.7 → 1.6.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/index.d.mts +37 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +246 -145
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { createContext, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { createPortal } from "react-dom";
|
|
4
|
-
import { AlertCircle, AlertOctagon, AlertTriangle, ArrowDown, ArrowUp, ArrowUpDown, Check, CheckCircle, ChevronDown, ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight, File, GripVertical, Image, Inbox, Info, LogOut, Monitor, Moon, Search, Sun, Upload, User, X, XCircle } from "lucide-react";
|
|
4
|
+
import { AlertCircle, AlertOctagon, AlertTriangle, ArrowDown, ArrowUp, ArrowUpDown, Check, CheckCircle, ChevronDown, ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight, Copy, File, GripVertical, Image, Inbox, Info, Lightbulb, LogOut, Monitor, Moon, Search, ShieldAlert, Sun, Upload, User, X, XCircle } from "lucide-react";
|
|
5
5
|
import { Bar, Doughnut, Line } from "react-chartjs-2";
|
|
6
6
|
import { ArcElement, BarElement, CategoryScale, Chart, Filler, Legend, LineElement, LinearScale, PointElement, Title as Title$1, Tooltip as Tooltip$1 } from "chart.js";
|
|
7
7
|
import { createColumnHelper, flexRender, getCoreRowModel, getFilteredRowModel, getPaginationRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
|
|
@@ -35,7 +35,7 @@ function Loading({ size = "md", className = "", text, textColor, color, variant
|
|
|
35
35
|
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/components/Button/index.tsx
|
|
38
|
-
const cn$
|
|
38
|
+
const cn$32 = (...classes) => classes.filter(Boolean).join(" ");
|
|
39
39
|
function Button({ children, variant = "primary", size = "md", isLoading = false, icon, iconPosition = "left", className, disabled, ...props }) {
|
|
40
40
|
const baseStyles = "font-medium rounded-lg transition-all duration-200 ease-out cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--dashboard-primary,#2563EB)] active:scale-[0.97]";
|
|
41
41
|
const variantStyles = {
|
|
@@ -56,7 +56,7 @@ function Button({ children, variant = "primary", size = "md", isLoading = false,
|
|
|
56
56
|
};
|
|
57
57
|
const isIconOnly = !!icon && (children === void 0 || children === null || typeof children === "string" && children.trim() === "");
|
|
58
58
|
return /* @__PURE__ */ jsx("button", {
|
|
59
|
-
className: cn$
|
|
59
|
+
className: cn$32(baseStyles, variantStyles[variant], isIconOnly ? iconOnlySizeStyles[size] : sizeStyles[size], className),
|
|
60
60
|
disabled: disabled || isLoading,
|
|
61
61
|
...props,
|
|
62
62
|
children: isLoading ? /* @__PURE__ */ jsxs("span", {
|
|
@@ -81,7 +81,7 @@ function Button({ children, variant = "primary", size = "md", isLoading = false,
|
|
|
81
81
|
|
|
82
82
|
//#endregion
|
|
83
83
|
//#region src/components/Input/index.tsx
|
|
84
|
-
const cn$
|
|
84
|
+
const cn$31 = (...classes) => classes.filter(Boolean).join(" ");
|
|
85
85
|
const Input = React.forwardRef(({ className, type = "text", label, error, children, id, ...props }, ref) => {
|
|
86
86
|
const inputId = id || (label ? `input-${label.toLowerCase().replace(/\s+/g, "-")}` : void 0);
|
|
87
87
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -97,7 +97,7 @@ const Input = React.forwardRef(({ className, type = "text", label, error, childr
|
|
|
97
97
|
children: [/* @__PURE__ */ jsx("input", {
|
|
98
98
|
type,
|
|
99
99
|
id: inputId,
|
|
100
|
-
className: cn$
|
|
100
|
+
className: cn$31("flex h-10 w-full rounded-md border border-[var(--dashboard-text-secondary,#6b7280)]/30 bg-[var(--dashboard-surface,#ffffff)] px-3 py-2 text-sm text-[var(--dashboard-text-primary,#2d2d2d)] shadow-sm transition-colors duration-200 focus:border-[var(--dashboard-primary,#37a501)] placeholder:text-[var(--dashboard-text-secondary,#6b7280)] focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50", error ? "border-[var(--dashboard-status-danger,#EF4444)] focus:border-[var(--dashboard-status-danger,#EF4444)]" : void 0, children ? "pr-10" : void 0, className),
|
|
101
101
|
ref,
|
|
102
102
|
...props
|
|
103
103
|
}), children && /* @__PURE__ */ jsx("div", {
|
|
@@ -361,32 +361,23 @@ function TableEmpty({ message, icon }) {
|
|
|
361
361
|
//#endregion
|
|
362
362
|
//#region src/components/Modal/index.tsx
|
|
363
363
|
const ANIMATION_MS = 200;
|
|
364
|
+
const sizeClasses$2 = {
|
|
365
|
+
small: "max-w-sm",
|
|
366
|
+
medium: "max-w-md",
|
|
367
|
+
large: "max-w-lg",
|
|
368
|
+
largeXl: "max-w-4xl",
|
|
369
|
+
extraLarge: "max-w-screen-xl"
|
|
370
|
+
};
|
|
364
371
|
function Modal({ isOpen, onClose, onSave, title = "", children, showFooter = false, saveButtonText = "Salvar", cancelButtonText = "Cancelar", size = "medium", disableSaveButton = false, saveButtonVariant = "primary", closeOnEscape = true, closeOnOverlayClick = true }) {
|
|
365
|
-
const [
|
|
366
|
-
const [shouldRender, setShouldRender] = useState(isOpen);
|
|
372
|
+
const [shouldRender, setShouldRender] = useState(false);
|
|
367
373
|
const modalRef = useRef(null);
|
|
368
|
-
|
|
369
|
-
const
|
|
370
|
-
small: "max-w-sm",
|
|
371
|
-
medium: "max-w-md",
|
|
372
|
-
large: "max-w-lg",
|
|
373
|
-
largeXl: "max-w-4xl",
|
|
374
|
-
extraLarge: "max-w-screen-xl"
|
|
375
|
-
};
|
|
374
|
+
if (isOpen && !shouldRender) setShouldRender(true);
|
|
375
|
+
const isClosing = shouldRender && !isOpen;
|
|
376
376
|
useEffect(() => {
|
|
377
|
-
if (
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
setIsClosing(true);
|
|
382
|
-
const timer = setTimeout(() => {
|
|
383
|
-
setShouldRender(false);
|
|
384
|
-
setIsClosing(false);
|
|
385
|
-
}, ANIMATION_MS);
|
|
386
|
-
return () => clearTimeout(timer);
|
|
387
|
-
}
|
|
388
|
-
prevIsOpenRef.current = isOpen;
|
|
389
|
-
}, [isOpen]);
|
|
377
|
+
if (!isClosing) return;
|
|
378
|
+
const timer = setTimeout(() => setShouldRender(false), ANIMATION_MS);
|
|
379
|
+
return () => clearTimeout(timer);
|
|
380
|
+
}, [isClosing]);
|
|
390
381
|
const handleClose = useCallback(() => {
|
|
391
382
|
onClose();
|
|
392
383
|
}, [onClose]);
|
|
@@ -399,7 +390,7 @@ function Modal({ isOpen, onClose, onSave, title = "", children, showFooter = fal
|
|
|
399
390
|
};
|
|
400
391
|
}, [shouldRender]);
|
|
401
392
|
useEffect(() => {
|
|
402
|
-
if (!closeOnOverlayClick || !shouldRender ||
|
|
393
|
+
if (!closeOnOverlayClick || !shouldRender || !isOpen) return;
|
|
403
394
|
const handleClickOutside = (event) => {
|
|
404
395
|
const target = event.target;
|
|
405
396
|
if (target.closest("[data-modal-ignore]")) return;
|
|
@@ -410,12 +401,12 @@ function Modal({ isOpen, onClose, onSave, title = "", children, showFooter = fal
|
|
|
410
401
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
411
402
|
}, [
|
|
412
403
|
shouldRender,
|
|
413
|
-
|
|
404
|
+
isOpen,
|
|
414
405
|
handleClose,
|
|
415
406
|
closeOnOverlayClick
|
|
416
407
|
]);
|
|
417
408
|
useEffect(() => {
|
|
418
|
-
if (!closeOnEscape || !shouldRender ||
|
|
409
|
+
if (!closeOnEscape || !shouldRender || !isOpen) return;
|
|
419
410
|
const handleEscKey = (event) => {
|
|
420
411
|
if (event.key === "Escape") handleClose();
|
|
421
412
|
};
|
|
@@ -423,11 +414,11 @@ function Modal({ isOpen, onClose, onSave, title = "", children, showFooter = fal
|
|
|
423
414
|
return () => document.removeEventListener("keydown", handleEscKey);
|
|
424
415
|
}, [
|
|
425
416
|
shouldRender,
|
|
426
|
-
|
|
417
|
+
isOpen,
|
|
427
418
|
handleClose,
|
|
428
419
|
closeOnEscape
|
|
429
420
|
]);
|
|
430
|
-
if (!shouldRender
|
|
421
|
+
if (!shouldRender) return null;
|
|
431
422
|
return /* @__PURE__ */ jsx("div", {
|
|
432
423
|
className: `fixed inset-0 z-[10000] flex items-center justify-center bg-black/50 backdrop-blur-sm p-4 ${isClosing ? "dashboard-animate-fade-out" : "dashboard-animate-fade-in"}`,
|
|
433
424
|
"aria-modal": "true",
|
|
@@ -435,7 +426,7 @@ function Modal({ isOpen, onClose, onSave, title = "", children, showFooter = fal
|
|
|
435
426
|
"aria-labelledby": title ? "modal-title" : void 0,
|
|
436
427
|
children: /* @__PURE__ */ jsxs("div", {
|
|
437
428
|
ref: modalRef,
|
|
438
|
-
className: `w-full rounded-2xl bg-[var(--dashboard-surface,#ffffff)] border border-[var(--dashboard-text-secondary,#64748B)]/10 dashboard-shadow-xl ${sizeClasses[size]} flex max-h-[90vh] flex-col transition-all duration-200 ease-out ${isClosing ? "scale-[0.98] opacity-0" : "scale-100 opacity-100"}`,
|
|
429
|
+
className: `w-full rounded-2xl bg-[var(--dashboard-surface,#ffffff)] border border-[var(--dashboard-text-secondary,#64748B)]/10 dashboard-shadow-xl ${sizeClasses$2[size]} flex max-h-[90vh] flex-col transition-all duration-200 ease-out ${isClosing ? "scale-[0.98] opacity-0" : "scale-100 opacity-100"}`,
|
|
439
430
|
children: [
|
|
440
431
|
/* @__PURE__ */ jsxs("div", {
|
|
441
432
|
className: "flex h-fit items-center justify-between border-b border-[var(--dashboard-text-secondary,#64748B)]/10 px-6 py-4",
|
|
@@ -760,16 +751,16 @@ function FormField({ label, name, type = "text", value, onChange, error, require
|
|
|
760
751
|
|
|
761
752
|
//#endregion
|
|
762
753
|
//#region src/components/Tabs/index.tsx
|
|
763
|
-
const cn$
|
|
754
|
+
const cn$30 = (...classes) => classes.filter(Boolean).join(" ");
|
|
764
755
|
function Tabs({ tabs, activeTab, onChange, variant = "underline", className }) {
|
|
765
756
|
if (variant === "pill") return /* @__PURE__ */ jsx("div", {
|
|
766
|
-
className: cn$
|
|
757
|
+
className: cn$30("flex flex-wrap gap-2", className),
|
|
767
758
|
role: "tablist",
|
|
768
759
|
children: tabs.map((tab) => {
|
|
769
760
|
const isActive = activeTab === tab.id;
|
|
770
761
|
return /* @__PURE__ */ jsxs("button", {
|
|
771
762
|
onClick: () => onChange(tab.id),
|
|
772
|
-
className: cn$
|
|
763
|
+
className: cn$30("flex items-center gap-2 px-4 py-2 rounded-full text-sm font-medium transition-colors cursor-pointer", isActive ? "bg-[var(--dashboard-primary,#37a501)] text-white" : "bg-[var(--dashboard-text-secondary,#6b7280)]/10 text-[var(--dashboard-text-secondary,#6b7280)] hover:bg-[var(--dashboard-text-secondary,#6b7280)]/20"),
|
|
773
764
|
role: "tab",
|
|
774
765
|
"aria-selected": isActive,
|
|
775
766
|
children: [
|
|
@@ -779,7 +770,7 @@ function Tabs({ tabs, activeTab, onChange, variant = "underline", className }) {
|
|
|
779
770
|
}),
|
|
780
771
|
tab.label,
|
|
781
772
|
tab.count !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
782
|
-
className: cn$
|
|
773
|
+
className: cn$30("ml-1 text-xs rounded-full px-1.5 py-0.5", isActive ? "bg-white/20 text-white" : "bg-[var(--dashboard-text-secondary,#6b7280)]/10 text-[var(--dashboard-text-secondary,#6b7280)]"),
|
|
783
774
|
children: tab.count
|
|
784
775
|
})
|
|
785
776
|
]
|
|
@@ -787,7 +778,7 @@ function Tabs({ tabs, activeTab, onChange, variant = "underline", className }) {
|
|
|
787
778
|
})
|
|
788
779
|
});
|
|
789
780
|
return /* @__PURE__ */ jsx("div", {
|
|
790
|
-
className: cn$
|
|
781
|
+
className: cn$30("border-b border-[var(--dashboard-text-secondary,#6b7280)]/20", className),
|
|
791
782
|
children: /* @__PURE__ */ jsx("nav", {
|
|
792
783
|
className: "flex gap-6",
|
|
793
784
|
"aria-label": "Tabs",
|
|
@@ -795,7 +786,7 @@ function Tabs({ tabs, activeTab, onChange, variant = "underline", className }) {
|
|
|
795
786
|
const isActive = activeTab === tab.id;
|
|
796
787
|
return /* @__PURE__ */ jsxs("button", {
|
|
797
788
|
onClick: () => onChange(tab.id),
|
|
798
|
-
className: cn$
|
|
789
|
+
className: cn$30("relative pb-3 px-1 text-sm font-medium transition-colors border-b-2 flex items-center gap-2 cursor-pointer", isActive ? "text-[var(--dashboard-primary,#37a501)] border-[var(--dashboard-primary,#37a501)]" : "text-[var(--dashboard-text-secondary,#6b7280)] hover:text-[var(--dashboard-text-primary,#2d2d2d)] border-transparent"),
|
|
799
790
|
role: "tab",
|
|
800
791
|
"aria-selected": isActive,
|
|
801
792
|
children: [
|
|
@@ -805,7 +796,7 @@ function Tabs({ tabs, activeTab, onChange, variant = "underline", className }) {
|
|
|
805
796
|
}),
|
|
806
797
|
tab.label,
|
|
807
798
|
tab.count !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
808
|
-
className: cn$
|
|
799
|
+
className: cn$30("ml-1 text-xs rounded-full px-1.5 py-0.5", isActive ? "bg-[var(--dashboard-primary,#37a501)]/10 text-[var(--dashboard-primary,#37a501)]" : "bg-[var(--dashboard-text-secondary,#6b7280)]/10 text-[var(--dashboard-text-secondary,#6b7280)]"),
|
|
809
800
|
children: tab.count
|
|
810
801
|
})
|
|
811
802
|
]
|
|
@@ -817,7 +808,7 @@ function Tabs({ tabs, activeTab, onChange, variant = "underline", className }) {
|
|
|
817
808
|
|
|
818
809
|
//#endregion
|
|
819
810
|
//#region src/components/DateRangePicker/index.tsx
|
|
820
|
-
const cn$
|
|
811
|
+
const cn$29 = (...classes) => classes.filter(Boolean).join(" ");
|
|
821
812
|
const locales = {
|
|
822
813
|
pt: {
|
|
823
814
|
months: [
|
|
@@ -924,7 +915,7 @@ function DateRangePicker({ value, onChange, locale = "pt", className }) {
|
|
|
924
915
|
};
|
|
925
916
|
const days = getDaysInMonth(currentMonth);
|
|
926
917
|
return /* @__PURE__ */ jsxs("div", {
|
|
927
|
-
className: cn$
|
|
918
|
+
className: cn$29("w-64 bg-[var(--dashboard-surface,#ffffff)] rounded-lg p-4 shadow-sm border border-[var(--dashboard-text-secondary,#6b7280)]/20", className),
|
|
928
919
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
929
920
|
className: "flex items-center justify-between mb-4",
|
|
930
921
|
children: [
|
|
@@ -962,9 +953,9 @@ function DateRangePicker({ value, onChange, locale = "pt", className }) {
|
|
|
962
953
|
const isSelected = isStart || isEnd;
|
|
963
954
|
return /* @__PURE__ */ jsxs("div", {
|
|
964
955
|
className: "relative h-8 w-8",
|
|
965
|
-
children: [value.start && value.end && (inRange || isStart || isEnd) && /* @__PURE__ */ jsx("div", { className: cn$
|
|
956
|
+
children: [value.start && value.end && (inRange || isStart || isEnd) && /* @__PURE__ */ jsx("div", { className: cn$29("absolute inset-0 bg-[var(--dashboard-text-secondary,#6b7280)]/10", isStart && "rounded-l-full", isEnd && "rounded-r-full") }), /* @__PURE__ */ jsx("button", {
|
|
966
957
|
onClick: () => handleDayClick(day),
|
|
967
|
-
className: cn$
|
|
958
|
+
className: cn$29("relative h-8 w-8 flex items-center justify-center text-xs font-medium transition-colors z-10 rounded-full cursor-pointer", isSelected ? "bg-[var(--dashboard-primary,#37a501)] text-white hover:opacity-90" : "text-[var(--dashboard-text-primary,#2d2d2d)] hover:bg-[var(--dashboard-text-secondary,#6b7280)]/20"),
|
|
968
959
|
children: day
|
|
969
960
|
})]
|
|
970
961
|
}, day);
|
|
@@ -975,7 +966,7 @@ function DateRangePicker({ value, onChange, locale = "pt", className }) {
|
|
|
975
966
|
|
|
976
967
|
//#endregion
|
|
977
968
|
//#region src/components/Title/index.tsx
|
|
978
|
-
const cn$
|
|
969
|
+
const cn$28 = (...classes) => classes.filter(Boolean).join(" ");
|
|
979
970
|
const defaultSizeByLevel = {
|
|
980
971
|
1: "text-2xl sm:text-3xl md:text-4xl lg:text-5xl",
|
|
981
972
|
2: "text-xl sm:text-2xl md:text-3xl lg:text-4xl",
|
|
@@ -1010,7 +1001,7 @@ function Title({ children, level = 1, size, weight = "bold", align = "left", col
|
|
|
1010
1001
|
const sizeClass = size ? customSizes[size] : defaultSizeByLevel[level];
|
|
1011
1002
|
const colorClass = color || "text-[var(--dashboard-text-primary,#2d2d2d)]";
|
|
1012
1003
|
return /* @__PURE__ */ jsx(Tag, {
|
|
1013
|
-
className: cn$
|
|
1004
|
+
className: cn$28(sizeClass, weightStyles[weight], alignStyles[align], colorClass, className),
|
|
1014
1005
|
...props,
|
|
1015
1006
|
children
|
|
1016
1007
|
});
|
|
@@ -1018,7 +1009,7 @@ function Title({ children, level = 1, size, weight = "bold", align = "left", col
|
|
|
1018
1009
|
|
|
1019
1010
|
//#endregion
|
|
1020
1011
|
//#region src/components/ToggleSwitch/index.tsx
|
|
1021
|
-
const cn$
|
|
1012
|
+
const cn$27 = (...classes) => classes.filter(Boolean).join(" ");
|
|
1022
1013
|
const sizeConfig$1 = {
|
|
1023
1014
|
sm: {
|
|
1024
1015
|
track: "h-5 w-9",
|
|
@@ -1042,7 +1033,7 @@ const sizeConfig$1 = {
|
|
|
1042
1033
|
function ToggleSwitch({ enabled, onChange, disabled = false, size = "md", label, className }) {
|
|
1043
1034
|
const config = sizeConfig$1[size];
|
|
1044
1035
|
return /* @__PURE__ */ jsxs("div", {
|
|
1045
|
-
className: cn$
|
|
1036
|
+
className: cn$27("inline-flex items-center gap-2", className),
|
|
1046
1037
|
children: [/* @__PURE__ */ jsx("button", {
|
|
1047
1038
|
type: "button",
|
|
1048
1039
|
role: "switch",
|
|
@@ -1050,10 +1041,10 @@ function ToggleSwitch({ enabled, onChange, disabled = false, size = "md", label,
|
|
|
1050
1041
|
"aria-label": label,
|
|
1051
1042
|
disabled,
|
|
1052
1043
|
onClick: () => onChange(!enabled),
|
|
1053
|
-
className: cn$
|
|
1054
|
-
children: /* @__PURE__ */ jsx("span", { className: cn$
|
|
1044
|
+
className: cn$27("relative inline-flex items-center rounded-full transition-colors outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--dashboard-primary,#37a501)]", config.track, enabled ? "bg-[var(--dashboard-primary,#37a501)]" : "bg-[var(--dashboard-text-secondary,#6b7280)]/30", disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"),
|
|
1045
|
+
children: /* @__PURE__ */ jsx("span", { className: cn$27("inline-block transform rounded-full bg-white shadow-sm transition-transform", config.thumb, enabled ? config.translateOn : config.translateOff) })
|
|
1055
1046
|
}), label && /* @__PURE__ */ jsx("span", {
|
|
1056
|
-
className: cn$
|
|
1047
|
+
className: cn$27("text-sm text-[var(--dashboard-text-primary,#2d2d2d)]", disabled && "opacity-50"),
|
|
1057
1048
|
children: label
|
|
1058
1049
|
})]
|
|
1059
1050
|
});
|
|
@@ -1061,7 +1052,7 @@ function ToggleSwitch({ enabled, onChange, disabled = false, size = "md", label,
|
|
|
1061
1052
|
|
|
1062
1053
|
//#endregion
|
|
1063
1054
|
//#region src/components/BadgeStatus/index.tsx
|
|
1064
|
-
const cn$
|
|
1055
|
+
const cn$26 = (...classes) => classes.filter(Boolean).join(" ");
|
|
1065
1056
|
const variantStyles = {
|
|
1066
1057
|
success: {
|
|
1067
1058
|
color: "text-[var(--dashboard-status-success,#10B981)]",
|
|
@@ -1092,7 +1083,7 @@ function BadgeStatus({ label, variant = "neutral", color, bgColor, size = "md",
|
|
|
1092
1083
|
const styles = variantStyles[variant];
|
|
1093
1084
|
const useCustomColors = color || bgColor;
|
|
1094
1085
|
return /* @__PURE__ */ jsx("span", {
|
|
1095
|
-
className: cn$
|
|
1086
|
+
className: cn$26("inline-flex items-center rounded-full font-medium whitespace-nowrap", sizeClasses$1[size], !useCustomColors && styles.color, !useCustomColors && styles.bgColor, className),
|
|
1096
1087
|
style: useCustomColors ? {
|
|
1097
1088
|
color: color || void 0,
|
|
1098
1089
|
backgroundColor: bgColor || void 0
|
|
@@ -1103,7 +1094,7 @@ function BadgeStatus({ label, variant = "neutral", color, bgColor, size = "md",
|
|
|
1103
1094
|
|
|
1104
1095
|
//#endregion
|
|
1105
1096
|
//#region src/components/Sidebar/index.tsx
|
|
1106
|
-
const cn$
|
|
1097
|
+
const cn$25 = (...classes) => classes.filter(Boolean).join(" ");
|
|
1107
1098
|
function DefaultLink({ href, className, children }) {
|
|
1108
1099
|
return /* @__PURE__ */ jsx("a", {
|
|
1109
1100
|
href,
|
|
@@ -1179,7 +1170,7 @@ function Sidebar({ menuItems, logo, collapsedLogo, currentPath, linkComponent: L
|
|
|
1179
1170
|
const isChildActive = item.children?.some((c) => currentPath === c.href);
|
|
1180
1171
|
if (hasChildren) return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("button", {
|
|
1181
1172
|
onClick: () => toggleExpand(item.id),
|
|
1182
|
-
className: cn$
|
|
1173
|
+
className: cn$25("w-full flex items-center px-4 py-3 rounded-lg text-sm font-medium cursor-pointer", collapsed && !mobile ? "justify-center" : "justify-start", isChildActive ? "text-[var(--dashboard-sidebar-active-text,#ff521d)]" : "text-[var(--dashboard-sidebar-text,#403f52)] hover:bg-[var(--dashboard-primary,#ff521d)]/10"),
|
|
1183
1174
|
style: { transition: "background-color 200ms, color 200ms" },
|
|
1184
1175
|
title: collapsed && !mobile ? item.label : void 0,
|
|
1185
1176
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
@@ -1194,7 +1185,7 @@ function Sidebar({ menuItems, logo, collapsedLogo, currentPath, linkComponent: L
|
|
|
1194
1185
|
children: item.label
|
|
1195
1186
|
}), /* @__PURE__ */ jsx(ChevronRight, {
|
|
1196
1187
|
size: 14,
|
|
1197
|
-
className: cn$
|
|
1188
|
+
className: cn$25("ml-auto flex-shrink-0 transition-transform duration-200", isExpanded ? "rotate-90" : "")
|
|
1198
1189
|
})] })]
|
|
1199
1190
|
}), (!collapsed || mobile) && /* @__PURE__ */ jsx("div", {
|
|
1200
1191
|
className: "overflow-hidden transition-all duration-200 ml-7 border-l-2 border-[var(--dashboard-sidebar-border,#e0dfe3)]",
|
|
@@ -1206,7 +1197,7 @@ function Sidebar({ menuItems, logo, collapsedLogo, currentPath, linkComponent: L
|
|
|
1206
1197
|
href: child.href,
|
|
1207
1198
|
className: "block",
|
|
1208
1199
|
children: /* @__PURE__ */ jsxs("div", {
|
|
1209
|
-
className: cn$
|
|
1200
|
+
className: cn$25("w-full flex items-center pl-4 pr-4 py-2 rounded-r-lg text-[13px] cursor-pointer", childActive ? "text-[var(--dashboard-sidebar-active-text,#ff521d)] font-semibold border-l-2 border-[var(--dashboard-primary,#ff521d)] -ml-[2px]" : "text-[var(--dashboard-sidebar-text,#403f52)] hover:text-[var(--dashboard-sidebar-active-text,#ff521d)]"),
|
|
1210
1201
|
style: { transition: "background-color 200ms, color 200ms" },
|
|
1211
1202
|
children: [/* @__PURE__ */ jsx(ChildIcon, {
|
|
1212
1203
|
size: 15,
|
|
@@ -1223,7 +1214,7 @@ function Sidebar({ menuItems, logo, collapsedLogo, currentPath, linkComponent: L
|
|
|
1223
1214
|
href: item.href,
|
|
1224
1215
|
className: "block",
|
|
1225
1216
|
children: /* @__PURE__ */ jsxs("div", {
|
|
1226
|
-
className: cn$
|
|
1217
|
+
className: cn$25("w-full flex items-center px-4 py-3 rounded-lg text-sm font-medium cursor-pointer", collapsed && !mobile ? "justify-center" : "justify-start", isActive ? "bg-[var(--dashboard-primary,#ff521d)]/25 text-[var(--dashboard-sidebar-active-text,#ff521d)]" : "text-[var(--dashboard-sidebar-text,#403f52)] hover:bg-[var(--dashboard-primary,#ff521d)]/10"),
|
|
1227
1218
|
style: { transition: "background-color 200ms, color 200ms" },
|
|
1228
1219
|
title: collapsed && !mobile ? item.label : void 0,
|
|
1229
1220
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
@@ -1317,7 +1308,7 @@ function Sidebar({ menuItems, logo, collapsedLogo, currentPath, linkComponent: L
|
|
|
1317
1308
|
})
|
|
1318
1309
|
})]
|
|
1319
1310
|
}), /* @__PURE__ */ jsxs("aside", {
|
|
1320
|
-
className: cn$
|
|
1311
|
+
className: cn$25("hidden xl:flex xl:flex-col xl:fixed xl:left-0 xl:top-0 xl:h-screen bg-[var(--dashboard-sidebar-bg,#f0f0f0)] border-r border-[var(--dashboard-sidebar-border,#e0dfe3)] overflow-visible", isCollapsed ? "xl:w-[109px]" : "xl:w-[280px]", className),
|
|
1321
1312
|
style: { transition: `width 400ms ${cubicBezier}` },
|
|
1322
1313
|
children: [onToggleCollapse && /* @__PURE__ */ jsxs("button", {
|
|
1323
1314
|
onClick: onToggleCollapse,
|
|
@@ -1391,7 +1382,7 @@ function Sidebar({ menuItems, logo, collapsedLogo, currentPath, linkComponent: L
|
|
|
1391
1382
|
children: [
|
|
1392
1383
|
user && /* @__PURE__ */ jsxs("button", {
|
|
1393
1384
|
onClick: onUserClick,
|
|
1394
|
-
className: cn$
|
|
1385
|
+
className: cn$25("w-full flex items-center px-4 py-3 rounded-lg bg-[var(--dashboard-primary,#ff521d)]/5 hover:bg-[var(--dashboard-primary,#ff521d)]/10 transition-colors cursor-pointer", isCollapsed ? "justify-center" : "justify-start"),
|
|
1395
1386
|
title: isCollapsed ? `${user.subtitle ? user.subtitle + " - " : ""}${user.name}` : void 0,
|
|
1396
1387
|
children: [/* @__PURE__ */ jsx("div", {
|
|
1397
1388
|
className: "flex items-center justify-center w-8 h-8 rounded-full bg-[var(--dashboard-primary,#ff521d)]/30 text-[var(--dashboard-sidebar-text,#403f52)] flex-shrink-0",
|
|
@@ -1424,7 +1415,7 @@ function Sidebar({ menuItems, logo, collapsedLogo, currentPath, linkComponent: L
|
|
|
1424
1415
|
footerItems?.map((item) => renderMenuItem(item, isCollapsed, false)),
|
|
1425
1416
|
onLogout && /* @__PURE__ */ jsxs("button", {
|
|
1426
1417
|
onClick: onLogout,
|
|
1427
|
-
className: cn$
|
|
1418
|
+
className: cn$25("w-full flex items-center px-4 py-3 rounded-lg text-sm font-medium cursor-pointer text-[var(--dashboard-sidebar-text,#403f52)] hover:bg-[var(--dashboard-primary,#ff521d)]/10", isCollapsed ? "justify-center" : "justify-start"),
|
|
1428
1419
|
style: { transition: "background-color 200ms" },
|
|
1429
1420
|
title: isCollapsed ? logoutLabel : void 0,
|
|
1430
1421
|
children: [/* @__PURE__ */ jsx(LogOut, {
|
|
@@ -1452,7 +1443,7 @@ function Sidebar({ menuItems, logo, collapsedLogo, currentPath, linkComponent: L
|
|
|
1452
1443
|
|
|
1453
1444
|
//#endregion
|
|
1454
1445
|
//#region src/components/ThemeSwitcher/index.tsx
|
|
1455
|
-
const cn$
|
|
1446
|
+
const cn$24 = (...classes) => classes.filter(Boolean).join(" ");
|
|
1456
1447
|
const modes = [
|
|
1457
1448
|
{
|
|
1458
1449
|
value: "light",
|
|
@@ -1472,11 +1463,11 @@ const modes = [
|
|
|
1472
1463
|
];
|
|
1473
1464
|
function ThemeSwitcher({ mode, onModeChange, className }) {
|
|
1474
1465
|
return /* @__PURE__ */ jsx("div", {
|
|
1475
|
-
className: cn$
|
|
1466
|
+
className: cn$24("inline-flex items-center gap-1 rounded-lg bg-[var(--dashboard-background,#f2f2f2)] p-1", className),
|
|
1476
1467
|
children: modes.map(({ value, icon: Icon, label }) => /* @__PURE__ */ jsxs("button", {
|
|
1477
1468
|
type: "button",
|
|
1478
1469
|
onClick: () => onModeChange(value),
|
|
1479
|
-
className: cn$
|
|
1470
|
+
className: cn$24("flex cursor-pointer items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors", mode === value ? "bg-[var(--dashboard-surface,#ffffff)] text-[var(--dashboard-text-primary,#2d2d2d)] shadow-sm" : "text-[var(--dashboard-text-secondary,#6b7280)] hover:text-[var(--dashboard-text-primary,#2d2d2d)]"),
|
|
1480
1471
|
title: label,
|
|
1481
1472
|
children: [/* @__PURE__ */ jsx(Icon, { size: 14 }), /* @__PURE__ */ jsx("span", { children: label })]
|
|
1482
1473
|
}, value))
|
|
@@ -1485,7 +1476,7 @@ function ThemeSwitcher({ mode, onModeChange, className }) {
|
|
|
1485
1476
|
|
|
1486
1477
|
//#endregion
|
|
1487
1478
|
//#region src/components/KPICard/index.tsx
|
|
1488
|
-
const cn$
|
|
1479
|
+
const cn$23 = (...classes) => classes.filter(Boolean).join(" ");
|
|
1489
1480
|
function formatValue(value, format) {
|
|
1490
1481
|
switch (format) {
|
|
1491
1482
|
case "currency": return new Intl.NumberFormat("pt-BR", {
|
|
@@ -1515,7 +1506,7 @@ function KPICard({ title, value, variation, trend, format = "number", benchmark,
|
|
|
1515
1506
|
if (isLoading) return /* @__PURE__ */ jsx(KPICardSkeleton, { className });
|
|
1516
1507
|
const trendConfig = trendConfigs[trend];
|
|
1517
1508
|
return /* @__PURE__ */ jsxs("div", {
|
|
1518
|
-
className: cn$
|
|
1509
|
+
className: cn$23("h-full w-full bg-[var(--dashboard-surface,#ffffff)] rounded-xl p-6 border border-[var(--dashboard-text-secondary,#64748B)]/12 transition-all duration-200 ease-out dashboard-shadow-sm hover:dashboard-shadow-md flex flex-col", className),
|
|
1519
1510
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
1520
1511
|
className: "flex justify-between items-start mb-4",
|
|
1521
1512
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
@@ -1532,7 +1523,7 @@ function KPICard({ title, value, variation, trend, format = "number", benchmark,
|
|
|
1532
1523
|
className: "text-3xl font-bold text-[var(--dashboard-text-primary,#0F172A)] whitespace-nowrap tracking-tight",
|
|
1533
1524
|
children: formatValue(value, format)
|
|
1534
1525
|
}), /* @__PURE__ */ jsxs("div", {
|
|
1535
|
-
className: cn$
|
|
1526
|
+
className: cn$23("inline-flex items-center gap-1 px-2 py-1 rounded-full flex-shrink-0 mb-1", trendConfig.color),
|
|
1536
1527
|
children: [/* @__PURE__ */ jsx("span", {
|
|
1537
1528
|
className: "text-sm",
|
|
1538
1529
|
children: trendConfig.icon
|
|
@@ -1546,7 +1537,7 @@ function KPICard({ title, value, variation, trend, format = "number", benchmark,
|
|
|
1546
1537
|
}
|
|
1547
1538
|
function KPICardSkeleton({ className }) {
|
|
1548
1539
|
return /* @__PURE__ */ jsxs("div", {
|
|
1549
|
-
className: cn$
|
|
1540
|
+
className: cn$23("h-full bg-[var(--dashboard-surface,#ffffff)] rounded-xl p-6 border border-[var(--dashboard-text-secondary,#64748B)]/12 dashboard-shadow-sm animate-pulse flex flex-col", className),
|
|
1550
1541
|
children: [/* @__PURE__ */ jsx("div", { className: "h-3 bg-[var(--dashboard-text-secondary,#64748B)]/10 rounded w-2/3 mb-4" }), /* @__PURE__ */ jsxs("div", {
|
|
1551
1542
|
className: "flex items-end gap-3 flex-1",
|
|
1552
1543
|
children: [/* @__PURE__ */ jsx("div", { className: "h-8 bg-[var(--dashboard-text-secondary,#64748B)]/10 rounded w-1/2" }), /* @__PURE__ */ jsx("div", { className: "h-5 bg-[var(--dashboard-text-secondary,#64748B)]/10 rounded-full w-1/4" })]
|
|
@@ -1556,13 +1547,13 @@ function KPICardSkeleton({ className }) {
|
|
|
1556
1547
|
|
|
1557
1548
|
//#endregion
|
|
1558
1549
|
//#region src/components/PageLayout/index.tsx
|
|
1559
|
-
const cn$
|
|
1550
|
+
const cn$22 = (...classes) => classes.filter(Boolean).join(" ");
|
|
1560
1551
|
function PageLayout({ title, description, headerActions, children, contentPadding = true, sidebar, sidebarCollapsed = false, sidebarWidth = 280, sidebarCollapsedWidth = 109, className }) {
|
|
1561
1552
|
const marginLeft = sidebar ? sidebarCollapsed ? `max(0px, ${sidebarCollapsedWidth}px)` : `max(0px, ${sidebarWidth}px)` : "0px";
|
|
1562
1553
|
return /* @__PURE__ */ jsxs("div", {
|
|
1563
|
-
className: cn$
|
|
1554
|
+
className: cn$22("min-h-screen bg-[var(--dashboard-background,#f2f2f2)]", className),
|
|
1564
1555
|
children: [sidebar, /* @__PURE__ */ jsxs("main", {
|
|
1565
|
-
className: cn$
|
|
1556
|
+
className: cn$22("pt-16 xl:pt-0", !sidebar && "pt-0"),
|
|
1566
1557
|
style: {
|
|
1567
1558
|
marginLeft,
|
|
1568
1559
|
transition: "margin-left 400ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
@@ -1600,7 +1591,7 @@ function PageLayout({ title, description, headerActions, children, contentPaddin
|
|
|
1600
1591
|
//#endregion
|
|
1601
1592
|
//#region src/components/ComparisonLineChart/index.tsx
|
|
1602
1593
|
Chart.register(CategoryScale, LinearScale, PointElement, LineElement, Title$1, Tooltip$1, Legend, Filler);
|
|
1603
|
-
const cn$
|
|
1594
|
+
const cn$21 = (...classes) => classes.filter(Boolean).join(" ");
|
|
1604
1595
|
function ComparisonLineChart({ labels, currentPeriodData, previousPeriodData, currentPeriodLabel = "Período atual", previousPeriodLabel = "Período anterior", title, color, height = 300, className }) {
|
|
1605
1596
|
const primaryColor = color || (typeof document !== "undefined" ? getComputedStyle(document.documentElement).getPropertyValue("--dashboard-primary").trim() : "") || "#37a501";
|
|
1606
1597
|
const data = {
|
|
@@ -1694,7 +1685,7 @@ function ComparisonLineChart({ labels, currentPeriodData, previousPeriodData, cu
|
|
|
1694
1685
|
}
|
|
1695
1686
|
};
|
|
1696
1687
|
return /* @__PURE__ */ jsxs("div", {
|
|
1697
|
-
className: cn$
|
|
1688
|
+
className: cn$21("bg-[var(--dashboard-surface,#ffffff)] rounded-lg shadow-sm border border-[var(--dashboard-text-secondary,#6b7280)]/20 p-6", className),
|
|
1698
1689
|
children: [title && /* @__PURE__ */ jsx("h3", {
|
|
1699
1690
|
className: "text-base font-semibold mb-4 text-[var(--dashboard-text-primary,#2d2d2d)]",
|
|
1700
1691
|
children: title
|
|
@@ -1711,7 +1702,7 @@ function ComparisonLineChart({ labels, currentPeriodData, previousPeriodData, cu
|
|
|
1711
1702
|
//#endregion
|
|
1712
1703
|
//#region src/components/HorizontalBarChart/index.tsx
|
|
1713
1704
|
Chart.register(CategoryScale, LinearScale, BarElement, Title$1, Tooltip$1, Legend);
|
|
1714
|
-
const cn$
|
|
1705
|
+
const cn$20 = (...classes) => classes.filter(Boolean).join(" ");
|
|
1715
1706
|
function HorizontalBarChart({ labels, datasets, tabs, title, titleIcon, color, valueLabel = "itens", valueLabelSingular, bestItemLabel = "Melhor item", className }) {
|
|
1716
1707
|
const [activeTab, setActiveTab] = useState((tabs ? tabs.map((t) => t.id) : Object.keys(datasets))[0]);
|
|
1717
1708
|
const [isMobile, setIsMobile] = useState(false);
|
|
@@ -1786,7 +1777,7 @@ function HorizontalBarChart({ labels, datasets, tabs, title, titleIcon, color, v
|
|
|
1786
1777
|
}
|
|
1787
1778
|
};
|
|
1788
1779
|
return /* @__PURE__ */ jsxs("div", {
|
|
1789
|
-
className: cn$
|
|
1780
|
+
className: cn$20("bg-[var(--dashboard-surface,#ffffff)] rounded-lg shadow-sm border border-[var(--dashboard-text-secondary,#6b7280)]/20 p-5 sm:p-6 min-h-[850px] sm:h-full flex flex-col", className),
|
|
1790
1781
|
children: [
|
|
1791
1782
|
title && /* @__PURE__ */ jsxs("div", {
|
|
1792
1783
|
className: "flex items-center gap-2 mb-4",
|
|
@@ -1799,7 +1790,7 @@ function HorizontalBarChart({ labels, datasets, tabs, title, titleIcon, color, v
|
|
|
1799
1790
|
className: "flex gap-2 mb-4 flex-wrap",
|
|
1800
1791
|
children: tabs.map((tab) => /* @__PURE__ */ jsx("button", {
|
|
1801
1792
|
onClick: () => setActiveTab(tab.id),
|
|
1802
|
-
className: cn$
|
|
1793
|
+
className: cn$20("px-3.5 py-2 sm:px-4 sm:py-2 rounded-full text-sm font-medium transition-colors whitespace-nowrap cursor-pointer", activeTab === tab.id ? "bg-[var(--dashboard-primary,#37a501)] text-white" : "bg-[var(--dashboard-text-secondary,#6b7280)]/10 text-[var(--dashboard-text-secondary,#6b7280)] hover:bg-[var(--dashboard-text-secondary,#6b7280)]/20"),
|
|
1803
1794
|
children: tab.label
|
|
1804
1795
|
}, tab.id))
|
|
1805
1796
|
}),
|
|
@@ -1838,7 +1829,7 @@ function HorizontalBarChart({ labels, datasets, tabs, title, titleIcon, color, v
|
|
|
1838
1829
|
//#endregion
|
|
1839
1830
|
//#region src/components/VerticalBarChart/index.tsx
|
|
1840
1831
|
Chart.register(CategoryScale, LinearScale, BarElement, Title$1, Tooltip$1, Legend);
|
|
1841
|
-
const cn$
|
|
1832
|
+
const cn$19 = (...classes) => classes.filter(Boolean).join(" ");
|
|
1842
1833
|
function VerticalBarChart({ labels, data: values, title, titleIcon, color, valueLabel = "itens", valueLabelSingular, bestItemLabel = "Melhor item", labelMaxChars = 3, className }) {
|
|
1843
1834
|
const maxValue = Math.max(...values);
|
|
1844
1835
|
const bestLabel = labels[values.indexOf(maxValue)];
|
|
@@ -1901,7 +1892,7 @@ function VerticalBarChart({ labels, data: values, title, titleIcon, color, value
|
|
|
1901
1892
|
}
|
|
1902
1893
|
};
|
|
1903
1894
|
return /* @__PURE__ */ jsxs("div", {
|
|
1904
|
-
className: cn$
|
|
1895
|
+
className: cn$19("bg-[var(--dashboard-surface,#ffffff)] rounded-lg shadow-sm border border-[var(--dashboard-text-secondary,#6b7280)]/20 p-6 flex-1 flex flex-col", className),
|
|
1905
1896
|
children: [
|
|
1906
1897
|
title && /* @__PURE__ */ jsxs("div", {
|
|
1907
1898
|
className: "flex items-center gap-2 mb-4",
|
|
@@ -1957,7 +1948,7 @@ const DEFAULT_COLORS = [
|
|
|
1957
1948
|
"#EA580C",
|
|
1958
1949
|
"#4F46E5"
|
|
1959
1950
|
];
|
|
1960
|
-
const cn$
|
|
1951
|
+
const cn$18 = (...classes) => classes.filter(Boolean).join(" ");
|
|
1961
1952
|
function DoughnutChart({ items, title, titleIcon, centerLabel, centerValue, showLegend = true, formatValue, cutout = 65, height = 240, className }) {
|
|
1962
1953
|
const total = items.reduce((sum, item) => sum + item.value, 0);
|
|
1963
1954
|
const format = formatValue || ((v) => String(v));
|
|
@@ -1997,7 +1988,7 @@ function DoughnutChart({ items, title, titleIcon, centerLabel, centerValue, show
|
|
|
1997
1988
|
}
|
|
1998
1989
|
};
|
|
1999
1990
|
return /* @__PURE__ */ jsxs("div", {
|
|
2000
|
-
className: cn$
|
|
1991
|
+
className: cn$18("bg-[var(--dashboard-surface,#ffffff)] rounded-lg shadow-sm border border-[var(--dashboard-text-secondary,#6b7280)]/20 p-6", className),
|
|
2001
1992
|
children: [title && /* @__PURE__ */ jsxs("div", {
|
|
2002
1993
|
className: "flex items-center gap-2 mb-4",
|
|
2003
1994
|
children: [titleIcon, /* @__PURE__ */ jsx("h3", {
|
|
@@ -2005,7 +1996,7 @@ function DoughnutChart({ items, title, titleIcon, centerLabel, centerValue, show
|
|
|
2005
1996
|
children: title
|
|
2006
1997
|
})]
|
|
2007
1998
|
}), /* @__PURE__ */ jsxs("div", {
|
|
2008
|
-
className: cn$
|
|
1999
|
+
className: cn$18("flex items-center", showLegend ? "gap-6" : "justify-center"),
|
|
2009
2000
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
2010
2001
|
className: "relative flex-shrink-0",
|
|
2011
2002
|
style: {
|
|
@@ -2058,7 +2049,7 @@ function DoughnutChart({ items, title, titleIcon, centerLabel, centerValue, show
|
|
|
2058
2049
|
|
|
2059
2050
|
//#endregion
|
|
2060
2051
|
//#region src/components/ProgressBarList/index.tsx
|
|
2061
|
-
const cn$
|
|
2052
|
+
const cn$17 = (...classes) => classes.filter(Boolean).join(" ");
|
|
2062
2053
|
function ProgressBarList({ items, title, titleIcon, color, valueLabel = "itens", valueLabelSingular, sortByValue = true, formatValue, className }) {
|
|
2063
2054
|
const sortedItems = sortByValue ? [...items].sort((a, b) => b.value - a.value) : items;
|
|
2064
2055
|
const maxValue = Math.max(...items.map((i) => i.value));
|
|
@@ -2067,7 +2058,7 @@ function ProgressBarList({ items, title, titleIcon, color, valueLabel = "itens",
|
|
|
2067
2058
|
const defaultFormat = (v) => `${v} ${v === 1 ? singular : valueLabel}`;
|
|
2068
2059
|
const fmt = formatValue || defaultFormat;
|
|
2069
2060
|
return /* @__PURE__ */ jsxs("div", {
|
|
2070
|
-
className: cn$
|
|
2061
|
+
className: cn$17("bg-[var(--dashboard-surface,#ffffff)] rounded-lg shadow-sm border border-[var(--dashboard-text-secondary,#6b7280)]/20 p-6 flex-1 flex flex-col", className),
|
|
2071
2062
|
children: [title && /* @__PURE__ */ jsxs("div", {
|
|
2072
2063
|
className: "flex items-center gap-2 mb-4",
|
|
2073
2064
|
children: [titleIcon, /* @__PURE__ */ jsx("h3", {
|
|
@@ -2116,7 +2107,7 @@ function ProgressBarList({ items, title, titleIcon, color, valueLabel = "itens",
|
|
|
2116
2107
|
//#endregion
|
|
2117
2108
|
//#region src/components/MetricPanel/index.tsx
|
|
2118
2109
|
Chart.register(CategoryScale, LinearScale, PointElement, LineElement, Title$1, Tooltip$1, Legend, Filler);
|
|
2119
|
-
const cn$
|
|
2110
|
+
const cn$16 = (...classes) => classes.filter(Boolean).join(" ");
|
|
2120
2111
|
function MetricPanel({ title, titleIcon: TitleIcon, metrics, chartData, color, secondaryColor, onActionClick, actionLabel, isLoading = false, className }) {
|
|
2121
2112
|
const [selectedMetricKey, setSelectedMetricKey] = useState(metrics[0]?.key);
|
|
2122
2113
|
const [isMobile, setIsMobile] = useState(false);
|
|
@@ -2214,7 +2205,7 @@ function MetricPanel({ title, titleIcon: TitleIcon, metrics, chartData, color, s
|
|
|
2214
2205
|
}
|
|
2215
2206
|
};
|
|
2216
2207
|
return /* @__PURE__ */ jsxs("div", {
|
|
2217
|
-
className: cn$
|
|
2208
|
+
className: cn$16("bg-[var(--dashboard-surface,#ffffff)] rounded-lg shadow-sm border border-[var(--dashboard-text-secondary,#6b7280)]/20", className),
|
|
2218
2209
|
style: { overflow: "visible" },
|
|
2219
2210
|
children: [
|
|
2220
2211
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -2255,7 +2246,7 @@ function MetricPanel({ title, titleIcon: TitleIcon, metrics, chartData, color, s
|
|
|
2255
2246
|
const Icon = metric.icon;
|
|
2256
2247
|
return /* @__PURE__ */ jsxs("button", {
|
|
2257
2248
|
onClick: () => setSelectedMetricKey(metric.key),
|
|
2258
|
-
className: cn$
|
|
2249
|
+
className: cn$16("flex items-center gap-2 px-4 md:px-6 py-2 rounded-full text-sm font-medium transition-colors cursor-pointer", selectedMetricKey === metric.key ? "bg-[var(--dashboard-surface,#ffffff)] border-2 text-[var(--dashboard-primary,#37a501)]" : "bg-[var(--dashboard-surface,#ffffff)] border border-[var(--dashboard-text-secondary,#6b7280)]/30 text-[var(--dashboard-text-secondary,#6b7280)] hover:border-[var(--dashboard-text-secondary,#6b7280)]/50"),
|
|
2259
2250
|
style: selectedMetricKey === metric.key ? {
|
|
2260
2251
|
borderColor: primaryColor,
|
|
2261
2252
|
color: primaryColor
|
|
@@ -2303,10 +2294,10 @@ function MetricPanel({ title, titleIcon: TitleIcon, metrics, chartData, color, s
|
|
|
2303
2294
|
|
|
2304
2295
|
//#endregion
|
|
2305
2296
|
//#region src/components/FilterBar/index.tsx
|
|
2306
|
-
const cn$
|
|
2297
|
+
const cn$15 = (...classes) => classes.filter(Boolean).join(" ");
|
|
2307
2298
|
function FilterBar({ searchValue, onSearchChange, searchPlaceholder = "Buscar...", children, actions, className }) {
|
|
2308
2299
|
return /* @__PURE__ */ jsxs("div", {
|
|
2309
|
-
className: cn$
|
|
2300
|
+
className: cn$15("flex flex-col gap-3 sm:flex-row sm:items-center sm:flex-wrap", className),
|
|
2310
2301
|
children: [
|
|
2311
2302
|
onSearchChange !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
2312
2303
|
className: "flex-1 min-w-[200px]",
|
|
@@ -2346,7 +2337,7 @@ function FilterBar({ searchValue, onSearchChange, searchPlaceholder = "Buscar...
|
|
|
2346
2337
|
|
|
2347
2338
|
//#endregion
|
|
2348
2339
|
//#region src/components/Checkbox/index.tsx
|
|
2349
|
-
const cn$
|
|
2340
|
+
const cn$14 = (...classes) => classes.filter(Boolean).join(" ");
|
|
2350
2341
|
const sizeConfig = {
|
|
2351
2342
|
sm: {
|
|
2352
2343
|
box: 16,
|
|
@@ -2394,7 +2385,7 @@ function Checkbox({ name, id, label, checked = false, onChange, disabled = false
|
|
|
2394
2385
|
const resolvedColor = primaryColor || "var(--dashboard-primary, #37A501)";
|
|
2395
2386
|
return /* @__PURE__ */ jsxs("label", {
|
|
2396
2387
|
htmlFor: inputId,
|
|
2397
|
-
className: cn$
|
|
2388
|
+
className: cn$14("inline-flex items-center cursor-pointer select-none", disabled && "opacity-50 cursor-not-allowed", className),
|
|
2398
2389
|
style: { gap: cfg.gap },
|
|
2399
2390
|
children: [
|
|
2400
2391
|
/* @__PURE__ */ jsx("input", {
|
|
@@ -2445,7 +2436,7 @@ function Checkbox({ name, id, label, checked = false, onChange, disabled = false
|
|
|
2445
2436
|
|
|
2446
2437
|
//#endregion
|
|
2447
2438
|
//#region src/components/AuthLayout/index.tsx
|
|
2448
|
-
const cn$
|
|
2439
|
+
const cn$13 = (...classes) => classes.filter(Boolean).join(" ");
|
|
2449
2440
|
/** Resolves a CSS color value (including var() references) to a computed hex/rgb string */
|
|
2450
2441
|
function useResolvedColor(cssValue) {
|
|
2451
2442
|
const [resolved, setResolved] = useState(cssValue);
|
|
@@ -2612,7 +2603,7 @@ function AuthLayout({ logo, title, subtitle, error, success, fields, values, onF
|
|
|
2612
2603
|
if (link.onClick) return /* @__PURE__ */ jsx("button", {
|
|
2613
2604
|
type: "button",
|
|
2614
2605
|
onClick: link.onClick,
|
|
2615
|
-
className: cn$
|
|
2606
|
+
className: cn$13("bg-transparent border-none cursor-pointer hover:opacity-80 text-sm font-semibold p-0 transition-colors", extraClass),
|
|
2616
2607
|
style,
|
|
2617
2608
|
children: link.label
|
|
2618
2609
|
});
|
|
@@ -2620,13 +2611,13 @@ function AuthLayout({ logo, title, subtitle, error, success, fields, values, onF
|
|
|
2620
2611
|
href: link.href,
|
|
2621
2612
|
target: link.target,
|
|
2622
2613
|
rel: link.target === "_blank" ? "noopener noreferrer" : void 0,
|
|
2623
|
-
className: cn$
|
|
2614
|
+
className: cn$13("hover:opacity-80 text-sm font-semibold transition-colors", extraClass),
|
|
2624
2615
|
style,
|
|
2625
2616
|
children: link.label
|
|
2626
2617
|
});
|
|
2627
2618
|
}
|
|
2628
2619
|
return /* @__PURE__ */ jsxs("div", {
|
|
2629
|
-
className: cn$
|
|
2620
|
+
className: cn$13("fixed inset-0 flex select-none overflow-hidden", className),
|
|
2630
2621
|
style: bgCss,
|
|
2631
2622
|
children: [
|
|
2632
2623
|
branding && branding.logos.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
@@ -2909,7 +2900,7 @@ function CodeInput({ length = 6, value, onChange, disabled = false, error = fals
|
|
|
2909
2900
|
|
|
2910
2901
|
//#endregion
|
|
2911
2902
|
//#region src/components/Skeleton/index.tsx
|
|
2912
|
-
const cn$
|
|
2903
|
+
const cn$12 = (...classes) => classes.filter(Boolean).join(" ");
|
|
2913
2904
|
function Skeleton({ variant = "text", width, height, animate = true, className, lines = 1 }) {
|
|
2914
2905
|
const baseStyles = "bg-[var(--dashboard-text-secondary,#6b7280)]/10 relative overflow-hidden";
|
|
2915
2906
|
const shimmerStyles = animate ? "after:absolute after:inset-0 after:bg-gradient-to-r after:from-transparent after:via-[var(--dashboard-text-secondary,#6b7280)]/5 after:to-transparent dashboard-animate-shimmer after:content-['']" : "";
|
|
@@ -2928,9 +2919,9 @@ function Skeleton({ variant = "text", width, height, animate = true, className,
|
|
|
2928
2919
|
}
|
|
2929
2920
|
if (variant === "card" && !height) style.height = "120px";
|
|
2930
2921
|
if (variant === "text" && lines > 1) return /* @__PURE__ */ jsx("div", {
|
|
2931
|
-
className: cn$
|
|
2922
|
+
className: cn$12("flex flex-col gap-2", className),
|
|
2932
2923
|
children: Array.from({ length: lines }).map((_, i) => /* @__PURE__ */ jsx("div", {
|
|
2933
|
-
className: cn$
|
|
2924
|
+
className: cn$12(baseStyles, shimmerStyles, variantStyles.text),
|
|
2934
2925
|
style: {
|
|
2935
2926
|
...style,
|
|
2936
2927
|
width: i === lines - 1 ? "75%" : style.width || "100%"
|
|
@@ -2938,14 +2929,14 @@ function Skeleton({ variant = "text", width, height, animate = true, className,
|
|
|
2938
2929
|
}, i))
|
|
2939
2930
|
});
|
|
2940
2931
|
return /* @__PURE__ */ jsx("div", {
|
|
2941
|
-
className: cn$
|
|
2932
|
+
className: cn$12(baseStyles, shimmerStyles, variantStyles[variant], className),
|
|
2942
2933
|
style
|
|
2943
2934
|
});
|
|
2944
2935
|
}
|
|
2945
2936
|
|
|
2946
2937
|
//#endregion
|
|
2947
2938
|
//#region src/components/DataGrid/index.tsx
|
|
2948
|
-
const cn$
|
|
2939
|
+
const cn$11 = (...classes) => classes.filter(Boolean).join(" ");
|
|
2949
2940
|
function SortIcon({ sorted }) {
|
|
2950
2941
|
if (sorted === "asc") return /* @__PURE__ */ jsx(ArrowUp, { className: "h-3.5 w-3.5" });
|
|
2951
2942
|
if (sorted === "desc") return /* @__PURE__ */ jsx(ArrowDown, { className: "h-3.5 w-3.5" });
|
|
@@ -3000,7 +2991,7 @@ function VirtualRows({ table, rowHeight, onRowClick, compact }) {
|
|
|
3000
2991
|
className: "bg-[var(--dashboard-text-secondary,#6b7280)]/5 sticky top-0 z-10",
|
|
3001
2992
|
children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx("tr", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx("th", {
|
|
3002
2993
|
scope: "col",
|
|
3003
|
-
className: cn$
|
|
2994
|
+
className: cn$11("text-left text-xs font-semibold text-[var(--dashboard-text-secondary,#6b7280)] uppercase tracking-wider", compact ? "px-4 py-2" : "px-6 py-3", header.column.getCanSort() && "cursor-pointer select-none"),
|
|
3004
2995
|
style: { width: header.getSize() },
|
|
3005
2996
|
onClick: header.column.getToggleSortingHandler(),
|
|
3006
2997
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -3015,10 +3006,10 @@ function VirtualRows({ table, rowHeight, onRowClick, compact }) {
|
|
|
3015
3006
|
}),
|
|
3016
3007
|
visibleRows.map((row) => /* @__PURE__ */ jsx("tr", {
|
|
3017
3008
|
onClick: () => onRowClick?.(row.original),
|
|
3018
|
-
className: cn$
|
|
3009
|
+
className: cn$11("hover:bg-[var(--dashboard-text-secondary,#6b7280)]/5 transition-colors", onRowClick && "cursor-pointer", row.getIsSelected() && "bg-[var(--dashboard-primary,#37a501)]/5"),
|
|
3019
3010
|
style: { height: rowHeight },
|
|
3020
3011
|
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx("td", {
|
|
3021
|
-
className: cn$
|
|
3012
|
+
className: cn$11(cellPadding, "text-sm whitespace-nowrap"),
|
|
3022
3013
|
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
3023
3014
|
}, cell.id))
|
|
3024
3015
|
}, row.id)),
|
|
@@ -3097,7 +3088,7 @@ function DataGrid({ columns, data, isLoading = false, skeletonRows = 5, sorting:
|
|
|
3097
3088
|
const cellPadding = compact ? "px-4 py-2" : "px-6 py-4";
|
|
3098
3089
|
const headerPadding = compact ? "px-4 py-2" : "px-6 py-3";
|
|
3099
3090
|
if (enableVirtualization) return /* @__PURE__ */ jsx("div", {
|
|
3100
|
-
className: cn$
|
|
3091
|
+
className: cn$11("overflow-hidden rounded-lg bg-[var(--dashboard-surface,#ffffff)] shadow-sm", bordered && "border border-[var(--dashboard-text-secondary,#6b7280)]/20", className),
|
|
3101
3092
|
children: /* @__PURE__ */ jsx(VirtualRows, {
|
|
3102
3093
|
table,
|
|
3103
3094
|
rowHeight,
|
|
@@ -3106,16 +3097,16 @@ function DataGrid({ columns, data, isLoading = false, skeletonRows = 5, sorting:
|
|
|
3106
3097
|
})
|
|
3107
3098
|
});
|
|
3108
3099
|
return /* @__PURE__ */ jsxs("div", {
|
|
3109
|
-
className: cn$
|
|
3100
|
+
className: cn$11("overflow-hidden rounded-lg bg-[var(--dashboard-surface,#ffffff)] shadow-sm", bordered && "border border-[var(--dashboard-text-secondary,#6b7280)]/20", className),
|
|
3110
3101
|
children: [/* @__PURE__ */ jsx("div", {
|
|
3111
3102
|
className: "overflow-x-auto",
|
|
3112
3103
|
children: /* @__PURE__ */ jsxs("table", {
|
|
3113
3104
|
className: "min-w-full divide-y divide-[var(--dashboard-text-secondary,#6b7280)]/20",
|
|
3114
3105
|
children: [/* @__PURE__ */ jsx("thead", {
|
|
3115
|
-
className: cn$
|
|
3106
|
+
className: cn$11("bg-[var(--dashboard-text-secondary,#6b7280)]/5", stickyHeader && "sticky top-0 z-10"),
|
|
3116
3107
|
children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx("tr", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx("th", {
|
|
3117
3108
|
scope: "col",
|
|
3118
|
-
className: cn$
|
|
3109
|
+
className: cn$11("text-left text-xs font-semibold text-[var(--dashboard-text-secondary,#6b7280)] uppercase tracking-wider", headerPadding, header.column.getCanSort() && "cursor-pointer select-none"),
|
|
3119
3110
|
style: header.getSize() !== 150 ? { width: header.getSize() } : void 0,
|
|
3120
3111
|
onClick: header.column.getToggleSortingHandler(),
|
|
3121
3112
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -3152,9 +3143,9 @@ function DataGrid({ columns, data, isLoading = false, skeletonRows = 5, sorting:
|
|
|
3152
3143
|
})
|
|
3153
3144
|
}) }) : table.getRowModel().rows.map((row, rowIndex) => /* @__PURE__ */ jsx("tr", {
|
|
3154
3145
|
onClick: () => onRowClick?.(row.original),
|
|
3155
|
-
className: cn$
|
|
3146
|
+
className: cn$11("transition-colors", onRowClick && "cursor-pointer", "hover:bg-[var(--dashboard-text-secondary,#6b7280)]/5", row.getIsSelected() && "bg-[var(--dashboard-primary,#37a501)]/5", striped && rowIndex % 2 === 1 && "bg-[var(--dashboard-text-secondary,#6b7280)]/3"),
|
|
3156
3147
|
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx("td", {
|
|
3157
|
-
className: cn$
|
|
3148
|
+
className: cn$11(cellPadding, "text-sm text-[var(--dashboard-text-primary,#2d2d2d)]"),
|
|
3158
3149
|
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
3159
3150
|
}, cell.id))
|
|
3160
3151
|
}, row.id))
|
|
@@ -3215,7 +3206,7 @@ function DataGrid({ columns, data, isLoading = false, skeletonRows = 5, sorting:
|
|
|
3215
3206
|
|
|
3216
3207
|
//#endregion
|
|
3217
3208
|
//#region src/components/TreeView/index.tsx
|
|
3218
|
-
const cn$
|
|
3209
|
+
const cn$10 = (...classes) => classes.filter(Boolean).join(" ");
|
|
3219
3210
|
function TreeItem({ node, level, expanded, selectedId, draggable, indentSize, onSelect, onToggle, onMove, renderNode, dragState, setDragState }) {
|
|
3220
3211
|
const hasChildren = node.children && node.children.length > 0;
|
|
3221
3212
|
const isExpanded = expanded.has(node.id);
|
|
@@ -3280,7 +3271,7 @@ function TreeItem({ node, level, expanded, selectedId, draggable, indentSize, on
|
|
|
3280
3271
|
"aria-expanded": hasChildren ? isExpanded : void 0,
|
|
3281
3272
|
"aria-selected": isSelected,
|
|
3282
3273
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
3283
|
-
className: cn$
|
|
3274
|
+
className: cn$10("group flex items-center gap-1 rounded-md px-2 py-1.5 transition-colors", isSelected ? "bg-[var(--dashboard-primary,#37a501)]/10 text-[var(--dashboard-primary,#37a501)]" : "hover:bg-[var(--dashboard-text-secondary,#6b7280)]/10 text-[var(--dashboard-text-primary,#2d2d2d)]", isDragging && "opacity-40", isDropTarget && dragState.position === "inside" && "ring-2 ring-[var(--dashboard-primary,#37a501)] ring-inset", node.disabled && "opacity-50 cursor-not-allowed"),
|
|
3284
3275
|
style: { paddingLeft: `${level * indentSize + 4}px` },
|
|
3285
3276
|
draggable: draggable && !node.disabled,
|
|
3286
3277
|
onDragStart: handleDragStart,
|
|
@@ -3298,10 +3289,10 @@ function TreeItem({ node, level, expanded, selectedId, draggable, indentSize, on
|
|
|
3298
3289
|
/* @__PURE__ */ jsx("button", {
|
|
3299
3290
|
type: "button",
|
|
3300
3291
|
onClick: () => hasChildren && onToggle(node.id),
|
|
3301
|
-
className: cn$
|
|
3292
|
+
className: cn$10("flex-shrink-0 w-5 h-5 flex items-center justify-center rounded transition-transform", hasChildren ? "cursor-pointer" : "invisible"),
|
|
3302
3293
|
tabIndex: hasChildren ? 0 : -1,
|
|
3303
3294
|
"aria-label": isExpanded ? "Recolher" : "Expandir",
|
|
3304
|
-
children: /* @__PURE__ */ jsx(ChevronRight, { className: cn$
|
|
3295
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: cn$10("h-3.5 w-3.5 transition-transform duration-150", isExpanded && "rotate-90") })
|
|
3305
3296
|
}),
|
|
3306
3297
|
renderNode ? /* @__PURE__ */ jsx("div", {
|
|
3307
3298
|
className: "flex-1 min-w-0 cursor-pointer",
|
|
@@ -3313,7 +3304,7 @@ function TreeItem({ node, level, expanded, selectedId, draggable, indentSize, on
|
|
|
3313
3304
|
children: node.icon
|
|
3314
3305
|
}),
|
|
3315
3306
|
/* @__PURE__ */ jsx("span", {
|
|
3316
|
-
className: cn$
|
|
3307
|
+
className: cn$10("flex-1 min-w-0 text-sm truncate", !node.disabled && "cursor-pointer"),
|
|
3317
3308
|
onClick: () => !node.disabled && onSelect?.(node),
|
|
3318
3309
|
children: node.label
|
|
3319
3310
|
}),
|
|
@@ -3366,7 +3357,7 @@ function TreeView({ nodes, onSelect, onExpand, onMove, renderNode, selectedId, d
|
|
|
3366
3357
|
}, [onExpand]);
|
|
3367
3358
|
return /* @__PURE__ */ jsx("ul", {
|
|
3368
3359
|
role: "tree",
|
|
3369
|
-
className: cn$
|
|
3360
|
+
className: cn$10("select-none", className),
|
|
3370
3361
|
children: nodes.map((node) => /* @__PURE__ */ jsx(TreeItem, {
|
|
3371
3362
|
node,
|
|
3372
3363
|
level: 0,
|
|
@@ -3386,7 +3377,7 @@ function TreeView({ nodes, onSelect, onExpand, onMove, renderNode, selectedId, d
|
|
|
3386
3377
|
|
|
3387
3378
|
//#endregion
|
|
3388
3379
|
//#region src/components/Stepper/index.tsx
|
|
3389
|
-
const cn$
|
|
3380
|
+
const cn$9 = (...classes) => classes.filter(Boolean).join(" ");
|
|
3390
3381
|
function StepIcon({ step, index }) {
|
|
3391
3382
|
const status = step.status || "pending";
|
|
3392
3383
|
if (status === "completed") return /* @__PURE__ */ jsx("div", {
|
|
@@ -3430,17 +3421,17 @@ function Stepper({ steps, activeStep, onStepChange, orientation = "horizontal",
|
|
|
3430
3421
|
type: "button",
|
|
3431
3422
|
onClick: () => onStepChange?.(index),
|
|
3432
3423
|
disabled: !onStepChange,
|
|
3433
|
-
className: cn$
|
|
3424
|
+
className: cn$9("relative z-10", onStepChange && "cursor-pointer", !onStepChange && "cursor-default"),
|
|
3434
3425
|
"aria-current": step.status === "active" ? "step" : void 0,
|
|
3435
3426
|
children: /* @__PURE__ */ jsx(StepIcon, {
|
|
3436
3427
|
step,
|
|
3437
3428
|
index
|
|
3438
3429
|
})
|
|
3439
|
-
}), index < resolvedSteps.length - 1 && /* @__PURE__ */ jsx("div", { className: cn$
|
|
3430
|
+
}), index < resolvedSteps.length - 1 && /* @__PURE__ */ jsx("div", { className: cn$9("w-0.5 flex-1 min-h-[32px]", step.status === "completed" ? "bg-[var(--dashboard-primary,#37a501)]" : "bg-[var(--dashboard-text-secondary,#6b7280)]/20") })]
|
|
3440
3431
|
}), /* @__PURE__ */ jsxs("div", {
|
|
3441
|
-
className: cn$
|
|
3432
|
+
className: cn$9("pb-6", index === resolvedSteps.length - 1 && "pb-0"),
|
|
3442
3433
|
children: [/* @__PURE__ */ jsx("p", {
|
|
3443
|
-
className: cn$
|
|
3434
|
+
className: cn$9("text-sm font-medium leading-8", step.status === "active" ? "text-[var(--dashboard-primary,#37a501)]" : step.status === "completed" ? "text-[var(--dashboard-text-primary,#2d2d2d)]" : step.status === "error" ? "text-[var(--dashboard-status-danger,#EF4444)]" : "text-[var(--dashboard-text-secondary,#6b7280)]"),
|
|
3444
3435
|
children: step.label
|
|
3445
3436
|
}), step.description && /* @__PURE__ */ jsx("p", {
|
|
3446
3437
|
className: "text-xs text-[var(--dashboard-text-secondary,#6b7280)] mt-0.5",
|
|
@@ -3456,12 +3447,12 @@ function Stepper({ steps, activeStep, onStepChange, orientation = "horizontal",
|
|
|
3456
3447
|
children: /* @__PURE__ */ jsx("ol", {
|
|
3457
3448
|
className: "flex items-center",
|
|
3458
3449
|
children: resolvedSteps.map((step, index) => /* @__PURE__ */ jsxs("li", {
|
|
3459
|
-
className: cn$
|
|
3450
|
+
className: cn$9("flex items-center", index < resolvedSteps.length - 1 && "flex-1"),
|
|
3460
3451
|
children: [/* @__PURE__ */ jsxs("button", {
|
|
3461
3452
|
type: "button",
|
|
3462
3453
|
onClick: () => onStepChange?.(index),
|
|
3463
3454
|
disabled: !onStepChange,
|
|
3464
|
-
className: cn$
|
|
3455
|
+
className: cn$9("flex items-center gap-2 group", onStepChange && "cursor-pointer", !onStepChange && "cursor-default"),
|
|
3465
3456
|
"aria-current": step.status === "active" ? "step" : void 0,
|
|
3466
3457
|
children: [/* @__PURE__ */ jsx(StepIcon, {
|
|
3467
3458
|
step,
|
|
@@ -3469,14 +3460,14 @@ function Stepper({ steps, activeStep, onStepChange, orientation = "horizontal",
|
|
|
3469
3460
|
}), /* @__PURE__ */ jsxs("div", {
|
|
3470
3461
|
className: "hidden sm:block text-left",
|
|
3471
3462
|
children: [/* @__PURE__ */ jsx("p", {
|
|
3472
|
-
className: cn$
|
|
3463
|
+
className: cn$9("text-sm font-medium whitespace-nowrap", step.status === "active" ? "text-[var(--dashboard-primary,#37a501)]" : step.status === "completed" ? "text-[var(--dashboard-text-primary,#2d2d2d)]" : step.status === "error" ? "text-[var(--dashboard-status-danger,#EF4444)]" : "text-[var(--dashboard-text-secondary,#6b7280)]"),
|
|
3473
3464
|
children: step.label
|
|
3474
3465
|
}), step.description && /* @__PURE__ */ jsx("p", {
|
|
3475
3466
|
className: "text-xs text-[var(--dashboard-text-secondary,#6b7280)] whitespace-nowrap",
|
|
3476
3467
|
children: step.description
|
|
3477
3468
|
})]
|
|
3478
3469
|
})]
|
|
3479
|
-
}), index < resolvedSteps.length - 1 && /* @__PURE__ */ jsx("div", { className: cn$
|
|
3470
|
+
}), index < resolvedSteps.length - 1 && /* @__PURE__ */ jsx("div", { className: cn$9("flex-1 h-0.5 mx-3", step.status === "completed" ? "bg-[var(--dashboard-primary,#37a501)]" : "bg-[var(--dashboard-text-secondary,#6b7280)]/20") })]
|
|
3480
3471
|
}, step.id))
|
|
3481
3472
|
})
|
|
3482
3473
|
});
|
|
@@ -3484,7 +3475,7 @@ function Stepper({ steps, activeStep, onStepChange, orientation = "horizontal",
|
|
|
3484
3475
|
|
|
3485
3476
|
//#endregion
|
|
3486
3477
|
//#region src/components/FileUpload/index.tsx
|
|
3487
|
-
const cn$
|
|
3478
|
+
const cn$8 = (...classes) => classes.filter(Boolean).join(" ");
|
|
3488
3479
|
function formatSize(bytes) {
|
|
3489
3480
|
if (bytes < 1024) return `${bytes} B`;
|
|
3490
3481
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
@@ -3580,7 +3571,7 @@ function FileUpload({ accept, maxSize, multiple = false, onUpload, onRemove, pre
|
|
|
3580
3571
|
onDragOver: handleDragOver,
|
|
3581
3572
|
onDragLeave: handleDragLeave,
|
|
3582
3573
|
onClick: () => !disabled && inputRef.current?.click(),
|
|
3583
|
-
className: cn$
|
|
3574
|
+
className: cn$8("relative flex flex-col items-center justify-center rounded-lg border-2 border-dashed p-6 transition-colors", isDragging ? "border-[var(--dashboard-primary,#37a501)] bg-[var(--dashboard-primary,#37a501)]/5" : "border-[var(--dashboard-text-secondary,#6b7280)]/30 hover:border-[var(--dashboard-text-secondary,#6b7280)]/50", disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"),
|
|
3584
3575
|
role: "button",
|
|
3585
3576
|
tabIndex: disabled ? -1 : 0,
|
|
3586
3577
|
"aria-label": label,
|
|
@@ -3603,7 +3594,7 @@ function FileUpload({ accept, maxSize, multiple = false, onUpload, onRemove, pre
|
|
|
3603
3594
|
}), /* @__PURE__ */ jsxs("div", {
|
|
3604
3595
|
className: "flex flex-col items-center text-center",
|
|
3605
3596
|
children: [
|
|
3606
|
-
icon || /* @__PURE__ */ jsx(Upload, { className: cn$
|
|
3597
|
+
icon || /* @__PURE__ */ jsx(Upload, { className: cn$8("h-8 w-8 mb-3", isDragging ? "text-[var(--dashboard-primary,#37a501)]" : "text-[var(--dashboard-text-secondary,#6b7280)]") }),
|
|
3607
3598
|
/* @__PURE__ */ jsx("p", {
|
|
3608
3599
|
className: "text-sm font-medium text-[var(--dashboard-text-primary,#2d2d2d)]",
|
|
3609
3600
|
children: label
|
|
@@ -3670,7 +3661,7 @@ function FileUpload({ accept, maxSize, multiple = false, onUpload, onRemove, pre
|
|
|
3670
3661
|
|
|
3671
3662
|
//#endregion
|
|
3672
3663
|
//#region src/components/Tooltip/index.tsx
|
|
3673
|
-
const cn$
|
|
3664
|
+
const cn$7 = (...classes) => classes.filter(Boolean).join(" ");
|
|
3674
3665
|
function Tooltip({ content, position = "top", delay = 200, children, className, maxWidth = 240 }) {
|
|
3675
3666
|
const [visible, setVisible] = useState(false);
|
|
3676
3667
|
const [coords, setCoords] = useState({
|
|
@@ -3743,7 +3734,7 @@ function Tooltip({ content, position = "top", delay = 200, children, className,
|
|
|
3743
3734
|
ref: tooltipRef,
|
|
3744
3735
|
id: idRef.current,
|
|
3745
3736
|
role: "tooltip",
|
|
3746
|
-
className: cn$
|
|
3737
|
+
className: cn$7("fixed z-[10002] rounded-md px-3 py-2 text-xs font-medium", "bg-[var(--dashboard-text-primary,#2d2d2d)] text-white", "shadow-lg dashboard-animate-fade-in pointer-events-none", className),
|
|
3747
3738
|
style: {
|
|
3748
3739
|
top: coords.top,
|
|
3749
3740
|
left: coords.left,
|
|
@@ -3755,7 +3746,7 @@ function Tooltip({ content, position = "top", delay = 200, children, className,
|
|
|
3755
3746
|
|
|
3756
3747
|
//#endregion
|
|
3757
3748
|
//#region src/components/Breadcrumb/index.tsx
|
|
3758
|
-
const cn$
|
|
3749
|
+
const cn$6 = (...classes) => classes.filter(Boolean).join(" ");
|
|
3759
3750
|
function Breadcrumb({ items, separator, onNavigate, className }) {
|
|
3760
3751
|
const defaultSeparator = /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4 text-[var(--dashboard-text-secondary,#6b7280)] flex-shrink-0" });
|
|
3761
3752
|
const handleClick = (e, href) => {
|
|
@@ -3777,7 +3768,7 @@ function Breadcrumb({ items, separator, onNavigate, className }) {
|
|
|
3777
3768
|
"aria-hidden": "true",
|
|
3778
3769
|
children: separator || defaultSeparator
|
|
3779
3770
|
}), isLast ? /* @__PURE__ */ jsxs("span", {
|
|
3780
|
-
className: cn$
|
|
3771
|
+
className: cn$6("flex items-center gap-1.5 text-sm font-medium", "text-[var(--dashboard-text-primary,#2d2d2d)]"),
|
|
3781
3772
|
"aria-current": "page",
|
|
3782
3773
|
children: [item.icon && /* @__PURE__ */ jsx("span", {
|
|
3783
3774
|
className: "flex-shrink-0 h-4 w-4",
|
|
@@ -3786,7 +3777,7 @@ function Breadcrumb({ items, separator, onNavigate, className }) {
|
|
|
3786
3777
|
}) : /* @__PURE__ */ jsxs("a", {
|
|
3787
3778
|
href: item.href || "#",
|
|
3788
3779
|
onClick: (e) => handleClick(e, item.href),
|
|
3789
|
-
className: cn$
|
|
3780
|
+
className: cn$6("flex items-center gap-1.5 text-sm", "text-[var(--dashboard-text-secondary,#6b7280)]", "hover:text-[var(--dashboard-primary,#37a501)] transition-colors"),
|
|
3790
3781
|
children: [item.icon && /* @__PURE__ */ jsx("span", {
|
|
3791
3782
|
className: "flex-shrink-0 h-4 w-4",
|
|
3792
3783
|
children: item.icon
|
|
@@ -3800,7 +3791,7 @@ function Breadcrumb({ items, separator, onNavigate, className }) {
|
|
|
3800
3791
|
|
|
3801
3792
|
//#endregion
|
|
3802
3793
|
//#region src/components/Combobox/index.tsx
|
|
3803
|
-
const cn$
|
|
3794
|
+
const cn$5 = (...classes) => classes.filter(Boolean).join(" ");
|
|
3804
3795
|
function Combobox({ options, value, onChange, multiple = false, searchable = true, placeholder = "Selecione...", label, error, disabled = false, renderOption, noResultsText = "Nenhum resultado encontrado", className }) {
|
|
3805
3796
|
const [isOpen, setIsOpen] = useState(false);
|
|
3806
3797
|
const [query, setQuery] = useState("");
|
|
@@ -3930,7 +3921,7 @@ function Combobox({ options, value, onChange, multiple = false, searchable = tru
|
|
|
3930
3921
|
}, [focusedIndex]);
|
|
3931
3922
|
const selectedLabels = selectedValues.map((v) => options.find((o) => o.value === v)?.label).filter(Boolean);
|
|
3932
3923
|
return /* @__PURE__ */ jsxs("div", {
|
|
3933
|
-
className: cn$
|
|
3924
|
+
className: cn$5("space-y-2", className),
|
|
3934
3925
|
children: [
|
|
3935
3926
|
label && /* @__PURE__ */ jsx("label", {
|
|
3936
3927
|
className: "block text-sm text-[var(--dashboard-text-primary,#2d2d2d)]",
|
|
@@ -3946,7 +3937,7 @@ function Combobox({ options, value, onChange, multiple = false, searchable = tru
|
|
|
3946
3937
|
"aria-controls": "combobox-listbox",
|
|
3947
3938
|
tabIndex: disabled ? -1 : 0,
|
|
3948
3939
|
onClick: () => isOpen ? close() : open(),
|
|
3949
|
-
className: cn$
|
|
3940
|
+
className: cn$5("flex min-h-[40px] w-full items-center gap-2 rounded-lg border px-3 py-2 transition-colors", isOpen ? "border-[var(--dashboard-primary,#37a501)] ring-2 ring-[var(--dashboard-primary,#37a501)]/20" : error ? "border-[var(--dashboard-status-danger,#EF4444)]" : "border-[var(--dashboard-text-secondary,#6b7280)]/30 hover:border-[var(--dashboard-text-secondary,#6b7280)]/50", disabled ? "opacity-50 cursor-not-allowed bg-[var(--dashboard-text-secondary,#6b7280)]/10" : "cursor-pointer bg-[var(--dashboard-surface,#ffffff)]"),
|
|
3950
3941
|
children: [
|
|
3951
3942
|
/* @__PURE__ */ jsx("div", {
|
|
3952
3943
|
className: "flex flex-1 flex-wrap items-center gap-1 min-w-0",
|
|
@@ -3974,7 +3965,7 @@ function Combobox({ options, value, onChange, multiple = false, searchable = tru
|
|
|
3974
3965
|
"aria-label": "Limpar seleção",
|
|
3975
3966
|
children: /* @__PURE__ */ jsx(X, { className: "h-3.5 w-3.5" })
|
|
3976
3967
|
}),
|
|
3977
|
-
/* @__PURE__ */ jsx(ChevronDown, { className: cn$
|
|
3968
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: cn$5("h-4 w-4 flex-shrink-0 text-[var(--dashboard-text-secondary,#6b7280)] transition-transform", isOpen && "rotate-180") })
|
|
3978
3969
|
]
|
|
3979
3970
|
}), isOpen && typeof document !== "undefined" && createPortal(/* @__PURE__ */ jsxs("div", {
|
|
3980
3971
|
className: "dc-combobox-portal rounded-lg border border-[var(--dashboard-text-secondary,#6b7280)]/20 bg-[var(--dashboard-surface,#ffffff)] shadow-lg dashboard-animate-fade-in overflow-hidden",
|
|
@@ -4019,7 +4010,7 @@ function Combobox({ options, value, onChange, multiple = false, searchable = tru
|
|
|
4019
4010
|
onClick: () => {
|
|
4020
4011
|
if (!option.disabled) toggleOption(option.value);
|
|
4021
4012
|
},
|
|
4022
|
-
className: cn$
|
|
4013
|
+
className: cn$5("flex items-center justify-between px-3 py-2 text-sm transition-colors", option.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer", isFocused && "bg-[var(--dashboard-text-secondary,#6b7280)]/10", !isFocused && !option.disabled && "hover:bg-[var(--dashboard-text-secondary,#6b7280)]/10", isSelected ? "text-[var(--dashboard-primary,#37a501)] font-medium" : "text-[var(--dashboard-text-primary,#2d2d2d)]"),
|
|
4023
4014
|
children: renderOption ? renderOption(option, isSelected) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
4024
4015
|
className: "truncate",
|
|
4025
4016
|
children: option.label
|
|
@@ -4039,8 +4030,8 @@ function Combobox({ options, value, onChange, multiple = false, searchable = tru
|
|
|
4039
4030
|
|
|
4040
4031
|
//#endregion
|
|
4041
4032
|
//#region src/components/Alert/index.tsx
|
|
4042
|
-
const cn$
|
|
4043
|
-
const variantConfig = {
|
|
4033
|
+
const cn$4 = (...classes) => classes.filter(Boolean).join(" ");
|
|
4034
|
+
const variantConfig$1 = {
|
|
4044
4035
|
info: {
|
|
4045
4036
|
border: "border-[var(--dashboard-status-info,#3b82f6)]",
|
|
4046
4037
|
bg: "bg-[var(--dashboard-status-info,#3b82f6)]/5",
|
|
@@ -4067,26 +4058,26 @@ const variantConfig = {
|
|
|
4067
4058
|
}
|
|
4068
4059
|
};
|
|
4069
4060
|
function Alert({ variant = "info", title, description, onClose, actions, icon, className }) {
|
|
4070
|
-
const config = variantConfig[variant];
|
|
4061
|
+
const config = variantConfig$1[variant];
|
|
4071
4062
|
return /* @__PURE__ */ jsx("div", {
|
|
4072
|
-
className: cn$
|
|
4063
|
+
className: cn$4("rounded-lg border-l-4 p-4", config.border, config.bg, className),
|
|
4073
4064
|
role: "alert",
|
|
4074
4065
|
children: /* @__PURE__ */ jsxs("div", {
|
|
4075
4066
|
className: "flex gap-3",
|
|
4076
4067
|
children: [
|
|
4077
4068
|
/* @__PURE__ */ jsx("div", {
|
|
4078
|
-
className: cn$
|
|
4069
|
+
className: cn$4("flex-shrink-0 mt-0.5", config.text),
|
|
4079
4070
|
children: icon || config.icon
|
|
4080
4071
|
}),
|
|
4081
4072
|
/* @__PURE__ */ jsxs("div", {
|
|
4082
4073
|
className: "flex-1 min-w-0",
|
|
4083
4074
|
children: [
|
|
4084
4075
|
title && /* @__PURE__ */ jsx("h3", {
|
|
4085
|
-
className: cn$
|
|
4076
|
+
className: cn$4("text-sm font-semibold", "text-[var(--dashboard-text-primary,#2d2d2d)]"),
|
|
4086
4077
|
children: title
|
|
4087
4078
|
}),
|
|
4088
4079
|
description && /* @__PURE__ */ jsx("div", {
|
|
4089
|
-
className: cn$
|
|
4080
|
+
className: cn$4("text-sm text-[var(--dashboard-text-secondary,#6b7280)]", title && "mt-1"),
|
|
4090
4081
|
children: description
|
|
4091
4082
|
}),
|
|
4092
4083
|
actions && /* @__PURE__ */ jsx("div", {
|
|
@@ -4106,6 +4097,116 @@ function Alert({ variant = "info", title, description, onClose, actions, icon, c
|
|
|
4106
4097
|
});
|
|
4107
4098
|
}
|
|
4108
4099
|
|
|
4100
|
+
//#endregion
|
|
4101
|
+
//#region src/components/Callout/index.tsx
|
|
4102
|
+
const cn$3 = (...classes) => classes.filter(Boolean).join(" ");
|
|
4103
|
+
const variantConfig = {
|
|
4104
|
+
info: {
|
|
4105
|
+
border: "border-[var(--dashboard-status-info,#3b82f6)]",
|
|
4106
|
+
bg: "bg-[var(--dashboard-status-info,#3b82f6)]/5",
|
|
4107
|
+
text: "text-[var(--dashboard-status-info,#3b82f6)]",
|
|
4108
|
+
icon: /* @__PURE__ */ jsx(Info, { className: "h-4 w-4" })
|
|
4109
|
+
},
|
|
4110
|
+
warning: {
|
|
4111
|
+
border: "border-[var(--dashboard-status-warning,#f59e0b)]",
|
|
4112
|
+
bg: "bg-[var(--dashboard-status-warning,#f59e0b)]/5",
|
|
4113
|
+
text: "text-[var(--dashboard-status-warning,#f59e0b)]",
|
|
4114
|
+
icon: /* @__PURE__ */ jsx(AlertTriangle, { className: "h-4 w-4" })
|
|
4115
|
+
},
|
|
4116
|
+
tip: {
|
|
4117
|
+
border: "border-[var(--dashboard-status-success,#10B981)]",
|
|
4118
|
+
bg: "bg-[var(--dashboard-status-success,#10B981)]/5",
|
|
4119
|
+
text: "text-[var(--dashboard-status-success,#10B981)]",
|
|
4120
|
+
icon: /* @__PURE__ */ jsx(Lightbulb, { className: "h-4 w-4" })
|
|
4121
|
+
},
|
|
4122
|
+
danger: {
|
|
4123
|
+
border: "border-[var(--dashboard-status-danger,#EF4444)]",
|
|
4124
|
+
bg: "bg-[var(--dashboard-status-danger,#EF4444)]/5",
|
|
4125
|
+
text: "text-[var(--dashboard-status-danger,#EF4444)]",
|
|
4126
|
+
icon: /* @__PURE__ */ jsx(ShieldAlert, { className: "h-4 w-4" })
|
|
4127
|
+
}
|
|
4128
|
+
};
|
|
4129
|
+
function Callout({ variant = "info", title, children, icon, className }) {
|
|
4130
|
+
const config = variantConfig[variant];
|
|
4131
|
+
return /* @__PURE__ */ jsx("div", {
|
|
4132
|
+
className: cn$3("rounded-lg border-l-4 p-4 my-4", config.border, config.bg, className),
|
|
4133
|
+
role: "note",
|
|
4134
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
4135
|
+
className: "flex gap-3",
|
|
4136
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
4137
|
+
className: cn$3("flex-shrink-0 mt-0.5", config.text),
|
|
4138
|
+
children: icon || config.icon
|
|
4139
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
4140
|
+
className: "flex-1 min-w-0",
|
|
4141
|
+
children: [title && /* @__PURE__ */ jsx("p", {
|
|
4142
|
+
className: cn$3("text-sm font-semibold", "text-[var(--dashboard-text-primary,#2d2d2d)]"),
|
|
4143
|
+
children: title
|
|
4144
|
+
}), children && /* @__PURE__ */ jsx("div", {
|
|
4145
|
+
className: cn$3("text-sm text-[var(--dashboard-text-secondary,#6b7280)]", title && "mt-1"),
|
|
4146
|
+
children
|
|
4147
|
+
})]
|
|
4148
|
+
})]
|
|
4149
|
+
})
|
|
4150
|
+
});
|
|
4151
|
+
}
|
|
4152
|
+
|
|
4153
|
+
//#endregion
|
|
4154
|
+
//#region src/components/CodeBlock/index.tsx
|
|
4155
|
+
const cn$2 = (...classes) => classes.filter(Boolean).join(" ");
|
|
4156
|
+
function CodeBlock({ code, language, filename, showLineNumbers = false, className, copyLabel = "Copiar", copiedLabel = "Copiado!" }) {
|
|
4157
|
+
const [copied, setCopied] = useState(false);
|
|
4158
|
+
const handleCopy = useCallback(async () => {
|
|
4159
|
+
try {
|
|
4160
|
+
await navigator.clipboard.writeText(code);
|
|
4161
|
+
setCopied(true);
|
|
4162
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
4163
|
+
} catch {}
|
|
4164
|
+
}, [code]);
|
|
4165
|
+
const lines = code.split("\n");
|
|
4166
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
4167
|
+
className: cn$2("relative rounded-lg overflow-hidden border border-[var(--dashboard-text-secondary,#64748B)]/12 my-4", className),
|
|
4168
|
+
children: [(filename || language) && /* @__PURE__ */ jsxs("div", {
|
|
4169
|
+
className: "flex items-center justify-between px-4 py-2 bg-[var(--dashboard-text-primary,#0F172A)] border-b border-[var(--dashboard-text-secondary,#64748B)]/20",
|
|
4170
|
+
children: [
|
|
4171
|
+
filename && /* @__PURE__ */ jsx("span", {
|
|
4172
|
+
className: "text-xs text-[var(--dashboard-text-secondary,#64748B)] font-mono",
|
|
4173
|
+
children: filename
|
|
4174
|
+
}),
|
|
4175
|
+
language && !filename && /* @__PURE__ */ jsx("span", {}),
|
|
4176
|
+
language && /* @__PURE__ */ jsx("span", {
|
|
4177
|
+
className: "text-xs text-[var(--dashboard-text-secondary,#64748B)]/60",
|
|
4178
|
+
children: language
|
|
4179
|
+
})
|
|
4180
|
+
]
|
|
4181
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
4182
|
+
className: "relative",
|
|
4183
|
+
children: [/* @__PURE__ */ jsx("pre", {
|
|
4184
|
+
className: "overflow-x-auto p-4 bg-[var(--dashboard-text-primary,#0F172A)] m-0",
|
|
4185
|
+
"data-language": language,
|
|
4186
|
+
children: /* @__PURE__ */ jsx("code", {
|
|
4187
|
+
className: "text-sm font-mono leading-relaxed text-[var(--dashboard-surface,#FFFFFF)]/90",
|
|
4188
|
+
children: showLineNumbers ? lines.map((line, i) => /* @__PURE__ */ jsxs("span", {
|
|
4189
|
+
className: "table-row",
|
|
4190
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
4191
|
+
className: "table-cell pr-4 text-right select-none text-[var(--dashboard-text-secondary,#64748B)]/40 text-xs w-8",
|
|
4192
|
+
children: i + 1
|
|
4193
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
4194
|
+
className: "table-cell",
|
|
4195
|
+
children: [line, "\n"]
|
|
4196
|
+
})]
|
|
4197
|
+
}, i)) : code
|
|
4198
|
+
})
|
|
4199
|
+
}), /* @__PURE__ */ jsxs("button", {
|
|
4200
|
+
onClick: handleCopy,
|
|
4201
|
+
className: cn$2("absolute top-3 right-3 flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium transition-all duration-200 cursor-pointer", copied ? "bg-[var(--dashboard-status-success,#059669)]/20 text-[var(--dashboard-status-success,#059669)]" : "bg-[var(--dashboard-surface,#FFFFFF)]/10 text-[var(--dashboard-surface,#FFFFFF)]/60 hover:bg-[var(--dashboard-surface,#FFFFFF)]/20 hover:text-[var(--dashboard-surface,#FFFFFF)]/80"),
|
|
4202
|
+
"aria-label": copied ? copiedLabel : copyLabel,
|
|
4203
|
+
title: copied ? copiedLabel : copyLabel,
|
|
4204
|
+
children: [copied ? /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx(Copy, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ jsx("span", { children: copied ? copiedLabel : copyLabel })]
|
|
4205
|
+
})]
|
|
4206
|
+
})]
|
|
4207
|
+
});
|
|
4208
|
+
}
|
|
4209
|
+
|
|
4109
4210
|
//#endregion
|
|
4110
4211
|
//#region src/components/EmptyState/index.tsx
|
|
4111
4212
|
const cn$1 = (...classes) => classes.filter(Boolean).join(" ");
|
|
@@ -4434,5 +4535,5 @@ function DashboardProvider({ config: configOverrides, children }) {
|
|
|
4434
4535
|
}
|
|
4435
4536
|
|
|
4436
4537
|
//#endregion
|
|
4437
|
-
export { Alert, AuthLayout, BadgeStatus, Breadcrumb, Button, Card, Checkbox, CodeInput, Combobox, ComparisonLineChart, DashboardProvider, DataGrid, DateRangePicker, DoughnutChart, Dropdown, EmptyState, FileUpload, FilterBar, FormField, HorizontalBarChart, Input, KPICard, Loading, LoadingProvider, MetricPanel, Modal, NotificationsProvider, PageLayout, Pagination, ProgressBarList, Sidebar, Skeleton, StatusBadge, Stepper, Table, TableBody, TableEmpty, TableHeader, TableSkeleton, Tabs, ThemeProvider, ThemeSwitcher, Title, Toast, ToggleSwitch, Tooltip, TreeView, VerticalBarChart, createColumnHelper, createConfig, defaultConfig, useConfig, useLoading, useNotifications, useTheme };
|
|
4538
|
+
export { Alert, AuthLayout, BadgeStatus, Breadcrumb, Button, Callout, Card, Checkbox, CodeBlock, CodeInput, Combobox, ComparisonLineChart, DashboardProvider, DataGrid, DateRangePicker, DoughnutChart, Dropdown, EmptyState, FileUpload, FilterBar, FormField, HorizontalBarChart, Input, KPICard, Loading, LoadingProvider, MetricPanel, Modal, NotificationsProvider, PageLayout, Pagination, ProgressBarList, Sidebar, Skeleton, StatusBadge, Stepper, Table, TableBody, TableEmpty, TableHeader, TableSkeleton, Tabs, ThemeProvider, ThemeSwitcher, Title, Toast, ToggleSwitch, Tooltip, TreeView, VerticalBarChart, createColumnHelper, createConfig, defaultConfig, useConfig, useLoading, useNotifications, useTheme };
|
|
4438
4539
|
//# sourceMappingURL=index.mjs.map
|