@beweco/aurora-ui 0.1.55 → 0.1.57
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/assets/css/styles.css +1 -1
- package/dist/index.cjs.js +129 -11
- package/dist/index.esm.js +128 -12
- package/dist/types/components/menu/Menu.d.ts.map +1 -1
- package/dist/types/components/menu/Menu.types.d.ts +7 -1
- package/dist/types/components/menu/Menu.types.d.ts.map +1 -1
- package/dist/types/components/menu/get-selected-key-from-path.d.ts +8 -0
- package/dist/types/components/menu/get-selected-key-from-path.d.ts.map +1 -0
- package/dist/types/components/menu/index.d.ts +1 -0
- package/dist/types/components/menu/index.d.ts.map +1 -1
- package/dist/types/components/whatsapp-preview/WhatsAppPreview.d.ts +19 -0
- package/dist/types/components/whatsapp-preview/WhatsAppPreview.d.ts.map +1 -0
- package/dist/types/components/whatsapp-preview/WhatsAppPreview.types.d.ts +45 -0
- package/dist/types/components/whatsapp-preview/WhatsAppPreview.types.d.ts.map +1 -0
- package/dist/types/components/whatsapp-preview/index.d.ts +3 -0
- package/dist/types/components/whatsapp-preview/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1567,7 +1567,7 @@ var SocialMediaCarousel = function (_a) {
|
|
|
1567
1567
|
? "opacity-100 max-w-20"
|
|
1568
1568
|
: "opacity-100 max-w-20 whitespace-nowrap"), children: socialItem.targetAudienceCount.toLocaleString("es-ES") })] }), socialItem.audienceReason && isHovered && (jsxRuntime.jsx("div", { className: "text-[11px] text-white/95 leading-relaxed animate-fade-in", children: socialItem.audienceReason })), socialItem.requiredTags &&
|
|
1569
1569
|
socialItem.requiredTags.length > 0 &&
|
|
1570
|
-
isHovered && (jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 mt-2 pt-2 border-t border-white/20 animate-fade-in", children: socialItem.requiredTags.map(function (tag, idx) { return (jsxRuntime.jsx("span", { className: "text-[9px] px-1.5 py-0.5 rounded-md bg-white/20 text-white/95 backdrop-blur-sm border border-white/30", children: tag }, idx)); }) }))] })), !hideFooter && (jsxRuntime.jsx(SocialMediaBar, { platform: socialItem.type, isHovered: isHovered, showPreview:
|
|
1570
|
+
isHovered && (jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 mt-2 pt-2 border-t border-white/20 animate-fade-in", children: socialItem.requiredTags.map(function (tag, idx) { return (jsxRuntime.jsx("span", { className: "text-[9px] px-1.5 py-0.5 rounded-md bg-white/20 text-white/95 backdrop-blur-sm border border-white/30", children: tag }, idx)); }) }))] })), !hideFooter && (jsxRuntime.jsx(SocialMediaBar, { platform: socialItem.type, isHovered: isHovered, showPreview: typeof onPreview === "function", onEdit: onEdit ? function () { return onEdit(socialItem); } : undefined, onDelete: onDelete ? function () { return onDelete(socialItem); } : undefined, onPublish: onPublish ? function () { return onPublish(socialItem); } : undefined, onPreview: function () { return handlePreview(socialItem); }, translations: {
|
|
1571
1571
|
editButtonLabel: translations.editButtonLabel,
|
|
1572
1572
|
deleteButtonLabel: translations.deleteButtonLabel,
|
|
1573
1573
|
publishButtonLabel: translations.publishButtonLabel,
|
|
@@ -1703,12 +1703,12 @@ var NotificationButton = function (_a) {
|
|
|
1703
1703
|
};
|
|
1704
1704
|
NotificationButton.displayName = "NotificationButton";
|
|
1705
1705
|
|
|
1706
|
-
var DEFAULT_TRANSLATIONS$
|
|
1706
|
+
var DEFAULT_TRANSLATIONS$5 = {
|
|
1707
1707
|
logout: "Cerrar sesión",
|
|
1708
1708
|
};
|
|
1709
1709
|
var HeaderComponent = function (_a) {
|
|
1710
1710
|
var notificationCount = _a.notificationCount, options = _a.options, onMenuClick = _a.onMenuClick, onLogout = _a.onLogout, _b = _a.translations, translations = _b === void 0 ? {} : _b, breadcrumbs = _a.breadcrumbs, onNotificationClick = _a.onNotificationClick, onOptionSelect = _a.onOptionSelect, onBreadcrumbClick = _a.onBreadcrumbClick;
|
|
1711
|
-
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$
|
|
1711
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$5), translations);
|
|
1712
1712
|
return (jsxRuntime.jsx("header", { className: "header__container", children: jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full", children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [jsxRuntime.jsx(react.Button, { className: "sm:hidden", isIconOnly: true, variant: "light", startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:hamburger-menu-linear" }), onPress: onMenuClick }), breadcrumbs && breadcrumbs.length > 0 && (jsxRuntime.jsx(BreadcrumbsComponent, { items: breadcrumbs, onItemClick: onBreadcrumbClick }))] }), jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [jsxRuntime.jsx(NotificationButton, { notificationCount: notificationCount, onPress: onNotificationClick }), jsxRuntime.jsx(ConfigMenu, { options: options, onLogout: onLogout, onOptionSelect: onOptionSelect, translations: t })] })] }) }));
|
|
1713
1713
|
};
|
|
1714
1714
|
HeaderComponent.displayName = "Header";
|
|
@@ -1832,7 +1832,7 @@ KanbanColumn.displayName = "KanbanColumn";
|
|
|
1832
1832
|
* Traducciones por defecto en español.
|
|
1833
1833
|
* Se mezclan con las traducciones proporcionadas por el usuario.
|
|
1834
1834
|
*/
|
|
1835
|
-
var DEFAULT_TRANSLATIONS$
|
|
1835
|
+
var DEFAULT_TRANSLATIONS$4 = {
|
|
1836
1836
|
dropHere: "Soltar aquí",
|
|
1837
1837
|
emptyMessage: "No hay elementos",
|
|
1838
1838
|
};
|
|
@@ -1866,7 +1866,7 @@ var columnGapClasses = {
|
|
|
1866
1866
|
var KanbanComponent = function (_a) {
|
|
1867
1867
|
var columns = _a.columns, renderItem = _a.renderItem, onCardClick = _a.onCardClick, onItemMove = _a.onItemMove, isDraggable = _a.isDraggable, cardClassName = _a.cardClassName, isCardClickable = _a.isCardClickable, className = _a.className, _b = _a.columnWidth, columnWidth = _b === void 0 ? "280px" : _b, _c = _a.columnGap, columnGap = _c === void 0 ? "md" : _c, _d = _a.horizontalScroll, horizontalScroll = _d === void 0 ? true : _d, columnMaxHeight = _a.columnMaxHeight, renderColumnHeader = _a.renderColumnHeader, renderEmptyState = _a.renderEmptyState, _e = _a.translations, translations = _e === void 0 ? {} : _e, onLoadMore = _a.onLoadMore;
|
|
1868
1868
|
// Mezclar traducciones del usuario con las por defecto
|
|
1869
|
-
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$
|
|
1869
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$4), translations);
|
|
1870
1870
|
// Determinar si drag está habilitado
|
|
1871
1871
|
var dragEnabled = isDraggable !== null && isDraggable !== void 0 ? isDraggable : !!onItemMove;
|
|
1872
1872
|
// Estado del drag actual
|
|
@@ -1974,6 +1974,56 @@ var ImagePreview = function (_a) {
|
|
|
1974
1974
|
: undefined, role: isClickable ? "button" : undefined, tabIndex: isClickable ? 0 : undefined, "aria-label": isClickable ? t.clickableImageAriaLabel : undefined }), showRemoveButton && onRemove && (jsxRuntime.jsx("button", { type: "button", onClick: function () { return handleRemove(image.id || "", index); }, "aria-label": t.removeButtonAriaLabel, className: "\n\t\t\t\t\t\t\t\t\tabsolute -top-2 -right-2 \n\t\t\t\t\t\t\t\t\tp-1 rounded-full \n\t\t\t\t\t\t\t\t\tbg-danger-500 hover:bg-danger-600 \n\t\t\t\t\t\t\t\t\ttext-white \n\t\t\t\t\t\t\t\t\tcursor-pointer \n\t\t\t\t\t\t\t\t\ttransition-colors\n\t\t\t\t\t\t\t\t\tfocus:outline-none \n\t\t\t\t\t\t\t\t\tfocus:ring-2 \n\t\t\t\t\t\t\t\t\tfocus:ring-danger-400 \n\t\t\t\t\t\t\t\t\tfocus:ring-offset-2\n\t\t\t\t\t\t\t\t", children: jsxRuntime.jsx(IconComponent, { size: size === "micro" ? "sm" : "md", icon: "solar:trash-bin-minimalistic-outline" }) }))] }) }, image.id || index)); }) }));
|
|
1975
1975
|
};
|
|
1976
1976
|
|
|
1977
|
+
/** Normalize path for comparison: single leading slash, no trailing slash. */
|
|
1978
|
+
function normalizePath(path) {
|
|
1979
|
+
var p = path.replace(/\/+$/, "").trim();
|
|
1980
|
+
return p && !p.startsWith("/") ? "/".concat(p) : p || "/";
|
|
1981
|
+
}
|
|
1982
|
+
/** True when pathname matches href (exact or sub-route). */
|
|
1983
|
+
function pathMatches(href, pathname) {
|
|
1984
|
+
var h = normalizePath(href);
|
|
1985
|
+
var p = normalizePath(pathname);
|
|
1986
|
+
return p === h || p.startsWith("".concat(h, "/"));
|
|
1987
|
+
}
|
|
1988
|
+
/**
|
|
1989
|
+
* Walks the menu tree and returns the key of the item whose href matches the pathname.
|
|
1990
|
+
* Prefers the most specific match (nested items over parents).
|
|
1991
|
+
* Used when the consumer passes selectedPath instead of selectedKey.
|
|
1992
|
+
*/
|
|
1993
|
+
function walkItems(pathname, list) {
|
|
1994
|
+
var _a;
|
|
1995
|
+
for (var _i = 0, list_1 = list; _i < list_1.length; _i++) {
|
|
1996
|
+
var item = list_1[_i];
|
|
1997
|
+
if ((_a = item.items) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1998
|
+
// Prefer match in children first (e.g. /catalog/products -> catalog-products, not catalog)
|
|
1999
|
+
var found = walkItems(pathname, item.items);
|
|
2000
|
+
if (found)
|
|
2001
|
+
return found;
|
|
2002
|
+
}
|
|
2003
|
+
if (item.href && pathMatches(item.href, pathname)) {
|
|
2004
|
+
return item.key;
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
return undefined;
|
|
2008
|
+
}
|
|
2009
|
+
/**
|
|
2010
|
+
* Returns the menu item key that matches the current pathname.
|
|
2011
|
+
* Supports the structure used by Menu: items can be sections (each with .items) or flat.
|
|
2012
|
+
* For nested items (e.g. Catálogo > Productos), returns the sub-item key.
|
|
2013
|
+
*/
|
|
2014
|
+
function getSelectedKeyFromPath(pathname, items) {
|
|
2015
|
+
var _a;
|
|
2016
|
+
var normalizedPath = normalizePath(pathname);
|
|
2017
|
+
for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
|
|
2018
|
+
var section = items_1[_i];
|
|
2019
|
+
var list = (_a = section.items) !== null && _a !== void 0 ? _a : [section];
|
|
2020
|
+
var found = walkItems(normalizedPath, list);
|
|
2021
|
+
if (found)
|
|
2022
|
+
return found;
|
|
2023
|
+
}
|
|
2024
|
+
return undefined;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
1977
2027
|
exports.EnumMenuNavListItem = void 0;
|
|
1978
2028
|
(function (EnumMenuNavListItem) {
|
|
1979
2029
|
EnumMenuNavListItem["Nest"] = "nest";
|
|
@@ -2135,7 +2185,7 @@ var MenuNavList = React.forwardRef(function (_a, ref) {
|
|
|
2135
2185
|
});
|
|
2136
2186
|
MenuNavList.displayName = "MenuNavList";
|
|
2137
2187
|
|
|
2138
|
-
var DEFAULT_TRANSLATIONS$
|
|
2188
|
+
var DEFAULT_TRANSLATIONS$3 = {
|
|
2139
2189
|
menuLabel: "Menú",
|
|
2140
2190
|
closeSidebarAriaLabel: "Cerrar menú lateral",
|
|
2141
2191
|
mobileNavAriaLabel: "Navegación móvil",
|
|
@@ -2151,7 +2201,14 @@ var MenuComponent = React.memo(function Menu(_a) {
|
|
|
2151
2201
|
var commerceInfo = _a.commerceInfo, userInfo = _a.userInfo, helpButton = _a.helpButton, isOpenSidebar = _a.isOpenSidebar, onOpenSidebarChange = _a.onOpenSidebarChange, menuItems = _a.menuItems, mobileBottomBarGroupKey = _a.mobileBottomBarGroupKey, _d = _a.showNativeMenu, showNativeMenu = _d === void 0 ? true : _d, _e = _a.translations, translations = _e === void 0 ? {} : _e;
|
|
2152
2202
|
var _f = React.useState(false), isCollapsed = _f[0], setIsCollapsed = _f[1];
|
|
2153
2203
|
var _g = React.useState(false), logoError = _g[0], setLogoError = _g[1];
|
|
2154
|
-
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$
|
|
2204
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$3), translations);
|
|
2205
|
+
var selectedKey = React.useMemo(function () {
|
|
2206
|
+
var _a, _b, _c;
|
|
2207
|
+
if (menuItems.selectedPath) {
|
|
2208
|
+
return ((_b = (_a = getSelectedKeyFromPath(menuItems.selectedPath, menuItems.items)) !== null && _a !== void 0 ? _a : menuItems.selectedKey) !== null && _b !== void 0 ? _b : "");
|
|
2209
|
+
}
|
|
2210
|
+
return (_c = menuItems.selectedKey) !== null && _c !== void 0 ? _c : "";
|
|
2211
|
+
}, [menuItems.selectedPath, menuItems.selectedKey, menuItems.items]);
|
|
2155
2212
|
var commerceName = (typeof (commerceInfo === null || commerceInfo === void 0 ? void 0 : commerceInfo.name) === "string" && commerceInfo.name.trim()) ||
|
|
2156
2213
|
t.notDefinedLabel;
|
|
2157
2214
|
var userName = (typeof (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) === "string" && userInfo.name.trim()) ||
|
|
@@ -2207,13 +2264,13 @@ var MenuComponent = React.memo(function Menu(_a) {
|
|
|
2207
2264
|
(_a = menuItems.onSelect) === null || _a === void 0 ? void 0 : _a.call(menuItems, key, href, "bottomBar");
|
|
2208
2265
|
}, [onOpenSidebarChange, menuItems.onSelect]);
|
|
2209
2266
|
var showBottomBar = (mobileBottomBarGroupKey && bottomBarItems.length > 0) || showNativeMenu;
|
|
2210
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [showBottomBar && (jsxRuntime.jsx(MenuMobileBottomBar, { items: bottomBarItems, selectedKey:
|
|
2267
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [showBottomBar && (jsxRuntime.jsx(MenuMobileBottomBar, { items: bottomBarItems, selectedKey: selectedKey, onSelect: handleBottomBarSelect, onMenuPress: handleSidebarOpen, menuLabel: t.menuLabel, navAriaLabel: t.mobileNavAriaLabel, forceVisible: showNativeMenu && bottomBarItems.length === 0 })), jsxRuntime.jsx("button", { type: "button", "aria-label": t.closeSidebarAriaLabel, className: "menu-overlay ".concat(isOpenSidebar ? "menu-overlay--open" : ""), onClick: handleSidebarClose, tabIndex: isOpenSidebar ? 0 : -1 }), jsxRuntime.jsx("div", { className: "container__menu ".concat(isCollapsed
|
|
2211
2268
|
? "container__menu--collapsed"
|
|
2212
2269
|
: "container__menu--expanded", " ").concat(isOpenSidebar ? "container__menu--mobile-open" : ""), "aria-hidden": !isOpenSidebar, children: jsxRuntime.jsxs("div", { className: "content__menu", children: [jsxRuntime.jsxs("div", { className: "content__menu--header", style: {
|
|
2213
2270
|
flexDirection: isCollapsed ? "column-reverse" : "row",
|
|
2214
2271
|
}, children: [jsxRuntime.jsxs("div", { className: "flex flex-row items-center justify-center ".concat(isCollapsed ? "gap-0" : "gap-2"), children: [jsxRuntime.jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-full bg-foreground text-background", children: hasValidLogo ? (jsxRuntime.jsx("img", { src: commerceInfo.logo, alt: "".concat(t.logoAlt, " ").concat(commerceName), className: "h-full w-full object-cover", onError: function () { return setLogoError(true); } })) : (jsxRuntime.jsx(IconComponent, { icon: "solar:buildings-2-outline", size: "sm", className: "shrink-0", "aria-hidden": true })) }), jsxRuntime.jsx("span", { className: "collapsible-item text-small font-bold truncate min-w-0", children: commerceName })] }), jsxRuntime.jsxs("div", { className: "flex items-center", children: [jsxRuntime.jsx(IconComponent, { icon: "material-symbols-light:close", size: "lg", className: "cursor-pointer block sm:hidden", onClick: handleSidebarClose }), jsxRuntime.jsx(IconComponent, { icon: isCollapsed
|
|
2215
2272
|
? "solar:alt-arrow-right-outline"
|
|
2216
|
-
: "solar:alt-arrow-left-outline", size: "lg", className: "hidden sm:block cursor-pointer", onClick: handleCollapseToggle })] })] }), jsxRuntime.jsx(react.Spacer, { y: 6 }), jsxRuntime.jsxs("div", { className: "content__menu--user ".concat(isCollapsed ? "gap-0" : "gap-3"), children: [jsxRuntime.jsx(react.Avatar, { size: "md", src: ((_b = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _b === void 0 ? void 0 : _b.trim()) || undefined, color: !((_c = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _c === void 0 ? void 0 : _c.trim()) ? "warning" : "default", name: userName, className: "shrink-0" }), jsxRuntime.jsxs("div", { className: "collapsible-item flex min-w-0 flex-col overflow-hidden", children: [jsxRuntime.jsx("p", { className: "text-small font-medium text-default-900 truncate", children: userName }), jsxRuntime.jsx("p", { className: "text-tiny text-default-400 truncate", children: userRole })] })] }), jsxRuntime.jsx("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6"), children: jsxRuntime.jsx("div", { className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: jsxRuntime.jsx(MenuNavList, { defaultSelectedKey:
|
|
2273
|
+
: "solar:alt-arrow-left-outline", size: "lg", className: "hidden sm:block cursor-pointer", onClick: handleCollapseToggle })] })] }), jsxRuntime.jsx(react.Spacer, { y: 6 }), jsxRuntime.jsxs("div", { className: "content__menu--user ".concat(isCollapsed ? "gap-0" : "gap-3"), children: [jsxRuntime.jsx(react.Avatar, { size: "md", src: ((_b = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _b === void 0 ? void 0 : _b.trim()) || undefined, color: !((_c = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _c === void 0 ? void 0 : _c.trim()) ? "warning" : "default", name: userName, className: "shrink-0" }), jsxRuntime.jsxs("div", { className: "collapsible-item flex min-w-0 flex-col overflow-hidden", children: [jsxRuntime.jsx("p", { className: "text-small font-medium text-default-900 truncate", children: userName }), jsxRuntime.jsx("p", { className: "text-tiny text-default-400 truncate", children: userRole })] })] }), jsxRuntime.jsx("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6"), children: jsxRuntime.jsx("div", { className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: jsxRuntime.jsx(MenuNavList, { defaultSelectedKey: selectedKey, items: menuItems.items, isCollapsed: isCollapsed, onSelect: handleMenuSelect }, selectedKey) }) }), jsxRuntime.jsx("div", { className: "mt-auto flex flex-col justify-center items-center", children: jsxRuntime.jsx(react.Button, { fullWidth: true, className: " text-default-500 data-[hover=true]:text-default-600", startContent: jsxRuntime.jsx(IconComponent, { className: "text-default-500", icon: "solar:info-circle-line-duotone", size: "md" }), variant: "light", onPress: handleHelpClick, isIconOnly: isCollapsed, children: !isCollapsed && (jsxRuntime.jsx("span", { className: "collapsible-item truncate", children: helpTitle })) }) })] }) })] }));
|
|
2217
2274
|
});
|
|
2218
2275
|
|
|
2219
2276
|
var StepIndicator = function (_a) {
|
|
@@ -4088,7 +4145,7 @@ var AURORAS = [
|
|
|
4088
4145
|
duration: 55,
|
|
4089
4146
|
},
|
|
4090
4147
|
];
|
|
4091
|
-
var DEFAULT_TRANSLATIONS$
|
|
4148
|
+
var DEFAULT_TRANSLATIONS$2 = {
|
|
4092
4149
|
backButtonLabel: "Atras",
|
|
4093
4150
|
};
|
|
4094
4151
|
var BackButton = function (_a) {
|
|
@@ -4124,7 +4181,7 @@ var TwoColumnLayoutAgent = function (_a) {
|
|
|
4124
4181
|
var _b = _a.assistantState, assistantState = _b === void 0 ? "happy" : _b, assistantSpeech = _a.assistantSpeech, _c = _a.assistantSize, assistantSize = _c === void 0 ? "xl" : _c, assistantHint = _a.assistantHint, _d = _a.enableSequence, enableSequence = _d === void 0 ? true : _d, children = _a.children, _e = _a.showBackButton, showBackButton = _e === void 0 ? false : _e, onBack = _a.onBack, _f = _a.translations, translations = _f === void 0 ? {} : _f, _g = _a.className, className = _g === void 0 ? "" : _g;
|
|
4125
4182
|
var _h = React.useState(!enableSequence), showRightContent = _h[0], setShowRightContent = _h[1];
|
|
4126
4183
|
var isDesktop = useMediaQuery("(min-width: ".concat(DESKTOP_BREAKPOINT_PX, "px)"));
|
|
4127
|
-
var t = React.useMemo(function () { return (__assign(__assign({}, DEFAULT_TRANSLATIONS$
|
|
4184
|
+
var t = React.useMemo(function () { return (__assign(__assign({}, DEFAULT_TRANSLATIONS$2), translations)); }, [translations]);
|
|
4128
4185
|
var handleBackPress = onBack !== null && onBack !== void 0 ? onBack : (function () { return undefined; });
|
|
4129
4186
|
React.useEffect(function () {
|
|
4130
4187
|
if (enableSequence && !showRightContent) {
|
|
@@ -4679,6 +4736,65 @@ var UploadFile = function (_a) {
|
|
|
4679
4736
|
};
|
|
4680
4737
|
UploadFile.displayName = "UploadFile";
|
|
4681
4738
|
|
|
4739
|
+
var DEFAULT_TRANSLATIONS$1 = {
|
|
4740
|
+
businessName: "Tu Negocio",
|
|
4741
|
+
businessInitials: "TN",
|
|
4742
|
+
onlineStatus: "en linea",
|
|
4743
|
+
imageAlt: "Vista previa de mensaje WhatsApp",
|
|
4744
|
+
viewMore: "ver mas",
|
|
4745
|
+
viewLess: "ver menos",
|
|
4746
|
+
};
|
|
4747
|
+
/**
|
|
4748
|
+
* WhatsAppPreview - Displays a realistic WhatsApp message bubble preview.
|
|
4749
|
+
* Supports image, caption, CTA buttons, and compact/full variants.
|
|
4750
|
+
*
|
|
4751
|
+
* @component
|
|
4752
|
+
* @example
|
|
4753
|
+
* ```tsx
|
|
4754
|
+
* <WhatsAppPreview
|
|
4755
|
+
* imageUrl="/path/to/image.jpg"
|
|
4756
|
+
* caption="Check out our new product!"
|
|
4757
|
+
* variant="full"
|
|
4758
|
+
* showHeader
|
|
4759
|
+
* />
|
|
4760
|
+
* ```
|
|
4761
|
+
*/
|
|
4762
|
+
var WhatsAppPreview = function (_a) {
|
|
4763
|
+
var imageUrl = _a.imageUrl, caption = _a.caption, _b = _a.variant, variant = _b === void 0 ? "compact" : _b, _c = _a.showHeader, showHeader = _c === void 0 ? false : _c, maxCaptionLength = _a.maxCaptionLength, onToggleCaption = _a.onToggleCaption, _d = _a.showFullCaption, showFullCaption = _d === void 0 ? false : _d, ctaType = _a.ctaType, ctaLabel = _a.ctaLabel, ctaValue = _a.ctaValue, _e = _a.campaignView, campaignView = _e === void 0 ? false : _e, _f = _a.translations, translations = _f === void 0 ? {} : _f, _g = _a.className, className = _g === void 0 ? "" : _g, _h = _a.timeLocale, timeLocale = _h === void 0 ? "es-ES" : _h;
|
|
4764
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$1), translations);
|
|
4765
|
+
var shouldTruncate = maxCaptionLength && caption.length > maxCaptionLength;
|
|
4766
|
+
var displayCaption = campaignView
|
|
4767
|
+
? caption
|
|
4768
|
+
: shouldTruncate && !showFullCaption
|
|
4769
|
+
? "".concat(caption.substring(0, maxCaptionLength), "...")
|
|
4770
|
+
: caption;
|
|
4771
|
+
var containerStyle = variant === "compact" ? { minHeight: "320px" } : { height: "640px" };
|
|
4772
|
+
var paddingClass = variant === "compact" ? "p-3" : "p-4";
|
|
4773
|
+
var imageMargin = variant === "compact" ? "" : "-mx-1 -mt-1";
|
|
4774
|
+
var imageHeight = campaignView
|
|
4775
|
+
? ""
|
|
4776
|
+
: variant === "compact"
|
|
4777
|
+
? "h-32"
|
|
4778
|
+
: "max-h-64";
|
|
4779
|
+
var imageAspectRatio = campaignView ? "1/1" : undefined;
|
|
4780
|
+
var bubblePadding = variant === "compact" ? "p-2.5" : "p-3";
|
|
4781
|
+
return (jsxRuntime.jsxs("div", { className: "w-full h-full flex flex-col bg-[#ECE5DD] dark:bg-gray-900 ".concat(paddingClass, " justify-start ").concat(className), style: containerStyle, children: [showHeader && (jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-4 p-3 bg-[#075E54] dark:bg-[#1F2C33] rounded-t-lg -mx-4 -mt-4", children: [jsxRuntime.jsx("div", { className: "w-10 h-10 bg-gray-300 rounded-full flex items-center justify-center", children: jsxRuntime.jsx("span", { className: "text-gray-600 text-sm font-bold", children: t.businessInitials }) }), jsxRuntime.jsxs("div", { className: "flex-1", children: [jsxRuntime.jsx("span", { className: "text-sm font-semibold text-white", children: t.businessName }), jsxRuntime.jsx("p", { className: "text-xs text-gray-300", children: t.onlineStatus })] })] })), jsxRuntime.jsx("div", { className: "flex flex-col gap-2 ".concat(showHeader ? "mt-6 overflow-y-auto flex-1" : "", " items-start"), children: jsxRuntime.jsx("div", { className: "mr-auto max-w-[85%]", children: jsxRuntime.jsxs("div", { className: "bg-white dark:bg-gray-800 rounded-lg ".concat(bubblePadding, " shadow-sm"), children: [imageUrl && (jsxRuntime.jsx("div", { className: "rounded-lg overflow-hidden ".concat(imageMargin), style: imageAspectRatio
|
|
4782
|
+
? { aspectRatio: imageAspectRatio }
|
|
4783
|
+
: undefined, children: jsxRuntime.jsx(react.Image, { src: imageUrl, alt: t.imageAlt, className: "w-full ".concat(imageHeight, " object-cover") }) })), jsxRuntime.jsxs("div", { className: "text-sm text-gray-900 dark:text-white text-left ".concat(imageUrl ? "mt-2" : ""), children: [jsxRuntime.jsx("div", { className: "".concat(showFullCaption && variant === "compact" ? "overflow-y-auto" : "", " ").concat(campaignView ? (imageUrl ? "line-clamp-3" : "line-clamp-[12]") : ""), style: {
|
|
4784
|
+
maxHeight: showFullCaption && variant === "compact"
|
|
4785
|
+
? "150px"
|
|
4786
|
+
: "none",
|
|
4787
|
+
}, children: jsxRuntime.jsx("span", { className: "whitespace-pre-wrap font-sans break-words block text-left", children: displayCaption }) }), shouldTruncate &&
|
|
4788
|
+
onToggleCaption &&
|
|
4789
|
+
variant === "compact" && (jsxRuntime.jsx("button", { type: "button", onClick: function (e) {
|
|
4790
|
+
e.stopPropagation();
|
|
4791
|
+
onToggleCaption();
|
|
4792
|
+
}, className: "text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-300 font-normal mt-1 underline text-xs", children: showFullCaption ? t.viewLess : t.viewMore }))] }), ctaType && ctaLabel && ctaValue && (jsxRuntime.jsx("div", { className: "mt-3 -mx-1", children: jsxRuntime.jsx(Button, { size: "sm", color: "primary", variant: "bordered", className: "w-full font-semibold", startContent: ctaType === "CALL_NOW" ? (jsxRuntime.jsx(IconComponent, { icon: "solar:phone-bold", className: "text-sm" })) : (jsxRuntime.jsx(IconComponent, { icon: "solar:link-bold", className: "text-sm" })), children: ctaLabel }) })), jsxRuntime.jsx("div", { className: "flex items-center justify-end gap-1 mt-1", children: jsxRuntime.jsx("span", { className: "text-[10px] text-gray-600 dark:text-gray-400", children: new Date().toLocaleTimeString(timeLocale, {
|
|
4793
|
+
hour: "2-digit",
|
|
4794
|
+
minute: "2-digit",
|
|
4795
|
+
}) }) })] }) }) })] }));
|
|
4796
|
+
};
|
|
4797
|
+
|
|
4682
4798
|
/**
|
|
4683
4799
|
* WizardSidebar - Componente de navegación lateral del wizard
|
|
4684
4800
|
* Muestra los pasos con indicadores visuales de estado (activo, completado, pendiente)
|
|
@@ -5761,10 +5877,12 @@ exports.ToastContext = ToastContext;
|
|
|
5761
5877
|
exports.TwoColumnLayoutAgent = TwoColumnLayoutAgent;
|
|
5762
5878
|
exports.UploadFile = UploadFile;
|
|
5763
5879
|
exports.VerticalSteps = VerticalSteps;
|
|
5880
|
+
exports.WhatsAppPreview = WhatsAppPreview;
|
|
5764
5881
|
exports.Wizard = Wizard;
|
|
5765
5882
|
exports.WizardNavigation = WizardNavigation;
|
|
5766
5883
|
exports.WizardSidebar = WizardSidebar;
|
|
5767
5884
|
exports.defaultTranslations = defaultTranslations$4;
|
|
5885
|
+
exports.getSelectedKeyFromPath = getSelectedKeyFromPath;
|
|
5768
5886
|
exports.sizeMap = sizeMap;
|
|
5769
5887
|
exports.themeColors = themeColors;
|
|
5770
5888
|
exports.useAuraToast = useAuraToast;
|
package/dist/index.esm.js
CHANGED
|
@@ -1568,7 +1568,7 @@ var SocialMediaCarousel = function (_a) {
|
|
|
1568
1568
|
? "opacity-100 max-w-20"
|
|
1569
1569
|
: "opacity-100 max-w-20 whitespace-nowrap"), children: socialItem.targetAudienceCount.toLocaleString("es-ES") })] }), socialItem.audienceReason && isHovered && (jsx("div", { className: "text-[11px] text-white/95 leading-relaxed animate-fade-in", children: socialItem.audienceReason })), socialItem.requiredTags &&
|
|
1570
1570
|
socialItem.requiredTags.length > 0 &&
|
|
1571
|
-
isHovered && (jsx("div", { className: "flex flex-wrap gap-1 mt-2 pt-2 border-t border-white/20 animate-fade-in", children: socialItem.requiredTags.map(function (tag, idx) { return (jsx("span", { className: "text-[9px] px-1.5 py-0.5 rounded-md bg-white/20 text-white/95 backdrop-blur-sm border border-white/30", children: tag }, idx)); }) }))] })), !hideFooter && (jsx(SocialMediaBar, { platform: socialItem.type, isHovered: isHovered, showPreview:
|
|
1571
|
+
isHovered && (jsx("div", { className: "flex flex-wrap gap-1 mt-2 pt-2 border-t border-white/20 animate-fade-in", children: socialItem.requiredTags.map(function (tag, idx) { return (jsx("span", { className: "text-[9px] px-1.5 py-0.5 rounded-md bg-white/20 text-white/95 backdrop-blur-sm border border-white/30", children: tag }, idx)); }) }))] })), !hideFooter && (jsx(SocialMediaBar, { platform: socialItem.type, isHovered: isHovered, showPreview: typeof onPreview === "function", onEdit: onEdit ? function () { return onEdit(socialItem); } : undefined, onDelete: onDelete ? function () { return onDelete(socialItem); } : undefined, onPublish: onPublish ? function () { return onPublish(socialItem); } : undefined, onPreview: function () { return handlePreview(socialItem); }, translations: {
|
|
1572
1572
|
editButtonLabel: translations.editButtonLabel,
|
|
1573
1573
|
deleteButtonLabel: translations.deleteButtonLabel,
|
|
1574
1574
|
publishButtonLabel: translations.publishButtonLabel,
|
|
@@ -1704,12 +1704,12 @@ var NotificationButton = function (_a) {
|
|
|
1704
1704
|
};
|
|
1705
1705
|
NotificationButton.displayName = "NotificationButton";
|
|
1706
1706
|
|
|
1707
|
-
var DEFAULT_TRANSLATIONS$
|
|
1707
|
+
var DEFAULT_TRANSLATIONS$5 = {
|
|
1708
1708
|
logout: "Cerrar sesión",
|
|
1709
1709
|
};
|
|
1710
1710
|
var HeaderComponent = function (_a) {
|
|
1711
1711
|
var notificationCount = _a.notificationCount, options = _a.options, onMenuClick = _a.onMenuClick, onLogout = _a.onLogout, _b = _a.translations, translations = _b === void 0 ? {} : _b, breadcrumbs = _a.breadcrumbs, onNotificationClick = _a.onNotificationClick, onOptionSelect = _a.onOptionSelect, onBreadcrumbClick = _a.onBreadcrumbClick;
|
|
1712
|
-
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$
|
|
1712
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$5), translations);
|
|
1713
1713
|
return (jsx("header", { className: "header__container", children: jsxs("div", { className: "flex items-center justify-between w-full", children: [jsxs("div", { className: "flex items-center gap-4", children: [jsx(Button$1, { className: "sm:hidden", isIconOnly: true, variant: "light", startContent: jsx(IconComponent, { icon: "solar:hamburger-menu-linear" }), onPress: onMenuClick }), breadcrumbs && breadcrumbs.length > 0 && (jsx(BreadcrumbsComponent, { items: breadcrumbs, onItemClick: onBreadcrumbClick }))] }), jsxs("div", { className: "flex items-center gap-4", children: [jsx(NotificationButton, { notificationCount: notificationCount, onPress: onNotificationClick }), jsx(ConfigMenu, { options: options, onLogout: onLogout, onOptionSelect: onOptionSelect, translations: t })] })] }) }));
|
|
1714
1714
|
};
|
|
1715
1715
|
HeaderComponent.displayName = "Header";
|
|
@@ -1833,7 +1833,7 @@ KanbanColumn.displayName = "KanbanColumn";
|
|
|
1833
1833
|
* Traducciones por defecto en español.
|
|
1834
1834
|
* Se mezclan con las traducciones proporcionadas por el usuario.
|
|
1835
1835
|
*/
|
|
1836
|
-
var DEFAULT_TRANSLATIONS$
|
|
1836
|
+
var DEFAULT_TRANSLATIONS$4 = {
|
|
1837
1837
|
dropHere: "Soltar aquí",
|
|
1838
1838
|
emptyMessage: "No hay elementos",
|
|
1839
1839
|
};
|
|
@@ -1867,7 +1867,7 @@ var columnGapClasses = {
|
|
|
1867
1867
|
var KanbanComponent = function (_a) {
|
|
1868
1868
|
var columns = _a.columns, renderItem = _a.renderItem, onCardClick = _a.onCardClick, onItemMove = _a.onItemMove, isDraggable = _a.isDraggable, cardClassName = _a.cardClassName, isCardClickable = _a.isCardClickable, className = _a.className, _b = _a.columnWidth, columnWidth = _b === void 0 ? "280px" : _b, _c = _a.columnGap, columnGap = _c === void 0 ? "md" : _c, _d = _a.horizontalScroll, horizontalScroll = _d === void 0 ? true : _d, columnMaxHeight = _a.columnMaxHeight, renderColumnHeader = _a.renderColumnHeader, renderEmptyState = _a.renderEmptyState, _e = _a.translations, translations = _e === void 0 ? {} : _e, onLoadMore = _a.onLoadMore;
|
|
1869
1869
|
// Mezclar traducciones del usuario con las por defecto
|
|
1870
|
-
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$
|
|
1870
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$4), translations);
|
|
1871
1871
|
// Determinar si drag está habilitado
|
|
1872
1872
|
var dragEnabled = isDraggable !== null && isDraggable !== void 0 ? isDraggable : !!onItemMove;
|
|
1873
1873
|
// Estado del drag actual
|
|
@@ -1975,6 +1975,56 @@ var ImagePreview = function (_a) {
|
|
|
1975
1975
|
: undefined, role: isClickable ? "button" : undefined, tabIndex: isClickable ? 0 : undefined, "aria-label": isClickable ? t.clickableImageAriaLabel : undefined }), showRemoveButton && onRemove && (jsx("button", { type: "button", onClick: function () { return handleRemove(image.id || "", index); }, "aria-label": t.removeButtonAriaLabel, className: "\n\t\t\t\t\t\t\t\t\tabsolute -top-2 -right-2 \n\t\t\t\t\t\t\t\t\tp-1 rounded-full \n\t\t\t\t\t\t\t\t\tbg-danger-500 hover:bg-danger-600 \n\t\t\t\t\t\t\t\t\ttext-white \n\t\t\t\t\t\t\t\t\tcursor-pointer \n\t\t\t\t\t\t\t\t\ttransition-colors\n\t\t\t\t\t\t\t\t\tfocus:outline-none \n\t\t\t\t\t\t\t\t\tfocus:ring-2 \n\t\t\t\t\t\t\t\t\tfocus:ring-danger-400 \n\t\t\t\t\t\t\t\t\tfocus:ring-offset-2\n\t\t\t\t\t\t\t\t", children: jsx(IconComponent, { size: size === "micro" ? "sm" : "md", icon: "solar:trash-bin-minimalistic-outline" }) }))] }) }, image.id || index)); }) }));
|
|
1976
1976
|
};
|
|
1977
1977
|
|
|
1978
|
+
/** Normalize path for comparison: single leading slash, no trailing slash. */
|
|
1979
|
+
function normalizePath(path) {
|
|
1980
|
+
var p = path.replace(/\/+$/, "").trim();
|
|
1981
|
+
return p && !p.startsWith("/") ? "/".concat(p) : p || "/";
|
|
1982
|
+
}
|
|
1983
|
+
/** True when pathname matches href (exact or sub-route). */
|
|
1984
|
+
function pathMatches(href, pathname) {
|
|
1985
|
+
var h = normalizePath(href);
|
|
1986
|
+
var p = normalizePath(pathname);
|
|
1987
|
+
return p === h || p.startsWith("".concat(h, "/"));
|
|
1988
|
+
}
|
|
1989
|
+
/**
|
|
1990
|
+
* Walks the menu tree and returns the key of the item whose href matches the pathname.
|
|
1991
|
+
* Prefers the most specific match (nested items over parents).
|
|
1992
|
+
* Used when the consumer passes selectedPath instead of selectedKey.
|
|
1993
|
+
*/
|
|
1994
|
+
function walkItems(pathname, list) {
|
|
1995
|
+
var _a;
|
|
1996
|
+
for (var _i = 0, list_1 = list; _i < list_1.length; _i++) {
|
|
1997
|
+
var item = list_1[_i];
|
|
1998
|
+
if ((_a = item.items) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1999
|
+
// Prefer match in children first (e.g. /catalog/products -> catalog-products, not catalog)
|
|
2000
|
+
var found = walkItems(pathname, item.items);
|
|
2001
|
+
if (found)
|
|
2002
|
+
return found;
|
|
2003
|
+
}
|
|
2004
|
+
if (item.href && pathMatches(item.href, pathname)) {
|
|
2005
|
+
return item.key;
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
return undefined;
|
|
2009
|
+
}
|
|
2010
|
+
/**
|
|
2011
|
+
* Returns the menu item key that matches the current pathname.
|
|
2012
|
+
* Supports the structure used by Menu: items can be sections (each with .items) or flat.
|
|
2013
|
+
* For nested items (e.g. Catálogo > Productos), returns the sub-item key.
|
|
2014
|
+
*/
|
|
2015
|
+
function getSelectedKeyFromPath(pathname, items) {
|
|
2016
|
+
var _a;
|
|
2017
|
+
var normalizedPath = normalizePath(pathname);
|
|
2018
|
+
for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
|
|
2019
|
+
var section = items_1[_i];
|
|
2020
|
+
var list = (_a = section.items) !== null && _a !== void 0 ? _a : [section];
|
|
2021
|
+
var found = walkItems(normalizedPath, list);
|
|
2022
|
+
if (found)
|
|
2023
|
+
return found;
|
|
2024
|
+
}
|
|
2025
|
+
return undefined;
|
|
2026
|
+
}
|
|
2027
|
+
|
|
1978
2028
|
var EnumMenuNavListItem;
|
|
1979
2029
|
(function (EnumMenuNavListItem) {
|
|
1980
2030
|
EnumMenuNavListItem["Nest"] = "nest";
|
|
@@ -2136,7 +2186,7 @@ var MenuNavList = React.forwardRef(function (_a, ref) {
|
|
|
2136
2186
|
});
|
|
2137
2187
|
MenuNavList.displayName = "MenuNavList";
|
|
2138
2188
|
|
|
2139
|
-
var DEFAULT_TRANSLATIONS$
|
|
2189
|
+
var DEFAULT_TRANSLATIONS$3 = {
|
|
2140
2190
|
menuLabel: "Menú",
|
|
2141
2191
|
closeSidebarAriaLabel: "Cerrar menú lateral",
|
|
2142
2192
|
mobileNavAriaLabel: "Navegación móvil",
|
|
@@ -2152,7 +2202,14 @@ var MenuComponent = React.memo(function Menu(_a) {
|
|
|
2152
2202
|
var commerceInfo = _a.commerceInfo, userInfo = _a.userInfo, helpButton = _a.helpButton, isOpenSidebar = _a.isOpenSidebar, onOpenSidebarChange = _a.onOpenSidebarChange, menuItems = _a.menuItems, mobileBottomBarGroupKey = _a.mobileBottomBarGroupKey, _d = _a.showNativeMenu, showNativeMenu = _d === void 0 ? true : _d, _e = _a.translations, translations = _e === void 0 ? {} : _e;
|
|
2153
2203
|
var _f = React.useState(false), isCollapsed = _f[0], setIsCollapsed = _f[1];
|
|
2154
2204
|
var _g = React.useState(false), logoError = _g[0], setLogoError = _g[1];
|
|
2155
|
-
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$
|
|
2205
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$3), translations);
|
|
2206
|
+
var selectedKey = React.useMemo(function () {
|
|
2207
|
+
var _a, _b, _c;
|
|
2208
|
+
if (menuItems.selectedPath) {
|
|
2209
|
+
return ((_b = (_a = getSelectedKeyFromPath(menuItems.selectedPath, menuItems.items)) !== null && _a !== void 0 ? _a : menuItems.selectedKey) !== null && _b !== void 0 ? _b : "");
|
|
2210
|
+
}
|
|
2211
|
+
return (_c = menuItems.selectedKey) !== null && _c !== void 0 ? _c : "";
|
|
2212
|
+
}, [menuItems.selectedPath, menuItems.selectedKey, menuItems.items]);
|
|
2156
2213
|
var commerceName = (typeof (commerceInfo === null || commerceInfo === void 0 ? void 0 : commerceInfo.name) === "string" && commerceInfo.name.trim()) ||
|
|
2157
2214
|
t.notDefinedLabel;
|
|
2158
2215
|
var userName = (typeof (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) === "string" && userInfo.name.trim()) ||
|
|
@@ -2208,13 +2265,13 @@ var MenuComponent = React.memo(function Menu(_a) {
|
|
|
2208
2265
|
(_a = menuItems.onSelect) === null || _a === void 0 ? void 0 : _a.call(menuItems, key, href, "bottomBar");
|
|
2209
2266
|
}, [onOpenSidebarChange, menuItems.onSelect]);
|
|
2210
2267
|
var showBottomBar = (mobileBottomBarGroupKey && bottomBarItems.length > 0) || showNativeMenu;
|
|
2211
|
-
return (jsxs(Fragment, { children: [showBottomBar && (jsx(MenuMobileBottomBar, { items: bottomBarItems, selectedKey:
|
|
2268
|
+
return (jsxs(Fragment, { children: [showBottomBar && (jsx(MenuMobileBottomBar, { items: bottomBarItems, selectedKey: selectedKey, onSelect: handleBottomBarSelect, onMenuPress: handleSidebarOpen, menuLabel: t.menuLabel, navAriaLabel: t.mobileNavAriaLabel, forceVisible: showNativeMenu && bottomBarItems.length === 0 })), jsx("button", { type: "button", "aria-label": t.closeSidebarAriaLabel, className: "menu-overlay ".concat(isOpenSidebar ? "menu-overlay--open" : ""), onClick: handleSidebarClose, tabIndex: isOpenSidebar ? 0 : -1 }), jsx("div", { className: "container__menu ".concat(isCollapsed
|
|
2212
2269
|
? "container__menu--collapsed"
|
|
2213
2270
|
: "container__menu--expanded", " ").concat(isOpenSidebar ? "container__menu--mobile-open" : ""), "aria-hidden": !isOpenSidebar, children: jsxs("div", { className: "content__menu", children: [jsxs("div", { className: "content__menu--header", style: {
|
|
2214
2271
|
flexDirection: isCollapsed ? "column-reverse" : "row",
|
|
2215
2272
|
}, children: [jsxs("div", { className: "flex flex-row items-center justify-center ".concat(isCollapsed ? "gap-0" : "gap-2"), children: [jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-full bg-foreground text-background", children: hasValidLogo ? (jsx("img", { src: commerceInfo.logo, alt: "".concat(t.logoAlt, " ").concat(commerceName), className: "h-full w-full object-cover", onError: function () { return setLogoError(true); } })) : (jsx(IconComponent, { icon: "solar:buildings-2-outline", size: "sm", className: "shrink-0", "aria-hidden": true })) }), jsx("span", { className: "collapsible-item text-small font-bold truncate min-w-0", children: commerceName })] }), jsxs("div", { className: "flex items-center", children: [jsx(IconComponent, { icon: "material-symbols-light:close", size: "lg", className: "cursor-pointer block sm:hidden", onClick: handleSidebarClose }), jsx(IconComponent, { icon: isCollapsed
|
|
2216
2273
|
? "solar:alt-arrow-right-outline"
|
|
2217
|
-
: "solar:alt-arrow-left-outline", size: "lg", className: "hidden sm:block cursor-pointer", onClick: handleCollapseToggle })] })] }), jsx(Spacer, { y: 6 }), jsxs("div", { className: "content__menu--user ".concat(isCollapsed ? "gap-0" : "gap-3"), children: [jsx(Avatar, { size: "md", src: ((_b = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _b === void 0 ? void 0 : _b.trim()) || undefined, color: !((_c = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _c === void 0 ? void 0 : _c.trim()) ? "warning" : "default", name: userName, className: "shrink-0" }), jsxs("div", { className: "collapsible-item flex min-w-0 flex-col overflow-hidden", children: [jsx("p", { className: "text-small font-medium text-default-900 truncate", children: userName }), jsx("p", { className: "text-tiny text-default-400 truncate", children: userRole })] })] }), jsx("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6"), children: jsx("div", { className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: jsx(MenuNavList, { defaultSelectedKey:
|
|
2274
|
+
: "solar:alt-arrow-left-outline", size: "lg", className: "hidden sm:block cursor-pointer", onClick: handleCollapseToggle })] })] }), jsx(Spacer, { y: 6 }), jsxs("div", { className: "content__menu--user ".concat(isCollapsed ? "gap-0" : "gap-3"), children: [jsx(Avatar, { size: "md", src: ((_b = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _b === void 0 ? void 0 : _b.trim()) || undefined, color: !((_c = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _c === void 0 ? void 0 : _c.trim()) ? "warning" : "default", name: userName, className: "shrink-0" }), jsxs("div", { className: "collapsible-item flex min-w-0 flex-col overflow-hidden", children: [jsx("p", { className: "text-small font-medium text-default-900 truncate", children: userName }), jsx("p", { className: "text-tiny text-default-400 truncate", children: userRole })] })] }), jsx("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6"), children: jsx("div", { className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: jsx(MenuNavList, { defaultSelectedKey: selectedKey, items: menuItems.items, isCollapsed: isCollapsed, onSelect: handleMenuSelect }, selectedKey) }) }), jsx("div", { className: "mt-auto flex flex-col justify-center items-center", children: jsx(Button$1, { fullWidth: true, className: " text-default-500 data-[hover=true]:text-default-600", startContent: jsx(IconComponent, { className: "text-default-500", icon: "solar:info-circle-line-duotone", size: "md" }), variant: "light", onPress: handleHelpClick, isIconOnly: isCollapsed, children: !isCollapsed && (jsx("span", { className: "collapsible-item truncate", children: helpTitle })) }) })] }) })] }));
|
|
2218
2275
|
});
|
|
2219
2276
|
|
|
2220
2277
|
var StepIndicator = function (_a) {
|
|
@@ -4089,7 +4146,7 @@ var AURORAS = [
|
|
|
4089
4146
|
duration: 55,
|
|
4090
4147
|
},
|
|
4091
4148
|
];
|
|
4092
|
-
var DEFAULT_TRANSLATIONS$
|
|
4149
|
+
var DEFAULT_TRANSLATIONS$2 = {
|
|
4093
4150
|
backButtonLabel: "Atras",
|
|
4094
4151
|
};
|
|
4095
4152
|
var BackButton = function (_a) {
|
|
@@ -4125,7 +4182,7 @@ var TwoColumnLayoutAgent = function (_a) {
|
|
|
4125
4182
|
var _b = _a.assistantState, assistantState = _b === void 0 ? "happy" : _b, assistantSpeech = _a.assistantSpeech, _c = _a.assistantSize, assistantSize = _c === void 0 ? "xl" : _c, assistantHint = _a.assistantHint, _d = _a.enableSequence, enableSequence = _d === void 0 ? true : _d, children = _a.children, _e = _a.showBackButton, showBackButton = _e === void 0 ? false : _e, onBack = _a.onBack, _f = _a.translations, translations = _f === void 0 ? {} : _f, _g = _a.className, className = _g === void 0 ? "" : _g;
|
|
4126
4183
|
var _h = useState(!enableSequence), showRightContent = _h[0], setShowRightContent = _h[1];
|
|
4127
4184
|
var isDesktop = useMediaQuery("(min-width: ".concat(DESKTOP_BREAKPOINT_PX, "px)"));
|
|
4128
|
-
var t = useMemo(function () { return (__assign(__assign({}, DEFAULT_TRANSLATIONS$
|
|
4185
|
+
var t = useMemo(function () { return (__assign(__assign({}, DEFAULT_TRANSLATIONS$2), translations)); }, [translations]);
|
|
4129
4186
|
var handleBackPress = onBack !== null && onBack !== void 0 ? onBack : (function () { return undefined; });
|
|
4130
4187
|
useEffect(function () {
|
|
4131
4188
|
if (enableSequence && !showRightContent) {
|
|
@@ -4680,6 +4737,65 @@ var UploadFile = function (_a) {
|
|
|
4680
4737
|
};
|
|
4681
4738
|
UploadFile.displayName = "UploadFile";
|
|
4682
4739
|
|
|
4740
|
+
var DEFAULT_TRANSLATIONS$1 = {
|
|
4741
|
+
businessName: "Tu Negocio",
|
|
4742
|
+
businessInitials: "TN",
|
|
4743
|
+
onlineStatus: "en linea",
|
|
4744
|
+
imageAlt: "Vista previa de mensaje WhatsApp",
|
|
4745
|
+
viewMore: "ver mas",
|
|
4746
|
+
viewLess: "ver menos",
|
|
4747
|
+
};
|
|
4748
|
+
/**
|
|
4749
|
+
* WhatsAppPreview - Displays a realistic WhatsApp message bubble preview.
|
|
4750
|
+
* Supports image, caption, CTA buttons, and compact/full variants.
|
|
4751
|
+
*
|
|
4752
|
+
* @component
|
|
4753
|
+
* @example
|
|
4754
|
+
* ```tsx
|
|
4755
|
+
* <WhatsAppPreview
|
|
4756
|
+
* imageUrl="/path/to/image.jpg"
|
|
4757
|
+
* caption="Check out our new product!"
|
|
4758
|
+
* variant="full"
|
|
4759
|
+
* showHeader
|
|
4760
|
+
* />
|
|
4761
|
+
* ```
|
|
4762
|
+
*/
|
|
4763
|
+
var WhatsAppPreview = function (_a) {
|
|
4764
|
+
var imageUrl = _a.imageUrl, caption = _a.caption, _b = _a.variant, variant = _b === void 0 ? "compact" : _b, _c = _a.showHeader, showHeader = _c === void 0 ? false : _c, maxCaptionLength = _a.maxCaptionLength, onToggleCaption = _a.onToggleCaption, _d = _a.showFullCaption, showFullCaption = _d === void 0 ? false : _d, ctaType = _a.ctaType, ctaLabel = _a.ctaLabel, ctaValue = _a.ctaValue, _e = _a.campaignView, campaignView = _e === void 0 ? false : _e, _f = _a.translations, translations = _f === void 0 ? {} : _f, _g = _a.className, className = _g === void 0 ? "" : _g, _h = _a.timeLocale, timeLocale = _h === void 0 ? "es-ES" : _h;
|
|
4765
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$1), translations);
|
|
4766
|
+
var shouldTruncate = maxCaptionLength && caption.length > maxCaptionLength;
|
|
4767
|
+
var displayCaption = campaignView
|
|
4768
|
+
? caption
|
|
4769
|
+
: shouldTruncate && !showFullCaption
|
|
4770
|
+
? "".concat(caption.substring(0, maxCaptionLength), "...")
|
|
4771
|
+
: caption;
|
|
4772
|
+
var containerStyle = variant === "compact" ? { minHeight: "320px" } : { height: "640px" };
|
|
4773
|
+
var paddingClass = variant === "compact" ? "p-3" : "p-4";
|
|
4774
|
+
var imageMargin = variant === "compact" ? "" : "-mx-1 -mt-1";
|
|
4775
|
+
var imageHeight = campaignView
|
|
4776
|
+
? ""
|
|
4777
|
+
: variant === "compact"
|
|
4778
|
+
? "h-32"
|
|
4779
|
+
: "max-h-64";
|
|
4780
|
+
var imageAspectRatio = campaignView ? "1/1" : undefined;
|
|
4781
|
+
var bubblePadding = variant === "compact" ? "p-2.5" : "p-3";
|
|
4782
|
+
return (jsxs("div", { className: "w-full h-full flex flex-col bg-[#ECE5DD] dark:bg-gray-900 ".concat(paddingClass, " justify-start ").concat(className), style: containerStyle, children: [showHeader && (jsxs("div", { className: "flex items-center gap-3 mb-4 p-3 bg-[#075E54] dark:bg-[#1F2C33] rounded-t-lg -mx-4 -mt-4", children: [jsx("div", { className: "w-10 h-10 bg-gray-300 rounded-full flex items-center justify-center", children: jsx("span", { className: "text-gray-600 text-sm font-bold", children: t.businessInitials }) }), jsxs("div", { className: "flex-1", children: [jsx("span", { className: "text-sm font-semibold text-white", children: t.businessName }), jsx("p", { className: "text-xs text-gray-300", children: t.onlineStatus })] })] })), jsx("div", { className: "flex flex-col gap-2 ".concat(showHeader ? "mt-6 overflow-y-auto flex-1" : "", " items-start"), children: jsx("div", { className: "mr-auto max-w-[85%]", children: jsxs("div", { className: "bg-white dark:bg-gray-800 rounded-lg ".concat(bubblePadding, " shadow-sm"), children: [imageUrl && (jsx("div", { className: "rounded-lg overflow-hidden ".concat(imageMargin), style: imageAspectRatio
|
|
4783
|
+
? { aspectRatio: imageAspectRatio }
|
|
4784
|
+
: undefined, children: jsx(Image$1, { src: imageUrl, alt: t.imageAlt, className: "w-full ".concat(imageHeight, " object-cover") }) })), jsxs("div", { className: "text-sm text-gray-900 dark:text-white text-left ".concat(imageUrl ? "mt-2" : ""), children: [jsx("div", { className: "".concat(showFullCaption && variant === "compact" ? "overflow-y-auto" : "", " ").concat(campaignView ? (imageUrl ? "line-clamp-3" : "line-clamp-[12]") : ""), style: {
|
|
4785
|
+
maxHeight: showFullCaption && variant === "compact"
|
|
4786
|
+
? "150px"
|
|
4787
|
+
: "none",
|
|
4788
|
+
}, children: jsx("span", { className: "whitespace-pre-wrap font-sans break-words block text-left", children: displayCaption }) }), shouldTruncate &&
|
|
4789
|
+
onToggleCaption &&
|
|
4790
|
+
variant === "compact" && (jsx("button", { type: "button", onClick: function (e) {
|
|
4791
|
+
e.stopPropagation();
|
|
4792
|
+
onToggleCaption();
|
|
4793
|
+
}, className: "text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-300 font-normal mt-1 underline text-xs", children: showFullCaption ? t.viewLess : t.viewMore }))] }), ctaType && ctaLabel && ctaValue && (jsx("div", { className: "mt-3 -mx-1", children: jsx(Button, { size: "sm", color: "primary", variant: "bordered", className: "w-full font-semibold", startContent: ctaType === "CALL_NOW" ? (jsx(IconComponent, { icon: "solar:phone-bold", className: "text-sm" })) : (jsx(IconComponent, { icon: "solar:link-bold", className: "text-sm" })), children: ctaLabel }) })), jsx("div", { className: "flex items-center justify-end gap-1 mt-1", children: jsx("span", { className: "text-[10px] text-gray-600 dark:text-gray-400", children: new Date().toLocaleTimeString(timeLocale, {
|
|
4794
|
+
hour: "2-digit",
|
|
4795
|
+
minute: "2-digit",
|
|
4796
|
+
}) }) })] }) }) })] }));
|
|
4797
|
+
};
|
|
4798
|
+
|
|
4683
4799
|
/**
|
|
4684
4800
|
* WizardSidebar - Componente de navegación lateral del wizard
|
|
4685
4801
|
* Muestra los pasos con indicadores visuales de estado (activo, completado, pendiente)
|
|
@@ -5690,4 +5806,4 @@ var NavigationLoadingProvider = function (_a) {
|
|
|
5690
5806
|
return (jsxs(NavigationLoadingContext.Provider, { value: value, children: [children, jsx(NavigationLoadingOverlay, { isVisible: isVisible })] }));
|
|
5691
5807
|
};
|
|
5692
5808
|
|
|
5693
|
-
export { AccordionList, AddHolidayForm, AnalyticsCard, AuraAutocomplete, AuraTable, AuraToastProvider, BreadcrumbsComponent, Button, Card, Chip, ColorPicker, ColorSelector, ContentCarousel, DEFAULT_PREDEFINED_COLORS, DatePicker, DateRangePicker, DateSelector, DrawerFilters, EnumMenuNavListItem, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, Kanban, KanbanCard, KanbanColumn, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, RangeFilter, RowSteps, ScheduleRow, SearchInput, Select, SocialMediaBar, SocialMediaCarousel, SocialMediaPreview, StepIndicator, Switch as SwitchComponent, TagsFilter, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, TwoColumnLayoutAgent, UploadFile, VerticalSteps, Wizard, WizardNavigation, WizardSidebar, defaultTranslations$4 as defaultTranslations, sizeMap, themeColors, useAuraToast, useMediaQuery, useNavigationLoading, useThemeContext };
|
|
5809
|
+
export { AccordionList, AddHolidayForm, AnalyticsCard, AuraAutocomplete, AuraTable, AuraToastProvider, BreadcrumbsComponent, Button, Card, Chip, ColorPicker, ColorSelector, ContentCarousel, DEFAULT_PREDEFINED_COLORS, DatePicker, DateRangePicker, DateSelector, DrawerFilters, EnumMenuNavListItem, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, Kanban, KanbanCard, KanbanColumn, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, RangeFilter, RowSteps, ScheduleRow, SearchInput, Select, SocialMediaBar, SocialMediaCarousel, SocialMediaPreview, StepIndicator, Switch as SwitchComponent, TagsFilter, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, TwoColumnLayoutAgent, UploadFile, VerticalSteps, WhatsAppPreview, Wizard, WizardNavigation, WizardSidebar, defaultTranslations$4 as defaultTranslations, getSelectedKeyFromPath, sizeMap, themeColors, useAuraToast, useMediaQuery, useNavigationLoading, useThemeContext };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,aAAa,CAAC;AAIrB,OAAO,KAAK,EACX,kBAAkB,EAElB,MAAM,cAAc,CAAC;AActB;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAsPtD,CAAC"}
|
|
@@ -31,7 +31,13 @@ export interface MenuComponentProps {
|
|
|
31
31
|
};
|
|
32
32
|
menuItems: {
|
|
33
33
|
items: MenuNavListItem[];
|
|
34
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Ruta actual (p. ej. location.pathname). La librería calcula la key seleccionada
|
|
36
|
+
* comparando con los href de los ítems. Preferido frente a selectedKey.
|
|
37
|
+
*/
|
|
38
|
+
selectedPath?: string;
|
|
39
|
+
/** Key del ítem seleccionado. Si se pasa selectedPath, se ignora y se deriva internamente. */
|
|
40
|
+
selectedKey?: string;
|
|
35
41
|
/**
|
|
36
42
|
* Se invoca al seleccionar un ítem. En móvil, si `source === 'bottomBar'` la app no debe abrir
|
|
37
43
|
* el menú lateral (solo el botón hamburguesa debe abrirlo) para evitar parpadeos.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.types.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAEnF;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACvC,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,6DAA6D;IAC7D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8FAA8F;IAC9F,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,WAAW,kBAAkB;IAClC,YAAY,EAAE;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACb,CAAC;IACF,QAAQ,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACb,CAAC;IACF,UAAU,EAAE;QACX,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,SAAS,EAAE;QACV,KAAK,EAAE,eAAe,EAAE,CAAC;QACzB,WAAW,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Menu.types.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAEnF;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACvC,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,6DAA6D;IAC7D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8FAA8F;IAC9F,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,WAAW,kBAAkB;IAClC,YAAY,EAAE;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACb,CAAC;IACF,QAAQ,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACb,CAAC;IACF,UAAU,EAAE;QACX,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,SAAS,EAAE;QACV,KAAK,EAAE,eAAe,EAAE,CAAC;QACzB;;;WAGG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,8FAA8F;QAC9F,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB;;;WAGG;QACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,GAAG,WAAW,KAAK,IAAI,CAAC;KAClF,CAAC;IACF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,yBAAyB,CAAC;CACzC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MenuNavListItem } from "./_internal/menu-nav-list/MenuNavList.types";
|
|
2
|
+
/**
|
|
3
|
+
* Returns the menu item key that matches the current pathname.
|
|
4
|
+
* Supports the structure used by Menu: items can be sections (each with .items) or flat.
|
|
5
|
+
* For nested items (e.g. Catálogo > Productos), returns the sub-item key.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getSelectedKeyFromPath(pathname: string, items: MenuNavListItem[]): string | undefined;
|
|
8
|
+
//# sourceMappingURL=get-selected-key-from-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-selected-key-from-path.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/get-selected-key-from-path.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAqCnF;;;;GAIG;AACH,wBAAgB,sBAAsB,CACrC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,eAAe,EAAE,GACtB,MAAM,GAAG,SAAS,CAQpB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { MenuComponent } from "./Menu";
|
|
2
|
+
export { getSelectedKeyFromPath } from "./get-selected-key-from-path";
|
|
2
3
|
export type { MenuComponentProps, MenuComponentTranslations, } from "./Menu.types";
|
|
3
4
|
export { EnumMenuNavListItem } from "./_internal/menu-nav-list/MenuNavList.types";
|
|
4
5
|
export type { MenuNavListItem } from "./_internal/menu-nav-list/MenuNavList.types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,YAAY,EACX,kBAAkB,EAClB,yBAAyB,GACzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAClF,YAAY,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,YAAY,EACX,kBAAkB,EAClB,yBAAyB,GACzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAClF,YAAY,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { WhatsAppPreviewProps } from "./WhatsAppPreview.types";
|
|
3
|
+
/**
|
|
4
|
+
* WhatsAppPreview - Displays a realistic WhatsApp message bubble preview.
|
|
5
|
+
* Supports image, caption, CTA buttons, and compact/full variants.
|
|
6
|
+
*
|
|
7
|
+
* @component
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <WhatsAppPreview
|
|
11
|
+
* imageUrl="/path/to/image.jpg"
|
|
12
|
+
* caption="Check out our new product!"
|
|
13
|
+
* variant="full"
|
|
14
|
+
* showHeader
|
|
15
|
+
* />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare const WhatsAppPreview: React.FC<WhatsAppPreviewProps>;
|
|
19
|
+
//# sourceMappingURL=WhatsAppPreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WhatsAppPreview.d.ts","sourceRoot":"","sources":["../../../../src/components/whatsapp-preview/WhatsAppPreview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EACX,oBAAoB,EAEpB,MAAM,yBAAyB,CAAC;AAWjC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA6J1D,CAAC"}
|