@beweco/aurora-ui 0.1.53 → 0.1.55
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 +141 -77
- package/dist/index.esm.js +140 -76
- package/dist/types/components/content-carousel/ContentCarousel.d.ts.map +1 -1
- package/dist/types/components/content-carousel/ContentCarousel.types.d.ts +5 -0
- package/dist/types/components/content-carousel/ContentCarousel.types.d.ts.map +1 -1
- package/dist/types/components/content-carousel/variants/SocialMediaCarousel.d.ts.map +1 -1
- package/dist/types/components/content-carousel/variants/SocialMediaCarousel.types.d.ts +2 -0
- package/dist/types/components/content-carousel/variants/SocialMediaCarousel.types.d.ts.map +1 -1
- package/dist/types/components/menu/Menu.d.ts +1 -6
- package/dist/types/components/menu/Menu.d.ts.map +1 -1
- package/dist/types/components/menu/Menu.types.d.ts +38 -7
- package/dist/types/components/menu/Menu.types.d.ts.map +1 -1
- package/dist/types/components/menu/_internal/menu-mobile-bottom-bar/MenuMobileBottomBar.d.ts +4 -0
- package/dist/types/components/menu/_internal/menu-mobile-bottom-bar/MenuMobileBottomBar.d.ts.map +1 -0
- package/dist/types/components/menu/_internal/menu-mobile-bottom-bar/MenuMobileBottomBar.types.d.ts +12 -0
- package/dist/types/components/menu/_internal/menu-mobile-bottom-bar/MenuMobileBottomBar.types.d.ts.map +1 -0
- package/dist/types/components/menu/_internal/menu-mobile-bottom-bar/index.d.ts +3 -0
- package/dist/types/components/menu/_internal/menu-mobile-bottom-bar/index.d.ts.map +1 -0
- package/dist/types/components/menu/_internal/menu-nav-list/MenuNavList.d.ts.map +1 -1
- package/dist/types/components/menu/index.d.ts +3 -1
- package/dist/types/components/menu/index.d.ts.map +1 -1
- package/dist/types/components/social-media-preview/SocialMediaPreview.d.ts.map +1 -1
- package/dist/types/components/social-media-preview/SocialMediaPreview.types.d.ts +4 -0
- package/dist/types/components/social-media-preview/SocialMediaPreview.types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Skeleton, Button as Button$1, Chip as Chip$1, Accordion, AccordionItem, Pagination as Pagination$1, DatePicker as DatePicker$1, DateRangePicker as DateRangePicker$1, Input as Input$1, RadioGroup, Radio, cn, Card as Card$1, Spacer, Tabs, Tab, Dropdown, DropdownTrigger, DropdownMenu, DropdownItem, Autocomplete, Breadcrumbs, BreadcrumbItem, DropdownSection, Badge, Spinner, ListboxItem, Popover, PopoverTrigger, Tooltip as Tooltip$1, PopoverContent, Listbox, ListboxSection, Avatar,
|
|
1
|
+
import { Skeleton, Button as Button$1, Chip as Chip$1, Accordion, AccordionItem, Pagination as Pagination$1, DatePicker as DatePicker$1, DateRangePicker as DateRangePicker$1, Input as Input$1, RadioGroup, Radio, cn, Card as Card$1, Spacer, Tabs, Tab, Dropdown, DropdownTrigger, DropdownMenu, DropdownItem, Autocomplete, Breadcrumbs, BreadcrumbItem, DropdownSection, Badge, Spinner, ListboxItem, Popover, PopoverTrigger, Tooltip as Tooltip$1, PopoverContent, Listbox, ListboxSection, Avatar, Link, Switch as Switch$1, TimeInput as TimeInput$1, Select as Select$1, Image as Image$1, Table, TableHeader, TableColumn, TableBody, TableRow, TableCell, Textarea as Textarea$1, Alert, Modal as Modal$1, ModalContent as ModalContent$1, ModalHeader as ModalHeader$1, ModalBody as ModalBody$1, Slider, ModalFooter as ModalFooter$1, CardBody, SelectItem, Drawer, DrawerContent, DrawerBody, AutocompleteItem, Divider } from '@heroui/react';
|
|
2
2
|
export * from '@heroui/react';
|
|
3
3
|
export { Slider } from '@heroui/react';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1382,9 +1382,9 @@ var defaultTranslations$b = {
|
|
|
1382
1382
|
* ```
|
|
1383
1383
|
*/
|
|
1384
1384
|
var ContentCarousel = function (_a) {
|
|
1385
|
-
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;
|
|
1385
|
+
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, _e = _a.haveChip, haveChip = _e === void 0 ? false : _e;
|
|
1386
1386
|
var t = __assign(__assign({}, defaultTranslations$b), translations);
|
|
1387
|
-
var
|
|
1387
|
+
var _f = useState(items.length >= 3 ? 1 : 0), activeIndex = _f[0], setActiveIndex = _f[1];
|
|
1388
1388
|
// Reset to show 3 images when items change
|
|
1389
1389
|
useEffect(function () {
|
|
1390
1390
|
setActiveIndex(items.length >= 3 ? 1 : 0);
|
|
@@ -1426,7 +1426,7 @@ var ContentCarousel = function (_a) {
|
|
|
1426
1426
|
if (position === "hidden") {
|
|
1427
1427
|
return null;
|
|
1428
1428
|
}
|
|
1429
|
-
return (jsx(CarouselItemComponent, { item: item, position: position, onClick: function () { return handleItemClick(item); }, translations: t, renderFooter: renderFooter, renderHeader: renderHeader, renderBody: renderBody }, item.id));
|
|
1429
|
+
return (jsx(CarouselItemComponent, { item: item, position: position, onClick: function () { return handleItemClick(item); }, translations: t, renderFooter: renderFooter, renderHeader: renderHeader, renderBody: renderBody, haveChip: haveChip }, item.id));
|
|
1430
1430
|
})] }), items.length > 1 && (jsx("div", { className: "flex justify-center mt-4", children: jsx("div", { className: "flex justify-center gap-2", children: items.map(function (_, index) { return (jsx("button", { type: "button", onClick: function () { return setActiveIndex(index); }, className: "rounded-full transition-all duration-300 hover:scale-110 ".concat(index === activeIndex
|
|
1431
1431
|
? "w-8 h-2 bg-gradient-to-r from-primary-500 to-primary-600 shadow-lg shadow-primary-500/50"
|
|
1432
1432
|
: "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)); }) }) }))] }) }));
|
|
@@ -1437,7 +1437,7 @@ var ContentCarousel = function (_a) {
|
|
|
1437
1437
|
* @internal
|
|
1438
1438
|
*/
|
|
1439
1439
|
function CarouselItemComponent(_a) {
|
|
1440
|
-
var item = _a.item, position = _a.position, onClick = _a.onClick, translations = _a.translations, renderFooter = _a.renderFooter, renderHeader = _a.renderHeader, renderBody = _a.renderBody;
|
|
1440
|
+
var item = _a.item, position = _a.position, onClick = _a.onClick, translations = _a.translations, renderFooter = _a.renderFooter, renderHeader = _a.renderHeader, renderBody = _a.renderBody, haveChip = _a.haveChip;
|
|
1441
1441
|
var _b = useState(false), isHovered = _b[0], setIsHovered = _b[1];
|
|
1442
1442
|
var captionText = item.caption || item.title;
|
|
1443
1443
|
// Get styles based on position
|
|
@@ -1468,7 +1468,7 @@ function CarouselItemComponent(_a) {
|
|
|
1468
1468
|
item: item,
|
|
1469
1469
|
isHovered: isHovered,
|
|
1470
1470
|
translations: translations,
|
|
1471
|
-
}) })), renderBody ? (jsx("div", { className: "relative w-full h-full z-10", children: renderBody(item, isHovered) })) : (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: [jsx("div", { children: jsx("h3", { className: "text-white text-3xl font-semibold mb-2 text-left drop-shadow-lg", children: item.title }) }), jsx("div", { className: "space-y-3 overflow-hidden", children: 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 () {
|
|
1471
|
+
}) })), haveChip && item.chipContent != null && (jsx("div", { className: "absolute top-4 right-4 z-30", children: item.chipContent })), renderBody ? (jsx("div", { className: "relative w-full h-full z-10", children: renderBody(item, isHovered) })) : (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: [jsx("div", { children: jsx("h3", { className: "text-white text-3xl font-semibold mb-2 text-left drop-shadow-lg", children: item.title }) }), jsx("div", { className: "space-y-3 overflow-hidden", children: 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 () {
|
|
1472
1472
|
var footerContent = renderFooter({
|
|
1473
1473
|
item: item,
|
|
1474
1474
|
isHovered: isHovered,
|
|
@@ -1547,7 +1547,7 @@ if (typeof document !== "undefined") {
|
|
|
1547
1547
|
* ```
|
|
1548
1548
|
*/
|
|
1549
1549
|
var SocialMediaCarousel = function (_a) {
|
|
1550
|
-
var items = _a.items, onItemClick = _a.onItemClick, onEdit = _a.onEdit, onDelete = _a.onDelete, onPublish = _a.onPublish, onPreview = _a.onPreview, _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;
|
|
1550
|
+
var items = _a.items, onItemClick = _a.onItemClick, onEdit = _a.onEdit, onDelete = _a.onDelete, onPublish = _a.onPublish, onPreview = _a.onPreview, _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, _j = _a.haveChip, haveChip = _j === void 0 ? false : _j;
|
|
1551
1551
|
var handlePreview = useCallback(function (item) {
|
|
1552
1552
|
if (onPreview) {
|
|
1553
1553
|
onPreview(item);
|
|
@@ -1575,7 +1575,7 @@ var SocialMediaCarousel = function (_a) {
|
|
|
1575
1575
|
previewButtonLabel: translations.previewButtonLabel,
|
|
1576
1576
|
} }))] }));
|
|
1577
1577
|
}, [hideAudienceInfo, hideFooter, onEdit, onDelete, onPublish, handlePreview]);
|
|
1578
|
-
return (jsx(ContentCarousel, { items: items, onItemClick: onItemClick, className: className, emptyStateRedirectPath: emptyStateRedirectPath, translations: translations, renderFooter: renderSocialFooterWithAudience }));
|
|
1578
|
+
return (jsx(ContentCarousel, { items: items, onItemClick: onItemClick, className: className, emptyStateRedirectPath: emptyStateRedirectPath, translations: translations, renderFooter: renderSocialFooterWithAudience, haveChip: haveChip }));
|
|
1579
1579
|
};
|
|
1580
1580
|
|
|
1581
1581
|
// Traducciones por defecto en español
|
|
@@ -1704,12 +1704,12 @@ var NotificationButton = function (_a) {
|
|
|
1704
1704
|
};
|
|
1705
1705
|
NotificationButton.displayName = "NotificationButton";
|
|
1706
1706
|
|
|
1707
|
-
var DEFAULT_TRANSLATIONS$
|
|
1707
|
+
var DEFAULT_TRANSLATIONS$4 = {
|
|
1708
1708
|
logout: "Cerrar sesión",
|
|
1709
1709
|
};
|
|
1710
1710
|
var HeaderComponent = function (_a) {
|
|
1711
1711
|
var notificationCount = _a.notificationCount, options = _a.options, onMenuClick = _a.onMenuClick, onLogout = _a.onLogout, _b = _a.translations, translations = _b === void 0 ? {} : _b, breadcrumbs = _a.breadcrumbs, onNotificationClick = _a.onNotificationClick, onOptionSelect = _a.onOptionSelect, onBreadcrumbClick = _a.onBreadcrumbClick;
|
|
1712
|
-
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$
|
|
1712
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$4), translations);
|
|
1713
1713
|
return (jsx("header", { className: "header__container", children: jsxs("div", { className: "flex items-center justify-between w-full", children: [jsxs("div", { className: "flex items-center gap-4", children: [jsx(Button$1, { className: "sm:hidden", isIconOnly: true, variant: "light", startContent: jsx(IconComponent, { icon: "solar:hamburger-menu-linear" }), onPress: onMenuClick }), breadcrumbs && breadcrumbs.length > 0 && (jsx(BreadcrumbsComponent, { items: breadcrumbs, onItemClick: onBreadcrumbClick }))] }), jsxs("div", { className: "flex items-center gap-4", children: [jsx(NotificationButton, { notificationCount: notificationCount, onPress: onNotificationClick }), jsx(ConfigMenu, { options: options, onLogout: onLogout, onOptionSelect: onOptionSelect, translations: t })] })] }) }));
|
|
1714
1714
|
};
|
|
1715
1715
|
HeaderComponent.displayName = "Header";
|
|
@@ -1833,7 +1833,7 @@ KanbanColumn.displayName = "KanbanColumn";
|
|
|
1833
1833
|
* Traducciones por defecto en español.
|
|
1834
1834
|
* Se mezclan con las traducciones proporcionadas por el usuario.
|
|
1835
1835
|
*/
|
|
1836
|
-
var DEFAULT_TRANSLATIONS$
|
|
1836
|
+
var DEFAULT_TRANSLATIONS$3 = {
|
|
1837
1837
|
dropHere: "Soltar aquí",
|
|
1838
1838
|
emptyMessage: "No hay elementos",
|
|
1839
1839
|
};
|
|
@@ -1867,7 +1867,7 @@ var columnGapClasses = {
|
|
|
1867
1867
|
var KanbanComponent = function (_a) {
|
|
1868
1868
|
var columns = _a.columns, renderItem = _a.renderItem, onCardClick = _a.onCardClick, onItemMove = _a.onItemMove, isDraggable = _a.isDraggable, cardClassName = _a.cardClassName, isCardClickable = _a.isCardClickable, className = _a.className, _b = _a.columnWidth, columnWidth = _b === void 0 ? "280px" : _b, _c = _a.columnGap, columnGap = _c === void 0 ? "md" : _c, _d = _a.horizontalScroll, horizontalScroll = _d === void 0 ? true : _d, columnMaxHeight = _a.columnMaxHeight, renderColumnHeader = _a.renderColumnHeader, renderEmptyState = _a.renderEmptyState, _e = _a.translations, translations = _e === void 0 ? {} : _e, onLoadMore = _a.onLoadMore;
|
|
1869
1869
|
// Mezclar traducciones del usuario con las por defecto
|
|
1870
|
-
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$
|
|
1870
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$3), translations);
|
|
1871
1871
|
// Determinar si drag está habilitado
|
|
1872
1872
|
var dragEnabled = isDraggable !== null && isDraggable !== void 0 ? isDraggable : !!onItemMove;
|
|
1873
1873
|
// Estado del drag actual
|
|
@@ -1975,6 +1975,24 @@ var ImagePreview = function (_a) {
|
|
|
1975
1975
|
: undefined, role: isClickable ? "button" : undefined, tabIndex: isClickable ? 0 : undefined, "aria-label": isClickable ? t.clickableImageAriaLabel : undefined }), showRemoveButton && onRemove && (jsx("button", { type: "button", onClick: function () { return handleRemove(image.id || "", index); }, "aria-label": t.removeButtonAriaLabel, className: "\n\t\t\t\t\t\t\t\t\tabsolute -top-2 -right-2 \n\t\t\t\t\t\t\t\t\tp-1 rounded-full \n\t\t\t\t\t\t\t\t\tbg-danger-500 hover:bg-danger-600 \n\t\t\t\t\t\t\t\t\ttext-white \n\t\t\t\t\t\t\t\t\tcursor-pointer \n\t\t\t\t\t\t\t\t\ttransition-colors\n\t\t\t\t\t\t\t\t\tfocus:outline-none \n\t\t\t\t\t\t\t\t\tfocus:ring-2 \n\t\t\t\t\t\t\t\t\tfocus:ring-danger-400 \n\t\t\t\t\t\t\t\t\tfocus:ring-offset-2\n\t\t\t\t\t\t\t\t", children: jsx(IconComponent, { size: size === "micro" ? "sm" : "md", icon: "solar:trash-bin-minimalistic-outline" }) }))] }) }, image.id || index)); }) }));
|
|
1976
1976
|
};
|
|
1977
1977
|
|
|
1978
|
+
var EnumMenuNavListItem;
|
|
1979
|
+
(function (EnumMenuNavListItem) {
|
|
1980
|
+
EnumMenuNavListItem["Nest"] = "nest";
|
|
1981
|
+
})(EnumMenuNavListItem || (EnumMenuNavListItem = {}));
|
|
1982
|
+
|
|
1983
|
+
var MAX_VISIBLE_ITEMS = 4;
|
|
1984
|
+
var MenuMobileBottomBar = React.memo(function MenuMobileBottomBar(_a) {
|
|
1985
|
+
var items = _a.items, selectedKey = _a.selectedKey, onSelect = _a.onSelect, onMenuPress = _a.onMenuPress, menuLabel = _a.menuLabel, navAriaLabel = _a.navAriaLabel, _b = _a.forceVisible, forceVisible = _b === void 0 ? false : _b;
|
|
1986
|
+
var visibleItems = items.slice(0, MAX_VISIBLE_ITEMS);
|
|
1987
|
+
var handleItemPress = useCallback(function (key, href) {
|
|
1988
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(key, href);
|
|
1989
|
+
}, [onSelect]);
|
|
1990
|
+
return (jsx("nav", { className: cn("menu-mobile-bottom-bar", forceVisible && "menu-mobile-bottom-bar--force-visible"), "aria-label": navAriaLabel, children: jsxs("div", { className: "menu-mobile-bottom-bar__container", children: [visibleItems.map(function (item) {
|
|
1991
|
+
var isSelected = selectedKey === item.key;
|
|
1992
|
+
return (jsxs("button", { type: "button", className: cn("menu-mobile-bottom-bar__item", isSelected && "menu-mobile-bottom-bar__item--active"), onClick: function () { return handleItemPress(item.key, item.href); }, "aria-current": isSelected ? "page" : undefined, "aria-label": item.title, children: [item.icon && (jsx(IconComponent, { icon: item.icon, size: "md", className: "menu-mobile-bottom-bar__icon" })), jsx("span", { className: "menu-mobile-bottom-bar__label", children: item.title })] }, item.key));
|
|
1993
|
+
}), jsxs("button", { type: "button", className: "menu-mobile-bottom-bar__item", onClick: onMenuPress, "aria-label": menuLabel, children: [jsx(IconComponent, { icon: "solar:hamburger-menu-linear", size: "md", className: "menu-mobile-bottom-bar__icon" }), jsx("span", { className: "menu-mobile-bottom-bar__label", children: menuLabel })] })] }) }));
|
|
1994
|
+
});
|
|
1995
|
+
|
|
1978
1996
|
function normalizeClass(value) {
|
|
1979
1997
|
if (typeof value === "string") {
|
|
1980
1998
|
return value || undefined;
|
|
@@ -2007,11 +2025,6 @@ var getItemClasses = function (isCollapsed, itemClassesProp) {
|
|
|
2007
2025
|
})) }));
|
|
2008
2026
|
};
|
|
2009
2027
|
|
|
2010
|
-
var EnumMenuNavListItem;
|
|
2011
|
-
(function (EnumMenuNavListItem) {
|
|
2012
|
-
EnumMenuNavListItem["Nest"] = "nest";
|
|
2013
|
-
})(EnumMenuNavListItem || (EnumMenuNavListItem = {}));
|
|
2014
|
-
|
|
2015
2028
|
/**
|
|
2016
2029
|
* @component MenuNavList
|
|
2017
2030
|
* @description A versatile navigation list component that can be displayed in an expanded or collapsed state.
|
|
@@ -2033,34 +2046,43 @@ var EnumMenuNavListItem;
|
|
|
2033
2046
|
*/
|
|
2034
2047
|
var MenuNavList = React.forwardRef(function (_a, ref) {
|
|
2035
2048
|
var items = _a.items, isCollapsed = _a.isCollapsed, defaultSelectedKey = _a.defaultSelectedKey, onSelect = _a.onSelect, hideEndContent = _a.hideEndContent, _b = _a.sectionClasses, sectionClassesProp = _b === void 0 ? {} : _b, _c = _a.itemClasses, itemClassesProp = _c === void 0 ? {} : _c, iconClassName = _a.iconClassName, classNames = _a.classNames, className = _a.className, props = __rest(_a, ["items", "isCollapsed", "defaultSelectedKey", "onSelect", "hideEndContent", "sectionClasses", "itemClasses", "iconClassName", "classNames", "className"]);
|
|
2036
|
-
|
|
2049
|
+
// Componente totalmente controlado: la única fuente de verdad es defaultSelectedKey (menuItems.selectedKey).
|
|
2050
|
+
// Sin estado interno se evita que la selección quede "pegada" al navegar sin recargar.
|
|
2051
|
+
var selectedKey = defaultSelectedKey;
|
|
2037
2052
|
// Component styles
|
|
2038
2053
|
var sectionClasses = getSectionClasses(isCollapsed, sectionClassesProp);
|
|
2039
2054
|
var itemClasses = getItemClasses(isCollapsed, itemClassesProp);
|
|
2040
|
-
//
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
var handleItemPress = React.useCallback(function (item, parentKey) {
|
|
2044
|
-
var keySelected = typeof parentKey === "string" ? parentKey : item.key;
|
|
2045
|
-
setSelected(keySelected);
|
|
2046
|
-
onSelect === null || onSelect === void 0 ? void 0 : onSelect(keySelected, item.href);
|
|
2055
|
+
// Al hacer clic solo notificamos al padre; el padre actualiza selectedKey y re-renderiza.
|
|
2056
|
+
var handleItemPress = React.useCallback(function (item) {
|
|
2057
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(item.key, item.href);
|
|
2047
2058
|
if (document.activeElement instanceof HTMLElement) {
|
|
2048
2059
|
document.activeElement.blur();
|
|
2049
2060
|
}
|
|
2050
|
-
}, [
|
|
2061
|
+
}, [onSelect]);
|
|
2062
|
+
// Renders a sub-item (text-only, hierarchy line, pill selected state).
|
|
2063
|
+
// Aplicamos estilos de selección por key porque el Listbox anidado puede no inyectar data-selected.
|
|
2064
|
+
var renderSubItem = React.useCallback(function (item, parentKey) {
|
|
2065
|
+
var _a;
|
|
2066
|
+
item.href; var itemProps = __rest(item, ["href"]);
|
|
2067
|
+
var isSelected = item.key === selectedKey;
|
|
2068
|
+
return (createElement(ListboxItem, __assign({}, itemProps, { key: item.key, textValue: item.title, title: item.title, startContent: null, endContent: (_a = item.endContent) !== null && _a !== void 0 ? _a : null, "aria-selected": isSelected, "data-menu-subitem-selected": isSelected ? "true" : "false", classNames: {
|
|
2069
|
+
base: cn("min-h-9 rounded-large px-3 py-2 menu-nav-list__sub-item", "text-default-500 data-[hover=true]:text-default-700", "data-[selected=true]:bg-default-100 data-[selected=true]:text-foreground data-[selected=true]:font-semibold"),
|
|
2070
|
+
}, onPress: function () { return handleItemPress(item); } })));
|
|
2071
|
+
}, [handleItemPress, selectedKey]);
|
|
2051
2072
|
// Renders the item displayed inside the Popover when the menu is collapsed.
|
|
2052
2073
|
var renderCompactItem = React.useCallback(function (item, parentKey) {
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
return (createElement(ListboxItem, __assign({}, itemProps, { key: item.key, endContent: (_a = item.endContent) !== null && _a !== void 0 ? _a : null, startContent: item.icon ? (jsx(IconComponent, { className: cn("text-default-500", "group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" })) : (((_b = item.startContent) !== null && _b !== void 0 ? _b : null)), textValue: item.title, title: item.title, className: "data-[hover=true]:text-default-600", onPress: function () { return handleItemPress(item, parentKey); } })));
|
|
2056
|
-
}, [handleItemPress, iconClassName]);
|
|
2074
|
+
return renderSubItem(item, parentKey);
|
|
2075
|
+
}, [renderSubItem]);
|
|
2057
2076
|
// Renders a nested item, i.e., an item that has sub-items.
|
|
2058
2077
|
// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
|
|
2059
2078
|
var renderNestItem = React.useCallback(function (item) {
|
|
2060
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
2079
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
2061
2080
|
var isNestType = item.items &&
|
|
2062
2081
|
((_a = item.items) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
|
|
2063
2082
|
(item === null || item === void 0 ? void 0 : item.type) === EnumMenuNavListItem.Nest;
|
|
2083
|
+
// Abrir el grupo si el selectedKey actual es uno de sus sub-ítems
|
|
2084
|
+
var isSelectedKeyInThisNest = Boolean(selectedKey && ((_b = item.items) === null || _b === void 0 ? void 0 : _b.length)) &&
|
|
2085
|
+
((_d = (_c = item.items) === null || _c === void 0 ? void 0 : _c.some(function (child) { return child.key === selectedKey; })) !== null && _d !== void 0 ? _d : false);
|
|
2064
2086
|
item.href; var itemProps = __rest(item, ["href"]);
|
|
2065
2087
|
return (createElement(ListboxItem, __assign({}, itemProps, { key: item.key, classNames: {
|
|
2066
2088
|
base: cn({
|
|
@@ -2072,22 +2094,21 @@ var MenuNavList = React.forwardRef(function (_a, ref) {
|
|
|
2072
2094
|
}, "rounded-large"),
|
|
2073
2095
|
}, endContent: isCollapsed || isNestType || hideEndContent
|
|
2074
2096
|
? null
|
|
2075
|
-
: ((
|
|
2076
|
-
isCollapsed && isNestType ? (jsxs(Popover, { placement: "right", offset: 10, children: [jsx(PopoverTrigger, { children:
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
}, [isCollapsed, hideEndContent, iconClassName, items, selected]);
|
|
2097
|
+
: ((_e = item.endContent) !== null && _e !== void 0 ? _e : null), startContent: isCollapsed || isNestType ? null : item.icon ? (jsx(IconComponent, { className: cn("text-default-500 group-data-[selected=true]:text-foreground", iconClassName), icon: item.icon, size: "lg" })) : (((_f = item.startContent) !== null && _f !== void 0 ? _f : null)), title: isCollapsed || isNestType ? null : item.title }),
|
|
2098
|
+
isCollapsed && isNestType ? (jsxs(Popover, { placement: "right", offset: 10, children: [jsx(PopoverTrigger, { children: jsxs("div", { className: "flex w-full items-center justify-center gap-1", children: [jsx(Tooltip$1, { content: item.title, placement: "right", classNames: {
|
|
2099
|
+
base: "text-default-500",
|
|
2100
|
+
}, children: jsx("div", { className: "flex items-center justify-center", children: item.icon ? (jsx(IconComponent, { className: cn("text-default-500 group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" })) : (((_g = item.startContent) !== null && _g !== void 0 ? _g : null)) }) }), jsx(IconComponent, { className: "text-default-400 shrink-0", icon: "solar:alt-arrow-right-outline", size: "sm", "aria-hidden": true })] }) }), jsx(PopoverContent, { className: "border border-default-200 bg-white p-0 shadow-md", children: jsxs("div", { className: "min-w-[200px] rounded-large p-2", children: [jsx("div", { className: "px-3 py-2 text-small font-semibold text-default-500", children: item.title }), jsx(Listbox, { className: "mt-0.5", classNames: {
|
|
2101
|
+
list: "border-l border-default-200 pl-4 ml-2 gap-0.5",
|
|
2102
|
+
}, "aria-label": "Nested menu items", items: (_h = item.items) !== null && _h !== void 0 ? _h : [item], variant: "flat", hideSelectedIcon: true, selectedKeys: [selectedKey], selectionMode: "single", children: function (child) {
|
|
2103
|
+
var _a;
|
|
2104
|
+
return ((_a = item.items) === null || _a === void 0 ? void 0 : _a.length)
|
|
2105
|
+
? renderCompactItem(child)
|
|
2106
|
+
: renderCompactItem(item);
|
|
2107
|
+
} })] }) })] })) : null,
|
|
2108
|
+
!isCollapsed && isNestType ? (jsxs("details", { className: "group/details w-full p-0", "aria-label": item.title, open: isSelectedKeyInThisNest, children: [jsx("summary", { className: cn("flex h-11 list-none cursor-pointer items-center gap-2 rounded-large px-3 py-1.5 pr-3", "text-default-500 hover:bg-default-100 [&::-webkit-details-marker]:hidden [&::marker]:hidden"), children: item.icon ? (jsxs(Fragment, { children: [jsx(IconComponent, { className: cn("text-default-500 group-open/details:text-default-600", iconClassName), icon: item.icon, size: "lg" }), jsx("span", { className: "text-small font-medium text-default-500 group-open/details:text-default-600 flex-1", children: item.title }), jsxs("span", { className: "flex shrink-0 items-center text-default-400", children: [jsx(IconComponent, { className: "hidden group-open/details:inline-block", icon: "solar:alt-arrow-down-outline", size: "sm", "aria-hidden": true }), jsx(IconComponent, { className: "inline-block group-open/details:hidden", icon: "solar:alt-arrow-right-outline", size: "sm", "aria-hidden": true })] })] })) : (jsxs(Fragment, { children: [(_j = item.startContent) !== null && _j !== void 0 ? _j : null, jsxs("span", { className: "ml-auto flex shrink-0 items-center text-default-400", children: [jsx(IconComponent, { className: "hidden group-open/details:inline-block", icon: "solar:alt-arrow-down-outline", size: "sm", "aria-hidden": true }), jsx(IconComponent, { className: "inline-block group-open/details:hidden", icon: "solar:alt-arrow-right-outline", size: "sm", "aria-hidden": true })] })] })) }), jsx("div", { className: "py-0 pl-4", children: item.items && ((_k = item.items) === null || _k === void 0 ? void 0 : _k.length) > 0 ? (jsx(Listbox, { className: "mt-0.5", classNames: {
|
|
2109
|
+
list: cn("border-l border-default-200 pl-4 ml-2 gap-0.5"),
|
|
2110
|
+
}, items: item.items, variant: "flat", hideSelectedIcon: true, selectedKeys: [selectedKey], selectionMode: "single", children: function (child) { return renderSubItem(child); } })) : (renderItem(item)) })] })) : null));
|
|
2111
|
+
}, [isCollapsed, hideEndContent, iconClassName, items, selectedKey, renderSubItem]);
|
|
2091
2112
|
// Renders a simple item (without children) in the navigation list.
|
|
2092
2113
|
// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
|
|
2093
2114
|
var renderItem = React.useCallback(function (item, parentKey) {
|
|
@@ -2098,15 +2119,15 @@ var MenuNavList = React.forwardRef(function (_a, ref) {
|
|
|
2098
2119
|
if (isNestType) {
|
|
2099
2120
|
return renderNestItem(item);
|
|
2100
2121
|
}
|
|
2101
|
-
var isItemSelected =
|
|
2122
|
+
var isItemSelected = selectedKey === item.key;
|
|
2102
2123
|
item.href; var itemProps = __rest(item, ["href"]);
|
|
2103
|
-
return (createElement(ListboxItem, __assign({}, itemProps, { key: item.key, endContent: isCollapsed || hideEndContent ? null : ((_b = item.endContent) !== null && _b !== void 0 ? _b : null), startContent: isCollapsed ? null : item.icon ? (jsx(IconComponent, { className: cn("text-default-500", "group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" })) : (((_c = item.startContent) !== null && _c !== void 0 ? _c : null)), textValue: item.title, title: isCollapsed ? null : item.title, onPress: function () { return handleItemPress(item
|
|
2124
|
+
return (createElement(ListboxItem, __assign({}, itemProps, { key: item.key, endContent: isCollapsed || hideEndContent ? null : ((_b = item.endContent) !== null && _b !== void 0 ? _b : null), startContent: isCollapsed ? null : item.icon ? (jsx(IconComponent, { className: cn("text-default-500", "group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" })) : (((_c = item.startContent) !== null && _c !== void 0 ? _c : null)), textValue: item.title, title: isCollapsed ? null : item.title, onPress: function () { return handleItemPress(item); }, "aria-selected": isItemSelected, "aria-label": item.title || "Menu item ".concat(item.key) }), isCollapsed ? (jsx(Tooltip$1, { content: item.title, placement: "right", closeDelay: 200, shouldCloseOnBlur: false, classNames: {
|
|
2104
2125
|
base: "text-default-500",
|
|
2105
2126
|
}, children: jsx("div", { className: "flex w-full items-center justify-center", "aria-hidden": "true", children: item.icon ? (jsx(IconComponent, { className: cn("text-default-500", "group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" })) : (((_d = item.startContent) !== null && _d !== void 0 ? _d : null)) }) })) : null));
|
|
2106
2127
|
},
|
|
2107
2128
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2108
2129
|
[isCollapsed, hideEndContent, iconClassName, itemClasses === null || itemClasses === void 0 ? void 0 : itemClasses.base]);
|
|
2109
|
-
return (jsx(Listbox, __assign({ ref: ref, hideSelectedIcon: true, as: "nav", className: cn("list-none", className), classNames: __assign(__assign({}, classNames), { list: cn("items-center", classNames === null || classNames === void 0 ? void 0 : classNames.list) }), color: "default", itemClasses: __assign(__assign({}, itemClasses), { base: cn("px-3 min-h-11 rounded-large h-[44px] data-[selected=true]:bg-primary-100", itemClasses === null || itemClasses === void 0 ? void 0 : itemClasses.base), title: cn("text-small font-medium text-default-500 group-data-[selected=true]:text-default-600 ", itemClasses === null || itemClasses === void 0 ? void 0 : itemClasses.title) }), items: items, selectedKeys: [
|
|
2130
|
+
return (jsx(Listbox, __assign({ ref: ref, hideSelectedIcon: true, as: "nav", className: cn("list-none", className), classNames: __assign(__assign({}, classNames), { list: cn("items-center", classNames === null || classNames === void 0 ? void 0 : classNames.list) }), color: "default", itemClasses: __assign(__assign({}, itemClasses), { base: cn("px-3 min-h-11 rounded-large h-[44px] data-[selected=true]:bg-primary-100", itemClasses === null || itemClasses === void 0 ? void 0 : itemClasses.base), title: cn("text-small font-medium text-default-500 group-data-[selected=true]:text-default-600 ", itemClasses === null || itemClasses === void 0 ? void 0 : itemClasses.title) }), items: items, selectedKeys: [selectedKey], selectionMode: "single", variant: "flat" }, props, { children: function (item) {
|
|
2110
2131
|
var _a, _b;
|
|
2111
2132
|
return item.items &&
|
|
2112
2133
|
((_a = item.items) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
|
|
@@ -2115,42 +2136,85 @@ var MenuNavList = React.forwardRef(function (_a, ref) {
|
|
|
2115
2136
|
});
|
|
2116
2137
|
MenuNavList.displayName = "MenuNavList";
|
|
2117
2138
|
|
|
2139
|
+
var DEFAULT_TRANSLATIONS$2 = {
|
|
2140
|
+
menuLabel: "Menú",
|
|
2141
|
+
closeSidebarAriaLabel: "Cerrar menú lateral",
|
|
2142
|
+
mobileNavAriaLabel: "Navegación móvil",
|
|
2143
|
+
logoAlt: "Logo de",
|
|
2144
|
+
notDefinedLabel: "no definido",
|
|
2145
|
+
};
|
|
2118
2146
|
/**
|
|
2119
2147
|
* Sidebar menu component for navigation and user actions.
|
|
2120
|
-
*
|
|
2121
|
-
* @param userInfo - Object with user avatar, name, and email.
|
|
2122
|
-
* @param helpButton - Help button configuration.
|
|
2123
|
-
* @param upgradeCard - Optional upgrade card configuration.
|
|
2124
|
-
* @param isOpenSidebar - Controls sidebar visibility.
|
|
2125
|
-
* @param onOpenSidebarChange - Callback to open/close sidebar.
|
|
2148
|
+
* On mobile, shows a bottom navigation bar with items from the specified group.
|
|
2126
2149
|
*/
|
|
2127
2150
|
var MenuComponent = React.memo(function Menu(_a) {
|
|
2128
|
-
var
|
|
2129
|
-
|
|
2130
|
-
var
|
|
2131
|
-
|
|
2151
|
+
var _b, _c;
|
|
2152
|
+
var commerceInfo = _a.commerceInfo, userInfo = _a.userInfo, helpButton = _a.helpButton, isOpenSidebar = _a.isOpenSidebar, onOpenSidebarChange = _a.onOpenSidebarChange, menuItems = _a.menuItems, mobileBottomBarGroupKey = _a.mobileBottomBarGroupKey, _d = _a.showNativeMenu, showNativeMenu = _d === void 0 ? true : _d, _e = _a.translations, translations = _e === void 0 ? {} : _e;
|
|
2153
|
+
var _f = React.useState(false), isCollapsed = _f[0], setIsCollapsed = _f[1];
|
|
2154
|
+
var _g = React.useState(false), logoError = _g[0], setLogoError = _g[1];
|
|
2155
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$2), translations);
|
|
2156
|
+
var commerceName = (typeof (commerceInfo === null || commerceInfo === void 0 ? void 0 : commerceInfo.name) === "string" && commerceInfo.name.trim()) ||
|
|
2157
|
+
t.notDefinedLabel;
|
|
2158
|
+
var userName = (typeof (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) === "string" && userInfo.name.trim()) ||
|
|
2159
|
+
t.notDefinedLabel;
|
|
2160
|
+
var userRole = (typeof (userInfo === null || userInfo === void 0 ? void 0 : userInfo.role) === "string" && userInfo.role.trim()) ||
|
|
2161
|
+
t.notDefinedLabel;
|
|
2162
|
+
var helpTitle = (typeof (helpButton === null || helpButton === void 0 ? void 0 : helpButton.title) === "string" && helpButton.title.trim()) ||
|
|
2163
|
+
t.notDefinedLabel;
|
|
2164
|
+
var hasValidLogo = typeof (commerceInfo === null || commerceInfo === void 0 ? void 0 : commerceInfo.logo) === "string" &&
|
|
2165
|
+
commerceInfo.logo.trim() !== "" &&
|
|
2166
|
+
!logoError;
|
|
2167
|
+
var bottomBarItems = useMemo(function () {
|
|
2168
|
+
if (!mobileBottomBarGroupKey)
|
|
2169
|
+
return [];
|
|
2170
|
+
var group = menuItems.items.find(function (item) { return item.key === mobileBottomBarGroupKey; });
|
|
2171
|
+
if (!(group === null || group === void 0 ? void 0 : group.items))
|
|
2172
|
+
return [];
|
|
2173
|
+
return group.items.filter(function (item) { return item.icon; });
|
|
2174
|
+
}, [mobileBottomBarGroupKey, menuItems.items]);
|
|
2132
2175
|
var handleSidebarClose = useCallback(function () {
|
|
2133
2176
|
onOpenSidebarChange === null || onOpenSidebarChange === void 0 ? void 0 : onOpenSidebarChange(false);
|
|
2134
2177
|
}, [onOpenSidebarChange]);
|
|
2178
|
+
var handleSidebarOpen = useCallback(function () {
|
|
2179
|
+
onOpenSidebarChange === null || onOpenSidebarChange === void 0 ? void 0 : onOpenSidebarChange(true);
|
|
2180
|
+
}, [onOpenSidebarChange]);
|
|
2135
2181
|
var handleCollapseToggle = useCallback(function () {
|
|
2136
2182
|
setIsCollapsed(function (prev) { return !prev; });
|
|
2137
2183
|
}, []);
|
|
2138
|
-
var handleUpgradeClick = useCallback(function () {
|
|
2139
|
-
if (upgradeCard) {
|
|
2140
|
-
window.open(upgradeCard.buttonLink, "_blank");
|
|
2141
|
-
}
|
|
2142
|
-
}, [upgradeCard]);
|
|
2143
2184
|
var handleHelpClick = useCallback(function () {
|
|
2144
|
-
|
|
2185
|
+
var _a;
|
|
2186
|
+
var url = (_a = helpButton === null || helpButton === void 0 ? void 0 : helpButton.redirect) === null || _a === void 0 ? void 0 : _a.trim();
|
|
2187
|
+
if (url)
|
|
2188
|
+
window.open(url, "_blank");
|
|
2145
2189
|
}, [helpButton]);
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2190
|
+
// Menú lateral: al seleccionar ítem/sub-ítem cerrar en móvil. No hacer nada si es una sección (solo título).
|
|
2191
|
+
var handleMenuSelect = useCallback(function (key, href) {
|
|
2192
|
+
var _a;
|
|
2193
|
+
var isSectionKey = menuItems.items.some(function (it) {
|
|
2194
|
+
return it.key === key &&
|
|
2195
|
+
Array.isArray(it.items) &&
|
|
2196
|
+
it.items.length > 0 &&
|
|
2197
|
+
it.type !== EnumMenuNavListItem.Nest;
|
|
2198
|
+
});
|
|
2199
|
+
if (isSectionKey)
|
|
2200
|
+
return;
|
|
2201
|
+
onOpenSidebarChange === null || onOpenSidebarChange === void 0 ? void 0 : onOpenSidebarChange(false);
|
|
2202
|
+
(_a = menuItems.onSelect) === null || _a === void 0 ? void 0 : _a.call(menuItems, key, href, "sidebar");
|
|
2203
|
+
}, [onOpenSidebarChange, menuItems.onSelect, menuItems.items]);
|
|
2204
|
+
// Barra inferior: cerrar lateral y notificar con source 'bottomBar' para que la app no reabra el menú.
|
|
2205
|
+
var handleBottomBarSelect = useCallback(function (key, href) {
|
|
2206
|
+
var _a;
|
|
2207
|
+
onOpenSidebarChange === null || onOpenSidebarChange === void 0 ? void 0 : onOpenSidebarChange(false);
|
|
2208
|
+
(_a = menuItems.onSelect) === null || _a === void 0 ? void 0 : _a.call(menuItems, key, href, "bottomBar");
|
|
2209
|
+
}, [onOpenSidebarChange, menuItems.onSelect]);
|
|
2210
|
+
var showBottomBar = (mobileBottomBarGroupKey && bottomBarItems.length > 0) || showNativeMenu;
|
|
2211
|
+
return (jsxs(Fragment, { children: [showBottomBar && (jsx(MenuMobileBottomBar, { items: bottomBarItems, selectedKey: menuItems.selectedKey, onSelect: handleBottomBarSelect, onMenuPress: handleSidebarOpen, menuLabel: t.menuLabel, navAriaLabel: t.mobileNavAriaLabel, forceVisible: showNativeMenu && bottomBarItems.length === 0 })), jsx("button", { type: "button", "aria-label": t.closeSidebarAriaLabel, className: "menu-overlay ".concat(isOpenSidebar ? "menu-overlay--open" : ""), onClick: handleSidebarClose, tabIndex: isOpenSidebar ? 0 : -1 }), jsx("div", { className: "container__menu ".concat(isCollapsed
|
|
2150
2212
|
? "container__menu--collapsed"
|
|
2151
|
-
: "container__menu--expanded"
|
|
2213
|
+
: "container__menu--expanded", " ").concat(isOpenSidebar ? "container__menu--mobile-open" : ""), "aria-hidden": !isOpenSidebar, children: jsxs("div", { className: "content__menu", children: [jsxs("div", { className: "content__menu--header", style: {
|
|
2214
|
+
flexDirection: isCollapsed ? "column-reverse" : "row",
|
|
2215
|
+
}, children: [jsxs("div", { className: "flex flex-row items-center justify-center ".concat(isCollapsed ? "gap-0" : "gap-2"), children: [jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-full bg-foreground text-background", children: hasValidLogo ? (jsx("img", { src: commerceInfo.logo, alt: "".concat(t.logoAlt, " ").concat(commerceName), className: "h-full w-full object-cover", onError: function () { return setLogoError(true); } })) : (jsx(IconComponent, { icon: "solar:buildings-2-outline", size: "sm", className: "shrink-0", "aria-hidden": true })) }), jsx("span", { className: "collapsible-item text-small font-bold truncate min-w-0", children: commerceName })] }), jsxs("div", { className: "flex items-center", children: [jsx(IconComponent, { icon: "material-symbols-light:close", size: "lg", className: "cursor-pointer block sm:hidden", onClick: handleSidebarClose }), jsx(IconComponent, { icon: isCollapsed
|
|
2152
2216
|
? "solar:alt-arrow-right-outline"
|
|
2153
|
-
: "solar:alt-arrow-left-outline", size: "lg", className: "hidden sm:block cursor-pointer", onClick: handleCollapseToggle })] })] }), jsx(Spacer, { y: 6 }), jsxs("div", { className: "content__menu--user ".concat(isCollapsed ? "gap-0" : "gap-3"), children: [jsx(Avatar, { size: "md", src: userInfo.avatar, color: userInfo.avatar ===
|
|
2217
|
+
: "solar:alt-arrow-left-outline", size: "lg", className: "hidden sm:block cursor-pointer", onClick: handleCollapseToggle })] })] }), jsx(Spacer, { y: 6 }), jsxs("div", { className: "content__menu--user ".concat(isCollapsed ? "gap-0" : "gap-3"), children: [jsx(Avatar, { size: "md", src: ((_b = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _b === void 0 ? void 0 : _b.trim()) || undefined, color: !((_c = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _c === void 0 ? void 0 : _c.trim()) ? "warning" : "default", name: userName, className: "shrink-0" }), jsxs("div", { className: "collapsible-item flex min-w-0 flex-col overflow-hidden", children: [jsx("p", { className: "text-small font-medium text-default-900 truncate", children: userName }), jsx("p", { className: "text-tiny text-default-400 truncate", children: userRole })] })] }), jsx("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6"), children: jsx("div", { className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: jsx(MenuNavList, { defaultSelectedKey: menuItems.selectedKey, items: menuItems.items, isCollapsed: isCollapsed, onSelect: handleMenuSelect }, menuItems.selectedKey) }) }), jsx("div", { className: "mt-auto flex flex-col justify-center items-center", children: jsx(Button$1, { fullWidth: true, className: " text-default-500 data-[hover=true]:text-default-600", startContent: jsx(IconComponent, { className: "text-default-500", icon: "solar:info-circle-line-duotone", size: "md" }), variant: "light", onPress: handleHelpClick, isIconOnly: isCollapsed, children: !isCollapsed && (jsx("span", { className: "collapsible-item truncate", children: helpTitle })) }) })] }) })] }));
|
|
2154
2218
|
});
|
|
2155
2219
|
|
|
2156
2220
|
var StepIndicator = function (_a) {
|
|
@@ -3552,7 +3616,7 @@ var defaultTranslations$3 = {
|
|
|
3552
3616
|
* ```
|
|
3553
3617
|
*/
|
|
3554
3618
|
var SocialMediaPreview = function (_a) {
|
|
3555
|
-
var platform = _a.platform, imageUrl = _a.imageUrl, caption = _a.caption, _b = _a.variant, variant = _b === void 0 ? "full" : _b, _c = _a.postAspectRatio, postAspectRatio = _c === void 0 ? "square" : _c, _d = _a.showHeader, showHeader = _d === void 0 ? true : _d, _e = _a.maxCaptionLength, maxCaptionLength = _e === void 0 ? 125 : _e, onToggleCaption = _a.onToggleCaption, showFullCaption = _a.showFullCaption, username = _a.username, avatarUrl = _a.avatarUrl, _f = _a.translations, translations = _f === void 0 ? {} : _f, _g = _a.className, className = _g === void 0 ? "" : _g, _h = _a.imageProps, imageProps = _h === void 0 ? {} : _h;
|
|
3619
|
+
var platform = _a.platform, imageUrl = _a.imageUrl, caption = _a.caption, _b = _a.variant, variant = _b === void 0 ? "full" : _b, _c = _a.postAspectRatio, postAspectRatio = _c === void 0 ? "square" : _c, _d = _a.showHeader, showHeader = _d === void 0 ? true : _d, _e = _a.maxCaptionLength, maxCaptionLength = _e === void 0 ? 125 : _e, onToggleCaption = _a.onToggleCaption, showFullCaption = _a.showFullCaption, username = _a.username, avatarUrl = _a.avatarUrl, _f = _a.translations, translations = _f === void 0 ? {} : _f, _g = _a.className, className = _g === void 0 ? "" : _g, _h = _a.imageProps, imageProps = _h === void 0 ? {} : _h, _j = _a.showEditButton, showEditButton = _j === void 0 ? false : _j, onEditClick = _a.onEditClick;
|
|
3556
3620
|
var t = __assign(__assign({}, defaultTranslations$3), translations);
|
|
3557
3621
|
var displayUsername = username || t.username;
|
|
3558
3622
|
var shouldTruncate = variant === "compact" && caption.length > maxCaptionLength;
|
|
@@ -3591,12 +3655,12 @@ var SocialMediaPreview = function (_a) {
|
|
|
3591
3655
|
return renderInstagramPost();
|
|
3592
3656
|
};
|
|
3593
3657
|
var renderInstagramStory = function () { return (jsxs("div", { className: "relative w-full bg-gradient-to-b from-gray-900 to-gray-800 rounded-2xl shadow-2xl ".concat(className), style: { aspectRatio: "9/16", maxHeight: "640px" }, children: [imageUrl && (jsxs("div", { className: "absolute inset-0", children: [jsx(Image$1, __assign({ src: imageUrl, alt: t.imageAlt, className: "w-full h-full object-cover" }, imageProps)), jsx("div", { className: "absolute inset-0 bg-black bg-opacity-20" })] })), showHeader && (jsxs("div", { className: "absolute top-0 left-0 right-0 z-10 p-4", children: [jsx("div", { className: "w-full h-0.5 bg-white bg-opacity-30 rounded-full mb-3", children: jsx("div", { className: "h-full w-1/3 bg-white rounded-full" }) }), jsxs("div", { className: "flex items-center justify-between", children: [jsxs("div", { className: "flex items-center gap-2", children: [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 ? (jsx("img", { src: avatarUrl, alt: displayUsername, className: "w-full h-full rounded-full object-cover" })) : (jsx("span", { className: "text-white text-xs font-bold", children: displayUsername.substring(0, 2).toUpperCase() })) }), jsx("span", { className: "text-sm font-semibold text-white drop-shadow-lg", children: displayUsername }), jsx("span", { className: "text-xs text-white text-opacity-90", children: "hace 5min" })] }), jsxs("div", { className: "flex items-center gap-3", children: [jsx(IconComponent, { icon: "solar:play-circle-bold", className: "text-lg text-white drop-shadow-lg" }), jsx(IconComponent, { icon: "solar:volume-loud-bold", className: "text-lg text-white drop-shadow-lg" }), jsx(IconComponent, { icon: "solar:menu-dots-bold", className: "text-lg text-white drop-shadow-lg" })] })] })] })), jsxs("div", { className: "absolute bottom-6 left-0 right-0 z-20 px-4 flex items-center gap-3", children: [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 }), jsx(IconComponent, { icon: "solar:heart-outline", className: "text-2xl text-white drop-shadow-lg" }), jsx(IconComponent, { icon: "solar:plain-outline", className: "text-2xl text-white drop-shadow-lg" })] })] })); };
|
|
3594
|
-
var renderInstagramPost = function () { return (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 && (jsxs("div", { className: "flex items-center justify-between p-3 border-b border-gray-200 dark:border-gray-800", children: [jsxs("div", { className: "flex items-center gap-2", children: [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 ? (jsx("img", { src: avatarUrl, alt: displayUsername, className: "w-full h-full rounded-full object-cover" })) : (jsx("span", { className: "text-white text-xs font-bold", children: displayUsername.substring(0, 2).toUpperCase() })) }), jsx("span", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: displayUsername })] }), jsx(IconComponent, { icon: "solar:menu-dots-bold", className: "text-lg text-gray-900 dark:text-white" })] })), imageUrl && (
|
|
3658
|
+
var renderInstagramPost = function () { return (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 && (jsxs("div", { className: "flex items-center justify-between p-3 border-b border-gray-200 dark:border-gray-800", children: [jsxs("div", { className: "flex items-center gap-2", children: [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 ? (jsx("img", { src: avatarUrl, alt: displayUsername, className: "w-full h-full rounded-full object-cover" })) : (jsx("span", { className: "text-white text-xs font-bold", children: displayUsername.substring(0, 2).toUpperCase() })) }), jsx("span", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: displayUsername })] }), jsx(IconComponent, { icon: "solar:menu-dots-bold", className: "text-lg text-gray-900 dark:text-white" })] })), imageUrl && (jsxs("div", { className: "relative w-full bg-black overflow-hidden rounded-none flex items-center justify-center", style: { aspectRatio: getAspectRatio() }, children: [jsx(Image$1, __assign({ src: imageUrl, alt: t.imageAlt, className: "w-full h-full object-contain rounded-none", radius: "none" }, imageProps)), showEditButton && typeof onEditClick === "function" && (jsx(Button$1, { isIconOnly: true, variant: "solid", color: "default", className: "absolute top-4 right-4 z-30 bg-background/90 dark:bg-background/90 backdrop-blur-sm rounded-full shadow-lg hover:bg-background/100 transition-colors border border-divider", onPress: onEditClick, "aria-label": "Editar imagen", children: jsx(IconComponent, { icon: "solar:pen-2-outline", className: "text-gray-900" }) }))] })), jsxs("div", { className: "flex-1 p-3 overflow-y-auto", children: [jsxs("div", { className: "flex items-center justify-between mb-2", children: [jsxs("div", { className: "flex items-center gap-4", children: [jsx(IconComponent, { icon: "solar:heart-bold", className: "text-xl text-gray-900 dark:text-white" }), jsx(IconComponent, { icon: "solar:chat-round-bold", className: "text-xl text-gray-900 dark:text-white" }), jsx(IconComponent, { icon: "solar:plain-bold", className: "text-xl text-gray-900 dark:text-white" })] }), jsx(IconComponent, { icon: "solar:bookmark-bold", className: "text-xl text-gray-900 dark:text-white" })] }), jsxs("div", { className: "text-sm text-left", children: [jsxs("div", { className: showFullCaption ? "overflow-y-auto" : "", style: { maxHeight: showFullCaption ? "150px" : "none" }, children: [jsx("span", { className: "font-semibold mr-2 text-gray-900 dark:text-white", children: displayUsername }), jsx("span", { className: "text-gray-800 dark:text-gray-200 whitespace-pre-wrap break-words", children: displayCaption })] }), shouldTruncate && onToggleCaption && variant !== "compact" && (jsx("button", { type: "button", onClick: function (e) {
|
|
3595
3659
|
e.stopPropagation();
|
|
3596
3660
|
onToggleCaption();
|
|
3597
3661
|
}, 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" && (jsx("div", { className: "text-xs text-gray-500 dark:text-gray-400 mt-1 text-left", children: t.timeAgo }))] })] })); };
|
|
3598
3662
|
// Render Facebook Preview
|
|
3599
|
-
var renderFacebook = function () { return (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 && (jsx("div", { className: "p-4 border-b border-gray-200 dark:border-gray-800", children: jsxs("div", { className: "flex items-center gap-3", children: [jsx("div", { className: "w-10 h-10 rounded-full bg-blue-600 flex items-center justify-center", children: avatarUrl ? (jsx("img", { src: avatarUrl, alt: displayUsername, className: "w-full h-full rounded-full object-cover" })) : (jsx("span", { className: "text-white text-sm font-bold", children: displayUsername.substring(0, 2).toUpperCase() })) }), jsxs("div", { className: "flex-1", children: [jsx("p", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: displayUsername }), jsxs("p", { className: "text-xs text-gray-500 dark:text-gray-400 flex items-center gap-1", children: [t.timeAgo, " \u00B7 ", jsx(IconComponent, { icon: "solar:earth-bold", className: "text-xs" })] })] }), jsx(IconComponent, { icon: "solar:menu-dots-bold", className: "text-xl text-gray-600 dark:text-gray-400" })] }) })), jsx("div", { className: "px-4 py-2", children: jsx("p", { className: "text-sm text-gray-900 dark:text-white whitespace-pre-wrap break-words", children: displayCaption }) }), imageUrl && (
|
|
3663
|
+
var renderFacebook = function () { return (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 && (jsx("div", { className: "p-4 border-b border-gray-200 dark:border-gray-800", children: jsxs("div", { className: "flex items-center gap-3", children: [jsx("div", { className: "w-10 h-10 rounded-full bg-blue-600 flex items-center justify-center", children: avatarUrl ? (jsx("img", { src: avatarUrl, alt: displayUsername, className: "w-full h-full rounded-full object-cover" })) : (jsx("span", { className: "text-white text-sm font-bold", children: displayUsername.substring(0, 2).toUpperCase() })) }), jsxs("div", { className: "flex-1", children: [jsx("p", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: displayUsername }), jsxs("p", { className: "text-xs text-gray-500 dark:text-gray-400 flex items-center gap-1", children: [t.timeAgo, " \u00B7 ", jsx(IconComponent, { icon: "solar:earth-bold", className: "text-xs" })] })] }), jsx(IconComponent, { icon: "solar:menu-dots-bold", className: "text-xl text-gray-600 dark:text-gray-400" })] }) })), jsx("div", { className: "px-4 py-2", children: jsx("p", { className: "text-sm text-gray-900 dark:text-white whitespace-pre-wrap break-words", children: displayCaption }) }), imageUrl && (jsxs("div", { className: "relative w-full bg-gray-50 dark:bg-gray-800", children: [jsx(Image$1, __assign({ src: imageUrl, alt: t.imageAlt, className: "w-full h-auto object-cover", radius: "none" }, imageProps)), showEditButton && typeof onEditClick === "function" && (jsx(Button$1, { isIconOnly: true, variant: "solid", color: "default", className: "absolute top-4 right-4 z-30 bg-white/90 hover:bg-white shadow-lg", onPress: onEditClick, "aria-label": "Editar imagen", children: jsx(IconComponent, { icon: "solar:pen-2-outline", className: "text-gray-900" }) }))] })), jsx("div", { className: "p-3 border-t border-gray-200 dark:border-gray-800", children: jsxs("div", { className: "flex items-center justify-around", children: [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: [jsx(IconComponent, { icon: "solar:like-bold", className: "text-xl" }), jsx("span", { className: "text-sm font-medium", children: "Me gusta" })] }), 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: [jsx(IconComponent, { icon: "solar:chat-round-bold", className: "text-xl" }), jsx("span", { className: "text-sm font-medium", children: "Comentar" })] }), 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: [jsx(IconComponent, { icon: "solar:share-bold", className: "text-xl" }), jsx("span", { className: "text-sm font-medium", children: "Compartir" })] })] }) })] })); };
|
|
3600
3664
|
// Render TikTok Preview
|
|
3601
3665
|
var renderTikTok = function () { return (jsxs("div", { className: "relative w-full bg-black rounded-2xl shadow-2xl overflow-hidden ".concat(className), style: { aspectRatio: "9/16", maxHeight: "640px" }, children: [imageUrl && (jsxs("div", { className: "absolute inset-0", children: [jsx(Image$1, __assign({ src: imageUrl, alt: t.imageAlt, className: "w-full h-full object-cover" }, imageProps)), jsx("div", { className: "absolute inset-0 bg-gradient-to-b from-transparent via-transparent to-black opacity-60" })] })), jsxs("div", { className: "absolute right-2 bottom-20 flex flex-col items-center gap-6 z-20", children: [jsxs("div", { className: "flex flex-col items-center", children: [jsx("div", { className: "w-12 h-12 rounded-full border-2 border-white bg-gray-900 flex items-center justify-center", children: avatarUrl ? (jsx("img", { src: avatarUrl, alt: displayUsername, className: "w-full h-full rounded-full object-cover" })) : (jsx("span", { className: "text-white text-xs font-bold", children: displayUsername.substring(0, 2).toUpperCase() })) }), jsx("div", { className: "w-6 h-6 rounded-full bg-pink-500 flex items-center justify-center -mt-3 border-2 border-black", children: jsx(IconComponent, { icon: "solar:add-circle-bold", className: "text-xs text-white" }) })] }), jsxs("div", { className: "flex flex-col items-center gap-2", children: [jsx(IconComponent, { icon: "solar:heart-bold", className: "text-3xl text-white drop-shadow-lg" }), jsx("span", { className: "text-xs text-white font-semibold", children: "24.5K" })] }), jsxs("div", { className: "flex flex-col items-center gap-2", children: [jsx(IconComponent, { icon: "solar:chat-round-bold", className: "text-3xl text-white drop-shadow-lg" }), jsx("span", { className: "text-xs text-white font-semibold", children: "1,234" })] }), jsxs("div", { className: "flex flex-col items-center gap-2", children: [jsx(IconComponent, { icon: "solar:bookmark-bold", className: "text-3xl text-white drop-shadow-lg" }), jsx("span", { className: "text-xs text-white font-semibold", children: "453" })] }), jsxs("div", { className: "flex flex-col items-center gap-2", children: [jsx(IconComponent, { icon: "solar:share-bold", className: "text-3xl text-white drop-shadow-lg" }), jsx("span", { className: "text-xs text-white font-semibold", children: "892" })] }), jsx("div", { className: "w-10 h-10 rounded-lg bg-gray-800 border border-gray-700 flex items-center justify-center", children: jsx(IconComponent, { icon: "solar:music-note-2-bold", className: "text-xl text-white" }) })] }), jsxs("div", { className: "absolute bottom-0 left-0 right-14 z-20 p-4", children: [jsxs("p", { className: "text-sm font-semibold text-white mb-1", children: ["@", displayUsername] }), jsx("p", { className: "text-sm text-white mb-2 line-clamp-2", children: displayCaption }), jsxs("div", { className: "flex items-center gap-2 text-xs text-white", children: [jsx(IconComponent, { icon: "solar:music-note-2-bold", className: "text-sm" }), jsxs("span", { className: "truncate", children: ["Sonido original - ", displayUsername] })] })] })] })); };
|
|
3602
3666
|
// Render Twitter Preview
|
|
@@ -5626,4 +5690,4 @@ var NavigationLoadingProvider = function (_a) {
|
|
|
5626
5690
|
return (jsxs(NavigationLoadingContext.Provider, { value: value, children: [children, jsx(NavigationLoadingOverlay, { isVisible: isVisible })] }));
|
|
5627
5691
|
};
|
|
5628
5692
|
|
|
5629
|
-
export { AccordionList, AddHolidayForm, AnalyticsCard, AuraAutocomplete, AuraTable, AuraToastProvider, BreadcrumbsComponent, Button, Card, Chip, ColorPicker, ColorSelector, ContentCarousel, DEFAULT_PREDEFINED_COLORS, DatePicker, DateRangePicker, DateSelector, DrawerFilters, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, Kanban, KanbanCard, KanbanColumn, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, RangeFilter, RowSteps, ScheduleRow, SearchInput, Select, SocialMediaBar, SocialMediaCarousel, SocialMediaPreview, StepIndicator, Switch as SwitchComponent, TagsFilter, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, TwoColumnLayoutAgent, UploadFile, VerticalSteps, Wizard, WizardNavigation, WizardSidebar, defaultTranslations$4 as defaultTranslations, sizeMap, themeColors, useAuraToast, useMediaQuery, useNavigationLoading, useThemeContext };
|
|
5693
|
+
export { AccordionList, AddHolidayForm, AnalyticsCard, AuraAutocomplete, AuraTable, AuraToastProvider, BreadcrumbsComponent, Button, Card, Chip, ColorPicker, ColorSelector, ContentCarousel, DEFAULT_PREDEFINED_COLORS, DatePicker, DateRangePicker, DateSelector, DrawerFilters, EnumMenuNavListItem, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, Kanban, KanbanCard, KanbanColumn, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, RangeFilter, RowSteps, ScheduleRow, SearchInput, Select, SocialMediaBar, SocialMediaCarousel, SocialMediaPreview, StepIndicator, Switch as SwitchComponent, TagsFilter, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, TwoColumnLayoutAgent, UploadFile, VerticalSteps, Wizard, WizardNavigation, WizardSidebar, defaultTranslations$4 as defaultTranslations, sizeMap, themeColors, useAuraToast, useMediaQuery, useNavigationLoading, useThemeContext };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentCarousel.d.ts","sourceRoot":"","sources":["../../../../src/components/content-carousel/ContentCarousel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAIX,oBAAoB,EAEpB,MAAM,yBAAyB,CAAC;AAejC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"ContentCarousel.d.ts","sourceRoot":"","sources":["../../../../src/components/content-carousel/ContentCarousel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAIX,oBAAoB,EAEpB,MAAM,yBAAyB,CAAC;AAejC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAyK1D,CAAC"}
|
|
@@ -26,6 +26,8 @@ export interface CarouselItem {
|
|
|
26
26
|
caption?: string;
|
|
27
27
|
imageUrl?: string;
|
|
28
28
|
gradient: string;
|
|
29
|
+
/** Optional chip/badge node shown in the top-right corner (e.g. <Chip>premium</Chip>). Rendered as-is. */
|
|
30
|
+
chipContent?: React.ReactNode;
|
|
29
31
|
[key: string]: any;
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
@@ -56,6 +58,8 @@ export interface ContentCarouselProps {
|
|
|
56
58
|
renderHeader?: (props: CarouselFooterRenderProps) => React.ReactNode;
|
|
57
59
|
/** Custom body render function to completely customize card content */
|
|
58
60
|
renderBody?: (item: CarouselItem, isHovered: boolean) => React.ReactNode;
|
|
61
|
+
/** Si true, se muestra el chip en la esquina superior derecha para cada ítem que tenga item.chipContent. */
|
|
62
|
+
haveChip?: boolean;
|
|
59
63
|
}
|
|
60
64
|
/**
|
|
61
65
|
* Internal props for individual carousel item component
|
|
@@ -69,5 +73,6 @@ export interface CarouselItemComponentProps {
|
|
|
69
73
|
renderFooter?: (props: CarouselFooterRenderProps) => React.ReactNode;
|
|
70
74
|
renderHeader?: (props: CarouselFooterRenderProps) => React.ReactNode;
|
|
71
75
|
renderBody?: (item: CarouselItem, isHovered: boolean) => React.ReactNode;
|
|
76
|
+
haveChip?: boolean;
|
|
72
77
|
}
|
|
73
78
|
//# sourceMappingURL=ContentCarousel.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentCarousel.types.d.ts","sourceRoot":"","sources":["../../../../src/components/content-carousel/ContentCarousel.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC3C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACzC,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,QAAQ,CAAC,2BAA2B,CAAC,CAAC;CACpD;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,gDAAgD;IAChD,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,uCAAuC;IACvC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IAC3C,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wCAAwC;IACxC,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C,yEAAyE;IACzE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,KAAK,CAAC,SAAS,CAAC;IACrE,+DAA+D;IAC/D,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,KAAK,CAAC,SAAS,CAAC;IACrE,uEAAuE;IACvE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentCarousel.types.d.ts","sourceRoot":"","sources":["../../../../src/components/content-carousel/ContentCarousel.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC3C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,0GAA0G;IAC1G,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACzC,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,QAAQ,CAAC,2BAA2B,CAAC,CAAC;CACpD;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,gDAAgD;IAChD,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,uCAAuC;IACvC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IAC3C,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wCAAwC;IACxC,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C,yEAAyE;IACzE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,KAAK,CAAC,SAAS,CAAC;IACrE,+DAA+D;IAC/D,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,KAAK,CAAC,SAAS,CAAC;IACrE,uEAAuE;IACvE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,CAAC;IACzE,4GAA4G;IAC5G,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IAC1C,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IACjD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,QAAQ,CAAC,2BAA2B,CAAC,CAAC;IACpD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,KAAK,CAAC,SAAS,CAAC;IACrE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,KAAK,CAAC,SAAS,CAAC;IACrE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,CAAC;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -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;AAsC5E;;;;;;;;;;;;;;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;AAsC5E;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAwHlE,CAAC"}
|
|
@@ -49,5 +49,7 @@ export interface SocialMediaCarouselProps {
|
|
|
49
49
|
hideFooter?: boolean;
|
|
50
50
|
/** If true, hides the audience info */
|
|
51
51
|
hideAudienceInfo?: boolean;
|
|
52
|
+
/** Si true, se muestra el chip en la esquina superior derecha para cada ítem que tenga item.chipContent. */
|
|
53
|
+
haveChip?: boolean;
|
|
52
54
|
}
|
|
53
55
|
//# sourceMappingURL=SocialMediaCarousel.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocialMediaCarousel.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/content-carousel/variants/SocialMediaCarousel.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC1F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,YAAY;IAC5D,IAAI,EAAE,mBAAmB,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,eAAe,CAAC,EAAE,GAAG,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,WAAW,CAAC,EAAE,IAAI,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC,6CAA6C;IAC7C,KAAK,EAAE,uBAAuB,EAAE,CAAC;IACjC,uCAAuC;IACvC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACtD,2CAA2C;IAC3C,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACjD,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACnD,8CAA8C;IAC9C,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACpD,8CAA8C;IAC9C,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACpD,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,sDAAsD;IACtD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wCAAwC;IACxC,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,uCAAuC;IACvC,gBAAgB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SocialMediaCarousel.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/content-carousel/variants/SocialMediaCarousel.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC1F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,YAAY;IAC5D,IAAI,EAAE,mBAAmB,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,eAAe,CAAC,EAAE,GAAG,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,WAAW,CAAC,EAAE,IAAI,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC,6CAA6C;IAC7C,KAAK,EAAE,uBAAuB,EAAE,CAAC;IACjC,uCAAuC;IACvC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACtD,2CAA2C;IAC3C,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACjD,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACnD,8CAA8C;IAC9C,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACpD,8CAA8C;IAC9C,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACpD,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,sDAAsD;IACtD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wCAAwC;IACxC,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,uCAAuC;IACvC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,4GAA4G;IAC5G,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -3,12 +3,7 @@ import "./Menu.scss";
|
|
|
3
3
|
import type { MenuComponentProps } from "./Menu.types";
|
|
4
4
|
/**
|
|
5
5
|
* Sidebar menu component for navigation and user actions.
|
|
6
|
-
*
|
|
7
|
-
* @param userInfo - Object with user avatar, name, and email.
|
|
8
|
-
* @param helpButton - Help button configuration.
|
|
9
|
-
* @param upgradeCard - Optional upgrade card configuration.
|
|
10
|
-
* @param isOpenSidebar - Controls sidebar visibility.
|
|
11
|
-
* @param onOpenSidebarChange - Callback to open/close sidebar.
|
|
6
|
+
* On mobile, shows a bottom navigation bar with items from the specified group.
|
|
12
7
|
*/
|
|
13
8
|
export declare const MenuComponent: React.FC<MenuComponentProps>;
|
|
14
9
|
//# sourceMappingURL=Menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAK,EACX,kBAAkB,EAElB,MAAM,cAAc,CAAC;AActB;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA2OtD,CAAC"}
|