@beweco/aurora-ui 0.6.11 → 0.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/css/styles.css +1 -1
- package/dist/index.cjs.js +92 -13
- package/dist/index.esm.js +92 -13
- package/dist/types/components/whatsapp-preview/WhatsAppPreview.d.ts +1 -1
- package/dist/types/components/whatsapp-preview/WhatsAppPreview.d.ts.map +1 -1
- package/dist/types/components/whatsapp-preview/WhatsAppPreview.types.d.ts +54 -0
- package/dist/types/components/whatsapp-preview/WhatsAppPreview.types.d.ts.map +1 -1
- package/dist/types/components/whatsapp-preview/index.d.ts +1 -1
- package/dist/types/components/whatsapp-preview/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -5400,6 +5400,55 @@ var UploadFile = function (_a) {
|
|
|
5400
5400
|
};
|
|
5401
5401
|
UploadFile.displayName = "UploadFile";
|
|
5402
5402
|
|
|
5403
|
+
function resolvePreviewActions(previewAction, ctaType, ctaLabel, ctaValue) {
|
|
5404
|
+
var _a;
|
|
5405
|
+
var fromProp = (_a = previewAction === null || previewAction === void 0 ? void 0 : previewAction.filter(function (a) {
|
|
5406
|
+
var _a;
|
|
5407
|
+
if (!((_a = a.title) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
5408
|
+
return false;
|
|
5409
|
+
}
|
|
5410
|
+
if (a.type === "list") {
|
|
5411
|
+
return Array.isArray(a.listItems) && a.listItems.length > 0;
|
|
5412
|
+
}
|
|
5413
|
+
return true;
|
|
5414
|
+
})) !== null && _a !== void 0 ? _a : [];
|
|
5415
|
+
if (fromProp.length > 0) {
|
|
5416
|
+
return fromProp;
|
|
5417
|
+
}
|
|
5418
|
+
if (ctaType && ctaLabel && ctaValue) {
|
|
5419
|
+
var isPhone = ctaType === "CALL_NOW" || ctaType.toLowerCase() === "phone";
|
|
5420
|
+
return [
|
|
5421
|
+
__assign({ type: isPhone ? "phone" : "url", title: ctaLabel }, (isPhone ? { value: ctaValue } : { url: ctaValue, value: ctaValue })),
|
|
5422
|
+
];
|
|
5423
|
+
}
|
|
5424
|
+
return [];
|
|
5425
|
+
}
|
|
5426
|
+
/** Verdes alineados con WhatsApp (claro / oscuro); icono hereda con `text-current` */
|
|
5427
|
+
var ACTION_PRIMARY_CLASS = "text-[#008069] dark:text-[#00A884]";
|
|
5428
|
+
var ACTION_MUTED_CLASS = "text-gray-600 dark:text-gray-400";
|
|
5429
|
+
function actionIconForType(type) {
|
|
5430
|
+
switch (type) {
|
|
5431
|
+
case "phone":
|
|
5432
|
+
return "solar:phone-bold";
|
|
5433
|
+
case "quick_reply":
|
|
5434
|
+
return "solar:reply-bold";
|
|
5435
|
+
case "list":
|
|
5436
|
+
return "solar:list-bold";
|
|
5437
|
+
default:
|
|
5438
|
+
return "solar:square-share-line-bold";
|
|
5439
|
+
}
|
|
5440
|
+
}
|
|
5441
|
+
var ListMessageSheet = function (_a) {
|
|
5442
|
+
var _b, _c, _d;
|
|
5443
|
+
var action = _a.action, onClose = _a.onClose, onPick = _a.onPick, translations = _a.translations;
|
|
5444
|
+
var items = (_b = action.listItems) !== null && _b !== void 0 ? _b : [];
|
|
5445
|
+
var headerTitle = (_c = action.listHeaderTitle) !== null && _c !== void 0 ? _c : action.title;
|
|
5446
|
+
var footerHint = (_d = action.listFooterHint) !== null && _d !== void 0 ? _d : translations.listSelectHintDefault;
|
|
5447
|
+
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) {
|
|
5448
|
+
var _a;
|
|
5449
|
+
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)));
|
|
5450
|
+
}) }), 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] })] }));
|
|
5451
|
+
};
|
|
5403
5452
|
var DEFAULT_TRANSLATIONS$3 = {
|
|
5404
5453
|
businessName: "Tu Negocio",
|
|
5405
5454
|
businessInitials: "TN",
|
|
@@ -5407,10 +5456,12 @@ var DEFAULT_TRANSLATIONS$3 = {
|
|
|
5407
5456
|
imageAlt: "Vista previa de mensaje WhatsApp",
|
|
5408
5457
|
viewMore: "ver mas",
|
|
5409
5458
|
viewLess: "ver menos",
|
|
5459
|
+
listCloseAriaLabel: "Cerrar",
|
|
5460
|
+
listSelectHintDefault: "Pulsa una opción para elegir",
|
|
5410
5461
|
};
|
|
5411
5462
|
/**
|
|
5412
5463
|
* WhatsAppPreview - Displays a realistic WhatsApp message bubble preview.
|
|
5413
|
-
* Supports image, caption, CTA
|
|
5464
|
+
* Supports image, caption, acciones de plantilla (`previewAction` o CTA legacy), y variantes compact/full.
|
|
5414
5465
|
*
|
|
5415
5466
|
* @component
|
|
5416
5467
|
* @example
|
|
@@ -5424,8 +5475,13 @@ var DEFAULT_TRANSLATIONS$3 = {
|
|
|
5424
5475
|
* ```
|
|
5425
5476
|
*/
|
|
5426
5477
|
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;
|
|
5478
|
+
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
5479
|
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$3), translations);
|
|
5480
|
+
var _j = React.useState(null), openListSheetIndex = _j[0], setOpenListSheetIndex = _j[1];
|
|
5481
|
+
var closeListSheet = React.useCallback(function () {
|
|
5482
|
+
setOpenListSheetIndex(null);
|
|
5483
|
+
}, []);
|
|
5484
|
+
var resolvedActions = React.useMemo(function () { return resolvePreviewActions(previewAction, ctaType, ctaLabel, ctaValue); }, [previewAction, ctaType, ctaLabel, ctaValue]);
|
|
5429
5485
|
var shouldTruncate = maxCaptionLength && caption.length > maxCaptionLength;
|
|
5430
5486
|
var displayCaption = campaignView
|
|
5431
5487
|
? caption
|
|
@@ -5442,21 +5498,44 @@ var WhatsAppPreview = function (_a) {
|
|
|
5442
5498
|
: "max-h-64";
|
|
5443
5499
|
var imageAspectRatio = campaignView ? "1/1" : undefined;
|
|
5444
5500
|
var bubblePadding = variant === "compact" ? "p-2.5" : "p-3";
|
|
5445
|
-
|
|
5501
|
+
var bubbleOutdent = variant === "compact" ? "-mx-2.5" : "-mx-3";
|
|
5502
|
+
var listSheetAction = openListSheetIndex !== null
|
|
5503
|
+
? resolvedActions[openListSheetIndex]
|
|
5504
|
+
: undefined;
|
|
5505
|
+
var isListSheetOpen = (listSheetAction === null || listSheetAction === void 0 ? void 0 : listSheetAction.type) === "list" &&
|
|
5506
|
+
Array.isArray(listSheetAction.listItems) &&
|
|
5507
|
+
listSheetAction.listItems.length > 0;
|
|
5508
|
+
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
5509
|
? { aspectRatio: imageAspectRatio }
|
|
5447
5510
|
: 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
|
-
|
|
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) {
|
|
5511
|
+
maxHeight: showFullCaption && variant === "compact" ? "150px" : "none",
|
|
5512
|
+
}, 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
5513
|
e.stopPropagation();
|
|
5455
5514
|
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 }))
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5515
|
+
}, 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, {
|
|
5516
|
+
hour: "2-digit",
|
|
5517
|
+
minute: "2-digit",
|
|
5518
|
+
}) }), 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) {
|
|
5519
|
+
var _a;
|
|
5520
|
+
var emphasis = (_a = action.emphasis) !== null && _a !== void 0 ? _a : "primary";
|
|
5521
|
+
var toneClass = action.type === "list"
|
|
5522
|
+
? ACTION_PRIMARY_CLASS
|
|
5523
|
+
: emphasis === "muted"
|
|
5524
|
+
? ACTION_MUTED_CLASS
|
|
5525
|
+
: ACTION_PRIMARY_CLASS;
|
|
5526
|
+
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) {
|
|
5527
|
+
if (action.type === "list") {
|
|
5528
|
+
e.stopPropagation();
|
|
5529
|
+
setOpenListSheetIndex(index);
|
|
5530
|
+
}
|
|
5531
|
+
}, 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)));
|
|
5532
|
+
}) }))] }) }) }), isListSheetOpen && listSheetAction && openListSheetIndex !== null ? (jsxRuntime.jsx(ListMessageSheet, { action: listSheetAction, onClose: closeListSheet, onPick: function (item) {
|
|
5533
|
+
onListItemPick === null || onListItemPick === void 0 ? void 0 : onListItemPick({
|
|
5534
|
+
actionIndex: openListSheetIndex,
|
|
5535
|
+
item: item,
|
|
5536
|
+
});
|
|
5537
|
+
closeListSheet();
|
|
5538
|
+
}, translations: t })) : null] }));
|
|
5460
5539
|
};
|
|
5461
5540
|
|
|
5462
5541
|
/**
|
package/dist/index.esm.js
CHANGED
|
@@ -5401,6 +5401,55 @@ var UploadFile = function (_a) {
|
|
|
5401
5401
|
};
|
|
5402
5402
|
UploadFile.displayName = "UploadFile";
|
|
5403
5403
|
|
|
5404
|
+
function resolvePreviewActions(previewAction, ctaType, ctaLabel, ctaValue) {
|
|
5405
|
+
var _a;
|
|
5406
|
+
var fromProp = (_a = previewAction === null || previewAction === void 0 ? void 0 : previewAction.filter(function (a) {
|
|
5407
|
+
var _a;
|
|
5408
|
+
if (!((_a = a.title) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
5409
|
+
return false;
|
|
5410
|
+
}
|
|
5411
|
+
if (a.type === "list") {
|
|
5412
|
+
return Array.isArray(a.listItems) && a.listItems.length > 0;
|
|
5413
|
+
}
|
|
5414
|
+
return true;
|
|
5415
|
+
})) !== null && _a !== void 0 ? _a : [];
|
|
5416
|
+
if (fromProp.length > 0) {
|
|
5417
|
+
return fromProp;
|
|
5418
|
+
}
|
|
5419
|
+
if (ctaType && ctaLabel && ctaValue) {
|
|
5420
|
+
var isPhone = ctaType === "CALL_NOW" || ctaType.toLowerCase() === "phone";
|
|
5421
|
+
return [
|
|
5422
|
+
__assign({ type: isPhone ? "phone" : "url", title: ctaLabel }, (isPhone ? { value: ctaValue } : { url: ctaValue, value: ctaValue })),
|
|
5423
|
+
];
|
|
5424
|
+
}
|
|
5425
|
+
return [];
|
|
5426
|
+
}
|
|
5427
|
+
/** Verdes alineados con WhatsApp (claro / oscuro); icono hereda con `text-current` */
|
|
5428
|
+
var ACTION_PRIMARY_CLASS = "text-[#008069] dark:text-[#00A884]";
|
|
5429
|
+
var ACTION_MUTED_CLASS = "text-gray-600 dark:text-gray-400";
|
|
5430
|
+
function actionIconForType(type) {
|
|
5431
|
+
switch (type) {
|
|
5432
|
+
case "phone":
|
|
5433
|
+
return "solar:phone-bold";
|
|
5434
|
+
case "quick_reply":
|
|
5435
|
+
return "solar:reply-bold";
|
|
5436
|
+
case "list":
|
|
5437
|
+
return "solar:list-bold";
|
|
5438
|
+
default:
|
|
5439
|
+
return "solar:square-share-line-bold";
|
|
5440
|
+
}
|
|
5441
|
+
}
|
|
5442
|
+
var ListMessageSheet = function (_a) {
|
|
5443
|
+
var _b, _c, _d;
|
|
5444
|
+
var action = _a.action, onClose = _a.onClose, onPick = _a.onPick, translations = _a.translations;
|
|
5445
|
+
var items = (_b = action.listItems) !== null && _b !== void 0 ? _b : [];
|
|
5446
|
+
var headerTitle = (_c = action.listHeaderTitle) !== null && _c !== void 0 ? _c : action.title;
|
|
5447
|
+
var footerHint = (_d = action.listFooterHint) !== null && _d !== void 0 ? _d : translations.listSelectHintDefault;
|
|
5448
|
+
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) {
|
|
5449
|
+
var _a;
|
|
5450
|
+
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)));
|
|
5451
|
+
}) }), 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] })] }));
|
|
5452
|
+
};
|
|
5404
5453
|
var DEFAULT_TRANSLATIONS$3 = {
|
|
5405
5454
|
businessName: "Tu Negocio",
|
|
5406
5455
|
businessInitials: "TN",
|
|
@@ -5408,10 +5457,12 @@ var DEFAULT_TRANSLATIONS$3 = {
|
|
|
5408
5457
|
imageAlt: "Vista previa de mensaje WhatsApp",
|
|
5409
5458
|
viewMore: "ver mas",
|
|
5410
5459
|
viewLess: "ver menos",
|
|
5460
|
+
listCloseAriaLabel: "Cerrar",
|
|
5461
|
+
listSelectHintDefault: "Pulsa una opción para elegir",
|
|
5411
5462
|
};
|
|
5412
5463
|
/**
|
|
5413
5464
|
* WhatsAppPreview - Displays a realistic WhatsApp message bubble preview.
|
|
5414
|
-
* Supports image, caption, CTA
|
|
5465
|
+
* Supports image, caption, acciones de plantilla (`previewAction` o CTA legacy), y variantes compact/full.
|
|
5415
5466
|
*
|
|
5416
5467
|
* @component
|
|
5417
5468
|
* @example
|
|
@@ -5425,8 +5476,13 @@ var DEFAULT_TRANSLATIONS$3 = {
|
|
|
5425
5476
|
* ```
|
|
5426
5477
|
*/
|
|
5427
5478
|
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;
|
|
5479
|
+
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
5480
|
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$3), translations);
|
|
5481
|
+
var _j = useState(null), openListSheetIndex = _j[0], setOpenListSheetIndex = _j[1];
|
|
5482
|
+
var closeListSheet = useCallback(function () {
|
|
5483
|
+
setOpenListSheetIndex(null);
|
|
5484
|
+
}, []);
|
|
5485
|
+
var resolvedActions = useMemo(function () { return resolvePreviewActions(previewAction, ctaType, ctaLabel, ctaValue); }, [previewAction, ctaType, ctaLabel, ctaValue]);
|
|
5430
5486
|
var shouldTruncate = maxCaptionLength && caption.length > maxCaptionLength;
|
|
5431
5487
|
var displayCaption = campaignView
|
|
5432
5488
|
? caption
|
|
@@ -5443,21 +5499,44 @@ var WhatsAppPreview = function (_a) {
|
|
|
5443
5499
|
: "max-h-64";
|
|
5444
5500
|
var imageAspectRatio = campaignView ? "1/1" : undefined;
|
|
5445
5501
|
var bubblePadding = variant === "compact" ? "p-2.5" : "p-3";
|
|
5446
|
-
|
|
5502
|
+
var bubbleOutdent = variant === "compact" ? "-mx-2.5" : "-mx-3";
|
|
5503
|
+
var listSheetAction = openListSheetIndex !== null
|
|
5504
|
+
? resolvedActions[openListSheetIndex]
|
|
5505
|
+
: undefined;
|
|
5506
|
+
var isListSheetOpen = (listSheetAction === null || listSheetAction === void 0 ? void 0 : listSheetAction.type) === "list" &&
|
|
5507
|
+
Array.isArray(listSheetAction.listItems) &&
|
|
5508
|
+
listSheetAction.listItems.length > 0;
|
|
5509
|
+
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
5510
|
? { aspectRatio: imageAspectRatio }
|
|
5448
5511
|
: 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
|
-
|
|
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) {
|
|
5512
|
+
maxHeight: showFullCaption && variant === "compact" ? "150px" : "none",
|
|
5513
|
+
}, 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
5514
|
e.stopPropagation();
|
|
5456
5515
|
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 }))
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5516
|
+
}, 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, {
|
|
5517
|
+
hour: "2-digit",
|
|
5518
|
+
minute: "2-digit",
|
|
5519
|
+
}) }), 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) {
|
|
5520
|
+
var _a;
|
|
5521
|
+
var emphasis = (_a = action.emphasis) !== null && _a !== void 0 ? _a : "primary";
|
|
5522
|
+
var toneClass = action.type === "list"
|
|
5523
|
+
? ACTION_PRIMARY_CLASS
|
|
5524
|
+
: emphasis === "muted"
|
|
5525
|
+
? ACTION_MUTED_CLASS
|
|
5526
|
+
: ACTION_PRIMARY_CLASS;
|
|
5527
|
+
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) {
|
|
5528
|
+
if (action.type === "list") {
|
|
5529
|
+
e.stopPropagation();
|
|
5530
|
+
setOpenListSheetIndex(index);
|
|
5531
|
+
}
|
|
5532
|
+
}, 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)));
|
|
5533
|
+
}) }))] }) }) }), isListSheetOpen && listSheetAction && openListSheetIndex !== null ? (jsx(ListMessageSheet, { action: listSheetAction, onClose: closeListSheet, onPick: function (item) {
|
|
5534
|
+
onListItemPick === null || onListItemPick === void 0 ? void 0 : onListItemPick({
|
|
5535
|
+
actionIndex: openListSheetIndex,
|
|
5536
|
+
item: item,
|
|
5537
|
+
});
|
|
5538
|
+
closeListSheet();
|
|
5539
|
+
}, translations: t })) : null] }));
|
|
5461
5540
|
};
|
|
5462
5541
|
|
|
5463
5542
|
/**
|
|
@@ -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
|
|
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,
|
|
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;
|
|
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"}
|