@beweco/aurora-ui 0.6.11 → 0.6.16

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.js CHANGED
@@ -3234,8 +3234,15 @@ var MenuComponent = React.memo(function Menu(_a) {
3234
3234
  t.notDefinedLabel;
3235
3235
  var userRole = (typeof (userInfo === null || userInfo === void 0 ? void 0 : userInfo.role) === "string" && userInfo.role.trim()) ||
3236
3236
  t.notDefinedLabel;
3237
- var helpTitle = (typeof (helpButton === null || helpButton === void 0 ? void 0 : helpButton.title) === "string" && helpButton.title.trim()) ||
3238
- t.notDefinedLabel;
3237
+ var helpSection = React.useMemo(function () {
3238
+ if (helpButton == null)
3239
+ return null;
3240
+ var title = typeof helpButton.title === "string" ? helpButton.title.trim() : "";
3241
+ var redirect = typeof helpButton.redirect === "string" ? helpButton.redirect.trim() : "";
3242
+ if (!title || !redirect)
3243
+ return null;
3244
+ return { title: title, redirect: redirect };
3245
+ }, [helpButton]);
3239
3246
  var hasValidLogo = typeof (commerceInfo === null || commerceInfo === void 0 ? void 0 : commerceInfo.logo) === "string" &&
3240
3247
  commerceInfo.logo.trim() !== "" &&
3241
3248
  !logoError;
@@ -3257,11 +3264,9 @@ var MenuComponent = React.memo(function Menu(_a) {
3257
3264
  setIsCollapsed(function (prev) { return !prev; });
3258
3265
  }, []);
3259
3266
  var handleHelpClick = React.useCallback(function () {
3260
- var _a;
3261
- var url = (_a = helpButton === null || helpButton === void 0 ? void 0 : helpButton.redirect) === null || _a === void 0 ? void 0 : _a.trim();
3262
- if (url)
3263
- window.open(url, "_blank");
3264
- }, [helpButton]);
3267
+ if (helpSection)
3268
+ window.open(helpSection.redirect, "_blank");
3269
+ }, [helpSection]);
3265
3270
  // Menú lateral: al seleccionar ítem/sub-ítem cerrar en móvil. No hacer nada si es una sección (solo título).
3266
3271
  var handleMenuSelect = React.useCallback(function (key, href) {
3267
3272
  var _a;
@@ -3391,7 +3396,7 @@ var MenuComponent = React.memo(function Menu(_a) {
3391
3396
  flexDirection: isCollapsed ? "column-reverse" : "row",
3392
3397
  }, 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
3393
3398
  ? "solar:alt-arrow-right-outline"
3394
- : "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.jsxs("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6 relative"), children: [!isCollapsed && showScrollArrows && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [scrollState.canScrollUp && (jsxRuntime.jsx("button", { type: "button", "aria-label": t.scrollUpAriaLabel, className: "menu-scroll-arrow menu-scroll-arrow--up", onClick: handleScrollUp, children: jsxRuntime.jsx(IconComponent, { icon: "solar:alt-arrow-up-outline", size: "lg", "aria-hidden": true }) })), scrollState.canScrollDown && (jsxRuntime.jsx("button", { type: "button", "aria-label": t.scrollDownAriaLabel, className: "menu-scroll-arrow menu-scroll-arrow--down", onClick: handleScrollDown, children: jsxRuntime.jsx(IconComponent, { icon: "solar:alt-arrow-down-outline", size: "lg", "aria-hidden": true }) }))] })), jsxRuntime.jsx("div", { ref: scrollContainerRef, className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none] select-none ".concat(isDraggingScroll ? "cursor-grabbing" : ""), onMouseDown: handleScrollAreaMouseDown, 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 })) }) })] }) })] }));
3399
+ : "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.jsxs("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6 relative"), children: [!isCollapsed && showScrollArrows && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [scrollState.canScrollUp && (jsxRuntime.jsx("button", { type: "button", "aria-label": t.scrollUpAriaLabel, className: "menu-scroll-arrow menu-scroll-arrow--up", onClick: handleScrollUp, children: jsxRuntime.jsx(IconComponent, { icon: "solar:alt-arrow-up-outline", size: "lg", "aria-hidden": true }) })), scrollState.canScrollDown && (jsxRuntime.jsx("button", { type: "button", "aria-label": t.scrollDownAriaLabel, className: "menu-scroll-arrow menu-scroll-arrow--down", onClick: handleScrollDown, children: jsxRuntime.jsx(IconComponent, { icon: "solar:alt-arrow-down-outline", size: "lg", "aria-hidden": true }) }))] })), jsxRuntime.jsx("div", { ref: scrollContainerRef, className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none] select-none ".concat(isDraggingScroll ? "cursor-grabbing" : ""), onMouseDown: handleScrollAreaMouseDown, children: jsxRuntime.jsx(MenuNavList, { defaultSelectedKey: selectedKey, items: menuItems.items, isCollapsed: isCollapsed, onSelect: handleMenuSelect }, selectedKey) })] }), helpSection ? (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: helpSection.title })) }) })) : null] }) })] }));
3395
3400
  });
3396
3401
 
