@beweco/aurora-ui 0.6.70 → 0.6.72-qa.94

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.
Files changed (38) hide show
  1. package/dist/assets/css/styles.css +1 -1
  2. package/dist/index.cjs.js +229 -49
  3. package/dist/index.esm.js +220 -51
  4. package/dist/types/components/area-line-chart/AreaLineChart.d.ts +1 -1
  5. package/dist/types/components/area-line-chart/AreaLineChart.d.ts.map +1 -1
  6. package/dist/types/components/area-line-chart/AreaLineChart.types.d.ts +8 -0
  7. package/dist/types/components/area-line-chart/AreaLineChart.types.d.ts.map +1 -1
  8. package/dist/types/components/donut-chart/DonutChart.d.ts +9 -0
  9. package/dist/types/components/donut-chart/DonutChart.d.ts.map +1 -0
  10. package/dist/types/components/donut-chart/DonutChart.types.d.ts +51 -0
  11. package/dist/types/components/donut-chart/DonutChart.types.d.ts.map +1 -0
  12. package/dist/types/components/donut-chart/donut-chart.utils.d.ts +15 -0
  13. package/dist/types/components/donut-chart/donut-chart.utils.d.ts.map +1 -0
  14. package/dist/types/components/donut-chart/index.d.ts +4 -0
  15. package/dist/types/components/donut-chart/index.d.ts.map +1 -0
  16. package/dist/types/components/drawer-filters/DrawerFilters.types.d.ts +13 -0
  17. package/dist/types/components/drawer-filters/DrawerFilters.types.d.ts.map +1 -1
  18. package/dist/types/components/drawer-filters/_internal/FilterSection.d.ts.map +1 -1
  19. package/dist/types/components/phone/Phone.d.ts.map +1 -1
  20. package/dist/types/components/ranked-bar-list/RankedBarList.d.ts +10 -0
  21. package/dist/types/components/ranked-bar-list/RankedBarList.d.ts.map +1 -0
  22. package/dist/types/components/ranked-bar-list/RankedBarList.types.d.ts +41 -0
  23. package/dist/types/components/ranked-bar-list/RankedBarList.types.d.ts.map +1 -0
  24. package/dist/types/components/ranked-bar-list/index.d.ts +4 -0
  25. package/dist/types/components/ranked-bar-list/index.d.ts.map +1 -0
  26. package/dist/types/components/ranked-bar-list/ranked-bar-list.utils.d.ts +16 -0
  27. package/dist/types/components/ranked-bar-list/ranked-bar-list.utils.d.ts.map +1 -0
  28. package/dist/types/components/schedule-row/schedule-row.d.ts.map +1 -1
  29. package/dist/types/components/stat-tile/StatTile.d.ts +10 -0
  30. package/dist/types/components/stat-tile/StatTile.d.ts.map +1 -0
  31. package/dist/types/components/stat-tile/StatTile.types.d.ts +40 -0
  32. package/dist/types/components/stat-tile/StatTile.types.d.ts.map +1 -0
  33. package/dist/types/components/stat-tile/index.d.ts +3 -0
  34. package/dist/types/components/stat-tile/index.d.ts.map +1 -0
  35. package/dist/types/components/tags-filter/TagsFilter.d.ts.map +1 -1
  36. package/dist/types/index.d.ts +3 -0
  37. package/dist/types/index.d.ts.map +1 -1
  38. package/package.json +1 -1
package/dist/index.esm.js CHANGED
@@ -5,7 +5,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import { Icon } from '@iconify/react';
6
6
  export { loadIcons } from '@iconify/react';
7
7
  import React, { useId, useState, useCallback, useMemo, forwardRef, useEffect, useImperativeHandle, createContext, useContext, useRef, useLayoutEffect, memo, createElement, Fragment as Fragment$1 } from 'react';
8
- import { ResponsiveContainer, AreaChart, CartesianGrid, XAxis, Tooltip as Tooltip$1, Area, LineChart, YAxis, Line } from 'recharts';
8
+ import { ResponsiveContainer, AreaChart, CartesianGrid, XAxis, Tooltip as Tooltip$1, Area, LineChart, YAxis, Line, PieChart, Pie, Cell } from 'recharts';
9
9
  import { createPortal } from 'react-dom';
10
10
  import { motion, AnimatePresence } from 'framer-motion';
11
11
  import { useTheme } from '@heroui/use-theme';
@@ -582,9 +582,9 @@ function ChartTooltip(_a) {
582
582
  })] }));
583
583
  }
