framepexls-ui-lib 0.2.8 → 0.2.10
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/AppTopbar.js +1 -1
- package/dist/AppTopbar.mjs +1 -1
- package/dist/AvatarGroup.js +7 -2
- package/dist/AvatarGroup.mjs +7 -2
- package/dist/Badge.js +6 -1
- package/dist/Badge.mjs +6 -1
- package/dist/BadgeCluster.js +1 -1
- package/dist/BadgeCluster.mjs +1 -1
- package/dist/Breadcrumb.js +46 -2
- package/dist/Breadcrumb.mjs +46 -2
- package/dist/Button.js +8 -2
- package/dist/Button.mjs +8 -2
- package/dist/CalendarPanel.js +45 -26
- package/dist/CalendarPanel.mjs +45 -26
- package/dist/Card.js +7 -2
- package/dist/Card.mjs +7 -2
- package/dist/Checkbox.js +51 -18
- package/dist/Checkbox.mjs +51 -18
- package/dist/ColorPicker.js +9 -4
- package/dist/ColorPicker.mjs +9 -4
- package/dist/ColumnSelector.js +1 -1
- package/dist/ColumnSelector.mjs +1 -1
- package/dist/ComboSelect.js +11 -4
- package/dist/ComboSelect.mjs +11 -4
- package/dist/DateTimeField.js +8 -2
- package/dist/DateTimeField.mjs +8 -2
- package/dist/Dialog.js +2 -2
- package/dist/Dialog.mjs +2 -2
- package/dist/Drawer.js +2 -2
- package/dist/Drawer.mjs +2 -2
- package/dist/Dropdown.js +14 -10
- package/dist/Dropdown.mjs +14 -10
- package/dist/FiltersMultiSelect.js +1 -1
- package/dist/FiltersMultiSelect.mjs +1 -1
- package/dist/Input.js +23 -0
- package/dist/Input.mjs +23 -0
- package/dist/KpiCard.js +26 -2
- package/dist/KpiCard.mjs +26 -2
- package/dist/Link.js +16 -2
- package/dist/Link.mjs +16 -2
- package/dist/MediaCard.js +18 -11
- package/dist/MediaCard.mjs +18 -11
- package/dist/MediaSelector.js +9 -8
- package/dist/MediaSelector.mjs +9 -8
- package/dist/MotionProvider.d.mts +9 -0
- package/dist/MotionProvider.d.ts +9 -0
- package/dist/MotionProvider.js +29 -0
- package/dist/MotionProvider.mjs +9 -0
- package/dist/MultiComboSelect.js +6 -4
- package/dist/MultiComboSelect.mjs +6 -4
- package/dist/Pagination.js +65 -29
- package/dist/Pagination.mjs +65 -29
- package/dist/ReviewHistory.js +8 -6
- package/dist/ReviewHistory.mjs +8 -6
- package/dist/SearchInput.js +16 -2
- package/dist/SearchInput.mjs +16 -2
- package/dist/Select.js +12 -5
- package/dist/Select.mjs +12 -5
- package/dist/Sidebar.js +23 -5
- package/dist/Sidebar.mjs +23 -5
- package/dist/StatCard.js +17 -1
- package/dist/StatCard.mjs +19 -3
- package/dist/Steps.js +51 -37
- package/dist/Steps.mjs +51 -37
- package/dist/StorageUsage.js +6 -2
- package/dist/StorageUsage.mjs +6 -2
- package/dist/Table.d.mts +5 -1
- package/dist/Table.d.ts +5 -1
- package/dist/Table.js +31 -4
- package/dist/Table.mjs +30 -4
- package/dist/Textarea.js +42 -17
- package/dist/Textarea.mjs +43 -18
- package/dist/TimePanel.js +1 -1
- package/dist/TimePanel.mjs +1 -1
- package/dist/TimePopover.js +116 -83
- package/dist/TimePopover.mjs +116 -83
- package/dist/TimeRangeField.js +1 -1
- package/dist/TimeRangeField.mjs +1 -1
- package/dist/Toast.js +1 -5
- package/dist/Toast.mjs +1 -5
- package/dist/Tooltip.js +28 -19
- package/dist/Tooltip.mjs +28 -19
- package/dist/UploadCard.js +34 -21
- package/dist/UploadCard.mjs +34 -21
- package/dist/animations-CHrNeawW.d.mts +28 -0
- package/dist/animations-CHrNeawW.d.ts +28 -0
- package/dist/animations.d.mts +2 -0
- package/dist/animations.d.ts +2 -0
- package/dist/animations.js +75 -0
- package/dist/animations.mjs +42 -0
- package/dist/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +8 -0
- package/dist/index.mjs +18 -13
- package/package.json +4 -4
package/dist/Pagination.js
CHANGED
|
@@ -33,6 +33,8 @@ __export(Pagination_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Pagination_exports);
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_framer_motion = require("framer-motion");
|
|
37
|
+
var import_animations = require("./animations");
|
|
36
38
|
var import_Button = __toESM(require("./Button"));
|
|
37
39
|
function Pagination({
|
|
38
40
|
page,
|
|
@@ -56,53 +58,87 @@ function Pagination({
|
|
|
56
58
|
return range2;
|
|
57
59
|
};
|
|
58
60
|
const range = getRange();
|
|
59
|
-
const
|
|
60
|
-
slate: "bg-slate-600
|
|
61
|
-
gray: "bg-gray-600
|
|
62
|
-
zinc: "bg-zinc-600
|
|
63
|
-
neutral: "bg-neutral-600
|
|
64
|
-
stone: "bg-stone-600
|
|
65
|
-
red: "bg-red-600
|
|
66
|
-
orange: "bg-orange-600
|
|
67
|
-
amber: "bg-amber-600
|
|
68
|
-
yellow: "bg-yellow-500
|
|
69
|
-
lime: "bg-lime-600
|
|
70
|
-
green: "bg-green-600
|
|
71
|
-
emerald: "bg-emerald-600
|
|
72
|
-
teal: "bg-teal-600
|
|
73
|
-
cyan: "bg-cyan-600
|
|
74
|
-
sky: "bg-sky-600
|
|
75
|
-
blue: "bg-blue-600
|
|
76
|
-
indigo: "bg-indigo-600
|
|
77
|
-
violet: "bg-violet-600
|
|
78
|
-
purple: "bg-purple-600
|
|
79
|
-
fuchsia: "bg-fuchsia-600
|
|
80
|
-
pink: "bg-pink-600
|
|
81
|
-
rose: "bg-rose-600
|
|
61
|
+
const PILL_BG = {
|
|
62
|
+
slate: "bg-slate-600",
|
|
63
|
+
gray: "bg-gray-600",
|
|
64
|
+
zinc: "bg-zinc-600",
|
|
65
|
+
neutral: "bg-neutral-600",
|
|
66
|
+
stone: "bg-stone-600",
|
|
67
|
+
red: "bg-red-600",
|
|
68
|
+
orange: "bg-orange-600",
|
|
69
|
+
amber: "bg-amber-600",
|
|
70
|
+
yellow: "bg-yellow-500",
|
|
71
|
+
lime: "bg-lime-600",
|
|
72
|
+
green: "bg-green-600",
|
|
73
|
+
emerald: "bg-emerald-600",
|
|
74
|
+
teal: "bg-teal-600",
|
|
75
|
+
cyan: "bg-cyan-600",
|
|
76
|
+
sky: "bg-sky-600",
|
|
77
|
+
blue: "bg-blue-600",
|
|
78
|
+
indigo: "bg-indigo-600",
|
|
79
|
+
violet: "bg-violet-600",
|
|
80
|
+
purple: "bg-purple-600",
|
|
81
|
+
fuchsia: "bg-fuchsia-600",
|
|
82
|
+
pink: "bg-pink-600",
|
|
83
|
+
rose: "bg-rose-600"
|
|
84
|
+
};
|
|
85
|
+
const ACTIVE_TEXT = {
|
|
86
|
+
slate: "text-white",
|
|
87
|
+
gray: "text-white",
|
|
88
|
+
zinc: "text-white",
|
|
89
|
+
neutral: "text-white",
|
|
90
|
+
stone: "text-white",
|
|
91
|
+
red: "text-white",
|
|
92
|
+
orange: "text-white",
|
|
93
|
+
amber: "text-white",
|
|
94
|
+
yellow: "text-slate-900",
|
|
95
|
+
lime: "text-white",
|
|
96
|
+
green: "text-white",
|
|
97
|
+
emerald: "text-white",
|
|
98
|
+
teal: "text-white",
|
|
99
|
+
cyan: "text-white",
|
|
100
|
+
sky: "text-white",
|
|
101
|
+
blue: "text-white",
|
|
102
|
+
indigo: "text-white",
|
|
103
|
+
violet: "text-white",
|
|
104
|
+
purple: "text-white",
|
|
105
|
+
fuchsia: "text-white",
|
|
106
|
+
pink: "text-white",
|
|
107
|
+
rose: "text-white"
|
|
82
108
|
};
|
|
83
109
|
const Btn = ({
|
|
84
110
|
children,
|
|
85
111
|
active,
|
|
86
112
|
disabled,
|
|
87
113
|
onClick
|
|
88
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime.
|
|
114
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
89
115
|
import_Button.default,
|
|
90
116
|
{
|
|
91
117
|
unstyled: true,
|
|
92
118
|
disabled,
|
|
93
119
|
onClick,
|
|
94
|
-
className: `h-10 min-w-10 px-3 inline-flex items-center justify-center text-[15px] font-medium transition
|
|
95
|
-
${active ? `${
|
|
120
|
+
className: `relative h-10 min-w-10 px-3 inline-flex items-center justify-center text-[15px] font-medium transition
|
|
121
|
+
${active ? `${ACTIVE_TEXT[color]}` : "text-slate-900 hover:bg-white/60"}
|
|
96
122
|
${disabled ? "opacity-40 cursor-not-allowed" : ""}`,
|
|
97
123
|
"aria-current": active ? "page" : void 0,
|
|
98
|
-
children
|
|
124
|
+
children: [
|
|
125
|
+
active && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
126
|
+
import_framer_motion.motion.span,
|
|
127
|
+
{
|
|
128
|
+
layoutId: "pagination-pill",
|
|
129
|
+
transition: import_animations.springSm,
|
|
130
|
+
className: `absolute inset-0 rounded-2xl ${PILL_BG[color]} shadow-sm`
|
|
131
|
+
}
|
|
132
|
+
),
|
|
133
|
+
children
|
|
134
|
+
]
|
|
99
135
|
}
|
|
100
136
|
);
|
|
101
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", { className: className || "w-full md:w-auto", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "inline-flex overflow-hidden rounded-2xl border border-slate-200 bg-slate-100/60 shadow-sm dark:border-white/10 dark:bg-white/5", children: [
|
|
137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", { className: className || "w-full md:w-auto", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.LayoutGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative inline-flex overflow-hidden rounded-2xl border border-slate-200 bg-slate-100/60 shadow-sm dark:border-white/10 dark:bg-white/5", children: [
|
|
102
138
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Btn, { disabled: page === 1, onClick: () => onPageChange(page - 1), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { viewBox: "0 0 24 24", className: "h-5 w-5", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M15 18l-6-6 6-6" }) }) }),
|
|
103
139
|
range.map(
|
|
104
140
|
(it, idx) => it === "..." ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "h-10 min-w-10 px-3 inline-flex items-center justify-center text-slate-500 dark:text-slate-400", children: "\u2026" }, `dots-${idx}`) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Btn, { active: it === page, onClick: () => onPageChange(it), children: it }, it)
|
|
105
141
|
),
|
|
106
142
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Btn, { disabled: page === totalPages, onClick: () => onPageChange(page + 1), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { viewBox: "0 0 24 24", className: "h-5 w-5", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M9 6l6 6-6 6" }) }) })
|
|
107
|
-
] }) });
|
|
143
|
+
] }) }) });
|
|
108
144
|
}
|
package/dist/Pagination.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { LayoutGroup, motion } from "framer-motion";
|
|
4
|
+
import { springSm } from "./animations";
|
|
3
5
|
import Button from "./Button";
|
|
4
6
|
function Pagination({
|
|
5
7
|
page,
|
|
@@ -23,55 +25,89 @@ function Pagination({
|
|
|
23
25
|
return range2;
|
|
24
26
|
};
|
|
25
27
|
const range = getRange();
|
|
26
|
-
const
|
|
27
|
-
slate: "bg-slate-600
|
|
28
|
-
gray: "bg-gray-600
|
|
29
|
-
zinc: "bg-zinc-600
|
|
30
|
-
neutral: "bg-neutral-600
|
|
31
|
-
stone: "bg-stone-600
|
|
32
|
-
red: "bg-red-600
|
|
33
|
-
orange: "bg-orange-600
|
|
34
|
-
amber: "bg-amber-600
|
|
35
|
-
yellow: "bg-yellow-500
|
|
36
|
-
lime: "bg-lime-600
|
|
37
|
-
green: "bg-green-600
|
|
38
|
-
emerald: "bg-emerald-600
|
|
39
|
-
teal: "bg-teal-600
|
|
40
|
-
cyan: "bg-cyan-600
|
|
41
|
-
sky: "bg-sky-600
|
|
42
|
-
blue: "bg-blue-600
|
|
43
|
-
indigo: "bg-indigo-600
|
|
44
|
-
violet: "bg-violet-600
|
|
45
|
-
purple: "bg-purple-600
|
|
46
|
-
fuchsia: "bg-fuchsia-600
|
|
47
|
-
pink: "bg-pink-600
|
|
48
|
-
rose: "bg-rose-600
|
|
28
|
+
const PILL_BG = {
|
|
29
|
+
slate: "bg-slate-600",
|
|
30
|
+
gray: "bg-gray-600",
|
|
31
|
+
zinc: "bg-zinc-600",
|
|
32
|
+
neutral: "bg-neutral-600",
|
|
33
|
+
stone: "bg-stone-600",
|
|
34
|
+
red: "bg-red-600",
|
|
35
|
+
orange: "bg-orange-600",
|
|
36
|
+
amber: "bg-amber-600",
|
|
37
|
+
yellow: "bg-yellow-500",
|
|
38
|
+
lime: "bg-lime-600",
|
|
39
|
+
green: "bg-green-600",
|
|
40
|
+
emerald: "bg-emerald-600",
|
|
41
|
+
teal: "bg-teal-600",
|
|
42
|
+
cyan: "bg-cyan-600",
|
|
43
|
+
sky: "bg-sky-600",
|
|
44
|
+
blue: "bg-blue-600",
|
|
45
|
+
indigo: "bg-indigo-600",
|
|
46
|
+
violet: "bg-violet-600",
|
|
47
|
+
purple: "bg-purple-600",
|
|
48
|
+
fuchsia: "bg-fuchsia-600",
|
|
49
|
+
pink: "bg-pink-600",
|
|
50
|
+
rose: "bg-rose-600"
|
|
51
|
+
};
|
|
52
|
+
const ACTIVE_TEXT = {
|
|
53
|
+
slate: "text-white",
|
|
54
|
+
gray: "text-white",
|
|
55
|
+
zinc: "text-white",
|
|
56
|
+
neutral: "text-white",
|
|
57
|
+
stone: "text-white",
|
|
58
|
+
red: "text-white",
|
|
59
|
+
orange: "text-white",
|
|
60
|
+
amber: "text-white",
|
|
61
|
+
yellow: "text-slate-900",
|
|
62
|
+
lime: "text-white",
|
|
63
|
+
green: "text-white",
|
|
64
|
+
emerald: "text-white",
|
|
65
|
+
teal: "text-white",
|
|
66
|
+
cyan: "text-white",
|
|
67
|
+
sky: "text-white",
|
|
68
|
+
blue: "text-white",
|
|
69
|
+
indigo: "text-white",
|
|
70
|
+
violet: "text-white",
|
|
71
|
+
purple: "text-white",
|
|
72
|
+
fuchsia: "text-white",
|
|
73
|
+
pink: "text-white",
|
|
74
|
+
rose: "text-white"
|
|
49
75
|
};
|
|
50
76
|
const Btn = ({
|
|
51
77
|
children,
|
|
52
78
|
active,
|
|
53
79
|
disabled,
|
|
54
80
|
onClick
|
|
55
|
-
}) => /* @__PURE__ */
|
|
81
|
+
}) => /* @__PURE__ */ jsxs(
|
|
56
82
|
Button,
|
|
57
83
|
{
|
|
58
84
|
unstyled: true,
|
|
59
85
|
disabled,
|
|
60
86
|
onClick,
|
|
61
|
-
className: `h-10 min-w-10 px-3 inline-flex items-center justify-center text-[15px] font-medium transition
|
|
62
|
-
${active ? `${
|
|
87
|
+
className: `relative h-10 min-w-10 px-3 inline-flex items-center justify-center text-[15px] font-medium transition
|
|
88
|
+
${active ? `${ACTIVE_TEXT[color]}` : "text-slate-900 hover:bg-white/60"}
|
|
63
89
|
${disabled ? "opacity-40 cursor-not-allowed" : ""}`,
|
|
64
90
|
"aria-current": active ? "page" : void 0,
|
|
65
|
-
children
|
|
91
|
+
children: [
|
|
92
|
+
active && /* @__PURE__ */ jsx(
|
|
93
|
+
motion.span,
|
|
94
|
+
{
|
|
95
|
+
layoutId: "pagination-pill",
|
|
96
|
+
transition: springSm,
|
|
97
|
+
className: `absolute inset-0 rounded-2xl ${PILL_BG[color]} shadow-sm`
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
children
|
|
101
|
+
]
|
|
66
102
|
}
|
|
67
103
|
);
|
|
68
|
-
return /* @__PURE__ */ jsx("nav", { className: className || "w-full md:w-auto", children: /* @__PURE__ */ jsxs("div", { className: "inline-flex overflow-hidden rounded-2xl border border-slate-200 bg-slate-100/60 shadow-sm dark:border-white/10 dark:bg-white/5", children: [
|
|
104
|
+
return /* @__PURE__ */ jsx("nav", { className: className || "w-full md:w-auto", children: /* @__PURE__ */ jsx(LayoutGroup, { children: /* @__PURE__ */ jsxs("div", { className: "relative inline-flex overflow-hidden rounded-2xl border border-slate-200 bg-slate-100/60 shadow-sm dark:border-white/10 dark:bg-white/5", children: [
|
|
69
105
|
/* @__PURE__ */ jsx(Btn, { disabled: page === 1, onClick: () => onPageChange(page - 1), children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "h-5 w-5", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { d: "M15 18l-6-6 6-6" }) }) }),
|
|
70
106
|
range.map(
|
|
71
107
|
(it, idx) => it === "..." ? /* @__PURE__ */ jsx("span", { className: "h-10 min-w-10 px-3 inline-flex items-center justify-center text-slate-500 dark:text-slate-400", children: "\u2026" }, `dots-${idx}`) : /* @__PURE__ */ jsx(Btn, { active: it === page, onClick: () => onPageChange(it), children: it }, it)
|
|
72
108
|
),
|
|
73
109
|
/* @__PURE__ */ jsx(Btn, { disabled: page === totalPages, onClick: () => onPageChange(page + 1), children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "h-5 w-5", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { d: "M9 6l6 6-6 6" }) }) })
|
|
74
|
-
] }) });
|
|
110
|
+
] }) }) });
|
|
75
111
|
}
|
|
76
112
|
export {
|
|
77
113
|
Pagination as default
|
package/dist/ReviewHistory.js
CHANGED
|
@@ -37,6 +37,8 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
37
37
|
var import_Dialog = __toESM(require("./Dialog"));
|
|
38
38
|
var import_Button = __toESM(require("./Button"));
|
|
39
39
|
var import_Badge = __toESM(require("./Badge"));
|
|
40
|
+
var import_framer_motion = require("framer-motion");
|
|
41
|
+
var import_animations = require("./animations");
|
|
40
42
|
function ReviewHistory({
|
|
41
43
|
items,
|
|
42
44
|
loading,
|
|
@@ -49,9 +51,9 @@ function ReviewHistory({
|
|
|
49
51
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-xs text-muted", children: loading ? "Cargando\u2026" : `${items.length} total` })
|
|
50
52
|
] }),
|
|
51
53
|
latest.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-sm text-muted", children: "Sin registros" }),
|
|
52
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid gap-2", children: latest.map((r) => {
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { initial: false, children: latest.map((r) => {
|
|
53
55
|
var _a;
|
|
54
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
56
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_framer_motion.motion.div, { initial: { opacity: 0, y: 8 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -8 }, transition: import_animations.springSm, className: "rounded-xl border border-border bg-surface px-3 py-2 text-sm", children: [
|
|
55
57
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
56
58
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "font-medium", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Badge.default, { tone: statusTone(r.status), children: statusLabel(r.status) }) }),
|
|
57
59
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-xs text-muted", children: formatDateTime(r.created_at) })
|
|
@@ -59,7 +61,7 @@ function ReviewHistory({
|
|
|
59
61
|
r.comment && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-1 text-sm text-foreground whitespace-pre-line", children: r.comment }),
|
|
60
62
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-1 text-xs text-muted", children: r.by_name || r.by_email ? `${(_a = r.by_name) != null ? _a : ""} ${r.by_email ? `\xB7 ${r.by_email}` : ""}` : r.user_id ? "Usuario interno" : "Invitado" })
|
|
61
63
|
] }, r.id);
|
|
62
|
-
}) }),
|
|
64
|
+
}) }) }),
|
|
63
65
|
items.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "pt-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { unstyled: true, className: "text-sm text-blue-600 hover:underline dark:text-blue-400", onClick: onViewAll, children: "Ver todos" }) })
|
|
64
66
|
] });
|
|
65
67
|
}
|
|
@@ -72,9 +74,9 @@ function ReviewHistoryDialog({
|
|
|
72
74
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Dialog.default.Header, { title: "Historial de estado", onClose, showClose: true, compact: true }),
|
|
73
75
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Dialog.default.Body, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid gap-2", children: [
|
|
74
76
|
items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-sm text-muted", children: "Sin registros" }),
|
|
75
|
-
items.map((r) => {
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid gap-2", children: items.map((r) => {
|
|
76
78
|
var _a;
|
|
77
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
79
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_framer_motion.motion.div, { initial: { opacity: 0, y: 8 }, animate: { opacity: 1, y: 0 }, transition: import_animations.springSm, className: "rounded-xl border border-border bg-surface px-3 py-2 text-sm", children: [
|
|
78
80
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
79
81
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "font-medium", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Badge.default, { tone: statusTone(r.status), children: statusLabel(r.status) }) }),
|
|
80
82
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-xs text-muted", children: formatDateTime(r.created_at) })
|
|
@@ -82,7 +84,7 @@ function ReviewHistoryDialog({
|
|
|
82
84
|
r.comment && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-1 text-sm text-foreground whitespace-pre-line", children: r.comment }),
|
|
83
85
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-1 text-xs text-muted", children: r.by_name || r.by_email ? `${(_a = r.by_name) != null ? _a : ""} ${r.by_email ? `\xB7 ${r.by_email}` : ""}` : r.user_id ? "Usuario interno" : "Invitado" })
|
|
84
86
|
] }, r.id);
|
|
85
|
-
})
|
|
87
|
+
}) })
|
|
86
88
|
] }) }),
|
|
87
89
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Dialog.default.Footer, { align: "end", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { variant: "secondary", size: "md", className: "shadow-sm", onClick: onClose, children: "Cerrar" }) })
|
|
88
90
|
] });
|
package/dist/ReviewHistory.mjs
CHANGED
|
@@ -3,6 +3,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import Dialog from "./Dialog";
|
|
4
4
|
import Button from "./Button";
|
|
5
5
|
import Badge from "./Badge";
|
|
6
|
+
import { AnimatePresence, motion } from "framer-motion";
|
|
7
|
+
import { springSm } from "./animations";
|
|
6
8
|
function ReviewHistory({
|
|
7
9
|
items,
|
|
8
10
|
loading,
|
|
@@ -15,9 +17,9 @@ function ReviewHistory({
|
|
|
15
17
|
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted", children: loading ? "Cargando\u2026" : `${items.length} total` })
|
|
16
18
|
] }),
|
|
17
19
|
latest.length === 0 && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted", children: "Sin registros" }),
|
|
18
|
-
/* @__PURE__ */ jsx("div", { className: "grid gap-2", children: latest.map((r) => {
|
|
20
|
+
/* @__PURE__ */ jsx("div", { className: "grid gap-2", children: /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: latest.map((r) => {
|
|
19
21
|
var _a;
|
|
20
|
-
return /* @__PURE__ */ jsxs(
|
|
22
|
+
return /* @__PURE__ */ jsxs(motion.div, { initial: { opacity: 0, y: 8 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -8 }, transition: springSm, className: "rounded-xl border border-border bg-surface px-3 py-2 text-sm", children: [
|
|
21
23
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
22
24
|
/* @__PURE__ */ jsx("div", { className: "font-medium", children: /* @__PURE__ */ jsx(Badge, { tone: statusTone(r.status), children: statusLabel(r.status) }) }),
|
|
23
25
|
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted", children: formatDateTime(r.created_at) })
|
|
@@ -25,7 +27,7 @@ function ReviewHistory({
|
|
|
25
27
|
r.comment && /* @__PURE__ */ jsx("div", { className: "mt-1 text-sm text-foreground whitespace-pre-line", children: r.comment }),
|
|
26
28
|
/* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-muted", children: r.by_name || r.by_email ? `${(_a = r.by_name) != null ? _a : ""} ${r.by_email ? `\xB7 ${r.by_email}` : ""}` : r.user_id ? "Usuario interno" : "Invitado" })
|
|
27
29
|
] }, r.id);
|
|
28
|
-
}) }),
|
|
30
|
+
}) }) }),
|
|
29
31
|
items.length > 3 && /* @__PURE__ */ jsx("div", { className: "pt-1", children: /* @__PURE__ */ jsx(Button, { unstyled: true, className: "text-sm text-blue-600 hover:underline dark:text-blue-400", onClick: onViewAll, children: "Ver todos" }) })
|
|
30
32
|
] });
|
|
31
33
|
}
|
|
@@ -38,9 +40,9 @@ function ReviewHistoryDialog({
|
|
|
38
40
|
/* @__PURE__ */ jsx(Dialog.Header, { title: "Historial de estado", onClose, showClose: true, compact: true }),
|
|
39
41
|
/* @__PURE__ */ jsx(Dialog.Body, { children: /* @__PURE__ */ jsxs("div", { className: "grid gap-2", children: [
|
|
40
42
|
items.length === 0 && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted", children: "Sin registros" }),
|
|
41
|
-
items.map((r) => {
|
|
43
|
+
/* @__PURE__ */ jsx("div", { className: "grid gap-2", children: items.map((r) => {
|
|
42
44
|
var _a;
|
|
43
|
-
return /* @__PURE__ */ jsxs(
|
|
45
|
+
return /* @__PURE__ */ jsxs(motion.div, { initial: { opacity: 0, y: 8 }, animate: { opacity: 1, y: 0 }, transition: springSm, className: "rounded-xl border border-border bg-surface px-3 py-2 text-sm", children: [
|
|
44
46
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
45
47
|
/* @__PURE__ */ jsx("div", { className: "font-medium", children: /* @__PURE__ */ jsx(Badge, { tone: statusTone(r.status), children: statusLabel(r.status) }) }),
|
|
46
48
|
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted", children: formatDateTime(r.created_at) })
|
|
@@ -48,7 +50,7 @@ function ReviewHistoryDialog({
|
|
|
48
50
|
r.comment && /* @__PURE__ */ jsx("div", { className: "mt-1 text-sm text-foreground whitespace-pre-line", children: r.comment }),
|
|
49
51
|
/* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-muted", children: r.by_name || r.by_email ? `${(_a = r.by_name) != null ? _a : ""} ${r.by_email ? `\xB7 ${r.by_email}` : ""}` : r.user_id ? "Usuario interno" : "Invitado" })
|
|
50
52
|
] }, r.id);
|
|
51
|
-
})
|
|
53
|
+
}) })
|
|
52
54
|
] }) }),
|
|
53
55
|
/* @__PURE__ */ jsx(Dialog.Footer, { align: "end", children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "md", className: "shadow-sm", onClick: onClose, children: "Cerrar" }) })
|
|
54
56
|
] });
|
package/dist/SearchInput.js
CHANGED
|
@@ -34,6 +34,8 @@ __export(SearchInput_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(SearchInput_exports);
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_framer_motion = require("framer-motion");
|
|
38
|
+
var import_animations = require("./animations");
|
|
37
39
|
var import_Input = __toESM(require("./Input"));
|
|
38
40
|
function SearchInput({
|
|
39
41
|
value,
|
|
@@ -71,14 +73,17 @@ function SearchInput({
|
|
|
71
73
|
}
|
|
72
74
|
},
|
|
73
75
|
rightSlot: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
74
|
-
|
|
76
|
+
import_framer_motion.motion.svg,
|
|
75
77
|
{
|
|
76
78
|
viewBox: "0 0 24 24",
|
|
77
|
-
className: "h-5 w-5 opacity-
|
|
79
|
+
className: "h-5 w-5 opacity-60",
|
|
78
80
|
fill: "none",
|
|
79
81
|
stroke: "currentColor",
|
|
80
82
|
strokeWidth: "2",
|
|
81
83
|
"aria-hidden": "true",
|
|
84
|
+
initial: false,
|
|
85
|
+
animate: { x: value ? 2 : 0, opacity: value ? 0.8 : 0.6 },
|
|
86
|
+
transition: import_animations.microTransition,
|
|
82
87
|
children: [
|
|
83
88
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m21 21-4.3-4.3" }),
|
|
84
89
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "11", cy: "11", r: "7" })
|
|
@@ -86,6 +91,15 @@ function SearchInput({
|
|
|
86
91
|
}
|
|
87
92
|
)
|
|
88
93
|
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
96
|
+
import_framer_motion.motion.span,
|
|
97
|
+
{
|
|
98
|
+
className: "pointer-events-none absolute inset-0 rounded-2xl",
|
|
99
|
+
initial: false,
|
|
100
|
+
animate: { boxShadow: value ? "0 0 0 2px rgba(56, 189, 248, 0.15)" : "0 0 0 0 rgba(0,0,0,0)" },
|
|
101
|
+
transition: import_animations.microTransition
|
|
102
|
+
}
|
|
89
103
|
)
|
|
90
104
|
] });
|
|
91
105
|
}
|
package/dist/SearchInput.mjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
|
+
import { motion } from "framer-motion";
|
|
5
|
+
import { microTransition } from "./animations";
|
|
4
6
|
import Input from "./Input";
|
|
5
7
|
function SearchInput({
|
|
6
8
|
value,
|
|
@@ -38,14 +40,17 @@ function SearchInput({
|
|
|
38
40
|
}
|
|
39
41
|
},
|
|
40
42
|
rightSlot: /* @__PURE__ */ jsxs(
|
|
41
|
-
|
|
43
|
+
motion.svg,
|
|
42
44
|
{
|
|
43
45
|
viewBox: "0 0 24 24",
|
|
44
|
-
className: "h-5 w-5 opacity-
|
|
46
|
+
className: "h-5 w-5 opacity-60",
|
|
45
47
|
fill: "none",
|
|
46
48
|
stroke: "currentColor",
|
|
47
49
|
strokeWidth: "2",
|
|
48
50
|
"aria-hidden": "true",
|
|
51
|
+
initial: false,
|
|
52
|
+
animate: { x: value ? 2 : 0, opacity: value ? 0.8 : 0.6 },
|
|
53
|
+
transition: microTransition,
|
|
49
54
|
children: [
|
|
50
55
|
/* @__PURE__ */ jsx("path", { d: "m21 21-4.3-4.3" }),
|
|
51
56
|
/* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "7" })
|
|
@@ -53,6 +58,15 @@ function SearchInput({
|
|
|
53
58
|
}
|
|
54
59
|
)
|
|
55
60
|
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
motion.span,
|
|
64
|
+
{
|
|
65
|
+
className: "pointer-events-none absolute inset-0 rounded-2xl",
|
|
66
|
+
initial: false,
|
|
67
|
+
animate: { boxShadow: value ? "0 0 0 2px rgba(56, 189, 248, 0.15)" : "0 0 0 0 rgba(0,0,0,0)" },
|
|
68
|
+
transition: microTransition
|
|
69
|
+
}
|
|
56
70
|
)
|
|
57
71
|
] });
|
|
58
72
|
}
|
package/dist/Select.js
CHANGED
|
@@ -34,6 +34,8 @@ __export(Select_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(Select_exports);
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_framer_motion = require("framer-motion");
|
|
38
|
+
var import_animations = require("./animations");
|
|
37
39
|
var import_Button = __toESM(require("./Button"));
|
|
38
40
|
const S = {
|
|
39
41
|
sm: { h: "h-8", text: "text-[13px]", radius: "rounded-xl", padX: "px-3", itemPad: "px-3 py-1.5" },
|
|
@@ -223,9 +225,14 @@ function ModernSelect({
|
|
|
223
225
|
}
|
|
224
226
|
)
|
|
225
227
|
] }),
|
|
226
|
-
open
|
|
227
|
-
|
|
228
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { children: open ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
229
|
+
import_framer_motion.motion.ul,
|
|
228
230
|
{
|
|
231
|
+
variants: import_animations.popOver,
|
|
232
|
+
initial: "initial",
|
|
233
|
+
animate: "animate",
|
|
234
|
+
exit: "exit",
|
|
235
|
+
transition: import_animations.menuTransition,
|
|
229
236
|
id: `${selectId}-listbox`,
|
|
230
237
|
role: "listbox",
|
|
231
238
|
ref: listRef,
|
|
@@ -235,7 +242,7 @@ function ModernSelect({
|
|
|
235
242
|
className: [
|
|
236
243
|
"fixed z-[1000] max-h-72 overflow-auto",
|
|
237
244
|
"rounded-2xl border border-slate-200/80 bg-white/90 backdrop-blur-md shadow-2xl ring-1 ring-black/5",
|
|
238
|
-
"dark:border-white/10 dark:bg-[
|
|
245
|
+
"dark:border-white/10 dark:bg-[var(--fx-surface)]/90 dark:ring-white/10"
|
|
239
246
|
].join(" "),
|
|
240
247
|
style: {
|
|
241
248
|
top: menuPos.top,
|
|
@@ -248,7 +255,7 @@ function ModernSelect({
|
|
|
248
255
|
"li",
|
|
249
256
|
{
|
|
250
257
|
role: "presentation",
|
|
251
|
-
className: `${S[size].itemPad} sticky top-0 bg-white/90 dark:bg-[
|
|
258
|
+
className: `${S[size].itemPad} sticky top-0 bg-white/90 dark:bg-[var(--fx-surface)]/90 backdrop-blur-md text-slate-400 select-none`,
|
|
252
259
|
children: placeholder
|
|
253
260
|
}
|
|
254
261
|
),
|
|
@@ -290,7 +297,7 @@ function ModernSelect({
|
|
|
290
297
|
})
|
|
291
298
|
]
|
|
292
299
|
}
|
|
293
|
-
),
|
|
300
|
+
) : null }),
|
|
294
301
|
hasError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { id: errorId, className: "mt-1 text-[12px] text-blue-600", children: typeof error === "string" ? error : "Corrige este campo" }) : hint ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { id: hintId, className: "mt-1 text-[12px] text-slate-500", children: hint }) : null
|
|
295
302
|
] });
|
|
296
303
|
}
|
package/dist/Select.mjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
|
+
import { AnimatePresence, motion } from "framer-motion";
|
|
5
|
+
import { popOver, menuTransition } from "./animations";
|
|
4
6
|
import Button from "./Button";
|
|
5
7
|
const S = {
|
|
6
8
|
sm: { h: "h-8", text: "text-[13px]", radius: "rounded-xl", padX: "px-3", itemPad: "px-3 py-1.5" },
|
|
@@ -190,9 +192,14 @@ function ModernSelect({
|
|
|
190
192
|
}
|
|
191
193
|
)
|
|
192
194
|
] }),
|
|
193
|
-
open
|
|
194
|
-
|
|
195
|
+
/* @__PURE__ */ jsx(AnimatePresence, { children: open ? /* @__PURE__ */ jsxs(
|
|
196
|
+
motion.ul,
|
|
195
197
|
{
|
|
198
|
+
variants: popOver,
|
|
199
|
+
initial: "initial",
|
|
200
|
+
animate: "animate",
|
|
201
|
+
exit: "exit",
|
|
202
|
+
transition: menuTransition,
|
|
196
203
|
id: `${selectId}-listbox`,
|
|
197
204
|
role: "listbox",
|
|
198
205
|
ref: listRef,
|
|
@@ -202,7 +209,7 @@ function ModernSelect({
|
|
|
202
209
|
className: [
|
|
203
210
|
"fixed z-[1000] max-h-72 overflow-auto",
|
|
204
211
|
"rounded-2xl border border-slate-200/80 bg-white/90 backdrop-blur-md shadow-2xl ring-1 ring-black/5",
|
|
205
|
-
"dark:border-white/10 dark:bg-[
|
|
212
|
+
"dark:border-white/10 dark:bg-[var(--fx-surface)]/90 dark:ring-white/10"
|
|
206
213
|
].join(" "),
|
|
207
214
|
style: {
|
|
208
215
|
top: menuPos.top,
|
|
@@ -215,7 +222,7 @@ function ModernSelect({
|
|
|
215
222
|
"li",
|
|
216
223
|
{
|
|
217
224
|
role: "presentation",
|
|
218
|
-
className: `${S[size].itemPad} sticky top-0 bg-white/90 dark:bg-[
|
|
225
|
+
className: `${S[size].itemPad} sticky top-0 bg-white/90 dark:bg-[var(--fx-surface)]/90 backdrop-blur-md text-slate-400 select-none`,
|
|
219
226
|
children: placeholder
|
|
220
227
|
}
|
|
221
228
|
),
|
|
@@ -257,7 +264,7 @@ function ModernSelect({
|
|
|
257
264
|
})
|
|
258
265
|
]
|
|
259
266
|
}
|
|
260
|
-
),
|
|
267
|
+
) : null }),
|
|
261
268
|
hasError ? /* @__PURE__ */ jsx("div", { id: errorId, className: "mt-1 text-[12px] text-blue-600", children: typeof error === "string" ? error : "Corrige este campo" }) : hint ? /* @__PURE__ */ jsx("div", { id: hintId, className: "mt-1 text-[12px] text-slate-500", children: hint }) : null
|
|
262
269
|
] });
|
|
263
270
|
}
|
package/dist/Sidebar.js
CHANGED
|
@@ -200,7 +200,7 @@ function Sidebar({
|
|
|
200
200
|
setDrawerOpen(false);
|
|
201
201
|
};
|
|
202
202
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
203
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "sticky top-0 z-40 flex h-14 items-center gap-2 border-b border-black/5 bg-white/80 px-3 backdrop-blur shadow-sm xl:hidden dark:bg-[
|
|
203
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "sticky top-0 z-40 flex h-14 items-center gap-2 border-b border-black/5 bg-white/80 px-3 backdrop-blur shadow-sm xl:hidden dark:bg-[var(--fx-surface)]", children: [
|
|
204
204
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
205
205
|
import_Button.default,
|
|
206
206
|
{
|
|
@@ -225,7 +225,7 @@ function Sidebar({
|
|
|
225
225
|
"aside",
|
|
226
226
|
{
|
|
227
227
|
className: [
|
|
228
|
-
"hidden xl:fixed xl:inset-y-0 xl:flex xl:flex-col xl:border-r xl:border-black/5 bg-white xl:py-6 dark:bg-[
|
|
228
|
+
"hidden xl:fixed xl:inset-y-0 xl:flex xl:flex-col xl:border-r xl:border-black/5 bg-white xl:py-6 dark:bg-[var(--fx-surface)] z-40",
|
|
229
229
|
"transition-[width] duration-200",
|
|
230
230
|
collapsed ? "xl:w-28 xl:px-3" : "xl:w-72 xl:px-4"
|
|
231
231
|
].join(" "),
|
|
@@ -259,7 +259,7 @@ function Sidebar({
|
|
|
259
259
|
animate: { x: 0 },
|
|
260
260
|
exit: { x: -340 },
|
|
261
261
|
transition: { type: "spring", stiffness: 260, damping: 28 },
|
|
262
|
-
className: "relative h-full w-[88%] max-w-80 bg-white px-5 py-6 shadow-2xl dark:bg-[
|
|
262
|
+
className: "relative h-full w-[88%] max-w-80 bg-white px-5 py-6 shadow-2xl dark:bg-[var(--fx-surface)]",
|
|
263
263
|
children: [
|
|
264
264
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
265
265
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -415,10 +415,19 @@ function RenderItem({
|
|
|
415
415
|
"div",
|
|
416
416
|
{
|
|
417
417
|
className: [
|
|
418
|
-
"flex w-full min-w-0 items-center rounded-2xl px-3 py-2 text-[15px] transition gap-2",
|
|
418
|
+
"relative flex w-full min-w-0 items-center rounded-2xl px-3 py-2 text-[15px] transition gap-2",
|
|
419
419
|
isActive ? `${WRAP_ACTIVE[color]} text-slate-900 dark:text-white` : "text-slate-700 hover:bg-slate-100 dark:text-slate-200 dark:hover:bg-white/10"
|
|
420
420
|
].join(" "),
|
|
421
421
|
children: [
|
|
422
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
423
|
+
import_framer_motion.motion.span,
|
|
424
|
+
{
|
|
425
|
+
layoutId: "sidebar-active",
|
|
426
|
+
className: `absolute inset-0 rounded-2xl ${WRAP_ACTIVE[color]}`,
|
|
427
|
+
transition: { type: "spring", stiffness: 300, damping: 26 },
|
|
428
|
+
style: { zIndex: 0 }
|
|
429
|
+
}
|
|
430
|
+
),
|
|
422
431
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Button.default, { unstyled: true, type: "button", onClick: () => go(item.key), className: "flex min-w-0 flex-1 items-center gap-3", children: [
|
|
423
432
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
424
433
|
"span",
|
|
@@ -493,11 +502,20 @@ function RenderItem({
|
|
|
493
502
|
onClick: () => go(item.key),
|
|
494
503
|
title: collapsed ? item.label : void 0,
|
|
495
504
|
className: [
|
|
496
|
-
"group flex w-full min-w-0 items-center gap-3 rounded-2xl px-3 py-2 text-left text-[15px] transition",
|
|
505
|
+
"group relative flex w-full min-w-0 items-center gap-3 rounded-2xl px-3 py-2 text-left text-[15px] transition",
|
|
497
506
|
active ? `${WRAP_ACTIVE[color]} text-slate-900 dark:text-white` : "text-slate-700 hover:bg-slate-100 dark:text-slate-200 dark:hover:bg-white/10",
|
|
498
507
|
collapsed ? "justify-center" : ""
|
|
499
508
|
].join(" "),
|
|
500
509
|
children: [
|
|
510
|
+
active && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
511
|
+
import_framer_motion.motion.span,
|
|
512
|
+
{
|
|
513
|
+
layoutId: "sidebar-active",
|
|
514
|
+
className: `absolute inset-0 rounded-2xl ${WRAP_ACTIVE[color]}`,
|
|
515
|
+
transition: { type: "spring", stiffness: 300, damping: 26 },
|
|
516
|
+
style: { zIndex: 0 }
|
|
517
|
+
}
|
|
518
|
+
),
|
|
501
519
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
502
520
|
"span",
|
|
503
521
|
{
|