3397
3402
  var StepIndicator = function (_a) {
@@ -5400,6 +5405,55 @@ var UploadFile = function (_a) {
5400
5405
  };
5401
5406
  UploadFile.displayName = "UploadFile";
5402
5407
 
5408
+ function resolvePreviewActions(previewAction, ctaType, ctaLabel, ctaValue) {
5409
+ var _a;
5410
+ var fromProp = (_a = previewAction === null || previewAction === void 0 ? void 0 : previewAction.filter(function (a) {
5411
+ var _a;
5412
+ if (!((_a = a.title) === null || _a === void 0 ? void 0 : _a.trim())) {
5413
+ return false;
5414
+ }
5415
+ if (a.type === "list") {
5416
+ return Array.isArray(a.listItems) && a.listItems.length > 0;
5417
+ }
5418
+ return true;
5419
+ })) !== null && _a !== void 0 ? _a : [];
5420
+ if (fromProp.length > 0) {
5421
+ return fromProp;
5422
+ }
5423
+ if (ctaType && ctaLabel && ctaValue) {
5424
+ var isPhone = ctaType === "CALL_NOW" || ctaType.toLowerCase() === "phone";
5425
+ return [
5426
+ __assign({ type: isPhone ? "phone" : "url", title: ctaLabel }, (isPhone ? { value: ctaValue } : { url: ctaValue, value: ctaValue })),
5427
+ ];
5428
+ }
5429
+ return [];
5430
+ }
5431
+ /** Verdes alineados con WhatsApp (claro / oscuro); icono hereda con `text-current` */
5432
+ var ACTION_PRIMARY_CLASS = "text-[#008069] dark:text-[#00A884]";
5433
+ var ACTION_MUTED_CLASS = "text-gray-600 dark:text-gray-400";
5434
+ function actionIconForType(type) {
5435
+ switch (type) {
5436
+ case "phone":
5437
+ return "solar:phone-bold";
5438
+ case "quick_reply":
5439
+ return "solar:reply-bold";
5440
+ case "list":
5441
+ return "solar:list-bold";
5442
+ default:
5443
+ return "solar:square-share-line-bold";
5444
+ }
5445
+ }
5446
+ var ListMessageSheet = function (_a) {
5447
+ var _b, _c, _d;
5448
+ var action = _a.action, onClose = _a.onClose, onPick = _a.onPick, translations = _a.translations;
5449
+ var items = (_b = action.listItems) !== null && _b !== void 0 ? _b : [];
5450
+ var headerTitle = (_c = action.listHeaderTitle) !== null && _c !== void 0 ? _c : action.title;
5451
+ var footerHint = (_d = action.listFooterHint) !== null && _d !== void 0 ? _d : translations.listSelectHintDefault;
5452
+ return (jsxRuntime.jsxs("div", { className: "absolute inset-0 z-40 flex flex-col justify-end pointer-events-auto", role: "presentation", children: [jsxRuntime.jsx("button", { type: "button", className: "absolute inset-0 z-40 bg-black/45 dark:bg-black/60 border-0 cursor-pointer p-0 m-0", onClick: onClose, "aria-label": translations.listCloseAriaLabel }), jsxRuntime.jsxs("div", { className: "relative z-50 mx-1 mb-1 rounded-2xl bg-white dark:bg-[#1f1f1f] shadow-2xl flex flex-col max-h-[min(52vh,420px)] overflow-hidden ring-1 ring-black/5 dark:ring-white/10", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-center relative shrink-0 px-10 pt-3 pb-2.5 border-b border-black/[0.08] dark:border-white/[0.12]", children: [jsxRuntime.jsx("span", { className: "text-[15px] font-semibold text-gray-900 dark:text-gray-100 text-center", children: headerTitle }), jsxRuntime.jsx("button", { type: "button", onClick: onClose, className: "absolute right-2 top-1.5 p-1.5 rounded-full text-gray-500 hover:bg-black/[0.06] dark:text-gray-400 dark:hover:bg-white/[0.08]", "aria-label": translations.listCloseAriaLabel, children: jsxRuntime.jsx(IconComponent, { icon: "solar:close-circle-bold", className: "text-current", size: "lg" }) })] }), jsxRuntime.jsx("div", { className: "overflow-y-auto flex-1 min-h-0", children: items.map(function (item, rowIndex) {
5453
+ var _a;
5454
+ return (jsxRuntime.jsxs("button", { type: "button", onClick: function () { return onPick(item); }, className: "w-full text-left flex gap-3 px-4 py-3 border-t border-black/[0.06] dark:border-white/[0.08] first:border-t-0 hover:bg-black/[0.04] dark:hover:bg-white/[0.05] transition-colors", children: [item.emoji || item.icon ? (jsxRuntime.jsx("div", { className: "shrink-0 w-9 inline-flex items-center justify-center self-start", children: item.emoji ? (jsxRuntime.jsx("span", { className: "text-xl leading-none", "aria-hidden": true, children: item.emoji })) : item.icon ? (jsxRuntime.jsx("span", { className: "inline-flex h-6 w-6 items-center justify-center [&>span]:flex [&>span]:size-full [&>span]:items-center [&>span]:justify-center", children: jsxRuntime.jsx(IconComponent, { icon: item.icon, className: "text-gray-600 dark:text-gray-300 [&_svg]:block", size: "sm" }) })) : null })) : null, jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [jsxRuntime.jsx("p", { className: "text-[15px] font-semibold text-gray-900 dark:text-gray-100 leading-snug", children: item.title }), item.description ? (jsxRuntime.jsx("p", { className: "text-[13px] text-gray-600 dark:text-gray-400 mt-0.5 leading-snug", children: item.description })) : null] })] }, (_a = item.id) !== null && _a !== void 0 ? _a : "".concat(item.title, "-").concat(rowIndex)));
5455
+ }) }), footerHint ? (jsxRuntime.jsx("p", { className: "shrink-0 text-center text-[11px] text-gray-500 dark:text-gray-500 px-4 py-2.5 border-t border-black/[0.06] dark:border-white/[0.08]", children: footerHint })) : null] })] }));
5456
+ };
5403
5457
  var DEFAULT_TRANSLATIONS$3 = {
5404
5458
  businessName: "Tu Negocio",
5405
5459
  businessInitials: "TN",
@@ -5407,10 +5461,12 @@ var DEFAULT_TRANSLATIONS$3 = {
5407
5461
  imageAlt: "Vista previa de mensaje WhatsApp",
5408
5462
  viewMore: "ver mas",
5409
5463
  viewLess: "ver menos",
5464
+ listCloseAriaLabel: "Cerrar",
5465
+ listSelectHintDefault: "Pulsa una opción para elegir",
5410
5466
  };
5411
5467
  /**
5412
5468
  * WhatsAppPreview - Displays a realistic WhatsApp message bubble preview.
5413
- * Supports image, caption, CTA buttons, and compact/full variants.
5469
+ * Supports image, caption, acciones de plantilla (`previewAction` o CTA legacy), y variantes compact/full.
5414
5470
  *
5415
5471
  * @component
5416
5472
  * @example
@@ -5424,8 +5480,13 @@ var DEFAULT_TRANSLATIONS$3 = {
5424
5480
  * ```
5425
5481
  */
5426
5482
  var WhatsAppPreview = function (_a) {
5427
- 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;
5483
+ 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, previewAction = _a.previewAction, _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, onListItemPick = _a.onListItemPick;
5428
5484
  var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$3), translations);
