@beweco/aurora-ui 0.6.25 → 0.6.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js
CHANGED
|
@@ -2753,12 +2753,13 @@ var SocialMediaCarousel = function (_a) {
|
|
|
2753
2753
|
}, [onPreview]);
|
|
2754
2754
|
var breakpoint = useBreakpoint();
|
|
2755
2755
|
var isMobile = breakpoint === "mobile";
|
|
2756
|
+
var isMobileOrTablet = breakpoint !== "desktop";
|
|
2756
2757
|
// Custom footer renderer with audience info + SocialMediaBar
|
|
2757
2758
|
var renderSocialFooterWithAudience = React.useCallback(function (_a) {
|
|
2758
2759
|
var item = _a.item, isHovered = _a.isHovered, translations = _a.translations;
|
|
2759
2760
|
var socialItem = item;
|
|
2760
2761
|
var showAudience = !hideAudienceInfo && socialItem.targetAudienceCount;
|
|
2761
|
-
var isExpanded =
|
|
2762
|
+
var isExpanded = isMobileOrTablet || isHovered;
|
|
2762
2763
|
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(isExpanded
|
|
2763
2764
|
? "bg-gradient-to-br from-white/40 to-white/30 rounded-2xl px-4 py-2.5 gap-3 max-w-md"
|
|
2764
2765
|
: "bg-gradient-to-br from-white/30 to-white/20 rounded-3xl px-3 py-1.5 gap-1.5 w-fit"), style: {
|
|
@@ -2771,13 +2772,13 @@ var SocialMediaCarousel = function (_a) {
|
|
|
2771
2772
|
? "".concat((socialItem.targetAudienceCount / 1000).toFixed(1), "K")
|
|
2772
2773
|
: socialItem.targetAudienceCount.toLocaleString("es-ES") })] }), socialItem.audienceReason && isExpanded && (jsxRuntime.jsx("div", { className: "text-[11px] text-white/95 leading-relaxed animate-fade-in", children: socialItem.audienceReason })), socialItem.requiredTags &&
|
|
2773
2774
|
socialItem.requiredTags.length > 0 &&
|
|
2774
|
-
isExpanded && (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: "rounded-md bg-white/20 text-white/95 backdrop-blur-sm border border-white/30 whitespace-nowrap ".concat(isMobile ? "text-[8px] px-1 py-0.5" : "text-[9px] px-1.5 py-0.5"), children: tag }, idx)); }) }))] })), !hideFooter && (jsxRuntime.jsx(SocialMediaBar, { platform: socialItem.type, isHovered: isHovered, showPreview: typeof onPreview === "function", onEdit: onEdit ? function () { return onEdit(socialItem); } : undefined, onDelete: onDelete ? function () { return onDelete(socialItem); } : undefined, onPublish: onPublish ? function () { return onPublish(socialItem); } : undefined, onPreview: function () { return handlePreview(socialItem); }, translations: {
|
|
2775
|
+
isExpanded && (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: "rounded-md bg-white/20 text-white/95 backdrop-blur-sm border border-white/30 whitespace-nowrap ".concat(isMobile ? "text-[8px] px-1 py-0.5" : "text-[9px] px-1.5 py-0.5"), children: tag }, idx)); }) }))] })), !hideFooter && (jsxRuntime.jsx(SocialMediaBar, { platform: socialItem.type, isHovered: isHovered, actionsAlwaysVisible: isMobileOrTablet, showPreview: typeof onPreview === "function", onEdit: onEdit ? function () { return onEdit(socialItem); } : undefined, onDelete: onDelete ? function () { return onDelete(socialItem); } : undefined, onPublish: onPublish ? function () { return onPublish(socialItem); } : undefined, onPreview: function () { return handlePreview(socialItem); }, translations: {
|
|
2775
2776
|
editButtonLabel: translations.editButtonLabel,
|
|
2776
2777
|
deleteButtonLabel: translations.deleteButtonLabel,
|
|
2777
2778
|
publishButtonLabel: translations.publishButtonLabel,
|
|
2778
2779
|
previewButtonLabel: translations.previewButtonLabel,
|
|
2779
2780
|
} }))] }));
|
|
2780
|
-
}, [hideAudienceInfo, hideFooter, onEdit, onDelete, onPublish, handlePreview, isMobile]);
|
|
2781
|
+
}, [hideAudienceInfo, hideFooter, onEdit, onDelete, onPublish, handlePreview, isMobile, isMobileOrTablet]);
|
|
2781
2782
|
return (jsxRuntime.jsx(ContentCarousel, { items: items, onItemClick: onItemClick, className: className, emptyStateRedirectPath: emptyStateRedirectPath, translations: translations, renderFooter: renderSocialFooterWithAudience, haveChip: haveChip }));
|
|
2782
2783
|
};
|
|
2783
2784
|
|
package/dist/index.esm.js
CHANGED
|
@@ -2754,12 +2754,13 @@ var SocialMediaCarousel = function (_a) {
|
|
|
2754
2754
|
}, [onPreview]);
|
|
2755
2755
|
var breakpoint = useBreakpoint();
|
|
2756
2756
|
var isMobile = breakpoint === "mobile";
|
|
2757
|
+
var isMobileOrTablet = breakpoint !== "desktop";
|
|
2757
2758
|
// Custom footer renderer with audience info + SocialMediaBar
|
|
2758
2759
|
var renderSocialFooterWithAudience = useCallback(function (_a) {
|
|
2759
2760
|
var item = _a.item, isHovered = _a.isHovered, translations = _a.translations;
|
|
2760
2761
|
var socialItem = item;
|
|
2761
2762
|
var showAudience = !hideAudienceInfo && socialItem.targetAudienceCount;
|
|
2762
|
-
var isExpanded =
|
|
2763
|
+
var isExpanded = isMobileOrTablet || isHovered;
|
|
2763
2764
|
return (jsxs("div", { className: "flex flex-col gap-3", children: [showAudience && (jsxs("div", { className: "backdrop-blur-xl border border-white/30 shadow-xl flex items-center transition-all duration-500 ".concat(isExpanded
|
|
2764
2765
|
? "bg-gradient-to-br from-white/40 to-white/30 rounded-2xl px-4 py-2.5 gap-3 max-w-md"
|
|
2765
2766
|
: "bg-gradient-to-br from-white/30 to-white/20 rounded-3xl px-3 py-1.5 gap-1.5 w-fit"), style: {
|
|
@@ -2772,13 +2773,13 @@ var SocialMediaCarousel = function (_a) {
|
|
|
2772
2773
|
? "".concat((socialItem.targetAudienceCount / 1000).toFixed(1), "K")
|
|
2773
2774
|
: socialItem.targetAudienceCount.toLocaleString("es-ES") })] }), socialItem.audienceReason && isExpanded && (jsx("div", { className: "text-[11px] text-white/95 leading-relaxed animate-fade-in", children: socialItem.audienceReason })), socialItem.requiredTags &&
|
|
2774
2775
|
socialItem.requiredTags.length > 0 &&
|
|
2775
|
-
isExpanded && (jsx("div", { className: "flex flex-wrap gap-1 mt-2 pt-2 border-t border-white/20 animate-fade-in", children: socialItem.requiredTags.map(function (tag, idx) { return (jsx("span", { className: "rounded-md bg-white/20 text-white/95 backdrop-blur-sm border border-white/30 whitespace-nowrap ".concat(isMobile ? "text-[8px] px-1 py-0.5" : "text-[9px] px-1.5 py-0.5"), children: tag }, idx)); }) }))] })), !hideFooter && (jsx(SocialMediaBar, { platform: socialItem.type, isHovered: isHovered, showPreview: typeof onPreview === "function", onEdit: onEdit ? function () { return onEdit(socialItem); } : undefined, onDelete: onDelete ? function () { return onDelete(socialItem); } : undefined, onPublish: onPublish ? function () { return onPublish(socialItem); } : undefined, onPreview: function () { return handlePreview(socialItem); }, translations: {
|
|
2776
|
+
isExpanded && (jsx("div", { className: "flex flex-wrap gap-1 mt-2 pt-2 border-t border-white/20 animate-fade-in", children: socialItem.requiredTags.map(function (tag, idx) { return (jsx("span", { className: "rounded-md bg-white/20 text-white/95 backdrop-blur-sm border border-white/30 whitespace-nowrap ".concat(isMobile ? "text-[8px] px-1 py-0.5" : "text-[9px] px-1.5 py-0.5"), children: tag }, idx)); }) }))] })), !hideFooter && (jsx(SocialMediaBar, { platform: socialItem.type, isHovered: isHovered, actionsAlwaysVisible: isMobileOrTablet, showPreview: typeof onPreview === "function", onEdit: onEdit ? function () { return onEdit(socialItem); } : undefined, onDelete: onDelete ? function () { return onDelete(socialItem); } : undefined, onPublish: onPublish ? function () { return onPublish(socialItem); } : undefined, onPreview: function () { return handlePreview(socialItem); }, translations: {
|
|
2776
2777
|
editButtonLabel: translations.editButtonLabel,
|
|
2777
2778
|
deleteButtonLabel: translations.deleteButtonLabel,
|
|
2778
2779
|
publishButtonLabel: translations.publishButtonLabel,
|
|
2779
2780
|
previewButtonLabel: translations.previewButtonLabel,
|
|
2780
2781
|
} }))] }));
|
|
2781
|
-
}, [hideAudienceInfo, hideFooter, onEdit, onDelete, onPublish, handlePreview, isMobile]);
|
|
2782
|
+
}, [hideAudienceInfo, hideFooter, onEdit, onDelete, onPublish, handlePreview, isMobile, isMobileOrTablet]);
|
|
2782
2783
|
return (jsx(ContentCarousel, { items: items, onItemClick: onItemClick, className: className, emptyStateRedirectPath: emptyStateRedirectPath, translations: translations, renderFooter: renderSocialFooterWithAudience, haveChip: haveChip }));
|
|
2783
2784
|
};
|
|
2784
2785
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocialMediaCarousel.d.ts","sourceRoot":"","sources":["../../../../../src/components/content-carousel/variants/SocialMediaCarousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAuC5E;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,
|
|
1
|
+
{"version":3,"file":"SocialMediaCarousel.d.ts","sourceRoot":"","sources":["../../../../../src/components/content-carousel/variants/SocialMediaCarousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAuC5E;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAkIlE,CAAC"}
|