@rendra-ui/web 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +433 -0
  3. package/bin/rendra.mjs +114 -0
  4. package/dist/base.css +246 -0
  5. package/dist/button-DIcpJwK9.js +143 -0
  6. package/dist/button-DIcpJwK9.js.map +1 -0
  7. package/dist/chart.js +520 -0
  8. package/dist/chart.js.map +1 -0
  9. package/dist/cli/auditar.js +125 -0
  10. package/dist/cli/auditar.js.map +1 -0
  11. package/dist/cli/codigos.js +15 -0
  12. package/dist/cli/codigos.js.map +1 -0
  13. package/dist/cli/help.js +17 -0
  14. package/dist/cli/help.js.map +1 -0
  15. package/dist/cli/trocar.js +242 -0
  16. package/dist/cli/trocar.js.map +1 -0
  17. package/dist/cli/typescript-loader.js +27 -0
  18. package/dist/cli/typescript-loader.js.map +1 -0
  19. package/dist/cn-DVPheE99.js +22 -0
  20. package/dist/cn-DVPheE99.js.map +1 -0
  21. package/dist/components-Cm2ezlPT.js +800 -0
  22. package/dist/components-Cm2ezlPT.js.map +1 -0
  23. package/dist/components.css +3365 -0
  24. package/dist/document-viewer.js +204 -0
  25. package/dist/document-viewer.js.map +1 -0
  26. package/dist/empty-state-DtyZAfYb.js +168 -0
  27. package/dist/empty-state-DtyZAfYb.js.map +1 -0
  28. package/dist/index.js +10530 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/rendra-provider-cCnquOZy.js +88 -0
  31. package/dist/rendra-provider-cCnquOZy.js.map +1 -0
  32. package/dist/rich-text-editor.js +439 -0
  33. package/dist/rich-text-editor.js.map +1 -0
  34. package/dist/router-bridge.js +51 -0
  35. package/dist/router-bridge.js.map +1 -0
  36. package/dist/tokens.css +732 -0
  37. package/dist/tooltip-DyeuGPCc.js +105 -0
  38. package/dist/tooltip-DyeuGPCc.js.map +1 -0
  39. package/dist/types/brand/apply-theme.d.ts +9 -0
  40. package/dist/types/brand/brand-context.d.ts +21 -0
  41. package/dist/types/brand/brand-provider.d.ts +49 -0
  42. package/dist/types/brand/palette.d.ts +63 -0
  43. package/dist/types/brand/public.d.ts +6 -0
  44. package/dist/types/brand/theme.d.ts +80 -0
  45. package/dist/types/brand/types.d.ts +54 -0
  46. package/dist/types/brand/use-brand.d.ts +1 -0
  47. package/dist/types/catalog/components.d.ts +81 -0
  48. package/dist/types/chart.d.ts +1 -0
  49. package/dist/types/components/app-shell/app-shell.d.ts +36 -0
  50. package/dist/types/components/app-shell/command-search.d.ts +1 -0
  51. package/dist/types/components/app-shell/header.d.ts +1 -0
  52. package/dist/types/components/app-shell/layout.d.ts +53 -0
  53. package/dist/types/components/app-shell/mega-menu.d.ts +1 -0
  54. package/dist/types/components/app-shell/navigation-utils.d.ts +18 -0
  55. package/dist/types/components/app-shell/notifications.d.ts +6 -0
  56. package/dist/types/components/app-shell/shell-context.d.ts +48 -0
  57. package/dist/types/components/app-shell/sidebar.d.ts +1 -0
  58. package/dist/types/components/app-shell/types.d.ts +53 -0
  59. package/dist/types/components/layout/index.d.ts +4 -0
  60. package/dist/types/components/layout/page-header.d.ts +38 -0
  61. package/dist/types/components/layout/primitives.d.ts +71 -0
  62. package/dist/types/components/layout/tokens.d.ts +43 -0
  63. package/dist/types/components/rendra-provider.d.ts +48 -0
  64. package/dist/types/components/rendra-router-bridge.d.ts +18 -0
  65. package/dist/types/components/ui/accordion.d.ts +16 -0
  66. package/dist/types/components/ui/action-bar.d.ts +35 -0
  67. package/dist/types/components/ui/alert.d.ts +26 -0
  68. package/dist/types/components/ui/avatar.d.ts +23 -0
  69. package/dist/types/components/ui/badge.d.ts +15 -0
  70. package/dist/types/components/ui/brand-feedback-icon.d.ts +26 -0
  71. package/dist/types/components/ui/brand-logo.d.ts +8 -0
  72. package/dist/types/components/ui/breadcrumb.d.ts +19 -0
  73. package/dist/types/components/ui/button-group.d.ts +27 -0
  74. package/dist/types/components/ui/button.d.ts +30 -0
  75. package/dist/types/components/ui/calendar.d.ts +34 -0
  76. package/dist/types/components/ui/card.d.ts +32 -0
  77. package/dist/types/components/ui/chart.d.ts +57 -0
  78. package/dist/types/components/ui/chat.d.ts +137 -0
  79. package/dist/types/components/ui/checkbox.d.ts +37 -0
  80. package/dist/types/components/ui/checklist.d.ts +16 -0
  81. package/dist/types/components/ui/color-picker.d.ts +13 -0
  82. package/dist/types/components/ui/data-toolbar.d.ts +37 -0
  83. package/dist/types/components/ui/date-picker.d.ts +41 -0
  84. package/dist/types/components/ui/document-viewer.d.ts +19 -0
  85. package/dist/types/components/ui/drawer.d.ts +30 -0
  86. package/dist/types/components/ui/dropdown-menu.d.ts +20 -0
  87. package/dist/types/components/ui/empty-state.d.ts +15 -0
  88. package/dist/types/components/ui/error-page.d.ts +13 -0
  89. package/dist/types/components/ui/field.d.ts +42 -0
  90. package/dist/types/components/ui/form.d.ts +42 -0
  91. package/dist/types/components/ui/image-cropper.d.ts +55 -0
  92. package/dist/types/components/ui/image-viewer.d.ts +14 -0
  93. package/dist/types/components/ui/info-hint.d.ts +9 -0
  94. package/dist/types/components/ui/input.d.ts +91 -0
  95. package/dist/types/components/ui/kanban.d.ts +98 -0
  96. package/dist/types/components/ui/list.d.ts +31 -0
  97. package/dist/types/components/ui/modal.d.ts +27 -0
  98. package/dist/types/components/ui/otp-input.d.ts +17 -0
  99. package/dist/types/components/ui/overlay-shell.d.ts +14 -0
  100. package/dist/types/components/ui/pagination.d.ts +18 -0
  101. package/dist/types/components/ui/picker-panel.d.ts +24 -0
  102. package/dist/types/components/ui/popover.d.ts +12 -0
  103. package/dist/types/components/ui/progress.d.ts +16 -0
  104. package/dist/types/components/ui/qr-code.d.ts +13 -0
  105. package/dist/types/components/ui/radio-group.d.ts +27 -0
  106. package/dist/types/components/ui/rating.d.ts +19 -0
  107. package/dist/types/components/ui/rendra-credit.d.ts +12 -0
  108. package/dist/types/components/ui/repeatable-field.d.ts +22 -0
  109. package/dist/types/components/ui/rich-text-editor.d.ts +21 -0
  110. package/dist/types/components/ui/select.d.ts +65 -0
  111. package/dist/types/components/ui/separator.d.ts +7 -0
  112. package/dist/types/components/ui/skeleton.d.ts +3 -0
  113. package/dist/types/components/ui/slider.d.ts +18 -0
  114. package/dist/types/components/ui/sortable-handle.d.ts +16 -0
  115. package/dist/types/components/ui/spinner.d.ts +7 -0
  116. package/dist/types/components/ui/stat-card.d.ts +20 -0
  117. package/dist/types/components/ui/switch.d.ts +15 -0
  118. package/dist/types/components/ui/table.d.ts +134 -0
  119. package/dist/types/components/ui/tabs.d.ts +25 -0
  120. package/dist/types/components/ui/textarea.d.ts +10 -0
  121. package/dist/types/components/ui/timeline.d.ts +18 -0
  122. package/dist/types/components/ui/toast.d.ts +18 -0
  123. package/dist/types/components/ui/tooltip.d.ts +17 -0
  124. package/dist/types/components/ui/upload.d.ts +50 -0
  125. package/dist/types/components/ui/widget-grid.d.ts +22 -0
  126. package/dist/types/components/ui/wizard.d.ts +38 -0
  127. package/dist/types/document-viewer.d.ts +1 -0
  128. package/dist/types/hooks/use-breakpoint.d.ts +21 -0
  129. package/dist/types/hooks/use-debounced-value.d.ts +5 -0
  130. package/dist/types/hooks/use-fill-height.d.ts +6 -0
  131. package/dist/types/hooks/use-lookup.d.ts +30 -0
  132. package/dist/types/hooks/use-reduced-motion.d.ts +1 -0
  133. package/dist/types/index.d.ts +76 -0
  134. package/dist/types/lib/cn.d.ts +2 -0
  135. package/dist/types/lib/contrast.d.ts +2 -0
  136. package/dist/types/lib/control.d.ts +20 -0
  137. package/dist/types/lib/lookup.d.ts +22 -0
  138. package/dist/types/lib/masks.d.ts +46 -0
  139. package/dist/types/lib/qr-encode.d.ts +48 -0
  140. package/dist/types/lib/shape.d.ts +8 -0
  141. package/dist/types/lib/sortable.d.ts +72 -0
  142. package/dist/types/lib/validators.d.ts +14 -0
  143. package/dist/types/rendra-router-bridge.d.ts +1 -0
  144. package/dist/types/rich-text-editor.d.ts +1 -0
  145. package/dist/types/widget-grid.d.ts +1 -0
  146. package/dist/use-breakpoint-BmXOZtF9.js +49 -0
  147. package/dist/use-breakpoint-BmXOZtF9.js.map +1 -0
  148. package/dist/widget-grid.js +118 -0
  149. package/dist/widget-grid.js.map +1 -0
  150. package/package.json +182 -0