5485
+ var _j = React.useState(null), openListSheetIndex = _j[0], setOpenListSheetIndex = _j[1];
5486
+ var closeListSheet = React.useCallback(function () {
5487
+ setOpenListSheetIndex(null);
5488
+ }, []);
5489
+ var resolvedActions = React.useMemo(function () { return resolvePreviewActions(previewAction, ctaType, ctaLabel, ctaValue); }, [previewAction, ctaType, ctaLabel, ctaValue]);
5429
5490
  var shouldTruncate = maxCaptionLength && caption.length > maxCaptionLength;
5430
5491
  var displayCaption = campaignView
5431
5492
  ? caption
@@ -5442,21 +5503,44 @@ var WhatsAppPreview = function (_a) {
5442
5503
  : "max-h-64";
5443
5504
  var imageAspectRatio = campaignView ? "1/1" : undefined;
5444
5505
  var bubblePadding = variant === "compact" ? "p-2.5" : "p-3";
5445
- 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
5506
+ var bubbleOutdent = variant === "compact" ? "-mx-2.5" : "-mx-3";
5507
+ var listSheetAction = openListSheetIndex !== null
5508
+ ? resolvedActions[openListSheetIndex]
5509
+ : undefined;
5510
+ var isListSheetOpen = (listSheetAction === null || listSheetAction === void 0 ? void 0 : listSheetAction.type) === "list" &&
5511
+ Array.isArray(listSheetAction.listItems) &&
5512
+ listSheetAction.listItems.length > 0;
5513
+ return (jsxRuntime.jsxs("div", { className: "relative 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
5446
5514
  ? { aspectRatio: imageAspectRatio }
5447
5515
  : 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: {
5448
- maxHeight: showFullCaption && variant === "compact"
5449
- ? "150px"
5450
- : "none",
5451
- }, children: jsxRuntime.jsx("span", { className: "whitespace-pre-wrap font-sans break-words block text-left", children: displayCaption }) }), shouldTruncate &&
5452
- onToggleCaption &&
5453
- variant === "compact" && (jsxRuntime.jsx("button", { type: "button", onClick: function (e) {
5516
+ maxHeight: showFullCaption && variant === "compact" ? "150px" : "none",
5517
+ }, children: jsxRuntime.jsx("span", { className: "whitespace-pre-wrap font-sans break-words block text-left", children: displayCaption }) }), shouldTruncate && onToggleCaption && variant === "compact" && (jsxRuntime.jsx("button", { type: "button", onClick: function (e) {
5454
5518
  e.stopPropagation();
5455
5519
  onToggleCaption();
5456
- }, 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.jsxs("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, {
5457
- hour: "2-digit",
5458
- minute: "2-digit",
5459
- }) }), jsxRuntime.jsx(IconComponent, { "aria-hidden": true, icon: "solar:check-read-linear", size: "sm", className: "shrink-0 text-gray-600 dark:text-gray-400" })] })] }) }) })] }));
5520
+ }, 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 })), jsxRuntime.jsxs("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 tabular-nums", children: new Date().toLocaleTimeString(timeLocale, {
5521
+ hour: "2-digit",
5522
+ minute: "2-digit",
5523
+ }) }), jsxRuntime.jsx(IconComponent, { "aria-hidden": true, icon: "solar:check-read-linear", size: "sm", className: "shrink-0 text-gray-600 dark:text-gray-400" })] })] }), resolvedActions.length > 0 && (jsxRuntime.jsx("div", { className: "".concat(bubbleOutdent, " mt-1 flex flex-col border-t border-black/[0.08] dark:border-white/[0.12]"), children: resolvedActions.map(function (action, index) {
5524
+ var _a;
5525
+ var emphasis = (_a = action.emphasis) !== null && _a !== void 0 ? _a : "primary";
5526
+ var toneClass = action.type === "list"
5527
+ ? ACTION_PRIMARY_CLASS
5528
+ : emphasis === "muted"
5529
+ ? ACTION_MUTED_CLASS
5530
+ : ACTION_PRIMARY_CLASS;
5531
+ return (jsxRuntime.jsxs("button", { type: "button", className: "w-full flex flex-row items-center justify-center gap-2.5 py-2.5 px-3 text-sm font-medium leading-5 bg-transparent ".concat(toneClass, " border-t border-black/[0.06] dark:border-white/[0.08] first:border-t-0 hover:bg-black/[0.03] dark:hover:bg-white/[0.04] transition-colors"), onClick: function (e) {
5532
+ if (action.type === "list") {
5533
+ e.stopPropagation();
5534
+ setOpenListSheetIndex(index);
5535
+ }
5536
+ }, children: [jsxRuntime.jsx("span", { className: "inline-flex h-5 w-5 shrink-0 items-center justify-center [&>span]:flex [&>span]:size-full [&>span]:items-center [&>span]:justify-center", "aria-hidden": true, children: jsxRuntime.jsx(IconComponent, { icon: actionIconForType(action.type), className: "text-current [&_svg]:block", size: "sm" }) }), jsxRuntime.jsx("span", { className: "min-w-0 text-center leading-5", children: action.title })] }, "".concat(action.type, "-").concat(action.title, "-").concat(index)));
5537
+ }) }))] }) }) }), isListSheetOpen && listSheetAction && openListSheetIndex !== null ? (jsxRuntime.jsx(ListMessageSheet, { action: listSheetAction, onClose: closeListSheet, onPick: function (item) {
5538
+ onListItemPick === null || onListItemPick === void 0 ? void 0 : onListItemPick({
5539
+ actionIndex: openListSheetIndex,
5540
+ item: item,
5541
+ });
5542
+ closeListSheet();
5543
+ }, translations: t })) : null] }));
5460
5544
  };