584
584
  function AreaLineChart(_a) {
585
- var data = _a.data, xAxisKey = _a.xAxisKey, series = _a.series, title = _a.title, value = _a.value, trend = _a.trend, _b = _a.height, height = _b === void 0 ? 200 : _b, _c = _a.className, className = _c === void 0 ? "" : _c, _d = _a.wrappedInCard, wrappedInCard = _d === void 0 ? false : _d, formatTooltipValue = _a.formatTooltipValue;
585
+ var data = _a.data, xAxisKey = _a.xAxisKey, series = _a.series, title = _a.title, value = _a.value, trend = _a.trend, _b = _a.height, height = _b === void 0 ? 200 : _b, _c = _a.className, className = _c === void 0 ? "" : _c, _d = _a.wrappedInCard, wrappedInCard = _d === void 0 ? false : _d, formatTooltipValue = _a.formatTooltipValue, _e = _a.yAxisDomain, yAxisDomain = _e === void 0 ? [0, "dataMax + 100"] : _e;
586
586
  var hasHeader = title != null || value != null || trend != null || series.length > 0;
587
- var content = (jsxs(Fragment, { children: [hasHeader && (jsxs("div", { className: "flex items-start justify-between mb-6", children: [jsxs("div", { children: [title != null && (jsx(H3, { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-1", children: title })), value != null && (jsxs("div", { className: "flex items-baseline gap-2", children: [jsx("span", { className: "text-2xl font-bold text-gray-900", children: value }), trend != null && (jsx("span", { className: "text-xs font-medium text-yellow-600 bg-yellow-50 px-2 py-1 rounded", children: trend }))] }))] }), series.length > 0 && (jsx("div", { className: "flex items-center gap-4", children: series.map(function (s) { return (jsxs("div", { className: "flex items-center gap-2", children: [jsx("svg", { width: "16", height: "2", viewBox: "0 0 16 2", fill: "none", children: jsx("line", { x1: "0", y1: "1", x2: "16", y2: "1", stroke: s.color, strokeWidth: "2" }) }), jsx("span", { className: "text-xs text-gray-600 font-medium", children: s.label })] }, s.dataKey)); }) }))] })), jsx("div", { className: "w-full", style: { height: "".concat(height, "px") }, children: jsx(ResponsiveContainer, { width: "100%", height: "100%", children: jsxs(LineChart, { data: data, margin: { top: 5, right: 5, left: 5, bottom: 5 }, children: [jsx("defs", { children: series.map(function (s) { return (jsxs("linearGradient", { id: "area-line-chart-".concat(s.dataKey), x1: "0", y1: "0", x2: "0", y2: "1", children: [jsx("stop", { offset: "0%", stopColor: s.color, stopOpacity: 0.3 }), jsx("stop", { offset: "50%", stopColor: s.color, stopOpacity: 0.15 }), jsx("stop", { offset: "100%", stopColor: s.color, stopOpacity: 0 })] }, s.dataKey)); }) }), jsx(XAxis, { dataKey: xAxisKey, axisLine: false, tickLine: false, tick: { fill: "#9ca3af", fontSize: 12 }, dy: 10 }), jsx(YAxis, { axisLine: false, tickLine: false, tick: { fill: "transparent", fontSize: 0 }, width: 0, tickCount: 6, domain: [0, "dataMax + 100"], allowDecimals: false }), jsx(CartesianGrid, { strokeDasharray: "3 3", stroke: "#d1d5db", strokeOpacity: 0.5, vertical: false, horizontal: true }), jsx(Tooltip$1, { content: jsx(ChartTooltip, { series: series, formatValue: formatTooltipValue }) }), series.map(function (s) { return (jsx(Area, { type: "natural", dataKey: s.dataKey, stroke: "none", fill: "url(#area-line-chart-".concat(s.dataKey, ")"), animationDuration: 1500, animationEasing: "ease-in-out" }, "area-".concat(s.dataKey))); }), series.map(function (s) { return (jsx(Line, { type: "natural", dataKey: s.dataKey, name: s.dataKey, stroke: s.color, strokeWidth: 3, dot: false, activeDot: {
587
+ var content = (jsxs(Fragment, { children: [hasHeader && (jsxs("div", { className: "flex items-start justify-between mb-6", children: [jsxs("div", { children: [title != null && (jsx(H3, { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-1", children: title })), value != null && (jsxs("div", { className: "flex items-baseline gap-2", children: [jsx("span", { className: "text-2xl font-bold text-gray-900", children: value }), trend != null && (jsx("span", { className: "text-xs font-medium text-yellow-600 bg-yellow-50 px-2 py-1 rounded", children: trend }))] }))] }), series.length > 0 && (jsx("div", { className: "flex flex-wrap items-center gap-4", children: series.map(function (s) { return (jsxs("div", { className: "flex items-center gap-2", children: [jsx("svg", { width: "16", height: "2", viewBox: "0 0 16 2", fill: "none", children: jsx("line", { x1: "0", y1: "1", x2: "16", y2: "1", stroke: s.color, strokeWidth: "2" }) }), jsx("span", { className: "text-xs text-gray-600 font-medium", children: s.label })] }, s.dataKey)); }) }))] })), jsx("div", { className: "w-full", style: { height: "".concat(height, "px") }, children: jsx(ResponsiveContainer, { width: "100%", height: "100%", children: jsxs(LineChart, { data: data, margin: { top: 5, right: 5, left: 5, bottom: 5 }, children: [jsx("defs", { children: series.map(function (s) { return (jsxs("linearGradient", { id: "area-line-chart-".concat(s.dataKey), x1: "0", y1: "0", x2: "0", y2: "1", children: [jsx("stop", { offset: "0%", stopColor: s.color, stopOpacity: 0.3 }), jsx("stop", { offset: "50%", stopColor: s.color, stopOpacity: 0.15 }), jsx("stop", { offset: "100%", stopColor: s.color, stopOpacity: 0 })] }, s.dataKey)); }) }), jsx(XAxis, { dataKey: xAxisKey, axisLine: false, tickLine: false, tick: { fill: "#9ca3af", fontSize: 12 }, dy: 10 }), jsx(YAxis, { axisLine: false, tickLine: false, tick: { fill: "transparent", fontSize: 0 }, width: 0, tickCount: 6, domain: yAxisDomain, allowDecimals: false }), jsx(CartesianGrid, { strokeDasharray: "3 3", stroke: "#d1d5db", strokeOpacity: 0.5, vertical: false, horizontal: true }), jsx(Tooltip$1, { content: jsx(ChartTooltip, { series: series, formatValue: formatTooltipValue }) }), series.map(function (s) { return (jsx(Area, { type: "natural", dataKey: s.dataKey, stroke: "none", fill: "url(#area-line-chart-".concat(s.dataKey, ")"), animationDuration: 1500, animationEasing: "ease-in-out" }, "area-".concat(s.dataKey))); }), series.map(function (s) { return (jsx(Line, { type: "natural", dataKey: s.dataKey, name: s.dataKey, stroke: s.color, strokeWidth: 3, dot: false, activeDot: {
588
588
  r: 6,
589
589
  fill: s.color,
590
590
  stroke: "#fff",
@@ -2947,6 +2947,65 @@ var DateSelector = function (_a) {
2947
2947
  return (jsxs("div", { className: "w-full flex flex-wrap xs:gap-5 justify-between items-center ".concat(className), children: [jsxs(RadioGroup, __assign({ color: "primary", orientation: "horizontal", size: "sm", value: type, onValueChange: handleTypeChange }, radioGroupProps, { children: [jsx(Radio, __assign({ value: HolidayType.SingleDay }, radioItemProps, { children: t.dayOption })), jsx(Radio, __assign({ value: HolidayType.DateRange }, radioItemProps, { children: t.dateRangeOption }))] })), type === HolidayType.DateRange ? (jsx(DateRangePicker$1, __assign({ className: "xs:w-full md:flex-1 md:max-w-xs", value: dateRange || null, onChange: handleDateRangeChange, "aria-label": t.selectDateRangeAriaLabel, endContent: jsx(IconComponent, { icon: "solar:calendar-outline" }) }, dateRangePickerProps))) : (jsx(DatePicker$1, __assign({ className: "xs:w-full md:flex-1 md:max-w-40", value: date || null, onChange: handleDateChange, endContent: jsx(IconComponent, { icon: "solar:calendar-outline" }), "aria-label": t.selectDateAriaLabel }, datePickerProps)))] }));
2948
2948
  };
2949
2949
 
2950
+ /** Paleta categórica por defecto: primary/secondary/success/warning/danger de BeweOS. */
2951
+ var DEFAULT_DONUT_COLORS = [
2952
+ "#006fee",
2953
+ "#7828c8",
2954
+ "#17c964",
2955
+ "#f5a524",
2956
+ "#f31260",
2957
+ ];
2958
+ function safeValue$1(value) {
2959
+ return Number.isFinite(value) && value > 0 ? value : 0;
2960
+ }
2961
+ function computeTotal(data) {
2962
+ return data.reduce(function (sum, d) { return sum + safeValue$1(d.value); }, 0);
2963
+ }
2964
+ /**
2965
+ * `true` cuando no hay datos o todos los valores son 0 — mismo criterio que el
2966
+ * `NotData` legacy de Guru.js: un donut sin nada que repartir no aporta información.
2967
+ */
2968
+ function isDonutEmpty(data) {
2969
+ return data.length === 0 || computeTotal(data) === 0;
2970
+ }
2971
+ /**
2972
+ * Resuelve las proporciones y el color final de cada categoría.
2973
+ * El color propio de cada dato tiene prioridad; si falta, se cicla `palette` por índice.
2974
+ */
2975
+ function computeSlices(data, palette) {
2976
+ if (palette === void 0) { palette = DEFAULT_DONUT_COLORS; }
2977
+ var total = computeTotal(data);
2978
+ return data.map(function (datum, index) {
2979
+ var _a;
2980
+ var value = safeValue$1(datum.value);
2981
+ return __assign(__assign({}, datum), { value: value, color: (_a = datum.color) !== null && _a !== void 0 ? _a : palette[index % palette.length], percent: total > 0 ? value / total : 0 });
2982
+ });
2983
+ }
2984
+
2985
+ var DEFAULT_TRANSLATIONS$b = {
2986
+ emptyState: "Sin datos para mostrar",
2987
+ totalLabel: "Total",
2988
+ };
2989
+ /**
2990
+ * DonutChart - Gráfico circular (pie o donut, según `innerRadiusRatio`) con
2991
+ * leyenda y total central propios, renderizados fuera del árbol de Recharts
2992
+ * para que sean estables independientemente del tamaño medido del contenedor.
2993
+ */
2994
+ var DonutChart = function (_a) {
2995
+ var data = _a.data, _b = _a.height, height = _b === void 0 ? 220 : _b, _c = _a.innerRadiusRatio, innerRadiusRatio = _c === void 0 ? 0.65 : _c, _d = _a.showLegend, showLegend = _d === void 0 ? true : _d, _e = _a.showTotal, showTotal = _e === void 0 ? true : _e, colors = _a.colors, formatValue = _a.formatValue, _f = _a.translations, translations = _f === void 0 ? {} : _f, className = _a.className;
2996
+ var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$b), translations);
2997
+ if (isDonutEmpty(data)) {
2998
+ return (jsx("div", { className: className, children: jsx(P, { children: t.emptyState }) }));
2999
+ }
3000
+ var slices = computeSlices(data, colors);
3001
+ var total = slices.reduce(function (sum, s) { return sum + s.value; }, 0);
3002
+ var format = function (value) {
3003
+ return formatValue ? formatValue(value) : String(value);
3004
+ };
3005
+ var isDonut = innerRadiusRatio > 0;
3006
+ return (jsxs("div", { className: className, children: [jsxs("div", { className: "relative w-full", style: { height: height }, children: [jsx(ResponsiveContainer, { width: "100%", height: "100%", children: jsxs(PieChart, { children: [jsx(Pie, { data: slices, dataKey: "value", nameKey: "name", innerRadius: isDonut ? "".concat(innerRadiusRatio * 100, "%") : 0, outerRadius: "90%", stroke: "none", children: slices.map(function (slice) { return (jsx(Cell, { fill: slice.color }, slice.name)); }) }), jsx(Tooltip$1, { formatter: function (value) { return format(value); } })] }) }), isDonut && showTotal && (jsxs("div", { className: "aurora-donut-total pointer-events-none absolute inset-0 flex flex-col items-center justify-center", "aria-hidden": "true", children: [jsx("span", { className: "text-xs text-foreground-500", children: t.totalLabel }), jsx("span", { className: "text-xl font-semibold", children: format(total) })] }))] }), showLegend && (jsx("ul", { className: "mt-3 flex flex-wrap gap-3", children: slices.map(function (slice) { return (jsxs("li", { className: "flex items-center gap-1.5 text-xs", children: [jsx("span", { className: "h-2 w-2 rounded-full", style: { backgroundColor: slice.color }, "aria-hidden": "true" }), jsx("span", { children: slice.name }), jsxs("span", { className: "text-foreground-500", children: [Math.round(slice.percent * 100), "%"] })] }, slice.name)); }) }))] }));
3007
+ };
3008
+
2950
3009
  var H1 = function (_a) {
2951
3010
  var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
2952
3011
  return (jsx("h1", __assign({ className: cn("text-xl font-bold", className) }, props, { children: children })));
@@ -3012,12 +3071,12 @@ var NotificationButton = function (_a) {
3012
3071
  };
3013
3072
  NotificationButton.displayName = "NotificationButton";
3014
3073
 
3015
- var DEFAULT_TRANSLATIONS$8 = {
3074
+ var DEFAULT_TRANSLATIONS$a = {
3016
3075
  logout: "Cerrar sesión",
3017
3076
  };
3018
3077
  var HeaderComponent = function (_a) {
3019
3078
  var notificationCount = _a.notificationCount, options = _a.options, onMenuClick = _a.onMenuClick, onLogout = _a.onLogout, _b = _a.translations, translations = _b === void 0 ? {} : _b, breadcrumbs = _a.breadcrumbs, extraContent = _a.extraContent, _c = _a.showMenuButton, showMenuButton = _c === void 0 ? true : _c, onNotificationClick = _a.onNotificationClick, onOptionSelect = _a.onOptionSelect, onBreadcrumbClick = _a.onBreadcrumbClick;
3020
- var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$8), translations);
3079
+ var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$a), translations);
3021
3080
  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: [showMenuButton && (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: [extraContent, jsx(NotificationButton, { notificationCount: notificationCount, onPress: onNotificationClick }), jsx(ConfigMenu, { options: options, onLogout: onLogout, onOptionSelect: onOptionSelect, translations: t })] })] }) }));
3022
3081
  };
3023
3082
  HeaderComponent.displayName = "Header";
@@ -3141,7 +3200,7 @@ KanbanColumn.displayName = "KanbanColumn";
3141
3200
  * Traducciones por defecto en español.
3142
3201
  * Se mezclan con las traducciones proporcionadas por el usuario.
3143
3202
  */
3144
- var DEFAULT_TRANSLATIONS$7 = {
3203
+ var DEFAULT_TRANSLATIONS$9 = {
3145
3204
  dropHere: "Soltar aquí",
3146
3205
  emptyMessage: "No hay elementos",
3147
3206
  };
@@ -3175,7 +3234,7 @@ var columnGapClasses = {
3175
3234
  var KanbanComponent = function (_a) {
3176
3235
  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;
3177
3236
  // Mezclar traducciones del usuario con las por defecto
3178
- var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$7), translations);
3237
+ var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$9), translations);
3179
3238
  // Determinar si drag está habilitado
3180
3239
  var dragEnabled = isDraggable !== null && isDraggable !== void 0 ? isDraggable : !!onItemMove;
3181
3240
  // Estado del drag actual
@@ -3519,7 +3578,7 @@ var MenuNavList = React.forwardRef(function (_a, ref) {
3519
3578
  });
3520
3579
  MenuNavList.displayName = "MenuNavList";
3521
3580
 
3522
- var DEFAULT_TRANSLATIONS$6 = {
3581
+ var DEFAULT_TRANSLATIONS$8 = {
3523
3582
  menuLabel: "Menú",
3524
3583
  closeSidebarAriaLabel: "Cerrar menú lateral",
3525
3584
  mobileNavAriaLabel: "Navegación móvil",
@@ -3537,7 +3596,7 @@ var MenuComponent = React.memo(function Menu(_a) {
3537
3596
  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, onUserInfoClick = _a.onUserInfoClick, _e = _a.translations, translations = _e === void 0 ? {} : _e;
3538
3597
  var _f = React.useState(false), isCollapsed = _f[0], setIsCollapsed = _f[1];
3539
3598
  var _g = React.useState(false), logoError = _g[0], setLogoError = _g[1];
3540
- var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$6), translations);
3599
+ var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$8), translations);
3541
3600
  var selectedKey = React.useMemo(function () {
3542
3601
  var _a, _b, _c;
3543
3602
  if (menuItems.selectedPath) {
@@ -3821,7 +3880,7 @@ var MenuClawNavItem = function (_a) {
3821
3880
  };
3822
3881
  MenuClawNavItem.displayName = "MenuClawNavItem";
3823
3882
 
3824
- var DEFAULT_TRANSLATIONS$5 = {
3883
+ var DEFAULT_TRANSLATIONS$7 = {
3825
3884
  menuLabel: "Menú",
3826
3885
  closeSidebarAriaLabel: "Cerrar menú lateral",
3827
3886
  mobileNavAriaLabel: "Navegación móvil",
@@ -3859,7 +3918,7 @@ var MenuClaw = React.memo(function MenuClaw(_a) {
3859
3918
  var _b, _c;
3860
3919
  var userInfo = _a.userInfo, helpButton = _a.helpButton, menuItems = _a.menuItems, history = _a.history, isOpenSidebar = _a.isOpenSidebar, onOpenSidebarChange = _a.onOpenSidebarChange, mobileBottomBarGroupKey = _a.mobileBottomBarGroupKey, _d = _a.showNativeMenu, showNativeMenu = _d === void 0 ? true : _d, _e = _a.translations, translations = _e === void 0 ? {} : _e;
3861
3920
  var _f = React.useState(false), isCollapsed = _f[0], setIsCollapsed = _f[1];
3862
- var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$5), translations);
3921
+ var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$7), translations);
3863
3922
  var selectedKey = useMemo(function () {
3864
3923
  var _a, _b, _c;
3865
3924
  if (menuItems.selectedPath) {
@@ -4291,13 +4350,6 @@ var Phone = function (_a) {
4291
4350
  document.removeEventListener("mousedown", handleClickOutside);
4292
4351
  };
4293
4352
  }, [isDropdownOpen]);
4294
- // El dropdown se portea a `body` con posición absoluta fija; cerrarlo cuando
4295
- // un ancestro hace scroll para que no quede flotando fuera de lugar.
4296
- useCloseOnAncestorScroll({
4297
- isOpen: isDropdownOpen,
4298
- onClose: function () { return setIsDropdownOpen(false); },
4299
- contentRef: portalDropdownRef,
4300
- });
4301
4353
  var handleCountrySelect = function (country) {
4302
4354
  setSelectedCountry(country);
4303
4355
  setIsDropdownOpen(false);
@@ -4369,6 +4421,64 @@ var PromotionalBanner = function (_a) {
4369
4421
  }, variant: "bordered", onClick: handleButtonClick }, buttonProps, { children: finalButtonText })), showCloseButton && (jsx("div", { className: "flex flex-1 justify-end", children: jsx(Button$1, { isIconOnly: true, "aria-label": t.closeButtonLabel, className: "-m-1", size: "lg", variant: "bordered", onClick: handleClose, children: jsx(IconComponent, { "aria-hidden": "true", className: "text-default-500", icon: "lucide:x", size: "md" }) }) }))] }));
4370
4422
  };
4371
4423
 
4424
+ /** Paleta categórica por defecto: primary/secondary/success/warning/danger de BeweOS. */
4425
+ var DEFAULT_RANKED_BAR_COLORS = [
4426
+ "#006fee",
4427
+ "#7828c8",
4428
+ "#17c964",
4429
+ "#f5a524",
4430
+ "#f31260",
4431
+ ];
4432
+ function safeValue(value) {
4433
+ return Number.isFinite(value) && value > 0 ? value : 0;
4434
+ }
4435
+ function computeMax(data) {
4436
+ return data.reduce(function (max, d) { return Math.max(max, safeValue(d.value)); }, 0);
4437
+ }
4438
+ /**
4439
+ * `true` cuando no hay datos o todos los valores son 0 — mismo criterio que el
4440
+ * `NotData` legacy de Guru.js.
4441
+ */
4442
+ function isRankedBarListEmpty(data) {
4443
+ return data.length === 0 || computeMax(data) === 0;
4444
+ }
4445
+ /**
4446
+ * Resuelve el ancho de cada barra como porcentaje del **valor máximo del set**
4447
+ * (no del total) — igual que `BusinessStage.js` legacy (`100 * quantity / max`),
4448
+ * y el color final de cada fila.
4449
+ */
4450
+ function computeBars(data, palette) {
4451
+ if (palette === void 0) { palette = DEFAULT_RANKED_BAR_COLORS; }
4452
+ var max = computeMax(data);
4453
+ return data.map(function (item, index) {
4454
+ var _a;
4455
+ var value = safeValue(item.value);
4456
+ return __assign(__assign({}, item), { value: value, color: (_a = item.color) !== null && _a !== void 0 ? _a : palette[index % palette.length], percent: max > 0 ? (value / max) * 100 : 0 });
4457
+ });
4458
+ }
4459
+
4460
+ var DEFAULT_TRANSLATIONS$6 = {
4461
+ emptyState: "Sin datos para mostrar",
4462
+ };
4463
+ /**
4464
+ * RankedBarList - Lista de barras horizontales escaladas al valor máximo del
4465
+ * set (no al total) — mismo criterio visual que `BusinessStage.js` legacy.
4466
+ * No reordena las filas: el llamador decide el orden (por relevancia, por
4467
+ * etapa del funnel, etc.).
4468
+ */
4469
+ var RankedBarList = function (_a) {
4470
+ var data = _a.data, colors = _a.colors, formatValue = _a.formatValue, _b = _a.showValue, showValue = _b === void 0 ? true : _b, _c = _a.barHeight, barHeight = _c === void 0 ? 8 : _c, _d = _a.translations, translations = _d === void 0 ? {} : _d, className = _a.className;
4471
+ var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$6), translations);
4472
+ if (isRankedBarListEmpty(data)) {
4473
+ return (jsx("div", { className: className, children: jsx(P, { children: t.emptyState }) }));
4474
+ }
4475
+ var bars = computeBars(data, colors);
4476
+ var format = function (value) {
4477
+ return formatValue ? formatValue(value) : String(value);
4478
+ };
4479
+ return (jsx("div", { className: ["flex flex-col gap-3", className].filter(Boolean).join(" "), children: bars.map(function (bar) { return (jsxs("div", { className: "flex flex-col gap-1", children: [jsxs("div", { className: "flex items-baseline justify-between gap-2", children: [jsx(P, { className: "truncate", children: bar.label }), showValue && (jsx("span", { className: "text-sm font-medium text-foreground", children: format(bar.value) }))] }), jsx("div", { className: "w-full rounded-full bg-default-100", style: { height: barHeight }, children: jsx("div", { className: "h-full rounded-full", style: { width: "".concat(bar.percent, "%"), backgroundColor: bar.color } }) })] }, bar.label)); }) }));
4480
+ };
4481
+
4372
4482
  var VALID_STEP_COLORS = [
4373
4483
  "primary",
4374
4484
  "secondary",
@@ -5426,7 +5536,7 @@ var ScheduleRow = function (_a) {
5426
5536
  // Return slots exactly as they are - no automatic additions
5427
5537
  return slots;
5428
5538
  };
5429
- return (jsxs("div", { className: "flex flex-col w-full gap-y-4 last:border-b-0 last:mb-0 last:pb-0 border-b border-default-200 xs:py-4 xl:p-4 first:pt-0", children: [jsxs("div", { className: "flex w-full items-center justify-between", children: [jsxs("div", { className: "flex xs:space-x-2 sm:space-x-4", children: [jsx("h3", { className: "text-small font-semibold text-default-900 capitalize", children: day }), jsx(Chip$1, { size: "sm", color: daySchedule.isOpen ? "primary" : "default", className: "text-background", children: daySchedule.isOpen ? t.open : t.closed })] }), jsxs("div", { className: "flex xs:gap-2 sm:gap-5", children: [jsx(Switch, { size: "sm", color: "primary", isSelected: daySchedule.isOpen, onValueChange: handleToggleDay }), showCopyToAll && onCopyToAll && (jsx(Button, { size: "sm", variant: "bordered", onPress: function () { return onCopyToAll(day); }, children: t.copyToAll }))] })] }), daySchedule.isOpen && (jsx("div", { className: "flex flex-col justify-around gap-y-3 ", children: getSlotsToDisplay().map(function (slot, index) {
5539
+ return (jsxs("div", { className: "flex flex-col w-full gap-y-4 last:border-b-0 last:mb-0 last:pb-0 border-b border-default-200 xs:py-4 xl:p-4 first:pt-0", children: [jsxs("div", { className: "flex w-full items-center justify-between", children: [jsxs("div", { className: "flex items-center xs:space-x-2 sm:space-x-4", children: [jsx("h3", { className: "text-small font-semibold text-default-900 capitalize w-24 shrink-0", children: day }), jsx(Chip$1, { size: "sm", color: daySchedule.isOpen ? "primary" : "default", className: "text-background", children: daySchedule.isOpen ? t.open : t.closed })] }), jsxs("div", { className: "flex xs:gap-2 sm:gap-5", children: [jsx(Switch, { size: "sm", color: "primary", isSelected: daySchedule.isOpen, onValueChange: handleToggleDay }), showCopyToAll && onCopyToAll && (jsx(Button, { size: "sm", variant: "bordered", onPress: function () { return onCopyToAll(day); }, children: t.copyToAll }))] })] }), daySchedule.isOpen && (jsx("div", { className: "flex flex-col justify-around gap-y-3 ", children: getSlotsToDisplay().map(function (slot, index) {
5430
5540
  var slotsToDisplay = getSlotsToDisplay();
5431
5541
  var isLastSlot = index === slotsToDisplay.length - 1;
5432
5542
  var isSlotFilled = slot.from && slot.to;
@@ -5560,6 +5670,59 @@ var SocialMediaPreview = function (_a) {
5560
5670
  }
5561
5671
  };
5562
5672
 
5673
+ var paddingClasses = {
5674
+ sm: "p-4",
5675
+ md: "p-6",
5676
+ lg: "p-8",
5677
+ };
5678
+
5679
+ /**
5680
+ * Card genérica siguiendo las reglas de diseño BeweOS basada en HeroUI.
5681
+ *
5682
+ * Reglas aplicadas:
5683
+ * - Shadow: none, sm, md, lg (configurable)
5684
+ * - Radius: sm (por defecto, configurable)
5685
+ * - Padding configurable (sm, md, lg)
5686
+ * - Hereda de HeroUI Card con personalización BeweOS
5687
+ */
5688
+ var Card = function (_a) {
5689
+ var children = _a.children, _b = _a.className, className = _b === void 0 ? "" : _b, _c = _a.shadow, shadow = _c === void 0 ? "sm" : _c, _d = _a.radius, radius = _d === void 0 ? "sm" : _d, _e = _a.padding, padding = _e === void 0 ? "md" : _e, props = __rest(_a, ["children", "className", "shadow", "radius", "padding"]);
5690
+ var paddingClass = paddingClasses[padding];
5691
+ var combinedClassName = [paddingClass, className].filter(Boolean).join(" ");
5692
+ return (jsx(Card$1, __assign({ shadow: shadow, radius: radius, className: combinedClassName }, props, { children: children })));
5693
+ };
5694
+
5695
+ var DEFAULT_TRANSLATIONS$5 = {
5696
+ trendUpAriaLabel: "Tendencia al alza",
5697
+ trendDownAriaLabel: "Tendencia a la baja",
5698
+ trendNeutralAriaLabel: "Sin variación",
5699
+ };
5700
+ var TREND_COLOR_CLASS = {
5701
+ positive: "text-success",
5702
+ negative: "text-danger",
5703
+ neutral: "text-foreground-500",
5704
+ };
5705
+ var TREND_ARIA_KEY = {
5706
+ positive: "trendUpAriaLabel",
5707
+ negative: "trendDownAriaLabel",
5708
+ neutral: "trendNeutralAriaLabel",
5709
+ };
5710
+ /**
5711
+ * StatTile - Tarjeta KPI compacta: ícono opcional + título + valor + tendencia opcional.
5712
+ *
5713
+ * Cubre el patrón "tile" (título + número, con o sin ícono/variación) que se repite en
5714
+ * varios dashboards de estadísticas y no encajaba en ningún chart existente de AuraUI.
5715
+ */
5716
+ var StatTile = function (_a) {
5717
+ var _b;
5718
+ var title = _a.title, value = _a.value, icon = _a.icon, trend = _a.trend, _c = _a.translations, translations = _c === void 0 ? {} : _c, className = _a.className, _d = _a.padding, padding = _d === void 0 ? "md" : _d, cardProps = __rest(_a, ["title", "value", "icon", "trend", "translations", "className", "padding"]);
5719
+ var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$5), translations);
5720
+ var direction = (_b = trend === null || trend === void 0 ? void 0 : trend.direction) !== null && _b !== void 0 ? _b : "neutral";
5721
+ return (jsxs(Card, __assign({ padding: padding, className: ["flex flex-row items-center gap-3", className]
5722
+ .filter(Boolean)
5723
+ .join(" ") }, cardProps, { children: [icon && (jsx("span", { className: "shrink-0 text-foreground-600", "aria-hidden": "true", children: icon })), jsxs("div", { className: "flex min-w-0 flex-col gap-0.5", children: [jsx(P, { className: "truncate", children: title }), jsxs("div", { className: "flex items-baseline gap-2", children: [jsx(H3, { className: "text-2xl font-semibold", children: value }), trend && (jsx("span", { className: "text-xs font-medium ".concat(TREND_COLOR_CLASS[direction]), "aria-label": t[TREND_ARIA_KEY[direction]], children: trend.value }))] })] })] })));
5724
+ };
5725
+
5563
5726
  function AuraTable(_a) {
5564
5727
  var columns = _a.columns, items = _a.items, renderCell = _a.renderCell, children = _a.children, props = __rest(_a, ["columns", "items", "renderCell", "children"]);
5565
5728
  return (jsxs(Table, __assign({ removeWrapper: true, radius: "none" }, props, { children: [jsx(TableHeader, { columns: columns, children: function (column) { return jsx(TableColumn, { children: column.label }, column.key); } }), jsx(TableBody, { items: items, children: function (item) { return (jsx(TableRow, { children: function (columnKey) { return (jsx(TableCell, { children: renderCell ? renderCell(item, columnKey) : children })); } }, item.id)); } })] })));
@@ -7615,18 +7778,19 @@ var SelectFilter = function (_a) {
7615
7778
  // MULTISELECT FILTER
7616
7779
  // =========================================================================
7617
7780
  var MultiSelectFilter = function (_a) {
7618
- var _b, _c, _d, _e;
7781
+ var _b, _c, _d, _e, _f;
7619
7782
  var filter = _a.filter, value = _a.value, onChange = _a.onChange, translations = _a.translations;
7620
7783
  var triggerRef = useRef(null);
7621
- var _f = useState(null), triggerWidthPx = _f[0], setTriggerWidthPx = _f[1];
7622
- var _g = useState(false), isOpen = _g[0], setIsOpen = _g[1];
7623
- var _h = useState(""), searchQuery = _h[0], setSearchQuery = _h[1];
7784
+ var _g = useState(null), triggerWidthPx = _g[0], setTriggerWidthPx = _g[1];
7785
+ var _h = useState(false), isOpen = _h[0], setIsOpen = _h[1];
7786
+ var _j = useState(""), searchQuery = _j[0], setSearchQuery = _j[1];
7624
7787
  var currentValues = (value === null || value === void 0 ? void 0 : value.values) || [];
7625
7788
  var searchable = filter.searchable === true;
7626
7789
  var searchPlaceholder = (_b = translations === null || translations === void 0 ? void 0 : translations.multiselectSearchPlaceholder) !== null && _b !== void 0 ? _b : "Buscar opciones...";
7627
7790
  var moreLabelTemplate = (_c = translations === null || translations === void 0 ? void 0 : translations.multiselectMoreLabel) !== null && _c !== void 0 ? _c : "+{more} más";
7628
7791
  var noResultsText = (_d = translations === null || translations === void 0 ? void 0 : translations.multiselectNoResults) !== null && _d !== void 0 ? _d : "Sin coincidencias";
7629
- var triggerPlaceholder = "Seleccionar ".concat(filter.title.toLowerCase());
7792
+ var selectPlaceholderTemplate = (_e = translations === null || translations === void 0 ? void 0 : translations.selectPlaceholder) !== null && _e !== void 0 ? _e : "Seleccionar {label}";
7793
+ var triggerPlaceholder = selectPlaceholderTemplate.replace("{label}", filter.title.toLowerCase());
7630
7794
  var filteredData = useMemo(function () {
7631
7795
  if (!searchable) {
7632
7796
  return filter.data;
@@ -7681,7 +7845,7 @@ var MultiSelectFilter = function (_a) {
7681
7845
  }
7682
7846
  onChange({ values: Array.from(keys) });
7683
7847
  }, [filteredData, onChange]);
7684
- var maxVisibleChips = Math.min(Math.max((_e = filter.maxVisibleChips) !== null && _e !== void 0 ? _e : 5, 1), 24);
7848
+ var maxVisibleChips = Math.min(Math.max((_f = filter.maxVisibleChips) !== null && _f !== void 0 ? _f : 5, 1), 24);
7685
7849
  var triggerSelection = useMemo(function () {
7686
7850
  if (currentValues.length === 0) {
7687
7851
  return { visible: [], overflow: 0 };
@@ -7835,7 +7999,24 @@ var DateFilter = function (_a) {
7835
7999
  }
7836
8000
  return undefined;
7837
8001
  };
7838
- return (jsx(DateSelector, { initialType: getInitialType(), initialDate: getInitialDate(), initialDateRange: getInitialDateRange(), onChange: handleDateSelectorChange, className: "w-full" }));
8002
+ // Solo se reenvían las claves definidas: pasar `undefined` explícito pisaría
8003
+ // los defaults en español de DateSelector (el spread copia la clave igual).
8004
+ var dateSelectorTranslations = {};
8005
+ if ((translations === null || translations === void 0 ? void 0 : translations.dayOption) !== undefined) {
8006
+ dateSelectorTranslations.dayOption = translations.dayOption;
8007
+ }
8008
+ if ((translations === null || translations === void 0 ? void 0 : translations.dateRangeOption) !== undefined) {
8009
+ dateSelectorTranslations.dateRangeOption = translations.dateRangeOption;
8010
+ }
8011
+ if ((translations === null || translations === void 0 ? void 0 : translations.selectDateAriaLabel) !== undefined) {
8012
+ dateSelectorTranslations.selectDateAriaLabel =
8013
+ translations.selectDateAriaLabel;
8014
+ }
8015
+ if ((translations === null || translations === void 0 ? void 0 : translations.selectDateRangeAriaLabel) !== undefined) {
8016
+ dateSelectorTranslations.selectDateRangeAriaLabel =
8017
+ translations.selectDateRangeAriaLabel;
8018
+ }
8019
+ return (jsx(DateSelector, { initialType: getInitialType(), initialDate: getInitialDate(), initialDateRange: getInitialDateRange(), onChange: handleDateSelectorChange, translations: dateSelectorTranslations, className: "w-full" }));
7839
8020
  };
7840
8021
  // =========================================================================
7841
8022
  // TEXT FILTER
@@ -8656,6 +8837,7 @@ function TagsFilter(_a) {
8656
8837
  var _m = useState(0), autocompleteKey = _m[0], setAutocompleteKey = _m[1];
8657
8838
  var selectedList = value !== null && value !== void 0 ? value : [];
8658
8839
  var _o = useState(null), sentinelNode = _o[0], setSentinelNode = _o[1];
8840
+ var rootRef = useRef(null);
8659
8841
  useEffect(function () {
8660
8842
  if (!onLoadMore || !sentinelNode || !hasMore) {
8661
8843
  return;
@@ -8727,7 +8909,7 @@ function TagsFilter(_a) {
8727
8909
  if (isLoading) {
8728
8910
  return (jsx("div", { className: "flex flex-col gap-4 ".concat(className), children: jsx("div", { className: "flex justify-center py-4", children: jsx(Spinner, { size: "sm" }) }) }));
8729
8911
  }
8730
- return (jsxs("div", { className: "flex flex-col gap-4 ".concat(className), children: [error && (jsxs("div", { className: "text-danger text-small py-2", children: [t.errorLoadingPrefix, ": ", error] })), !error && (jsxs(Fragment, { children: [jsxs("div", { className: "flex flex-col gap-3", children: [jsxs(H4, { className: "text-tiny text-left text-default-700", children: [t.labelSelect, required && jsx("span", { className: "text-danger ml-0.5", children: "*" })] }), jsx(AuraAutocomplete, { placeholder: t.placeholder, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : t.placeholder, inputValue: inputValue, onInputChange: function (v) {
8912
+ return (jsxs("div", { ref: rootRef, className: "flex flex-col gap-4 ".concat(className), children: [error && (jsxs("div", { className: "text-danger text-small py-2", children: [t.errorLoadingPrefix, ": ", error] })), !error && (jsxs(Fragment, { children: [jsxs("div", { className: "flex flex-col gap-3", children: [jsxs(H4, { className: "text-tiny text-left text-default-700", children: [t.labelSelect, required && jsx("span", { className: "text-danger ml-0.5", children: "*" })] }), jsx(AuraAutocomplete, { placeholder: t.placeholder, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : t.placeholder, inputValue: inputValue, onInputChange: function (v) {
8731
8913
  setInputValue(v);
8732
8914
  onInputChange === null || onInputChange === void 0 ? void 0 : onInputChange(v);
8733
8915
  }, selectedKey: null, items: itemsWithSentinel, onSelectionChange: handleAutocompleteSelection,
@@ -8746,7 +8928,16 @@ function TagsFilter(_a) {
8746
8928
  // intercepts pointer events, blocking the parent modal's close button.
8747
8929
  // shouldCloseOnInteractOutside already handles closing on outside clicks.
8748
8930
  isNonModal: true,
8749
- shouldCloseOnInteractOutside: function () { return true; },
8931
+ // El desplegable se renderiza en un portal, así que el campo de
8932
+ // búsqueda queda FUERA de él y una pulsación sobre el texto contaba
8933
+ // como interacción externa. Al cerrarse, el FocusScope devolvía el
8934
+ // foco con un `.focus()` que abortaba el gesto de selección que el
8935
+ // navegador acababa de iniciar: de ahí que arrastrar o hacer doble
8936
+ // clic no seleccionara nada y solo quedara borrar letra a letra
8937
+ // (con el teclado sí funcionaba, porque no pasa por aquí).
8938
+ // Las pulsaciones dentro del componente dejan de contar como
8939
+ // externas; las de fuera siguen cerrando el desplegable igual.
8940
+ shouldCloseOnInteractOutside: function (element) { var _a; return !((_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.contains(element)); },
8750
8941
  }, listboxProps: {
8751
8942
  className: "max-h-[200px] overflow-y-auto",
8752
8943
  }, className: "w-full", children: function (item) {
@@ -8948,28 +9139,6 @@ ModalBody.displayName = "ModalBody";
8948
9139
 
8949
9140
  var ModalFooter = ModalFooter$1;
8950
9141
 
8951
- var paddingClasses = {
8952
- sm: "p-4",
8953
- md: "p-6",
8954
- lg: "p-8",
8955
- };
8956
-
8957
- /**
8958
- * Card genérica siguiendo las reglas de diseño BeweOS basada en HeroUI.
8959
- *
8960
- * Reglas aplicadas:
8961
- * - Shadow: none, sm, md, lg (configurable)
8962
- * - Radius: sm (por defecto, configurable)
8963
- * - Padding configurable (sm, md, lg)
8964
- * - Hereda de HeroUI Card con personalización BeweOS
8965
- */
8966
- var Card = function (_a) {
8967
- var children = _a.children, _b = _a.className, className = _b === void 0 ? "" : _b, _c = _a.shadow, shadow = _c === void 0 ? "sm" : _c, _d = _a.radius, radius = _d === void 0 ? "sm" : _d, _e = _a.padding, padding = _e === void 0 ? "md" : _e, props = __rest(_a, ["children", "className", "shadow", "radius", "padding"]);
8968
- var paddingClass = paddingClasses[padding];
8969
- var combinedClassName = [paddingClass, className].filter(Boolean).join(" ");
8970
- return (jsx(Card$1, __assign({ shadow: shadow, radius: radius, className: combinedClassName }, props, { children: children })));
8971
- };
8972
-
8973
9142
  /**
8974
9143
  * Tooltip - Componente BeweOS basado en HeroUI.
8975
9144
  *
@@ -9512,4 +9681,4 @@ var NavigationLoadingProvider = function (_a) {
9512
9681
  return (jsxs(NavigationLoadingContext.Provider, { value: value, children: [children, jsx(NavigationLoadingOverlay, { isVisible: isVisible })] }));
9513
9682
  };
9514
9683
 
9515
- export { ALL_THEMES, AURORA_THEME_FAMILIES, AURORA_THEME_REGISTRY, AccordionList, AddHolidayForm, AnalyticsCard, AreaLineChart, AuraAutocomplete, AuraTable, AuraToastProvider, BEWEOS_THEME_MODE_COOKIE_NAME, BreadcrumbsComponent, Button, Card, Chip, ColorPicker, ColorSelector, ContentCarousel, Currency, DEFAULT_PREDEFINED_COLORS, DatePicker, DateRangePicker, DateSelector, DrawerFilters, EmailPreview, EnumMenuNavListItem, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, InputPassword, Kanban, KanbanCard, KanbanColumn, MenuClaw, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, REGISTERED_THEME_COLORS, RangeFilter, RowSteps, DEFAULT_TRANSLATIONS$1 as SEGMENTATION_DEFAULT_TRANSLATIONS, ScheduleRow, SearchInput, SegmentationBuilder, Select, SimpleLineChart, SocialMediaBar, SocialMediaCarousel, SocialMediaPreview, StepIndicator, Switch as SwitchComponent, THEME_COLOR_HEX_MAP, TagsFilter, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, Tooltip, TwoColumnLayoutAgent, UploadFile, VerticalSteps, ViolinPlot, WhatsAppPreview, Wizard, WizardNavigation, WizardSidebar, applyCustomPrimaryColor, createCurrencyFormatter, uniqueCountries as defaultCountries, defaultCurrencyOptions, defaultTranslations$5 as defaultTranslations, forceLightOnlyThemeBeforeReact, formatAuroraThemeTooltip, generateThemeColorScale, getContrastForeground, getRegisteredThemeColorBases, getSelectedKeyFromPath, hexToThemeColor, hslToCssValue, isAuroraFullThemeId, isExactThemeColor, isGroupState, isHexColor, isSegmentationGroup, removeCustomPrimaryColor, sizeMap, themeColors, useAuraToast, useCloseOnAncestorScroll, useMediaQuery, useNavigationLoading, useThemeContext };
9684
+ export { ALL_THEMES, AURORA_THEME_FAMILIES, AURORA_THEME_REGISTRY, AccordionList, AddHolidayForm, AnalyticsCard, AreaLineChart, AuraAutocomplete, AuraTable, AuraToastProvider, BEWEOS_THEME_MODE_COOKIE_NAME, BreadcrumbsComponent, Button, Card, Chip, ColorPicker, ColorSelector, ContentCarousel, Currency, DEFAULT_DONUT_COLORS, DEFAULT_PREDEFINED_COLORS, DEFAULT_RANKED_BAR_COLORS, DatePicker, DateRangePicker, DateSelector, DonutChart, DrawerFilters, EmailPreview, EnumMenuNavListItem, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, InputPassword, Kanban, KanbanCard, KanbanColumn, MenuClaw, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, REGISTERED_THEME_COLORS, RangeFilter, RankedBarList, RowSteps, DEFAULT_TRANSLATIONS$1 as SEGMENTATION_DEFAULT_TRANSLATIONS, ScheduleRow, SearchInput, SegmentationBuilder, Select, SimpleLineChart, SocialMediaBar, SocialMediaCarousel, SocialMediaPreview, StatTile, StepIndicator, Switch as SwitchComponent, THEME_COLOR_HEX_MAP, TagsFilter, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, Tooltip, TwoColumnLayoutAgent, UploadFile, VerticalSteps, ViolinPlot, WhatsAppPreview, Wizard, WizardNavigation, WizardSidebar, applyCustomPrimaryColor, computeBars, computeMax, computeSlices, computeTotal, createCurrencyFormatter, uniqueCountries as defaultCountries, defaultCurrencyOptions, defaultTranslations$5 as defaultTranslations, forceLightOnlyThemeBeforeReact, formatAuroraThemeTooltip, generateThemeColorScale, getContrastForeground, getRegisteredThemeColorBases, getSelectedKeyFromPath, hexToThemeColor, hslToCssValue, isAuroraFullThemeId, isDonutEmpty, isExactThemeColor, isGroupState, isHexColor, isRankedBarListEmpty, isSegmentationGroup, removeCustomPrimaryColor, sizeMap, themeColors, useAuraToast, useCloseOnAncestorScroll, useMediaQuery, useNavigationLoading, useThemeContext };
@@ -1,3 +1,3 @@
1
1
  import type { AreaLineChartProps } from "./AreaLineChart.types";
2
- export declare function AreaLineChart<T extends Record<string, unknown>>({ data, xAxisKey, series, title, value, trend, height, className, wrappedInCard, formatTooltipValue, }: AreaLineChartProps<T>): import("react/jsx-runtime").JSX.Element;
2
+ export declare function AreaLineChart<T extends Record<string, unknown>>({ data, xAxisKey, series, title, value, trend, height, className, wrappedInCard, formatTooltipValue, yAxisDomain, }: AreaLineChartProps<T>): import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=AreaLineChart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AreaLineChart.d.ts","sourceRoot":"","sources":["../../../../src/components/area-line-chart/AreaLineChart.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,kBAAkB,EAA6B,MAAM,uBAAuB,CAAC;AAgC3F,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAChE,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,KAAK,EACL,KAAK,EACL,KAAK,EACL,MAAY,EACZ,SAAc,EACd,aAAqB,EACrB,kBAAkB,GAClB,EAAE,kBAAkB,CAAC,CAAC,CAAC,2CA+IvB"}
1
+ {"version":3,"file":"AreaLineChart.d.ts","sourceRoot":"","sources":["../../../../src/components/area-line-chart/AreaLineChart.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACX,kBAAkB,EAElB,MAAM,uBAAuB,CAAC;AAgD/B,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAChE,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,KAAK,EACL,KAAK,EACL,KAAK,EACL,MAAY,EACZ,SAAc,EACd,aAAqB,EACrB,kBAAkB,EAClB,WAAkC,GAClC,EAAE,kBAAkB,CAAC,CAAC,CAAC,2CAoJvB"}
@@ -27,5 +27,13 @@ export interface AreaLineChartProps<T extends Record<string, unknown> = Record<s
27
27
  wrappedInCard?: boolean;
28
28
  /** Formatear valor en tooltip (valor, dataKey) */
29
29
  formatTooltipValue?: (value: number, dataKey: string) => string;
30
+ /**
31
+ * Dominio del eje Y, en el formato de Recharts (acepta números o
32
+ * expresiones como "dataMax + 5"). Si no se envía, se mantiene el
33
+ * comportamiento por defecto del componente (`[0, "dataMax + 100"]`).
34
+ * El cálculo a partir de los datos (ej. máximo real * 1.2) le
35
+ * corresponde a quien consume el componente, no a AreaLineChart.
36
+ */
37
+ yAxisDomain?: [number | string, number | string];
30
38
  }
31
39
  //# sourceMappingURL=AreaLineChart.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AreaLineChart.types.d.ts","sourceRoot":"","sources":["../../../../src/components/area-line-chart/AreaLineChart.types.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,MAAM,WAAW,yBAAyB;IACzC,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9F,gFAAgF;IAChF,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,MAAM,EAAE,yBAAyB,EAAE,CAAC;IACpC,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CAChE"}
1
+ {"version":3,"file":"AreaLineChart.types.d.ts","sourceRoot":"","sources":["../../../../src/components/area-line-chart/AreaLineChart.types.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,MAAM,WAAW,yBAAyB;IACzC,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB,CAClC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAE3D,gFAAgF;IAChF,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,MAAM,EAAE,yBAAyB,EAAE,CAAC;IACpC,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IAChE;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CACjD"}
@@ -0,0 +1,9 @@
1
+ import type React from "react";
2
+ import type { DonutChartProps } from "./DonutChart.types";
3
+ /**
4
+ * DonutChart - Gráfico circular (pie o donut, según `innerRadiusRatio`) con
5
+ * leyenda y total central propios, renderizados fuera del árbol de Recharts
6
+ * para que sean estables independientemente del tamaño medido del contenedor.
7
+ */
8
+ export declare const DonutChart: React.FC<DonutChartProps>;
9
+ //# sourceMappingURL=DonutChart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DonutChart.d.ts","sourceRoot":"","sources":["../../../../src/components/donut-chart/DonutChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,KAAK,EACX,eAAe,EAEf,MAAM,oBAAoB,CAAC;AAQ5B;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA4EhD,CAAC"}
@@ -0,0 +1,51 @@
1
+ export type DonutChartDatum = {
2
+ /** Nombre de la categoría (se usa como key de React y en la leyenda/tooltip). */
3
+ name: string;
4
+ /** Valor numérico de la categoría. Valores negativos se tratan como 0. */
5
+ value: number;
6
+ /** Color fijo de esta categoría. Si se omite, se resuelve de la paleta por índice. */
7
+ color?: string;
8
+ };
9
+ export type DonutChartSlice = DonutChartDatum & {
10
+ /** Color ya resuelto (propio o de la paleta). */
11
+ color: string;
12
+ /** Proporción sobre el total, entre 0 y 1. */
13
+ percent: number;
14
+ };
15
+ /**
16
+ * Traducciones disponibles para el componente.
17
+ * Todas las propiedades son opcionales para permitir traducciones parciales.
18
+ */
19
+ export type DonutChartTranslations = {
20
+ /** Texto cuando no hay datos o todos los valores son 0. */
21
+ emptyState?: string;
22
+ /** Etiqueta sobre el total, en el centro del donut (solo si `innerRadiusRatio > 0`). */
23
+ totalLabel?: string;
24
+ };
25
+ export type DonutChartProps = {
26
+ /** Categorías a graficar. */
27
+ data: DonutChartDatum[];
28
+ /** Alto del gráfico en px (el ancho es 100% del contenedor). @default 220 */
29
+ height?: number;
30
+ /**
31
+ * Radio interior como proporción del radio exterior: 0 dibuja un pie
32
+ * completo, valores > 0 dibujan un donut (más alto = anillo más fino).
33
+ * @default 0.65
34
+ */
35
+ innerRadiusRatio?: number;
36
+ /** Muestra la leyenda con nombre + porcentaje debajo del gráfico. @default true */
37
+ showLegend?: boolean;
38
+ /** Muestra el total en el centro (solo aplica si `innerRadiusRatio > 0`). @default true */
39
+ showTotal?: boolean;
40
+ /** Paleta de color de respaldo, ciclada por índice para categorías sin `color` propio. */
41
+ colors?: string[];
42
+ /** Formateo a medida del valor mostrado en el tooltip/centro (por defecto, el número tal cual). */
43
+ formatValue?: (value: number) => string;
44
+ /**
45
+ * Traducciones i18n del componente.
46
+ * Si no se proporciona, usa traducciones por defecto en español.
47
+ */
48
+ translations?: DonutChartTranslations;
49
+ className?: string;
50
+ };
51
+ //# sourceMappingURL=DonutChart.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DonutChart.types.d.ts","sourceRoot":"","sources":["../../../../src/components/donut-chart/DonutChart.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC7B,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,eAAe,GAAG;IAC/C,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACpC,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wFAAwF;IACxF,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC7B,6BAA6B;IAC7B,IAAI,EAAE,eAAe,EAAE,CAAC;IACxB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mFAAmF;IACnF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2FAA2F;IAC3F,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0FAA0F;IAC1F,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,mGAAmG;IACnG,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC;;;OAGG;IACH,YAAY,CAAC,EAAE,sBAAsB,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { DonutChartDatum, DonutChartSlice } from "./DonutChart.types";
2
+ /** Paleta categórica por defecto: primary/secondary/success/warning/danger de BeweOS. */
3
+ export declare const DEFAULT_DONUT_COLORS: string[];
4
+ export declare function computeTotal(data: DonutChartDatum[]): number;
5
+ /**
6
+ * `true` cuando no hay datos o todos los valores son 0 — mismo criterio que el
7
+ * `NotData` legacy de Guru.js: un donut sin nada que repartir no aporta información.
8
+ */
9
+ export declare function isDonutEmpty(data: DonutChartDatum[]): boolean;
10
+ /**
11
+ * Resuelve las proporciones y el color final de cada categoría.
12
+ * El color propio de cada dato tiene prioridad; si falta, se cicla `palette` por índice.
13
+ */
14
+ export declare function computeSlices(data: DonutChartDatum[], palette?: string[]): DonutChartSlice[];
15
+ //# sourceMappingURL=donut-chart.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"donut-chart.utils.d.ts","sourceRoot":"","sources":["../../../../src/components/donut-chart/donut-chart.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE3E,yFAAyF;AACzF,eAAO,MAAM,oBAAoB,UAMhC,CAAC;AAMF,wBAAgB,YAAY,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,CAE5D;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,OAAO,CAE7D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC5B,IAAI,EAAE,eAAe,EAAE,EACvB,OAAO,GAAE,MAAM,EAAyB,GACtC,eAAe,EAAE,CAWnB"}
@@ -0,0 +1,4 @@
1
+ export { DonutChart } from "./DonutChart";
2
+ export type { DonutChartDatum, DonutChartProps, DonutChartSlice, DonutChartTranslations, } from "./DonutChart.types";
3
+ export { DEFAULT_DONUT_COLORS, computeSlices, computeTotal, isDonutEmpty, } from "./donut-chart.utils";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/donut-chart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EACX,eAAe,EACf,eAAe,EACf,eAAe,EACf,sBAAsB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,YAAY,GACZ,MAAM,qBAAqB,CAAC"}
@@ -91,6 +91,19 @@ export type DrawerFiltersTranslations = {
91
91
  dayMonthSingleOption?: string;
92
92
  /** Label del radio "rango" en modo dayMonth. Default: "Rango de fechas" */
93
93
  dayMonthRangeOption?: string;
94
+ /** Label del radio "día específico" en filtros `date` con granularity `full` (default). Reenviado a `DateSelector`. */
95
+ dayOption?: string;
96
+ /** Label del radio "rango de fechas" en filtros `date` con granularity `full` (default). Reenviado a `DateSelector`. */
97
+ dateRangeOption?: string;
98
+ /** Aria-label del DatePicker en filtros `date` con granularity `full` (default). Reenviado a `DateSelector`. */
99
+ selectDateAriaLabel?: string;
100
+ /** Aria-label del DateRangePicker en filtros `date` con granularity `full` (default). Reenviado a `DateSelector`. */
101
+ selectDateRangeAriaLabel?: string;
102
+ /**
103
+ * Placeholder del disparador en filtros `multiselect`. Debe incluir `{label}` = título del filtro en minúsculas.
104
+ * Default: "Seleccionar {label}"
105
+ */
106
+ selectPlaceholder?: string;
94
107
  };
95
108
  export interface DrawerFiltersConfig {
96
109
  title: string;