@beweco/aurora-ui 0.6.70 → 0.6.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +191 -32
- package/dist/index.esm.js +182 -34
- package/dist/types/components/area-line-chart/AreaLineChart.d.ts +1 -1
- package/dist/types/components/area-line-chart/AreaLineChart.d.ts.map +1 -1
- package/dist/types/components/area-line-chart/AreaLineChart.types.d.ts +8 -0
- package/dist/types/components/area-line-chart/AreaLineChart.types.d.ts.map +1 -1
- package/dist/types/components/donut-chart/DonutChart.d.ts +9 -0
- package/dist/types/components/donut-chart/DonutChart.d.ts.map +1 -0
- package/dist/types/components/donut-chart/DonutChart.types.d.ts +51 -0
- package/dist/types/components/donut-chart/DonutChart.types.d.ts.map +1 -0
- package/dist/types/components/donut-chart/donut-chart.utils.d.ts +15 -0
- package/dist/types/components/donut-chart/donut-chart.utils.d.ts.map +1 -0
- package/dist/types/components/donut-chart/index.d.ts +4 -0
- package/dist/types/components/donut-chart/index.d.ts.map +1 -0
- package/dist/types/components/ranked-bar-list/RankedBarList.d.ts +10 -0
- package/dist/types/components/ranked-bar-list/RankedBarList.d.ts.map +1 -0
- package/dist/types/components/ranked-bar-list/RankedBarList.types.d.ts +41 -0
- package/dist/types/components/ranked-bar-list/RankedBarList.types.d.ts.map +1 -0
- package/dist/types/components/ranked-bar-list/index.d.ts +4 -0
- package/dist/types/components/ranked-bar-list/index.d.ts.map +1 -0
- package/dist/types/components/ranked-bar-list/ranked-bar-list.utils.d.ts +16 -0
- package/dist/types/components/ranked-bar-list/ranked-bar-list.utils.d.ts.map +1 -0
- package/dist/types/components/stat-tile/StatTile.d.ts +10 -0
- package/dist/types/components/stat-tile/StatTile.d.ts.map +1 -0
- package/dist/types/components/stat-tile/StatTile.types.d.ts +40 -0
- package/dist/types/components/stat-tile/StatTile.types.d.ts.map +1 -0
- package/dist/types/components/stat-tile/index.d.ts +3 -0
- package/dist/types/components/stat-tile/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -581,9 +581,9 @@ function ChartTooltip(_a) {
|
|
|
581
581
|
})] }));
|
|
582
582
|
}
|
|
583
583
|
function AreaLineChart(_a) {
|
|
584
|
-
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;
|
|
584
|
+
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;
|
|
585
585
|
var hasHeader = title != null || value != null || trend != null || series.length > 0;
|
|
586
|
-
var content = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasHeader && (jsxRuntime.jsxs("div", { className: "flex items-start justify-between mb-6", children: [jsxRuntime.jsxs("div", { children: [title != null && (jsxRuntime.jsx(H3, { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-1", children: title })), value != null && (jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2", children: [jsxRuntime.jsx("span", { className: "text-2xl font-bold text-gray-900", children: value }), trend != null && (jsxRuntime.jsx("span", { className: "text-xs font-medium text-yellow-600 bg-yellow-50 px-2 py-1 rounded", children: trend }))] }))] }), series.length > 0 && (jsxRuntime.jsx("div", { className: "flex items-center gap-4", children: series.map(function (s) { return (jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx("svg", { width: "16", height: "2", viewBox: "0 0 16 2", fill: "none", children: jsxRuntime.jsx("line", { x1: "0", y1: "1", x2: "16", y2: "1", stroke: s.color, strokeWidth: "2" }) }), jsxRuntime.jsx("span", { className: "text-xs text-gray-600 font-medium", children: s.label })] }, s.dataKey)); }) }))] })), jsxRuntime.jsx("div", { className: "w-full", style: { height: "".concat(height, "px") }, children: jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height: "100%", children: jsxRuntime.jsxs(recharts.LineChart, { data: data, margin: { top: 5, right: 5, left: 5, bottom: 5 }, children: [jsxRuntime.jsx("defs", { children: series.map(function (s) { return (jsxRuntime.jsxs("linearGradient", { id: "area-line-chart-".concat(s.dataKey), x1: "0", y1: "0", x2: "0", y2: "1", children: [jsxRuntime.jsx("stop", { offset: "0%", stopColor: s.color, stopOpacity: 0.3 }), jsxRuntime.jsx("stop", { offset: "50%", stopColor: s.color, stopOpacity: 0.15 }), jsxRuntime.jsx("stop", { offset: "100%", stopColor: s.color, stopOpacity: 0 })] }, s.dataKey)); }) }), jsxRuntime.jsx(recharts.XAxis, { dataKey: xAxisKey, axisLine: false, tickLine: false, tick: { fill: "#9ca3af", fontSize: 12 }, dy: 10 }), jsxRuntime.jsx(recharts.YAxis, { axisLine: false, tickLine: false, tick: { fill: "transparent", fontSize: 0 }, width: 0, tickCount: 6, domain:
|
|
586
|
+
var content = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasHeader && (jsxRuntime.jsxs("div", { className: "flex items-start justify-between mb-6", children: [jsxRuntime.jsxs("div", { children: [title != null && (jsxRuntime.jsx(H3, { className: "text-xs font-semibold text-gray-500 uppercase tracking-wide mb-1", children: title })), value != null && (jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2", children: [jsxRuntime.jsx("span", { className: "text-2xl font-bold text-gray-900", children: value }), trend != null && (jsxRuntime.jsx("span", { className: "text-xs font-medium text-yellow-600 bg-yellow-50 px-2 py-1 rounded", children: trend }))] }))] }), series.length > 0 && (jsxRuntime.jsx("div", { className: "flex flex-wrap items-center gap-4", children: series.map(function (s) { return (jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx("svg", { width: "16", height: "2", viewBox: "0 0 16 2", fill: "none", children: jsxRuntime.jsx("line", { x1: "0", y1: "1", x2: "16", y2: "1", stroke: s.color, strokeWidth: "2" }) }), jsxRuntime.jsx("span", { className: "text-xs text-gray-600 font-medium", children: s.label })] }, s.dataKey)); }) }))] })), jsxRuntime.jsx("div", { className: "w-full", style: { height: "".concat(height, "px") }, children: jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height: "100%", children: jsxRuntime.jsxs(recharts.LineChart, { data: data, margin: { top: 5, right: 5, left: 5, bottom: 5 }, children: [jsxRuntime.jsx("defs", { children: series.map(function (s) { return (jsxRuntime.jsxs("linearGradient", { id: "area-line-chart-".concat(s.dataKey), x1: "0", y1: "0", x2: "0", y2: "1", children: [jsxRuntime.jsx("stop", { offset: "0%", stopColor: s.color, stopOpacity: 0.3 }), jsxRuntime.jsx("stop", { offset: "50%", stopColor: s.color, stopOpacity: 0.15 }), jsxRuntime.jsx("stop", { offset: "100%", stopColor: s.color, stopOpacity: 0 })] }, s.dataKey)); }) }), jsxRuntime.jsx(recharts.XAxis, { dataKey: xAxisKey, axisLine: false, tickLine: false, tick: { fill: "#9ca3af", fontSize: 12 }, dy: 10 }), jsxRuntime.jsx(recharts.YAxis, { axisLine: false, tickLine: false, tick: { fill: "transparent", fontSize: 0 }, width: 0, tickCount: 6, domain: yAxisDomain, allowDecimals: false }), jsxRuntime.jsx(recharts.CartesianGrid, { strokeDasharray: "3 3", stroke: "#d1d5db", strokeOpacity: 0.5, vertical: false, horizontal: true }), jsxRuntime.jsx(recharts.Tooltip, { content: jsxRuntime.jsx(ChartTooltip, { series: series, formatValue: formatTooltipValue }) }), series.map(function (s) { return (jsxRuntime.jsx(recharts.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 (jsxRuntime.jsx(recharts.Line, { type: "natural", dataKey: s.dataKey, name: s.dataKey, stroke: s.color, strokeWidth: 3, dot: false, activeDot: {
|
|
587
587
|
r: 6,
|
|
588
588
|
fill: s.color,
|
|
589
589
|
stroke: "#fff",
|
|
@@ -2946,6 +2946,65 @@ var DateSelector = function (_a) {
|
|
|
2946
2946
|
return (jsxRuntime.jsxs("div", { className: "w-full flex flex-wrap xs:gap-5 justify-between items-center ".concat(className), children: [jsxRuntime.jsxs(react.RadioGroup, __assign({ color: "primary", orientation: "horizontal", size: "sm", value: type, onValueChange: handleTypeChange }, radioGroupProps, { children: [jsxRuntime.jsx(react.Radio, __assign({ value: exports.HolidayType.SingleDay }, radioItemProps, { children: t.dayOption })), jsxRuntime.jsx(react.Radio, __assign({ value: exports.HolidayType.DateRange }, radioItemProps, { children: t.dateRangeOption }))] })), type === exports.HolidayType.DateRange ? (jsxRuntime.jsx(react.DateRangePicker, __assign({ className: "xs:w-full md:flex-1 md:max-w-xs", value: dateRange || null, onChange: handleDateRangeChange, "aria-label": t.selectDateRangeAriaLabel, endContent: jsxRuntime.jsx(IconComponent, { icon: "solar:calendar-outline" }) }, dateRangePickerProps))) : (jsxRuntime.jsx(react.DatePicker, __assign({ className: "xs:w-full md:flex-1 md:max-w-40", value: date || null, onChange: handleDateChange, endContent: jsxRuntime.jsx(IconComponent, { icon: "solar:calendar-outline" }), "aria-label": t.selectDateAriaLabel }, datePickerProps)))] }));
|
|
2947
2947
|
};
|
|
2948
2948
|
|
|
2949
|
+
/** Paleta categórica por defecto: primary/secondary/success/warning/danger de BeweOS. */
|
|
2950
|
+
var DEFAULT_DONUT_COLORS = [
|
|
2951
|
+
"#006fee",
|
|
2952
|
+
"#7828c8",
|
|
2953
|
+
"#17c964",
|
|
2954
|
+
"#f5a524",
|
|
2955
|
+
"#f31260",
|
|
2956
|
+
];
|
|
2957
|
+
function safeValue$1(value) {
|
|
2958
|
+
return Number.isFinite(value) && value > 0 ? value : 0;
|
|
2959
|
+
}
|
|
2960
|
+
function computeTotal(data) {
|
|
2961
|
+
return data.reduce(function (sum, d) { return sum + safeValue$1(d.value); }, 0);
|
|
2962
|
+
}
|
|
2963
|
+
/**
|
|
2964
|
+
* `true` cuando no hay datos o todos los valores son 0 — mismo criterio que el
|
|
2965
|
+
* `NotData` legacy de Guru.js: un donut sin nada que repartir no aporta información.
|
|
2966
|
+
*/
|
|
2967
|
+
function isDonutEmpty(data) {
|
|
2968
|
+
return data.length === 0 || computeTotal(data) === 0;
|
|
2969
|
+
}
|
|
2970
|
+
/**
|
|
2971
|
+
* Resuelve las proporciones y el color final de cada categoría.
|
|
2972
|
+
* El color propio de cada dato tiene prioridad; si falta, se cicla `palette` por índice.
|
|
2973
|
+
*/
|
|
2974
|
+
function computeSlices(data, palette) {
|
|
2975
|
+
if (palette === void 0) { palette = DEFAULT_DONUT_COLORS; }
|
|
2976
|
+
var total = computeTotal(data);
|
|
2977
|
+
return data.map(function (datum, index) {
|
|
2978
|
+
var _a;
|
|
2979
|
+
var value = safeValue$1(datum.value);
|
|
2980
|
+
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 });
|
|
2981
|
+
});
|
|
2982
|
+
}
|
|
2983
|
+
|
|
2984
|
+
var DEFAULT_TRANSLATIONS$b = {
|
|
2985
|
+
emptyState: "Sin datos para mostrar",
|
|
2986
|
+
totalLabel: "Total",
|
|
2987
|
+
};
|
|
2988
|
+
/**
|
|
2989
|
+
* DonutChart - Gráfico circular (pie o donut, según `innerRadiusRatio`) con
|
|
2990
|
+
* leyenda y total central propios, renderizados fuera del árbol de Recharts
|
|
2991
|
+
* para que sean estables independientemente del tamaño medido del contenedor.
|
|
2992
|
+
*/
|
|
2993
|
+
var DonutChart = function (_a) {
|
|
2994
|
+
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;
|
|
2995
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$b), translations);
|
|
2996
|
+
if (isDonutEmpty(data)) {
|
|
2997
|
+
return (jsxRuntime.jsx("div", { className: className, children: jsxRuntime.jsx(P, { children: t.emptyState }) }));
|
|
2998
|
+
}
|
|
2999
|
+
var slices = computeSlices(data, colors);
|
|
3000
|
+
var total = slices.reduce(function (sum, s) { return sum + s.value; }, 0);
|
|
3001
|
+
var format = function (value) {
|
|
3002
|
+
return formatValue ? formatValue(value) : String(value);
|
|
3003
|
+
};
|
|
3004
|
+
var isDonut = innerRadiusRatio > 0;
|
|
3005
|
+
return (jsxRuntime.jsxs("div", { className: className, children: [jsxRuntime.jsxs("div", { className: "relative w-full", style: { height: height }, children: [jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height: "100%", children: jsxRuntime.jsxs(recharts.PieChart, { children: [jsxRuntime.jsx(recharts.Pie, { data: slices, dataKey: "value", nameKey: "name", innerRadius: isDonut ? "".concat(innerRadiusRatio * 100, "%") : 0, outerRadius: "90%", stroke: "none", children: slices.map(function (slice) { return (jsxRuntime.jsx(recharts.Cell, { fill: slice.color }, slice.name)); }) }), jsxRuntime.jsx(recharts.Tooltip, { formatter: function (value) { return format(value); } })] }) }), isDonut && showTotal && (jsxRuntime.jsxs("div", { className: "aurora-donut-total pointer-events-none absolute inset-0 flex flex-col items-center justify-center", "aria-hidden": "true", children: [jsxRuntime.jsx("span", { className: "text-xs text-foreground-500", children: t.totalLabel }), jsxRuntime.jsx("span", { className: "text-xl font-semibold", children: format(total) })] }))] }), showLegend && (jsxRuntime.jsx("ul", { className: "mt-3 flex flex-wrap gap-3", children: slices.map(function (slice) { return (jsxRuntime.jsxs("li", { className: "flex items-center gap-1.5 text-xs", children: [jsxRuntime.jsx("span", { className: "h-2 w-2 rounded-full", style: { backgroundColor: slice.color }, "aria-hidden": "true" }), jsxRuntime.jsx("span", { children: slice.name }), jsxRuntime.jsxs("span", { className: "text-foreground-500", children: [Math.round(slice.percent * 100), "%"] })] }, slice.name)); }) }))] }));
|
|
3006
|
+
};
|
|
3007
|
+
|
|
2949
3008
|
var H1 = function (_a) {
|
|
2950
3009
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
2951
3010
|
return (jsxRuntime.jsx("h1", __assign({ className: react.cn("text-xl font-bold", className) }, props, { children: children })));
|
|
@@ -3011,12 +3070,12 @@ var NotificationButton = function (_a) {
|
|
|
3011
3070
|
};
|
|
3012
3071
|
NotificationButton.displayName = "NotificationButton";
|
|
3013
3072
|
|
|
3014
|
-
var DEFAULT_TRANSLATIONS$
|
|
3073
|
+
var DEFAULT_TRANSLATIONS$a = {
|
|
3015
3074
|
logout: "Cerrar sesión",
|
|
3016
3075
|
};
|
|
3017
3076
|
var HeaderComponent = function (_a) {
|
|
3018
3077
|
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;
|
|
3019
|
-
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$
|
|
3078
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$a), translations);
|
|
3020
3079
|
return (jsxRuntime.jsx("header", { className: "header__container", children: jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full", children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [showMenuButton && (jsxRuntime.jsx(react.Button, { className: "sm:hidden", isIconOnly: true, variant: "light", startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:hamburger-menu-linear" }), onPress: onMenuClick })), breadcrumbs && breadcrumbs.length > 0 && (jsxRuntime.jsx(BreadcrumbsComponent, { items: breadcrumbs, onItemClick: onBreadcrumbClick }))] }), jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [extraContent, jsxRuntime.jsx(NotificationButton, { notificationCount: notificationCount, onPress: onNotificationClick }), jsxRuntime.jsx(ConfigMenu, { options: options, onLogout: onLogout, onOptionSelect: onOptionSelect, translations: t })] })] }) }));
|
|
3021
3080
|
};
|
|
3022
3081
|
HeaderComponent.displayName = "Header";
|
|
@@ -3140,7 +3199,7 @@ KanbanColumn.displayName = "KanbanColumn";
|
|
|
3140
3199
|
* Traducciones por defecto en español.
|
|
3141
3200
|
* Se mezclan con las traducciones proporcionadas por el usuario.
|
|
3142
3201
|
*/
|
|
3143
|
-
var DEFAULT_TRANSLATIONS$
|
|
3202
|
+
var DEFAULT_TRANSLATIONS$9 = {
|
|
3144
3203
|
dropHere: "Soltar aquí",
|
|
3145
3204
|
emptyMessage: "No hay elementos",
|
|
3146
3205
|
};
|
|
@@ -3174,7 +3233,7 @@ var columnGapClasses = {
|
|
|
3174
3233
|
var KanbanComponent = function (_a) {
|
|
3175
3234
|
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;
|
|
3176
3235
|
// Mezclar traducciones del usuario con las por defecto
|
|
3177
|
-
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$
|
|
3236
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$9), translations);
|
|
3178
3237
|
// Determinar si drag está habilitado
|
|
3179
3238
|
var dragEnabled = isDraggable !== null && isDraggable !== void 0 ? isDraggable : !!onItemMove;
|
|
3180
3239
|
// Estado del drag actual
|
|
@@ -3518,7 +3577,7 @@ var MenuNavList = React.forwardRef(function (_a, ref) {
|
|
|
3518
3577
|
});
|
|
3519
3578
|
MenuNavList.displayName = "MenuNavList";
|
|
3520
3579
|
|
|
3521
|
-
var DEFAULT_TRANSLATIONS$
|
|
3580
|
+
var DEFAULT_TRANSLATIONS$8 = {
|
|
3522
3581
|
menuLabel: "Menú",
|
|
3523
3582
|
closeSidebarAriaLabel: "Cerrar menú lateral",
|
|
3524
3583
|
mobileNavAriaLabel: "Navegación móvil",
|
|
@@ -3536,7 +3595,7 @@ var MenuComponent = React.memo(function Menu(_a) {
|
|
|
3536
3595
|
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;
|
|
3537
3596
|
var _f = React.useState(false), isCollapsed = _f[0], setIsCollapsed = _f[1];
|
|
3538
3597
|
var _g = React.useState(false), logoError = _g[0], setLogoError = _g[1];
|
|
3539
|
-
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$
|
|
3598
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$8), translations);
|
|
3540
3599
|
var selectedKey = React.useMemo(function () {
|
|
3541
3600
|
var _a, _b, _c;
|
|
3542
3601
|
if (menuItems.selectedPath) {
|
|
@@ -3820,7 +3879,7 @@ var MenuClawNavItem = function (_a) {
|
|
|
3820
3879
|
};
|
|
3821
3880
|
MenuClawNavItem.displayName = "MenuClawNavItem";
|
|
3822
3881
|
|
|
3823
|
-
var DEFAULT_TRANSLATIONS$
|
|
3882
|
+
var DEFAULT_TRANSLATIONS$7 = {
|
|
3824
3883
|
menuLabel: "Menú",
|
|
3825
3884
|
closeSidebarAriaLabel: "Cerrar menú lateral",
|
|
3826
3885
|
mobileNavAriaLabel: "Navegación móvil",
|
|
@@ -3858,7 +3917,7 @@ var MenuClaw = React.memo(function MenuClaw(_a) {
|
|
|
3858
3917
|
var _b, _c;
|
|
3859
3918
|
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;
|
|
3860
3919
|
var _f = React.useState(false), isCollapsed = _f[0], setIsCollapsed = _f[1];
|
|
3861
|
-
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$
|
|
3920
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$7), translations);
|
|
3862
3921
|
var selectedKey = React.useMemo(function () {
|
|
3863
3922
|
var _a, _b, _c;
|
|
3864
3923
|
if (menuItems.selectedPath) {
|
|
@@ -4368,6 +4427,64 @@ var PromotionalBanner = function (_a) {
|
|
|
4368
4427
|
}, variant: "bordered", onClick: handleButtonClick }, buttonProps, { children: finalButtonText })), showCloseButton && (jsxRuntime.jsx("div", { className: "flex flex-1 justify-end", children: jsxRuntime.jsx(react.Button, { isIconOnly: true, "aria-label": t.closeButtonLabel, className: "-m-1", size: "lg", variant: "bordered", onClick: handleClose, children: jsxRuntime.jsx(IconComponent, { "aria-hidden": "true", className: "text-default-500", icon: "lucide:x", size: "md" }) }) }))] }));
|
|
4369
4428
|
};
|
|
4370
4429
|
|
|
4430
|
+
/** Paleta categórica por defecto: primary/secondary/success/warning/danger de BeweOS. */
|
|
4431
|
+
var DEFAULT_RANKED_BAR_COLORS = [
|
|
4432
|
+
"#006fee",
|
|
4433
|
+
"#7828c8",
|
|
4434
|
+
"#17c964",
|
|
4435
|
+
"#f5a524",
|
|
4436
|
+
"#f31260",
|
|
4437
|
+
];
|
|
4438
|
+
function safeValue(value) {
|
|
4439
|
+
return Number.isFinite(value) && value > 0 ? value : 0;
|
|
4440
|
+
}
|
|
4441
|
+
function computeMax(data) {
|
|
4442
|
+
return data.reduce(function (max, d) { return Math.max(max, safeValue(d.value)); }, 0);
|
|
4443
|
+
}
|
|
4444
|
+
/**
|
|
4445
|
+
* `true` cuando no hay datos o todos los valores son 0 — mismo criterio que el
|
|
4446
|
+
* `NotData` legacy de Guru.js.
|
|
4447
|
+
*/
|
|
4448
|
+
function isRankedBarListEmpty(data) {
|
|
4449
|
+
return data.length === 0 || computeMax(data) === 0;
|
|
4450
|
+
}
|
|
4451
|
+
/**
|
|
4452
|
+
* Resuelve el ancho de cada barra como porcentaje del **valor máximo del set**
|
|
4453
|
+
* (no del total) — igual que `BusinessStage.js` legacy (`100 * quantity / max`),
|
|
4454
|
+
* y el color final de cada fila.
|
|
4455
|
+
*/
|
|
4456
|
+
function computeBars(data, palette) {
|
|
4457
|
+
if (palette === void 0) { palette = DEFAULT_RANKED_BAR_COLORS; }
|
|
4458
|
+
var max = computeMax(data);
|
|
4459
|
+
return data.map(function (item, index) {
|
|
4460
|
+
var _a;
|
|
4461
|
+
var value = safeValue(item.value);
|
|
4462
|
+
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 });
|
|
4463
|
+
});
|
|
4464
|
+
}
|
|
4465
|
+
|
|
4466
|
+
var DEFAULT_TRANSLATIONS$6 = {
|
|
4467
|
+
emptyState: "Sin datos para mostrar",
|
|
4468
|
+
};
|
|
4469
|
+
/**
|
|
4470
|
+
* RankedBarList - Lista de barras horizontales escaladas al valor máximo del
|
|
4471
|
+
* set (no al total) — mismo criterio visual que `BusinessStage.js` legacy.
|
|
4472
|
+
* No reordena las filas: el llamador decide el orden (por relevancia, por
|
|
4473
|
+
* etapa del funnel, etc.).
|
|
4474
|
+
*/
|
|
4475
|
+
var RankedBarList = function (_a) {
|
|
4476
|
+
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;
|
|
4477
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$6), translations);
|
|
4478
|
+
if (isRankedBarListEmpty(data)) {
|
|
4479
|
+
return (jsxRuntime.jsx("div", { className: className, children: jsxRuntime.jsx(P, { children: t.emptyState }) }));
|
|
4480
|
+
}
|
|
4481
|
+
var bars = computeBars(data, colors);
|
|
4482
|
+
var format = function (value) {
|
|
4483
|
+
return formatValue ? formatValue(value) : String(value);
|
|
4484
|
+
};
|
|
4485
|
+
return (jsxRuntime.jsx("div", { className: ["flex flex-col gap-3", className].filter(Boolean).join(" "), children: bars.map(function (bar) { return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [jsxRuntime.jsxs("div", { className: "flex items-baseline justify-between gap-2", children: [jsxRuntime.jsx(P, { className: "truncate", children: bar.label }), showValue && (jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: format(bar.value) }))] }), jsxRuntime.jsx("div", { className: "w-full rounded-full bg-default-100", style: { height: barHeight }, children: jsxRuntime.jsx("div", { className: "h-full rounded-full", style: { width: "".concat(bar.percent, "%"), backgroundColor: bar.color } }) })] }, bar.label)); }) }));
|
|
4486
|
+
};
|
|
4487
|
+
|
|
4371
4488
|
var VALID_STEP_COLORS = [
|
|
4372
4489
|
"primary",
|
|
4373
4490
|
"secondary",
|
|
@@ -5559,6 +5676,59 @@ var SocialMediaPreview = function (_a) {
|
|
|
5559
5676
|
}
|
|
5560
5677
|
};
|
|
5561
5678
|
|
|
5679
|
+
var paddingClasses = {
|
|
5680
|
+
sm: "p-4",
|
|
5681
|
+
md: "p-6",
|
|
5682
|
+
lg: "p-8",
|
|
5683
|
+
};
|
|
5684
|
+
|
|
5685
|
+
/**
|
|
5686
|
+
* Card genérica siguiendo las reglas de diseño BeweOS basada en HeroUI.
|
|
5687
|
+
*
|
|
5688
|
+
* Reglas aplicadas:
|
|
5689
|
+
* - Shadow: none, sm, md, lg (configurable)
|
|
5690
|
+
* - Radius: sm (por defecto, configurable)
|
|
5691
|
+
* - Padding configurable (sm, md, lg)
|
|
5692
|
+
* - Hereda de HeroUI Card con personalización BeweOS
|
|
5693
|
+
*/
|
|
5694
|
+
var Card = function (_a) {
|
|
5695
|
+
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"]);
|
|
5696
|
+
var paddingClass = paddingClasses[padding];
|
|
5697
|
+
var combinedClassName = [paddingClass, className].filter(Boolean).join(" ");
|
|
5698
|
+
return (jsxRuntime.jsx(react.Card, __assign({ shadow: shadow, radius: radius, className: combinedClassName }, props, { children: children })));
|
|
5699
|
+
};
|
|
5700
|
+
|
|
5701
|
+
var DEFAULT_TRANSLATIONS$5 = {
|
|
5702
|
+
trendUpAriaLabel: "Tendencia al alza",
|
|
5703
|
+
trendDownAriaLabel: "Tendencia a la baja",
|
|
5704
|
+
trendNeutralAriaLabel: "Sin variación",
|
|
5705
|
+
};
|
|
5706
|
+
var TREND_COLOR_CLASS = {
|
|
5707
|
+
positive: "text-success",
|
|
5708
|
+
negative: "text-danger",
|
|
5709
|
+
neutral: "text-foreground-500",
|
|
5710
|
+
};
|
|
5711
|
+
var TREND_ARIA_KEY = {
|
|
5712
|
+
positive: "trendUpAriaLabel",
|
|
5713
|
+
negative: "trendDownAriaLabel",
|
|
5714
|
+
neutral: "trendNeutralAriaLabel",
|
|
5715
|
+
};
|
|
5716
|
+
/**
|
|
5717
|
+
* StatTile - Tarjeta KPI compacta: ícono opcional + título + valor + tendencia opcional.
|
|
5718
|
+
*
|
|
5719
|
+
* Cubre el patrón "tile" (título + número, con o sin ícono/variación) que se repite en
|
|
5720
|
+
* varios dashboards de estadísticas y no encajaba en ningún chart existente de AuraUI.
|
|
5721
|
+
*/
|
|
5722
|
+
var StatTile = function (_a) {
|
|
5723
|
+
var _b;
|
|
5724
|
+
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"]);
|
|
5725
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$5), translations);
|
|
5726
|
+
var direction = (_b = trend === null || trend === void 0 ? void 0 : trend.direction) !== null && _b !== void 0 ? _b : "neutral";
|
|
5727
|
+
return (jsxRuntime.jsxs(Card, __assign({ padding: padding, className: ["flex flex-row items-center gap-3", className]
|
|
5728
|
+
.filter(Boolean)
|
|
5729
|
+
.join(" ") }, cardProps, { children: [icon && (jsxRuntime.jsx("span", { className: "shrink-0 text-foreground-600", "aria-hidden": "true", children: icon })), jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-0.5", children: [jsxRuntime.jsx(P, { className: "truncate", children: title }), jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2", children: [jsxRuntime.jsx(H3, { className: "text-2xl font-semibold", children: value }), trend && (jsxRuntime.jsx("span", { className: "text-xs font-medium ".concat(TREND_COLOR_CLASS[direction]), "aria-label": t[TREND_ARIA_KEY[direction]], children: trend.value }))] })] })] })));
|
|
5730
|
+
};
|
|
5731
|
+
|
|
5562
5732
|
function AuraTable(_a) {
|
|
5563
5733
|
var columns = _a.columns, items = _a.items, renderCell = _a.renderCell, children = _a.children, props = __rest(_a, ["columns", "items", "renderCell", "children"]);
|
|
5564
5734
|
return (jsxRuntime.jsxs(react.Table, __assign({ removeWrapper: true, radius: "none" }, props, { children: [jsxRuntime.jsx(react.TableHeader, { columns: columns, children: function (column) { return jsxRuntime.jsx(react.TableColumn, { children: column.label }, column.key); } }), jsxRuntime.jsx(react.TableBody, { items: items, children: function (item) { return (jsxRuntime.jsx(react.TableRow, { children: function (columnKey) { return (jsxRuntime.jsx(react.TableCell, { children: renderCell ? renderCell(item, columnKey) : children })); } }, item.id)); } })] })));
|
|
@@ -8947,28 +9117,6 @@ ModalBody.displayName = "ModalBody";
|
|
|
8947
9117
|
|
|
8948
9118
|
var ModalFooter = react.ModalFooter;
|
|
8949
9119
|
|
|
8950
|
-
var paddingClasses = {
|
|
8951
|
-
sm: "p-4",
|
|
8952
|
-
md: "p-6",
|
|
8953
|
-
lg: "p-8",
|
|
8954
|
-
};
|
|
8955
|
-
|
|
8956
|
-
/**
|
|
8957
|
-
* Card genérica siguiendo las reglas de diseño BeweOS basada en HeroUI.
|
|
8958
|
-
*
|
|
8959
|
-
* Reglas aplicadas:
|
|
8960
|
-
* - Shadow: none, sm, md, lg (configurable)
|
|
8961
|
-
* - Radius: sm (por defecto, configurable)
|
|
8962
|
-
* - Padding configurable (sm, md, lg)
|
|
8963
|
-
* - Hereda de HeroUI Card con personalización BeweOS
|
|
8964
|
-
*/
|
|
8965
|
-
var Card = function (_a) {
|
|
8966
|
-
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"]);
|
|
8967
|
-
var paddingClass = paddingClasses[padding];
|
|
8968
|
-
var combinedClassName = [paddingClass, className].filter(Boolean).join(" ");
|
|
8969
|
-
return (jsxRuntime.jsx(react.Card, __assign({ shadow: shadow, radius: radius, className: combinedClassName }, props, { children: children })));
|
|
8970
|
-
};
|
|
8971
|
-
|
|
8972
9120
|
/**
|
|
8973
9121
|
* Tooltip - Componente BeweOS basado en HeroUI.
|
|
8974
9122
|
*
|
|
@@ -9538,10 +9686,13 @@ exports.ColorPicker = ColorPicker;
|
|
|
9538
9686
|
exports.ColorSelector = ColorSelector;
|
|
9539
9687
|
exports.ContentCarousel = ContentCarousel;
|
|
9540
9688
|
exports.Currency = Currency;
|
|
9689
|
+
exports.DEFAULT_DONUT_COLORS = DEFAULT_DONUT_COLORS;
|
|
9541
9690
|
exports.DEFAULT_PREDEFINED_COLORS = DEFAULT_PREDEFINED_COLORS;
|
|
9691
|
+
exports.DEFAULT_RANKED_BAR_COLORS = DEFAULT_RANKED_BAR_COLORS;
|
|
9542
9692
|
exports.DatePicker = DatePicker;
|
|
9543
9693
|
exports.DateRangePicker = DateRangePicker;
|
|
9544
9694
|
exports.DateSelector = DateSelector;
|
|
9695
|
+
exports.DonutChart = DonutChart;
|
|
9545
9696
|
exports.DrawerFilters = DrawerFilters;
|
|
9546
9697
|
exports.EmailPreview = EmailPreview;
|
|
9547
9698
|
exports.GlobalToast = GlobalToast;
|
|
@@ -9574,6 +9725,7 @@ exports.Phone = Phone;
|
|
|
9574
9725
|
exports.PromotionalBanner = PromotionalBanner;
|
|
9575
9726
|
exports.REGISTERED_THEME_COLORS = REGISTERED_THEME_COLORS;
|
|
9576
9727
|
exports.RangeFilter = RangeFilter;
|
|
9728
|
+
exports.RankedBarList = RankedBarList;
|
|
9577
9729
|
exports.RowSteps = RowSteps;
|
|
9578
9730
|
exports.SEGMENTATION_DEFAULT_TRANSLATIONS = DEFAULT_TRANSLATIONS$1;
|
|
9579
9731
|
exports.ScheduleRow = ScheduleRow;
|
|
@@ -9584,6 +9736,7 @@ exports.SimpleLineChart = SimpleLineChart;
|
|
|
9584
9736
|
exports.SocialMediaBar = SocialMediaBar;
|
|
9585
9737
|
exports.SocialMediaCarousel = SocialMediaCarousel;
|
|
9586
9738
|
exports.SocialMediaPreview = SocialMediaPreview;
|
|
9739
|
+
exports.StatTile = StatTile;
|
|
9587
9740
|
exports.StepIndicator = StepIndicator;
|
|
9588
9741
|
exports.SwitchComponent = Switch;
|
|
9589
9742
|
exports.THEME_COLOR_HEX_MAP = THEME_COLOR_HEX_MAP;
|
|
@@ -9604,6 +9757,10 @@ exports.Wizard = Wizard;
|
|
|
9604
9757
|
exports.WizardNavigation = WizardNavigation;
|
|
9605
9758
|
exports.WizardSidebar = WizardSidebar;
|
|
9606
9759
|
exports.applyCustomPrimaryColor = applyCustomPrimaryColor;
|
|
9760
|
+
exports.computeBars = computeBars;
|
|
9761
|
+
exports.computeMax = computeMax;
|
|
9762
|
+
exports.computeSlices = computeSlices;
|
|
9763
|
+
exports.computeTotal = computeTotal;
|
|
9607
9764
|
exports.createCurrencyFormatter = createCurrencyFormatter;
|
|
9608
9765
|
exports.defaultCountries = uniqueCountries;
|
|
9609
9766
|
exports.defaultCurrencyOptions = defaultCurrencyOptions;
|
|
@@ -9617,9 +9774,11 @@ exports.getSelectedKeyFromPath = getSelectedKeyFromPath;
|
|
|
9617
9774
|
exports.hexToThemeColor = hexToThemeColor;
|
|
9618
9775
|
exports.hslToCssValue = hslToCssValue;
|
|
9619
9776
|
exports.isAuroraFullThemeId = isAuroraFullThemeId;
|
|
9777
|
+
exports.isDonutEmpty = isDonutEmpty;
|
|
9620
9778
|
exports.isExactThemeColor = isExactThemeColor;
|
|
9621
9779
|
exports.isGroupState = isGroupState;
|
|
9622
9780
|
exports.isHexColor = isHexColor;
|
|
9781
|
+
exports.isRankedBarListEmpty = isRankedBarListEmpty;
|
|
9623
9782
|
exports.isSegmentationGroup = isSegmentationGroup;
|
|
9624
9783
|
exports.removeCustomPrimaryColor = removeCustomPrimaryColor;
|
|
9625
9784
|
exports.sizeMap = sizeMap;
|
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:
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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) {
|
|
@@ -4369,6 +4428,64 @@ var PromotionalBanner = function (_a) {
|
|
|
4369
4428
|
}, 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
4429
|
};
|
|
4371
4430
|
|
|
4431
|
+
/** Paleta categórica por defecto: primary/secondary/success/warning/danger de BeweOS. */
|
|
4432
|
+
var DEFAULT_RANKED_BAR_COLORS = [
|
|
4433
|
+
"#006fee",
|
|
4434
|
+
"#7828c8",
|
|
4435
|
+
"#17c964",
|
|
4436
|
+
"#f5a524",
|
|
4437
|
+
"#f31260",
|
|
4438
|
+
];
|
|
4439
|
+
function safeValue(value) {
|
|
4440
|
+
return Number.isFinite(value) && value > 0 ? value : 0;
|
|
4441
|
+
}
|
|
4442
|
+
function computeMax(data) {
|
|
4443
|
+
return data.reduce(function (max, d) { return Math.max(max, safeValue(d.value)); }, 0);
|
|
4444
|
+
}
|
|
4445
|
+
/**
|
|
4446
|
+
* `true` cuando no hay datos o todos los valores son 0 — mismo criterio que el
|
|
4447
|
+
* `NotData` legacy de Guru.js.
|
|
4448
|
+
*/
|
|
4449
|
+
function isRankedBarListEmpty(data) {
|
|
4450
|
+
return data.length === 0 || computeMax(data) === 0;
|
|
4451
|
+
}
|
|
4452
|
+
/**
|
|
4453
|
+
* Resuelve el ancho de cada barra como porcentaje del **valor máximo del set**
|
|
4454
|
+
* (no del total) — igual que `BusinessStage.js` legacy (`100 * quantity / max`),
|
|
4455
|
+
* y el color final de cada fila.
|
|
4456
|
+
*/
|
|
4457
|
+
function computeBars(data, palette) {
|
|
4458
|
+
if (palette === void 0) { palette = DEFAULT_RANKED_BAR_COLORS; }
|
|
4459
|
+
var max = computeMax(data);
|
|
4460
|
+
return data.map(function (item, index) {
|
|
4461
|
+
var _a;
|
|
4462
|
+
var value = safeValue(item.value);
|
|
4463
|
+
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 });
|
|
4464
|
+
});
|
|
4465
|
+
}
|
|
4466
|
+
|
|
4467
|
+
var DEFAULT_TRANSLATIONS$6 = {
|
|
4468
|
+
emptyState: "Sin datos para mostrar",
|
|
4469
|
+
};
|
|
4470
|
+
/**
|
|
4471
|
+
* RankedBarList - Lista de barras horizontales escaladas al valor máximo del
|
|
4472
|
+
* set (no al total) — mismo criterio visual que `BusinessStage.js` legacy.
|
|
4473
|
+
* No reordena las filas: el llamador decide el orden (por relevancia, por
|
|
4474
|
+
* etapa del funnel, etc.).
|
|
4475
|
+
*/
|
|
4476
|
+
var RankedBarList = function (_a) {
|
|
4477
|
+
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;
|
|
4478
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$6), translations);
|
|
4479
|
+
if (isRankedBarListEmpty(data)) {
|
|
4480
|
+
return (jsx("div", { className: className, children: jsx(P, { children: t.emptyState }) }));
|
|
4481
|
+
}
|
|
4482
|
+
var bars = computeBars(data, colors);
|
|
4483
|
+
var format = function (value) {
|
|
4484
|
+
return formatValue ? formatValue(value) : String(value);
|
|
4485
|
+
};
|
|
4486
|
+
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)); }) }));
|
|
4487
|
+
};
|
|
4488
|
+
|
|
4372
4489
|
var VALID_STEP_COLORS = [
|
|
4373
4490
|
"primary",
|
|
4374
4491
|
"secondary",
|
|
@@ -5560,6 +5677,59 @@ var SocialMediaPreview = function (_a) {
|
|
|
5560
5677
|
}
|
|
5561
5678
|
};
|
|
5562
5679
|
|
|
5680
|
+
var paddingClasses = {
|
|
5681
|
+
sm: "p-4",
|
|
5682
|
+
md: "p-6",
|
|
5683
|
+
lg: "p-8",
|
|
5684
|
+
};
|
|
5685
|
+
|
|
5686
|
+
/**
|
|
5687
|
+
* Card genérica siguiendo las reglas de diseño BeweOS basada en HeroUI.
|
|
5688
|
+
*
|
|
5689
|
+
* Reglas aplicadas:
|
|
5690
|
+
* - Shadow: none, sm, md, lg (configurable)
|
|
5691
|
+
* - Radius: sm (por defecto, configurable)
|
|
5692
|
+
* - Padding configurable (sm, md, lg)
|
|
5693
|
+
* - Hereda de HeroUI Card con personalización BeweOS
|
|
5694
|
+
*/
|
|
5695
|
+
var Card = function (_a) {
|
|
5696
|
+
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"]);
|
|
5697
|
+
var paddingClass = paddingClasses[padding];
|
|
5698
|
+
var combinedClassName = [paddingClass, className].filter(Boolean).join(" ");
|
|
5699
|
+
return (jsx(Card$1, __assign({ shadow: shadow, radius: radius, className: combinedClassName }, props, { children: children })));
|
|
5700
|
+
};
|
|
5701
|
+
|
|
5702
|
+
var DEFAULT_TRANSLATIONS$5 = {
|
|
5703
|
+
trendUpAriaLabel: "Tendencia al alza",
|
|
5704
|
+
trendDownAriaLabel: "Tendencia a la baja",
|
|
5705
|
+
trendNeutralAriaLabel: "Sin variación",
|
|
5706
|
+
};
|
|
5707
|
+
var TREND_COLOR_CLASS = {
|
|
5708
|
+
positive: "text-success",
|
|
5709
|
+
negative: "text-danger",
|
|
5710
|
+
neutral: "text-foreground-500",
|
|
5711
|
+
};
|
|
5712
|
+
var TREND_ARIA_KEY = {
|
|
5713
|
+
positive: "trendUpAriaLabel",
|
|
5714
|
+
negative: "trendDownAriaLabel",
|
|
5715
|
+
neutral: "trendNeutralAriaLabel",
|
|
5716
|
+
};
|
|
5717
|
+
/**
|
|
5718
|
+
* StatTile - Tarjeta KPI compacta: ícono opcional + título + valor + tendencia opcional.
|
|
5719
|
+
*
|
|
5720
|
+
* Cubre el patrón "tile" (título + número, con o sin ícono/variación) que se repite en
|
|
5721
|
+
* varios dashboards de estadísticas y no encajaba en ningún chart existente de AuraUI.
|
|
5722
|
+
*/
|
|
5723
|
+
var StatTile = function (_a) {
|
|
5724
|
+
var _b;
|
|
5725
|
+
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"]);
|
|
5726
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$5), translations);
|
|
5727
|
+
var direction = (_b = trend === null || trend === void 0 ? void 0 : trend.direction) !== null && _b !== void 0 ? _b : "neutral";
|
|
5728
|
+
return (jsxs(Card, __assign({ padding: padding, className: ["flex flex-row items-center gap-3", className]
|
|
5729
|
+
.filter(Boolean)
|
|
5730
|
+
.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 }))] })] })] })));
|
|
5731
|
+
};
|
|
5732
|
+
|
|
5563
5733
|
function AuraTable(_a) {
|
|
5564
5734
|
var columns = _a.columns, items = _a.items, renderCell = _a.renderCell, children = _a.children, props = __rest(_a, ["columns", "items", "renderCell", "children"]);
|
|
5565
5735
|
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)); } })] })));
|
|
@@ -8948,28 +9118,6 @@ ModalBody.displayName = "ModalBody";
|
|
|
8948
9118
|
|
|
8949
9119
|
var ModalFooter = ModalFooter$1;
|
|
8950
9120
|
|
|
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
9121
|
/**
|
|
8974
9122
|
* Tooltip - Componente BeweOS basado en HeroUI.
|
|
8975
9123
|
*
|
|
@@ -9512,4 +9660,4 @@ var NavigationLoadingProvider = function (_a) {
|
|
|
9512
9660
|
return (jsxs(NavigationLoadingContext.Provider, { value: value, children: [children, jsx(NavigationLoadingOverlay, { isVisible: isVisible })] }));
|
|
9513
9661
|
};
|
|
9514
9662
|
|
|
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 };
|
|
9663
|
+
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,
|
|
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,
|
|
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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { RankedBarListProps } from "./RankedBarList.types";
|
|
3
|
+
/**
|
|
4
|
+
* RankedBarList - Lista de barras horizontales escaladas al valor máximo del
|
|
5
|
+
* set (no al total) — mismo criterio visual que `BusinessStage.js` legacy.
|
|
6
|
+
* No reordena las filas: el llamador decide el orden (por relevancia, por
|
|
7
|
+
* etapa del funnel, etc.).
|
|
8
|
+
*/
|
|
9
|
+
export declare const RankedBarList: React.FC<RankedBarListProps>;
|
|
10
|
+
//# sourceMappingURL=RankedBarList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RankedBarList.d.ts","sourceRoot":"","sources":["../../../../src/components/ranked-bar-list/RankedBarList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EACX,kBAAkB,EAElB,MAAM,uBAAuB,CAAC;AAO/B;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAkDtD,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type RankedBarListItem = {
|
|
2
|
+
/** Etiqueta de la fila (p. ej. "Te buscaron"). */
|
|
3
|
+
label: string;
|
|
4
|
+
/** Valor numérico de la fila. Valores negativos se tratan como 0. */
|
|
5
|
+
value: number;
|
|
6
|
+
/** Color fijo de esta fila. Si se omite, se resuelve de la paleta por índice. */
|
|
7
|
+
color?: string;
|
|
8
|
+
};
|
|
9
|
+
export type RankedBarListBar = RankedBarListItem & {
|
|
10
|
+
/** Color ya resuelto (propio o de la paleta). */
|
|
11
|
+
color: string;
|
|
12
|
+
/** Ancho de la barra como porcentaje del valor máximo del set, entre 0 y 100. */
|
|
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 RankedBarListTranslations = {
|
|
20
|
+
/** Texto cuando no hay datos o todos los valores son 0. */
|
|
21
|
+
emptyState?: string;
|
|
22
|
+
};
|
|
23
|
+
export type RankedBarListProps = {
|
|
24
|
+
/** Filas a graficar, en el orden en que deben mostrarse (no se reordenan). */
|
|
25
|
+
data: RankedBarListItem[];
|
|
26
|
+
/** Paleta de color de respaldo, ciclada por índice para filas sin `color` propio. */
|
|
27
|
+
colors?: string[];
|
|
28
|
+
/** Formateo a medida del valor mostrado junto a cada barra. */
|
|
29
|
+
formatValue?: (value: number) => string;
|
|
30
|
+
/** Muestra el valor numérico al final de cada fila. @default true */
|
|
31
|
+
showValue?: boolean;
|
|
32
|
+
/** Alto de cada barra en px. @default 8 */
|
|
33
|
+
barHeight?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Traducciones i18n del componente.
|
|
36
|
+
* Si no se proporciona, usa traducciones por defecto en español.
|
|
37
|
+
*/
|
|
38
|
+
translations?: RankedBarListTranslations;
|
|
39
|
+
className?: string;
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=RankedBarList.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RankedBarList.types.d.ts","sourceRoot":"","sources":["../../../../src/components/ranked-bar-list/RankedBarList.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC/B,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG;IAClD,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,iFAAiF;IACjF,OAAO,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACvC,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAChC,8EAA8E;IAC9E,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAC1B,qFAAqF;IACrF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,+DAA+D;IAC/D,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,yBAAyB,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { RankedBarList } from "./RankedBarList";
|
|
2
|
+
export type { RankedBarListBar, RankedBarListItem, RankedBarListProps, RankedBarListTranslations, } from "./RankedBarList.types";
|
|
3
|
+
export { DEFAULT_RANKED_BAR_COLORS, computeBars, computeMax, isRankedBarListEmpty, } from "./ranked-bar-list.utils";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ranked-bar-list/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EACX,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACN,yBAAyB,EACzB,WAAW,EACX,UAAU,EACV,oBAAoB,GACpB,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { RankedBarListBar, RankedBarListItem } from "./RankedBarList.types";
|
|
2
|
+
/** Paleta categórica por defecto: primary/secondary/success/warning/danger de BeweOS. */
|
|
3
|
+
export declare const DEFAULT_RANKED_BAR_COLORS: string[];
|
|
4
|
+
export declare function computeMax(data: RankedBarListItem[]): number;
|
|
5
|
+
/**
|
|
6
|
+
* `true` cuando no hay datos o todos los valores son 0 — mismo criterio que el
|
|
7
|
+
* `NotData` legacy de Guru.js.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isRankedBarListEmpty(data: RankedBarListItem[]): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Resuelve el ancho de cada barra como porcentaje del **valor máximo del set**
|
|
12
|
+
* (no del total) — igual que `BusinessStage.js` legacy (`100 * quantity / max`),
|
|
13
|
+
* y el color final de cada fila.
|
|
14
|
+
*/
|
|
15
|
+
export declare function computeBars(data: RankedBarListItem[], palette?: string[]): RankedBarListBar[];
|
|
16
|
+
//# sourceMappingURL=ranked-bar-list.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ranked-bar-list.utils.d.ts","sourceRoot":"","sources":["../../../../src/components/ranked-bar-list/ranked-bar-list.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,gBAAgB,EAChB,iBAAiB,EACjB,MAAM,uBAAuB,CAAC;AAE/B,yFAAyF;AACzF,eAAO,MAAM,yBAAyB,UAMrC,CAAC;AAMF,wBAAgB,UAAU,CAAC,IAAI,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAE5D;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAEvE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAC1B,IAAI,EAAE,iBAAiB,EAAE,EACzB,OAAO,GAAE,MAAM,EAA8B,GAC3C,gBAAgB,EAAE,CAWpB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { StatTileProps } from "./StatTile.types";
|
|
3
|
+
/**
|
|
4
|
+
* StatTile - Tarjeta KPI compacta: ícono opcional + título + valor + tendencia opcional.
|
|
5
|
+
*
|
|
6
|
+
* Cubre el patrón "tile" (título + número, con o sin ícono/variación) que se repite en
|
|
7
|
+
* varios dashboards de estadísticas y no encajaba en ningún chart existente de AuraUI.
|
|
8
|
+
*/
|
|
9
|
+
export declare const StatTile: React.FC<StatTileProps>;
|
|
10
|
+
//# sourceMappingURL=StatTile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatTile.d.ts","sourceRoot":"","sources":["../../../../src/components/stat-tile/StatTile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EACX,aAAa,EAGb,MAAM,kBAAkB,CAAC;AAuB1B;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA0C5C,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { CardProps } from "../card";
|
|
3
|
+
export type StatTileTrendDirection = "positive" | "negative" | "neutral";
|
|
4
|
+
export type StatTileTrend = {
|
|
5
|
+
/** Texto ya formateado del cambio, p. ej. "+12%" o "-3 pts". */
|
|
6
|
+
value: string;
|
|
7
|
+
/** Sentido del cambio; determina el color y el aria-label. @default "neutral" */
|
|
8
|
+
direction?: StatTileTrendDirection;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Traducciones disponibles para el componente.
|
|
12
|
+
* Todas las propiedades son opcionales para permitir traducciones parciales.
|
|
13
|
+
*/
|
|
14
|
+
export type StatTileTranslations = {
|
|
15
|
+
/** aria-label del indicador de tendencia cuando direction="positive". */
|
|
16
|
+
trendUpAriaLabel?: string;
|
|
17
|
+
/** aria-label del indicador de tendencia cuando direction="negative". */
|
|
18
|
+
trendDownAriaLabel?: string;
|
|
19
|
+
/** aria-label del indicador de tendencia cuando direction="neutral". */
|
|
20
|
+
trendNeutralAriaLabel?: string;
|
|
21
|
+
};
|
|
22
|
+
export type StatTileProps = Omit<CardProps, "children"> & {
|
|
23
|
+
/** Título/etiqueta corta del indicador (p. ej. "Llamadas"). */
|
|
24
|
+
title: string;
|
|
25
|
+
/** Valor principal ya formateado por el consumidor (p. ej. 128, "$1.2M", "24%"). */
|
|
26
|
+
value: string | number;
|
|
27
|
+
/**
|
|
28
|
+
* Slot de ícono opcional a la izquierda del título.
|
|
29
|
+
* @example <StatTile icon={<IconComponent icon="mdi:phone" />} ... />
|
|
30
|
+
*/
|
|
31
|
+
icon?: ReactNode;
|
|
32
|
+
/** Indicador de variación opcional (p. ej. respecto al periodo anterior). */
|
|
33
|
+
trend?: StatTileTrend;
|
|
34
|
+
/**
|
|
35
|
+
* Traducciones i18n del componente.
|
|
36
|
+
* Si no se proporciona, usa traducciones por defecto en español.
|
|
37
|
+
*/
|
|
38
|
+
translations?: StatTileTranslations;
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=StatTile.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatTile.types.d.ts","sourceRoot":"","sources":["../../../../src/components/stat-tile/StatTile.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;AAEzE,MAAM,MAAM,aAAa,GAAG;IAC3B,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,iFAAiF;IACjF,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACnC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAClC,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yEAAyE;IACzE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wEAAwE;IACxE,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG;IACzD,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,oFAAoF;IACpF,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/stat-tile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EACX,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,sBAAsB,GACtB,MAAM,kBAAkB,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from "./components/content-carousel";
|
|
|
14
14
|
export * from "./components/date-selector";
|
|
15
15
|
export * from "./components/datepicker";
|
|
16
16
|
export * from "./components/daterangepicker";
|
|
17
|
+
export * from "./components/donut-chart";
|
|
17
18
|
export * from "./components/h1";
|
|
18
19
|
export * from "./components/h2";
|
|
19
20
|
export * from "./components/h3";
|
|
@@ -29,12 +30,14 @@ export * from "./components/p";
|
|
|
29
30
|
export * from "./components/pagination";
|
|
30
31
|
export * from "./components/phone";
|
|
31
32
|
export * from "./components/promotional-banner";
|
|
33
|
+
export * from "./components/ranked-bar-list";
|
|
32
34
|
export * from "./components/row-steps";
|
|
33
35
|
export * from "./components/schedule-row";
|
|
34
36
|
export * from "./components/search-input";
|
|
35
37
|
export * from "./components/select";
|
|
36
38
|
export * from "./components/social-media-bar";
|
|
37
39
|
export * from "./components/social-media-preview";
|
|
40
|
+
export * from "./components/stat-tile";
|
|
38
41
|
export * from "./components/step-indicator";
|
|
39
42
|
export * from "./components/switch";
|
|
40
43
|
export * from "./components/table";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"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"}
|