5461
5545
 
5462
5546
  /**
package/dist/index.esm.js CHANGED
@@ -3235,8 +3235,15 @@ var MenuComponent = React.memo(function Menu(_a) {
3235
3235
  t.notDefinedLabel;
3236
3236
  var userRole = (typeof (userInfo === null || userInfo === void 0 ? void 0 : userInfo.role) === "string" && userInfo.role.trim()) ||
3237
3237
  t.notDefinedLabel;
3238
- var helpTitle = (typeof (helpButton === null || helpButton === void 0 ? void 0 : helpButton.title) === "string" && helpButton.title.trim()) ||
3239
- t.notDefinedLabel;
3238
+ var helpSection = useMemo(function () {
3239
+ if (helpButton == null)
3240
+ return null;
3241
+ var title = typeof helpButton.title === "string" ? helpButton.title.trim() : "";
3242
+ var redirect = typeof helpButton.redirect === "string" ? helpButton.redirect.trim() : "";
3243
+ if (!title || !redirect)
3244
+ return null;
3245
+ return { title: title, redirect: redirect };
3246
+ }, [helpButton]);
3240
3247
  var hasValidLogo = typeof (commerceInfo === null || commerceInfo === void 0 ? void 0 : commerceInfo.logo) === "string" &&
3241
3248
  commerceInfo.logo.trim() !== "" &&
3242
3249
  !logoError;
@@ -3258,11 +3265,9 @@ var MenuComponent = React.memo(function Menu(_a) {
3258
3265
  setIsCollapsed(function (prev) { return !prev; });
3259
3266
  }, []);
3260
3267
  var handleHelpClick = useCallback(function () {
3261
- var _a;
3262
- var url = (_a = helpButton === null || helpButton === void 0 ? void 0 : helpButton.redirect) === null || _a === void 0 ? void 0 : _a.trim();
3263
- if (url)
3264
- window.open(url, "_blank");
3265
- }, [helpButton]);
3268
+ if (helpSection)
3269
+ window.open(helpSection.redirect, "_blank");
3270
+ }, [helpSection]);
3266
3271
  // Menú lateral: al seleccionar ítem/sub-ítem cerrar en móvil. No hacer nada si es una sección (solo título).
3267
3272
  var handleMenuSelect = useCallback(function (key, href) {
3268
3273
  var _a;
@@ -3392,7 +3397,7 @@ var MenuComponent = React.memo(function Menu(_a) {
3392
3397
  flexDirection: isCollapsed ? "column-reverse" : "row",
3393
3398
  }, 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
3394
3399
  ? "solar:alt-arrow-right-outline"
3395
- : "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 })] })] }), jsxs("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6 relative"), children: [!isCollapsed && showScrollArrows && (jsxs(Fragment, { children: [scrollState.canScrollUp && (jsx("button", { type: "button", "aria-label": t.scrollUpAriaLabel, className: "menu-scroll-arrow menu-scroll-arrow--up", onClick: handleScrollUp, children: jsx(IconComponent, { icon: "solar:alt-arrow-up-outline", size: "lg", "aria-hidden": true }) })), scrollState.canScrollDown && (jsx("button", { type: "button", "aria-label": t.scrollDownAriaLabel, className: "menu-scroll-arrow menu-scroll-arrow--down", onClick: handleScrollDown, children: jsx(IconComponent, { icon: "solar:alt-arrow-down-outline", size: "lg", "aria-hidden": true }) }))] })), jsx("div", { ref: scrollContainerRef, className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none] select-none ".concat(isDraggingScroll ? "cursor-grabbing" : ""), onMouseDown: handleScrollAreaMouseDown, 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 })) }) })] }) })] }));
3400
+ : "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 })] })] }), jsxs("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6 relative"), children: [!isCollapsed && showScrollArrows && (jsxs(Fragment, { children: [scrollState.canScrollUp && (jsx("button", { type: "button", "aria-label": t.scrollUpAriaLabel, className: "menu-scroll-arrow menu-scroll-arrow--up", onClick: handleScrollUp, children: jsx(IconComponent, { icon: "solar:alt-arrow-up-outline", size: "lg", "aria-hidden": true }) })), scrollState.canScrollDown && (jsx("button", { type: "button", "aria-label": t.scrollDownAriaLabel, className: "menu-scroll-arrow menu-scroll-arrow--down", onClick: handleScrollDown, children: jsx(IconComponent, { icon: "solar:alt-arrow-down-outline", size: "lg", "aria-hidden": true }) }))] })), jsx("div", { ref: scrollContainerRef, className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none] select-none ".concat(isDraggingScroll ? "cursor-grabbing" : ""), onMouseDown: handleScrollAreaMouseDown, children: jsx(MenuNavList, { defaultSelectedKey: selectedKey, items: menuItems.items, isCollapsed: isCollapsed, onSelect: handleMenuSelect }, selectedKey) })] }), helpSection ? (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: helpSection.title })) }) })) : null] }) })] }));
3396
3401
  });
3397
3402
 
3398
3403
  var StepIndicator = function (_a) {
@@ -5401,6 +5406,55 @@ var UploadFile = function (_a) {
5401
5406
  };
5402
5407
  UploadFile.displayName = "UploadFile";
5403
5408
 
5409
+ function resolvePreviewActions(previewAction, ctaType, ctaLabel, ctaValue) {
5410
+ var _a;
5411
+ var fromProp = (_a = previewAction === null || previewAction === void 0 ? void 0 : previewAction.filter(function (a) {
5412
+ var _a;
5413
+ if (!((_a = a.title) === null || _a === void 0 ? void 0 : _a.trim())) {
5414
+ return false;
5415
+ }
5416
+ if (a.type === "list") {
5417
+ return Array.isArray(a.listItems) && a.listItems.length > 0;
5418
+ }
5419
+ return true;
5420
+ })) !== null && _a !== void 0 ? _a : [];
5421
+ if (fromProp.length > 0) {
5422
+ return fromProp;
5423
+ }
5424
+ if (ctaType && ctaLabel && ctaValue) {
5425
+ var isPhone = ctaType === "CALL_NOW" || ctaType.toLowerCase() === "phone";
5426
+ return [
5427
+ __assign({ type: isPhone ? "phone" : "url", title: ctaLabel }, (isPhone ? { value: ctaValue } : { url: ctaValue, value: ctaValue })),
5428
+ ];
5429
+ }
5430
+ return [];
5431
+ }
5432
+ /** Verdes alineados con WhatsApp (claro / oscuro); icono hereda con `text-current` */
5433
+ var ACTION_PRIMARY_CLASS = "text-[#008069] dark:text-[#00A884]";
5434
+ var ACTION_MUTED_CLASS = "text-gray-600 dark:text-gray-400";
5435
+ function actionIconForType(type) {
5436
+ switch (type) {
5437
+ case "phone":
5438
+ return "solar:phone-bold";
5439
+ case "quick_reply":
5440
+ return "solar:reply-bold";
5441
+ case "list":
5442
+ return "solar:list-bold";
5443
+ default:
5444
+ return "solar:square-share-line-bold";
5445
+ }
5446
+ }
5447
+ var ListMessageSheet = function (_a) {
5448
+ var _b, _c, _d;
5449
+ var action = _a.action, onClose = _a.onClose, onPick = _a.onPick, translations = _a.translations;
5450
+ var items = (_b = action.listItems) !== null && _b !== void 0 ? _b : [];
5451
+ var headerTitle = (_c = action.listHeaderTitle) !== null && _c !== void 0 ? _c : action.title;
5452
+ var footerHint = (_d = action.listFooterHint) !== null && _d !== void 0 ? _d : translations.listSelectHintDefault;
5453
+ return (jsxs("div", { className: "absolute inset-0 z-40 flex flex-col justify-end pointer-events-auto", role: "presentation", children: [jsx("button", { type: "button", className: "absolute inset-0 z-40 bg-black/45 dark:bg-black/60 border-0 cursor-pointer p-0 m-0", onClick: onClose, "aria-label": translations.listCloseAriaLabel }), jsxs("div", { className: "relative z-50 mx-1 mb-1 rounded-2xl bg-white dark:bg-[#1f1f1f] shadow-2xl flex flex-col max-h-[min(52vh,420px)] overflow-hidden ring-1 ring-black/5 dark:ring-white/10", children: [jsxs("div", { className: "flex items-center justify-center relative shrink-0 px-10 pt-3 pb-2.5 border-b border-black/[0.08] dark:border-white/[0.12]", children: [jsx("span", { className: "text-[15px] font-semibold text-gray-900 dark:text-gray-100 text-center", children: headerTitle }), jsx("button", { type: "button", onClick: onClose, className: "absolute right-2 top-1.5 p-1.5 rounded-full text-gray-500 hover:bg-black/[0.06] dark:text-gray-400 dark:hover:bg-white/[0.08]", "aria-label": translations.listCloseAriaLabel, children: jsx(IconComponent, { icon: "solar:close-circle-bold", className: "text-current", size: "lg" }) })] }), jsx("div", { className: "overflow-y-auto flex-1 min-h-0", children: items.map(function (item, rowIndex) {
5454
+ var _a;
5455
+ return (jsxs("button", { type: "button", onClick: function () { return onPick(item); }, className: "w-full text-left flex gap-3 px-4 py-3 border-t border-black/[0.06] dark:border-white/[0.08] first:border-t-0 hover:bg-black/[0.04] dark:hover:bg-white/[0.05] transition-colors", children: [item.emoji || item.icon ? (jsx("div", { className: "shrink-0 w-9 inline-flex items-center justify-center self-start", children: item.emoji ? (jsx("span", { className: "text-xl leading-none", "aria-hidden": true, children: item.emoji })) : item.icon ? (jsx("span", { className: "inline-flex h-6 w-6 items-center justify-center [&>span]:flex [&>span]:size-full [&>span]:items-center [&>span]:justify-center", children: jsx(IconComponent, { icon: item.icon, className: "text-gray-600 dark:text-gray-300 [&_svg]:block", size: "sm" }) })) : null })) : null, jsxs("div", { className: "min-w-0 flex-1", children: [jsx("p", { className: "text-[15px] font-semibold text-gray-900 dark:text-gray-100 leading-snug", children: item.title }), item.description ? (jsx("p", { className: "text-[13px] text-gray-600 dark:text-gray-400 mt-0.5 leading-snug", children: item.description })) : null] })] }, (_a = item.id) !== null && _a !== void 0 ? _a : "".concat(item.title, "-").concat(rowIndex)));
5456
+ }) }), footerHint ? (jsx("p", { className: "shrink-0 text-center text-[11px] text-gray-500 dark:text-gray-500 px-4 py-2.5 border-t border-black/[0.06] dark:border-white/[0.08]", children: footerHint })) : null] })] }));
5457
+ };
5404
5458
  var DEFAULT_TRANSLATIONS$3 = {
5405
5459
  businessName: "Tu Negocio",
5406
5460
  businessInitials: "TN",
@@ -5408,10 +5462,12 @@ var DEFAULT_TRANSLATIONS$3 = {
5408
5462
  imageAlt: "Vista previa de mensaje WhatsApp",
5409
5463
  viewMore: "ver mas",
5410
5464
  viewLess: "ver menos",
5465
+ listCloseAriaLabel: "Cerrar",
5466
+ listSelectHintDefault: "Pulsa una opción para elegir",
5411
5467
  };
5412
5468
  /**
5413
5469
  * WhatsAppPreview - Displays a realistic WhatsApp message bubble preview.
5414
- * Supports image, caption, CTA buttons, and compact/full variants.
5470
+ * Supports image, caption, acciones de plantilla (`previewAction` o CTA legacy), y variantes compact/full.
5415
5471
  *
5416
5472
  * @component
5417
5473
  * @example
@@ -5425,8 +5481,13 @@ var DEFAULT_TRANSLATIONS$3 = {
5425
5481
  * ```
5426
5482
  */
5427
5483
  var WhatsAppPreview = function (_a) {
5428
- 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;
5484
+ 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, previewAction = _a.previewAction, _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, onListItemPick = _a.onListItemPick;
5429
5485
  var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$3), translations);
