@misael703/ui 1.63.0 → 1.64.1
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/{chunk-BC7BNFXX.js → chunk-CP6DXFGZ.js} +15 -11
- package/dist/chunk-CP6DXFGZ.js.map +1 -0
- package/dist/{chunk-37ZCEETH.mjs → chunk-JTSSM4NE.mjs} +15 -11
- package/dist/chunk-JTSSM4NE.mjs.map +1 -0
- package/dist/components/Charts.d.mts +10 -4
- package/dist/components/Charts.d.ts +10 -4
- package/dist/components/Charts.js +6 -6
- package/dist/components/Charts.mjs +1 -1
- package/dist/index.js +6 -6
- package/dist/index.mjs +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/chunk-37ZCEETH.mjs.map +0 -1
- package/dist/chunk-BC7BNFXX.js.map +0 -1
|
@@ -71,11 +71,12 @@ function LineChart({
|
|
|
71
71
|
valueFormatter,
|
|
72
72
|
allowDecimals,
|
|
73
73
|
tooltipLabelFormatter,
|
|
74
|
-
tooltip
|
|
74
|
+
tooltip,
|
|
75
|
+
accessibilityLayer = true
|
|
75
76
|
}) {
|
|
76
77
|
const lineType = curve ?? (smooth ? "monotone" : "linear");
|
|
77
78
|
const allowDec = allowDecimals ?? !allIntegerValues(data, series.map((s) => s.key));
|
|
78
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkPASF6T4H_js.cx("chart", className), role: "img", "aria-label": ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsx(R.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxRuntime.jsxs(R.LineChart, { data, margin: { top: 8, right: 16, bottom: 0, left: 0 }, children: [
|
|
79
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkPASF6T4H_js.cx("chart", className), role: "img", "aria-label": ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsx(R.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxRuntime.jsxs(R.LineChart, { data, accessibilityLayer, margin: { top: 8, right: 16, bottom: 0, left: 0 }, children: [
|
|
79
80
|
showGrid && /* @__PURE__ */ jsxRuntime.jsx(R.CartesianGrid, { stroke: "var(--border-default)", strokeDasharray: "3 3", vertical: false }),
|
|
80
81
|
/* @__PURE__ */ jsxRuntime.jsx(R.XAxis, { dataKey: categoryKey, stroke: "var(--fg-subtle)", fontSize: 12, tickLine: false, axisLine: false, ...categoryTickProps({ xTickFormatter, xTickInterval, xTickAngle }) }),
|
|
81
82
|
/* @__PURE__ */ jsxRuntime.jsx(R.YAxis, { stroke: "var(--fg-subtle)", fontSize: 12, tickLine: false, axisLine: false, ...valueAxisProps(valueFormatter, allowDec) }),
|
|
@@ -115,11 +116,12 @@ function AreaChart({
|
|
|
115
116
|
valueFormatter,
|
|
116
117
|
allowDecimals,
|
|
117
118
|
tooltipLabelFormatter,
|
|
118
|
-
tooltip
|
|
119
|
+
tooltip,
|
|
120
|
+
accessibilityLayer = true
|
|
119
121
|
}) {
|
|
120
122
|
const lineType = curve ?? (smooth ? "monotone" : "linear");
|
|
121
123
|
const allowDec = allowDecimals ?? !allIntegerValues(data, series.map((s) => s.key));
|
|
122
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkPASF6T4H_js.cx("chart", className), role: "img", "aria-label": ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsx(R.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxRuntime.jsxs(R.AreaChart, { data, margin: { top: 8, right: 16, bottom: 0, left: 0 }, children: [
|
|
124
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkPASF6T4H_js.cx("chart", className), role: "img", "aria-label": ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsx(R.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxRuntime.jsxs(R.AreaChart, { data, accessibilityLayer, margin: { top: 8, right: 16, bottom: 0, left: 0 }, children: [
|
|
123
125
|
showGrid && /* @__PURE__ */ jsxRuntime.jsx(R.CartesianGrid, { stroke: "var(--border-default)", strokeDasharray: "3 3", vertical: false }),
|
|
124
126
|
/* @__PURE__ */ jsxRuntime.jsx(R.XAxis, { dataKey: categoryKey, stroke: "var(--fg-subtle)", fontSize: 12, tickLine: false, axisLine: false, ...categoryTickProps({ xTickFormatter, xTickInterval, xTickAngle }) }),
|
|
125
127
|
/* @__PURE__ */ jsxRuntime.jsx(R.YAxis, { stroke: "var(--fg-subtle)", fontSize: 12, tickLine: false, axisLine: false, ...valueAxisProps(valueFormatter, allowDec) }),
|
|
@@ -160,7 +162,8 @@ function BarChart({
|
|
|
160
162
|
valueFormatter,
|
|
161
163
|
allowDecimals,
|
|
162
164
|
tooltipLabelFormatter,
|
|
163
|
-
tooltip
|
|
165
|
+
tooltip,
|
|
166
|
+
accessibilityLayer = true
|
|
164
167
|
}) {
|
|
165
168
|
const isHorizontal = layout === "horizontal";
|
|
166
169
|
const allowDec = allowDecimals ?? !allIntegerValues(data, series.map((s) => s.key));
|
|
@@ -168,7 +171,7 @@ function BarChart({
|
|
|
168
171
|
const lastIdx = series.length - 1;
|
|
169
172
|
const catTicks = categoryTickProps({ xTickFormatter, xTickInterval, xTickAngle });
|
|
170
173
|
const catTicksNoRotate = categoryTickProps({ xTickFormatter, xTickInterval, xTickAngle }, false);
|
|
171
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkPASF6T4H_js.cx("chart", className), role: "img", "aria-label": ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsx(R.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxRuntime.jsxs(R.BarChart, { data, layout: isHorizontal ? "vertical" : "horizontal", margin: { top: 8, right: 16, bottom: 0, left: 0 }, children: [
|
|
174
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkPASF6T4H_js.cx("chart", className), role: "img", "aria-label": ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsx(R.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxRuntime.jsxs(R.BarChart, { data, accessibilityLayer, layout: isHorizontal ? "vertical" : "horizontal", margin: { top: 8, right: 16, bottom: 0, left: 0 }, children: [
|
|
172
175
|
showGrid && /* @__PURE__ */ jsxRuntime.jsx(R.CartesianGrid, { stroke: "var(--border-default)", strokeDasharray: "3 3", vertical: isHorizontal, horizontal: !isHorizontal }),
|
|
173
176
|
isHorizontal ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
174
177
|
/* @__PURE__ */ jsxRuntime.jsx(R.XAxis, { type: "number", stroke: "var(--fg-subtle)", fontSize: 12, tickLine: false, axisLine: false, ...valueAxisProps(valueFormatter, allowDec) }),
|
|
@@ -208,12 +211,13 @@ function DonutChart({
|
|
|
208
211
|
outerRadius = 88,
|
|
209
212
|
nameFormatter,
|
|
210
213
|
valueFormatter,
|
|
211
|
-
tooltip
|
|
214
|
+
tooltip,
|
|
215
|
+
accessibilityLayer = true
|
|
212
216
|
}) {
|
|
213
217
|
const tooltipProps2 = nameFormatter || valueFormatter ? { formatter: (v, n) => [valueFormatter ? valueFormatter(Number(v)) : v, nameFormatter ? nameFormatter(String(n)) : n] } : {};
|
|
214
218
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkPASF6T4H_js.cx("chart chart--donut", className), role: "img", "aria-label": ariaLabel, children: [
|
|
215
219
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chart__donut-area", style: { height }, children: [
|
|
216
|
-
/* @__PURE__ */ jsxRuntime.jsx(R.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(R.PieChart, { children: [
|
|
220
|
+
/* @__PURE__ */ jsxRuntime.jsx(R.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(R.PieChart, { accessibilityLayer, children: [
|
|
217
221
|
/* @__PURE__ */ jsxRuntime.jsx(R.Tooltip, { contentStyle: tooltipContentStyle(tooltip), ...tooltipChrome(tooltip), ...tooltipProps2 }),
|
|
218
222
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
219
223
|
R.Pie,
|
|
@@ -257,7 +261,7 @@ function Sparkline({
|
|
|
257
261
|
ariaLabel
|
|
258
262
|
}) {
|
|
259
263
|
const margin = interactive ? { top: 4, right: 4, bottom: 4, left: 4 } : { top: 2, right: 0, bottom: 2, left: 0 };
|
|
260
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkPASF6T4H_js.cx("sparkline", interactive && "sparkline--interactive", className), role: "img", "aria-label": ariaLabel, style: { width, height }, children: /* @__PURE__ */ jsxRuntime.jsx(R.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(R.AreaChart, { data, margin, children: [
|
|
264
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkPASF6T4H_js.cx("sparkline", interactive && "sparkline--interactive", className), role: "img", "aria-label": ariaLabel, style: { width, height }, children: /* @__PURE__ */ jsxRuntime.jsx(R.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(R.AreaChart, { data, accessibilityLayer: interactive, margin, children: [
|
|
261
265
|
interactive && /* @__PURE__ */ jsxRuntime.jsx(R.Tooltip, { contentStyle: tooltipContentStyle(tooltip), ...tooltipChrome(tooltip) }),
|
|
262
266
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
263
267
|
R.Area,
|
|
@@ -280,5 +284,5 @@ exports.BarChart = BarChart;
|
|
|
280
284
|
exports.DonutChart = DonutChart;
|
|
281
285
|
exports.LineChart = LineChart;
|
|
282
286
|
exports.Sparkline = Sparkline;
|
|
283
|
-
//# sourceMappingURL=chunk-
|
|
284
|
-
//# sourceMappingURL=chunk-
|
|
287
|
+
//# sourceMappingURL=chunk-CP6DXFGZ.js.map
|
|
288
|
+
//# sourceMappingURL=chunk-CP6DXFGZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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AO,KAAA,GAAQ,MAAA;AAAA,QACrB,WAAA,EAAa,OAAO,IAAA,GAAO,CAAA;AAAA,QAC3B,iBAAA,EAAmB,KAAA;AAAA,QACnB,SAAA,EAAW,cAAc,EAAE,CAAA,EAAG,KAAK,WAAA,EAAa,CAAA,EAAG,IAAA,EAAM,KAAA,EAAM,GAAI;AAAA;AAAA;AACrE,GAAA,EACF,GACF,CAAA,EACF,CAAA;AAEJ","file":"chunk-CP6DXFGZ.js","sourcesContent":["'use client';\nimport * as React from 'react';\nimport { cx } from '../utils/cx';\n\n/**\n * Lightweight chart wrappers. We do NOT bundle Recharts — the host app provides it\n * and passes the modules in via the `recharts` prop so consumers only pay for what they use.\n *\n * Recharts is treated as an implicit peer dependency: install it in the host\n * app if you use any chart component. Use **recharts ≥ 3** — earlier versions use\n * `defaultProps` on function components, which logs a deprecation warning under\n * React 19. recharts 3 removed them; these wrappers use default parameters, so on\n * recharts 3.8+ the console stays clean (verified).\n *\n * Usage in a Next.js client component:\n *\n * import * as Recharts from 'recharts';\n * import { LineChart } from '@misael703/elalba-ui';\n * <LineChart recharts={Recharts} data={...} dataKey=\"value\" categoryKey=\"month\" />\n */\n\n// Structural mirror of the Recharts public API. `any` is intentional here:\n// each Recharts component has a different prop shape, and typing them\n// exhaustively would mean depending on `recharts` types — which would force\n// consumers to install recharts even when they don't use any chart.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype RechartsComp = React.ComponentType<any>;\n\nexport type RechartsLike = {\n ResponsiveContainer: RechartsComp;\n LineChart: RechartsComp;\n AreaChart: RechartsComp;\n BarChart: RechartsComp;\n PieChart: RechartsComp;\n Line: RechartsComp;\n Area: RechartsComp;\n Bar: RechartsComp;\n Pie: RechartsComp;\n Cell: RechartsComp;\n CartesianGrid: RechartsComp;\n XAxis: RechartsComp;\n YAxis: RechartsComp;\n Tooltip: RechartsComp;\n Legend: RechartsComp;\n};\n\nconst PALETTE = [\n 'var(--color-primary)',\n 'var(--color-secondary)',\n 'var(--color-primary-900)',\n 'var(--color-success)',\n 'var(--color-warning)',\n 'var(--color-danger)',\n '#6b7e95',\n '#d4a574',\n];\n\n/** Tooltip chrome shared by every chart. */\nexport interface ChartTooltipConfig {\n /**\n * Cap the tooltip width so long content wraps instead of overflowing a narrow\n * (mobile) chart. Default `min(220px, 90vw)`. Number = px; or any CSS length.\n */\n maxWidth?: number | string;\n /** Let the tooltip escape the chart's plotting box. Default: recharts (stays inside). */\n allowEscapeViewBox?: { x?: boolean; y?: boolean };\n}\n\nexport interface BaseChartProps<D = any> {\n recharts: RechartsLike;\n data: D[];\n height?: number;\n className?: string;\n ariaLabel?: string;\n /** Tooltip sizing/positioning. By default the tooltip caps its width and wraps. */\n tooltip?: ChartTooltipConfig;\n /**\n * recharts' keyboard-navigation layer (puts `tabindex=0` on the svg + arrow-key\n * navigation). Default `true`. Set `false` for a non-actionable chart so it's\n * not a Tab stop / not focusable (no drill-down → nothing to navigate to).\n */\n accessibilityLayer?: boolean;\n}\n\n// Mirror of Recharts' AxisInterval. Controls how category ticks thin on\n// collision so dense series (e.g. daily points) don't crowd the axis.\nexport type AxisInterval =\n | number\n | 'preserveStart'\n | 'preserveEnd'\n | 'preserveStartEnd'\n | 'equidistantPreserveStart'\n | 'equidistantPreserveEnd';\n\n// Shared cartesian controls (Line/Area/Bar). DonutChart/Sparkline don't have a\n// category axis, so they keep BaseChartProps.\nexport interface CartesianChartProps<D = any> extends BaseChartProps<D> {\n categoryKey: keyof D & string;\n series: Array<{ key: keyof D & string; label?: string; color?: string }>;\n showGrid?: boolean;\n showLegend?: boolean;\n /** Format each category-axis tick label, e.g. shorten `2026-05-23`. → XAxis.tickFormatter */\n xTickFormatter?: (value: string) => string;\n /** Thin out category ticks on collision. → XAxis.interval. Default `preserveStartEnd`. */\n xTickInterval?: AxisInterval;\n /** Rotate category-axis labels N degrees (anchors end + reserves height so they don't clip). */\n xTickAngle?: number;\n /** Format numeric values (value-axis ticks + tooltip). */\n valueFormatter?: (value: number) => string;\n /**\n * Allow fractional value-axis ticks. Default: auto — `false` when every series\n * value is an integer (count data → no `0.25` ticks), `true` otherwise. Pass\n * explicitly to override the auto-detection.\n */\n allowDecimals?: boolean;\n /**\n * Format the category label in the tooltip. Defaults to `xTickFormatter` so the\n * tooltip matches the axis (e.g. both show `18 jun`, not the raw `2026-06-18`).\n */\n tooltipLabelFormatter?: (value: string) => string;\n}\n\nconst DEFAULT_X_INTERVAL: AxisInterval = 'preserveStartEnd';\n\n// Recharts XAxis/YAxis are `any`-typed (structural mirror), so tick controls go\n// in as a spread. `rotate` is off when the category axis is the Y axis\n// (horizontal bars: those labels are already horizontal).\nfunction categoryTickProps(\n opts: Pick<CartesianChartProps, 'xTickFormatter' | 'xTickInterval' | 'xTickAngle'>,\n rotate = true,\n): Record<string, unknown> {\n const props: Record<string, unknown> = { interval: opts.xTickInterval ?? DEFAULT_X_INTERVAL };\n if (opts.xTickFormatter) props.tickFormatter = opts.xTickFormatter;\n if (rotate && opts.xTickAngle) {\n props.angle = opts.xTickAngle;\n props.textAnchor = 'end';\n props.height = 56; // reserve room so the rotated label isn't clipped\n }\n return props;\n}\n\n// Value axis: `allowDecimals` (count data → integer-only ticks) + optional\n// numeric tick formatter.\nfunction valueAxisProps(valueFormatter: ((v: number) => string) | undefined, allowDecimals: boolean): Record<string, unknown> {\n const props: Record<string, unknown> = { allowDecimals };\n if (valueFormatter) props.tickFormatter = (v: number) => valueFormatter(Number(v));\n return props;\n}\n\n// Tooltip box style: the kit chrome + a width cap with wrapping so long content\n// (long labels / many series) doesn't overflow a narrow chart. `min(220px, 90vw)`\n// stays inside on mobile and caps to 220px on desktop.\nconst TOOLTIP_BASE_STYLE = { background: 'var(--bg-surface)', border: '1px solid var(--border-default)', borderRadius: 8, fontSize: 12 } as const;\n\nfunction tooltipContentStyle(tooltip?: ChartTooltipConfig): Record<string, unknown> {\n return { ...TOOLTIP_BASE_STYLE, maxWidth: tooltip?.maxWidth ?? 'min(220px, 90vw)', whiteSpace: 'normal' };\n}\n\nfunction tooltipChrome(tooltip?: ChartTooltipConfig): Record<string, unknown> {\n return tooltip?.allowEscapeViewBox ? { allowEscapeViewBox: tooltip.allowEscapeViewBox } : {};\n}\n\n// Tooltip: value formatter + a category-label formatter that defaults to the\n// axis tick formatter (so the hovered label matches the axis).\nfunction tooltipProps(\n valueFormatter: ((v: number) => string) | undefined,\n tooltipLabelFormatter: ((v: string) => string) | undefined,\n xTickFormatter: ((v: string) => string) | undefined,\n): Record<string, unknown> {\n const props: Record<string, unknown> = {};\n if (valueFormatter) props.formatter = (v: unknown) => valueFormatter(Number(v));\n const labelFormatter = tooltipLabelFormatter ?? xTickFormatter;\n if (labelFormatter) props.labelFormatter = (v: unknown) => labelFormatter(String(v));\n return props;\n}\n\n// True when every plotted value is an integer → drives the `allowDecimals` auto-\n// detection (count series shouldn't get `0.25`-style ticks).\nfunction allIntegerValues<D>(data: D[], keys: string[]): boolean {\n for (const row of data) {\n for (const k of keys) {\n const v = (row as Record<string, unknown>)[k];\n if (typeof v === 'number' && Number.isFinite(v) && !Number.isInteger(v)) return false;\n }\n }\n return true;\n}\n\n// ---------- LineChart ---------------------------------------------------\nexport interface LineChartProps<D = any> extends CartesianChartProps<D> {\n smooth?: boolean;\n /** Interpolation. `monotone` smooths (default, back-compat); `linear` draws honest\n * straight segments — recommended for counts/stepped series (no phantom humps over zeros). */\n curve?: 'linear' | 'monotone';\n}\n\nexport function LineChart<D = any>({\n recharts: R, data, categoryKey, series,\n height = 280, className, ariaLabel,\n showGrid = true, showLegend = true, smooth = true, curve,\n xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, accessibilityLayer = true,\n}: LineChartProps<D>) {\n const lineType = curve ?? (smooth ? 'monotone' : 'linear');\n const allowDec = allowDecimals ?? !allIntegerValues(data, series.map((s) => s.key));\n return (\n <div className={cx('chart', className)} role=\"img\" aria-label={ariaLabel}>\n <R.ResponsiveContainer width=\"100%\" height={height}>\n <R.LineChart data={data} accessibilityLayer={accessibilityLayer} margin={{ top: 8, right: 16, bottom: 0, left: 0 }}>\n {showGrid && <R.CartesianGrid stroke=\"var(--border-default)\" strokeDasharray=\"3 3\" vertical={false} />}\n <R.XAxis dataKey={categoryKey} stroke=\"var(--fg-subtle)\" fontSize={12} tickLine={false} axisLine={false} {...categoryTickProps({ xTickFormatter, xTickInterval, xTickAngle })} />\n <R.YAxis stroke=\"var(--fg-subtle)\" fontSize={12} tickLine={false} axisLine={false} {...valueAxisProps(valueFormatter, allowDec)} />\n <R.Tooltip contentStyle={tooltipContentStyle(tooltip)} {...tooltipChrome(tooltip)} {...tooltipProps(valueFormatter, tooltipLabelFormatter, xTickFormatter)} />\n {showLegend && <R.Legend wrapperStyle={{ fontSize: 12 }} />}\n {series.map((s, i) => (\n <R.Line\n key={s.key}\n type={lineType}\n dataKey={s.key}\n name={s.label ?? s.key}\n stroke={s.color ?? PALETTE[i % PALETTE.length]}\n strokeWidth={2}\n dot={false}\n activeDot={{ r: 4 }}\n />\n ))}\n </R.LineChart>\n </R.ResponsiveContainer>\n </div>\n );\n}\n\n// ---------- AreaChart ---------------------------------------------------\nexport interface AreaChartProps<D = any> extends LineChartProps<D> {\n stacked?: boolean;\n}\n\nexport function AreaChart<D = any>({\n recharts: R, data, categoryKey, series,\n height = 280, className, ariaLabel,\n showGrid = true, showLegend = true, smooth = true, curve, stacked,\n xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, accessibilityLayer = true,\n}: AreaChartProps<D>) {\n const lineType = curve ?? (smooth ? 'monotone' : 'linear');\n const allowDec = allowDecimals ?? !allIntegerValues(data, series.map((s) => s.key));\n return (\n <div className={cx('chart', className)} role=\"img\" aria-label={ariaLabel}>\n <R.ResponsiveContainer width=\"100%\" height={height}>\n <R.AreaChart data={data} accessibilityLayer={accessibilityLayer} margin={{ top: 8, right: 16, bottom: 0, left: 0 }}>\n {showGrid && <R.CartesianGrid stroke=\"var(--border-default)\" strokeDasharray=\"3 3\" vertical={false} />}\n <R.XAxis dataKey={categoryKey} stroke=\"var(--fg-subtle)\" fontSize={12} tickLine={false} axisLine={false} {...categoryTickProps({ xTickFormatter, xTickInterval, xTickAngle })} />\n <R.YAxis stroke=\"var(--fg-subtle)\" fontSize={12} tickLine={false} axisLine={false} {...valueAxisProps(valueFormatter, allowDec)} />\n <R.Tooltip contentStyle={tooltipContentStyle(tooltip)} {...tooltipChrome(tooltip)} {...tooltipProps(valueFormatter, tooltipLabelFormatter, xTickFormatter)} />\n {showLegend && <R.Legend wrapperStyle={{ fontSize: 12 }} />}\n {series.map((s, i) => (\n <R.Area\n key={s.key}\n type={lineType}\n dataKey={s.key}\n name={s.label ?? s.key}\n stackId={stacked ? '1' : undefined}\n stroke={s.color ?? PALETTE[i % PALETTE.length]}\n fill={s.color ?? PALETTE[i % PALETTE.length]}\n fillOpacity={0.18}\n strokeWidth={2}\n />\n ))}\n </R.AreaChart>\n </R.ResponsiveContainer>\n </div>\n );\n}\n\n// ---------- BarChart ----------------------------------------------------\nexport interface BarChartProps<D = any> extends CartesianChartProps<D> {\n layout?: 'vertical' | 'horizontal';\n stacked?: boolean;\n}\n\nconst BAR_RADIUS = 4;\n\nexport function BarChart<D = any>({\n recharts: R, data, categoryKey, series,\n height = 280, className, ariaLabel,\n layout = 'vertical', stacked, showGrid = true, showLegend = true,\n xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, accessibilityLayer = true,\n}: BarChartProps<D>) {\n const isHorizontal = layout === 'horizontal';\n const allowDec = allowDecimals ?? !allIntegerValues(data, series.map((s) => s.key));\n // Radius must round the VALUE end: top for columns ([tl,tr,br,bl] → [R,R,0,0]),\n // right for horizontal bars ([0,R,R,0]). The old hardcoded [4,4,0,0] left\n // horizontal bars rounded-top / pointed-bottom.\n const endRadius = isHorizontal ? [0, BAR_RADIUS, BAR_RADIUS, 0] : [BAR_RADIUS, BAR_RADIUS, 0, 0];\n const lastIdx = series.length - 1;\n const catTicks = categoryTickProps({ xTickFormatter, xTickInterval, xTickAngle });\n const catTicksNoRotate = categoryTickProps({ xTickFormatter, xTickInterval, xTickAngle }, false);\n return (\n <div className={cx('chart', className)} role=\"img\" aria-label={ariaLabel}>\n <R.ResponsiveContainer width=\"100%\" height={height}>\n <R.BarChart data={data} accessibilityLayer={accessibilityLayer} layout={isHorizontal ? 'vertical' : 'horizontal'} margin={{ top: 8, right: 16, bottom: 0, left: 0 }}>\n {showGrid && <R.CartesianGrid stroke=\"var(--border-default)\" strokeDasharray=\"3 3\" vertical={isHorizontal} horizontal={!isHorizontal} />}\n {isHorizontal ? (\n <>\n <R.XAxis type=\"number\" stroke=\"var(--fg-subtle)\" fontSize={12} tickLine={false} axisLine={false} {...valueAxisProps(valueFormatter, allowDec)} />\n <R.YAxis dataKey={categoryKey} type=\"category\" stroke=\"var(--fg-subtle)\" fontSize={12} tickLine={false} axisLine={false} width={96} {...catTicksNoRotate} />\n </>\n ) : (\n <>\n <R.XAxis dataKey={categoryKey} stroke=\"var(--fg-subtle)\" fontSize={12} tickLine={false} axisLine={false} {...catTicks} />\n <R.YAxis stroke=\"var(--fg-subtle)\" fontSize={12} tickLine={false} axisLine={false} {...valueAxisProps(valueFormatter, allowDec)} />\n </>\n )}\n <R.Tooltip contentStyle={tooltipContentStyle(tooltip)} {...tooltipChrome(tooltip)} cursor={{ fill: 'var(--bg-subtle)' }} {...tooltipProps(valueFormatter, tooltipLabelFormatter, xTickFormatter)} />\n {showLegend && <R.Legend wrapperStyle={{ fontSize: 12 }} />}\n {series.map((s, i) => {\n // Stacked: only the outermost (last) segment carries the end radius;\n // inner segments stay square so the stack reads as one bar.\n const barRadius = stacked ? (i === lastIdx ? endRadius : [0, 0, 0, 0]) : endRadius;\n return (\n <R.Bar\n key={s.key}\n dataKey={s.key}\n name={s.label ?? s.key}\n stackId={stacked ? '1' : undefined}\n fill={s.color ?? PALETTE[i % PALETTE.length]}\n radius={barRadius}\n maxBarSize={48}\n />\n );\n })}\n </R.BarChart>\n </R.ResponsiveContainer>\n </div>\n );\n}\n\n// ---------- DonutChart --------------------------------------------------\nexport interface DonutChartProps extends Omit<BaseChartProps, 'data'> {\n data: Array<{ name: string; value: number; color?: string }>;\n centerLabel?: React.ReactNode;\n showLegend?: boolean;\n innerRadius?: number;\n outerRadius?: number;\n /** Format slice names in tooltip + legend, e.g. `V_REGION` → `V Región` (no need to pre-map the data). */\n nameFormatter?: (name: string) => string;\n /** Format slice values in the tooltip. */\n valueFormatter?: (value: number) => string;\n}\n\nexport function DonutChart({\n recharts: R, data, height = 240, className, ariaLabel,\n centerLabel, showLegend = true, innerRadius = 60, outerRadius = 88,\n nameFormatter, valueFormatter, tooltip, accessibilityLayer = true,\n}: DonutChartProps) {\n // Recharts Tooltip formatter returns [formattedValue, formattedName].\n const tooltipProps = (nameFormatter || valueFormatter)\n ? { formatter: (v: unknown, n: unknown) => [valueFormatter ? valueFormatter(Number(v)) : v, nameFormatter ? nameFormatter(String(n)) : n] }\n : {};\n return (\n <div className={cx('chart chart--donut', className)} role=\"img\" aria-label={ariaLabel}>\n <div className=\"chart__donut-area\" style={{ height }}>\n <R.ResponsiveContainer width=\"100%\" height=\"100%\">\n <R.PieChart accessibilityLayer={accessibilityLayer}>\n <R.Tooltip contentStyle={tooltipContentStyle(tooltip)} {...tooltipChrome(tooltip)} {...tooltipProps} />\n <R.Pie\n data={data}\n dataKey=\"value\"\n nameKey=\"name\"\n innerRadius={innerRadius}\n outerRadius={outerRadius}\n paddingAngle={2}\n stroke=\"var(--bg-surface)\"\n >\n {data.map((d, i) => <R.Cell key={i} fill={d.color ?? PALETTE[i % PALETTE.length]} />)}\n </R.Pie>\n </R.PieChart>\n </R.ResponsiveContainer>\n {centerLabel && <div className=\"chart__center\">{centerLabel}</div>}\n </div>\n {showLegend && (\n <ul className=\"chart__legend\" aria-hidden=\"true\">\n {data.map((d, i) => (\n <li key={d.name} className=\"chart__legend-item\">\n <span\n className=\"chart__legend-swatch\"\n style={{ background: d.color ?? PALETTE[i % PALETTE.length] }}\n />\n <span className=\"chart__legend-label\">{nameFormatter ? nameFormatter(d.name) : d.name}</span>\n </li>\n ))}\n </ul>\n )}\n </div>\n );\n}\n\n// ---------- Sparkline ---------------------------------------------------\nexport interface SparklineProps<D = any> {\n recharts: RechartsLike;\n data: D[];\n dataKey: keyof D & string;\n width?: number;\n height?: number;\n color?: string;\n fill?: boolean;\n /**\n * Show a hover dot. Default `false` — a sparkline is glanceable/non-interactive\n * (the fine detail lives in the big LineChart). When off there's no active dot\n * to clip at the edges/base; when on, the margins are widened so it isn't cut.\n */\n interactive?: boolean;\n /** Tooltip sizing/positioning (only used when `interactive`). */\n tooltip?: ChartTooltipConfig;\n className?: string;\n ariaLabel?: string;\n}\n\nexport function Sparkline<D = any>({\n recharts: R, data, dataKey,\n width = 120, height = 32, color = 'var(--color-primary)',\n fill = true, interactive = false, tooltip, className, ariaLabel,\n}: SparklineProps<D>) {\n // No hover dot by default (it clips against the tiny margins at the first/last\n // point and the baseline). When interactive, leave room so it can't be cut off.\n const margin = interactive ? { top: 4, right: 4, bottom: 4, left: 4 } : { top: 2, right: 0, bottom: 2, left: 0 };\n return (\n <div className={cx('sparkline', interactive && 'sparkline--interactive', className)} role=\"img\" aria-label={ariaLabel} style={{ width, height }}>\n <R.ResponsiveContainer width=\"100%\" height=\"100%\">\n <R.AreaChart data={data} accessibilityLayer={interactive} margin={margin}>\n {interactive && <R.Tooltip contentStyle={tooltipContentStyle(tooltip)} {...tooltipChrome(tooltip)} />}\n <R.Area\n type=\"monotone\"\n dataKey={dataKey}\n stroke={color}\n strokeWidth={1.5}\n fill={fill ? color : 'none'}\n fillOpacity={fill ? 0.18 : 0}\n isAnimationActive={false}\n activeDot={interactive ? { r: 2.5, strokeWidth: 0, fill: color } : false}\n />\n </R.AreaChart>\n </R.ResponsiveContainer>\n </div>\n );\n}\n"]}
|
|
@@ -69,11 +69,12 @@ function LineChart({
|
|
|
69
69
|
valueFormatter,
|
|
70
70
|
allowDecimals,
|
|
71
71
|
tooltipLabelFormatter,
|
|
72
|
-
tooltip
|
|
72
|
+
tooltip,
|
|
73
|
+
accessibilityLayer = true
|
|
73
74
|
}) {
|
|
74
75
|
const lineType = curve ?? (smooth ? "monotone" : "linear");
|
|
75
76
|
const allowDec = allowDecimals ?? !allIntegerValues(data, series.map((s) => s.key));
|
|
76
|
-
return /* @__PURE__ */ jsx("div", { className: cx("chart", className), role: "img", "aria-label": ariaLabel, children: /* @__PURE__ */ jsx(R.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxs(R.LineChart, { data, margin: { top: 8, right: 16, bottom: 0, left: 0 }, children: [
|
|
77
|
+
return /* @__PURE__ */ jsx("div", { className: cx("chart", className), role: "img", "aria-label": ariaLabel, children: /* @__PURE__ */ jsx(R.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxs(R.LineChart, { data, accessibilityLayer, margin: { top: 8, right: 16, bottom: 0, left: 0 }, children: [
|
|
77
78
|
showGrid && /* @__PURE__ */ jsx(R.CartesianGrid, { stroke: "var(--border-default)", strokeDasharray: "3 3", vertical: false }),
|
|
78
79
|
/* @__PURE__ */ jsx(R.XAxis, { dataKey: categoryKey, stroke: "var(--fg-subtle)", fontSize: 12, tickLine: false, axisLine: false, ...categoryTickProps({ xTickFormatter, xTickInterval, xTickAngle }) }),
|
|
79
80
|
/* @__PURE__ */ jsx(R.YAxis, { stroke: "var(--fg-subtle)", fontSize: 12, tickLine: false, axisLine: false, ...valueAxisProps(valueFormatter, allowDec) }),
|
|
@@ -113,11 +114,12 @@ function AreaChart({
|
|
|
113
114
|
valueFormatter,
|
|
114
115
|
allowDecimals,
|
|
115
116
|
tooltipLabelFormatter,
|
|
116
|
-
tooltip
|
|
117
|
+
tooltip,
|
|
118
|
+
accessibilityLayer = true
|
|
117
119
|
}) {
|
|
118
120
|
const lineType = curve ?? (smooth ? "monotone" : "linear");
|
|
119
121
|
const allowDec = allowDecimals ?? !allIntegerValues(data, series.map((s) => s.key));
|
|
120
|
-
return /* @__PURE__ */ jsx("div", { className: cx("chart", className), role: "img", "aria-label": ariaLabel, children: /* @__PURE__ */ jsx(R.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxs(R.AreaChart, { data, margin: { top: 8, right: 16, bottom: 0, left: 0 }, children: [
|
|
122
|
+
return /* @__PURE__ */ jsx("div", { className: cx("chart", className), role: "img", "aria-label": ariaLabel, children: /* @__PURE__ */ jsx(R.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxs(R.AreaChart, { data, accessibilityLayer, margin: { top: 8, right: 16, bottom: 0, left: 0 }, children: [
|
|
121
123
|
showGrid && /* @__PURE__ */ jsx(R.CartesianGrid, { stroke: "var(--border-default)", strokeDasharray: "3 3", vertical: false }),
|
|
122
124
|
/* @__PURE__ */ jsx(R.XAxis, { dataKey: categoryKey, stroke: "var(--fg-subtle)", fontSize: 12, tickLine: false, axisLine: false, ...categoryTickProps({ xTickFormatter, xTickInterval, xTickAngle }) }),
|
|
123
125
|
/* @__PURE__ */ jsx(R.YAxis, { stroke: "var(--fg-subtle)", fontSize: 12, tickLine: false, axisLine: false, ...valueAxisProps(valueFormatter, allowDec) }),
|
|
@@ -158,7 +160,8 @@ function BarChart({
|
|
|
158
160
|
valueFormatter,
|
|
159
161
|
allowDecimals,
|
|
160
162
|
tooltipLabelFormatter,
|
|
161
|
-
tooltip
|
|
163
|
+
tooltip,
|
|
164
|
+
accessibilityLayer = true
|
|
162
165
|
}) {
|
|
163
166
|
const isHorizontal = layout === "horizontal";
|
|
164
167
|
const allowDec = allowDecimals ?? !allIntegerValues(data, series.map((s) => s.key));
|
|
@@ -166,7 +169,7 @@ function BarChart({
|
|
|
166
169
|
const lastIdx = series.length - 1;
|
|
167
170
|
const catTicks = categoryTickProps({ xTickFormatter, xTickInterval, xTickAngle });
|
|
168
171
|
const catTicksNoRotate = categoryTickProps({ xTickFormatter, xTickInterval, xTickAngle }, false);
|
|
169
|
-
return /* @__PURE__ */ jsx("div", { className: cx("chart", className), role: "img", "aria-label": ariaLabel, children: /* @__PURE__ */ jsx(R.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxs(R.BarChart, { data, layout: isHorizontal ? "vertical" : "horizontal", margin: { top: 8, right: 16, bottom: 0, left: 0 }, children: [
|
|
172
|
+
return /* @__PURE__ */ jsx("div", { className: cx("chart", className), role: "img", "aria-label": ariaLabel, children: /* @__PURE__ */ jsx(R.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxs(R.BarChart, { data, accessibilityLayer, layout: isHorizontal ? "vertical" : "horizontal", margin: { top: 8, right: 16, bottom: 0, left: 0 }, children: [
|
|
170
173
|
showGrid && /* @__PURE__ */ jsx(R.CartesianGrid, { stroke: "var(--border-default)", strokeDasharray: "3 3", vertical: isHorizontal, horizontal: !isHorizontal }),
|
|
171
174
|
isHorizontal ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
172
175
|
/* @__PURE__ */ jsx(R.XAxis, { type: "number", stroke: "var(--fg-subtle)", fontSize: 12, tickLine: false, axisLine: false, ...valueAxisProps(valueFormatter, allowDec) }),
|
|
@@ -206,12 +209,13 @@ function DonutChart({
|
|
|
206
209
|
outerRadius = 88,
|
|
207
210
|
nameFormatter,
|
|
208
211
|
valueFormatter,
|
|
209
|
-
tooltip
|
|
212
|
+
tooltip,
|
|
213
|
+
accessibilityLayer = true
|
|
210
214
|
}) {
|
|
211
215
|
const tooltipProps2 = nameFormatter || valueFormatter ? { formatter: (v, n) => [valueFormatter ? valueFormatter(Number(v)) : v, nameFormatter ? nameFormatter(String(n)) : n] } : {};
|
|
212
216
|
return /* @__PURE__ */ jsxs("div", { className: cx("chart chart--donut", className), role: "img", "aria-label": ariaLabel, children: [
|
|
213
217
|
/* @__PURE__ */ jsxs("div", { className: "chart__donut-area", style: { height }, children: [
|
|
214
|
-
/* @__PURE__ */ jsx(R.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(R.PieChart, { children: [
|
|
218
|
+
/* @__PURE__ */ jsx(R.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(R.PieChart, { accessibilityLayer, children: [
|
|
215
219
|
/* @__PURE__ */ jsx(R.Tooltip, { contentStyle: tooltipContentStyle(tooltip), ...tooltipChrome(tooltip), ...tooltipProps2 }),
|
|
216
220
|
/* @__PURE__ */ jsx(
|
|
217
221
|
R.Pie,
|
|
@@ -255,7 +259,7 @@ function Sparkline({
|
|
|
255
259
|
ariaLabel
|
|
256
260
|
}) {
|
|
257
261
|
const margin = interactive ? { top: 4, right: 4, bottom: 4, left: 4 } : { top: 2, right: 0, bottom: 2, left: 0 };
|
|
258
|
-
return /* @__PURE__ */ jsx("div", { className: cx("sparkline", interactive && "sparkline--interactive", className), role: "img", "aria-label": ariaLabel, style: { width, height }, children: /* @__PURE__ */ jsx(R.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(R.AreaChart, { data, margin, children: [
|
|
262
|
+
return /* @__PURE__ */ jsx("div", { className: cx("sparkline", interactive && "sparkline--interactive", className), role: "img", "aria-label": ariaLabel, style: { width, height }, children: /* @__PURE__ */ jsx(R.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(R.AreaChart, { data, accessibilityLayer: interactive, margin, children: [
|
|
259
263
|
interactive && /* @__PURE__ */ jsx(R.Tooltip, { contentStyle: tooltipContentStyle(tooltip), ...tooltipChrome(tooltip) }),
|
|
260
264
|
/* @__PURE__ */ jsx(
|
|
261
265
|
R.Area,
|
|
@@ -274,5 +278,5 @@ function Sparkline({
|
|
|
274
278
|
}
|
|
275
279
|
|
|
276
280
|
export { AreaChart, BarChart, DonutChart, LineChart, Sparkline };
|
|
277
|
-
//# sourceMappingURL=chunk-
|
|
278
|
-
//# sourceMappingURL=chunk-
|
|
281
|
+
//# sourceMappingURL=chunk-JTSSM4NE.mjs.map
|
|
282
|
+
//# sourceMappingUR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,MAAA;AAAA,QACrB,WAAA,EAAa,OAAO,IAAA,GAAO,CAAA;AAAA,QAC3B,iBAAA,EAAmB,KAAA;AAAA,QACnB,SAAA,EAAW,cAAc,EAAE,CAAA,EAAG,KAAK,WAAA,EAAa,CAAA,EAAG,IAAA,EAAM,KAAA,EAAM,GAAI;AAAA;AAAA;AACrE,GAAA,EACF,GACF,CAAA,EACF,CAAA;AAEJ","file":"chunk-JTSSM4NE.mjs","sourcesContent":["'use client';\nimport * as React from 'react';\nimport { cx } from '../utils/cx';\n\n/**\n * Lightweight chart wrappers. We do NOT bundle Recharts — the host app provides it\n * and passes the modules in via the `recharts` prop so consumers only pay for what they use.\n *\n * Recharts is treated as an implicit peer dependency: install it in the host\n * app if you use any chart component. Use **recharts ≥ 3** — earlier versions use\n * `defaultProps` on function components, which logs a deprecation warning under\n * React 19. recharts 3 removed them; these wrappers use default parameters, so on\n * recharts 3.8+ the console stays clean (verified).\n *\n * Usage in a Next.js client component:\n *\n * import * as Recharts from 'recharts';\n * import { LineChart } from '@misael703/elalba-ui';\n * <LineChart recharts={Recharts} data={...} dataKey=\"value\" categoryKey=\"month\" />\n */\n\n// Structural mirror of the Recharts public API. `any` is intentional here:\n// each Recharts component has a different prop shape, and typing them\n// exhaustively would mean depending on `recharts` types — which would force\n// consumers to install recharts even when they don't use any chart.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype RechartsComp = React.ComponentType<any>;\n\nexport type RechartsLike = {\n ResponsiveContainer: RechartsComp;\n LineChart: RechartsComp;\n AreaChart: RechartsComp;\n BarChart: RechartsComp;\n PieChart: RechartsComp;\n Line: RechartsComp;\n Area: RechartsComp;\n Bar: RechartsComp;\n Pie: RechartsComp;\n Cell: RechartsComp;\n CartesianGrid: RechartsComp;\n XAxis: RechartsComp;\n YAxis: RechartsComp;\n Tooltip: RechartsComp;\n Legend: RechartsComp;\n};\n\nconst PALETTE = [\n 'var(--color-primary)',\n 'var(--color-secondary)',\n 'var(--color-primary-900)',\n 'var(--color-success)',\n 'var(--color-warning)',\n 'var(--color-danger)',\n '#6b7e95',\n '#d4a574',\n];\n\n/** Tooltip chrome shared by every chart. */\nexport interface ChartTooltipConfig {\n /**\n * Cap the tooltip width so long content wraps instead of overflowing a narrow\n * (mobile) chart. Default `min(220px, 90vw)`. Number = px; or any CSS length.\n */\n maxWidth?: number | string;\n /** Let the tooltip escape the chart's plotting box. Default: recharts (stays inside). */\n allowEscapeViewBox?: { x?: boolean; y?: boolean };\n}\n\nexport interface BaseChartProps<D = any> {\n recharts: RechartsLike;\n data: D[];\n height?: number;\n className?: string;\n ariaLabel?: string;\n /** Tooltip sizing/positioning. By default the tooltip caps its width and wraps. */\n tooltip?: ChartTooltipConfig;\n /**\n * recharts' keyboard-navigation layer (puts `tabindex=0` on the svg + arrow-key\n * navigation). Default `true`. Set `false` for a non-actionable chart so it's\n * not a Tab stop / not focusable (no drill-down → nothing to navigate to).\n */\n accessibilityLayer?: boolean;\n}\n\n// Mirror of Recharts' AxisInterval. Controls how category ticks thin on\n// collision so dense series (e.g. daily points) don't crowd the axis.\nexport type AxisInterval =\n | number\n | 'preserveStart'\n | 'preserveEnd'\n | 'preserveStartEnd'\n | 'equidistantPreserveStart'\n | 'equidistantPreserveEnd';\n\n// Shared cartesian controls (Line/Area/Bar). DonutChart/Sparkline don't have a\n// category axis, so they keep BaseChartProps.\nexport interface CartesianChartProps<D = any> extends BaseChartProps<D> {\n categoryKey: keyof D & string;\n series: Array<{ key: keyof D & string; label?: string; color?: string }>;\n showGrid?: boolean;\n showLegend?: boolean;\n /** Format each category-axis tick label, e.g. shorten `2026-05-23`. → XAxis.tickFormatter */\n xTickFormatter?: (value: string) => string;\n /** Thin out category ticks on collision. → XAxis.interval. Default `preserveStartEnd`. */\n xTickInterval?: AxisInterval;\n /** Rotate category-axis labels N degrees (anchors end + reserves height so they don't clip). */\n xTickAngle?: number;\n /** Format numeric values (value-axis ticks + tooltip). */\n valueFormatter?: (value: number) => string;\n /**\n * Allow fractional value-axis ticks. Default: auto — `false` when every series\n * value is an integer (count data → no `0.25` ticks), `true` otherwise. Pass\n * explicitly to override the auto-detection.\n */\n allowDecimals?: boolean;\n /**\n * Format the category label in the tooltip. Defaults to `xTickFormatter` so the\n * tooltip matches the axis (e.g. both show `18 jun`, not the raw `2026-06-18`).\n */\n tooltipLabelFormatter?: (value: string) => string;\n}\n\nconst DEFAULT_X_INTERVAL: AxisInterval = 'preserveStartEnd';\n\n// Recharts XAxis/YAxis are `any`-typed (structural mirror), so tick controls go\n// in as a spread. `rotate` is off when the category axis is the Y axis\n// (horizontal bars: those labels are already horizontal).\nfunction categoryTickProps(\n opts: Pick<CartesianChartProps, 'xTickFormatter' | 'xTickInterval' | 'xTickAngle'>,\n rotate = true,\n): Record<string, unknown> {\n const props: Record<string, unknown> = { interval: opts.xTickInterval ?? DEFAULT_X_INTERVAL };\n if (opts.xTickFormatter) props.tickFormatter = opts.xTickFormatter;\n if (rotate && opts.xTickAngle) {\n props.angle = opts.xTickAngle;\n props.textAnchor = 'end';\n props.height = 56; // reserve room so the rotated label isn't clipped\n }\n return props;\n}\n\n// Value axis: `allowDecimals` (count data → integer-only ticks) + optional\n// numeric tick formatter.\nfunction valueAxisProps(valueFormatter: ((v: number) => string) | undefined, allowDecimals: boolean): Record<string, unknown> {\n const props: Record<string, unknown> = { allowDecimals };\n if (valueFormatter) props.tickFormatter = (v: number) => valueFormatter(Number(v));\n return props;\n}\n\n// Tooltip box style: the kit chrome + a width cap with wrapping so long content\n// (long labels / many series) doesn't overflow a narrow chart. `min(220px, 90vw)`\n// stays inside on mobile and caps to 220px on desktop.\nconst TOOLTIP_BASE_STYLE = { background: 'var(--bg-surface)', border: '1px solid var(--border-default)', borderRadius: 8, fontSize: 12 } as const;\n\nfunction tooltipContentStyle(tooltip?: ChartTooltipConfig): Record<string, unknown> {\n return { ...TOOLTIP_BASE_STYLE, maxWidth: tooltip?.maxWidth ?? 'min(220px, 90vw)', whiteSpace: 'normal' };\n}\n\nfunction tooltipChrome(tooltip?: ChartTooltipConfig): Record<string, unknown> {\n return tooltip?.allowEscapeViewBox ? { allowEscapeViewBox: tooltip.allowEscapeViewBox } : {};\n}\n\n// Tooltip: value formatter + a category-label formatter that defaults to the\n// axis tick formatter (so the hovered label matches the axis).\nfunction tooltipProps(\n valueFormatter: ((v: number) => string) | undefined,\n tooltipLabelFormatter: ((v: string) => string) | undefined,\n xTickFormatter: ((v: string) => string) | undefined,\n): Record<string, unknown> {\n const props: Record<string, unknown> = {};\n if (valueFormatter) props.formatter = (v: unknown) => valueFormatter(Number(v));\n const labelFormatter = tooltipLabelFormatter ?? xTickFormatter;\n if (labelFormatter) props.labelFormatter = (v: unknown) => labelFormatter(String(v));\n return props;\n}\n\n// True when every plotted value is an integer → drives the `allowDecimals` auto-\n// detection (count series shouldn't get `0.25`-style ticks).\nfunction allIntegerValues<D>(data: D[], keys: string[]): boolean {\n for (const row of data) {\n for (const k of keys) {\n const v = (row as Record<string, unknown>)[k];\n if (typeof v === 'number' && Number.isFinite(v) && !Number.isInteger(v)) return false;\n }\n }\n return true;\n}\n\n// ---------- LineChart ---------------------------------------------------\nexport interface LineChartProps<D = any> extends CartesianChartProps<D> {\n smooth?: boolean;\n /** Interpolation. `monotone` smooths (default, back-compat); `linear` draws honest\n * straight segments — recommended for counts/stepped series (no phantom humps over zeros). */\n curve?: 'linear' | 'monotone';\n}\n\nexport function LineChart<D = any>({\n recharts: R, data, categoryKey, series,\n height = 280, className, ariaLabel,\n showGrid = true, showLegend = true, smooth = true, curve,\n xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, accessibilityLayer = true,\n}: LineChartProps<D>) {\n const lineType = curve ?? (smooth ? 'monotone' : 'linear');\n const allowDec = allowDecimals ?? !allIntegerValues(data, series.map((s) => s.key));\n return (\n <div className={cx('chart', className)} role=\"img\" aria-label={ariaLabel}>\n <R.ResponsiveContainer width=\"100%\" height={height}>\n <R.LineChart data={data} accessibilityLayer={accessibilityLayer} margin={{ top: 8, right: 16, bottom: 0, left: 0 }}>\n {showGrid && <R.CartesianGrid stroke=\"var(--border-default)\" strokeDasharray=\"3 3\" vertical={false} />}\n <R.XAxis dataKey={categoryKey} stroke=\"var(--fg-subtle)\" fontSize={12} tickLine={false} axisLine={false} {...categoryTickProps({ xTickFormatter, xTickInterval, xTickAngle })} />\n <R.YAxis stroke=\"var(--fg-subtle)\" fontSize={12} tickLine={false} axisLine={false} {...valueAxisProps(valueFormatter, allowDec)} />\n <R.Tooltip contentStyle={tooltipContentStyle(tooltip)} {...tooltipChrome(tooltip)} {...tooltipProps(valueFormatter, tooltipLabelFormatter, xTickFormatter)} />\n {showLegend && <R.Legend wrapperStyle={{ fontSize: 12 }} />}\n {series.map((s, i) => (\n <R.Line\n key={s.key}\n type={lineType}\n dataKey={s.key}\n name={s.label ?? s.key}\n stroke={s.color ?? PALETTE[i % PALETTE.length]}\n strokeWidth={2}\n dot={false}\n activeDot={{ r: 4 }}\n />\n ))}\n </R.LineChart>\n </R.ResponsiveContainer>\n </div>\n );\n}\n\n// ---------- AreaChart ---------------------------------------------------\nexport interface AreaChartProps<D = any> extends LineChartProps<D> {\n stacked?: boolean;\n}\n\nexport function AreaChart<D = any>({\n recharts: R, data, categoryKey, series,\n height = 280, className, ariaLabel,\n showGrid = true, showLegend = true, smooth = true, curve, stacked,\n xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, accessibilityLayer = true,\n}: AreaChartProps<D>) {\n const lineType = curve ?? (smooth ? 'monotone' : 'linear');\n const allowDec = allowDecimals ?? !allIntegerValues(data, series.map((s) => s.key));\n return (\n <div className={cx('chart', className)} role=\"img\" aria-label={ariaLabel}>\n <R.ResponsiveContainer width=\"100%\" height={height}>\n <R.AreaChart data={data} accessibilityLayer={accessibilityLayer} margin={{ top: 8, right: 16, bottom: 0, left: 0 }}>\n {showGrid && <R.CartesianGrid stroke=\"var(--border-default)\" strokeDasharray=\"3 3\" vertical={false} />}\n <R.XAxis dataKey={categoryKey} stroke=\"var(--fg-subtle)\" fontSize={12} tickLine={false} axisLine={false} {...categoryTickProps({ xTickFormatter, xTickInterval, xTickAngle })} />\n <R.YAxis stroke=\"var(--fg-subtle)\" fontSize={12} tickLine={false} axisLine={false} {...valueAxisProps(valueFormatter, allowDec)} />\n <R.Tooltip contentStyle={tooltipContentStyle(tooltip)} {...tooltipChrome(tooltip)} {...tooltipProps(valueFormatter, tooltipLabelFormatter, xTickFormatter)} />\n {showLegend && <R.Legend wrapperStyle={{ fontSize: 12 }} />}\n {series.map((s, i) => (\n <R.Area\n key={s.key}\n type={lineType}\n dataKey={s.key}\n name={s.label ?? s.key}\n stackId={stacked ? '1' : undefined}\n stroke={s.color ?? PALETTE[i % PALETTE.length]}\n fill={s.color ?? PALETTE[i % PALETTE.length]}\n fillOpacity={0.18}\n strokeWidth={2}\n />\n ))}\n </R.AreaChart>\n </R.ResponsiveContainer>\n </div>\n );\n}\n\n// ---------- BarChart ----------------------------------------------------\nexport interface BarChartProps<D = any> extends CartesianChartProps<D> {\n layout?: 'vertical' | 'horizontal';\n stacked?: boolean;\n}\n\nconst BAR_RADIUS = 4;\n\nexport function BarChart<D = any>({\n recharts: R, data, categoryKey, series,\n height = 280, className, ariaLabel,\n layout = 'vertical', stacked, showGrid = true, showLegend = true,\n xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, accessibilityLayer = true,\n}: BarChartProps<D>) {\n const isHorizontal = layout === 'horizontal';\n const allowDec = allowDecimals ?? !allIntegerValues(data, series.map((s) => s.key));\n // Radius must round the VALUE end: top for columns ([tl,tr,br,bl] → [R,R,0,0]),\n // right for horizontal bars ([0,R,R,0]). The old hardcoded [4,4,0,0] left\n // horizontal bars rounded-top / pointed-bottom.\n const endRadius = isHorizontal ? [0, BAR_RADIUS, BAR_RADIUS, 0] : [BAR_RADIUS, BAR_RADIUS, 0, 0];\n const lastIdx = series.length - 1;\n const catTicks = categoryTickProps({ xTickFormatter, xTickInterval, xTickAngle });\n const catTicksNoRotate = categoryTickProps({ xTickFormatter, xTickInterval, xTickAngle }, false);\n return (\n <div className={cx('chart', className)} role=\"img\" aria-label={ariaLabel}>\n <R.ResponsiveContainer width=\"100%\" height={height}>\n <R.BarChart data={data} accessibilityLayer={accessibilityLayer} layout={isHorizontal ? 'vertical' : 'horizontal'} margin={{ top: 8, right: 16, bottom: 0, left: 0 }}>\n {showGrid && <R.CartesianGrid stroke=\"var(--border-default)\" strokeDasharray=\"3 3\" vertical={isHorizontal} horizontal={!isHorizontal} />}\n {isHorizontal ? (\n <>\n <R.XAxis type=\"number\" stroke=\"var(--fg-subtle)\" fontSize={12} tickLine={false} axisLine={false} {...valueAxisProps(valueFormatter, allowDec)} />\n <R.YAxis dataKey={categoryKey} type=\"category\" stroke=\"var(--fg-subtle)\" fontSize={12} tickLine={false} axisLine={false} width={96} {...catTicksNoRotate} />\n </>\n ) : (\n <>\n <R.XAxis dataKey={categoryKey} stroke=\"var(--fg-subtle)\" fontSize={12} tickLine={false} axisLine={false} {...catTicks} />\n <R.YAxis stroke=\"var(--fg-subtle)\" fontSize={12} tickLine={false} axisLine={false} {...valueAxisProps(valueFormatter, allowDec)} />\n </>\n )}\n <R.Tooltip contentStyle={tooltipContentStyle(tooltip)} {...tooltipChrome(tooltip)} cursor={{ fill: 'var(--bg-subtle)' }} {...tooltipProps(valueFormatter, tooltipLabelFormatter, xTickFormatter)} />\n {showLegend && <R.Legend wrapperStyle={{ fontSize: 12 }} />}\n {series.map((s, i) => {\n // Stacked: only the outermost (last) segment carries the end radius;\n // inner segments stay square so the stack reads as one bar.\n const barRadius = stacked ? (i === lastIdx ? endRadius : [0, 0, 0, 0]) : endRadius;\n return (\n <R.Bar\n key={s.key}\n dataKey={s.key}\n name={s.label ?? s.key}\n stackId={stacked ? '1' : undefined}\n fill={s.color ?? PALETTE[i % PALETTE.length]}\n radius={barRadius}\n maxBarSize={48}\n />\n );\n })}\n </R.BarChart>\n </R.ResponsiveContainer>\n </div>\n );\n}\n\n// ---------- DonutChart --------------------------------------------------\nexport interface DonutChartProps extends Omit<BaseChartProps, 'data'> {\n data: Array<{ name: string; value: number; color?: string }>;\n centerLabel?: React.ReactNode;\n showLegend?: boolean;\n innerRadius?: number;\n outerRadius?: number;\n /** Format slice names in tooltip + legend, e.g. `V_REGION` → `V Región` (no need to pre-map the data). */\n nameFormatter?: (name: string) => string;\n /** Format slice values in the tooltip. */\n valueFormatter?: (value: number) => string;\n}\n\nexport function DonutChart({\n recharts: R, data, height = 240, className, ariaLabel,\n centerLabel, showLegend = true, innerRadius = 60, outerRadius = 88,\n nameFormatter, valueFormatter, tooltip, accessibilityLayer = true,\n}: DonutChartProps) {\n // Recharts Tooltip formatter returns [formattedValue, formattedName].\n const tooltipProps = (nameFormatter || valueFormatter)\n ? { formatter: (v: unknown, n: unknown) => [valueFormatter ? valueFormatter(Number(v)) : v, nameFormatter ? nameFormatter(String(n)) : n] }\n : {};\n return (\n <div className={cx('chart chart--donut', className)} role=\"img\" aria-label={ariaLabel}>\n <div className=\"chart__donut-area\" style={{ height }}>\n <R.ResponsiveContainer width=\"100%\" height=\"100%\">\n <R.PieChart accessibilityLayer={accessibilityLayer}>\n <R.Tooltip contentStyle={tooltipContentStyle(tooltip)} {...tooltipChrome(tooltip)} {...tooltipProps} />\n <R.Pie\n data={data}\n dataKey=\"value\"\n nameKey=\"name\"\n innerRadius={innerRadius}\n outerRadius={outerRadius}\n paddingAngle={2}\n stroke=\"var(--bg-surface)\"\n >\n {data.map((d, i) => <R.Cell key={i} fill={d.color ?? PALETTE[i % PALETTE.length]} />)}\n </R.Pie>\n </R.PieChart>\n </R.ResponsiveContainer>\n {centerLabel && <div className=\"chart__center\">{centerLabel}</div>}\n </div>\n {showLegend && (\n <ul className=\"chart__legend\" aria-hidden=\"true\">\n {data.map((d, i) => (\n <li key={d.name} className=\"chart__legend-item\">\n <span\n className=\"chart__legend-swatch\"\n style={{ background: d.color ?? PALETTE[i % PALETTE.length] }}\n />\n <span className=\"chart__legend-label\">{nameFormatter ? nameFormatter(d.name) : d.name}</span>\n </li>\n ))}\n </ul>\n )}\n </div>\n );\n}\n\n// ---------- Sparkline ---------------------------------------------------\nexport interface SparklineProps<D = any> {\n recharts: RechartsLike;\n data: D[];\n dataKey: keyof D & string;\n width?: number;\n height?: number;\n color?: string;\n fill?: boolean;\n /**\n * Show a hover dot. Default `false` — a sparkline is glanceable/non-interactive\n * (the fine detail lives in the big LineChart). When off there's no active dot\n * to clip at the edges/base; when on, the margins are widened so it isn't cut.\n */\n interactive?: boolean;\n /** Tooltip sizing/positioning (only used when `interactive`). */\n tooltip?: ChartTooltipConfig;\n className?: string;\n ariaLabel?: string;\n}\n\nexport function Sparkline<D = any>({\n recharts: R, data, dataKey,\n width = 120, height = 32, color = 'var(--color-primary)',\n fill = true, interactive = false, tooltip, className, ariaLabel,\n}: SparklineProps<D>) {\n // No hover dot by default (it clips against the tiny margins at the first/last\n // point and the baseline). When interactive, leave room so it can't be cut off.\n const margin = interactive ? { top: 4, right: 4, bottom: 4, left: 4 } : { top: 2, right: 0, bottom: 2, left: 0 };\n return (\n <div className={cx('sparkline', interactive && 'sparkline--interactive', className)} role=\"img\" aria-label={ariaLabel} style={{ width, height }}>\n <R.ResponsiveContainer width=\"100%\" height=\"100%\">\n <R.AreaChart data={data} accessibilityLayer={interactive} margin={margin}>\n {interactive && <R.Tooltip contentStyle={tooltipContentStyle(tooltip)} {...tooltipChrome(tooltip)} />}\n <R.Area\n type=\"monotone\"\n dataKey={dataKey}\n stroke={color}\n strokeWidth={1.5}\n fill={fill ? color : 'none'}\n fillOpacity={fill ? 0.18 : 0}\n isAnimationActive={false}\n activeDot={interactive ? { r: 2.5, strokeWidth: 0, fill: color } : false}\n />\n </R.AreaChart>\n </R.ResponsiveContainer>\n </div>\n );\n}\n"]}
|
|
@@ -56,6 +56,12 @@ interface BaseChartProps<D = any> {
|
|
|
56
56
|
ariaLabel?: string;
|
|
57
57
|
/** Tooltip sizing/positioning. By default the tooltip caps its width and wraps. */
|
|
58
58
|
tooltip?: ChartTooltipConfig;
|
|
59
|
+
/**
|
|
60
|
+
* recharts' keyboard-navigation layer (puts `tabindex=0` on the svg + arrow-key
|
|
61
|
+
* navigation). Default `true`. Set `false` for a non-actionable chart so it's
|
|
62
|
+
* not a Tab stop / not focusable (no drill-down → nothing to navigate to).
|
|
63
|
+
*/
|
|
64
|
+
accessibilityLayer?: boolean;
|
|
59
65
|
}
|
|
60
66
|
type AxisInterval = number | 'preserveStart' | 'preserveEnd' | 'preserveStartEnd' | 'equidistantPreserveStart' | 'equidistantPreserveEnd';
|
|
61
67
|
interface CartesianChartProps<D = any> extends BaseChartProps<D> {
|
|
@@ -93,16 +99,16 @@ interface LineChartProps<D = any> extends CartesianChartProps<D> {
|
|
|
93
99
|
* straight segments — recommended for counts/stepped series (no phantom humps over zeros). */
|
|
94
100
|
curve?: 'linear' | 'monotone';
|
|
95
101
|
}
|
|
96
|
-
declare function LineChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, showGrid, showLegend, smooth, curve, xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, }: LineChartProps<D>): react_jsx_runtime.JSX.Element;
|
|
102
|
+
declare function LineChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, showGrid, showLegend, smooth, curve, xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, accessibilityLayer, }: LineChartProps<D>): react_jsx_runtime.JSX.Element;
|
|
97
103
|
interface AreaChartProps<D = any> extends LineChartProps<D> {
|
|
98
104
|
stacked?: boolean;
|
|
99
105
|
}
|
|
100
|
-
declare function AreaChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, showGrid, showLegend, smooth, curve, stacked, xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, }: AreaChartProps<D>): react_jsx_runtime.JSX.Element;
|
|
106
|
+
declare function AreaChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, showGrid, showLegend, smooth, curve, stacked, xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, accessibilityLayer, }: AreaChartProps<D>): react_jsx_runtime.JSX.Element;
|
|
101
107
|
interface BarChartProps<D = any> extends CartesianChartProps<D> {
|
|
102
108
|
layout?: 'vertical' | 'horizontal';
|
|
103
109
|
stacked?: boolean;
|
|
104
110
|
}
|
|
105
|
-
declare function BarChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, layout, stacked, showGrid, showLegend, xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, }: BarChartProps<D>): react_jsx_runtime.JSX.Element;
|
|
111
|
+
declare function BarChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, layout, stacked, showGrid, showLegend, xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, accessibilityLayer, }: BarChartProps<D>): react_jsx_runtime.JSX.Element;
|
|
106
112
|
interface DonutChartProps extends Omit<BaseChartProps, 'data'> {
|
|
107
113
|
data: Array<{
|
|
108
114
|
name: string;
|
|
@@ -118,7 +124,7 @@ interface DonutChartProps extends Omit<BaseChartProps, 'data'> {
|
|
|
118
124
|
/** Format slice values in the tooltip. */
|
|
119
125
|
valueFormatter?: (value: number) => string;
|
|
120
126
|
}
|
|
121
|
-
declare function DonutChart({ recharts: R, data, height, className, ariaLabel, centerLabel, showLegend, innerRadius, outerRadius, nameFormatter, valueFormatter, tooltip, }: DonutChartProps): react_jsx_runtime.JSX.Element;
|
|
127
|
+
declare function DonutChart({ recharts: R, data, height, className, ariaLabel, centerLabel, showLegend, innerRadius, outerRadius, nameFormatter, valueFormatter, tooltip, accessibilityLayer, }: DonutChartProps): react_jsx_runtime.JSX.Element;
|
|
122
128
|
interface SparklineProps<D = any> {
|
|
123
129
|
recharts: RechartsLike;
|
|
124
130
|
data: D[];
|
|
@@ -56,6 +56,12 @@ interface BaseChartProps<D = any> {
|
|
|
56
56
|
ariaLabel?: string;
|
|
57
57
|
/** Tooltip sizing/positioning. By default the tooltip caps its width and wraps. */
|
|
58
58
|
tooltip?: ChartTooltipConfig;
|
|
59
|
+
/**
|
|
60
|
+
* recharts' keyboard-navigation layer (puts `tabindex=0` on the svg + arrow-key
|
|
61
|
+
* navigation). Default `true`. Set `false` for a non-actionable chart so it's
|
|
62
|
+
* not a Tab stop / not focusable (no drill-down → nothing to navigate to).
|
|
63
|
+
*/
|
|
64
|
+
accessibilityLayer?: boolean;
|
|
59
65
|
}
|
|
60
66
|
type AxisInterval = number | 'preserveStart' | 'preserveEnd' | 'preserveStartEnd' | 'equidistantPreserveStart' | 'equidistantPreserveEnd';
|
|
61
67
|
interface CartesianChartProps<D = any> extends BaseChartProps<D> {
|
|
@@ -93,16 +99,16 @@ interface LineChartProps<D = any> extends CartesianChartProps<D> {
|
|
|
93
99
|
* straight segments — recommended for counts/stepped series (no phantom humps over zeros). */
|
|
94
100
|
curve?: 'linear' | 'monotone';
|
|
95
101
|
}
|
|
96
|
-
declare function LineChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, showGrid, showLegend, smooth, curve, xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, }: LineChartProps<D>): react_jsx_runtime.JSX.Element;
|
|
102
|
+
declare function LineChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, showGrid, showLegend, smooth, curve, xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, accessibilityLayer, }: LineChartProps<D>): react_jsx_runtime.JSX.Element;
|
|
97
103
|
interface AreaChartProps<D = any> extends LineChartProps<D> {
|
|
98
104
|
stacked?: boolean;
|
|
99
105
|
}
|
|
100
|
-
declare function AreaChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, showGrid, showLegend, smooth, curve, stacked, xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, }: AreaChartProps<D>): react_jsx_runtime.JSX.Element;
|
|
106
|
+
declare function AreaChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, showGrid, showLegend, smooth, curve, stacked, xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, accessibilityLayer, }: AreaChartProps<D>): react_jsx_runtime.JSX.Element;
|
|
101
107
|
interface BarChartProps<D = any> extends CartesianChartProps<D> {
|
|
102
108
|
layout?: 'vertical' | 'horizontal';
|
|
103
109
|
stacked?: boolean;
|
|
104
110
|
}
|
|
105
|
-
declare function BarChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, layout, stacked, showGrid, showLegend, xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, }: BarChartProps<D>): react_jsx_runtime.JSX.Element;
|
|
111
|
+
declare function BarChart<D = any>({ recharts: R, data, categoryKey, series, height, className, ariaLabel, layout, stacked, showGrid, showLegend, xTickFormatter, xTickInterval, xTickAngle, valueFormatter, allowDecimals, tooltipLabelFormatter, tooltip, accessibilityLayer, }: BarChartProps<D>): react_jsx_runtime.JSX.Element;
|
|
106
112
|
interface DonutChartProps extends Omit<BaseChartProps, 'data'> {
|
|
107
113
|
data: Array<{
|
|
108
114
|
name: string;
|
|
@@ -118,7 +124,7 @@ interface DonutChartProps extends Omit<BaseChartProps, 'data'> {
|
|
|
118
124
|
/** Format slice values in the tooltip. */
|
|
119
125
|
valueFormatter?: (value: number) => string;
|
|
120
126
|
}
|
|
121
|
-
declare function DonutChart({ recharts: R, data, height, className, ariaLabel, centerLabel, showLegend, innerRadius, outerRadius, nameFormatter, valueFormatter, tooltip, }: DonutChartProps): react_jsx_runtime.JSX.Element;
|
|
127
|
+
declare function DonutChart({ recharts: R, data, height, className, ariaLabel, centerLabel, showLegend, innerRadius, outerRadius, nameFormatter, valueFormatter, tooltip, accessibilityLayer, }: DonutChartProps): react_jsx_runtime.JSX.Element;
|
|
122
128
|
interface SparklineProps<D = any> {
|
|
123
129
|
recharts: RechartsLike;
|
|
124
130
|
data: D[];
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkCP6DXFGZ_js = require('../chunk-CP6DXFGZ.js');
|
|
5
5
|
require('../chunk-PASF6T4H.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "AreaChart", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkCP6DXFGZ_js.AreaChart; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "BarChart", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkCP6DXFGZ_js.BarChart; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "DonutChart", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkCP6DXFGZ_js.DonutChart; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "LineChart", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkCP6DXFGZ_js.LineChart; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "Sparkline", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkCP6DXFGZ_js.Sparkline; }
|
|
28
28
|
});
|
|
29
29
|
//# sourceMappingURL=Charts.js.map
|
|
30
30
|
//# sourceMappingURL=Charts.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { AreaChart, BarChart, DonutChart, LineChart, Sparkline } from '../chunk-
|
|
2
|
+
export { AreaChart, BarChart, DonutChart, LineChart, Sparkline } from '../chunk-JTSSM4NE.mjs';
|
|
3
3
|
import '../chunk-IEPCH3JB.mjs';
|
|
4
4
|
//# sourceMappingURL=Charts.mjs.map
|
|
5
5
|
//# sourceMappingURL=Charts.mjs.map
|
package/dist/index.js
CHANGED
|
@@ -56,7 +56,7 @@ var chunkAJ22SXI2_js = require('./chunk-AJ22SXI2.js');
|
|
|
56
56
|
var chunkEUB4PHPI_js = require('./chunk-EUB4PHPI.js');
|
|
57
57
|
var chunkGGILBESE_js = require('./chunk-GGILBESE.js');
|
|
58
58
|
var chunkC4AKMVDZ_js = require('./chunk-C4AKMVDZ.js');
|
|
59
|
-
var
|
|
59
|
+
var chunkCP6DXFGZ_js = require('./chunk-CP6DXFGZ.js');
|
|
60
60
|
var chunkPASF6T4H_js = require('./chunk-PASF6T4H.js');
|
|
61
61
|
|
|
62
62
|
|
|
@@ -1111,23 +1111,23 @@ Object.defineProperty(exports, "X", {
|
|
|
1111
1111
|
});
|
|
1112
1112
|
Object.defineProperty(exports, "AreaChart", {
|
|
1113
1113
|
enumerable: true,
|
|
1114
|
-
get: function () { return
|
|
1114
|
+
get: function () { return chunkCP6DXFGZ_js.AreaChart; }
|
|
1115
1115
|
});
|
|
1116
1116
|
Object.defineProperty(exports, "BarChart", {
|
|
1117
1117
|
enumerable: true,
|
|
1118
|
-
get: function () { return
|
|
1118
|
+
get: function () { return chunkCP6DXFGZ_js.BarChart; }
|
|
1119
1119
|
});
|
|
1120
1120
|
Object.defineProperty(exports, "DonutChart", {
|
|
1121
1121
|
enumerable: true,
|
|
1122
|
-
get: function () { return
|
|
1122
|
+
get: function () { return chunkCP6DXFGZ_js.DonutChart; }
|
|
1123
1123
|
});
|
|
1124
1124
|
Object.defineProperty(exports, "LineChart", {
|
|
1125
1125
|
enumerable: true,
|
|
1126
|
-
get: function () { return
|
|
1126
|
+
get: function () { return chunkCP6DXFGZ_js.LineChart; }
|
|
1127
1127
|
});
|
|
1128
1128
|
Object.defineProperty(exports, "Sparkline", {
|
|
1129
1129
|
enumerable: true,
|
|
1130
|
-
get: function () { return
|
|
1130
|
+
get: function () { return chunkCP6DXFGZ_js.Sparkline; }
|
|
1131
1131
|
});
|
|
1132
1132
|
Object.defineProperty(exports, "cx", {
|
|
1133
1133
|
enumerable: true,
|
package/dist/index.mjs
CHANGED
|
@@ -54,7 +54,7 @@ export { Button, ButtonGroup } from './chunk-NAL457NQ.mjs';
|
|
|
54
54
|
export { AspectRatio, ScrollArea, Separator, Slot, Slottable } from './chunk-IEPKSPBX.mjs';
|
|
55
55
|
export { Carousel } from './chunk-VXJTDBSM.mjs';
|
|
56
56
|
export { AlertCircle, AlertTriangle, AlignCenter, AlignLeft, AlignRight, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Bell, Bold, Building, CalendarDays, CalendarIcon, Check, CheckCircle, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Clock, Columns3, Copy, CreditCard, Download, Edit, ExternalLink, Eye, EyeOff, FileText, Filter, Folder, Globe, Heart, History, Home, Info, Italic, LayoutGrid, Link, List, Loader, Lock, LogOut, Mail, Map, MapPin, MenuIcon, Minus, Moon, MoreHorizontal, MoreVertical, Package, Phone, Plus, RefreshCw, Rows3, Search, Settings, ShoppingCart, Star, Sun, Tag, Tool, Trash, Truck, Underline, Unlock, Upload, User, Users, Wallet, Wrench, X } from './chunk-BJGMROKL.mjs';
|
|
57
|
-
export { AreaChart, BarChart, DonutChart, LineChart, Sparkline } from './chunk-
|
|
57
|
+
export { AreaChart, BarChart, DonutChart, LineChart, Sparkline } from './chunk-JTSSM4NE.mjs';
|
|
58
58
|
export { cx } from './chunk-IEPCH3JB.mjs';
|
|
59
59
|
//# sourceMappingURL=index.mjs.map
|
|
60
60
|
//# sourceMappingURL=index.mjs.map
|