@beweco/aurora-ui 0.6.74 → 0.6.76-qa.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/css/styles.css +1 -1
- package/dist/index.cjs.js +203 -20
- package/dist/index.esm.js +198 -21
- 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 +12 -0
- package/dist/types/components/area-line-chart/AreaLineChart.types.d.ts.map +1 -1
- package/dist/types/components/button/Button.d.ts +1 -0
- package/dist/types/components/button/Button.d.ts.map +1 -1
- package/dist/types/components/button/Button.types.d.ts +15 -0
- package/dist/types/components/button/Button.types.d.ts.map +1 -1
- package/dist/types/components/donut-chart/DonutChart.d.ts.map +1 -1
- package/dist/types/components/donut-chart/DonutChart.types.d.ts +2 -0
- package/dist/types/components/donut-chart/DonutChart.types.d.ts.map +1 -1
- package/dist/types/components/donut-chart/donut-chart.utils.d.ts +7 -0
- package/dist/types/components/donut-chart/donut-chart.utils.d.ts.map +1 -1
- package/dist/types/components/donut-chart/index.d.ts +1 -1
- package/dist/types/components/donut-chart/index.d.ts.map +1 -1
- package/dist/types/components/menu-claw/MenuClaw.d.ts.map +1 -1
- package/dist/types/components/menu-claw/MenuClaw.types.d.ts +19 -0
- package/dist/types/components/menu-claw/MenuClaw.types.d.ts.map +1 -1
- package/dist/types/components/phone/Phone.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/providers/theme/index.d.ts +1 -0
- package/dist/types/providers/theme/index.d.ts.map +1 -1
- package/dist/types/providers/theme/linda-tones.d.ts +53 -0
- package/dist/types/providers/theme/linda-tones.d.ts.map +1 -0
- package/dist/types/providers/theme/useThemeManager.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -285,6 +285,10 @@ var HolidayType;
|
|
|
285
285
|
HolidayType["DateRange"] = "dateRange";
|
|
286
286
|
})(HolidayType || (HolidayType = {}));
|
|
287
287
|
|
|
288
|
+
var CLASE_AURA = {
|
|
289
|
+
ring: "linda-aura-ring",
|
|
290
|
+
surface: "linda-aura",
|
|
291
|
+
};
|
|
288
292
|
/**
|
|
289
293
|
* Botón genérico basado en HeroUI siguiendo las reglas de diseño BeweOS.
|
|
290
294
|
*
|
|
@@ -295,10 +299,24 @@ var HolidayType;
|
|
|
295
299
|
* - isLoading: On, Off
|
|
296
300
|
* - Radius: md (por defecto)
|
|
297
301
|
* - isIconOnly: True, False
|
|
302
|
+
* - ai: aura de Linda para las acciones que hace la IA (ver `Button.types.ts`)
|
|
298
303
|
*/
|
|
299
304
|
var Button = function (_a) {
|
|
300
|
-
var _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.size, size = _c === void 0 ? "md" : _c, _d = _a.variant, variant = _d === void 0 ? "solid" : _d, _e = _a.radius, radius = _e === void 0 ? "sm" : _e, startContent = _a.startContent, endContent = _a.endContent, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f, _g = _a.isIconOnly, isIconOnly = _g === void 0 ? false : _g, props = __rest(_a, ["color", "size", "variant", "radius", "startContent", "endContent", "isLoading", "isIconOnly"]);
|
|
301
|
-
|
|
305
|
+
var _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.size, size = _c === void 0 ? "md" : _c, _d = _a.variant, variant = _d === void 0 ? "solid" : _d, _e = _a.radius, radius = _e === void 0 ? "sm" : _e, startContent = _a.startContent, endContent = _a.endContent, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f, _g = _a.isIconOnly, isIconOnly = _g === void 0 ? false : _g, ai = _a.ai, className = _a.className, children = _a.children, props = __rest(_a, ["color", "size", "variant", "radius", "startContent", "endContent", "isLoading", "isIconOnly", "ai", "className", "children"]);
|
|
306
|
+
/*
|
|
307
|
+
* El contenido se envuelve para poder subirlo por encima del aura.
|
|
308
|
+
*
|
|
309
|
+
* Y tiene que ser un elemento: `<Button>Crear campaña</Button>` pasa un NODO DE
|
|
310
|
+
* TEXTO, que no es posicionable, así que ningún selector puede sacarlo del fondo del
|
|
311
|
+
* apilado —el aura, que sí está posicionada, le pasaría por encima—. Con `ring` daría
|
|
312
|
+
* igual porque esa capa es solo el canto; con `surface` el texto se leería a través
|
|
313
|
+
* del degradado.
|
|
314
|
+
*/
|
|
315
|
+
var contenido = ai ? (jsx("span", { className: "linda-aura-content", children: children })) : (children);
|
|
316
|
+
var clases = [ai ? CLASE_AURA[ai] : "", className]
|
|
317
|
+
.filter(Boolean)
|
|
318
|
+
.join(" ");
|
|
319
|
+
return (jsx(Button$1, __assign({}, props, { color: color, size: size, variant: variant, radius: radius, startContent: startContent, endContent: endContent, isLoading: isLoading, isIconOnly: isIconOnly, className: clases || undefined, children: contenido })));
|
|
302
320
|
};
|
|
303
321
|
|
|
304
322
|
var DatePicker = function (_a) {
|
|
@@ -582,9 +600,9 @@ function ChartTooltip(_a) {
|
|
|
582
600
|
})] }));
|
|
583
601
|
}
|
|
584
602
|
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, _e = _a.yAxisDomain, yAxisDomain = _e === void 0 ? [0, "dataMax + 100"] : _e;
|
|
603
|
+
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, _f = _a.xAxisInterval, xAxisInterval = _f === void 0 ? "preserveStartEnd" : _f;
|
|
586
604
|
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 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: {
|
|
605
|
+
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, interval: xAxisInterval }), 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
606
|
r: 6,
|
|
589
607
|
fill: s.color,
|
|
590
608
|
stroke: "#fff",
|
|
@@ -2968,6 +2986,20 @@ function computeTotal(data) {
|
|
|
2968
2986
|
function isDonutEmpty(data) {
|
|
2969
2987
|
return data.length === 0 || computeTotal(data) === 0;
|
|
2970
2988
|
}
|
|
2989
|
+
/**
|
|
2990
|
+
* Formatea `percent` (0-1) como entero + "%", excepto cuando la porción es
|
|
2991
|
+
* real (>0) pero redondea a 0 — ahí muestra "<1%" en vez de "0%", que se lee
|
|
2992
|
+
* como "no hay nada" y confunde cuando sí hay dato (ej. 4 de 2357 = 0.17%).
|
|
2993
|
+
* `lessThanOneLabel` permite traducir el texto (ver `DonutChartTranslations`).
|
|
2994
|
+
*/
|
|
2995
|
+
function formatDonutPercent(percent, lessThanOneLabel) {
|
|
2996
|
+
if (lessThanOneLabel === void 0) { lessThanOneLabel = "<1%"; }
|
|
2997
|
+
if (!Number.isFinite(percent) || percent <= 0) {
|
|
2998
|
+
return "0%";
|
|
2999
|
+
}
|
|
3000
|
+
var rounded = Math.round(percent * 100);
|
|
3001
|
+
return rounded === 0 ? lessThanOneLabel : "".concat(rounded, "%");
|
|
3002
|
+
}
|
|
2971
3003
|
/**
|
|
2972
3004
|
* Resuelve las proporciones y el color final de cada categoría.
|
|
2973
3005
|
* El color propio de cada dato tiene prioridad; si falta, se cicla `palette` por índice.
|
|
@@ -2985,6 +3017,7 @@ function computeSlices(data, palette) {
|
|
|
2985
3017
|
var DEFAULT_TRANSLATIONS$b = {
|
|
2986
3018
|
emptyState: "Sin datos para mostrar",
|
|
2987
3019
|
totalLabel: "Total",
|
|
3020
|
+
lessThanOnePercent: "<1%",
|
|
2988
3021
|
};
|
|
2989
3022
|
/**
|
|
2990
3023
|
* DonutChart - Gráfico circular (pie o donut, según `innerRadiusRatio`) con
|
|
@@ -3003,7 +3036,7 @@ var DonutChart = function (_a) {
|
|
|
3003
3036
|
return formatValue ? formatValue(value) : String(value);
|
|
3004
3037
|
};
|
|
3005
3038
|
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 }),
|
|
3039
|
+
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 }), jsx("span", { className: "text-foreground-500", children: formatDonutPercent(slice.percent, t.lessThanOnePercent) })] }, slice.name)); }) }))] }));
|
|
3007
3040
|
};
|
|
3008
3041
|
|
|
3009
3042
|
var H1 = function (_a) {
|
|
@@ -3937,8 +3970,10 @@ var DEFAULT_HISTORY_VISIBLE_COUNT = 5;
|
|
|
3937
3970
|
*/
|
|
3938
3971
|
var MenuClaw = React.memo(function MenuClaw(_a) {
|
|
3939
3972
|
var _b, _c;
|
|
3940
|
-
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;
|
|
3941
|
-
var
|
|
3973
|
+
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, isCollapsedProp = _a.isCollapsed, onCollapsedChange = _a.onCollapsedChange, defaultCollapsed = _a.defaultCollapsed;
|
|
3974
|
+
var isControlled = isCollapsedProp !== undefined;
|
|
3975
|
+
var _f = React.useState(defaultCollapsed !== null && defaultCollapsed !== void 0 ? defaultCollapsed : false), internalCollapsed = _f[0], setInternalCollapsed = _f[1];
|
|
3976
|
+
var collapsed = isCollapsedProp !== null && isCollapsedProp !== void 0 ? isCollapsedProp : internalCollapsed;
|
|
3942
3977
|
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$7), translations);
|
|
3943
3978
|
var selectedKey = useMemo(function () {
|
|
3944
3979
|
var _a, _b, _c;
|
|
@@ -3987,8 +4022,12 @@ var MenuClaw = React.memo(function MenuClaw(_a) {
|
|
|
3987
4022
|
onOpenSidebarChange === null || onOpenSidebarChange === void 0 ? void 0 : onOpenSidebarChange(true);
|
|
3988
4023
|
}, [onOpenSidebarChange]);
|
|
3989
4024
|
var handleCollapseToggle = useCallback(function () {
|
|
3990
|
-
|
|
3991
|
-
|
|
4025
|
+
var next = !collapsed;
|
|
4026
|
+
if (!isControlled) {
|
|
4027
|
+
setInternalCollapsed(next);
|
|
4028
|
+
}
|
|
4029
|
+
onCollapsedChange === null || onCollapsedChange === void 0 ? void 0 : onCollapsedChange(next);
|
|
4030
|
+
}, [collapsed, isControlled, onCollapsedChange]);
|
|
3992
4031
|
var handleHelpClick = useCallback(function () {
|
|
3993
4032
|
if (helpSection) {
|
|
3994
4033
|
window.open(helpSection.redirect, "_blank");
|
|
@@ -4007,12 +4046,12 @@ var MenuClaw = React.memo(function MenuClaw(_a) {
|
|
|
4007
4046
|
(_a = menuItems.onSelect) === null || _a === void 0 ? void 0 : _a.call(menuItems, key, href, "bottomBar");
|
|
4008
4047
|
}, [onOpenSidebarChange, menuItems.onSelect]);
|
|
4009
4048
|
var showBottomBar = (mobileBottomBarGroupKey && bottomBarItems.length > 0) || showNativeMenu;
|
|
4010
|
-
return (jsxs(Fragment, { children: [showBottomBar ? (jsx(MenuMobileBottomBar, { items: bottomBarItems, selectedKey: selectedKey, onSelect: handleBottomBarSelect, onMenuPress: handleSidebarOpen, menuLabel: t.menuLabel, navAriaLabel: t.mobileNavAriaLabel, forceVisible: showNativeMenu && bottomBarItems.length === 0 })) : null, jsx("button", { type: "button", "aria-label": t.closeSidebarAriaLabel, className: "menu-claw-overlay ".concat(isOpenSidebar ? "menu-claw-overlay--open" : ""), onClick: handleSidebarClose, tabIndex: isOpenSidebar ? 0 : -1 }), jsx("div", { className: cn("menu-claw",
|
|
4049
|
+
return (jsxs(Fragment, { children: [showBottomBar ? (jsx(MenuMobileBottomBar, { items: bottomBarItems, selectedKey: selectedKey, onSelect: handleBottomBarSelect, onMenuPress: handleSidebarOpen, menuLabel: t.menuLabel, navAriaLabel: t.mobileNavAriaLabel, forceVisible: showNativeMenu && bottomBarItems.length === 0 })) : null, jsx("button", { type: "button", "aria-label": t.closeSidebarAriaLabel, className: "menu-claw-overlay ".concat(isOpenSidebar ? "menu-claw-overlay--open" : ""), onClick: handleSidebarClose, tabIndex: isOpenSidebar ? 0 : -1 }), jsx("div", { className: cn("menu-claw", collapsed ? "menu-claw--collapsed" : "menu-claw--expanded", isOpenSidebar && "menu-claw--mobile-open"), "aria-hidden": !isOpenSidebar, children: jsxs("div", { className: "menu-claw__content", children: [jsxs("div", { className: cn("flex items-center", collapsed ? "justify-center" : "justify-end"), children: [jsx(IconComponent, { icon: "material-symbols-light:close", size: "lg", className: "block cursor-pointer sm:hidden", onClick: handleSidebarClose }), jsx("button", { type: "button", "aria-label": t.toggleSidebarAriaLabel, onClick: handleCollapseToggle, className: "hidden h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-lg text-default-500 transition-colors hover:bg-default-100 sm:flex", children: jsx(IconComponent, { icon: collapsed
|
|
4011
4050
|
? "solar:alt-arrow-right-linear"
|
|
4012
|
-
: "solar:alt-arrow-left-linear", size: "md", "aria-hidden": true }) })] }), jsxs("div", { className: cn("flex items-center py-3",
|
|
4051
|
+
: "solar:alt-arrow-left-linear", size: "md", "aria-hidden": true }) })] }), jsxs("div", { className: cn("flex items-center py-3", collapsed ? "justify-center gap-0" : "gap-3"), children: [jsx(Avatar, { size: "sm", src: ((_b = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _b === void 0 ? void 0 : _b.trim()) || undefined, color: !((_c = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _c === void 0 ? void 0 : _c.trim()) ? "warning" : "default", name: userName, className: "shrink-0" }), !collapsed ? (jsxs("div", { className: "menu-claw-collapsible flex min-w-0 flex-col overflow-hidden", children: [jsx("p", { className: "truncate text-small font-semibold text-foreground", children: userName }), jsx("p", { className: "truncate text-tiny text-default-400", children: userRole })] })) : null] }), jsx(MenuClawHistoryPanel, { items: historyConfig.items, initialVisibleCount: historyConfig.initialVisibleCount, onNewConversation: history === null || history === void 0 ? void 0 : history.onNewConversation, isCollapsed: collapsed, title: t.historyTitle, newLabel: t.historyNewLabel, showMoreLabel: t.historyShowMoreLabel, showLessLabel: t.historyShowLessLabel, onBeforeSelect: handleSidebarClose }), jsx("nav", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: menuItems.items.map(function (group) {
|
|
4013
4052
|
var _a;
|
|
4014
|
-
return (jsxs("div", { className: "mb-2", children: [group.title && !
|
|
4015
|
-
}) }), helpSection ? (jsx("div", { className: "mt-auto flex flex-col items-center justify-center", children: jsx(Button$1, { fullWidth: true, className: "text-default-500 data-[hover=true]:text-default-600", startContent: jsx(IconComponent, { className: "text-default-500", icon: "solar:info-circle-line-duotone", size: "md" }), variant: "light", onPress: handleHelpClick, isIconOnly:
|
|
4053
|
+
return (jsxs("div", { className: "mb-2", children: [group.title && !collapsed ? (jsx("p", { className: "px-2 pb-1 pt-2 text-tiny font-medium uppercase tracking-wide text-default-400", children: group.title })) : null, jsx("ul", { className: "flex flex-col gap-0.5", children: ((_a = group.items) !== null && _a !== void 0 ? _a : []).map(function (item) { return (jsx(MenuClawNavItem, { item: item, selectedKey: selectedKey, isCollapsed: collapsed, onSelect: handleMenuSelect }, item.key)); }) })] }, group.key));
|
|
4054
|
+
}) }), helpSection ? (jsx("div", { className: "mt-auto flex flex-col items-center justify-center", children: jsx(Button$1, { fullWidth: true, className: "text-default-500 data-[hover=true]:text-default-600", startContent: jsx(IconComponent, { className: "text-default-500", icon: "solar:info-circle-line-duotone", size: "md" }), variant: "light", onPress: handleHelpClick, isIconOnly: collapsed, children: !collapsed ? (jsx("span", { className: "menu-claw-collapsible truncate", children: helpSection.title })) : null }) })) : null] }) })] }));
|
|
4016
4055
|
});
|
|
4017
4056
|
|
|
4018
4057
|
/**
|
|
@@ -4459,13 +4498,6 @@ var Phone = function (_a) {
|
|
|
4459
4498
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
4460
4499
|
};
|
|
4461
4500
|
}, [isDropdownOpen]);
|
|
4462
|
-
// El dropdown se portea a `body` con posición absoluta fija; cerrarlo cuando
|
|
4463
|
-
// un ancestro hace scroll para que no quede flotando fuera de lugar.
|
|
4464
|
-
useCloseOnAncestorScroll({
|
|
4465
|
-
isOpen: isDropdownOpen,
|
|
4466
|
-
onClose: function () { return setIsDropdownOpen(false); },
|
|
4467
|
-
contentRef: portalDropdownRef,
|
|
4468
|
-
});
|
|
4469
4501
|
var handleCountrySelect = function (country) {
|
|
4470
4502
|
setSelectedCountry(country);
|
|
4471
4503
|
setIsDropdownOpen(false);
|
|
@@ -9639,6 +9671,127 @@ function removeCustomPrimaryColor() {
|
|
|
9639
9671
|
}
|
|
9640
9672
|
}
|
|
9641
9673
|
|
|
9674
|
+
/**
|
|
9675
|
+
* Los tres tonos del aura de Linda, derivados del `primary` de la agencia.
|
|
9676
|
+
*
|
|
9677
|
+
* Linda no tiene color propio: es el `primary` que el negocio eligió en el onboarding,
|
|
9678
|
+
* y por eso aquí no hay ni un color escrito. Lo único que se fija es CUÁNTO se gira ese
|
|
9679
|
+
* tono y en qué banda de luz se pinta.
|
|
9680
|
+
*/
|
|
9681
|
+
/**
|
|
9682
|
+
* Grados que se gira el `primary` para cada tono, en el orden en que se pintan.
|
|
9683
|
+
*
|
|
9684
|
+
* Son muchos grados a propósito. La gracia del aura es que haya MÁS DE UN COLOR: con
|
|
9685
|
+
* un giro discreto —del orden de 18°, el que usa un degradado de profundidad— salen
|
|
9686
|
+
* tres versiones del mismo tono y el resultado se lee como un plano. A ±55° el salto
|
|
9687
|
+
* se ve como otro color y sigue dentro de la familia del `primary`, que es lo que
|
|
9688
|
+
* permite que esto funcione con la agencia número siete sin tocar nada.
|
|
9689
|
+
*
|
|
9690
|
+
* El tono del medio va casi sin girar: es el que ancla el conjunto al color de la
|
|
9691
|
+
* agencia, para que el aura se lea como suya y no como una decoración pegada encima.
|
|
9692
|
+
*/
|
|
9693
|
+
var GIROS = [-56, 8, 54];
|
|
9694
|
+
/**
|
|
9695
|
+
* Banda de luz en la que se pintan los tres tonos, en porcentaje HSL.
|
|
9696
|
+
*
|
|
9697
|
+
* Los tonos NO heredan la luz del `primary`, y esto es lo que más se nota: un primary
|
|
9698
|
+
* oscuro y poco saturado sobre una superficie clara se lee como una mancha gris —sucia,
|
|
9699
|
+
* no como color—, y uno casi blanco desaparece contra el fondo. Se llevan al paso medio
|
|
9700
|
+
* de la escala, que es el que funciona en los dos casos.
|
|
9701
|
+
*/
|
|
9702
|
+
var BANDA_LUZ = { min: 52, max: 72 };
|
|
9703
|
+
/**
|
|
9704
|
+
* Banda de saturación de los tres tonos, en porcentaje HSL.
|
|
9705
|
+
*
|
|
9706
|
+
* El techo es lo que evita que el aura grite. A plena saturación los tonos dejan de ser
|
|
9707
|
+
* ambiente y pasan a ser tres focos de color encima de un control de 40 pt: bonito en
|
|
9708
|
+
* una captura, insoportable en una barra que se mira todo el día.
|
|
9709
|
+
*
|
|
9710
|
+
* ⚠️ **Y hay una razón que no es estética.** Girar el tono puede caer en un rojo vivo:
|
|
9711
|
+
* un `primary` amarillo —51°— girado −56° aterriza en 355°, que a saturación 100 se lee
|
|
9712
|
+
* como un estado de error alrededor de un botón que no ha fallado. Visto al renderizarlo,
|
|
9713
|
+
* no razonándolo. Bajado a 65 el mismo tono es un rosa apagado y vuelve a leerse como lo
|
|
9714
|
+
* que es: decoración.
|
|
9715
|
+
*
|
|
9716
|
+
* El suelo existe por lo contrario: un `primary` casi gris da tres tonos que no se
|
|
9717
|
+
* distinguen entre sí, y entonces no hay degradado que ver —el aura se lee como una
|
|
9718
|
+
* mancha plana—.
|
|
9719
|
+
*/
|
|
9720
|
+
var BANDA_SATURACION = { min: 35, max: 65 };
|
|
9721
|
+
var VUELTA = 360;
|
|
9722
|
+
/** `H S% L%` — el formato exacto en el que HeroUI guarda sus variables de color. */
|
|
9723
|
+
var TRIPLETE = /^\s*(-?\d+(?:\.\d+)?)\s+(\d+(?:\.\d+)?)%\s+(\d+(?:\.\d+)?)%\s*$/;
|
|
9724
|
+
/**
|
|
9725
|
+
* Lee el triplete que HeroUI deja en una variable de color.
|
|
9726
|
+
*
|
|
9727
|
+
* Devuelve `null` en vez de lanzar: esto corre en un efecto de tema y el valor puede
|
|
9728
|
+
* no estar todavía —la clase del tema aún no está en el `<html>`, o el consumidor no
|
|
9729
|
+
* cargó la hoja de estilos—. Un aura que no se pinta es un problema menor; una
|
|
9730
|
+
* excepción que tumba el provider de tema, no.
|
|
9731
|
+
*/
|
|
9732
|
+
function parseHslTriplet(value) {
|
|
9733
|
+
var encontrado = TRIPLETE.exec(value);
|
|
9734
|
+
if (!encontrado) {
|
|
9735
|
+
return null;
|
|
9736
|
+
}
|
|
9737
|
+
var h = encontrado[1], s = encontrado[2], l = encontrado[3];
|
|
9738
|
+
return { h: Number(h), s: Number(s), l: Number(l) };
|
|
9739
|
+
}
|
|
9740
|
+
/** Deja un ángulo dentro de `[0, 360)`, venga de donde venga. */
|
|
9741
|
+
function normalizarTono(grados) {
|
|
9742
|
+
return ((grados % VUELTA) + VUELTA) % VUELTA;
|
|
9743
|
+
}
|
|
9744
|
+
function acotar(valor, min, max) {
|
|
9745
|
+
return Math.min(Math.max(valor, min), max);
|
|
9746
|
+
}
|
|
9747
|
+
/**
|
|
9748
|
+
* Los tres tonos del aura, listos para escribirse en una variable CSS.
|
|
9749
|
+
*
|
|
9750
|
+
* Se redondean a entero: es un degradado decorativo, y las décimas de grado solo
|
|
9751
|
+
* alargan la hoja de estilos.
|
|
9752
|
+
*/
|
|
9753
|
+
function deriveLindaTones(primary) {
|
|
9754
|
+
var luz = Math.round(acotar(primary.l, BANDA_LUZ.min, BANDA_LUZ.max));
|
|
9755
|
+
var saturacion = Math.round(acotar(primary.s, BANDA_SATURACION.min, BANDA_SATURACION.max));
|
|
9756
|
+
var tonos = GIROS.map(function (giro) {
|
|
9757
|
+
return "".concat(Math.round(normalizarTono(primary.h + giro)), " ").concat(saturacion, "% ").concat(luz, "%");
|
|
9758
|
+
});
|
|
9759
|
+
return tonos;
|
|
9760
|
+
}
|
|
9761
|
+
/** Las variables que se escriben en el `<html>`, en el orden en que se pintan. */
|
|
9762
|
+
var LINDA_TONE_PROPERTIES = [
|
|
9763
|
+
"--linda-1",
|
|
9764
|
+
"--linda-2",
|
|
9765
|
+
"--linda-3",
|
|
9766
|
+
];
|
|
9767
|
+
/**
|
|
9768
|
+
* Escribe los tres tonos del aura a partir del valor de `--heroui-primary`.
|
|
9769
|
+
*
|
|
9770
|
+
* Si el primary no se puede leer, **borra los que hubiera** y devuelve `false`. Es lo
|
|
9771
|
+
* contrario de dejarlos: unos tonos viejos son de otro tema, y un aura del color
|
|
9772
|
+
* anterior es peor que un aura que no se pinta —la CSS del efecto ya está escrita para
|
|
9773
|
+
* desaparecer sin sus variables—.
|
|
9774
|
+
*/
|
|
9775
|
+
function applyLindaTones(style, primaryValue) {
|
|
9776
|
+
var primary = parseHslTriplet(primaryValue);
|
|
9777
|
+
if (!primary) {
|
|
9778
|
+
removeLindaTones(style);
|
|
9779
|
+
return false;
|
|
9780
|
+
}
|
|
9781
|
+
var tonos = deriveLindaTones(primary);
|
|
9782
|
+
LINDA_TONE_PROPERTIES.forEach(function (propiedad, indice) {
|
|
9783
|
+
style.setProperty(propiedad, tonos[indice]);
|
|
9784
|
+
});
|
|
9785
|
+
return true;
|
|
9786
|
+
}
|
|
9787
|
+
/** Quita los tres tonos del aura. */
|
|
9788
|
+
function removeLindaTones(style) {
|
|
9789
|
+
for (var _i = 0, LINDA_TONE_PROPERTIES_1 = LINDA_TONE_PROPERTIES; _i < LINDA_TONE_PROPERTIES_1.length; _i++) {
|
|
9790
|
+
var propiedad = LINDA_TONE_PROPERTIES_1[_i];
|
|
9791
|
+
style.removeProperty(propiedad);
|
|
9792
|
+
}
|
|
9793
|
+
}
|
|
9794
|
+
|
|
9642
9795
|
/**
|
|
9643
9796
|
* Custom hook to manage the theme state and side effects.
|
|
9644
9797
|
* Supports both named ThemeColor values and arbitrary hex colors.
|
|
@@ -9684,6 +9837,30 @@ var useThemeManager = function () {
|
|
|
9684
9837
|
removeCustomPrimaryColor();
|
|
9685
9838
|
}
|
|
9686
9839
|
}, [customHex, mode]);
|
|
9840
|
+
/*
|
|
9841
|
+
* Los tres tonos del aura de Linda, derivados del primary que acaba de quedar fijado.
|
|
9842
|
+
*
|
|
9843
|
+
* Va DESPUÉS de los dos efectos de arriba y depende de lo mismo que ellos, que es lo
|
|
9844
|
+
* que garantiza que lea el primary definitivo: React ejecuta los efectos en orden de
|
|
9845
|
+
* declaración, así que aquí la clase del tema ya está en el `<html>` y el hex a medida
|
|
9846
|
+
* ya está escrito o retirado.
|
|
9847
|
+
*
|
|
9848
|
+
* Se lee del estilo COMPUTADO y no de `customHex` a propósito: el primary llega por
|
|
9849
|
+
* dos caminos —el hex del negocio o la clase de una de las familias de tema— y el
|
|
9850
|
+
* computado es el único sitio donde los dos han convergido. Derivarlo solo de
|
|
9851
|
+
* `customHex` dejaría sin aura a toda agencia que use una familia tal cual.
|
|
9852
|
+
*/
|
|
9853
|
+
/*
|
|
9854
|
+
* `customHex` y `rawTheme` están en la lista aunque el cuerpo no los lea: son la señal
|
|
9855
|
+
* de que el `<html>` acaba de cambiar. La entrada real de este efecto es el estilo
|
|
9856
|
+
* computado, que la regla no puede ver, y sin ellos el aura se quedaría con los tonos
|
|
9857
|
+
* del tema anterior.
|
|
9858
|
+
*/
|
|
9859
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: ver el comentario de arriba
|
|
9860
|
+
useEffect(function () {
|
|
9861
|
+
var html = document.documentElement;
|
|
9862
|
+
applyLindaTones(html.style, getComputedStyle(html).getPropertyValue("--heroui-primary"));
|
|
9863
|
+
}, [customHex, rawTheme]);
|
|
9687
9864
|
var setMode = useCallback(function (newMode) {
|
|
9688
9865
|
var effectiveMode = newMode === "dark" ? "light" : newMode;
|
|
9689
9866
|
var newTheme = color === "blue" ? effectiveMode : "".concat(color, "-").concat(effectiveMode);
|
|
@@ -9805,4 +9982,4 @@ var NavigationLoadingProvider = function (_a) {
|
|
|
9805
9982
|
return (jsxs(NavigationLoadingContext.Provider, { value: value, children: [children, jsx(NavigationLoadingOverlay, { isVisible: isVisible })] }));
|
|
9806
9983
|
};
|
|
9807
9984
|
|
|
9808
|
-
export { ALL_THEMES, AURORA_THEME_FAMILIES, AURORA_THEME_REGISTRY, AccordionList, AddHolidayForm, AnalyticsCard, AreaLineChart, AuraAutocomplete, AuraTable, AuraToastProvider, BEWEOS_THEME_MODE_COOKIE_NAME, BreadcrumbsComponent, Button, CONTAINER_ATTRIBUTE, Card, Chip, ColorPicker, ColorSelector, ContentCarousel, Currency, DEFAULT_DONUT_COLORS, DEFAULT_PREDEFINED_COLORS, DEFAULT_RANKED_BAR_COLORS, DISMISS_CONTROL_ATTRIBUTE, DatePicker, DateRangePicker, DateSelector, DonutChart, DrawerFilters, EmailPreview, EnumMenuNavListItem, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, InputPassword, Kanban, KanbanCard, KanbanColumn, LindaIcon, 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, containerProps, createCurrencyFormatter, uniqueCountries as defaultCountries, defaultCurrencyOptions, defaultTranslations$5 as defaultTranslations, dismissControlProps, forceLightOnlyThemeBeforeReact, formatAuroraThemeTooltip, generateThemeColorScale, getContrastForeground, getRegisteredThemeColorBases, getSelectedKeyFromPath, hexToThemeColor, hslToCssValue, isAuroraFullThemeId, isDismissControl, isDonutEmpty, isExactThemeColor, isGroupState, isHexColor, isRankedBarListEmpty, isSegmentationGroup, removeCustomPrimaryColor, shouldClosePopoverOnInteractOutside, sizeMap, themeColors, useAuraToast, useCloseOnAncestorScroll, useMediaQuery, useNavigationLoading, useThemeContext };
|
|
9985
|
+
export { ALL_THEMES, AURORA_THEME_FAMILIES, AURORA_THEME_REGISTRY, AccordionList, AddHolidayForm, AnalyticsCard, AreaLineChart, AuraAutocomplete, AuraTable, AuraToastProvider, BEWEOS_THEME_MODE_COOKIE_NAME, BreadcrumbsComponent, Button, CONTAINER_ATTRIBUTE, Card, Chip, ColorPicker, ColorSelector, ContentCarousel, Currency, DEFAULT_DONUT_COLORS, DEFAULT_PREDEFINED_COLORS, DEFAULT_RANKED_BAR_COLORS, DISMISS_CONTROL_ATTRIBUTE, DatePicker, DateRangePicker, DateSelector, DonutChart, DrawerFilters, EmailPreview, EnumMenuNavListItem, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, InputPassword, Kanban, KanbanCard, KanbanColumn, LINDA_TONE_PROPERTIES, LindaIcon, 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, applyLindaTones, computeBars, computeMax, computeSlices, computeTotal, containerProps, createCurrencyFormatter, uniqueCountries as defaultCountries, defaultCurrencyOptions, defaultTranslations$5 as defaultTranslations, deriveLindaTones, dismissControlProps, forceLightOnlyThemeBeforeReact, formatAuroraThemeTooltip, formatDonutPercent, generateThemeColorScale, getContrastForeground, getRegisteredThemeColorBases, getSelectedKeyFromPath, hexToThemeColor, hslToCssValue, isAuroraFullThemeId, isDismissControl, isDonutEmpty, isExactThemeColor, isGroupState, isHexColor, isRankedBarListEmpty, isSegmentationGroup, parseHslTriplet, removeCustomPrimaryColor, removeLindaTones, shouldClosePopoverOnInteractOutside, 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, yAxisDomain, }: 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, xAxisInterval, }: 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,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,
|
|
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,EAClC,aAAkC,GAClC,EAAE,kBAAkB,CAAC,CAAC,CAAC,2CAqJvB"}
|
|
@@ -35,5 +35,17 @@ export interface AreaLineChartProps<T extends Record<string, unknown> = Record<s
|
|
|
35
35
|
* corresponde a quien consume el componente, no a AreaLineChart.
|
|
36
36
|
*/
|
|
37
37
|
yAxisDomain?: [number | string, number | string];
|
|
38
|
+
/**
|
|
39
|
+
* Estrategia de Recharts para decidir qué ticks del eje X pintar cuando no
|
|
40
|
+
* caben todos. `0` fuerza a pintar cada punto de `data` sin saltar
|
|
41
|
+
* ninguno — correcto para pocos puntos con labels cortos (ej. una
|
|
42
|
+
* tendencia mensual de 8-12 meses), pero con muchos puntos o labels
|
|
43
|
+
* largos los ticks se solapan (Recharts no rota ni elide con `interval={0}`,
|
|
44
|
+
* y `minTickGap` queda inoperante). Igual que `yAxisDomain`, esa
|
|
45
|
+
* decisión le corresponde a quien consume el componente según su dataset,
|
|
46
|
+
* no a `AreaLineChart`.
|
|
47
|
+
* @default "preserveStartEnd" — garantiza el primer y el último tick sin solapar
|
|
48
|
+
*/
|
|
49
|
+
xAxisInterval?: number | "preserveStart" | "preserveEnd" | "preserveStartEnd";
|
|
38
50
|
}
|
|
39
51
|
//# 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,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;
|
|
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;IACjD;;;;;;;;;;OAUG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,eAAe,GAAG,aAAa,GAAG,kBAAkB,CAAC;CAC9E"}
|
|
@@ -10,6 +10,7 @@ import type { ButtonProps } from "./Button.types";
|
|
|
10
10
|
* - isLoading: On, Off
|
|
11
11
|
* - Radius: md (por defecto)
|
|
12
12
|
* - isIconOnly: True, False
|
|
13
|
+
* - ai: aura de Linda para las acciones que hace la IA (ver `Button.types.ts`)
|
|
13
14
|
*/
|
|
14
15
|
export declare const Button: React.FC<ButtonProps>;
|
|
15
16
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAOlD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAiDxC,CAAC"}
|
|
@@ -9,5 +9,20 @@ export type ButtonProps = Omit<HeroUIButtonProps, "color" | "size" | "variant" |
|
|
|
9
9
|
endContent?: React.ReactNode;
|
|
10
10
|
isLoading?: boolean;
|
|
11
11
|
isIconOnly?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Marca el botón como algo que hace la IA, con el aura viva de Linda.
|
|
14
|
+
*
|
|
15
|
+
* Los tres tonos salen del `primary` de la agencia, así que esto NO fija un color:
|
|
16
|
+
* en una agencia de marca amarilla el aura es amarilla. Los escribe el
|
|
17
|
+
* `ThemeProvider`; sin él, el aura sale monocroma en vez de no salir.
|
|
18
|
+
*
|
|
19
|
+
* - `"ring"` mueve solo el canto y deja el relleno intacto. Es la que va en un
|
|
20
|
+
* botón de acento pleno —un CTA como «Crear campaña»—: al no tocar el fondo, el
|
|
21
|
+
* contraste del texto no cambia.
|
|
22
|
+
* - `"surface"` pinta el degradado dentro. **Pide un fondo claro**: `bordered`,
|
|
23
|
+
* `flat` o `light`. Sobre `solid` los tonos aclaran el relleno y el texto se
|
|
24
|
+
* queda sin contraste.
|
|
25
|
+
*/
|
|
26
|
+
ai?: "ring" | "surface";
|
|
12
27
|
};
|
|
13
28
|
//# sourceMappingURL=Button.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../../src/components/button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,WAAW,GAAG,IAAI,CAC7B,iBAAiB,EACjB,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CACvC,GAAG;IACH,KAAK,CAAC,EACH,SAAS,GACT,SAAS,GACT,WAAW,GACX,SAAS,GACT,SAAS,GACT,QAAQ,CAAC;IACZ,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EACL,OAAO,GACP,UAAU,GACV,OAAO,GACP,MAAM,GACN,OAAO,GACP,OAAO,GACP,QAAQ,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAC9C,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../../src/components/button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,WAAW,GAAG,IAAI,CAC7B,iBAAiB,EACjB,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CACvC,GAAG;IACH,KAAK,CAAC,EACH,SAAS,GACT,SAAS,GACT,WAAW,GACX,SAAS,GACT,SAAS,GACT,QAAQ,CAAC;IACZ,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EACL,OAAO,GACP,UAAU,GACV,OAAO,GACP,MAAM,GACN,OAAO,GACP,OAAO,GACP,QAAQ,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAC9C,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;;;;;;OAaG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACxB,CAAC"}
|
|
@@ -1 +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;
|
|
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;AAa5B;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA4EhD,CAAC"}
|
|
@@ -21,6 +21,8 @@ export type DonutChartTranslations = {
|
|
|
21
21
|
emptyState?: string;
|
|
22
22
|
/** Etiqueta sobre el total, en el centro del donut (solo si `innerRadiusRatio > 0`). */
|
|
23
23
|
totalLabel?: string;
|
|
24
|
+
/** Texto para una porción real (>0) que redondea a 0% en la leyenda. */
|
|
25
|
+
lessThanOnePercent?: string;
|
|
24
26
|
};
|
|
25
27
|
export type DonutChartProps = {
|
|
26
28
|
/** Categorías a graficar. */
|
|
@@ -1 +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;
|
|
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;IACpB,wEAAwE;IACxE,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC5B,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"}
|
|
@@ -7,6 +7,13 @@ export declare function computeTotal(data: DonutChartDatum[]): number;
|
|
|
7
7
|
* `NotData` legacy de Guru.js: un donut sin nada que repartir no aporta información.
|
|
8
8
|
*/
|
|
9
9
|
export declare function isDonutEmpty(data: DonutChartDatum[]): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Formatea `percent` (0-1) como entero + "%", excepto cuando la porción es
|
|
12
|
+
* real (>0) pero redondea a 0 — ahí muestra "<1%" en vez de "0%", que se lee
|
|
13
|
+
* como "no hay nada" y confunde cuando sí hay dato (ej. 4 de 2357 = 0.17%).
|
|
14
|
+
* `lessThanOneLabel` permite traducir el texto (ver `DonutChartTranslations`).
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatDonutPercent(percent: number, lessThanOneLabel?: string): string;
|
|
10
17
|
/**
|
|
11
18
|
* Resuelve las proporciones y el color final de cada categoría.
|
|
12
19
|
* El color propio de cada dato tiene prioridad; si falta, se cicla `palette` por índice.
|
|
@@ -1 +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"}
|
|
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;;;;;GAKG;AACH,wBAAgB,kBAAkB,CACjC,OAAO,EAAE,MAAM,EACf,gBAAgB,SAAQ,GACtB,MAAM,CAMR;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC5B,IAAI,EAAE,eAAe,EAAE,EACvB,OAAO,GAAE,MAAM,EAAyB,GACtC,eAAe,EAAE,CAWnB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { DonutChart } from "./DonutChart";
|
|
2
2
|
export type { DonutChartDatum, DonutChartProps, DonutChartSlice, DonutChartTranslations, } from "./DonutChart.types";
|
|
3
|
-
export { DEFAULT_DONUT_COLORS, computeSlices, computeTotal, isDonutEmpty, } from "./donut-chart.utils";
|
|
3
|
+
export { DEFAULT_DONUT_COLORS, computeSlices, computeTotal, formatDonutPercent, isDonutEmpty, } from "./donut-chart.utils";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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"}
|
|
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,kBAAkB,EAClB,YAAY,GACZ,MAAM,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuClaw.d.ts","sourceRoot":"","sources":["../../../../src/components/menu-claw/MenuClaw.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,iBAAiB,CAAC;AAIzB,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,kBAAkB,CAAC;AAmB5E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"MenuClaw.d.ts","sourceRoot":"","sources":["../../../../src/components/menu-claw/MenuClaw.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,iBAAiB,CAAC;AAIzB,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,kBAAkB,CAAC;AAmB5E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAsR3C,CAAC"}
|
|
@@ -96,6 +96,25 @@ export interface MenuClawProps {
|
|
|
96
96
|
history: MenuClawHistory;
|
|
97
97
|
isOpenSidebar?: boolean;
|
|
98
98
|
onOpenSidebarChange?: (open: boolean) => void;
|
|
99
|
+
/**
|
|
100
|
+
* Estado de plegado, en modo controlado. Si se omite, `MenuClaw` gestiona su
|
|
101
|
+
* propio estado interno (arranca expandido, o por `defaultCollapsed` si se
|
|
102
|
+
* indica) — comportamiento idéntico al de antes de esta prop.
|
|
103
|
+
*/
|
|
104
|
+
isCollapsed?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Se invoca cuando el usuario pulsa el botón de comprimir/expandir, tanto en
|
|
107
|
+
* modo controlado como no controlado. En modo controlado el consumidor debe
|
|
108
|
+
* aplicar el nuevo valor a `isCollapsed`; en modo no controlado es solo un
|
|
109
|
+
* aviso (el componente ya actualizó su estado interno).
|
|
110
|
+
*/
|
|
111
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
112
|
+
/**
|
|
113
|
+
* Estado de plegado inicial en modo no controlado (sin `isCollapsed`). Se
|
|
114
|
+
* ignora si `isCollapsed` está presente.
|
|
115
|
+
* @default false
|
|
116
|
+
*/
|
|
117
|
+
defaultCollapsed?: boolean;
|
|
99
118
|
/**
|
|
100
119
|
* Key del grupo cuyos ítems se muestran en la barra inferior móvil (hasta 4
|
|
101
120
|
* + hamburguesa). Sin este valor no se muestra la barra inferior.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuClaw.types.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Q,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACb,CAAC;IACF;;;OAGG;IACH,UAAU,CAAC,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,SAAS,EAAE;QACV,KAAK,EAAE,eAAe,EAAE,CAAC;QACzB;;;;WAIG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,sEAAsE;QACtE,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB;;;WAGG;QACH,QAAQ,CAAC,EAAE,CACV,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,SAAS,GAAG,WAAW,KAC5B,IAAI,CAAC;KACV,CAAC;IACF,uDAAuD;IACvD,OAAO,EAAE,eAAe,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iEAAiE;IACjE,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACpC"}
|
|
1
|
+
{"version":3,"file":"MenuClaw.types.d.ts","sourceRoot":"","sources":["../../../../src/components/menu-claw/MenuClaw.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;AAEzF,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IACnC,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAC;IACX,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;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,MAAM,CAAC;QACrB;;;WAGG;QACH,QAAQ,CAAC,EAAE,CACV,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,SAAS,GAAG,WAAW,KAC5B,IAAI,CAAC;KACV,CAAC;IACF,uDAAuD;IACvD,OAAO,EAAE,eAAe,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iEAAiE;IACjE,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Phone.d.ts","sourceRoot":"","sources":["../../../../src/components/phone/Phone.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Phone.d.ts","sourceRoot":"","sources":["../../../../src/components/phone/Phone.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAOrD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmP3C,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings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O,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -2,6 +2,7 @@ export * from "./force-light-only-theme";
|
|
|
2
2
|
export * from "./hex-to-theme-color";
|
|
3
3
|
export * from "./generate-color-scale";
|
|
4
4
|
export * from "./apply-custom-color";
|
|
5
|
+
export * from "./linda-tones";
|
|
5
6
|
export * from "./theme-provider";
|
|
6
7
|
export * from "./theme-provider.types";
|
|
7
8
|
export * from "./theme.utils";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/providers/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/providers/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC"}
|