5486
+ var _j = useState(null), openListSheetIndex = _j[0], setOpenListSheetIndex = _j[1];
5487
+ var closeListSheet = useCallback(function () {
5488
+ setOpenListSheetIndex(null);
5489
+ }, []);
5490
+ var resolvedActions = useMemo(function () { return resolvePreviewActions(previewAction, ctaType, ctaLabel, ctaValue); }, [previewAction, ctaType, ctaLabel, ctaValue]);
5430
5491
  var shouldTruncate = maxCaptionLength && caption.length > maxCaptionLength;
5431
5492
  var displayCaption = campaignView
5432
5493
  ? caption
@@ -5443,21 +5504,44 @@ var WhatsAppPreview = function (_a) {
5443
5504
  : "max-h-64";
5444
5505
  var imageAspectRatio = campaignView ? "1/1" : undefined;
5445
5506
  var bubblePadding = variant === "compact" ? "p-2.5" : "p-3";
5446
- 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
5507
+ var bubbleOutdent = variant === "compact" ? "-mx-2.5" : "-mx-3";
5508
+ var listSheetAction = openListSheetIndex !== null
5509
+ ? resolvedActions[openListSheetIndex]
5510
+ : undefined;
5511
+ var isListSheetOpen = (listSheetAction === null || listSheetAction === void 0 ? void 0 : listSheetAction.type) === "list" &&
5512
+ Array.isArray(listSheetAction.listItems) &&
5513
+ listSheetAction.listItems.length > 0;
5514
+ return (jsxs("div", { className: "relative 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
5447
5515
  ? { aspectRatio: imageAspectRatio }
5448
5516
  : 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: {
5449
- maxHeight: showFullCaption && variant === "compact"
5450
- ? "150px"
5451
- : "none",
5452
- }, children: jsx("span", { className: "whitespace-pre-wrap font-sans break-words block text-left", children: displayCaption }) }), shouldTruncate &&
5453
- onToggleCaption &&
5454
- variant === "compact" && (jsx("button", { type: "button", onClick: function (e) {
5517
+ maxHeight: showFullCaption && variant === "compact" ? "150px" : "none",
5518
+ }, children: jsx("span", { className: "whitespace-pre-wrap font-sans break-words block text-left", children: displayCaption }) }), shouldTruncate && onToggleCaption && variant === "compact" && (jsx("button", { type: "button", onClick: function (e) {
5455
5519
  e.stopPropagation();
5456
5520
  onToggleCaption();
5457
- }, 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 }) })), jsxs("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, {
5458
- hour: "2-digit",
5459
- minute: "2-digit",
5460
- }) }), jsx(IconComponent, { "aria-hidden": true, icon: "solar:check-read-linear", size: "sm", className: "shrink-0 text-gray-600 dark:text-gray-400" })] })] }) }) })] }));
5521
+ }, 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 })), jsxs("div", { className: "flex items-center justify-end gap-1 mt-1", children: [jsx("span", { className: "text-[10px] text-gray-600 dark:text-gray-400 tabular-nums", children: new Date().toLocaleTimeString(timeLocale, {
5522
+ hour: "2-digit",
5523
+ minute: "2-digit",
5524
+ }) }), jsx(IconComponent, { "aria-hidden": true, icon: "solar:check-read-linear", size: "sm", className: "shrink-0 text-gray-600 dark:text-gray-400" })] })] }), resolvedActions.length > 0 && (jsx("div", { className: "".concat(bubbleOutdent, " mt-1 flex flex-col border-t border-black/[0.08] dark:border-white/[0.12]"), children: resolvedActions.map(function (action, index) {
5525
+ var _a;
5526
+ var emphasis = (_a = action.emphasis) !== null && _a !== void 0 ? _a : "primary";
5527
+ var toneClass = action.type === "list"
5528
+ ? ACTION_PRIMARY_CLASS
5529
+ : emphasis === "muted"
5530
+ ? ACTION_MUTED_CLASS
5531
+ : ACTION_PRIMARY_CLASS;
5532
+ return (jsxs("button", { type: "button", className: "w-full flex flex-row items-center justify-center gap-2.5 py-2.5 px-3 text-sm font-medium leading-5 bg-transparent ".concat(toneClass, " border-t border-black/[0.06] dark:border-white/[0.08] first:border-t-0 hover:bg-black/[0.03] dark:hover:bg-white/[0.04] transition-colors"), onClick: function (e) {
5533
+ if (action.type === "list") {
5534
+ e.stopPropagation();
5535
+ setOpenListSheetIndex(index);
5536
+ }
5537
+ }, children: [jsx("span", { className: "inline-flex h-5 w-5 shrink-0 items-center justify-center [&>span]:flex [&>span]:size-full [&>span]:items-center [&>span]:justify-center", "aria-hidden": true, children: jsx(IconComponent, { icon: actionIconForType(action.type), className: "text-current [&_svg]:block", size: "sm" }) }), jsx("span", { className: "min-w-0 text-center leading-5", children: action.title })] }, "".concat(action.type, "-").concat(action.title, "-").concat(index)));
5538
+ }) }))] }) }) }), isListSheetOpen && listSheetAction && openListSheetIndex !== null ? (jsx(ListMessageSheet, { action: listSheetAction, onClose: closeListSheet, onPick: function (item) {
5539
+ onListItemPick === null || onListItemPick === void 0 ? void 0 : onListItemPick({
5540
+ actionIndex: openListSheetIndex,
5541
+ item: item,
5542
+ });
5543
+ closeListSheet();
5544
+ }, translations: t })) : null] }));
5461
5545
  };