package/dist/chart.js ADDED
@@ -0,0 +1,520 @@
1
+ /*! Rendra Design System v2.1.0 | MIT | © 2026 Bruno Magalhaes | brunomagalhaes.me */
2
+ import { t as cn } from "./cn-DVPheE99.js";
3
+ import { p as resolveCatalogCode } from "./components-Cm2ezlPT.js";
4
+ import { t as Button } from "./button-DIcpJwK9.js";
5
+ import { n as useBreakpoint } from "./use-breakpoint-BmXOZtF9.js";
6
+ import { ArrowDown, BarChart3, List } from "lucide-react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { useId, useRef, useState } from "react";
9
+ import { Area, AreaChart, Bar, BarChart, CartesianGrid, Cell, ComposedChart, Legend, Line, LineChart, Pie, PieChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from "recharts";
10
+ //#region src/components/ui/chart.tsx
11
+ var palette = [
12
+ "--rendra-chart-1",
13
+ "--rendra-chart-2",
14
+ "--rendra-chart-3",
15
+ "--rendra-chart-4",
16
+ "--rendra-chart-5",
17
+ "--rendra-ring"
18
+ ];
19
+ var colorVar = (i) => `var(${palette[(i - 1) % palette.length]})`;
20
+ var fmtDefault = (n) => n.toLocaleString("pt-BR");
21
+ var pct = (n) => `${n.toLocaleString("pt-BR", {
22
+ minimumFractionDigits: 1,
23
+ maximumFractionDigits: 1
24
+ })}%`;
25
+ function Chart(props) {
26
+ if (props.type === "gauge") return /* @__PURE__ */ jsx(Gauge, { ...props });
27
+ if (props.type === "funnel") return /* @__PURE__ */ jsx(Funnel, { ...props });
28
+ return /* @__PURE__ */ jsx(Cartesian, { ...props });
29
+ }
30
+ var defaultZones = [
31
+ {
32
+ to: .6,
33
+ tone: "error"
34
+ },
35
+ {
36
+ to: .9,
37
+ tone: "warning"
38
+ },
39
+ {
40
+ to: 1,
41
+ tone: "success"
42
+ }
43
+ ];
44
+ var zoneBadge = {
45
+ error: "bg-destructive-soft text-destructive-soft-foreground",
46
+ warning: "bg-warning-soft text-warning-soft-foreground",
47
+ success: "bg-success-soft text-success-soft-foreground",
48
+ primary: "bg-primary-soft text-primary-soft-foreground",
49
+ neutral: "bg-muted text-foreground"
50
+ };
51
+ var zoneText = {
52
+ error: "Abaixo da meta",
53
+ warning: "Atenção",
54
+ success: "No verde",
55
+ primary: "Em andamento",
56
+ neutral: "Em andamento"
57
+ };
58
+ var CX = 120;
59
+ var CY = 120;
60
+ var R = 100;
61
+ var point = (frac, r = R) => {
62
+ const a = Math.PI * (1 - frac);
63
+ return [CX + r * Math.cos(a), CY - r * Math.sin(a)];
64
+ };
65
+ var arc = (from, to, r = R) => {
66
+ const [x1, y1] = point(from, r);
67
+ const [x2, y2] = point(to, r);
68
+ return `M ${x1.toFixed(2)} ${y1.toFixed(2)} A ${r} ${r} 0 0 1 ${x2.toFixed(2)} ${y2.toFixed(2)}`;
69
+ };
70
+ function Gauge({ value, max, min = 0, target, zones = defaultZones, label, valueFormatter = fmtDefault, className, ...aria }) {
71
+ const range = Math.max(1, max - min);
72
+ const clamp = (n) => Math.min(1, Math.max(0, n));
73
+ const reached = target ? value / target * 100 : null;
74
+ const frac = reached !== null ? clamp(reached / 100) : clamp((value - min) / range);
75
+ const tone = (zones.find((z) => frac <= z.to) ?? zones[zones.length - 1])?.tone ?? "primary";
76
+ const gradientId = useId();
77
+ const [ex, ey] = point(frac, 74);
78
+ return /* @__PURE__ */ jsxs("figure", {
79
+ "data-rendra": resolveCatalogCode("Chart", { type: "gauge" }),
80
+ className: cn("flex min-w-0 flex-col items-center gap-2", className),
81
+ "aria-label": aria["aria-label"],
82
+ children: [
83
+ /* @__PURE__ */ jsx("div", {
84
+ role: "meter",
85
+ "aria-valuemin": 0,
86
+ "aria-valuemax": 100,
87
+ "aria-valuenow": Math.round(frac * 100),
88
+ "aria-valuetext": `${reached !== null ? `${pct(reached)} da meta` : valueFormatter(value)}, ${zoneText[tone]}`,
89
+ "aria-label": aria["aria-label"],
90
+ className: "w-full max-w-xs",
91
+ children: /* @__PURE__ */ jsxs("svg", {
92
+ viewBox: "0 0 240 140",
93
+ className: "w-full",
94
+ "aria-hidden": true,
95
+ children: [
96
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", {
97
+ id: gradientId,
98
+ x1: "0",
99
+ y1: "0",
100
+ x2: "1",
101
+ y2: "0",
102
+ children: [
103
+ /* @__PURE__ */ jsx("stop", {
104
+ offset: "0%",
105
+ stopColor: "var(--rendra-meter-low)"
106
+ }),
107
+ /* @__PURE__ */ jsx("stop", {
108
+ offset: "38%",
109
+ stopColor: "color-mix(in oklab, var(--rendra-meter-low), var(--rendra-meter-mid))"
110
+ }),
111
+ /* @__PURE__ */ jsx("stop", {
112
+ offset: "62%",
113
+ stopColor: "var(--rendra-meter-mid)"
114
+ }),
115
+ /* @__PURE__ */ jsx("stop", {
116
+ offset: "100%",
117
+ stopColor: "var(--rendra-meter-high)"
118
+ })
119
+ ]
120
+ }) }),
121
+ /* @__PURE__ */ jsx("path", {
122
+ d: arc(0, 1),
123
+ fill: "none",
124
+ stroke: `url(#${gradientId})`,
125
+ strokeWidth: 20,
126
+ strokeLinecap: "round"
127
+ }),
128
+ /* @__PURE__ */ jsx("line", {
129
+ x1: CX,
130
+ y1: CY,
131
+ x2: ex,
132
+ y2: ey,
133
+ stroke: "var(--rendra-foreground)",
134
+ strokeWidth: 4,
135
+ strokeLinecap: "round",
136
+ className: "transition-all duration-700"
137
+ }),
138
+ /* @__PURE__ */ jsx("circle", {
139
+ cx: CX,
140
+ cy: CY,
141
+ r: 9,
142
+ fill: "var(--rendra-foreground)"
143
+ }),
144
+ /* @__PURE__ */ jsx("circle", {
145
+ cx: CX,
146
+ cy: CY,
147
+ r: 4,
148
+ fill: "var(--rendra-card)"
149
+ }),
150
+ /* @__PURE__ */ jsx("text", {
151
+ x: point(0)[0],
152
+ y: 138,
153
+ textAnchor: "middle",
154
+ fontSize: 11,
155
+ fill: "var(--rendra-muted-foreground)",
156
+ children: "0%"
157
+ }),
158
+ /* @__PURE__ */ jsx("text", {
159
+ x: point(1)[0],
160
+ y: 138,
161
+ textAnchor: "middle",
162
+ fontSize: 11,
163
+ fill: "var(--rendra-muted-foreground)",
164
+ children: "100%"
165
+ })
166
+ ]
167
+ })
168
+ }),
169
+ /* @__PURE__ */ jsxs("div", {
170
+ className: "flex flex-col items-center gap-1 text-center",
171
+ children: [
172
+ /* @__PURE__ */ jsx("span", {
173
+ className: "text-3xl font-semibold tabular-nums",
174
+ children: reached !== null ? `${Math.round(reached)}%` : valueFormatter(value)
175
+ }),
176
+ label && /* @__PURE__ */ jsx("span", {
177
+ className: "text-sm font-medium",
178
+ children: label
179
+ }),
180
+ target !== void 0 && /* @__PURE__ */ jsxs("span", {
181
+ className: "flex flex-col text-sm text-muted-foreground tabular-nums",
182
+ children: [/* @__PURE__ */ jsxs("span", { children: ["Meta: ", valueFormatter(target)] }), /* @__PURE__ */ jsxs("span", { children: ["Realizado: ", valueFormatter(value)] })]
183
+ }),
184
+ /* @__PURE__ */ jsx("span", {
185
+ className: cn("mt-1 rounded-full px-3 py-1 text-xs font-semibold", zoneBadge[tone]),
186
+ children: zoneText[tone]
187
+ })
188
+ ]
189
+ }),
190
+ /* @__PURE__ */ jsx("figcaption", {
191
+ className: "sr-only",
192
+ children: aria["aria-label"]
193
+ })
194
+ ]
195
+ });
196
+ }
197
+ function Funnel({ stages, valueFormatter = fmtDefault, className, ...aria }) {
198
+ const n = stages.length;
199
+ const top = stages[0]?.value || 1;
200
+ const last = stages[n - 1];
201
+ const width = (i) => 1 - i / Math.max(1, n) * .54;
202
+ const fill = (i) => {
203
+ return `color-mix(in oklab, color-mix(in oklab, var(--rendra-primary) ${n > 1 ? Math.round(100 - i / (n - 1) * 100) : 100}%, var(--rendra-success)) 58%, var(--rendra-sidebar))`;
204
+ };
205
+ const rates = stages.map((s, i) => {
206
+ const next = stages[i + 1];
207
+ return next && s.value > 0 ? next.value / s.value * 100 : null;
208
+ });
209
+ const worst = rates.reduce((w, r, i) => r !== null && (w === null || r < (rates[w] ?? Infinity)) ? i : w, null);
210
+ return /* @__PURE__ */ jsxs("figure", {
211
+ "data-rendra": resolveCatalogCode("Chart", { type: "funnel" }),
212
+ className: cn("flex min-w-0 flex-col items-center", className),
213
+ "aria-label": aria["aria-label"],
214
+ children: [
215
+ /* @__PURE__ */ jsx("ol", {
216
+ className: "flex w-full flex-col items-center",
217
+ children: stages.map((s, i) => {
218
+ const rate = rates[i];
219
+ return /* @__PURE__ */ jsxs("li", {
220
+ className: "flex w-full flex-col items-center",
221
+ children: [/* @__PURE__ */ jsxs("div", {
222
+ className: "flex h-16 w-full flex-col items-center justify-center bg-fill text-sidebar-foreground clip-trapezoid",
223
+ style: {
224
+ "--top": width(i).toFixed(4),
225
+ "--bottom": width(i + 1).toFixed(4),
226
+ "--fill": fill(i)
227
+ },
228
+ children: [/* @__PURE__ */ jsx("span", {
229
+ className: "text-lg leading-tight font-semibold tabular-nums",
230
+ children: valueFormatter(s.value)
231
+ }), /* @__PURE__ */ jsx("span", {
232
+ className: "text-xs",
233
+ children: s.label
234
+ })]
235
+ }), rate != null && /* @__PURE__ */ jsxs("p", {
236
+ className: "flex items-center gap-1 py-1 text-xs text-muted-foreground",
237
+ children: [
238
+ /* @__PURE__ */ jsx(ArrowDown, {
239
+ className: "size-3",
240
+ "aria-hidden": true
241
+ }),
242
+ /* @__PURE__ */ jsx("span", {
243
+ className: "font-semibold text-foreground tabular-nums",
244
+ children: pct(rate)
245
+ }),
246
+ /* @__PURE__ */ jsx("span", { children: "para a próxima etapa" }),
247
+ i === worst && n > 2 && /* @__PURE__ */ jsx("span", {
248
+ className: "font-semibold text-destructive-soft-foreground",
249
+ children: "· Maior queda"
250
+ })
251
+ ]
252
+ })]
253
+ }, s.label);
254
+ })
255
+ }),
256
+ n > 1 && last && /* @__PURE__ */ jsxs("p", {
257
+ className: "flex items-center gap-1 pt-2 text-sm text-muted-foreground",
258
+ children: [
259
+ /* @__PURE__ */ jsx(ArrowDown, {
260
+ className: "size-icon-sm",
261
+ "aria-hidden": true
262
+ }),
263
+ /* @__PURE__ */ jsx("span", {
264
+ className: "font-semibold text-foreground tabular-nums",
265
+ children: pct(last.value / top * 100)
266
+ }),
267
+ "de conversão total do funil"
268
+ ]
269
+ }),
270
+ /* @__PURE__ */ jsx("figcaption", {
271
+ className: "sr-only",
272
+ children: aria["aria-label"]
273
+ })
274
+ ]
275
+ });
276
+ }
277
+ function Cartesian({ type, data, xKey, series, stacked, colorByCategory, valueFormatter = fmtDefault, height = "md", listThreshold = 8, className, ...aria }) {
278
+ const { isMobile } = useBreakpoint();
279
+ const [asList, setAsList] = useState(false);
280
+ const [animate, setAnimate] = useState(() => !window.matchMedia?.("(prefers-reduced-motion: reduce)").matches);
281
+ const firstWidth = useRef(null);
282
+ const onResize = (width) => {
283
+ if (firstWidth.current === null) firstWidth.current = width;
284
+ else if (Math.abs(width - firstWidth.current) > 1) setAnimate(false);
285
+ };
286
+ const canList = isMobile && data.length > listThreshold;
287
+ const showList = canList && asList;
288
+ const colors = series.map((s, i) => colorVar(s.color ?? i + 1));
289
+ const axis = {
290
+ stroke: "var(--rendra-muted-foreground)",
291
+ fontSize: 12,
292
+ tickLine: false,
293
+ axisLine: false
294
+ };
295
+ const tooltip = /* @__PURE__ */ jsx(Tooltip, {
296
+ cursor: {
297
+ fill: "var(--rendra-muted)",
298
+ stroke: "var(--rendra-border)"
299
+ },
300
+ formatter: (v) => valueFormatter(Number(v)),
301
+ contentStyle: {
302
+ background: "var(--rendra-popover)",
303
+ border: "1px solid var(--rendra-border)",
304
+ borderRadius: "var(--rendra-shape-control)",
305
+ color: "var(--rendra-popover-foreground)",
306
+ fontSize: 12
307
+ }
308
+ });
309
+ const legend = /* @__PURE__ */ jsx(Legend, {
310
+ verticalAlign: "bottom",
311
+ iconType: "circle",
312
+ iconSize: 8,
313
+ wrapperStyle: {
314
+ fontSize: 12,
315
+ paddingTop: 12
316
+ }
317
+ });
318
+ const common = {
319
+ data,
320
+ margin: {
321
+ top: 8,
322
+ right: 8,
323
+ left: isMobile ? -16 : 0,
324
+ bottom: 0
325
+ }
326
+ };
327
+ const xAxis = /* @__PURE__ */ jsx(XAxis, {
328
+ dataKey: xKey,
329
+ ...axis,
330
+ interval: "preserveStartEnd",
331
+ minTickGap: isMobile ? 24 : 12
332
+ });
333
+ const yAxis = /* @__PURE__ */ jsx(YAxis, {
334
+ ...axis,
335
+ width: isMobile ? 72 : 80,
336
+ tickCount: isMobile ? 3 : 5,
337
+ interval: 0,
338
+ allowDecimals: false,
339
+ tickFormatter: (v) => valueFormatter(Number(v))
340
+ });
341
+ const grid = /* @__PURE__ */ jsx(CartesianGrid, {
342
+ vertical: false,
343
+ stroke: "var(--rendra-border)",
344
+ strokeDasharray: "3 3"
345
+ });
346
+ const bar = (s, i, lastBar) => /* @__PURE__ */ jsx(Bar, {
347
+ dataKey: s.key,
348
+ name: s.label,
349
+ fill: colors[i],
350
+ stackId: stacked ? "pilha" : void 0,
351
+ radius: !stacked || lastBar ? [
352
+ 4,
353
+ 4,
354
+ 0,
355
+ 0
356
+ ] : [
357
+ 0,
358
+ 0,
359
+ 0,
360
+ 0
361
+ ],
362
+ maxBarSize: 40,
363
+ isAnimationActive: animate,
364
+ children: colorByCategory && data.map((_, j) => /* @__PURE__ */ jsx(Cell, { fill: colorVar(j + 1) }, j))
365
+ }, s.key);
366
+ let chart;
367
+ if (type === "pie") {
368
+ const s = series[0];
369
+ chart = /* @__PURE__ */ jsxs(PieChart, { children: [
370
+ /* @__PURE__ */ jsx(Pie, {
371
+ data,
372
+ dataKey: s?.key ?? "",
373
+ nameKey: xKey,
374
+ innerRadius: "55%",
375
+ outerRadius: "85%",
376
+ paddingAngle: 2,
377
+ stroke: "var(--rendra-card)",
378
+ isAnimationActive: animate,
379
+ children: data.map((_, i) => /* @__PURE__ */ jsx(Cell, { fill: colorVar(i + 1) }, i))
380
+ }),
381
+ tooltip,
382
+ legend
383
+ ] });
384
+ } else if (type === "bar") chart = /* @__PURE__ */ jsxs(BarChart, {
385
+ ...common,
386
+ children: [
387
+ grid,
388
+ xAxis,
389
+ yAxis,
390
+ tooltip,
391
+ series.length > 1 && legend,
392
+ series.map((s, i) => bar(s, i, i === series.length - 1))
393
+ ]
394
+ });
395
+ else if (type === "combo") {
396
+ const bars = series.filter((s) => (s.kind ?? "bar") === "bar");
397
+ chart = /* @__PURE__ */ jsxs(ComposedChart, {
398
+ ...common,
399
+ children: [
400
+ grid,
401
+ xAxis,
402
+ yAxis,
403
+ tooltip,
404
+ legend,
405
+ series.map((s, i) => (s.kind ?? "bar") === "bar" ? bar(s, i, s.key === bars[bars.length - 1]?.key) : /* @__PURE__ */ jsx(Line, {
406
+ type: "monotone",
407
+ dataKey: s.key,
408
+ name: s.label,
409
+ stroke: colors[i],
410
+ strokeWidth: 2,
411
+ dot: {
412
+ r: 3,
413
+ fill: colors[i],
414
+ strokeWidth: 0
415
+ },
416
+ activeDot: { r: 5 },
417
+ isAnimationActive: animate
418
+ }, s.key))
419
+ ]
420
+ });
421
+ } else if (type === "area") chart = /* @__PURE__ */ jsxs(AreaChart, {
422
+ ...common,
423
+ children: [
424
+ /* @__PURE__ */ jsx("defs", { children: series.map((s, i) => /* @__PURE__ */ jsxs("linearGradient", {
425
+ id: `area-${s.key}`,
426
+ x1: "0",
427
+ y1: "0",
428
+ x2: "0",
429
+ y2: "1",
430
+ children: [/* @__PURE__ */ jsx("stop", {
431
+ offset: "0%",
432
+ stopColor: colors[i],
433
+ stopOpacity: .3
434
+ }), /* @__PURE__ */ jsx("stop", {
435
+ offset: "100%",
436
+ stopColor: colors[i],
437
+ stopOpacity: 0
438
+ })]
439
+ }, s.key)) }),
440
+ grid,
441
+ xAxis,
442
+ yAxis,
443
+ tooltip,
444
+ series.length > 1 && legend,
445
+ series.map((s, i) => /* @__PURE__ */ jsx(Area, {
446
+ type: "monotone",
447
+ dataKey: s.key,
448
+ name: s.label,
449
+ stroke: colors[i],
450
+ strokeWidth: 2,
451
+ fill: `url(#area-${s.key})`,
452
+ isAnimationActive: animate
453
+ }, s.key))
454
+ ]
455
+ });
456
+ else chart = /* @__PURE__ */ jsxs(LineChart, {
457
+ ...common,
458
+ children: [
459
+ grid,
460
+ xAxis,
461
+ yAxis,
462
+ tooltip,
463
+ series.length > 1 && legend,
464
+ series.map((s, i) => /* @__PURE__ */ jsx(Line, {
465
+ type: "monotone",
466
+ dataKey: s.key,
467
+ name: s.label,
468
+ stroke: colors[i],
469
+ strokeWidth: 2,
470
+ dot: false,
471
+ activeDot: { r: 4 },
472
+ isAnimationActive: animate
473
+ }, s.key))
474
+ ]
475
+ });
476
+ return /* @__PURE__ */ jsxs("figure", {
477
+ "data-rendra": resolveCatalogCode("Chart", { type }),
478
+ className: cn("flex min-w-0 flex-col gap-3", height === "fill" && "h-full", className),
479
+ "aria-label": aria["aria-label"],
480
+ children: [
481
+ canList && /* @__PURE__ */ jsx(Button, {
482
+ variant: "ghost",
483
+ size: "sm",
484
+ className: "self-end",
485
+ icon: asList ? /* @__PURE__ */ jsx(BarChart3, {}) : /* @__PURE__ */ jsx(List, {}),
486
+ onClick: () => setAsList((v) => !v),
487
+ children: asList ? "Ver gráfico" : "Ver como lista"
488
+ }),
489
+ showList ? /* @__PURE__ */ jsx("ul", {
490
+ className: "flex flex-col divide-y",
491
+ children: data.map((d) => /* @__PURE__ */ jsxs("li", {
492
+ className: "flex items-center justify-between gap-3 py-2 text-sm",
493
+ children: [/* @__PURE__ */ jsx("span", {
494
+ className: "text-muted-foreground",
495
+ children: String(d[xKey])
496
+ }), /* @__PURE__ */ jsx("span", {
497
+ className: "flex gap-3 font-medium tabular-nums",
498
+ children: series.map((s) => /* @__PURE__ */ jsx("span", { children: valueFormatter(Number(d[s.key])) }, s.key))
499
+ })]
500
+ }, String(d[xKey])))
501
+ }) : /* @__PURE__ */ jsx("div", {
502
+ className: cn("w-full", height === "fill" ? "min-h-chart-sm flex-1" : height === "sm" ? "h-chart-sm" : "h-chart-md"),
503
+ children: /* @__PURE__ */ jsx(ResponsiveContainer, {
504
+ width: "100%",
505
+ height: "100%",
506
+ onResize,
507
+ children: chart
508
+ })
509
+ }),
510
+ /* @__PURE__ */ jsx("figcaption", {
511
+ className: "sr-only",
512
+ children: aria["aria-label"]
513
+ })
514
+ ]
515
+ });
516
+ }
517
+ //#endregion
518
+ export { Chart };
519
+
520
+ //# sourceMappingURL=chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.js","names":[],"sources":["../src/components/ui/chart.tsx"],"sourcesContent":["import { ArrowDown, BarChart3, List as ListIcon } from 'lucide-react'\nimport { useId, useRef, useState, type CSSProperties } from 'react'\nimport {\n Area,\n AreaChart,\n Bar,\n BarChart,\n CartesianGrid,\n Cell,\n ComposedChart,\n Legend,\n Line,\n LineChart,\n Pie,\n PieChart,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts'\nimport { resolveCatalogCode } from '@/catalog/components'\nimport { Button } from '@/components/ui/button'\nimport { useBreakpoint } from '@/hooks/use-breakpoint'\nimport { cn } from '@/lib/cn'\n\n/*\n * Gráfico único do sistema. O tipo é a prop type, nunca um componente novo:\n * line, area, bar, pie séries sobre categorias (Recharts)\n * combo barras e linhas juntas (ex.: receita em barras e meta em linha)\n * gauge velocímetro de meta: valor, máximo, meta e faixas de cor\n * funnel funil de etapas com a taxa de conversão entre elas\n * Cores sempre do template (--chart-1 a --chart-5). Mobile: legenda abaixo, eixos\n * simplificados, lista de valores quando há muitos pontos; o funil empilha rótulo e barra.\n */\n\nexport interface ChartSeries {\n /** Chave no objeto de dados. */\n key: string\n label: string\n /** Índice da cor do template (1 a 5). Padrão: na ordem das séries. */\n color?: 1 | 2 | 3 | 4 | 5\n /** No type=\"combo\": desenha a série como barra (padrão) ou linha. */\n kind?: 'bar' | 'line'\n}\n\ninterface BaseProps {\n valueFormatter?: (n: number) => string\n /** Altura: sm (12rem), md (16rem) ou fill (a altura do contêiner, como num widget). */\n height?: 'sm' | 'md' | 'fill'\n 'aria-label': string\n className?: string\n}\n\nexport interface CartesianChartProps extends BaseProps {\n type: 'line' | 'bar' | 'area' | 'pie' | 'combo'\n data: Record<string, string | number>[]\n /** Chave da categoria (eixo X ou fatias da pizza). */\n xKey: string\n series: ChartSeries[]\n /** Barras empilhadas (bar e combo). */\n stacked?: boolean\n /** Barra de uma série só com uma cor por categoria. */\n colorByCategory?: boolean\n /** Acima deste número de pontos, o mobile oferece ver como lista. */\n listThreshold?: number\n}\n\nexport interface GaugeZone {\n /** Fim da faixa, de 0 a 1 do máximo. */\n to: number\n tone: 'error' | 'warning' | 'success' | 'primary' | 'neutral'\n}\n\nexport interface GaugeChartProps extends BaseProps {\n type: 'gauge'\n value: number\n max: number\n min?: number\n /** Meta: marcada no arco e usada no percentual atingido. */\n target?: number\n /** Faixas de cor do arco. Padrão: vermelho até 60%, amarelo até 90%, verde até o fim. */\n zones?: GaugeZone[]\n /** Texto abaixo do valor (ex.: \"Receita do mês\"). */\n label?: string\n}\n\nexport interface FunnelStage {\n label: string\n value: number\n}\n\nexport interface FunnelChartProps extends BaseProps {\n type: 'funnel'\n stages: FunnelStage[]\n}\n\nexport type ChartProps = CartesianChartProps | GaugeChartProps | FunnelChartProps\n\n// Lê as variáveis do tema direto (as --color-* do Tailwind são inline e não existem no CSS).\nconst palette = [\n '--rendra-chart-1',\n '--rendra-chart-2',\n '--rendra-chart-3',\n '--rendra-chart-4',\n '--rendra-chart-5',\n '--rendra-ring',\n]\nconst colorVar = (i: number) => `var(${palette[(i - 1) % palette.length]})`\nconst fmtDefault = (n: number) => n.toLocaleString('pt-BR')\nconst pct = (n: number) =>\n `${n.toLocaleString('pt-BR', { minimumFractionDigits: 1, maximumFractionDigits: 1 })}%`\n\nexport function Chart(props: ChartProps) {\n if (props.type === 'gauge') return <Gauge {...props} />\n if (props.type === 'funnel') return <Funnel {...props} />\n return <Cartesian {...props} />\n}\n\n/* ================================================================ velocímetro */\n\nconst defaultZones: GaugeZone[] = [\n { to: 0.6, tone: 'error' },\n { to: 0.9, tone: 'warning' },\n { to: 1, tone: 'success' },\n]\n\nconst zoneBadge: Record<GaugeZone['tone'], string> = {\n error: 'bg-destructive-soft text-destructive-soft-foreground',\n warning: 'bg-warning-soft text-warning-soft-foreground',\n success: 'bg-success-soft text-success-soft-foreground',\n primary: 'bg-primary-soft text-primary-soft-foreground',\n neutral: 'bg-muted text-foreground',\n}\nconst zoneText: Record<GaugeZone['tone'], string> = {\n error: 'Abaixo da meta',\n warning: 'Atenção',\n success: 'No verde',\n primary: 'Em andamento',\n neutral: 'Em andamento',\n}\n\n// Meio círculo (180°), da esquerda para a direita por cima, centro em (120, 120), raio 100.\nconst CX = 120\nconst CY = 120\nconst R = 100\nconst point = (frac: number, r = R) => {\n const a = Math.PI * (1 - frac)\n return [CX + r * Math.cos(a), CY - r * Math.sin(a)] as const\n}\nconst arc = (from: number, to: number, r = R) => {\n const [x1, y1] = point(from, r)\n const [x2, y2] = point(to, r)\n return `M ${x1.toFixed(2)} ${y1.toFixed(2)} A ${r} ${r} 0 0 1 ${x2.toFixed(2)} ${y2.toFixed(2)}`\n}\n\nfunction Gauge({\n value,\n max,\n min = 0,\n target,\n zones = defaultZones,\n label,\n valueFormatter = fmtDefault,\n className,\n ...aria\n}: GaugeChartProps) {\n const range = Math.max(1, max - min)\n const clamp = (n: number) => Math.min(1, Math.max(0, n))\n // Com meta, o ponteiro mostra o percentual da meta (100% = meta batida); sem meta, do máximo.\n const reached = target ? (value / target) * 100 : null\n const frac = reached !== null ? clamp(reached / 100) : clamp((value - min) / range)\n const zone = zones.find((z) => frac <= z.to) ?? zones[zones.length - 1]\n const tone = zone?.tone ?? 'primary'\n const gradientId = useId()\n const [ex, ey] = point(frac, R - 26)\n\n return (\n <figure\n data-rendra={resolveCatalogCode('Chart', { type: 'gauge' })}\n className={cn('flex min-w-0 flex-col items-center gap-2', className)}\n aria-label={aria['aria-label']}\n >\n <div\n role=\"meter\"\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={Math.round(frac * 100)}\n aria-valuetext={`${reached !== null ? `${pct(reached)} da meta` : valueFormatter(value)}, ${zoneText[tone]}`}\n aria-label={aria['aria-label']}\n className=\"w-full max-w-xs\"\n >\n <svg viewBox=\"0 0 240 140\" className=\"w-full\" aria-hidden>\n <defs>\n {/* Degradê contínuo: vermelho, laranja, amarelo e verde */}\n <linearGradient id={gradientId} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\">\n <stop offset=\"0%\" stopColor=\"var(--rendra-meter-low)\" />\n <stop\n offset=\"38%\"\n stopColor=\"color-mix(in oklab, var(--rendra-meter-low), var(--rendra-meter-mid))\"\n />\n <stop offset=\"62%\" stopColor=\"var(--rendra-meter-mid)\" />\n <stop offset=\"100%\" stopColor=\"var(--rendra-meter-high)\" />\n </linearGradient>\n </defs>\n <path\n d={arc(0, 1)}\n fill=\"none\"\n stroke={`url(#${gradientId})`}\n strokeWidth={20}\n strokeLinecap=\"round\"\n />\n {/* Ponteiro fino, do centro até perto do arco */}\n <line\n x1={CX}\n y1={CY}\n x2={ex}\n y2={ey}\n stroke=\"var(--rendra-foreground)\"\n strokeWidth={4}\n strokeLinecap=\"round\"\n className=\"transition-all duration-700\"\n />\n <circle cx={CX} cy={CY} r={9} fill=\"var(--rendra-foreground)\" />\n <circle cx={CX} cy={CY} r={4} fill=\"var(--rendra-card)\" />\n <text\n x={point(0)[0]}\n y={CY + 18}\n textAnchor=\"middle\"\n fontSize={11}\n fill=\"var(--rendra-muted-foreground)\"\n >\n 0%\n </text>\n <text\n x={point(1)[0]}\n y={CY + 18}\n textAnchor=\"middle\"\n fontSize={11}\n fill=\"var(--rendra-muted-foreground)\"\n >\n 100%\n </text>\n </svg>\n </div>\n <div className=\"flex flex-col items-center gap-1 text-center\">\n <span className=\"text-3xl font-semibold tabular-nums\">\n {reached !== null ? `${Math.round(reached)}%` : valueFormatter(value)}\n </span>\n {label && <span className=\"text-sm font-medium\">{label}</span>}\n {target !== undefined && (\n <span className=\"flex flex-col text-sm text-muted-foreground tabular-nums\">\n <span>Meta: {valueFormatter(target)}</span>\n <span>Realizado: {valueFormatter(value)}</span>\n </span>\n )}\n <span className={cn('mt-1 rounded-full px-3 py-1 text-xs font-semibold', zoneBadge[tone])}>\n {zoneText[tone]}\n </span>\n </div>\n <figcaption className=\"sr-only\">{aria['aria-label']}</figcaption>\n </figure>\n )\n}\n\n/* ================================================================ funil */\n\nfunction Funnel({ stages, valueFormatter = fmtDefault, className, ...aria }: FunnelChartProps) {\n const n = stages.length\n const top = stages[0]?.value || 1\n const last = stages[n - 1]\n // Afunila por igual, de 100% a 46% da largura, como um funil de verdade.\n const width = (i: number) => 1 - (i / Math.max(1, n)) * 0.54\n // Da primária ao sucesso, escurecido com o tom da sidebar: o texto claro passa AA.\n const fill = (i: number) => {\n const p = n > 1 ? Math.round(100 - (i / (n - 1)) * 100) : 100\n return `color-mix(in oklab, color-mix(in oklab, var(--rendra-primary) ${p}%, var(--rendra-success)) 58%, var(--rendra-sidebar))`\n }\n const rates = stages.map((s, i) => {\n const next = stages[i + 1]\n return next && s.value > 0 ? (next.value / s.value) * 100 : null\n })\n const worst = rates.reduce<number | null>(\n (w, r, i) => (r !== null && (w === null || r < (rates[w] ?? Infinity)) ? i : w),\n null,\n )\n\n return (\n <figure\n data-rendra={resolveCatalogCode('Chart', { type: 'funnel' })}\n className={cn('flex min-w-0 flex-col items-center', className)}\n aria-label={aria['aria-label']}\n >\n <ol className=\"flex w-full flex-col items-center\">\n {stages.map((s, i) => {\n const rate = rates[i]\n return (\n <li key={s.label} className=\"flex w-full flex-col items-center\">\n <div\n className=\"flex h-16 w-full flex-col items-center justify-center bg-fill text-sidebar-foreground clip-trapezoid\"\n style={\n {\n '--top': width(i).toFixed(4),\n '--bottom': width(i + 1).toFixed(4),\n '--fill': fill(i),\n } as CSSProperties\n }\n >\n <span className=\"text-lg leading-tight font-semibold tabular-nums\">\n {valueFormatter(s.value)}\n </span>\n <span className=\"text-xs\">{s.label}</span>\n </div>\n {rate != null && (\n <p className=\"flex items-center gap-1 py-1 text-xs text-muted-foreground\">\n <ArrowDown className=\"size-3\" aria-hidden />\n <span className=\"font-semibold text-foreground tabular-nums\">{pct(rate)}</span>\n <span>para a próxima etapa</span>\n {i === worst && n > 2 && (\n <span className=\"font-semibold text-destructive-soft-foreground\">\n · Maior queda\n </span>\n )}\n </p>\n )}\n </li>\n )\n })}\n </ol>\n {n > 1 && last && (\n <p className=\"flex items-center gap-1 pt-2 text-sm text-muted-foreground\">\n <ArrowDown className=\"size-icon-sm\" aria-hidden />\n <span className=\"font-semibold text-foreground tabular-nums\">\n {pct((last.value / top) * 100)}\n </span>\n de conversão total do funil\n </p>\n )}\n <figcaption className=\"sr-only\">{aria['aria-label']}</figcaption>\n </figure>\n )\n}\n\n/* ================================================================ séries (Recharts) */\n\nfunction Cartesian({\n type,\n data,\n xKey,\n series,\n stacked,\n colorByCategory,\n valueFormatter = fmtDefault,\n height = 'md',\n listThreshold = 8,\n className,\n ...aria\n}: CartesianChartProps) {\n const { isMobile } = useBreakpoint()\n const [asList, setAsList] = useState(false)\n // Anima só a entrada. Se a largura muda depois (barra de rolagem que aparece, janela\n // redimensionada), o gráfico vai direto à nova forma, sem desenhar fora do card no meio do\n // caminho. Com \"reduzir movimento\" no sistema, não anima.\n const [animate, setAnimate] = useState(\n () => !window.matchMedia?.('(prefers-reduced-motion: reduce)').matches,\n )\n const firstWidth = useRef<number | null>(null)\n const onResize = (width: number) => {\n if (firstWidth.current === null) firstWidth.current = width\n else if (Math.abs(width - firstWidth.current) > 1) setAnimate(false)\n }\n const canList = isMobile && data.length > listThreshold\n const showList = canList && asList\n const colors = series.map((s, i) => colorVar(s.color ?? i + 1))\n\n const axis = {\n stroke: 'var(--rendra-muted-foreground)',\n fontSize: 12,\n tickLine: false,\n axisLine: false,\n }\n const tooltip = (\n <Tooltip\n cursor={{ fill: 'var(--rendra-muted)', stroke: 'var(--rendra-border)' }}\n formatter={(v) => valueFormatter(Number(v))}\n contentStyle={{\n background: 'var(--rendra-popover)',\n border: '1px solid var(--rendra-border)',\n borderRadius: 'var(--rendra-shape-control)',\n color: 'var(--rendra-popover-foreground)',\n fontSize: 12,\n }}\n />\n )\n const legend = (\n <Legend\n verticalAlign=\"bottom\"\n iconType=\"circle\"\n iconSize={8}\n wrapperStyle={{ fontSize: 12, paddingTop: 12 }}\n />\n )\n const common = { data, margin: { top: 8, right: 8, left: isMobile ? -16 : 0, bottom: 0 } }\n const xAxis = (\n <XAxis dataKey={xKey} {...axis} interval=\"preserveStartEnd\" minTickGap={isMobile ? 24 : 12} />\n )\n const yAxis = (\n <YAxis\n {...axis}\n width={isMobile ? 72 : 80}\n tickCount={isMobile ? 3 : 5}\n // Mostra todas as marcas calculadas (o padrão do Recharts some com algumas).\n interval={0}\n allowDecimals={false}\n tickFormatter={(v) => valueFormatter(Number(v))}\n />\n )\n const grid = (\n <CartesianGrid vertical={false} stroke=\"var(--rendra-border)\" strokeDasharray=\"3 3\" />\n )\n const bar = (s: ChartSeries, i: number, lastBar: boolean) => (\n <Bar\n key={s.key}\n dataKey={s.key}\n name={s.label}\n fill={colors[i]}\n stackId={stacked ? 'pilha' : undefined}\n // Empilhadas: só a barra de cima tem os cantos arredondados.\n radius={!stacked || lastBar ? [4, 4, 0, 0] : [0, 0, 0, 0]}\n maxBarSize={40}\n isAnimationActive={animate}\n >\n {colorByCategory && data.map((_, j) => <Cell key={j} fill={colorVar(j + 1)} />)}\n </Bar>\n )\n\n let chart\n if (type === 'pie') {\n const s = series[0]\n chart = (\n <PieChart>\n <Pie\n data={data}\n dataKey={s?.key ?? ''}\n nameKey={xKey}\n innerRadius=\"55%\"\n outerRadius=\"85%\"\n paddingAngle={2}\n stroke=\"var(--rendra-card)\"\n isAnimationActive={animate}\n >\n {data.map((_, i) => (\n <Cell key={i} fill={colorVar(i + 1)} />\n ))}\n </Pie>\n {tooltip}\n {legend}\n </PieChart>\n )\n } else if (type === 'bar') {\n chart = (\n <BarChart {...common}>\n {grid}\n {xAxis}\n {yAxis}\n {tooltip}\n {series.length > 1 && legend}\n {series.map((s, i) => bar(s, i, i === series.length - 1))}\n </BarChart>\n )\n } else if (type === 'combo') {\n const bars = series.filter((s) => (s.kind ?? 'bar') === 'bar')\n chart = (\n <ComposedChart {...common}>\n {grid}\n {xAxis}\n {yAxis}\n {tooltip}\n {legend}\n {series.map((s, i) =>\n (s.kind ?? 'bar') === 'bar' ? (\n bar(s, i, s.key === bars[bars.length - 1]?.key)\n ) : (\n <Line\n key={s.key}\n type=\"monotone\"\n dataKey={s.key}\n name={s.label}\n stroke={colors[i]}\n strokeWidth={2}\n dot={{ r: 3, fill: colors[i], strokeWidth: 0 }}\n activeDot={{ r: 5 }}\n isAnimationActive={animate}\n />\n ),\n )}\n </ComposedChart>\n )\n } else if (type === 'area') {\n chart = (\n <AreaChart {...common}>\n <defs>\n {series.map((s, i) => (\n <linearGradient key={s.key} id={`area-${s.key}`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor={colors[i]} stopOpacity={0.3} />\n <stop offset=\"100%\" stopColor={colors[i]} stopOpacity={0} />\n </linearGradient>\n ))}\n </defs>\n {grid}\n {xAxis}\n {yAxis}\n {tooltip}\n {series.length > 1 && legend}\n {series.map((s, i) => (\n <Area\n key={s.key}\n type=\"monotone\"\n dataKey={s.key}\n name={s.label}\n stroke={colors[i]}\n strokeWidth={2}\n fill={`url(#area-${s.key})`}\n isAnimationActive={animate}\n />\n ))}\n </AreaChart>\n )\n } else {\n chart = (\n <LineChart {...common}>\n {grid}\n {xAxis}\n {yAxis}\n {tooltip}\n {series.length > 1 && legend}\n {series.map((s, i) => (\n <Line\n key={s.key}\n type=\"monotone\"\n dataKey={s.key}\n name={s.label}\n stroke={colors[i]}\n strokeWidth={2}\n dot={false}\n activeDot={{ r: 4 }}\n isAnimationActive={animate}\n />\n ))}\n </LineChart>\n )\n }\n\n return (\n <figure\n data-rendra={resolveCatalogCode('Chart', { type })}\n className={cn('flex min-w-0 flex-col gap-3', height === 'fill' && 'h-full', className)}\n aria-label={aria['aria-label']}\n >\n {canList && (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"self-end\"\n icon={asList ? <BarChart3 /> : <ListIcon />}\n onClick={() => setAsList((v) => !v)}\n >\n {asList ? 'Ver gráfico' : 'Ver como lista'}\n </Button>\n )}\n {showList ? (\n <ul className=\"flex flex-col divide-y\">\n {data.map((d) => (\n <li\n key={String(d[xKey])}\n className=\"flex items-center justify-between gap-3 py-2 text-sm\"\n >\n <span className=\"text-muted-foreground\">{String(d[xKey])}</span>\n <span className=\"flex gap-3 font-medium tabular-nums\">\n {series.map((s) => (\n <span key={s.key}>{valueFormatter(Number(d[s.key]))}</span>\n ))}\n </span>\n </li>\n ))}\n </ul>\n ) : (\n <div\n className={cn(\n 'w-full',\n height === 'fill'\n ? 'min-h-chart-sm flex-1'\n : height === 'sm'\n ? 'h-chart-sm'\n : 'h-chart-md',\n )}\n >\n <ResponsiveContainer width=\"100%\" height=\"100%\" onResize={onResize}>\n {chart}\n </ResponsiveContainer>\n </div>\n )}\n <figcaption className=\"sr-only\">{aria['aria-label']}</figcaption>\n </figure>\n )\n}\n"],"mappings":";;;;;;;;;;AAmGA,IAAM,UAAU;CACd;CACA;CACA;CACA;CACA;CACA;AACF;AACA,IAAM,YAAY,MAAc,OAAO,SAAS,IAAI,KAAK,QAAQ,QAAQ;AACzE,IAAM,cAAc,MAAc,EAAE,eAAe,OAAO;AAC1D,IAAM,OAAO,MACX,GAAG,EAAE,eAAe,SAAS;CAAE,uBAAuB;CAAG,uBAAuB;AAAE,CAAC,EAAE;AAEvF,SAAgB,MAAM,OAAmB;CACvC,IAAI,MAAM,SAAS,SAAS,OAAO,oBAAC,OAAD,EAAO,GAAI,MAAQ,CAAA;CACtD,IAAI,MAAM,SAAS,U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