@axzydev/axzy_ui_system 1.2.4 → 1.2.7
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.cjs +249 -185
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -311
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +249 -185
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/src/App.tsx +1 -1
- package/src/components/data-table/dataTable.tsx +2 -2
- package/src/components/grid/grid.tsx +7 -2
- package/src/components/layout/layout.tsx +14 -17
- package/src/components/navbar/navbar.tsx +51 -46
- package/src/components/page/page.props.ts +4 -0
- package/src/components/page/page.tsx +17 -7
- package/src/components/page-header/page-header.props.ts +2 -0
- package/src/components/page-header/page-header.stories.tsx +14 -0
- package/src/components/page-header/page-header.tsx +35 -15
- package/src/components/table/table.tsx +158 -159
- package/src/index.css +20 -0
- package/src/showcases/DataShowcases.tsx +1 -1
- package/src/showcases/PageShowcases.tsx +465 -45
- package/src/showcases/StructureShowcases.tsx +205 -36
package/dist/index.d.ts
CHANGED
|
@@ -810,6 +810,8 @@ interface ITPageProps {
|
|
|
810
810
|
breadcrumbs?: ITBreadcrumbItem[];
|
|
811
811
|
actions?: ReactNode;
|
|
812
812
|
backAction?: () => void;
|
|
813
|
+
icon?: ReactNode;
|
|
814
|
+
iconColor?: string;
|
|
813
815
|
loading?: boolean;
|
|
814
816
|
error?: string | null;
|
|
815
817
|
errorTitle?: string;
|
|
@@ -821,6 +823,8 @@ interface ITPageProps {
|
|
|
821
823
|
emptyAction?: ReactNode;
|
|
822
824
|
className?: string;
|
|
823
825
|
children: ReactNode;
|
|
826
|
+
maxWidth?: "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl";
|
|
827
|
+
noPadding?: boolean;
|
|
824
828
|
}
|
|
825
829
|
|
|
826
830
|
declare function ITPage(props: ITPageProps): react_jsx_runtime.JSX.Element;
|
|
@@ -831,10 +835,12 @@ interface ITPageHeaderProps {
|
|
|
831
835
|
breadcrumbs?: ITBreadcrumbItem[];
|
|
832
836
|
actions?: ReactNode;
|
|
833
837
|
backAction?: () => void;
|
|
838
|
+
icon?: ReactNode;
|
|
839
|
+
iconColor?: string;
|
|
834
840
|
className?: string;
|
|
835
841
|
}
|
|
836
842
|
|
|
837
|
-
declare function ITPageHeader({ title, description, breadcrumbs, actions, backAction, className, }: ITPageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
843
|
+
declare function ITPageHeader({ title, description, breadcrumbs, actions, backAction, icon, iconColor, className, }: ITPageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
838
844
|
|
|
839
845
|
interface ITPaginationProps {
|
|
840
846
|
/**
|
package/dist/index.js
CHANGED
|
@@ -2811,7 +2811,7 @@ function ITTable({
|
|
|
2811
2811
|
return value;
|
|
2812
2812
|
}
|
|
2813
2813
|
};
|
|
2814
|
-
return /* @__PURE__ */ jsx14("div", { className: clsx14("space-y-4 w-full", containerClassName), children: /* @__PURE__ */ jsxs12("div", { className: "rounded-xl shadow-sm
|
|
2814
|
+
return /* @__PURE__ */ jsx14("div", { className: clsx14("space-y-4 w-full", containerClassName), children: /* @__PURE__ */ jsxs12("div", { className: "rounded-xl shadow-sm overflow-hidden", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
|
|
2815
2815
|
title && /* @__PURE__ */ jsx14("div", { className: "px-6 py-5 border-b border-secondary-100", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: /* @__PURE__ */ jsx14(ITText, { as: "h2", className: "text-xl font-bold text-secondary-900 leading-tight", children: title }) }),
|
|
2816
2816
|
/* @__PURE__ */ jsx14("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs12(
|
|
2817
2817
|
"table",
|
|
@@ -3048,7 +3048,7 @@ function ITDataTable({
|
|
|
3048
3048
|
}
|
|
3049
3049
|
};
|
|
3050
3050
|
return /* @__PURE__ */ jsxs13("div", { className: clsx15("space-y-4 w-full relative", containerClassName), children: [
|
|
3051
|
-
/* @__PURE__ */ jsxs13("div", { className: "rounded-xl shadow-sm
|
|
3051
|
+
/* @__PURE__ */ jsxs13("div", { className: "rounded-xl shadow-sm overflow-hidden", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
|
|
3052
3052
|
title && /* @__PURE__ */ jsxs13("div", { className: "px-6 py-5 border-b border-secondary-100 flex justify-between items-center", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
|
|
3053
3053
|
/* @__PURE__ */ jsx15(ITText, { as: "h2", className: "text-xl font-bold text-secondary-900 leading-tight", children: title }),
|
|
3054
3054
|
isLoading && /* @__PURE__ */ jsx15("div", { className: "text-secondary-400", children: loadingIndicator || /* @__PURE__ */ jsx15(FaSpinner2, { className: "animate-spin text-primary-500 text-xl" }) })
|
|
@@ -3069,7 +3069,7 @@ function ITDataTable({
|
|
|
3069
3069
|
className
|
|
3070
3070
|
),
|
|
3071
3071
|
children: [
|
|
3072
|
-
/* @__PURE__ */ jsx15("thead", { children: /* @__PURE__ */ jsx15("tr", { className: "bg-
|
|
3072
|
+
/* @__PURE__ */ jsx15("thead", { children: /* @__PURE__ */ jsx15("tr", { className: "bg-white border-b border-secondary-200 text-xs uppercase tracking-wider font-semibold text-secondary-500", children: columns.map((col) => /* @__PURE__ */ jsx15("th", { scope: "col", className: clsx15("px-4 py-4 align-top", col.className), children: /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-3 min-w-[150px]", children: [
|
|
3073
3073
|
/* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between gap-2", children: [
|
|
3074
3074
|
/* @__PURE__ */ jsx15(ITText, { as: "span", className: "text-secondary-700 font-bold", children: col.label }),
|
|
3075
3075
|
col.sortable && col.type !== "actions" && /* @__PURE__ */ jsx15(
|
|
@@ -6257,6 +6257,10 @@ function breakpointSpan(span, bp, cols) {
|
|
|
6257
6257
|
const clamped = Math.min(Math.max(Math.round(span), 1), cols);
|
|
6258
6258
|
return `${bp}:col-span-${clamped}`;
|
|
6259
6259
|
}
|
|
6260
|
+
function gridColsClass(cols) {
|
|
6261
|
+
const clamped = Math.min(Math.max(cols, 1), 12);
|
|
6262
|
+
return `grid-cols-${clamped}`;
|
|
6263
|
+
}
|
|
6260
6264
|
function ITGrid({
|
|
6261
6265
|
children,
|
|
6262
6266
|
container,
|
|
@@ -6276,9 +6280,8 @@ function ITGrid({
|
|
|
6276
6280
|
return /* @__PURE__ */ jsx30(
|
|
6277
6281
|
Component,
|
|
6278
6282
|
{
|
|
6279
|
-
className: clsx25("grid", className),
|
|
6283
|
+
className: clsx25("grid", gridColsClass(columns), className),
|
|
6280
6284
|
style: {
|
|
6281
|
-
gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))`,
|
|
6282
6285
|
gap: spacing > 0 ? `${spacing * 0.25}rem` : void 0,
|
|
6283
6286
|
...style
|
|
6284
6287
|
},
|
|
@@ -6291,6 +6294,7 @@ function ITGrid({
|
|
|
6291
6294
|
Component,
|
|
6292
6295
|
{
|
|
6293
6296
|
className: clsx25(
|
|
6297
|
+
"col-span-full",
|
|
6294
6298
|
colSpanClass(xs ?? sm, columns),
|
|
6295
6299
|
sm !== void 0 && breakpointSpan(sm, "sm", columns),
|
|
6296
6300
|
md !== void 0 && breakpointSpan(md, "md", columns),
|
|
@@ -6443,138 +6447,154 @@ function ITNavbar({
|
|
|
6443
6447
|
] })
|
|
6444
6448
|
] });
|
|
6445
6449
|
}
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
{
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6450
|
+
const sidebar = theme.sidebar;
|
|
6451
|
+
const topbar = theme.topbar;
|
|
6452
|
+
return /* @__PURE__ */ jsxs24("div", { className: "flex h-screen font-sans", style: { backgroundColor: theme.layout.backgroundColor }, children: [
|
|
6453
|
+
/* @__PURE__ */ jsxs24(
|
|
6454
|
+
"aside",
|
|
6455
|
+
{
|
|
6456
|
+
className: "w-72 shadow-xl flex flex-col transition-all duration-300 ease-in-out",
|
|
6457
|
+
style: { backgroundColor: sidebar.backgroundColor, borderRight: `1px solid ${sidebar.borderColor}` },
|
|
6458
|
+
children: [
|
|
6459
|
+
/* @__PURE__ */ jsxs24("div", { className: "p-6 flex items-center gap-3", style: { borderBottom: `1px solid ${sidebar.borderColor}` }, children: [
|
|
6460
|
+
logo && /* @__PURE__ */ jsx32("div", { className: "h-8 w-auto object-contain transition-transform hover:scale-105", children: logo }),
|
|
6461
|
+
logoText && /* @__PURE__ */ jsx32(ITText, { as: "span", className: "text-lg font-bold tracking-wide", style: { color: sidebar.active.color }, children: logoText })
|
|
6462
|
+
] }),
|
|
6463
|
+
/* @__PURE__ */ jsx32("nav", { className: "flex-1 px-4 py-6 overflow-y-auto custom-scrollbar", children: /* @__PURE__ */ jsx32("ul", { className: "flex flex-col gap-1.5", children: navigationItems.map((item) => /* @__PURE__ */ jsxs24("li", { children: [
|
|
6464
|
+
/* @__PURE__ */ jsxs24(
|
|
6465
|
+
"div",
|
|
6466
|
+
{
|
|
6467
|
+
className: `group flex items-center justify-between px-4 py-3 rounded-xl cursor-pointer transition-all duration-200 border-l-4 ${item.isActive ? "shadow-sm" : "hover:shadow-sm"}`,
|
|
6468
|
+
onClick: () => handleItemClick(item),
|
|
6469
|
+
style: {
|
|
6470
|
+
backgroundColor: item.isActive ? sidebar.active.backgroundColor : "transparent",
|
|
6471
|
+
borderColor: item.isActive ? sidebar.active.iconColor : "transparent",
|
|
6472
|
+
color: item.isActive ? sidebar.active.color : sidebar.label.color
|
|
6473
|
+
},
|
|
6474
|
+
onMouseEnter: (e) => {
|
|
6475
|
+
if (!item.isActive) {
|
|
6476
|
+
e.currentTarget.style.backgroundColor = sidebar.hover.backgroundColor;
|
|
6477
|
+
e.currentTarget.style.color = sidebar.active.color;
|
|
6478
|
+
}
|
|
6479
|
+
},
|
|
6480
|
+
onMouseLeave: (e) => {
|
|
6481
|
+
if (!item.isActive) {
|
|
6482
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
6483
|
+
e.currentTarget.style.color = sidebar.label.color;
|
|
6484
|
+
}
|
|
6485
|
+
},
|
|
6486
|
+
children: [
|
|
6487
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-3", children: [
|
|
6488
|
+
item.icon && /* @__PURE__ */ jsx32("div", { className: "text-xl transition-colors", style: {
|
|
6489
|
+
color: item.isActive ? sidebar.active.iconColor : sidebar.icon.color
|
|
6490
|
+
}, children: item.icon }),
|
|
6491
|
+
/* @__PURE__ */ jsx32(ITText, { as: "span", className: `font-medium text-sm ${item.isActive ? "font-semibold" : ""}`, children: item.label })
|
|
6492
|
+
] }),
|
|
6493
|
+
item.subitems && item.subitems.length > 0 && /* @__PURE__ */ jsx32("div", { className: "transition-transform", style: { color: sidebar.icon.color }, children: expandedItems.has(item.id) ? /* @__PURE__ */ jsx32(FaChevronDown, { className: "w-3 h-3" }) : /* @__PURE__ */ jsx32(FaChevronRight4, { className: "w-3 h-3" }) })
|
|
6494
|
+
]
|
|
6467
6495
|
}
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6496
|
+
),
|
|
6497
|
+
item.subitems && item.subitems.length > 0 && expandedItems.has(item.id) && /* @__PURE__ */ jsx32("ul", { className: "mt-1 ml-4 pl-4 space-y-1", style: { borderLeft: `1px solid ${sidebar.borderColor}` }, children: item.subitems.map((subitem) => /* @__PURE__ */ jsx32("li", { children: /* @__PURE__ */ jsx32(
|
|
6498
|
+
"button",
|
|
6499
|
+
{
|
|
6500
|
+
onClick: subitem.action,
|
|
6501
|
+
className: "block w-full text-left px-4 py-2.5 rounded-lg text-sm transition-all duration-200",
|
|
6502
|
+
style: {
|
|
6503
|
+
color: subitem.isActive ? sidebar.active.color : sidebar.label.color,
|
|
6504
|
+
backgroundColor: subitem.isActive ? sidebar.active.backgroundColor : "transparent"
|
|
6505
|
+
},
|
|
6506
|
+
onMouseEnter: (e) => {
|
|
6507
|
+
if (!subitem.isActive) {
|
|
6508
|
+
e.currentTarget.style.backgroundColor = sidebar.hover.backgroundColor;
|
|
6509
|
+
}
|
|
6510
|
+
},
|
|
6511
|
+
onMouseLeave: (e) => {
|
|
6512
|
+
if (!subitem.isActive) {
|
|
6513
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
6514
|
+
}
|
|
6515
|
+
},
|
|
6516
|
+
children: /* @__PURE__ */ jsx32(ITText, { as: "span", children: subitem.label })
|
|
6473
6517
|
}
|
|
6474
|
-
},
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6518
|
+
) }, subitem.id)) })
|
|
6519
|
+
] }, item.id)) }) }),
|
|
6520
|
+
userMenu && /* @__PURE__ */ jsx32("div", { className: "p-4", style: { borderTop: `1px solid ${sidebar.borderColor}` }, children: /* @__PURE__ */ jsxs24("div", { className: "relative", children: [
|
|
6521
|
+
/* @__PURE__ */ jsxs24(
|
|
6522
|
+
"button",
|
|
6523
|
+
{
|
|
6524
|
+
type: "button",
|
|
6525
|
+
className: "flex items-center gap-3 w-full p-3 rounded-xl transition-colors duration-200 group",
|
|
6526
|
+
style: { color: sidebar.label.color },
|
|
6527
|
+
onMouseEnter: (e) => {
|
|
6528
|
+
e.currentTarget.style.backgroundColor = sidebar.hover.backgroundColor;
|
|
6529
|
+
e.currentTarget.style.color = sidebar.active.color;
|
|
6530
|
+
},
|
|
6531
|
+
onMouseLeave: (e) => {
|
|
6532
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
6533
|
+
e.currentTarget.style.color = sidebar.label.color;
|
|
6534
|
+
},
|
|
6535
|
+
onClick: toggleUserMenu,
|
|
6536
|
+
children: [
|
|
6537
|
+
userMenu.userImage ? /* @__PURE__ */ jsx32(
|
|
6538
|
+
"img",
|
|
6539
|
+
{
|
|
6540
|
+
className: "w-10 h-10 rounded-full border-2 transition-colors",
|
|
6541
|
+
src: userMenu.userImage,
|
|
6542
|
+
alt: "user photo",
|
|
6543
|
+
style: { borderColor: sidebar.borderColor }
|
|
6544
|
+
}
|
|
6545
|
+
) : /* @__PURE__ */ jsx32(
|
|
6546
|
+
"div",
|
|
6547
|
+
{
|
|
6548
|
+
className: "w-10 h-10 rounded-full flex items-center justify-center transition-colors",
|
|
6549
|
+
style: { backgroundColor: sidebar.hover.backgroundColor, color: sidebar.icon.color },
|
|
6550
|
+
children: /* @__PURE__ */ jsx32(FaUserCircle, { className: "w-6 h-6" })
|
|
6551
|
+
}
|
|
6552
|
+
),
|
|
6553
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex-1 text-left overflow-hidden", children: [
|
|
6554
|
+
/* @__PURE__ */ jsx32(ITText, { as: "div", className: "font-medium text-sm truncate", style: { color: sidebar.active.color }, children: userMenu.userName }),
|
|
6555
|
+
/* @__PURE__ */ jsx32(ITText, { as: "div", className: "text-xs truncate", style: { color: sidebar.label.color }, children: userMenu.userEmail })
|
|
6556
|
+
] }),
|
|
6557
|
+
/* @__PURE__ */ jsx32(FaChevronRight4, { className: "w-3 h-3", style: { color: sidebar.icon.color } })
|
|
6558
|
+
]
|
|
6498
6559
|
}
|
|
6499
|
-
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6560
|
+
),
|
|
6561
|
+
isUserMenuOpen && /* @__PURE__ */ jsxs24(
|
|
6562
|
+
"div",
|
|
6563
|
+
{
|
|
6564
|
+
ref: userMenuRef,
|
|
6565
|
+
className: "absolute bottom-full left-0 mb-3 w-full rounded-xl shadow-2xl overflow-hidden transform transition-all duration-200 origin-bottom",
|
|
6566
|
+
style: { backgroundColor: topbar.userMenu.dropdown.backgroundColor, border: `1px solid ${topbar.userMenu.dropdown.borderColor}` },
|
|
6567
|
+
children: [
|
|
6568
|
+
/* @__PURE__ */ jsxs24("div", { className: "px-4 py-3", style: { backgroundColor: topbar.userMenu.backgroundColor, borderBottom: `1px solid ${topbar.userMenu.dropdown.borderColor}` }, children: [
|
|
6569
|
+
/* @__PURE__ */ jsx32(ITText, { as: "span", className: "block text-sm font-semibold", style: { color: topbar.userMenu.textColor }, children: userMenu.userName }),
|
|
6570
|
+
/* @__PURE__ */ jsx32(ITText, { as: "span", className: "block text-xs truncate", style: { color: topbar.userMenu.subtitleColor }, children: userMenu.userEmail })
|
|
6571
|
+
] }),
|
|
6572
|
+
/* @__PURE__ */ jsx32("ul", { className: "py-1", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ jsx32("li", { children: /* @__PURE__ */ jsx32(
|
|
6573
|
+
"button",
|
|
6574
|
+
{
|
|
6575
|
+
onClick: () => {
|
|
6576
|
+
item.onClick();
|
|
6577
|
+
setIsUserMenuOpen(false);
|
|
6578
|
+
},
|
|
6579
|
+
className: "flex items-center w-full px-4 py-2.5 text-sm transition-colors",
|
|
6580
|
+
style: { color: topbar.userMenu.textColor },
|
|
6581
|
+
onMouseEnter: (e) => {
|
|
6582
|
+
e.currentTarget.style.backgroundColor = topbar.userMenu.dropdown.itemHoverBackground;
|
|
6583
|
+
},
|
|
6584
|
+
onMouseLeave: (e) => {
|
|
6585
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
6586
|
+
},
|
|
6587
|
+
children: /* @__PURE__ */ jsx32(ITText, { as: "span", children: item.label })
|
|
6588
|
+
}
|
|
6589
|
+
) }, index)) })
|
|
6590
|
+
]
|
|
6503
6591
|
}
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
/* @__PURE__ */ jsxs24(
|
|
6511
|
-
"button",
|
|
6512
|
-
{
|
|
6513
|
-
type: "button",
|
|
6514
|
-
className: "flex items-center gap-3 w-full p-3 rounded-xl transition-colors duration-200 group",
|
|
6515
|
-
style: { color: "var(--sidebar-label-color, #94a3b8)" },
|
|
6516
|
-
onMouseEnter: (e) => {
|
|
6517
|
-
e.currentTarget.style.backgroundColor = "var(--sidebar-hover-bg, rgba(255,255,255,0.05))";
|
|
6518
|
-
e.currentTarget.style.color = "var(--sidebar-active-color, #ffffff)";
|
|
6519
|
-
},
|
|
6520
|
-
onMouseLeave: (e) => {
|
|
6521
|
-
e.currentTarget.style.backgroundColor = "transparent";
|
|
6522
|
-
e.currentTarget.style.color = "var(--sidebar-label-color, #94a3b8)";
|
|
6523
|
-
},
|
|
6524
|
-
onClick: toggleUserMenu,
|
|
6525
|
-
children: [
|
|
6526
|
-
userMenu.userImage ? /* @__PURE__ */ jsx32(
|
|
6527
|
-
"img",
|
|
6528
|
-
{
|
|
6529
|
-
className: "w-10 h-10 rounded-full border-2 transition-colors",
|
|
6530
|
-
src: userMenu.userImage,
|
|
6531
|
-
alt: "user photo",
|
|
6532
|
-
style: { borderColor: "var(--sidebar-border, #1e293b)" }
|
|
6533
|
-
}
|
|
6534
|
-
) : /* @__PURE__ */ jsx32("div", { className: "w-10 h-10 rounded-full flex items-center justify-center transition-colors", style: { backgroundColor: "var(--sidebar-hover-bg, rgba(255,255,255,0.1))", color: "var(--sidebar-icon-color, #64748b)" }, children: /* @__PURE__ */ jsx32(FaUserCircle, { className: "w-6 h-6" }) }),
|
|
6535
|
-
/* @__PURE__ */ jsxs24("div", { className: "flex-1 text-left overflow-hidden", children: [
|
|
6536
|
-
/* @__PURE__ */ jsx32(ITText, { as: "div", className: "font-medium text-sm truncate", style: { color: "var(--sidebar-active-color, #ffffff)" }, children: userMenu.userName }),
|
|
6537
|
-
/* @__PURE__ */ jsx32(ITText, { as: "div", className: "text-xs truncate", style: { color: "var(--sidebar-label-color, #94a3b8)" }, children: userMenu.userEmail })
|
|
6538
|
-
] }),
|
|
6539
|
-
/* @__PURE__ */ jsx32(FaChevronRight4, { className: "w-3 h-3", style: { color: "var(--sidebar-icon-color, #64748b)" } })
|
|
6540
|
-
]
|
|
6541
|
-
}
|
|
6542
|
-
),
|
|
6543
|
-
isUserMenuOpen && /* @__PURE__ */ jsxs24(
|
|
6544
|
-
"div",
|
|
6545
|
-
{
|
|
6546
|
-
ref: userMenuRef,
|
|
6547
|
-
className: "absolute bottom-full left-0 mb-3 w-full rounded-xl shadow-2xl overflow-hidden transform transition-all duration-200 origin-bottom",
|
|
6548
|
-
style: { backgroundColor: "var(--topbar-user-dropdown-bg, #ffffff)", border: "1px solid var(--topbar-user-dropdown-border, #e2e8f0)" },
|
|
6549
|
-
children: [
|
|
6550
|
-
/* @__PURE__ */ jsxs24("div", { className: "px-4 py-3", style: { backgroundColor: "var(--topbar-user-bg, #f8fafc)", borderBottom: "1px solid var(--topbar-user-dropdown-border, #e2e8f0)" }, children: [
|
|
6551
|
-
/* @__PURE__ */ jsx32(ITText, { as: "span", className: "block text-sm font-semibold", style: { color: "var(--topbar-user-text, #0f172a)" }, children: userMenu.userName }),
|
|
6552
|
-
/* @__PURE__ */ jsx32(ITText, { as: "span", className: "block text-xs truncate", style: { color: "var(--topbar-user-subtitle, #64748b)" }, children: userMenu.userEmail })
|
|
6553
|
-
] }),
|
|
6554
|
-
/* @__PURE__ */ jsx32("ul", { className: "py-1", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ jsx32("li", { children: /* @__PURE__ */ jsx32(
|
|
6555
|
-
"button",
|
|
6556
|
-
{
|
|
6557
|
-
onClick: () => {
|
|
6558
|
-
item.onClick();
|
|
6559
|
-
setIsUserMenuOpen(false);
|
|
6560
|
-
},
|
|
6561
|
-
className: "flex items-center w-full px-4 py-2.5 text-sm transition-colors",
|
|
6562
|
-
style: { color: "var(--topbar-user-text, #334155)" },
|
|
6563
|
-
onMouseEnter: (e) => {
|
|
6564
|
-
e.currentTarget.style.backgroundColor = "var(--topbar-user-item-hover, #f8fafc)";
|
|
6565
|
-
},
|
|
6566
|
-
onMouseLeave: (e) => {
|
|
6567
|
-
e.currentTarget.style.backgroundColor = "transparent";
|
|
6568
|
-
},
|
|
6569
|
-
children: /* @__PURE__ */ jsx32(ITText, { as: "span", children: item.label })
|
|
6570
|
-
}
|
|
6571
|
-
) }, index)) })
|
|
6572
|
-
]
|
|
6573
|
-
}
|
|
6574
|
-
)
|
|
6575
|
-
] }) })
|
|
6576
|
-
] }),
|
|
6577
|
-
/* @__PURE__ */ jsx32("main", { className: "flex-1 overflow-y-auto relative", style: { backgroundColor: "var(--layout-bg, #f8fafc)" }, children })
|
|
6592
|
+
)
|
|
6593
|
+
] }) })
|
|
6594
|
+
]
|
|
6595
|
+
}
|
|
6596
|
+
),
|
|
6597
|
+
/* @__PURE__ */ jsx32("main", { className: "flex-1 overflow-y-auto relative", style: { backgroundColor: theme.layout.backgroundColor }, children })
|
|
6578
6598
|
] });
|
|
6579
6599
|
}
|
|
6580
6600
|
|
|
@@ -6590,31 +6610,57 @@ function ITPageHeader({
|
|
|
6590
6610
|
breadcrumbs,
|
|
6591
6611
|
actions,
|
|
6592
6612
|
backAction,
|
|
6613
|
+
icon,
|
|
6614
|
+
iconColor,
|
|
6593
6615
|
className
|
|
6594
6616
|
}) {
|
|
6595
6617
|
const showTopRow = breadcrumbs?.length || backAction;
|
|
6596
|
-
return /* @__PURE__ */ jsxs25("div", { className
|
|
6597
|
-
showTopRow && /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between gap-4
|
|
6618
|
+
return /* @__PURE__ */ jsxs25("div", { className: `${className} space-y-3`, children: [
|
|
6619
|
+
showTopRow && /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between gap-4", children: [
|
|
6598
6620
|
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
6599
6621
|
backAction && /* @__PURE__ */ jsx33(
|
|
6600
6622
|
"button",
|
|
6601
6623
|
{
|
|
6602
6624
|
onClick: backAction,
|
|
6603
|
-
className: "
|
|
6625
|
+
className: "flex items-center justify-center w-9 h-9 rounded-full border border-slate-200 dark:border-slate-700 text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:border-slate-300 dark:hover:border-slate-600 hover:bg-slate-50 dark:hover:bg-slate-800/60 transition-all duration-200 flex-shrink-0",
|
|
6604
6626
|
"aria-label": "Volver",
|
|
6605
6627
|
children: /* @__PURE__ */ jsx33(FaChevronLeft3, { size: 14 })
|
|
6606
6628
|
}
|
|
6607
6629
|
),
|
|
6608
6630
|
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx33(ITBreadcrumbs, { items: breadcrumbs })
|
|
6609
6631
|
] }),
|
|
6610
|
-
actions && /* @__PURE__ */ jsx33("div", { className: "flex items-center gap-
|
|
6632
|
+
actions && /* @__PURE__ */ jsx33("div", { className: "flex items-center gap-3 flex-shrink-0", children: actions })
|
|
6611
6633
|
] }),
|
|
6612
|
-
/* @__PURE__ */ jsxs25("div", { className: "flex items-start justify-between gap-
|
|
6613
|
-
/* @__PURE__ */ jsxs25("div", { className: "min-w-0", children: [
|
|
6614
|
-
/* @__PURE__ */ jsx33(
|
|
6615
|
-
|
|
6634
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-start justify-between gap-6", children: [
|
|
6635
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-start gap-4 min-w-0", children: [
|
|
6636
|
+
icon && /* @__PURE__ */ jsx33(
|
|
6637
|
+
"div",
|
|
6638
|
+
{
|
|
6639
|
+
className: "flex items-center justify-center w-12 h-12 rounded-full border border-slate-200 dark:border-slate-700 bg-slate-50/50 dark:bg-slate-800/50 text-slate-600 dark:text-slate-300 flex-shrink-0 transition-all duration-200 hover:border-slate-300 dark:hover:border-slate-500 hover:shadow-sm",
|
|
6640
|
+
style: iconColor ? { color: iconColor } : void 0,
|
|
6641
|
+
children: icon
|
|
6642
|
+
}
|
|
6643
|
+
),
|
|
6644
|
+
/* @__PURE__ */ jsxs25("div", { className: "min-w-0", children: [
|
|
6645
|
+
/* @__PURE__ */ jsx33(
|
|
6646
|
+
ITText,
|
|
6647
|
+
{
|
|
6648
|
+
as: "h1",
|
|
6649
|
+
className: "text-3xl font-bold text-slate-800 dark:text-white tracking-tight leading-tight",
|
|
6650
|
+
children: title
|
|
6651
|
+
}
|
|
6652
|
+
),
|
|
6653
|
+
description && /* @__PURE__ */ jsx33(
|
|
6654
|
+
ITText,
|
|
6655
|
+
{
|
|
6656
|
+
as: "p",
|
|
6657
|
+
className: "text-sm font-light text-slate-500 dark:text-slate-400 mt-1 leading-relaxed",
|
|
6658
|
+
children: description
|
|
6659
|
+
}
|
|
6660
|
+
)
|
|
6661
|
+
] })
|
|
6616
6662
|
] }),
|
|
6617
|
-
!showTopRow && actions && /* @__PURE__ */ jsx33("div", { className: "flex items-center gap-
|
|
6663
|
+
!showTopRow && actions && /* @__PURE__ */ jsx33("div", { className: "flex items-center gap-3 flex-shrink-0", children: actions })
|
|
6618
6664
|
] })
|
|
6619
6665
|
] });
|
|
6620
6666
|
}
|
|
@@ -6729,7 +6775,7 @@ function ITStack({
|
|
|
6729
6775
|
|
|
6730
6776
|
// src/components/page/page.tsx
|
|
6731
6777
|
import { jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6732
|
-
var hasHeader = (props) => !!(props.title || props.description || props.breadcrumbs || props.actions || props.backAction);
|
|
6778
|
+
var hasHeader = (props) => !!(props.title || props.description || props.breadcrumbs || props.actions || props.backAction || props.icon);
|
|
6733
6779
|
var renderHeader = (props) => {
|
|
6734
6780
|
if (!hasHeader(props)) return null;
|
|
6735
6781
|
return /* @__PURE__ */ jsx36(
|
|
@@ -6739,7 +6785,9 @@ var renderHeader = (props) => {
|
|
|
6739
6785
|
description: props.description,
|
|
6740
6786
|
breadcrumbs: props.breadcrumbs,
|
|
6741
6787
|
actions: props.actions,
|
|
6742
|
-
backAction: props.backAction
|
|
6788
|
+
backAction: props.backAction,
|
|
6789
|
+
icon: props.icon,
|
|
6790
|
+
iconColor: props.iconColor
|
|
6743
6791
|
}
|
|
6744
6792
|
);
|
|
6745
6793
|
};
|
|
@@ -6755,16 +6803,24 @@ function ITPage(props) {
|
|
|
6755
6803
|
emptyDescription,
|
|
6756
6804
|
emptyAction,
|
|
6757
6805
|
className,
|
|
6758
|
-
children
|
|
6806
|
+
children,
|
|
6807
|
+
maxWidth = "7xl",
|
|
6808
|
+
noPadding = false
|
|
6759
6809
|
} = props;
|
|
6760
|
-
const wrapperClass = clsx28(
|
|
6810
|
+
const wrapperClass = clsx28(
|
|
6811
|
+
"mx-auto w-full",
|
|
6812
|
+
!noPadding && "px-4 sm:px-6 lg:px-8 py-6",
|
|
6813
|
+
`max-w-${maxWidth}`,
|
|
6814
|
+
"space-y-8",
|
|
6815
|
+
className
|
|
6816
|
+
);
|
|
6761
6817
|
if (loading) {
|
|
6762
6818
|
return /* @__PURE__ */ jsxs27("div", { className: wrapperClass, children: [
|
|
6763
6819
|
renderHeader(props),
|
|
6764
|
-
/* @__PURE__ */ jsxs27(ITStack, { spacing:
|
|
6765
|
-
/* @__PURE__ */ jsx36(ITSkeleton, { variant: "rectangular", height: 40, width: "40%" }),
|
|
6766
|
-
/* @__PURE__ */ jsx36(ITSkeleton, { variant: "rectangular", height: 200 }),
|
|
6767
|
-
/* @__PURE__ */ jsx36(ITSkeleton, { variant: "rectangular", height: 200 })
|
|
6820
|
+
/* @__PURE__ */ jsxs27(ITStack, { spacing: 6, children: [
|
|
6821
|
+
/* @__PURE__ */ jsx36(ITSkeleton, { variant: "rectangular", height: 40, width: "40%", className: "rounded-lg" }),
|
|
6822
|
+
/* @__PURE__ */ jsx36(ITSkeleton, { variant: "rectangular", height: 200, className: "rounded-lg" }),
|
|
6823
|
+
/* @__PURE__ */ jsx36(ITSkeleton, { variant: "rectangular", height: 200, className: "rounded-lg" })
|
|
6768
6824
|
] })
|
|
6769
6825
|
] });
|
|
6770
6826
|
}
|
|
@@ -8898,6 +8954,7 @@ function ITLayout({
|
|
|
8898
8954
|
}) {
|
|
8899
8955
|
const [desktopCollapsed, setDesktopCollapsed] = useState26(true);
|
|
8900
8956
|
const [mobileSidebarOpen, setMobileSidebarOpen] = useState26(false);
|
|
8957
|
+
const layoutTokens = theme.layout;
|
|
8901
8958
|
return /* @__PURE__ */ jsxs46("div", { className: `flex flex-col h-screen overflow-hidden w-full ${className}`, children: [
|
|
8902
8959
|
/* @__PURE__ */ jsx60(
|
|
8903
8960
|
ITTopBar,
|
|
@@ -8907,48 +8964,55 @@ function ITLayout({
|
|
|
8907
8964
|
onToggleMobileMenu: () => setMobileSidebarOpen((v) => !v)
|
|
8908
8965
|
}
|
|
8909
8966
|
),
|
|
8910
|
-
/* @__PURE__ */ jsxs46(
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
|
|
8929
|
-
|
|
8967
|
+
/* @__PURE__ */ jsxs46(
|
|
8968
|
+
"div",
|
|
8969
|
+
{
|
|
8970
|
+
className: "flex flex-1 overflow-hidden relative",
|
|
8971
|
+
style: { backgroundColor: layoutTokens.backgroundColor },
|
|
8972
|
+
children: [
|
|
8973
|
+
/* @__PURE__ */ jsxs46("div", { className: "hidden lg:block relative z-40 h-full", children: [
|
|
8974
|
+
/* @__PURE__ */ jsx60("div", { className: "w-[88px] h-full flex-shrink-0" }),
|
|
8975
|
+
/* @__PURE__ */ jsx60("div", { className: "absolute top-0 left-0 h-full", children: /* @__PURE__ */ jsx60(
|
|
8976
|
+
ITSidebar,
|
|
8977
|
+
{
|
|
8978
|
+
...sidebar,
|
|
8979
|
+
isCollapsed: desktopCollapsed,
|
|
8980
|
+
onToggleCollapse: () => setDesktopCollapsed((v) => !v),
|
|
8981
|
+
visibleOnMobile: false,
|
|
8982
|
+
className: "h-full drop-shadow-2xl transition-all duration-400 ease-[cubic-bezier(0.2,0,0,1)] flex-shrink-0"
|
|
8983
|
+
}
|
|
8984
|
+
) })
|
|
8985
|
+
] }),
|
|
8986
|
+
mobileSidebarOpen && /* @__PURE__ */ jsx60(
|
|
8930
8987
|
"div",
|
|
8931
8988
|
{
|
|
8932
|
-
className: "
|
|
8933
|
-
onClick: (
|
|
8989
|
+
className: "lg:hidden fixed inset-0 z-50 transition-opacity duration-300 backdrop-blur-sm bg-black/40",
|
|
8990
|
+
onClick: () => setMobileSidebarOpen(false),
|
|
8934
8991
|
children: /* @__PURE__ */ jsx60(
|
|
8935
|
-
|
|
8992
|
+
"div",
|
|
8936
8993
|
{
|
|
8937
|
-
|
|
8938
|
-
|
|
8939
|
-
|
|
8940
|
-
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
8994
|
+
className: "h-full w-fit flex transform transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
|
|
8995
|
+
onClick: (e) => e.stopPropagation(),
|
|
8996
|
+
children: /* @__PURE__ */ jsx60(
|
|
8997
|
+
ITSidebar,
|
|
8998
|
+
{
|
|
8999
|
+
...sidebar,
|
|
9000
|
+
isCollapsed: false,
|
|
9001
|
+
visibleOnMobile: true,
|
|
9002
|
+
className: "h-full shadow-2xl relative z-[60]",
|
|
9003
|
+
onToggleCollapse: () => setMobileSidebarOpen(false),
|
|
9004
|
+
onItemClick: () => setMobileSidebarOpen(false),
|
|
9005
|
+
onSubItemClick: () => setMobileSidebarOpen(false)
|
|
9006
|
+
}
|
|
9007
|
+
)
|
|
8944
9008
|
}
|
|
8945
9009
|
)
|
|
8946
9010
|
}
|
|
8947
|
-
)
|
|
8948
|
-
|
|
8949
|
-
|
|
8950
|
-
|
|
8951
|
-
|
|
9011
|
+
),
|
|
9012
|
+
/* @__PURE__ */ jsx60("main", { className: "flex-1 overflow-y-auto w-full custom-scrollbar relative z-0", children: /* @__PURE__ */ jsx60("div", { className: clsx42("mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8 py-6 h-full", contentClassName), children }) })
|
|
9013
|
+
]
|
|
9014
|
+
}
|
|
9015
|
+
)
|
|
8952
9016
|
] });
|
|
8953
9017
|
}
|
|
8954
9018
|
|