5462
5546
 
5463
5547
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,aAAa,CAAC;AAIrB,OAAO,KAAK,EACX,kBAAkB,EAElB,MAAM,cAAc,CAAC;AAgBtB;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA0YtD,CAAC"}
1
+ {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,aAAa,CAAC;AAIrB,OAAO,KAAK,EACX,kBAAkB,EAElB,MAAM,cAAc,CAAC;AAgBtB;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAkZtD,CAAC"}
@@ -29,7 +29,11 @@ export interface MenuComponentProps {
29
29
  name: string;
30
30
  role: string;
31
31
  };
32
- helpButton: {
32
+ /**
33
+ * Botón de ayuda al pie del sidebar. Si se omite, o si `title` / `redirect` están vacíos
34
+ * tras quitar espacios, no se renderiza la sección (útil con controles tipo objeto en Storybook).
35
+ */
36
+ helpButton?: {
33
37
  title: string;
34
38
  redirect: string;
35
39
  };
@@ -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;IACzB,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2EAA2E;IAC3E,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC7B,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"}
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;IACzB,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2EAA2E;IAC3E,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC7B,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;;;OAGG;IACH,UAAU,CAAC,EAAE;QACZ,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"}
@@ -2,7 +2,7 @@ import type React from "react";
2
2
  import type { WhatsAppPreviewProps } from "./WhatsAppPreview.types";
3
3
  /**
4
4
  * WhatsAppPreview - Displays a realistic WhatsApp message bubble preview.
5
- * Supports image, caption, CTA buttons, and compact/full variants.
5
+ * Supports image, caption, acciones de plantilla (`previewAction` o CTA legacy), y variantes compact/full.
6
6
  *
7
7
  * @component
8
8
  * @example
@@ -1 +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,CAmK1D,CAAC"}
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,EAGX,oBAAoB,EAEpB,MAAM,yBAAyB,CAAC;AA6JjC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAwN1D,CAAC"}
@@ -1,3 +1,43 @@
1
+ /** Opcion dentro de una accion tipo lista (list message / selector). */
2
+ export interface WhatsAppPreviewListItem {
3
+ id?: string;
4
+ title: string;
5
+ description?: string;
6
+ /** Emoji o caracter visible a la izquierda (ej. señal, TV). */
7
+ emoji?: string;
8
+ /** Icono Iconify si no hay `emoji` */
9
+ icon?: string;
10
+ }
11
+ /** Accion de plantilla (CTA / respuesta rapida / lista) para el preview; el consumidor mapea el JSON del backend a esta forma. */
12
+ export interface WhatsAppPreviewAction {
13
+ /**
14
+ * `url` — enlace externo (icono tipo “abrir enlace”).
15
+ * `quick_reply` — respuesta rapida (icono tipo respuesta).
16
+ * `phone` — llamada.
17
+ * `list` — abre hoja inferior con opciones (list message).
18
+ */
19
+ type: "url" | "phone" | "quick_reply" | "list";
20
+ /**
21
+ * Texto del boton en la burbuja.
22
+ * Para `list`, suele ser el disparador (ej. "Selecciona").
23
+ */
24
+ title: string;
25
+ /** URL si type es "url" (si falta, se usa `value`) */
26
+ url?: string;
27
+ /** Telefono si type es "phone"; para "url" puede usarse como URL alternativa */
28
+ value?: string;
29
+ /**
30
+ * Enfoque visual (como en WhatsApp: principal en verde marca, secundario en gris).
31
+ * Por defecto `primary`. No aplica a `list` (siempre estilo lista verde).
32
+ */
33
+ emphasis?: "primary" | "muted";
34
+ /** Si type es `list`: titulo en la hoja (por defecto el mismo `title` del boton). */
35
+ listHeaderTitle?: string;
36
+ /** Si type es `list`: filas de la hoja (obligatorio al menos uno). */
37
+ listItems?: WhatsAppPreviewListItem[];
38
+ /** Texto pie de la hoja (ej. instruccion al usuario). */
39
+ listFooterHint?: string;
40
+ }
1
41
  export interface WhatsAppPreviewTranslations {
2
42
  /** Business name displayed in header */
3
43
  businessName?: string;
@@ -11,6 +51,10 @@ export interface WhatsAppPreviewTranslations {
11
51
  viewMore?: string;
12
52
  /** "View less" text for caption truncation */
13
53
  viewLess?: string;
54
+ /** aria-label del boton cerrar en la hoja de lista */
55
+ listCloseAriaLabel?: string;
56
+ /** Pie de la hoja de lista si no se pasa por accion */
57
+ listSelectHintDefault?: string;
14
58
  }
15
59
  export interface WhatsAppPreviewProps {
16
60
  /** URL of the image to display */
@@ -33,6 +77,16 @@ export interface WhatsAppPreviewProps {
33
77
  ctaLabel?: string;
34
78
  /** CTA button value (phone number or URL) */
35
79
  ctaValue?: string;
80
+ /**
81
+ * Lista de acciones (botones) tipo plantilla WhatsApp.
82
+ * Si tiene al menos un elemento con `title` no vacio, tiene prioridad sobre `ctaType` / `ctaLabel` / `ctaValue`.
83
+ */
84
+ previewAction?: WhatsAppPreviewAction[];
85
+ /** Tras elegir una fila en una accion `list`, el consumidor puede reaccionar (p. ej. analytics). */
86
+ onListItemPick?: (detail: {
87
+ actionIndex: number;
88
+ item: WhatsAppPreviewListItem;
89
+ }) => void;
36
90
  /** If true, shows square image and more text lines (for campaigns) */
37
91
  campaignView?: boolean;
38
92
  /** Translations for i18n support */
@@ -1 +1 @@
1
- {"version":3,"file":"WhatsAppPreview.types.d.ts","sourceRoot":"","sources":["../../../../src/components/whatsapp-preview/WhatsAppPreview.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,2BAA2B;IAC3C,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACpC,kCAAkC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC7B,8CAA8C;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,+CAA+C;IAC/C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,iCAAiC;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oCAAoC;IACpC,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"WhatsAppPreview.types.d.ts","sourceRoot":"","sources":["../../../../src/components/whatsapp-preview/WhatsAppPreview.types.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,WAAW,uBAAuB;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,kIAAkI;AAClI,MAAM,WAAW,qBAAqB;IACrC;;;;;OAKG;IACH,IAAI,EAAE,KAAK,GAAG,OAAO,GAAG,aAAa,GAAG,MAAM,CAAC;IAC/C;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC/B,qFAAqF;IACrF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sEAAsE;IACtE,SAAS,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACtC,yDAAyD;IACzD,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,2BAA2B;IAC3C,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,uDAAuD;IACvD,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACpC,kCAAkC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC7B,8CAA8C;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,+CAA+C;IAC/C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,iCAAiC;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACxC,oGAAoG;IACpG,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE;QACzB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,uBAAuB,CAAC;KAC9B,KAAK,IAAI,CAAC;IACX,sEAAsE;IACtE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oCAAoC;IACpC,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -1,3 +1,3 @@
1
1
  export { WhatsAppPreview } from "./WhatsAppPreview.js";
2
- export type { WhatsAppPreviewProps, WhatsAppPreviewTranslations, } from "./WhatsAppPreview.types.js";
2
+ export type { WhatsAppPreviewAction, WhatsAppPreviewListItem, WhatsAppPreviewProps, WhatsAppPreviewTranslations, } from "./WhatsAppPreview.types.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/whatsapp-preview/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,YAAY,EACX,oBAAoB,EACpB,2BAA2B,GAC3B,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/whatsapp-preview/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,YAAY,EACX,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,2BAA2B,GAC3B,MAAM,4BAA4B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beweco/aurora-ui",
3
- "version": "0.6.11",
3
+ "version": "0.6.16",
4
4
  "description": "Bewe Aurora UI Component Library",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",
@@ -12,6 +12,9 @@
12
12
  "sideEffects": false,
13
13
  "author": "Bewe",
14
14
  "license": "MIT",
15
+ "engines": {
16
+ "node": ">=24.0.0"
17
+ },
15
18
  "publishConfig": {
16
19
  "access": "restricted"
17
20
  },