@zauru-sdk/components 6.15.1 → 6.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/esm/NavBar/NavBar.js +184 -42
- package/package.json +2 -2
- package/src/NavBar/NavBar.tsx +614 -242
- package/stories/NavBar.stories.tsx +92 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [6.16.0](https://github.com/intuitiva/zauru-typescript-sdk/compare/@zauru-sdk/components@6.15.1...@zauru-sdk/components@6.16.0) (2026-10-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* rehacer el NavBar mobile y heredar el color de la app ([f1ab276](https://github.com/intuitiva/zauru-typescript-sdk/commit/f1ab276b6717e7a82e36ad71285b164d43ce243f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [6.15.1](https://github.com/intuitiva/zauru-typescript-sdk/compare/@zauru-sdk/components@6.15.0...@zauru-sdk/components@6.15.1) (2026-10-28)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @zauru-sdk/components
|
|
@@ -1,41 +1,100 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { DropDownArrowSvgIcon, LogoutDropDownSvgIcon, MenuAlt4Svg, OpcionButtonSvgIcon, } from "@zauru-sdk/icons";
|
|
2
|
+
import { useEffect, useId, useMemo, useRef, useState, } from "react";
|
|
3
|
+
import { DropDownArrowSvgIcon, ExitSvg, LogoutDropDownSvgIcon, MenuAlt4Svg, OpcionButtonSvgIcon, } from "@zauru-sdk/icons";
|
|
4
4
|
import { COLORS } from "./NavBar.utils.js";
|
|
5
|
-
import { Link,
|
|
5
|
+
import { Link, useLocation, useNavigate } from "@remix-run/react";
|
|
6
6
|
import { useAppSelector } from "@zauru-sdk/redux";
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const itemColor = (item, fallback) => item.selectedColor ? COLORS[item.selectedColor] : fallback;
|
|
8
|
+
const visibleChildrenOf = (item) => (item.childrens ?? []).filter((child) => child.hide !== true);
|
|
9
|
+
const pathMatches = (pathname, link) => {
|
|
10
|
+
if (!link)
|
|
11
|
+
return false;
|
|
12
|
+
return pathname === link || pathname.startsWith(`${link}/`);
|
|
10
13
|
};
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
const focusRing = "focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-offset-2 focus-visible:ring-offset-transparent";
|
|
15
|
+
const desktopTriggerClass = (color, isActive) => `inline-flex min-h-11 cursor-pointer items-center gap-1 rounded-full px-4 text-xs font-medium uppercase leading-none text-white transition-opacity duration-150 motion-reduce:transition-none ${isActive ? color.bg900 : color.bg700} hover:opacity-90 ${focusRing}`;
|
|
16
|
+
const mobileRowClass = (isActive) => `flex min-h-11 w-full cursor-pointer items-center gap-2 rounded-lg px-3 text-left text-sm font-medium text-white transition-colors duration-150 motion-reduce:transition-none hover:bg-white/10 ${focusRing} ${isActive ? "bg-white/15" : ""}`;
|
|
17
|
+
const dropdownItemClass = (danger) => `flex min-h-11 w-full cursor-pointer items-center gap-2 px-4 text-sm transition-colors duration-150 motion-reduce:transition-none ${danger
|
|
18
|
+
? "text-red-700 hover:bg-red-50"
|
|
19
|
+
: "text-gray-700 hover:bg-gray-100"}`;
|
|
20
|
+
const NotificationBadge = ({ value }) => (_jsx("span", { className: "absolute -top-1.5 -right-1.5 flex h-5 min-w-5 items-center justify-center rounded-full bg-red-500 px-1 text-xs font-bold text-white", children: value }));
|
|
21
|
+
const useNotificationBadge = (item) => {
|
|
22
|
+
const relevantState = useAppSelector((state) => item.reduxNotificationBadge
|
|
23
|
+
? item.reduxNotificationBadge(state)
|
|
24
|
+
: undefined);
|
|
19
25
|
const [notificationBadge, setNotificationBadge] = useState();
|
|
20
26
|
useEffect(() => {
|
|
21
27
|
setNotificationBadge(relevantState);
|
|
22
28
|
}, [relevantState]);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
return notificationBadge;
|
|
30
|
+
};
|
|
31
|
+
const Chevron = ({ open }) => (_jsx("span", { className: `inline-flex shrink-0 transition-transform duration-150 motion-reduce:transition-none ${open ? "rotate-180" : ""}`, "aria-hidden": "true", children: _jsx(DropDownArrowSvgIcon, {}) }));
|
|
32
|
+
const NavLinkItem = ({ item, color, layout, onNavigate, }) => {
|
|
33
|
+
const location = useLocation();
|
|
34
|
+
const isActive = pathMatches(location.pathname, item.link);
|
|
35
|
+
const notificationBadge = useNotificationBadge(item);
|
|
36
|
+
const palette = itemColor(item, color);
|
|
37
|
+
if (layout === "mobile") {
|
|
38
|
+
return (_jsx("li", { children: _jsxs(Link, { to: item.link, "aria-current": isActive ? "page" : undefined, onClick: onNavigate, className: `${mobileRowClass(isActive)} relative`, children: [item.icon, _jsx("span", { className: "flex-1", children: item.name }), notificationBadge !== undefined && (_jsx(NotificationBadge, { value: notificationBadge }))] }) }));
|
|
39
|
+
}
|
|
40
|
+
return (_jsx("li", { className: "relative", children: _jsxs(Link, { to: item.link, "aria-current": isActive ? "page" : undefined, className: `${desktopTriggerClass(palette, isActive)} relative`, children: [item.icon, _jsx("span", { children: item.name }), notificationBadge !== undefined && (_jsx(NotificationBadge, { value: notificationBadge }))] }) }));
|
|
41
|
+
};
|
|
42
|
+
const NavItemGroup = ({ item, color, layout, open, onToggle, onNavigate, }) => {
|
|
43
|
+
const location = useLocation();
|
|
44
|
+
const children = visibleChildrenOf(item);
|
|
45
|
+
const childActive = children.some((child) => pathMatches(location.pathname, child.link));
|
|
46
|
+
const palette = itemColor(item, color);
|
|
47
|
+
const menuId = useId();
|
|
48
|
+
if (children.length === 0) {
|
|
49
|
+
return null;
|
|
26
50
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
51
|
+
if (layout === "mobile") {
|
|
52
|
+
return (_jsxs("li", { children: [_jsxs("button", { type: "button", "aria-expanded": open, "aria-controls": menuId, onClick: onToggle, className: mobileRowClass(childActive), children: [item.icon, _jsx("span", { className: "flex-1", children: item.name }), _jsx(Chevron, { open: open })] }), _jsx("ul", { id: menuId, hidden: !open, className: "mt-1 ml-3 space-y-1 border-l border-white/20 pl-2", children: children.map((child) => {
|
|
53
|
+
const isActive = pathMatches(location.pathname, child.link);
|
|
54
|
+
return (_jsx("li", { children: _jsxs(Link, { to: child.link, "aria-current": isActive ? "page" : undefined, onClick: onNavigate, className: mobileRowClass(isActive), children: [child.icon, _jsx("span", { children: child.name })] }) }, child.link));
|
|
55
|
+
}) })] }));
|
|
56
|
+
}
|
|
57
|
+
return (_jsxs("li", { className: "relative", children: [_jsxs("button", { type: "button", "aria-haspopup": "menu", "aria-expanded": open, "aria-controls": menuId, onClick: onToggle, className: desktopTriggerClass(palette, childActive), children: [item.icon, _jsx("span", { children: item.name }), _jsx(Chevron, { open: open })] }), _jsx("div", { id: menuId, role: "menu", hidden: !open, className: "absolute left-0 z-30 mt-2 min-w-[14rem] overflow-hidden rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5", children: children.map((child) => (_jsxs(Link, { role: "menuitem", to: child.link, onClick: onNavigate, className: dropdownItemClass(), children: [child.icon, _jsx("span", { children: child.name })] }, child.link))) })] }));
|
|
58
|
+
};
|
|
59
|
+
const UserMenu = ({ color, layout, open, onToggle, onNavigate, entries, }) => {
|
|
60
|
+
const menuId = useId();
|
|
61
|
+
if (entries.length === 0) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
if (layout === "mobile") {
|
|
65
|
+
return (_jsxs("div", { className: "mt-4 border-t border-white/20 pt-4", children: [_jsx("p", { className: "px-3 pb-2 text-xs font-semibold uppercase tracking-wide text-white/70", children: "Cuenta" }), _jsx("ul", { className: "space-y-1", children: entries.map((entry) => (_jsx("li", { children: entry.to ? (_jsxs(Link, { to: entry.to, onClick: onNavigate, className: `${mobileRowClass(false)} [&_svg]:!text-current ${entry.danger ? "text-red-100 hover:bg-red-500/20" : ""}`, children: [entry.icon, _jsx("span", { children: entry.label })] })) : (_jsxs("button", { type: "button", onClick: () => {
|
|
66
|
+
entry.onClick?.();
|
|
67
|
+
onNavigate?.();
|
|
68
|
+
}, className: `${mobileRowClass(false)} [&_svg]:!text-current`, children: [entry.icon, _jsx("span", { children: entry.label })] })) }, entry.key))) })] }));
|
|
69
|
+
}
|
|
70
|
+
return (_jsxs("div", { className: "relative ml-auto", children: [_jsxs("button", { type: "button", "aria-label": "Men\u00FA de usuario", "aria-haspopup": "menu", "aria-expanded": open, "aria-controls": menuId, onClick: onToggle, className: `${desktopTriggerClass(color, open)} p-0 px-3`, children: [_jsx(OpcionButtonSvgIcon, {}), _jsx(Chevron, { open: open })] }), _jsx("div", { id: menuId, role: "menu", hidden: !open, className: "absolute right-0 z-30 mt-2 w-56 overflow-hidden rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5", children: entries.map((entry) => entry.to ? (_jsxs(Link, { role: "menuitem", to: entry.to, onClick: onNavigate, className: dropdownItemClass(entry.danger), children: [entry.icon, _jsx("span", { children: entry.label })] }, entry.key)) : (_jsxs("button", { type: "button", role: "menuitem", onClick: () => {
|
|
71
|
+
entry.onClick?.();
|
|
72
|
+
onNavigate?.();
|
|
73
|
+
}, className: dropdownItemClass(entry.danger), children: [entry.icon, _jsx("span", { children: entry.label })] }, entry.key))) })] }));
|
|
32
74
|
};
|
|
75
|
+
const NavItems = ({ items, color, layout, openMenuId, setOpenMenuId, onNavigate, }) => (_jsx("ul", { className: layout === "mobile"
|
|
76
|
+
? "flex flex-col gap-1"
|
|
77
|
+
: "flex flex-wrap items-center gap-1", children: items.map((item, index) => {
|
|
78
|
+
const children = visibleChildrenOf(item);
|
|
79
|
+
const menuKey = `${item.name}-${index}`;
|
|
80
|
+
if (children.length > 0) {
|
|
81
|
+
return (_jsx(NavItemGroup, { item: item, color: color, layout: layout, open: openMenuId === menuKey, onToggle: () => setOpenMenuId(openMenuId === menuKey ? null : menuKey), onNavigate: onNavigate }, menuKey));
|
|
82
|
+
}
|
|
83
|
+
return (_jsx(NavLinkItem, { item: item, color: color, layout: layout, onNavigate: onNavigate }, menuKey));
|
|
84
|
+
}) }));
|
|
33
85
|
export const NavBar = ({ title, loggedIn, items, selectedColor, version, reloadCatalogsOption, settingsOption, showDarkModeToggle = false, }) => {
|
|
34
86
|
const color = COLORS[selectedColor];
|
|
35
|
-
const [
|
|
87
|
+
const [navOpen, setNavOpen] = useState(false);
|
|
88
|
+
const [openMenuId, setOpenMenuId] = useState(null);
|
|
36
89
|
const [currentVersion, setCurrentVersion] = useState(version);
|
|
37
90
|
const [isDarkMode, setIsDarkMode] = useState(false);
|
|
38
91
|
const navigate = useNavigate();
|
|
92
|
+
const location = useLocation();
|
|
93
|
+
const desktopMenuRef = useRef(null);
|
|
94
|
+
const mobileDrawerRef = useRef(null);
|
|
95
|
+
const wasNavOpen = useRef(false);
|
|
96
|
+
const mobileNavId = useId();
|
|
97
|
+
const visibleItems = useMemo(() => items.filter((item) => item.loggedIn === loggedIn && item.hide !== true), [items, loggedIn]);
|
|
39
98
|
useEffect(() => {
|
|
40
99
|
document.documentElement.classList.toggle("dark", isDarkMode);
|
|
41
100
|
}, [isDarkMode]);
|
|
@@ -44,24 +103,107 @@ export const NavBar = ({ title, loggedIn, items, selectedColor, version, reloadC
|
|
|
44
103
|
setCurrentVersion(version);
|
|
45
104
|
}
|
|
46
105
|
}, [version, currentVersion]);
|
|
47
|
-
|
|
48
|
-
|
|
106
|
+
useEffect(() => {
|
|
107
|
+
setNavOpen(false);
|
|
108
|
+
setOpenMenuId(null);
|
|
109
|
+
}, [location.pathname]);
|
|
110
|
+
useEffect(() => {
|
|
111
|
+
if (!navOpen)
|
|
112
|
+
return;
|
|
113
|
+
const previousOverflow = document.body.style.overflow;
|
|
114
|
+
document.body.style.overflow = "hidden";
|
|
115
|
+
return () => {
|
|
116
|
+
document.body.style.overflow = previousOverflow;
|
|
117
|
+
};
|
|
118
|
+
}, [navOpen]);
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
const drawer = mobileDrawerRef.current;
|
|
121
|
+
if (!drawer)
|
|
122
|
+
return;
|
|
123
|
+
if (navOpen) {
|
|
124
|
+
drawer.removeAttribute("inert");
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
drawer.setAttribute("inert", "");
|
|
128
|
+
}
|
|
129
|
+
}, [navOpen]);
|
|
130
|
+
useEffect(() => {
|
|
131
|
+
const onKeyDown = (event) => {
|
|
132
|
+
if (event.key !== "Escape")
|
|
133
|
+
return;
|
|
134
|
+
setNavOpen(false);
|
|
135
|
+
setOpenMenuId(null);
|
|
136
|
+
};
|
|
137
|
+
document.addEventListener("keydown", onKeyDown);
|
|
138
|
+
return () => document.removeEventListener("keydown", onKeyDown);
|
|
139
|
+
}, []);
|
|
140
|
+
useEffect(() => {
|
|
141
|
+
const onPointerDown = (event) => {
|
|
142
|
+
if (desktopMenuRef.current &&
|
|
143
|
+
!desktopMenuRef.current.contains(event.target)) {
|
|
144
|
+
setOpenMenuId(null);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
document.addEventListener("mousedown", onPointerDown);
|
|
148
|
+
return () => document.removeEventListener("mousedown", onPointerDown);
|
|
149
|
+
}, []);
|
|
150
|
+
const closeMenus = () => {
|
|
151
|
+
setNavOpen(false);
|
|
152
|
+
setOpenMenuId(null);
|
|
49
153
|
};
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
154
|
+
const userEntries = useMemo(() => {
|
|
155
|
+
if (!loggedIn)
|
|
156
|
+
return [];
|
|
157
|
+
const entries = [];
|
|
158
|
+
if (settingsOption) {
|
|
159
|
+
entries.push({
|
|
160
|
+
key: "configuracion",
|
|
161
|
+
label: "Configuración",
|
|
162
|
+
to: "/configuracion",
|
|
163
|
+
icon: (_jsxs("svg", { className: "h-5 w-5 shrink-0", width: "24", height: "24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [_jsx("path", { d: "M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z" }), _jsx("path", { d: "M19.4 13a7.7 7.7 0 0 0 .06-2l2.1-1.64-2-3.46-2.55 1a7.7 7.7 0 0 0-1.73-1L14.7 2H9.3l-.58 2.9a7.7 7.7 0 0 0-1.73 1l-2.55-1-2 3.46L4.54 11a7.7 7.7 0 0 0 0 2l-2.1 1.64 2 3.46 2.55-1a7.7 7.7 0 0 0 1.73 1L9.3 22h5.4l.58-2.9a7.7 7.7 0 0 0 1.73-1l2.55 1 2-3.46Z" })] })),
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
if (reloadCatalogsOption) {
|
|
167
|
+
entries.push({
|
|
168
|
+
key: "recargar-catalogos",
|
|
169
|
+
label: "Recargar catálogos",
|
|
170
|
+
to: "/reload-catalogs",
|
|
171
|
+
icon: (_jsxs("svg", { className: "h-5 w-5 shrink-0", width: "24", height: "24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [_jsx("path", { d: "M20.5 8c-1.392-3.179-4.823-5-8.522-5C7.299 3 3.453 6.552 3 11.1" }), _jsx("path", { d: "M16.489 8.4h3.97A.54.54 0 0 0 21 7.86V3.9M3.5 16c1.392 3.179 4.823 5 8.522 5 4.679 0 8.525-3.552 8.978-8.1" }), _jsx("path", { d: "M7.511 15.6h-3.97a.54.54 0 0 0-.541.54v3.96" })] })),
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
if (showDarkModeToggle) {
|
|
175
|
+
entries.push({
|
|
176
|
+
key: "dark-mode-toggle",
|
|
177
|
+
label: isDarkMode ? "Modo claro" : "Modo oscuro",
|
|
178
|
+
onClick: () => setIsDarkMode((value) => !value),
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
entries.push({
|
|
182
|
+
key: "cerrar-sesion",
|
|
183
|
+
label: "Cerrar sesión",
|
|
184
|
+
to: "/logout",
|
|
185
|
+
icon: _jsx(LogoutDropDownSvgIcon, {}),
|
|
186
|
+
danger: true,
|
|
187
|
+
});
|
|
188
|
+
return entries;
|
|
189
|
+
}, [
|
|
190
|
+
loggedIn,
|
|
191
|
+
settingsOption,
|
|
192
|
+
reloadCatalogsOption,
|
|
193
|
+
showDarkModeToggle,
|
|
194
|
+
isDarkMode,
|
|
195
|
+
]);
|
|
196
|
+
useEffect(() => {
|
|
197
|
+
const justOpened = navOpen && !wasNavOpen.current;
|
|
198
|
+
wasNavOpen.current = navOpen;
|
|
199
|
+
if (!justOpened)
|
|
200
|
+
return;
|
|
201
|
+
const activeGroup = visibleItems.find((item) => visibleChildrenOf(item).some((child) => pathMatches(location.pathname, child.link)));
|
|
202
|
+
if (!activeGroup)
|
|
203
|
+
return;
|
|
204
|
+
const index = visibleItems.indexOf(activeGroup);
|
|
205
|
+
setOpenMenuId(`${activeGroup.name}-${index}`);
|
|
206
|
+
}, [navOpen, visibleItems, location.pathname]);
|
|
207
|
+
const renderCluster = (layout) => (_jsxs(_Fragment, { children: [_jsx(NavItems, { items: visibleItems, color: color, layout: layout, openMenuId: openMenuId, setOpenMenuId: setOpenMenuId, onNavigate: closeMenus }), _jsx(UserMenu, { color: color, layout: layout, open: openMenuId === "user", onToggle: () => setOpenMenuId(openMenuId === "user" ? null : "user"), onNavigate: closeMenus, entries: userEntries })] }));
|
|
208
|
+
return (_jsx("nav", { className: `py-2 ${color.bg600}`, "aria-label": "Principal", children: _jsxs("div", { className: "flex items-center justify-between gap-3 px-4 sm:px-5", children: [_jsxs("div", { className: "flex min-w-0 flex-1 items-center justify-between gap-2 lg:w-auto lg:flex-none", children: [_jsxs(Link, { className: `inline-flex min-h-11 min-w-0 cursor-pointer items-center gap-2 truncate text-sm font-bold uppercase text-white ${focusRing}`, to: "/home", children: [_jsx("img", { className: "h-7 w-auto shrink-0", src: "/logo.png", alt: "" }), _jsx("span", { className: "truncate", children: title })] }), version !== currentVersion && (_jsx("button", { type: "button", className: `shrink-0 cursor-pointer rounded-full px-3 py-2 text-xs text-white ${color.bg700} hover:opacity-90 ${focusRing}`, onClick: () => navigate(0), children: "Actualizar versi\u00F3n" })), _jsx("button", { type: "button", className: `inline-flex min-h-11 min-w-11 cursor-pointer items-center justify-center rounded-md text-white lg:hidden ${focusRing} ${navOpen ? "pointer-events-none invisible" : ""}`, "aria-label": "Abrir men\u00FA", "aria-expanded": navOpen, "aria-controls": mobileNavId, "aria-hidden": navOpen, tabIndex: navOpen ? -1 : undefined, onClick: () => setNavOpen(true), children: _jsx(MenuAlt4Svg, { open: false }) })] }), navOpen && (_jsx("button", { type: "button", "aria-label": "Cerrar men\u00FA", className: "fixed inset-0 z-40 cursor-pointer bg-black/40 lg:hidden", onClick: closeMenus })), _jsxs("div", { ref: mobileDrawerRef, id: mobileNavId, "aria-hidden": !navOpen, className: `fixed inset-y-0 left-0 z-50 flex w-[min(20rem,86vw)] flex-col ${color.bg700} shadow-lg transition-transform duration-200 ease-out motion-reduce:transition-none lg:hidden ${navOpen ? "translate-x-0" : "pointer-events-none -translate-x-full"}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-2 border-b border-white/15 px-4 py-3", children: [_jsx("p", { className: "truncate text-sm font-bold uppercase text-white", children: title }), _jsx("button", { type: "button", className: `inline-flex min-h-11 min-w-11 cursor-pointer items-center justify-center rounded-md text-white ${focusRing}`, "aria-label": "Cerrar men\u00FA", onClick: closeMenus, children: _jsx(ExitSvg, {}) })] }), _jsx("div", { className: "flex-1 overflow-y-auto overscroll-contain p-3", children: renderCluster("mobile") })] }), _jsx("div", { ref: desktopMenuRef, className: "hidden min-w-0 flex-1 items-center gap-2 lg:flex", children: renderCluster("desktop") })] }) }));
|
|
67
209
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.16.0",
|
|
4
4
|
"description": "Componentes reutilizables en las WebApps de Zauru.",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"styled-components": "^5.3.5",
|
|
63
63
|
"zod": "^3.23.8"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "5a47bf012ebb44d51bc409fb3828b2512befb8dd"
|
|
66
66
|
}
|