@axzydev/axzy_ui_system 1.8.10 → 1.8.12
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 +229 -183
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.js +229 -183
- package/dist/index.js.map +1 -1
- package/dist/layered.css +1 -1
- package/package.json +1 -1
- package/src/components/organisms/bento/bento.tsx +1 -1
- package/src/components/organisms/sidebar/sidebar.props.ts +25 -0
- package/src/components/organisms/sidebar/sidebar.tsx +78 -3
- package/src/components/organisms/topbar/topbar.props.ts +6 -0
- package/src/components/organisms/topbar/topbar.tsx +13 -6
- package/src/index.css +8 -0
package/dist/index.js
CHANGED
|
@@ -2273,7 +2273,7 @@ function ITBentoStatStrip({ items, activeId, onSelect, stack = false, stackItems
|
|
|
2273
2273
|
const total = parts.reduce((acc, item) => acc + (typeof item.value === "number" ? item.value : 0), 0);
|
|
2274
2274
|
const clickable = typeof onSelect === "function";
|
|
2275
2275
|
return /* @__PURE__ */ jsxs6("div", { className: clsx9("it-bento-statstrip", className), children: [
|
|
2276
|
-
/* @__PURE__ */ jsx12("div", { className: "it-bento-statstrip__grid", style: { ["--it-bento-cols"]: Math.min(items.length,
|
|
2276
|
+
/* @__PURE__ */ jsx12("div", { className: "it-bento-statstrip__grid", style: { ["--it-bento-cols"]: Math.min(items.length, 6) }, children: items.map((item) => {
|
|
2277
2277
|
const on = item.id === activeId;
|
|
2278
2278
|
const Tag = clickable ? "button" : "div";
|
|
2279
2279
|
return /* @__PURE__ */ jsxs6(
|
|
@@ -8761,9 +8761,12 @@ function ITSidebar({
|
|
|
8761
8761
|
header,
|
|
8762
8762
|
notification,
|
|
8763
8763
|
brand,
|
|
8764
|
+
profile,
|
|
8765
|
+
variant = "default",
|
|
8764
8766
|
onToggleCollapse,
|
|
8765
8767
|
expandOnHover = true
|
|
8766
8768
|
}) {
|
|
8769
|
+
const bentoPanel = variant === "bento";
|
|
8767
8770
|
const appearance = useITAppearance();
|
|
8768
8771
|
const bento = appearance === "bento";
|
|
8769
8772
|
const flat = appearance === "flat" || bento;
|
|
@@ -9000,7 +9003,7 @@ function ITSidebar({
|
|
|
9000
9003
|
}
|
|
9001
9004
|
);
|
|
9002
9005
|
};
|
|
9003
|
-
return /* @__PURE__ */
|
|
9006
|
+
return /* @__PURE__ */ jsx61(
|
|
9004
9007
|
"aside",
|
|
9005
9008
|
{
|
|
9006
9009
|
ref: sidebarRef,
|
|
@@ -9014,202 +9017,243 @@ function ITSidebar({
|
|
|
9014
9017
|
`,
|
|
9015
9018
|
style: {
|
|
9016
9019
|
zIndex: 50,
|
|
9017
|
-
backgroundColor: "var(--it-sidebar-bg, rgba(255, 255, 255, 0.90))",
|
|
9018
|
-
borderRight: bento ? "none" : "1px solid var(--it-sidebar-border, var(--color-secondary-200))",
|
|
9019
|
-
...flat ? {} : { WebkitBackdropFilter: "blur(12px)", backdropFilter: "blur(12px)" }
|
|
9020
|
+
backgroundColor: bentoPanel ? "transparent" : "var(--it-sidebar-bg, rgba(255, 255, 255, 0.90))",
|
|
9021
|
+
borderRight: bento || bentoPanel ? "none" : "1px solid var(--it-sidebar-border, var(--color-secondary-200))",
|
|
9022
|
+
...bentoPanel || !flat ? {} : { WebkitBackdropFilter: "blur(12px)", backdropFilter: "blur(12px)" }
|
|
9020
9023
|
},
|
|
9021
|
-
children:
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
|
|
9031
|
-
as: "span",
|
|
9032
|
-
className: "text-[1.05rem] font-bold tracking-tight truncate",
|
|
9033
|
-
style: { color: "var(--it-sidebar-brand-color, var(--it-sidebar-label-color, var(--color-secondary-900)))" },
|
|
9034
|
-
children: brand.text
|
|
9035
|
-
}
|
|
9036
|
-
)
|
|
9037
|
-
]
|
|
9038
|
-
}
|
|
9039
|
-
),
|
|
9040
|
-
header && /* @__PURE__ */ jsx61("div", { className: `px-4 pt-4 pb-1 flex-shrink-0 ${isSidebarCollapsed ? "overflow-hidden" : ""}`, children: isSidebarCollapsed ? /* @__PURE__ */ jsx61("div", { className: `${expandedWidth} invisible`, "aria-hidden": "true", children: header }) : header }),
|
|
9041
|
-
notification && /* @__PURE__ */ jsx61("div", { className: "px-4 pt-3 flex-shrink-0", children: renderNotification() }),
|
|
9042
|
-
/* @__PURE__ */ jsx61("nav", { "aria-label": t("sidebar.navAria"), className: `flex-1 py-4 px-4 custom-scrollbar ${fixedRail ? "overflow-visible" : "overflow-y-auto overflow-x-hidden"}`, children: /* @__PURE__ */ jsx61("ul", { className: "space-y-1", children: navigationItems.map((item) => {
|
|
9043
|
-
const hasSubmenu = !!item.subitems && item.subitems.length > 0;
|
|
9044
|
-
const submenuId = `it-sidebar-submenu-${item.id}`;
|
|
9045
|
-
const hasRenderedSubmenu = hasSubmenu && !isSidebarCollapsed;
|
|
9046
|
-
const { className: badgeClassName, ...badgeRest } = item.badgeProps ?? {};
|
|
9047
|
-
const active = !!item.isActive && !(flat && hasSubmenu && !isSidebarCollapsed);
|
|
9048
|
-
return /* @__PURE__ */ jsxs43("li", { className: "relative group/navitem", children: [
|
|
9049
|
-
/* @__PURE__ */ jsxs43(
|
|
9024
|
+
children: /* @__PURE__ */ jsxs43(
|
|
9025
|
+
"div",
|
|
9026
|
+
{
|
|
9027
|
+
className: bentoPanel ? "flex h-full min-h-0 flex-col overflow-hidden rounded-[26px]" : "flex h-full min-h-0 flex-col",
|
|
9028
|
+
style: bentoPanel ? {
|
|
9029
|
+
backgroundColor: "var(--it-sidebar-bg, var(--it-card-bg, #ffffff))",
|
|
9030
|
+
boxShadow: "0 18px 44px -28px rgba(13, 47, 64, 0.45), inset 0 0 0 1px rgba(13, 47, 64, 0.05)"
|
|
9031
|
+
} : void 0,
|
|
9032
|
+
children: [
|
|
9033
|
+
brand && (brand.logo || brand.text) && /* @__PURE__ */ jsxs43(
|
|
9050
9034
|
"div",
|
|
9051
9035
|
{
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
|
|
9055
|
-
|
|
9056
|
-
|
|
9057
|
-
|
|
9036
|
+
className: `flex items-center flex-shrink-0 h-[64px] ${isSidebarCollapsed ? "justify-center px-2" : "gap-2.5 px-7"}`,
|
|
9037
|
+
children: [
|
|
9038
|
+
brand.logo && /* @__PURE__ */ jsx61("div", { className: "flex-shrink-0 flex items-center", children: brand.logo }),
|
|
9039
|
+
brand.text && !isSidebarCollapsed && /* @__PURE__ */ jsx61(
|
|
9040
|
+
ITText,
|
|
9041
|
+
{
|
|
9042
|
+
as: "span",
|
|
9043
|
+
className: "text-[1.05rem] font-bold tracking-tight truncate",
|
|
9044
|
+
style: { color: "var(--it-sidebar-brand-color, var(--it-sidebar-label-color, var(--color-secondary-900)))" },
|
|
9045
|
+
children: brand.text
|
|
9046
|
+
}
|
|
9047
|
+
)
|
|
9048
|
+
]
|
|
9049
|
+
}
|
|
9050
|
+
),
|
|
9051
|
+
header && /* @__PURE__ */ jsx61("div", { className: `px-4 pt-4 pb-1 flex-shrink-0 ${isSidebarCollapsed ? "overflow-hidden" : ""}`, children: isSidebarCollapsed ? /* @__PURE__ */ jsx61("div", { className: `${expandedWidth} invisible`, "aria-hidden": "true", children: header }) : header }),
|
|
9052
|
+
notification && /* @__PURE__ */ jsx61("div", { className: "px-4 pt-3 flex-shrink-0", children: renderNotification() }),
|
|
9053
|
+
/* @__PURE__ */ jsx61("nav", { "aria-label": t("sidebar.navAria"), className: `flex-1 py-4 px-4 custom-scrollbar ${fixedRail ? "overflow-visible" : "overflow-y-auto overflow-x-hidden"}`, children: /* @__PURE__ */ jsx61("ul", { className: "space-y-1", children: navigationItems.map((item) => {
|
|
9054
|
+
const hasSubmenu = !!item.subitems && item.subitems.length > 0;
|
|
9055
|
+
const submenuId = `it-sidebar-submenu-${item.id}`;
|
|
9056
|
+
const hasRenderedSubmenu = hasSubmenu && !isSidebarCollapsed;
|
|
9057
|
+
const { className: badgeClassName, ...badgeRest } = item.badgeProps ?? {};
|
|
9058
|
+
const active = !!item.isActive && !(flat && hasSubmenu && !isSidebarCollapsed);
|
|
9059
|
+
return /* @__PURE__ */ jsxs43("li", { className: "relative group/navitem", children: [
|
|
9060
|
+
/* @__PURE__ */ jsxs43(
|
|
9061
|
+
"div",
|
|
9062
|
+
{
|
|
9063
|
+
role: "button",
|
|
9064
|
+
tabIndex: 0,
|
|
9065
|
+
"aria-label": item.label,
|
|
9066
|
+
"aria-expanded": hasSubmenu ? expandedItems.has(item.id) : void 0,
|
|
9067
|
+
"aria-controls": hasRenderedSubmenu ? submenuId : void 0,
|
|
9068
|
+
className: `flex items-center cursor-pointer
|
|
9058
9069
|
transition-all duration-300 ease-[cubic-bezier(0.2,0,0,1)]
|
|
9059
9070
|
rounded-xl relative overflow-visible
|
|
9060
9071
|
h-10
|
|
9061
9072
|
${flat ? "px-3" : "px-5"}
|
|
9062
9073
|
${isSidebarCollapsed ? "justify-start" : "justify-between"}
|
|
9063
9074
|
`,
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
}
|
|
9081
|
-
},
|
|
9082
|
-
children: [
|
|
9083
|
-
active && !isSidebarCollapsed && !flat && /* @__PURE__ */ jsx61(
|
|
9084
|
-
"div",
|
|
9085
|
-
{
|
|
9086
|
-
className: "absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full transition-all",
|
|
9087
|
-
style: { backgroundColor: "var(--it-sidebar-active-icon, var(--color-primary-500))", boxShadow: "0 0 10px var(--it-sidebar-active-icon, var(--color-primary-500))" }
|
|
9088
|
-
}
|
|
9089
|
-
),
|
|
9090
|
-
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-2.5 relative z-10 w-full", children: [
|
|
9091
|
-
item.icon && /* @__PURE__ */ jsx61(
|
|
9092
|
-
"div",
|
|
9093
|
-
{
|
|
9094
|
-
className: `transition-all duration-300 flex-shrink-0 flex items-center justify-center`,
|
|
9095
|
-
style: {
|
|
9096
|
-
color: active ? "var(--it-sidebar-active-icon, var(--color-primary-500))" : "var(--it-sidebar-icon-color, #9ca3af)",
|
|
9097
|
-
opacity: active ? 1 : 0.8,
|
|
9098
|
-
fontSize: flat ? "1rem" : active ? "1.12rem" : "1.05rem",
|
|
9099
|
-
filter: active && !flat ? "drop-shadow(0 0 8px rgba(255,255,255,0.2))" : "none"
|
|
9100
|
-
},
|
|
9101
|
-
children: item.icon
|
|
9102
|
-
}
|
|
9103
|
-
),
|
|
9104
|
-
!isSidebarCollapsed && /* @__PURE__ */ jsx61(
|
|
9105
|
-
ITText,
|
|
9106
|
-
{
|
|
9107
|
-
as: "span",
|
|
9108
|
-
className: `transition-all duration-300 truncate tracking-wide`,
|
|
9109
|
-
style: {
|
|
9110
|
-
color: active ? "var(--it-sidebar-active-color, #ffffff)" : "var(--it-sidebar-label-color, var(--color-secondary-300))",
|
|
9111
|
-
fontSize: flat ? "0.875rem" : "0.8rem",
|
|
9112
|
-
fontWeight: active ? bento ? "700" : "600" : "500"
|
|
9113
|
-
},
|
|
9114
|
-
children: item.label
|
|
9075
|
+
style: {
|
|
9076
|
+
backgroundColor: active ? "var(--it-sidebar-active-bg, var(--color-secondary-50))" : "transparent",
|
|
9077
|
+
boxShadow: active && !flat ? "var(--shadow-xs)" : "none",
|
|
9078
|
+
border: active && !flat ? "1px solid var(--it-sidebar-border, var(--color-secondary-200))" : "1px solid transparent"
|
|
9079
|
+
},
|
|
9080
|
+
onMouseEnter: (e) => {
|
|
9081
|
+
if (!active) e.currentTarget.style.backgroundColor = "var(--it-sidebar-hover-bg, var(--color-secondary-100))";
|
|
9082
|
+
},
|
|
9083
|
+
onMouseLeave: (e) => {
|
|
9084
|
+
if (!active) e.currentTarget.style.backgroundColor = "transparent";
|
|
9085
|
+
},
|
|
9086
|
+
onClick: () => handleItemClick(item),
|
|
9087
|
+
onKeyDown: (e) => {
|
|
9088
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
9089
|
+
e.preventDefault();
|
|
9090
|
+
handleItemClick(item);
|
|
9115
9091
|
}
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
}
|
|
9125
|
-
),
|
|
9126
|
-
item.badge != null && item.badge !== "" && /* @__PURE__ */ jsx61(
|
|
9127
|
-
ITBadget,
|
|
9128
|
-
{
|
|
9129
|
-
color: "primary",
|
|
9130
|
-
size: "sm",
|
|
9131
|
-
...badgeRest,
|
|
9132
|
-
className: clsx42(
|
|
9133
|
-
"absolute shadow-md",
|
|
9134
|
-
// En el riel no hay ancho para una etiqueta larga: el badge se
|
|
9135
|
-
// ancla a la esquina y se recorta, así nunca desborda ni tapa el icono.
|
|
9136
|
-
isSidebarCollapsed ? "top-0.5 right-0.5 max-w-[2.1rem] overflow-hidden" : "right-3 top-1/2 -translate-y-1/2",
|
|
9137
|
-
badgeClassName
|
|
9092
|
+
},
|
|
9093
|
+
children: [
|
|
9094
|
+
active && !isSidebarCollapsed && !flat && /* @__PURE__ */ jsx61(
|
|
9095
|
+
"div",
|
|
9096
|
+
{
|
|
9097
|
+
className: "absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full transition-all",
|
|
9098
|
+
style: { backgroundColor: "var(--it-sidebar-active-icon, var(--color-primary-500))", boxShadow: "0 0 10px var(--it-sidebar-active-icon, var(--color-primary-500))" }
|
|
9099
|
+
}
|
|
9138
9100
|
),
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
)
|
|
9142
|
-
]
|
|
9143
|
-
}
|
|
9144
|
-
),
|
|
9145
|
-
isSidebarCollapsed && flat && /* @__PURE__ */ jsx61(
|
|
9146
|
-
"div",
|
|
9147
|
-
{
|
|
9148
|
-
role: "tooltip",
|
|
9149
|
-
className: "absolute left-full top-1/2 -translate-y-1/2 ml-3 px-2.5 py-1.5 rounded-lg whitespace-nowrap opacity-0 invisible group-hover/navitem:opacity-100 group-hover/navitem:visible transition-opacity duration-150 pointer-events-none z-[70]",
|
|
9150
|
-
style: {
|
|
9151
|
-
backgroundColor: "var(--it-sidebar-tooltip-bg, var(--color-secondary-900))",
|
|
9152
|
-
color: "var(--it-sidebar-tooltip-color, #ffffff)",
|
|
9153
|
-
fontSize: "0.78rem",
|
|
9154
|
-
fontWeight: 500
|
|
9155
|
-
},
|
|
9156
|
-
children: item.label
|
|
9157
|
-
}
|
|
9158
|
-
),
|
|
9159
|
-
isSidebarCollapsed && !flat && /* @__PURE__ */ jsxs43(
|
|
9160
|
-
"div",
|
|
9161
|
-
{
|
|
9162
|
-
className: "absolute left-full top-0 ml-4 rounded-2xl opacity-0 invisible group-hover/navitem:opacity-100 group-hover/navitem:visible transition-all duration-300 pointer-events-none z-[70] min-w-[220px] overflow-hidden -translate-x-2 group-hover/navitem:translate-x-0 shadow-[0_10px_40px_-10px_rgba(0,0,0,0.15)]",
|
|
9163
|
-
style: {
|
|
9164
|
-
backgroundColor: "var(--it-sidebar-bg, #ffffff)",
|
|
9165
|
-
border: "1px solid var(--it-sidebar-border, var(--color-secondary-200))",
|
|
9166
|
-
WebkitBackdropFilter: "blur(16px)",
|
|
9167
|
-
backdropFilter: "blur(16px)"
|
|
9168
|
-
},
|
|
9169
|
-
children: [
|
|
9170
|
-
/* @__PURE__ */ jsxs43("div", { className: "px-5 py-4 flex items-center gap-3 font-semibold border-b", style: { borderColor: "var(--it-sidebar-border, var(--color-secondary-200))", color: "var(--it-sidebar-active-color, var(--color-secondary-900))" }, children: [
|
|
9171
|
-
item.icon && /* @__PURE__ */ jsx61("span", { style: { color: "var(--it-sidebar-active-icon, var(--color-primary-500))" }, className: "text-xl drop-shadow-sm", children: item.icon }),
|
|
9172
|
-
/* @__PURE__ */ jsx61(ITText, { as: "span", className: "tracking-wide text-[15px]", children: item.label })
|
|
9173
|
-
] }),
|
|
9174
|
-
item.subitems && item.subitems.length > 0 ? /* @__PURE__ */ jsx61("div", { className: "py-2", children: flattenSubItems(item.subitems).map((subitem) => /* @__PURE__ */ jsxs43(
|
|
9175
|
-
"div",
|
|
9176
|
-
{
|
|
9177
|
-
className: `px-5 py-2.5 text-sm flex items-center gap-3 transition-colors relative`,
|
|
9178
|
-
children: [
|
|
9179
|
-
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */ jsx61(
|
|
9101
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-2.5 relative z-10 w-full", children: [
|
|
9102
|
+
item.icon && /* @__PURE__ */ jsx61(
|
|
9180
9103
|
"div",
|
|
9181
9104
|
{
|
|
9182
|
-
className:
|
|
9105
|
+
className: `transition-all duration-300 flex-shrink-0 flex items-center justify-center`,
|
|
9183
9106
|
style: {
|
|
9184
|
-
|
|
9185
|
-
|
|
9186
|
-
|
|
9107
|
+
color: active ? "var(--it-sidebar-active-icon, var(--color-primary-500))" : "var(--it-sidebar-icon-color, #9ca3af)",
|
|
9108
|
+
opacity: active ? 1 : 0.8,
|
|
9109
|
+
fontSize: flat ? "1rem" : active ? "1.12rem" : "1.05rem",
|
|
9110
|
+
filter: active && !flat ? "drop-shadow(0 0 8px rgba(255,255,255,0.2))" : "none"
|
|
9111
|
+
},
|
|
9112
|
+
children: item.icon
|
|
9187
9113
|
}
|
|
9188
9114
|
),
|
|
9189
|
-
/* @__PURE__ */ jsx61(
|
|
9190
|
-
|
|
9191
|
-
|
|
9115
|
+
!isSidebarCollapsed && /* @__PURE__ */ jsx61(
|
|
9116
|
+
ITText,
|
|
9117
|
+
{
|
|
9118
|
+
as: "span",
|
|
9119
|
+
className: `transition-all duration-300 truncate tracking-wide`,
|
|
9120
|
+
style: {
|
|
9121
|
+
color: active ? "var(--it-sidebar-active-color, #ffffff)" : "var(--it-sidebar-label-color, var(--color-secondary-300))",
|
|
9122
|
+
fontSize: flat ? "0.875rem" : "0.8rem",
|
|
9123
|
+
fontWeight: active ? bento ? "700" : "600" : "500"
|
|
9124
|
+
},
|
|
9125
|
+
children: item.label
|
|
9126
|
+
}
|
|
9127
|
+
)
|
|
9128
|
+
] }),
|
|
9129
|
+
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */ jsx61(
|
|
9130
|
+
"div",
|
|
9131
|
+
{
|
|
9132
|
+
className: `flex-shrink-0 transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)] ${expandedItems.has(item.id) ? "rotate-180" : ""}`,
|
|
9133
|
+
style: { color: active ? "var(--it-sidebar-active-color, var(--color-secondary-900))" : "var(--it-sidebar-icon-color, var(--color-secondary-500))", opacity: 0.7 },
|
|
9134
|
+
children: /* @__PURE__ */ jsx61(FaChevronDown4, { className: "w-3 h-3" })
|
|
9135
|
+
}
|
|
9136
|
+
),
|
|
9137
|
+
item.badge != null && item.badge !== "" && /* @__PURE__ */ jsx61(
|
|
9138
|
+
ITBadget,
|
|
9139
|
+
{
|
|
9140
|
+
color: "primary",
|
|
9141
|
+
size: "sm",
|
|
9142
|
+
...badgeRest,
|
|
9143
|
+
className: clsx42(
|
|
9144
|
+
"absolute shadow-md",
|
|
9145
|
+
// En el riel no hay ancho para una etiqueta larga: el badge se
|
|
9146
|
+
// ancla a la esquina y se recorta, así nunca desborda ni tapa el icono.
|
|
9147
|
+
isSidebarCollapsed ? "top-0.5 right-0.5 max-w-[2.1rem] overflow-hidden" : "right-3 top-1/2 -translate-y-1/2",
|
|
9148
|
+
badgeClassName
|
|
9149
|
+
),
|
|
9150
|
+
children: isSidebarCollapsed ? /* @__PURE__ */ jsx61(RailBadge, { value: item.badge }) : String(item.badge)
|
|
9151
|
+
}
|
|
9152
|
+
)
|
|
9153
|
+
]
|
|
9154
|
+
}
|
|
9155
|
+
),
|
|
9156
|
+
isSidebarCollapsed && flat && /* @__PURE__ */ jsx61(
|
|
9157
|
+
"div",
|
|
9158
|
+
{
|
|
9159
|
+
role: "tooltip",
|
|
9160
|
+
className: "absolute left-full top-1/2 -translate-y-1/2 ml-3 px-2.5 py-1.5 rounded-lg whitespace-nowrap opacity-0 invisible group-hover/navitem:opacity-100 group-hover/navitem:visible transition-opacity duration-150 pointer-events-none z-[70]",
|
|
9161
|
+
style: {
|
|
9162
|
+
backgroundColor: "var(--it-sidebar-tooltip-bg, var(--color-secondary-900))",
|
|
9163
|
+
color: "var(--it-sidebar-tooltip-color, #ffffff)",
|
|
9164
|
+
fontSize: "0.78rem",
|
|
9165
|
+
fontWeight: 500
|
|
9192
9166
|
},
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9167
|
+
children: item.label
|
|
9168
|
+
}
|
|
9169
|
+
),
|
|
9170
|
+
isSidebarCollapsed && !flat && /* @__PURE__ */ jsxs43(
|
|
9171
|
+
"div",
|
|
9172
|
+
{
|
|
9173
|
+
className: "absolute left-full top-0 ml-4 rounded-2xl opacity-0 invisible group-hover/navitem:opacity-100 group-hover/navitem:visible transition-all duration-300 pointer-events-none z-[70] min-w-[220px] overflow-hidden -translate-x-2 group-hover/navitem:translate-x-0 shadow-[0_10px_40px_-10px_rgba(0,0,0,0.15)]",
|
|
9174
|
+
style: {
|
|
9175
|
+
backgroundColor: "var(--it-sidebar-bg, #ffffff)",
|
|
9176
|
+
border: "1px solid var(--it-sidebar-border, var(--color-secondary-200))",
|
|
9177
|
+
WebkitBackdropFilter: "blur(16px)",
|
|
9178
|
+
backdropFilter: "blur(16px)"
|
|
9179
|
+
},
|
|
9180
|
+
children: [
|
|
9181
|
+
/* @__PURE__ */ jsxs43("div", { className: "px-5 py-4 flex items-center gap-3 font-semibold border-b", style: { borderColor: "var(--it-sidebar-border, var(--color-secondary-200))", color: "var(--it-sidebar-active-color, var(--color-secondary-900))" }, children: [
|
|
9182
|
+
item.icon && /* @__PURE__ */ jsx61("span", { style: { color: "var(--it-sidebar-active-icon, var(--color-primary-500))" }, className: "text-xl drop-shadow-sm", children: item.icon }),
|
|
9183
|
+
/* @__PURE__ */ jsx61(ITText, { as: "span", className: "tracking-wide text-[15px]", children: item.label })
|
|
9184
|
+
] }),
|
|
9185
|
+
item.subitems && item.subitems.length > 0 ? /* @__PURE__ */ jsx61("div", { className: "py-2", children: flattenSubItems(item.subitems).map((subitem) => /* @__PURE__ */ jsxs43(
|
|
9186
|
+
"div",
|
|
9187
|
+
{
|
|
9188
|
+
className: `px-5 py-2.5 text-sm flex items-center gap-3 transition-colors relative`,
|
|
9189
|
+
children: [
|
|
9190
|
+
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */ jsx61(
|
|
9191
|
+
"div",
|
|
9192
|
+
{
|
|
9193
|
+
className: "absolute left-0 top-1/3 bottom-1/3 w-[2.5px] rounded-r-full",
|
|
9194
|
+
style: {
|
|
9195
|
+
backgroundColor: "var(--it-sidebar-active-icon, var(--color-primary-500))",
|
|
9196
|
+
boxShadow: "0 0 6px color-mix(in srgb, var(--it-sidebar-active-icon, var(--color-primary-500)) 25%, transparent)"
|
|
9197
|
+
}
|
|
9198
|
+
}
|
|
9199
|
+
),
|
|
9200
|
+
/* @__PURE__ */ jsx61("span", { className: `w-1.5 h-1.5 rounded-full transition-all ${subitem.isActive ? "scale-125" : ""}`, style: { backgroundColor: subitem.isActive ? "var(--it-sidebar-active-icon, var(--color-primary-500))" : "var(--it-sidebar-icon-color, var(--color-secondary-400))" } }),
|
|
9201
|
+
/* @__PURE__ */ jsx61(ITText, { as: "span", style: { color: subitem.isActive ? "var(--it-sidebar-active-color, var(--color-secondary-900))" : "var(--it-sidebar-label-color, var(--color-secondary-600))", fontWeight: subitem.isActive ? 600 : 500 }, children: subitem.label })
|
|
9202
|
+
]
|
|
9203
|
+
},
|
|
9204
|
+
subitem.id
|
|
9205
|
+
)) }) : /* @__PURE__ */ jsx61(ITText, { as: "div", className: "px-5 py-3 text-sm italic", style: { color: "var(--it-sidebar-label-color, var(--color-secondary-400))" }, children: t("sidebar.noSubmenu") })
|
|
9206
|
+
]
|
|
9207
|
+
}
|
|
9208
|
+
),
|
|
9209
|
+
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */ jsx61("div", { id: submenuId, role: "group", "aria-label": item.label, className: `overflow-hidden transition-all duration-400 ease-[cubic-bezier(0.2,0,0,1)] ${expandedItems.has(item.id) ? "max-h-[1000px] opacity-100 mt-1" : "max-h-0 opacity-0"}`, children: /* @__PURE__ */ jsx61(
|
|
9210
|
+
"ul",
|
|
9211
|
+
{
|
|
9212
|
+
className: `${flat && subitemConnector === "|" ? "ml-[21px] pl-2" : "ml-4"} flex flex-col gap-0 py-0.5`,
|
|
9213
|
+
style: {
|
|
9214
|
+
borderLeft: subitemConnector === "|" ? "1px solid var(--it-sidebar-border, var(--color-secondary-200))" : "none"
|
|
9215
|
+
},
|
|
9216
|
+
children: item.subitems.map(
|
|
9217
|
+
(entry) => isSubItemGroup(entry) ? renderSubItemGroup(entry, item.id) : renderSubItem(entry)
|
|
9218
|
+
)
|
|
9219
|
+
}
|
|
9220
|
+
) })
|
|
9221
|
+
] }, item.id);
|
|
9222
|
+
}) }) }),
|
|
9223
|
+
bentoPanel && profile && /* @__PURE__ */ jsx61("div", { className: "flex-shrink-0 px-3 pb-3", children: /* @__PURE__ */ jsxs43(
|
|
9224
|
+
"button",
|
|
9200
9225
|
{
|
|
9201
|
-
|
|
9202
|
-
|
|
9203
|
-
|
|
9204
|
-
|
|
9205
|
-
|
|
9206
|
-
|
|
9207
|
-
|
|
9226
|
+
type: "button",
|
|
9227
|
+
onClick: profile.onClick,
|
|
9228
|
+
"aria-label": profile.label ?? profile.name,
|
|
9229
|
+
title: isSidebarCollapsed ? profile.name : void 0,
|
|
9230
|
+
className: `flex w-full items-center gap-2.5 rounded-2xl px-2.5 py-2 text-left transition-colors hover:bg-[var(--it-sidebar-hover-bg,var(--color-secondary-100))] ${isSidebarCollapsed ? "justify-center" : ""}`,
|
|
9231
|
+
children: [
|
|
9232
|
+
profile.image ? /* @__PURE__ */ jsx61("img", { src: profile.image, alt: "", className: "h-9 w-9 flex-shrink-0 rounded-full object-cover" }) : /* @__PURE__ */ jsx61(
|
|
9233
|
+
"span",
|
|
9234
|
+
{
|
|
9235
|
+
"aria-hidden": "true",
|
|
9236
|
+
className: "flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-full text-[12px] font-bold",
|
|
9237
|
+
style: {
|
|
9238
|
+
backgroundColor: "var(--color-primary-50)",
|
|
9239
|
+
color: "var(--color-primary-600)"
|
|
9240
|
+
},
|
|
9241
|
+
children: profile.name.split(" ").filter(Boolean).slice(0, 2).map((part) => part[0]).join("").toUpperCase()
|
|
9242
|
+
}
|
|
9243
|
+
),
|
|
9244
|
+
!isSidebarCollapsed && /* @__PURE__ */ jsxs43(Fragment9, { children: [
|
|
9245
|
+
/* @__PURE__ */ jsxs43("span", { className: "min-w-0 flex-1", children: [
|
|
9246
|
+
/* @__PURE__ */ jsx61(ITText, { as: "span", className: "block truncate text-[13px] font-bold", style: { color: "var(--it-sidebar-label-color, var(--color-secondary-900))" }, children: profile.name }),
|
|
9247
|
+
profile.detail && /* @__PURE__ */ jsx61(ITText, { as: "span", className: "block truncate text-[11px]", style: { color: "var(--it-sidebar-icon-color, var(--color-secondary-500))" }, children: profile.detail })
|
|
9248
|
+
] }),
|
|
9249
|
+
/* @__PURE__ */ jsx61(FaChevronDown4, { className: "h-3 w-3 -rotate-90 opacity-50", "aria-hidden": "true" })
|
|
9250
|
+
] })
|
|
9251
|
+
]
|
|
9208
9252
|
}
|
|
9209
9253
|
) })
|
|
9210
|
-
]
|
|
9211
|
-
}
|
|
9212
|
-
|
|
9254
|
+
]
|
|
9255
|
+
}
|
|
9256
|
+
)
|
|
9213
9257
|
}
|
|
9214
9258
|
);
|
|
9215
9259
|
}
|
|
@@ -15480,7 +15524,8 @@ function ITTopBar({
|
|
|
15480
15524
|
navItems,
|
|
15481
15525
|
onNavItemClick,
|
|
15482
15526
|
hideBrandOnDesktop = false,
|
|
15483
|
-
showDesktopMenuButton = false
|
|
15527
|
+
showDesktopMenuButton = false,
|
|
15528
|
+
variant = "default"
|
|
15484
15529
|
}) {
|
|
15485
15530
|
const appearance = useITAppearance();
|
|
15486
15531
|
const bento = appearance === "bento";
|
|
@@ -15492,14 +15537,15 @@ function ITTopBar({
|
|
|
15492
15537
|
const [isUserMenuOpen, setIsUserMenuOpen] = useState42(false);
|
|
15493
15538
|
const userMenuRef = useRef25(null);
|
|
15494
15539
|
useClickOutside_default(userMenuRef, () => setIsUserMenuOpen(false));
|
|
15540
|
+
const floating = variant === "bento";
|
|
15495
15541
|
return /* @__PURE__ */ jsx79(
|
|
15496
15542
|
"header",
|
|
15497
15543
|
{
|
|
15498
|
-
className: `sticky top-0 z-40 transition-all duration-300 ${flat ? "" : "backdrop-blur-md"}`,
|
|
15544
|
+
className: `sticky top-0 z-40 transition-all duration-300 ${floating ? "mx-2 mt-2 rounded-[22px]" : ""} ${flat && !floating ? "" : "backdrop-blur-md"}`,
|
|
15499
15545
|
style: {
|
|
15500
|
-
backgroundColor: bento ? "var(--it-layout-bg, #f4f4f6)" : "var(--it-topbar-bg, rgba(255, 255, 255, 0.9))",
|
|
15501
|
-
borderBottom: bento ? "none" : "1px solid var(--it-topbar-border, rgba(15, 23, 42, 0.06))",
|
|
15502
|
-
boxShadow: flat ? "none" : "var(--shadow-xs)"
|
|
15546
|
+
backgroundColor: floating ? "var(--it-card-bg, #ffffff)" : bento ? "var(--it-layout-bg, #f4f4f6)" : "var(--it-topbar-bg, rgba(255, 255, 255, 0.9))",
|
|
15547
|
+
borderBottom: floating || bento ? "none" : "1px solid var(--it-topbar-border, rgba(15, 23, 42, 0.06))",
|
|
15548
|
+
boxShadow: floating ? "0 16px 40px -30px rgba(13, 47, 64, 0.45)" : flat ? "none" : "var(--shadow-xs)"
|
|
15503
15549
|
},
|
|
15504
15550
|
children: /* @__PURE__ */ jsxs57("div", { className: `flex items-center justify-between px-6 lg:px-8 ${flat ? "h-[64px]" : "h-[72px]"}`, children: [
|
|
15505
15551
|
/* @__PURE__ */ jsxs57("div", { className: "flex items-center gap-5", children: [
|