@beweco/aurora-ui 0.1.23 → 0.1.25
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 +317 -17
- package/dist/index.esm.js +315 -19
- package/dist/types/components/content-carousel/ContentCarousel.d.ts +17 -0
- package/dist/types/components/content-carousel/ContentCarousel.d.ts.map +1 -0
- package/dist/types/components/content-carousel/ContentCarousel.types.d.ts +73 -0
- package/dist/types/components/content-carousel/ContentCarousel.types.d.ts.map +1 -0
- package/dist/types/components/content-carousel/index.d.ts +4 -0
- package/dist/types/components/content-carousel/index.d.ts.map +1 -0
- package/dist/types/components/content-carousel/variants/SocialMediaCarousel.d.ts +19 -0
- package/dist/types/components/content-carousel/variants/SocialMediaCarousel.d.ts.map +1 -0
- package/dist/types/components/content-carousel/variants/SocialMediaCarousel.types.d.ts +51 -0
- package/dist/types/components/content-carousel/variants/SocialMediaCarousel.types.d.ts.map +1 -0
- package/dist/types/components/content-carousel/variants/index.d.ts +3 -0
- package/dist/types/components/content-carousel/variants/index.d.ts.map +1 -0
- package/dist/types/components/social-media-bar/SocialMediaBar.d.ts +18 -0
- package/dist/types/components/social-media-bar/SocialMediaBar.d.ts.map +1 -0
- package/dist/types/components/social-media-bar/SocialMediaBar.types.d.ts +53 -0
- package/dist/types/components/social-media-bar/SocialMediaBar.types.d.ts.map +1 -0
- package/dist/types/components/social-media-bar/index.d.ts +3 -0
- package/dist/types/components/social-media-bar/index.d.ts.map +1 -0
- package/dist/types/components/social-media-preview/SocialMediaPreview.d.ts +19 -0
- package/dist/types/components/social-media-preview/SocialMediaPreview.d.ts.map +1 -0
- package/dist/types/components/social-media-preview/SocialMediaPreview.types.d.ts +46 -0
- package/dist/types/components/social-media-preview/SocialMediaPreview.types.d.ts.map +1 -0
- package/dist/types/components/social-media-preview/index.d.ts +3 -0
- package/dist/types/components/social-media-preview/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -177,7 +177,7 @@ var Input = function (_a) {
|
|
|
177
177
|
} })));
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
-
var defaultTranslations$
|
|
180
|
+
var defaultTranslations$d = {
|
|
181
181
|
addHolidayTitle: "Add holiday",
|
|
182
182
|
dayOption: "Day",
|
|
183
183
|
dateRangeOption: "Date range",
|
|
@@ -201,7 +201,7 @@ var INITIAL_HOLIDAY_STATE = {
|
|
|
201
201
|
*/
|
|
202
202
|
var AddHolidayForm = function (_a) {
|
|
203
203
|
var onAddHoliday = _a.onAddHoliday, translations = _a.translations, className = _a.className, radioGroupProps = _a.radioGroupProps, dateRangePickerProps = _a.dateRangePickerProps, buttonProps = _a.buttonProps;
|
|
204
|
-
var t = __assign(__assign({}, defaultTranslations$
|
|
204
|
+
var t = __assign(__assign({}, defaultTranslations$d), translations);
|
|
205
205
|
var _b = React.useState(INITIAL_HOLIDAY_STATE), newHoliday = _b[0], setNewHoliday = _b[1];
|
|
206
206
|
/**
|
|
207
207
|
* A boolean flag that determines if a date has been set.
|
|
@@ -271,7 +271,7 @@ var P = function (_a) {
|
|
|
271
271
|
return (jsxRuntime.jsx("p", __assign({ className: react.cn("text-tiny text-default-500 font-normal", className) }, props, { children: children })));
|
|
272
272
|
};
|
|
273
273
|
|
|
274
|
-
var defaultTranslations$
|
|
274
|
+
var defaultTranslations$c = {
|
|
275
275
|
title: "Analytics",
|
|
276
276
|
description: "Monthly growth of your metrics during the selected period",
|
|
277
277
|
viewDetails: "View Details",
|
|
@@ -325,7 +325,7 @@ var formatMonth = function (month) {
|
|
|
325
325
|
var AnalyticsCard = function (_a) {
|
|
326
326
|
var _b, _c;
|
|
327
327
|
var data = _a.data, _d = _a.showTimePeriods, showTimePeriods = _d === void 0 ? true : _d, _e = _a.showDropdownMenu, showDropdownMenu = _e === void 0 ? true : _e, _f = _a.showMetricCards, showMetricCards = _f === void 0 ? true : _f, onChartChange = _a.onChartChange, onMenuAction = _a.onMenuAction, onTimePeriodChange = _a.onTimePeriodChange, _g = _a.translations, translations = _g === void 0 ? {} : _g, props = __rest(_a, ["data", "showTimePeriods", "showDropdownMenu", "showMetricCards", "onChartChange", "onMenuAction", "onTimePeriodChange", "translations"]);
|
|
328
|
-
var t = __assign(__assign({}, defaultTranslations$
|
|
328
|
+
var t = __assign(__assign({}, defaultTranslations$c), translations);
|
|
329
329
|
var _h = React.useState((_c = (_b = data[0]) === null || _b === void 0 ? void 0 : _b.key) !== null && _c !== void 0 ? _c : ""), activeChart = _h[0], setActiveChart = _h[1];
|
|
330
330
|
var activeChartData = React.useMemo(function () {
|
|
331
331
|
var _a;
|
|
@@ -989,8 +989,229 @@ var Chip = function (_a) {
|
|
|
989
989
|
return (jsxRuntime.jsx(react.Chip, __assign({}, props, { onClose: props.onClose, classNames: __assign({ base: colorClasses }, props.classNames) })));
|
|
990
990
|
};
|
|
991
991
|
|
|
992
|
+
// Default translations in Spanish
|
|
993
|
+
var defaultTranslations$b = {
|
|
994
|
+
emptyStateMessage: "No hay contenido disponible",
|
|
995
|
+
emptyStateButtonText: "Agregar contenido",
|
|
996
|
+
previousButtonLabel: "Anterior",
|
|
997
|
+
nextButtonLabel: "Siguiente",
|
|
998
|
+
editButtonLabel: "Editar",
|
|
999
|
+
deleteButtonLabel: "Eliminar",
|
|
1000
|
+
publishButtonLabel: "Publicar",
|
|
1001
|
+
previewButtonLabel: "Ver vista previa",
|
|
1002
|
+
goToItemLabel: "Ir al item",
|
|
1003
|
+
};
|
|
1004
|
+
/**
|
|
1005
|
+
* ContentCarousel - Generic 3D carousel component
|
|
1006
|
+
*
|
|
1007
|
+
* @component
|
|
1008
|
+
* @example
|
|
1009
|
+
* ```tsx
|
|
1010
|
+
* <ContentCarousel
|
|
1011
|
+
* items={items}
|
|
1012
|
+
* onItemClick={handleItemClick}
|
|
1013
|
+
* renderFooter={({ item }) => <div>Footer content</div>}
|
|
1014
|
+
* />
|
|
1015
|
+
* ```
|
|
1016
|
+
*/
|
|
1017
|
+
var ContentCarousel = function (_a) {
|
|
1018
|
+
var items = _a.items, onItemClick = _a.onItemClick, _b = _a.className, className = _b === void 0 ? "" : _b, _c = _a.emptyStateRedirectPath, emptyStateRedirectPath = _c === void 0 ? "" : _c, _d = _a.translations, translations = _d === void 0 ? {} : _d, renderFooter = _a.renderFooter, renderHeader = _a.renderHeader, renderBody = _a.renderBody;
|
|
1019
|
+
var t = __assign(__assign({}, defaultTranslations$b), translations);
|
|
1020
|
+
var _e = React.useState(items.length >= 3 ? 1 : 0), activeIndex = _e[0], setActiveIndex = _e[1];
|
|
1021
|
+
// Reset to show 3 images when items change
|
|
1022
|
+
React.useEffect(function () {
|
|
1023
|
+
setActiveIndex(items.length >= 3 ? 1 : 0);
|
|
1024
|
+
}, [items.length]);
|
|
1025
|
+
var handleNext = React.useCallback(function () {
|
|
1026
|
+
setActiveIndex(function (prev) { return Math.min(prev + 1, items.length - 1); });
|
|
1027
|
+
}, [items.length]);
|
|
1028
|
+
var handlePrev = React.useCallback(function () {
|
|
1029
|
+
setActiveIndex(function (prev) { return Math.max(prev - 1, 0); });
|
|
1030
|
+
}, []);
|
|
1031
|
+
// Get position of card relative to active index
|
|
1032
|
+
var getPosition = function (index) {
|
|
1033
|
+
if (index === activeIndex) {
|
|
1034
|
+
return "center";
|
|
1035
|
+
}
|
|
1036
|
+
if (index === activeIndex - 1) {
|
|
1037
|
+
return "left";
|
|
1038
|
+
}
|
|
1039
|
+
if (index === activeIndex + 1) {
|
|
1040
|
+
return "right";
|
|
1041
|
+
}
|
|
1042
|
+
return "hidden";
|
|
1043
|
+
};
|
|
1044
|
+
var handleItemClick = React.useCallback(function (item) {
|
|
1045
|
+
if (onItemClick) {
|
|
1046
|
+
onItemClick(item);
|
|
1047
|
+
}
|
|
1048
|
+
}, [onItemClick]);
|
|
1049
|
+
// Empty state when no items
|
|
1050
|
+
if (items.length === 0) {
|
|
1051
|
+
return (jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center py-16 px-6 gap-6 ".concat(className), children: [jsxRuntime.jsx("p", { className: "text-default-500 text-center", children: t.emptyStateMessage }), emptyStateRedirectPath && (jsxRuntime.jsx(react.Button, { color: "primary", variant: "solid", size: "md", onPress: function () {
|
|
1052
|
+
if (typeof window !== "undefined") {
|
|
1053
|
+
window.location.href = emptyStateRedirectPath;
|
|
1054
|
+
}
|
|
1055
|
+
}, startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:add-circle-bold", className: "w-5 h-5" }), children: t.emptyStateButtonText }))] }));
|
|
1056
|
+
}
|
|
1057
|
+
return (jsxRuntime.jsx("div", { className: "relative w-full ".concat(className), children: jsxRuntime.jsxs("div", { className: "relative w-full pt-4 pb-8", children: [jsxRuntime.jsxs("div", { className: "relative h-[450px] flex items-center justify-center overflow-hidden", children: [items.length > 1 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 z-20 ml-4", children: jsxRuntime.jsx(react.Button, { isIconOnly: true, variant: "bordered", onPress: handlePrev, isDisabled: activeIndex === 0, className: "rounded-full bg-white/95 dark:bg-gray-800/95 backdrop-blur-md border-gray-200 dark:border-gray-700 shadow-xl hover:bg-white dark:hover:bg-gray-800 hover:border-gray-300 dark:hover:border-gray-600 hover:scale-110 hover:-translate-x-1 disabled:opacity-20 disabled:hover:scale-100 disabled:hover:translate-x-0 transition-all duration-300 w-12 h-12", "aria-label": t.previousButtonLabel, children: jsxRuntime.jsx(IconComponent, { icon: "solar:alt-arrow-left-outline", className: "w-6 h-6" }) }) }), jsxRuntime.jsx("div", { className: "absolute right-0 top-1/2 -translate-y-1/2 z-20 mr-4", children: jsxRuntime.jsx(react.Button, { isIconOnly: true, variant: "bordered", onPress: handleNext, isDisabled: activeIndex === items.length - 1, className: "rounded-full bg-white/95 dark:bg-gray-800/95 backdrop-blur-md border-gray-200 dark:border-gray-700 shadow-xl hover:bg-white dark:hover:bg-gray-800 hover:border-gray-300 dark:hover:border-gray-600 hover:scale-110 hover:translate-x-1 disabled:opacity-20 disabled:hover:scale-100 disabled:hover:translate-x-0 transition-all duration-300 w-12 h-12", "aria-label": t.nextButtonLabel, children: jsxRuntime.jsx(IconComponent, { icon: "solar:alt-arrow-right-outline", className: "w-6 h-6" }) }) })] })), items.map(function (item, index) {
|
|
1058
|
+
var position = getPosition(index);
|
|
1059
|
+
if (position === "hidden") {
|
|
1060
|
+
return null;
|
|
1061
|
+
}
|
|
1062
|
+
return (jsxRuntime.jsx(CarouselItemComponent, { item: item, position: position, onClick: function () { return handleItemClick(item); }, translations: t, renderFooter: renderFooter, renderHeader: renderHeader, renderBody: renderBody }, item.id));
|
|
1063
|
+
})] }), items.length > 1 && (jsxRuntime.jsx("div", { className: "flex justify-center mt-4", children: jsxRuntime.jsx("div", { className: "flex justify-center gap-2", children: items.map(function (_, index) { return (jsxRuntime.jsx("button", { type: "button", onClick: function () { return setActiveIndex(index); }, className: "rounded-full transition-all duration-300 hover:scale-110 ".concat(index === activeIndex
|
|
1064
|
+
? "w-8 h-2 bg-gradient-to-r from-primary-500 to-primary-600 shadow-lg shadow-primary-500/50"
|
|
1065
|
+
: "w-2 h-2 bg-gray-300 dark:bg-gray-600 hover:bg-gray-400 dark:hover:bg-gray-500 hover:w-3"), "aria-label": "".concat(t.goToItemLabel, " ").concat(index + 1) }, index)); }) }) }))] }) }));
|
|
1066
|
+
};
|
|
1067
|
+
/**
|
|
1068
|
+
* Internal carousel item component
|
|
1069
|
+
* Renders a single card with customizable content
|
|
1070
|
+
* @internal
|
|
1071
|
+
*/
|
|
1072
|
+
function CarouselItemComponent(_a) {
|
|
1073
|
+
var item = _a.item, position = _a.position, onClick = _a.onClick, translations = _a.translations, renderFooter = _a.renderFooter, renderHeader = _a.renderHeader, renderBody = _a.renderBody;
|
|
1074
|
+
var _b = React.useState(false), isHovered = _b[0], setIsHovered = _b[1];
|
|
1075
|
+
var captionText = item.caption || item.title;
|
|
1076
|
+
// Get styles based on position
|
|
1077
|
+
var getPositionStyles = function () {
|
|
1078
|
+
var baseStyles = {
|
|
1079
|
+
minHeight: "400px",
|
|
1080
|
+
maxHeight: "400px",
|
|
1081
|
+
boxShadow: "0 10px 40px -5px rgba(0, 0, 0, 0.3), 0 8px 25px -8px rgba(0, 0, 0, 0.2)",
|
|
1082
|
+
};
|
|
1083
|
+
if (position === "center") {
|
|
1084
|
+
return __assign(__assign({}, baseStyles), { width: "500px", transform: "scale(1)", opacity: 1, zIndex: 10 });
|
|
1085
|
+
}
|
|
1086
|
+
if (position === "left") {
|
|
1087
|
+
return __assign(__assign({}, baseStyles), { width: "350px", transform: "translateX(-115%) scale(0.75)", opacity: 0.7, zIndex: 5 });
|
|
1088
|
+
}
|
|
1089
|
+
if (position === "right") {
|
|
1090
|
+
return __assign(__assign({}, baseStyles), { width: "350px", transform: "translateX(115%) scale(0.75)", opacity: 0.7, zIndex: 5 });
|
|
1091
|
+
}
|
|
1092
|
+
return baseStyles;
|
|
1093
|
+
};
|
|
1094
|
+
return (jsxRuntime.jsxs("div", { className: "absolute rounded-3xl shadow-lg transition-all duration-500 ease-in-out flex flex-col overflow-hidden", style: getPositionStyles(), onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, children: [item.imageUrl ? (jsxRuntime.jsx("div", { className: "absolute inset-0 bg-cover bg-center transition-all duration-500 ease-in-out ".concat(isHovered ? "scale-110 blur-sm" : "scale-100 blur-0"), style: {
|
|
1095
|
+
backgroundImage: "url(".concat(item.imageUrl, ")"),
|
|
1096
|
+
} })) : (jsxRuntime.jsx("div", { className: "absolute inset-0 transition-all duration-500 ease-in-out ".concat(isHovered ? "scale-110 blur-sm" : "scale-100 blur-0"), style: {
|
|
1097
|
+
background: item.gradient,
|
|
1098
|
+
} })), jsxRuntime.jsx("div", { className: "absolute inset-0 bg-gradient-to-b transition-all duration-500 ease-in-out ".concat(isHovered
|
|
1099
|
+
? "from-black/70 via-black/60 to-black/80"
|
|
1100
|
+
: "from-black/40 via-black/20 to-black/50") }), renderHeader && (jsxRuntime.jsx("div", { className: "absolute top-4 left-4 right-4 z-20", children: renderHeader({
|
|
1101
|
+
item: item,
|
|
1102
|
+
isHovered: isHovered,
|
|
1103
|
+
translations: translations,
|
|
1104
|
+
}) })), renderBody ? (jsxRuntime.jsx("div", { className: "relative w-full h-full z-10", children: renderBody(item, isHovered) })) : (jsxRuntime.jsxs("button", { type: "button", onClick: onClick, className: "relative w-full h-full cursor-pointer flex flex-col justify-between p-6 z-10", "aria-label": item.title, children: [jsxRuntime.jsx("div", { children: jsxRuntime.jsx("h3", { className: "text-white text-3xl font-semibold mb-2 text-left drop-shadow-lg", children: item.title }) }), jsxRuntime.jsx("div", { className: "space-y-3 overflow-hidden", children: jsxRuntime.jsx("p", { className: "text-white text-sm text-left drop-shadow-md transition-all duration-500 ease-in-out ".concat(!isHovered && "line-clamp-2"), children: captionText }) })] })), renderFooter && (function () {
|
|
1105
|
+
var footerContent = renderFooter({
|
|
1106
|
+
item: item,
|
|
1107
|
+
isHovered: isHovered,
|
|
1108
|
+
translations: translations,
|
|
1109
|
+
});
|
|
1110
|
+
// Only render if there's actual content
|
|
1111
|
+
if (footerContent) {
|
|
1112
|
+
return (jsxRuntime.jsx("div", { className: "absolute bottom-4 left-4 right-4 z-20", children: footerContent }));
|
|
1113
|
+
}
|
|
1114
|
+
return null;
|
|
1115
|
+
})()] }));
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
// Default translations in Spanish
|
|
1119
|
+
var defaultTranslations$a = {
|
|
1120
|
+
editButtonLabel: "Editar",
|
|
1121
|
+
deleteButtonLabel: "Eliminar",
|
|
1122
|
+
publishButtonLabel: "Publicar",
|
|
1123
|
+
previewButtonLabel: "Ver vista previa",
|
|
1124
|
+
instagramLabel: "Instagram",
|
|
1125
|
+
storyLabel: "Story",
|
|
1126
|
+
tiktokLabel: "TikTok",
|
|
1127
|
+
whatsappLabel: "WhatsApp",
|
|
1128
|
+
};
|
|
1129
|
+
/**
|
|
1130
|
+
* SocialMediaBar - Independent bar component for social media badges and actions
|
|
1131
|
+
*
|
|
1132
|
+
* @component
|
|
1133
|
+
* @example
|
|
1134
|
+
* ```tsx
|
|
1135
|
+
* <SocialMediaBar
|
|
1136
|
+
* platform="instagram-post"
|
|
1137
|
+
* onEdit={handleEdit}
|
|
1138
|
+
* onDelete={handleDelete}
|
|
1139
|
+
* onPublish={handlePublish}
|
|
1140
|
+
* />
|
|
1141
|
+
* ```
|
|
1142
|
+
*/
|
|
1143
|
+
var SocialMediaBar = function (_a) {
|
|
1144
|
+
var platform = _a.platform, _b = _a.badgeOnly, badgeOnly = _b === void 0 ? false : _b, _c = _a.showPreview, showPreview = _c === void 0 ? false : _c, onEdit = _a.onEdit, onDelete = _a.onDelete, onPublish = _a.onPublish, onPreview = _a.onPreview, _d = _a.actionsAlwaysVisible, actionsAlwaysVisible = _d === void 0 ? false : _d, _e = _a.isHovered, isHovered = _e === void 0 ? false : _e, _f = _a.className, className = _f === void 0 ? "" : _f, _g = _a.translations, translations = _g === void 0 ? {} : _g, customBadge = _a.customBadge, customActions = _a.customActions;
|
|
1145
|
+
var t = __assign(__assign({}, defaultTranslations$a), translations);
|
|
1146
|
+
// Determine visibility of actions
|
|
1147
|
+
var showActions = actionsAlwaysVisible || isHovered;
|
|
1148
|
+
return (jsxRuntime.jsxs("div", { className: "flex items-center justify-between ".concat(className), children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [customBadge || (jsxRuntime.jsxs("div", { className: "backdrop-blur-xl border border-white/30 rounded-full px-3 py-1.5 shadow-xl flex items-center gap-2", style: {
|
|
1149
|
+
background: "linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(200, 200, 255, 0.25) 100%)",
|
|
1150
|
+
}, children: [platform === "instagram-post" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconComponent, { icon: "mdi:instagram", className: "w-4 h-4 text-pink-400" }), jsxRuntime.jsx("span", { className: "text-xs font-medium text-white", children: t.instagramLabel })] })), platform === "instagram-story" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconComponent, { icon: "mdi:instagram", className: "w-4 h-4 text-purple-400" }), jsxRuntime.jsx("span", { className: "text-xs font-medium text-white", children: t.storyLabel })] })), platform === "tiktok-video" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconComponent, { icon: "ic:baseline-tiktok", className: "w-4 h-4 text-white" }), jsxRuntime.jsx("span", { className: "text-xs font-medium text-white", children: t.tiktokLabel })] })), (platform === "whatsapp" || platform === "whatsapp-message") && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconComponent, { icon: "mdi:whatsapp", className: "w-4 h-4 text-green-400" }), jsxRuntime.jsx("span", { className: "text-xs font-medium text-white", children: t.whatsappLabel })] }))] })), showPreview && onPreview && (jsxRuntime.jsx("button", { type: "button", onClick: function (e) {
|
|
1151
|
+
e.stopPropagation();
|
|
1152
|
+
onPreview();
|
|
1153
|
+
}, className: "backdrop-blur-xl border border-white/30 rounded-lg w-8 h-8 shadow-xl flex items-center justify-center hover:scale-110 transition-all duration-200", style: {
|
|
1154
|
+
background: "linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(200, 200, 255, 0.25) 100%)",
|
|
1155
|
+
}, "aria-label": t.previewButtonLabel, children: jsxRuntime.jsx(IconComponent, { icon: "solar:eye-bold", className: "w-4 h-4 text-white" }) }))] }), !badgeOnly && (jsxRuntime.jsx("div", { className: "flex items-center gap-2 transition-opacity duration-500 ease-in-out ".concat(showActions ? "opacity-100" : "opacity-0 pointer-events-none"), children: customActions || (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [onEdit && (jsxRuntime.jsx(react.Button, { isIconOnly: true, variant: "flat", size: "sm", onPress: onEdit, className: "bg-white/90 hover:bg-white dark:bg-gray-800/90 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-200 shadow-md backdrop-blur-sm transition-all duration-200 hover:scale-110 active:scale-95", "aria-label": t.editButtonLabel, children: jsxRuntime.jsx(IconComponent, { icon: "solar:pen-outline", className: "w-4 h-4 transition-transform duration-200 hover:rotate-12" }) })), onDelete && (jsxRuntime.jsx(react.Button, { isIconOnly: true, variant: "flat", size: "sm", onPress: onDelete, className: "bg-white/90 hover:bg-white dark:bg-gray-800/90 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-200 shadow-md backdrop-blur-sm transition-all duration-200 hover:scale-110 active:scale-95", "aria-label": t.deleteButtonLabel, children: jsxRuntime.jsx(IconComponent, { icon: "solar:trash-bin-minimalistic-outline", className: "w-4 h-4 transition-transform duration-200 hover:scale-110" }) })), onPublish && (jsxRuntime.jsx(react.Button, { variant: "solid", color: "primary", size: "sm", onPress: onPublish, endContent: jsxRuntime.jsx(IconComponent, { icon: "solar:plain-3-bold", className: "w-3.5 h-3.5 transition-transform duration-200" }), "aria-label": t.publishButtonLabel, className: "text-xs shadow-md transition-all duration-200 hover:scale-105 hover:-translate-y-0.5 active:scale-95", children: t.publishButtonLabel }))] })) }))] }));
|
|
1156
|
+
};
|
|
1157
|
+
|
|
1158
|
+
// Inject CSS animations for audience info
|
|
1159
|
+
if (typeof document !== "undefined") {
|
|
1160
|
+
var style = document.createElement("style");
|
|
1161
|
+
style.textContent = "\n @keyframes pulse-subtle {\n 0%, 100% {\n transform: scale(1);\n opacity: 1;\n }\n 50% {\n transform: scale(1.05);\n opacity: 0.95;\n }\n }\n \n @keyframes fade-in {\n from {\n opacity: 0;\n transform: translateX(-5px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n }\n \n .animate-fade-in {\n animation: fade-in 0.3s ease-out;\n }\n";
|
|
1162
|
+
if (!document.head.querySelector("#social-carousel-animations")) {
|
|
1163
|
+
style.id = "social-carousel-animations";
|
|
1164
|
+
document.head.appendChild(style);
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
/**
|
|
1168
|
+
* SocialMediaCarousel - Specialized carousel variant for social media content
|
|
1169
|
+
* Extends ContentCarousel with social media specific features
|
|
1170
|
+
*
|
|
1171
|
+
* @component
|
|
1172
|
+
* @example
|
|
1173
|
+
* ```tsx
|
|
1174
|
+
* <SocialMediaCarousel
|
|
1175
|
+
* items={socialMediaItems}
|
|
1176
|
+
* onEdit={handleEdit}
|
|
1177
|
+
* onDelete={handleDelete}
|
|
1178
|
+
* onPublish={handlePublish}
|
|
1179
|
+
* />
|
|
1180
|
+
* ```
|
|
1181
|
+
*/
|
|
1182
|
+
var SocialMediaCarousel = function (_a) {
|
|
1183
|
+
var items = _a.items, onItemClick = _a.onItemClick, onEdit = _a.onEdit, onDelete = _a.onDelete, onPublish = _a.onPublish, _b = _a.className, className = _b === void 0 ? "" : _b, _c = _a.emptyStateRedirectPath, emptyStateRedirectPath = _c === void 0 ? "/contenidos-ai/crear-contenido" : _c; _a.compactHeader; _a.campaignView; var _f = _a.translations, translations = _f === void 0 ? {} : _f, _g = _a.hideFooter, hideFooter = _g === void 0 ? false : _g, _h = _a.hideAudienceInfo, hideAudienceInfo = _h === void 0 ? false : _h;
|
|
1184
|
+
var handlePreview = React.useCallback(function (item) {
|
|
1185
|
+
console.log("Preview:", item);
|
|
1186
|
+
// This could be extended to open a preview modal
|
|
1187
|
+
}, []);
|
|
1188
|
+
// Custom footer renderer with audience info + SocialMediaBar
|
|
1189
|
+
var renderSocialFooterWithAudience = React.useCallback(function (_a) {
|
|
1190
|
+
var item = _a.item, isHovered = _a.isHovered, translations = _a.translations;
|
|
1191
|
+
var socialItem = item;
|
|
1192
|
+
var showAudience = !hideAudienceInfo && socialItem.targetAudienceCount;
|
|
1193
|
+
return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [showAudience && (jsxRuntime.jsxs("div", { className: "backdrop-blur-xl border border-white/30 shadow-xl flex items-center transition-all duration-500 ".concat(isHovered
|
|
1194
|
+
? "bg-gradient-to-br from-white/40 to-white/30 rounded-2xl px-4 py-2.5 gap-3 max-w-md"
|
|
1195
|
+
: "bg-gradient-to-br from-white/30 to-white/20 rounded-3xl px-3 py-1.5 gap-1.5 w-fit"), style: {
|
|
1196
|
+
animation: isHovered
|
|
1197
|
+
? "none"
|
|
1198
|
+
: "pulse-subtle 3s ease-in-out infinite",
|
|
1199
|
+
}, children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 flex-shrink-0", children: [jsxRuntime.jsx(IconComponent, { icon: "solar:users-group-rounded-bold", className: "w-3.5 h-3.5 text-white transition-transform duration-300 hover:scale-110" }), jsxRuntime.jsx("span", { className: "text-[11px] font-medium text-white transition-all duration-500 ".concat(isHovered
|
|
1200
|
+
? "opacity-100 max-w-20"
|
|
1201
|
+
: "opacity-100 max-w-20 whitespace-nowrap"), children: socialItem.targetAudienceCount.toLocaleString("es-ES") })] }), socialItem.audienceReason && isHovered && (jsxRuntime.jsx("div", { className: "text-[11px] text-white/95 leading-relaxed animate-fade-in", children: socialItem.audienceReason })), socialItem.requiredTags &&
|
|
1202
|
+
socialItem.requiredTags.length > 0 &&
|
|
1203
|
+
isHovered && (jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 mt-2 pt-2 border-t border-white/20 animate-fade-in", children: socialItem.requiredTags.map(function (tag, idx) { return (jsxRuntime.jsx("span", { className: "text-[9px] px-1.5 py-0.5 rounded-md bg-white/20 text-white/95 backdrop-blur-sm border border-white/30", children: tag }, idx)); }) }))] })), !hideFooter && (jsxRuntime.jsx(SocialMediaBar, { platform: socialItem.type, isHovered: isHovered, showPreview: !!socialItem.imageUrl, onEdit: onEdit ? function () { return onEdit(socialItem); } : undefined, onDelete: onDelete ? function () { return onDelete(socialItem); } : undefined, onPublish: onPublish ? function () { return onPublish(socialItem); } : undefined, onPreview: function () { return handlePreview(socialItem); }, translations: {
|
|
1204
|
+
editButtonLabel: translations.editButtonLabel,
|
|
1205
|
+
deleteButtonLabel: translations.deleteButtonLabel,
|
|
1206
|
+
publishButtonLabel: translations.publishButtonLabel,
|
|
1207
|
+
previewButtonLabel: translations.previewButtonLabel,
|
|
1208
|
+
} }))] }));
|
|
1209
|
+
}, [hideAudienceInfo, hideFooter, onEdit, onDelete, onPublish, handlePreview]);
|
|
1210
|
+
return (jsxRuntime.jsx(ContentCarousel, { items: items, onItemClick: onItemClick, className: className, emptyStateRedirectPath: emptyStateRedirectPath, translations: translations, renderFooter: renderSocialFooterWithAudience }));
|
|
1211
|
+
};
|
|
1212
|
+
|
|
992
1213
|
// Traducciones por defecto en español
|
|
993
|
-
var defaultTranslations$
|
|
1214
|
+
var defaultTranslations$9 = {
|
|
994
1215
|
dayOption: "Día específico",
|
|
995
1216
|
dateRangeOption: "Rango de fechas",
|
|
996
1217
|
selectDateAriaLabel: "Seleccionar fecha",
|
|
@@ -1008,7 +1229,7 @@ var DateSelector = function (_a) {
|
|
|
1008
1229
|
var _f = React.useState(initialDate || null), date = _f[0], setDate = _f[1];
|
|
1009
1230
|
var _g = React.useState(initialDateRange || null), dateRange = _g[0], setDateRange = _g[1];
|
|
1010
1231
|
// Combinar traducciones por defecto con las proporcionadas
|
|
1011
|
-
var t = __assign(__assign({}, defaultTranslations$
|
|
1232
|
+
var t = __assign(__assign({}, defaultTranslations$9), translations);
|
|
1012
1233
|
var handleTypeChange = function (value) {
|
|
1013
1234
|
var newType = value;
|
|
1014
1235
|
setType(newType);
|
|
@@ -1115,7 +1336,7 @@ var HeaderComponent = function (_a) {
|
|
|
1115
1336
|
};
|
|
1116
1337
|
HeaderComponent.displayName = "Header";
|
|
1117
1338
|
|
|
1118
|
-
var defaultTranslations$
|
|
1339
|
+
var defaultTranslations$8 = {
|
|
1119
1340
|
previewAlt: "Vista previa de imagen",
|
|
1120
1341
|
removeButtonAriaLabel: "Eliminar imagen",
|
|
1121
1342
|
emptyStateText: "No hay imágenes para mostrar",
|
|
@@ -1148,7 +1369,7 @@ var normalizeImages = function (images) {
|
|
|
1148
1369
|
};
|
|
1149
1370
|
var ImagePreview = function (_a) {
|
|
1150
1371
|
var images = _a.images, _b = _a.size, size = _b === void 0 ? "small" : _b, onRemove = _a.onRemove, _c = _a.showRemoveButton, showRemoveButton = _c === void 0 ? true : _c, _d = _a.className, className = _d === void 0 ? "" : _d, _e = _a.translations, translations = _e === void 0 ? {} : _e, _f = _a.backgroundColor, backgroundColor = _f === void 0 ? "bg-white dark:bg-gray-800" : _f, _g = _a.radius, radius = _g === void 0 ? "lg" : _g, _h = _a.showBorder, showBorder = _h === void 0 ? true : _h, onImageClick = _a.onImageClick;
|
|
1151
|
-
var t = __assign(__assign({}, defaultTranslations$
|
|
1372
|
+
var t = __assign(__assign({}, defaultTranslations$8), translations);
|
|
1152
1373
|
var normalizedImages = normalizeImages(images);
|
|
1153
1374
|
var sizeClass = sizeClasses[size];
|
|
1154
1375
|
var radiusClass = radiusClasses[radius];
|
|
@@ -1436,13 +1657,13 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
|
1436
1657
|
];
|
|
1437
1658
|
}
|
|
1438
1659
|
|
|
1439
|
-
var defaultTranslations$
|
|
1660
|
+
var defaultTranslations$7 = {
|
|
1440
1661
|
checkIconTitle: "Check",
|
|
1441
1662
|
};
|
|
1442
1663
|
var VerticalSteps = React.forwardRef(function (_a, ref) {
|
|
1443
1664
|
var _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.steps, stepsProp = _c === void 0 ? [] : _c, _d = _a.defaultStep, defaultStep = _d === void 0 ? 0 : _d, onStepChange = _a.onStepChange, currentStepProp = _a.currentStep, _e = _a.hideProgressBars, hideProgressBars = _e === void 0 ? false : _e, stepClassName = _a.stepClassName, className = _a.className, translations = _a.translations, props = __rest(_a, ["color", "steps", "defaultStep", "onStepChange", "currentStep", "hideProgressBars", "stepClassName", "className", "translations"]);
|
|
1444
1665
|
var _f = $458b0a5536c1a7cf$export$40bfa8c7b0832715(currentStepProp, defaultStep, onStepChange), currentStep = _f[0], setCurrentStep = _f[1];
|
|
1445
|
-
var t = __assign(__assign({}, defaultTranslations$
|
|
1666
|
+
var t = __assign(__assign({}, defaultTranslations$7), translations);
|
|
1446
1667
|
var steps = React.useMemo(function () {
|
|
1447
1668
|
if (typeof stepsProp === "number") {
|
|
1448
1669
|
return Array.from({ length: stepsProp }, function () { return ({}); });
|
|
@@ -2081,7 +2302,7 @@ var countries = [
|
|
|
2081
2302
|
];
|
|
2082
2303
|
var uniqueCountries = Array.from(new Map(countries.map(function (item) { return [item.code + item.name, item]; })).values());
|
|
2083
2304
|
// Traducciones por defecto
|
|
2084
|
-
var defaultTranslations$
|
|
2305
|
+
var defaultTranslations$6 = {
|
|
2085
2306
|
label: "Teléfono",
|
|
2086
2307
|
placeholder: "Número de teléfono",
|
|
2087
2308
|
searchPlaceholder: "Buscar país...",
|
|
@@ -2099,7 +2320,7 @@ var Phone = function (_a) {
|
|
|
2099
2320
|
var portalDropdownRef = React.useRef(null);
|
|
2100
2321
|
var _l = React.useState({}), dropdownPosition = _l[0], setDropdownPosition = _l[1];
|
|
2101
2322
|
var _m = React.useState(uniqueCountries), filteredCountries = _m[0], setFilteredCountries = _m[1];
|
|
2102
|
-
var t = __assign(__assign({}, defaultTranslations$
|
|
2323
|
+
var t = __assign(__assign({}, defaultTranslations$6), translations);
|
|
2103
2324
|
var finalLabel = label || t.label;
|
|
2104
2325
|
React.useEffect(function () {
|
|
2105
2326
|
if (value) {
|
|
@@ -2178,7 +2399,7 @@ var Phone = function (_a) {
|
|
|
2178
2399
|
: ""), onClick: function () { return handleCountrySelect(country); }, children: [jsxRuntime.jsx("span", { className: "mr-3", children: jsxRuntime.jsx(FlagIcon, { countryCode: country.country, size: "md" }) }), jsxRuntime.jsx("span", { className: "flex-1 text-left text-default-500", children: country.name }), jsxRuntime.jsx("span", { className: "text-xs text-default-500", children: country.code })] }, "".concat(country.code, "-").concat(country.country))); })) : (jsxRuntime.jsx("div", { className: "px-4 py-2 text-sm text-default-500", children: t.noCountriesFound })) })] }), document.body)] }));
|
|
2179
2400
|
};
|
|
2180
2401
|
|
|
2181
|
-
var defaultTranslations$
|
|
2402
|
+
var defaultTranslations$5 = {
|
|
2182
2403
|
message: "The Winter 2024 Release is here: new editor, analytics API, and so much more.",
|
|
2183
2404
|
buttonText: "Explore",
|
|
2184
2405
|
closeButtonLabel: "Close Banner",
|
|
@@ -2188,7 +2409,7 @@ var defaultTranslations$4 = {
|
|
|
2188
2409
|
*/
|
|
2189
2410
|
var PromotionalBanner = function (_a) {
|
|
2190
2411
|
var message = _a.message, buttonText = _a.buttonText, _b = _a.messageHref, messageHref = _b === void 0 ? "#" : _b, _c = _a.buttonHref, buttonHref = _c === void 0 ? "#" : _c, _d = _a.showCloseButton, showCloseButton = _d === void 0 ? true : _d, _e = _a.isVisible, isVisible = _e === void 0 ? true : _e, _f = _a.gradientColors, gradientColors = _f === void 0 ? ["default-100", "danger-100", "secondary-100"] : _f, _g = _a.buttonGradientColors, buttonGradientColors = _g === void 0 ? ["#F871A0", "#9353D3"] : _g, onClose = _a.onClose, onMessageClick = _a.onMessageClick, onButtonClick = _a.onButtonClick, _h = _a.messageLinkProps, messageLinkProps = _h === void 0 ? {} : _h, _j = _a.buttonProps, buttonProps = _j === void 0 ? {} : _j, _k = _a.translations, translations = _k === void 0 ? {} : _k;
|
|
2191
|
-
var t = __assign(__assign({}, defaultTranslations$
|
|
2412
|
+
var t = __assign(__assign({}, defaultTranslations$5), translations);
|
|
2192
2413
|
var finalMessage = message || t.message;
|
|
2193
2414
|
var finalButtonText = buttonText || t.buttonText;
|
|
2194
2415
|
var handleClose = function () {
|
|
@@ -2517,7 +2738,7 @@ var TimeInput = function (_a) {
|
|
|
2517
2738
|
* />
|
|
2518
2739
|
* ```
|
|
2519
2740
|
*/
|
|
2520
|
-
var defaultTranslations$
|
|
2741
|
+
var defaultTranslations$4 = {
|
|
2521
2742
|
/** Label for the start time input field */
|
|
2522
2743
|
from: "Desde",
|
|
2523
2744
|
/** Label for the end time input field */
|
|
@@ -2575,7 +2796,7 @@ var defaultTranslations$3 = {
|
|
|
2575
2796
|
*/
|
|
2576
2797
|
var ScheduleRow = function (_a) {
|
|
2577
2798
|
var day = _a.day, daySchedule = _a.daySchedule, _b = _a.translations, translations = _b === void 0 ? {} : _b, _c = _a.showCopyToAll, showCopyToAll = _c === void 0 ? false : _c, onChange = _a.onChange, onCopyToAll = _a.onCopyToAll;
|
|
2578
|
-
var t = __assign(__assign({}, defaultTranslations$
|
|
2799
|
+
var t = __assign(__assign({}, defaultTranslations$4), translations);
|
|
2579
2800
|
/**
|
|
2580
2801
|
* @function validateTimeSlots
|
|
2581
2802
|
* @description Validates all time slots to ensure the "from" time is not after the "to" time.
|
|
@@ -2728,6 +2949,81 @@ var Select = function (_a) {
|
|
|
2728
2949
|
} })) }));
|
|
2729
2950
|
};
|
|
2730
2951
|
|
|
2952
|
+
var defaultTranslations$3 = {
|
|
2953
|
+
username: "tu_negocio",
|
|
2954
|
+
sendMessage: "Enviar mensaje",
|
|
2955
|
+
viewMore: "ver más",
|
|
2956
|
+
viewLess: "ver menos",
|
|
2957
|
+
timeAgo: "hace unos momentos",
|
|
2958
|
+
imageAlt: "Vista previa de red social",
|
|
2959
|
+
};
|
|
2960
|
+
/**
|
|
2961
|
+
* SocialMediaPreview component for displaying social media post previews
|
|
2962
|
+
* across multiple platforms: Instagram, Facebook, TikTok, and Twitter.
|
|
2963
|
+
*
|
|
2964
|
+
* @component
|
|
2965
|
+
* @example
|
|
2966
|
+
* ```tsx
|
|
2967
|
+
* <SocialMediaPreview
|
|
2968
|
+
* platform="instagram"
|
|
2969
|
+
* imageUrl="/path/to/image.jpg"
|
|
2970
|
+
* caption="Check out our new product!"
|
|
2971
|
+
* variant="full"
|
|
2972
|
+
* />
|
|
2973
|
+
* ```
|
|
2974
|
+
*/
|
|
2975
|
+
var SocialMediaPreview = function (_a) {
|
|
2976
|
+
var platform = _a.platform, imageUrl = _a.imageUrl, caption = _a.caption, _b = _a.variant, variant = _b === void 0 ? "full" : _b, _c = _a.showHeader, showHeader = _c === void 0 ? true : _c, _d = _a.maxCaptionLength, maxCaptionLength = _d === void 0 ? 125 : _d, onToggleCaption = _a.onToggleCaption, showFullCaption = _a.showFullCaption, username = _a.username, avatarUrl = _a.avatarUrl, _e = _a.translations, translations = _e === void 0 ? {} : _e, _f = _a.className, className = _f === void 0 ? "" : _f, _g = _a.imageProps, imageProps = _g === void 0 ? {} : _g;
|
|
2977
|
+
var t = __assign(__assign({}, defaultTranslations$3), translations);
|
|
2978
|
+
var displayUsername = username || t.username;
|
|
2979
|
+
var shouldTruncate = variant === "compact" && caption.length > maxCaptionLength;
|
|
2980
|
+
var getTruncatedCaption = function () {
|
|
2981
|
+
if (variant !== "compact") {
|
|
2982
|
+
return caption;
|
|
2983
|
+
}
|
|
2984
|
+
if (!shouldTruncate || showFullCaption) {
|
|
2985
|
+
return caption;
|
|
2986
|
+
}
|
|
2987
|
+
var firstLineEnd = caption.indexOf("\n");
|
|
2988
|
+
var truncateAt = firstLineEnd > 0 && firstLineEnd < maxCaptionLength
|
|
2989
|
+
? firstLineEnd
|
|
2990
|
+
: maxCaptionLength;
|
|
2991
|
+
return "".concat(caption.substring(0, truncateAt).trim(), "...");
|
|
2992
|
+
};
|
|
2993
|
+
var displayCaption = getTruncatedCaption();
|
|
2994
|
+
// Render Instagram Preview
|
|
2995
|
+
var renderInstagram = function () {
|
|
2996
|
+
if (variant === "story") {
|
|
2997
|
+
return renderInstagramStory();
|
|
2998
|
+
}
|
|
2999
|
+
return renderInstagramPost();
|
|
3000
|
+
};
|
|
3001
|
+
var renderInstagramStory = function () { return (jsxRuntime.jsxs("div", { className: "relative w-full bg-gradient-to-b from-gray-900 to-gray-800 rounded-2xl shadow-2xl overflow-hidden ".concat(className), style: { aspectRatio: "9/16", maxHeight: "640px" }, children: [imageUrl && (jsxRuntime.jsxs("div", { className: "absolute inset-0", children: [jsxRuntime.jsx(react.Image, __assign({ src: imageUrl, alt: t.imageAlt, className: "w-full h-full object-cover" }, imageProps)), jsxRuntime.jsx("div", { className: "absolute inset-0 bg-black bg-opacity-20" })] })), showHeader && (jsxRuntime.jsxs("div", { className: "absolute top-0 left-0 right-0 z-10 p-4", children: [jsxRuntime.jsx("div", { className: "w-full h-0.5 bg-white bg-opacity-30 rounded-full mb-3", children: jsxRuntime.jsx("div", { className: "h-full w-1/3 bg-white rounded-full" }) }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx("div", { className: "w-8 h-8 rounded-full bg-gradient-to-br from-purple-500 via-pink-500 to-orange-500 flex items-center justify-center border-2 border-white", children: avatarUrl ? (jsxRuntime.jsx("img", { src: avatarUrl, alt: displayUsername, className: "w-full h-full rounded-full object-cover" })) : (jsxRuntime.jsx("span", { className: "text-white text-xs font-bold", children: displayUsername.substring(0, 2).toUpperCase() })) }), jsxRuntime.jsx("span", { className: "text-sm font-semibold text-white drop-shadow-lg", children: displayUsername }), jsxRuntime.jsx("span", { className: "text-xs text-white text-opacity-90", children: "hace 5min" })] }), jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [jsxRuntime.jsx(IconComponent, { icon: "solar:play-circle-bold", className: "text-lg text-white drop-shadow-lg" }), jsxRuntime.jsx(IconComponent, { icon: "solar:volume-loud-bold", className: "text-lg text-white drop-shadow-lg" }), jsxRuntime.jsx(IconComponent, { icon: "solar:menu-dots-bold", className: "text-lg text-white drop-shadow-lg" })] })] })] })), jsxRuntime.jsxs("div", { className: "absolute bottom-6 left-0 right-0 z-20 px-4 flex items-center gap-3", children: [jsxRuntime.jsx("input", { type: "text", placeholder: t.sendMessage, className: "flex-1 bg-transparent border-2 border-white border-opacity-70 rounded-full px-4 py-2 text-white placeholder-white placeholder-opacity-70 text-sm", readOnly: true }), jsxRuntime.jsx(IconComponent, { icon: "solar:heart-outline", className: "text-2xl text-white drop-shadow-lg" }), jsxRuntime.jsx(IconComponent, { icon: "solar:plain-outline", className: "text-2xl text-white drop-shadow-lg" })] })] })); };
|
|
3002
|
+
var renderInstagramPost = function () { return (jsxRuntime.jsxs("div", { className: "flex flex-col bg-white dark:bg-gray-900 ".concat(variant === "full" ? "rounded-lg shadow-xl overflow-hidden" : "rounded-b-xl overflow-hidden", " h-full ").concat(className), children: [showHeader && (jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-3 border-b border-gray-200 dark:border-gray-800", children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx("div", { className: "w-8 h-8 rounded-full bg-gradient-to-br from-purple-500 via-pink-500 to-orange-500 flex items-center justify-center", children: avatarUrl ? (jsxRuntime.jsx("img", { src: avatarUrl, alt: displayUsername, className: "w-full h-full rounded-full object-cover" })) : (jsxRuntime.jsx("span", { className: "text-white text-xs font-bold", children: displayUsername.substring(0, 2).toUpperCase() })) }), jsxRuntime.jsx("span", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: displayUsername })] }), jsxRuntime.jsx(IconComponent, { icon: "solar:menu-dots-bold", className: "text-lg text-gray-900 dark:text-white" })] })), imageUrl && (jsxRuntime.jsx("div", { className: "relative w-full bg-gray-50 dark:bg-gray-800 overflow-hidden rounded-none ".concat(variant === "full" ? "h-80" : ""), style: variant === "compact" ? { aspectRatio: "1/1" } : {}, children: jsxRuntime.jsx(react.Image, __assign({ src: imageUrl, alt: t.imageAlt, className: "w-full h-full object-cover rounded-none", radius: "none" }, imageProps)) })), jsxRuntime.jsxs("div", { className: "flex-1 p-3 overflow-y-auto", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [jsxRuntime.jsx(IconComponent, { icon: "solar:heart-bold", className: "text-xl text-gray-900 dark:text-white" }), jsxRuntime.jsx(IconComponent, { icon: "solar:chat-round-bold", className: "text-xl text-gray-900 dark:text-white" }), jsxRuntime.jsx(IconComponent, { icon: "solar:plain-bold", className: "text-xl text-gray-900 dark:text-white" })] }), jsxRuntime.jsx(IconComponent, { icon: "solar:bookmark-bold", className: "text-xl text-gray-900 dark:text-white" })] }), jsxRuntime.jsxs("div", { className: "text-sm text-left", children: [jsxRuntime.jsxs("div", { className: showFullCaption ? "overflow-y-auto" : "", style: { maxHeight: showFullCaption ? "150px" : "none" }, children: [jsxRuntime.jsx("span", { className: "font-semibold mr-2 text-gray-900 dark:text-white", children: displayUsername }), jsxRuntime.jsx("span", { className: "text-gray-800 dark:text-gray-200 whitespace-pre-wrap break-words", children: displayCaption })] }), shouldTruncate && onToggleCaption && variant !== "compact" && (jsxRuntime.jsx("button", { type: "button", onClick: function (e) {
|
|
3003
|
+
e.stopPropagation();
|
|
3004
|
+
onToggleCaption();
|
|
3005
|
+
}, className: "text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-300 font-normal mt-1 underline text-xs block", children: showFullCaption ? t.viewLess : t.viewMore }))] }), variant !== "compact" && (jsxRuntime.jsx("div", { className: "text-xs text-gray-500 dark:text-gray-400 mt-1 text-left", children: t.timeAgo }))] })] })); };
|
|
3006
|
+
// Render Facebook Preview
|
|
3007
|
+
var renderFacebook = function () { return (jsxRuntime.jsxs("div", { className: "flex flex-col bg-white dark:bg-gray-900 ".concat(variant === "full" ? "rounded-lg shadow-xl overflow-hidden" : "rounded-xl overflow-hidden", " ").concat(className), children: [showHeader && (jsxRuntime.jsx("div", { className: "p-4 border-b border-gray-200 dark:border-gray-800", children: jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [jsxRuntime.jsx("div", { className: "w-10 h-10 rounded-full bg-blue-600 flex items-center justify-center", children: avatarUrl ? (jsxRuntime.jsx("img", { src: avatarUrl, alt: displayUsername, className: "w-full h-full rounded-full object-cover" })) : (jsxRuntime.jsx("span", { className: "text-white text-sm font-bold", children: displayUsername.substring(0, 2).toUpperCase() })) }), jsxRuntime.jsxs("div", { className: "flex-1", children: [jsxRuntime.jsx("p", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: displayUsername }), jsxRuntime.jsxs("p", { className: "text-xs text-gray-500 dark:text-gray-400 flex items-center gap-1", children: [t.timeAgo, " \u00B7 ", jsxRuntime.jsx(IconComponent, { icon: "solar:earth-bold", className: "text-xs" })] })] }), jsxRuntime.jsx(IconComponent, { icon: "solar:menu-dots-bold", className: "text-xl text-gray-600 dark:text-gray-400" })] }) })), jsxRuntime.jsx("div", { className: "px-4 py-2", children: jsxRuntime.jsx("p", { className: "text-sm text-gray-900 dark:text-white whitespace-pre-wrap break-words", children: displayCaption }) }), imageUrl && (jsxRuntime.jsx("div", { className: "relative w-full bg-gray-50 dark:bg-gray-800", children: jsxRuntime.jsx(react.Image, __assign({ src: imageUrl, alt: t.imageAlt, className: "w-full h-auto object-cover", radius: "none" }, imageProps)) })), jsxRuntime.jsx("div", { className: "p-3 border-t border-gray-200 dark:border-gray-800", children: jsxRuntime.jsxs("div", { className: "flex items-center justify-around", children: [jsxRuntime.jsxs("button", { type: "button", className: "flex items-center gap-2 text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 px-4 py-2 rounded-lg transition-colors", children: [jsxRuntime.jsx(IconComponent, { icon: "solar:like-bold", className: "text-xl" }), jsxRuntime.jsx("span", { className: "text-sm font-medium", children: "Me gusta" })] }), jsxRuntime.jsxs("button", { type: "button", className: "flex items-center gap-2 text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 px-4 py-2 rounded-lg transition-colors", children: [jsxRuntime.jsx(IconComponent, { icon: "solar:chat-round-bold", className: "text-xl" }), jsxRuntime.jsx("span", { className: "text-sm font-medium", children: "Comentar" })] }), jsxRuntime.jsxs("button", { type: "button", className: "flex items-center gap-2 text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 px-4 py-2 rounded-lg transition-colors", children: [jsxRuntime.jsx(IconComponent, { icon: "solar:share-bold", className: "text-xl" }), jsxRuntime.jsx("span", { className: "text-sm font-medium", children: "Compartir" })] })] }) })] })); };
|
|
3008
|
+
// Render TikTok Preview
|
|
3009
|
+
var renderTikTok = function () { return (jsxRuntime.jsxs("div", { className: "relative w-full bg-black rounded-2xl shadow-2xl overflow-hidden ".concat(className), style: { aspectRatio: "9/16", maxHeight: "640px" }, children: [imageUrl && (jsxRuntime.jsxs("div", { className: "absolute inset-0", children: [jsxRuntime.jsx(react.Image, __assign({ src: imageUrl, alt: t.imageAlt, className: "w-full h-full object-cover" }, imageProps)), jsxRuntime.jsx("div", { className: "absolute inset-0 bg-gradient-to-b from-transparent via-transparent to-black opacity-60" })] })), jsxRuntime.jsxs("div", { className: "absolute right-2 bottom-20 flex flex-col items-center gap-6 z-20", children: [jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [jsxRuntime.jsx("div", { className: "w-12 h-12 rounded-full border-2 border-white bg-gray-900 flex items-center justify-center", children: avatarUrl ? (jsxRuntime.jsx("img", { src: avatarUrl, alt: displayUsername, className: "w-full h-full rounded-full object-cover" })) : (jsxRuntime.jsx("span", { className: "text-white text-xs font-bold", children: displayUsername.substring(0, 2).toUpperCase() })) }), jsxRuntime.jsx("div", { className: "w-6 h-6 rounded-full bg-pink-500 flex items-center justify-center -mt-3 border-2 border-black", children: jsxRuntime.jsx(IconComponent, { icon: "solar:add-circle-bold", className: "text-xs text-white" }) })] }), jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2", children: [jsxRuntime.jsx(IconComponent, { icon: "solar:heart-bold", className: "text-3xl text-white drop-shadow-lg" }), jsxRuntime.jsx("span", { className: "text-xs text-white font-semibold", children: "24.5K" })] }), jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2", children: [jsxRuntime.jsx(IconComponent, { icon: "solar:chat-round-bold", className: "text-3xl text-white drop-shadow-lg" }), jsxRuntime.jsx("span", { className: "text-xs text-white font-semibold", children: "1,234" })] }), jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2", children: [jsxRuntime.jsx(IconComponent, { icon: "solar:bookmark-bold", className: "text-3xl text-white drop-shadow-lg" }), jsxRuntime.jsx("span", { className: "text-xs text-white font-semibold", children: "453" })] }), jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2", children: [jsxRuntime.jsx(IconComponent, { icon: "solar:share-bold", className: "text-3xl text-white drop-shadow-lg" }), jsxRuntime.jsx("span", { className: "text-xs text-white font-semibold", children: "892" })] }), jsxRuntime.jsx("div", { className: "w-10 h-10 rounded-lg bg-gray-800 border border-gray-700 flex items-center justify-center", children: jsxRuntime.jsx(IconComponent, { icon: "solar:music-note-2-bold", className: "text-xl text-white" }) })] }), jsxRuntime.jsxs("div", { className: "absolute bottom-0 left-0 right-14 z-20 p-4", children: [jsxRuntime.jsxs("p", { className: "text-sm font-semibold text-white mb-1", children: ["@", displayUsername] }), jsxRuntime.jsx("p", { className: "text-sm text-white mb-2 line-clamp-2", children: displayCaption }), jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs text-white", children: [jsxRuntime.jsx(IconComponent, { icon: "solar:music-note-2-bold", className: "text-sm" }), jsxRuntime.jsxs("span", { className: "truncate", children: ["Sonido original - ", displayUsername] })] })] })] })); };
|
|
3010
|
+
// Render Twitter Preview
|
|
3011
|
+
var renderTwitter = function () { return (jsxRuntime.jsx("div", { className: "flex flex-col bg-white dark:bg-gray-900 ".concat(variant === "full" ? "rounded-xl border border-gray-200 dark:border-gray-800" : "rounded-xl border border-gray-200 dark:border-gray-800", " ").concat(className), children: jsxRuntime.jsx("div", { className: "p-4", children: jsxRuntime.jsxs("div", { className: "flex gap-3", children: [jsxRuntime.jsx("div", { className: "w-12 h-12 rounded-full bg-blue-500 flex items-center justify-center flex-shrink-0", children: avatarUrl ? (jsxRuntime.jsx("img", { src: avatarUrl, alt: displayUsername, className: "w-full h-full rounded-full object-cover" })) : (jsxRuntime.jsx("span", { className: "text-white text-sm font-bold", children: displayUsername.substring(0, 2).toUpperCase() })) }), jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-1 mb-1", children: [jsxRuntime.jsx("span", { className: "font-bold text-gray-900 dark:text-white text-sm truncate", children: displayUsername }), jsxRuntime.jsx(IconComponent, { icon: "solar:verified-check-bold", className: "text-blue-500 text-base flex-shrink-0" }), jsxRuntime.jsxs("span", { className: "text-gray-500 dark:text-gray-400 text-sm truncate", children: ["@", displayUsername.toLowerCase().replace(/\s/g, "_")] }), jsxRuntime.jsx("span", { className: "text-gray-500 dark:text-gray-400 text-sm", children: "\u00B7 2h" })] }), jsxRuntime.jsx("p", { className: "text-gray-900 dark:text-white text-sm mb-3 whitespace-pre-wrap break-words", children: displayCaption }), imageUrl && (jsxRuntime.jsx("div", { className: "rounded-2xl overflow-hidden border border-gray-200 dark:border-gray-700 mb-3", children: jsxRuntime.jsx(react.Image, __assign({ src: imageUrl, alt: t.imageAlt, className: "w-full h-auto object-cover", radius: "none" }, imageProps)) })), jsxRuntime.jsxs("div", { className: "flex items-center justify-between max-w-md mt-3", children: [jsxRuntime.jsxs("button", { type: "button", className: "flex items-center gap-2 text-gray-500 dark:text-gray-400 hover:text-blue-500 dark:hover:text-blue-400 transition-colors", children: [jsxRuntime.jsx(IconComponent, { icon: "solar:chat-round-bold", className: "text-lg" }), jsxRuntime.jsx("span", { className: "text-xs", children: "234" })] }), jsxRuntime.jsxs("button", { type: "button", className: "flex items-center gap-2 text-gray-500 dark:text-gray-400 hover:text-green-500 dark:hover:text-green-400 transition-colors", children: [jsxRuntime.jsx(IconComponent, { icon: "solar:repost-bold", className: "text-lg" }), jsxRuntime.jsx("span", { className: "text-xs", children: "1.2K" })] }), jsxRuntime.jsxs("button", { type: "button", className: "flex items-center gap-2 text-gray-500 dark:text-gray-400 hover:text-pink-500 dark:hover:text-pink-400 transition-colors", children: [jsxRuntime.jsx(IconComponent, { icon: "solar:heart-bold", className: "text-lg" }), jsxRuntime.jsx("span", { className: "text-xs", children: "5.6K" })] }), jsxRuntime.jsxs("button", { type: "button", className: "flex items-center gap-2 text-gray-500 dark:text-gray-400 hover:text-blue-500 dark:hover:text-blue-400 transition-colors", children: [jsxRuntime.jsx(IconComponent, { icon: "solar:chart-2-bold", className: "text-lg" }), jsxRuntime.jsx("span", { className: "text-xs", children: "12K" })] }), jsxRuntime.jsx("button", { type: "button", className: "flex items-center gap-2 text-gray-500 dark:text-gray-400 hover:text-blue-500 dark:hover:text-blue-400 transition-colors", children: jsxRuntime.jsx(IconComponent, { icon: "solar:share-bold", className: "text-lg" }) })] })] })] }) }) })); };
|
|
3012
|
+
// Main render logic
|
|
3013
|
+
switch (platform) {
|
|
3014
|
+
case "instagram":
|
|
3015
|
+
return renderInstagram();
|
|
3016
|
+
case "facebook":
|
|
3017
|
+
return renderFacebook();
|
|
3018
|
+
case "tiktok":
|
|
3019
|
+
return renderTikTok();
|
|
3020
|
+
case "twitter":
|
|
3021
|
+
return renderTwitter();
|
|
3022
|
+
default:
|
|
3023
|
+
return renderInstagram();
|
|
3024
|
+
}
|
|
3025
|
+
};
|
|
3026
|
+
|
|
2731
3027
|
function AuraTable(_a) {
|
|
2732
3028
|
var columns = _a.columns, items = _a.items, renderCell = _a.renderCell, children = _a.children, props = __rest(_a, ["columns", "items", "renderCell", "children"]);
|
|
2733
3029
|
return (jsxRuntime.jsxs(react.Table, __assign({ removeWrapper: true, radius: "none" }, props, { children: [jsxRuntime.jsx(react.TableHeader, { columns: columns, children: function (column) { return jsxRuntime.jsx(react.TableColumn, { children: column.label }, column.key); } }), jsxRuntime.jsx(react.TableBody, { items: items, children: function (item) { return (jsxRuntime.jsx(react.TableRow, { children: function (columnKey) { return (jsxRuntime.jsx(react.TableCell, { children: renderCell ? renderCell(item, columnKey) : children })); } }, item.id)); } })] })));
|
|
@@ -4297,6 +4593,7 @@ exports.Button = Button;
|
|
|
4297
4593
|
exports.Card = Card;
|
|
4298
4594
|
exports.Chip = Chip;
|
|
4299
4595
|
exports.ColorSelector = ColorSelector;
|
|
4596
|
+
exports.ContentCarousel = ContentCarousel;
|
|
4300
4597
|
exports.DatePicker = DatePicker;
|
|
4301
4598
|
exports.DateRangePicker = DateRangePicker;
|
|
4302
4599
|
exports.DateSelector = DateSelector;
|
|
@@ -4329,6 +4626,9 @@ exports.RowSteps = RowSteps;
|
|
|
4329
4626
|
exports.ScheduleRow = ScheduleRow;
|
|
4330
4627
|
exports.SearchInput = SearchInput;
|
|
4331
4628
|
exports.Select = Select;
|
|
4629
|
+
exports.SocialMediaBar = SocialMediaBar;
|
|
4630
|
+
exports.SocialMediaCarousel = SocialMediaCarousel;
|
|
4631
|
+
exports.SocialMediaPreview = SocialMediaPreview;
|
|
4332
4632
|
exports.StepIndicator = StepIndicator;
|
|
4333
4633
|
exports.SwitchComponent = Switch;
|
|
4334
4634
|
exports.Textarea = Textarea;
|
|
@@ -4342,7 +4642,7 @@ exports.VerticalSteps = VerticalSteps;
|
|
|
4342
4642
|
exports.Wizard = Wizard;
|
|
4343
4643
|
exports.WizardNavigation = WizardNavigation;
|
|
4344
4644
|
exports.WizardSidebar = WizardSidebar;
|
|
4345
|
-
exports.defaultTranslations = defaultTranslations$
|
|
4645
|
+
exports.defaultTranslations = defaultTranslations$4;
|
|
4346
4646
|
exports.sizeMap = sizeMap;
|
|
4347
4647
|
exports.themeColors = themeColors;
|
|
4348
4648
|
exports.useAuraToast = useAuraToast;
|