@mijn-ui/react-charts 0.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 MijnUI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # @mijn-ui/react-charts
2
+
3
+ Lightweight, token-driven charts: bar, grouped bar, donut, sparkline, and legend.
4
+
5
+ [Documentation](https://mijn-ui.vercel.app/react/docs/components/charts)
6
+
7
+ ## Installation
8
+
9
+ ```sh
10
+ npm install @mijn-ui/react-charts
11
+ ```
12
+
13
+ ## License
14
+
15
+ This project is licensed under the terms of the [MIT license.](https://github.com/mijn-ui/mijn-ui-react/blob/main/LICENSE)
@@ -0,0 +1,664 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as tailwind_variants from 'tailwind-variants';
3
+ import { VariantProps } from 'tailwind-variants';
4
+ import * as tailwind_merge from 'tailwind-merge';
5
+ import * as React from 'react';
6
+ import { UnstyledComponentWithSlots } from '@mijn-ui/react-core';
7
+
8
+ /**
9
+ * The categorical hues exposed by the core theme
10
+ * (see `docs/foundation/colors.md` → Categorical surfaces), plus `brand`.
11
+ */
12
+ type ChartHue = "brand" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | "gray";
13
+ /** Solid fill classes per hue (`bg-bg-<hue>`). */
14
+ declare const HUE_BG_MAP: Record<ChartHue, string>;
15
+ /** Subtle fill classes per hue (`bg-bg-<hue>-subtle`). */
16
+ declare const HUE_BG_SUBTLE_MAP: Record<ChartHue, string>;
17
+ /** SVG stroke classes per hue (`stroke-fg-<hue>`). */
18
+ declare const HUE_STROKE_MAP: Record<ChartHue, string>;
19
+ /**
20
+ * Text color classes per hue (`text-fg-<hue>`) — used to drive
21
+ * `stroke="currentColor"` / `stop-color="currentColor"` SVG techniques.
22
+ */
23
+ declare const HUE_TEXT_MAP: Record<ChartHue, string>;
24
+ /**
25
+ * SVG text-fill classes readable ON a hue's solid surface
26
+ * (`fill-on-bg-<hue>`) — used for labels drawn on top of chart marks.
27
+ */
28
+ declare const HUE_ON_BG_FILL_MAP: Record<ChartHue, string>;
29
+ /**
30
+ * Default categorical series order. Hues are assigned in this fixed order
31
+ * (never re-shuffled when series are added or removed) so a series keeps its
32
+ * color across renders and filters.
33
+ */
34
+ declare const DEFAULT_PALETTE: ChartHue[];
35
+ /** A single labeled value (BarChart), optionally with a fixed hue. */
36
+ type ChartDatum = {
37
+ label: string;
38
+ value: number;
39
+ color?: ChartHue;
40
+ };
41
+ /** A labeled group of values, one per series (GroupedBarChart). */
42
+ type GroupedChartDatum = {
43
+ label: string;
44
+ values: number[];
45
+ };
46
+ /** A labeled value with an optional fixed hue (DonutChart). */
47
+ type DonutChartDatum = {
48
+ label: string;
49
+ value: number;
50
+ color?: ChartHue;
51
+ };
52
+
53
+ declare const chartTooltipStyles: tailwind_variants.TVReturnType<{
54
+ [key: string]: {
55
+ [key: string]: tailwind_merge.ClassNameValue | {
56
+ base?: tailwind_merge.ClassNameValue;
57
+ title?: tailwind_merge.ClassNameValue;
58
+ row?: tailwind_merge.ClassNameValue;
59
+ swatch?: tailwind_merge.ClassNameValue;
60
+ label?: tailwind_merge.ClassNameValue;
61
+ value?: tailwind_merge.ClassNameValue;
62
+ };
63
+ };
64
+ } | {
65
+ [x: string]: {
66
+ [x: string]: tailwind_merge.ClassNameValue | {
67
+ base?: tailwind_merge.ClassNameValue;
68
+ title?: tailwind_merge.ClassNameValue;
69
+ row?: tailwind_merge.ClassNameValue;
70
+ swatch?: tailwind_merge.ClassNameValue;
71
+ label?: tailwind_merge.ClassNameValue;
72
+ value?: tailwind_merge.ClassNameValue;
73
+ };
74
+ };
75
+ } | {}, {
76
+ base: string;
77
+ title: string;
78
+ row: string;
79
+ swatch: string;
80
+ label: string;
81
+ value: string;
82
+ }, undefined, {
83
+ [key: string]: {
84
+ [key: string]: tailwind_merge.ClassNameValue | {
85
+ base?: tailwind_merge.ClassNameValue;
86
+ title?: tailwind_merge.ClassNameValue;
87
+ row?: tailwind_merge.ClassNameValue;
88
+ swatch?: tailwind_merge.ClassNameValue;
89
+ label?: tailwind_merge.ClassNameValue;
90
+ value?: tailwind_merge.ClassNameValue;
91
+ };
92
+ };
93
+ } | {}, {
94
+ base: string;
95
+ title: string;
96
+ row: string;
97
+ swatch: string;
98
+ label: string;
99
+ value: string;
100
+ }, tailwind_variants.TVReturnType<unknown, {
101
+ base: string;
102
+ title: string;
103
+ row: string;
104
+ swatch: string;
105
+ label: string;
106
+ value: string;
107
+ }, undefined, unknown, unknown, undefined>>;
108
+ type ChartTooltipVariantProps = VariantProps<typeof chartTooltipStyles>;
109
+ type ChartTooltipSlots = keyof ReturnType<typeof chartTooltipStyles>;
110
+
111
+ type ChartTooltipItem = {
112
+ value: string;
113
+ label?: string;
114
+ color?: ChartHue;
115
+ };
116
+ type ChartTooltipProps = UnstyledComponentWithSlots<ChartTooltipSlots> & React.ComponentPropsWithRef<"div"> & {
117
+ /** Heading line (usually the hovered datum's label). */
118
+ heading?: string;
119
+ /** One row per value; rows with a `color` render a hue swatch. */
120
+ items?: ChartTooltipItem[];
121
+ };
122
+ /**
123
+ * The floating hover bubble shared by every chart. Purely presentational —
124
+ * charts own the hover state and position it via `style`.
125
+ */
126
+ declare const ChartTooltip: ({ className, classNames, unstyled, heading, items, children, ref, ...props }: ChartTooltipProps) => react_jsx_runtime.JSX.Element;
127
+
128
+ declare const chartLegendStyles: tailwind_variants.TVReturnType<{
129
+ orientation: {
130
+ horizontal: {
131
+ base: string;
132
+ };
133
+ vertical: {
134
+ base: string;
135
+ };
136
+ };
137
+ clickable: {
138
+ true: {
139
+ item: string;
140
+ };
141
+ };
142
+ hidden: {
143
+ true: {
144
+ item: string;
145
+ label: string;
146
+ };
147
+ };
148
+ }, {
149
+ base: string;
150
+ item: string;
151
+ swatch: string;
152
+ label: string;
153
+ value: string;
154
+ }, undefined, {
155
+ orientation: {
156
+ horizontal: {
157
+ base: string;
158
+ };
159
+ vertical: {
160
+ base: string;
161
+ };
162
+ };
163
+ clickable: {
164
+ true: {
165
+ item: string;
166
+ };
167
+ };
168
+ hidden: {
169
+ true: {
170
+ item: string;
171
+ label: string;
172
+ };
173
+ };
174
+ }, {
175
+ base: string;
176
+ item: string;
177
+ swatch: string;
178
+ label: string;
179
+ value: string;
180
+ }, tailwind_variants.TVReturnType<{
181
+ orientation: {
182
+ horizontal: {
183
+ base: string;
184
+ };
185
+ vertical: {
186
+ base: string;
187
+ };
188
+ };
189
+ clickable: {
190
+ true: {
191
+ item: string;
192
+ };
193
+ };
194
+ hidden: {
195
+ true: {
196
+ item: string;
197
+ label: string;
198
+ };
199
+ };
200
+ }, {
201
+ base: string;
202
+ item: string;
203
+ swatch: string;
204
+ label: string;
205
+ value: string;
206
+ }, undefined, unknown, unknown, undefined>>;
207
+ type ChartLegendVariantProps = VariantProps<typeof chartLegendStyles>;
208
+ type ChartLegendSlots = keyof ReturnType<typeof chartLegendStyles>;
209
+
210
+ type ChartLegendItemData = {
211
+ label: string;
212
+ color: ChartHue;
213
+ value?: string;
214
+ /** Marks the series as toggled off (dimmed swatch, struck-through label). */
215
+ hidden?: boolean;
216
+ };
217
+ type ChartLegendItemProps = UnstyledComponentWithSlots<ChartLegendSlots> & React.ComponentPropsWithRef<"div"> & ChartLegendItemData & {
218
+ /** When set the item renders as a button and calls this on click. */
219
+ onToggle?: () => void;
220
+ };
221
+ declare const ChartLegendItem: ({ className, classNames, unstyled, label: labelText, color, value: valueText, hidden, onToggle, ref, ...props }: ChartLegendItemProps) => react_jsx_runtime.JSX.Element;
222
+ type ChartLegendProps = UnstyledComponentWithSlots<ChartLegendSlots> & React.ComponentPropsWithRef<"div"> & {
223
+ items: ChartLegendItemData[];
224
+ orientation?: ChartLegendVariantProps["orientation"];
225
+ /** When set every item becomes a toggle button (series show/hide). */
226
+ onItemToggle?: (index: number, item: ChartLegendItemData) => void;
227
+ };
228
+ declare const ChartLegend: ({ className, classNames, unstyled, items, orientation, onItemToggle, ref, ...props }: ChartLegendProps) => react_jsx_runtime.JSX.Element;
229
+
230
+ declare const barChartStyles: tailwind_variants.TVReturnType<{
231
+ size: {
232
+ sm: {
233
+ plot: string;
234
+ };
235
+ default: {
236
+ plot: string;
237
+ };
238
+ lg: {
239
+ plot: string;
240
+ };
241
+ };
242
+ dimmed: {
243
+ true: {
244
+ bar: string;
245
+ };
246
+ };
247
+ clickable: {
248
+ true: {
249
+ barGroup: string;
250
+ };
251
+ };
252
+ withValues: {
253
+ true: {
254
+ plot: string;
255
+ };
256
+ };
257
+ }, {
258
+ base: string;
259
+ plot: string;
260
+ barGroup: string;
261
+ bar: string;
262
+ valueLabel: string;
263
+ labelGroup: string;
264
+ label: string;
265
+ }, undefined, {
266
+ size: {
267
+ sm: {
268
+ plot: string;
269
+ };
270
+ default: {
271
+ plot: string;
272
+ };
273
+ lg: {
274
+ plot: string;
275
+ };
276
+ };
277
+ dimmed: {
278
+ true: {
279
+ bar: string;
280
+ };
281
+ };
282
+ clickable: {
283
+ true: {
284
+ barGroup: string;
285
+ };
286
+ };
287
+ withValues: {
288
+ true: {
289
+ plot: string;
290
+ };
291
+ };
292
+ }, {
293
+ base: string;
294
+ plot: string;
295
+ barGroup: string;
296
+ bar: string;
297
+ valueLabel: string;
298
+ labelGroup: string;
299
+ label: string;
300
+ }, tailwind_variants.TVReturnType<{
301
+ size: {
302
+ sm: {
303
+ plot: string;
304
+ };
305
+ default: {
306
+ plot: string;
307
+ };
308
+ lg: {
309
+ plot: string;
310
+ };
311
+ };
312
+ dimmed: {
313
+ true: {
314
+ bar: string;
315
+ };
316
+ };
317
+ clickable: {
318
+ true: {
319
+ barGroup: string;
320
+ };
321
+ };
322
+ withValues: {
323
+ true: {
324
+ plot: string;
325
+ };
326
+ };
327
+ }, {
328
+ base: string;
329
+ plot: string;
330
+ barGroup: string;
331
+ bar: string;
332
+ valueLabel: string;
333
+ labelGroup: string;
334
+ label: string;
335
+ }, undefined, unknown, unknown, undefined>>;
336
+ type BarChartVariantProps = VariantProps<typeof barChartStyles>;
337
+ type BarChartSlots = keyof ReturnType<typeof barChartStyles>;
338
+
339
+ type BarChartProps = UnstyledComponentWithSlots<BarChartSlots> & React.ComponentPropsWithRef<"div"> & {
340
+ data: ChartDatum[];
341
+ valueFormatter?: (value: number) => string;
342
+ /** Renders every bar but the last with the subtle hue, spotlighting the most recent value. */
343
+ emphasizeLast?: boolean;
344
+ /** Single hue for all bars (lowest precedence). */
345
+ color?: ChartHue;
346
+ /** Palette cycled per bar; each datum's own `color` wins over it. */
347
+ colors?: ChartHue[];
348
+ size?: BarChartVariantProps["size"];
349
+ /** Renders the formatted value above every bar. */
350
+ showValues?: boolean;
351
+ /** Shows a styled label+value bubble over the hovered bar (default on). */
352
+ showTooltip?: boolean;
353
+ /** Controlled hovered/highlighted bar index (`null` for none). */
354
+ activeIndex?: number | null;
355
+ onActiveIndexChange?: (activeIndex: number | null) => void;
356
+ onValueClick?: (index: number) => void;
357
+ };
358
+ declare const BarChart: ({ className, classNames, unstyled, data, valueFormatter, emphasizeLast, color, colors, size, showValues, showTooltip, activeIndex: activeIndexProp, onActiveIndexChange, onValueClick, ref, ...props }: BarChartProps) => react_jsx_runtime.JSX.Element;
359
+
360
+ declare const groupedBarChartStyles: tailwind_variants.TVReturnType<{
361
+ size: {
362
+ sm: {
363
+ plot: string;
364
+ };
365
+ default: {
366
+ plot: string;
367
+ };
368
+ lg: {
369
+ plot: string;
370
+ };
371
+ };
372
+ dimmed: {
373
+ true: {
374
+ bar: string;
375
+ };
376
+ };
377
+ clickable: {
378
+ true: {
379
+ barGroup: string;
380
+ };
381
+ };
382
+ withValues: {
383
+ true: {
384
+ plot: string;
385
+ };
386
+ };
387
+ }, {
388
+ base: string;
389
+ legend: string;
390
+ plot: string;
391
+ barGroup: string;
392
+ bar: string;
393
+ valueLabel: string;
394
+ labelGroup: string;
395
+ label: string;
396
+ }, undefined, {
397
+ size: {
398
+ sm: {
399
+ plot: string;
400
+ };
401
+ default: {
402
+ plot: string;
403
+ };
404
+ lg: {
405
+ plot: string;
406
+ };
407
+ };
408
+ dimmed: {
409
+ true: {
410
+ bar: string;
411
+ };
412
+ };
413
+ clickable: {
414
+ true: {
415
+ barGroup: string;
416
+ };
417
+ };
418
+ withValues: {
419
+ true: {
420
+ plot: string;
421
+ };
422
+ };
423
+ }, {
424
+ base: string;
425
+ legend: string;
426
+ plot: string;
427
+ barGroup: string;
428
+ bar: string;
429
+ valueLabel: string;
430
+ labelGroup: string;
431
+ label: string;
432
+ }, tailwind_variants.TVReturnType<{
433
+ size: {
434
+ sm: {
435
+ plot: string;
436
+ };
437
+ default: {
438
+ plot: string;
439
+ };
440
+ lg: {
441
+ plot: string;
442
+ };
443
+ };
444
+ dimmed: {
445
+ true: {
446
+ bar: string;
447
+ };
448
+ };
449
+ clickable: {
450
+ true: {
451
+ barGroup: string;
452
+ };
453
+ };
454
+ withValues: {
455
+ true: {
456
+ plot: string;
457
+ };
458
+ };
459
+ }, {
460
+ base: string;
461
+ legend: string;
462
+ plot: string;
463
+ barGroup: string;
464
+ bar: string;
465
+ valueLabel: string;
466
+ labelGroup: string;
467
+ label: string;
468
+ }, undefined, unknown, unknown, undefined>>;
469
+ type GroupedBarChartVariantProps = VariantProps<typeof groupedBarChartStyles>;
470
+ type GroupedBarChartSlots = keyof ReturnType<typeof groupedBarChartStyles>;
471
+
472
+ type GroupedBarChartProps = UnstyledComponentWithSlots<GroupedBarChartSlots> & React.ComponentPropsWithRef<"div"> & {
473
+ data: GroupedChartDatum[];
474
+ /** Series names, in the same order as each datum's `values`. */
475
+ series: string[];
476
+ /** Hues assigned to the series in fixed order. Defaults to `DEFAULT_PALETTE`. */
477
+ colors?: ChartHue[];
478
+ valueFormatter?: (value: number) => string;
479
+ size?: GroupedBarChartVariantProps["size"];
480
+ /** Renders the formatted value above every bar. */
481
+ showValues?: boolean;
482
+ /** Shows a per-series bubble over the hovered group (default on). */
483
+ showTooltip?: boolean;
484
+ /** Legend items become buttons that show/hide their series. */
485
+ toggleable?: boolean;
486
+ /** Controlled list of hidden series names (use with `toggleable`). */
487
+ hiddenSeries?: string[];
488
+ onHiddenSeriesChange?: (hiddenSeries: string[]) => void;
489
+ /** Controlled hovered/highlighted group index (`null` for none). */
490
+ activeIndex?: number | null;
491
+ onActiveIndexChange?: (activeIndex: number | null) => void;
492
+ onValueClick?: (index: number) => void;
493
+ };
494
+ declare const GroupedBarChart: ({ className, classNames, unstyled, data, series, colors, valueFormatter, size, showValues, showTooltip, toggleable, hiddenSeries: hiddenSeriesProp, onHiddenSeriesChange, activeIndex: activeIndexProp, onActiveIndexChange, onValueClick, ref, ...props }: GroupedBarChartProps) => react_jsx_runtime.JSX.Element;
495
+
496
+ declare const donutChartStyles: tailwind_variants.TVReturnType<{
497
+ size: {
498
+ sm: {
499
+ svg: string;
500
+ };
501
+ default: {
502
+ svg: string;
503
+ };
504
+ lg: {
505
+ svg: string;
506
+ };
507
+ };
508
+ thickness: {
509
+ thin: {
510
+ slice: string;
511
+ };
512
+ default: {
513
+ slice: string;
514
+ };
515
+ thick: {
516
+ slice: string;
517
+ };
518
+ };
519
+ }, {
520
+ base: string;
521
+ svg: string;
522
+ slice: string;
523
+ sliceLabel: string;
524
+ }, undefined, {
525
+ size: {
526
+ sm: {
527
+ svg: string;
528
+ };
529
+ default: {
530
+ svg: string;
531
+ };
532
+ lg: {
533
+ svg: string;
534
+ };
535
+ };
536
+ thickness: {
537
+ thin: {
538
+ slice: string;
539
+ };
540
+ default: {
541
+ slice: string;
542
+ };
543
+ thick: {
544
+ slice: string;
545
+ };
546
+ };
547
+ }, {
548
+ base: string;
549
+ svg: string;
550
+ slice: string;
551
+ sliceLabel: string;
552
+ }, tailwind_variants.TVReturnType<{
553
+ size: {
554
+ sm: {
555
+ svg: string;
556
+ };
557
+ default: {
558
+ svg: string;
559
+ };
560
+ lg: {
561
+ svg: string;
562
+ };
563
+ };
564
+ thickness: {
565
+ thin: {
566
+ slice: string;
567
+ };
568
+ default: {
569
+ slice: string;
570
+ };
571
+ thick: {
572
+ slice: string;
573
+ };
574
+ };
575
+ }, {
576
+ base: string;
577
+ svg: string;
578
+ slice: string;
579
+ sliceLabel: string;
580
+ }, undefined, unknown, unknown, undefined>>;
581
+ type DonutChartVariantProps = VariantProps<typeof donutChartStyles>;
582
+ type DonutChartSlots = keyof ReturnType<typeof donutChartStyles>;
583
+
584
+ type DonutChartProps = UnstyledComponentWithSlots<DonutChartSlots> & React.ComponentPropsWithRef<"div"> & {
585
+ data: DonutChartDatum[];
586
+ valueFormatter?: (value: number) => string;
587
+ size?: DonutChartVariantProps["size"];
588
+ thickness?: DonutChartVariantProps["thickness"];
589
+ /** Draws each slice's percentage on the ring (slices ≥ 6% only). */
590
+ showPercentages?: boolean;
591
+ /** Shows a label+value bubble at the hovered slice (default on). */
592
+ showTooltip?: boolean;
593
+ };
594
+ declare const DonutChart: ({ className, classNames, unstyled, data, valueFormatter, size, thickness, showPercentages, showTooltip, ref, ...props }: DonutChartProps) => react_jsx_runtime.JSX.Element;
595
+
596
+ declare const sparklineStyles: tailwind_variants.TVReturnType<{
597
+ [key: string]: {
598
+ [key: string]: tailwind_merge.ClassNameValue | {
599
+ base?: tailwind_merge.ClassNameValue;
600
+ area?: tailwind_merge.ClassNameValue;
601
+ line?: tailwind_merge.ClassNameValue;
602
+ marker?: tailwind_merge.ClassNameValue;
603
+ wrapper?: tailwind_merge.ClassNameValue;
604
+ };
605
+ };
606
+ } | {
607
+ [x: string]: {
608
+ [x: string]: tailwind_merge.ClassNameValue | {
609
+ base?: tailwind_merge.ClassNameValue;
610
+ area?: tailwind_merge.ClassNameValue;
611
+ line?: tailwind_merge.ClassNameValue;
612
+ marker?: tailwind_merge.ClassNameValue;
613
+ wrapper?: tailwind_merge.ClassNameValue;
614
+ };
615
+ };
616
+ } | {}, {
617
+ wrapper: string;
618
+ base: string;
619
+ line: string;
620
+ area: string;
621
+ marker: string;
622
+ }, undefined, {
623
+ [key: string]: {
624
+ [key: string]: tailwind_merge.ClassNameValue | {
625
+ base?: tailwind_merge.ClassNameValue;
626
+ area?: tailwind_merge.ClassNameValue;
627
+ line?: tailwind_merge.ClassNameValue;
628
+ marker?: tailwind_merge.ClassNameValue;
629
+ wrapper?: tailwind_merge.ClassNameValue;
630
+ };
631
+ };
632
+ } | {}, {
633
+ wrapper: string;
634
+ base: string;
635
+ line: string;
636
+ area: string;
637
+ marker: string;
638
+ }, tailwind_variants.TVReturnType<unknown, {
639
+ wrapper: string;
640
+ base: string;
641
+ line: string;
642
+ area: string;
643
+ marker: string;
644
+ }, undefined, unknown, unknown, undefined>>;
645
+ type SparklineVariantProps = VariantProps<typeof sparklineStyles>;
646
+ type SparklineSlots = keyof ReturnType<typeof sparklineStyles>;
647
+
648
+ type SparklineProps = UnstyledComponentWithSlots<SparklineSlots> & Omit<React.ComponentPropsWithRef<"svg">, "color" | "width" | "height"> & {
649
+ data: number[];
650
+ /** Hue applied as a `text-fg-<hue>` class; the line strokes `currentColor`. */
651
+ color?: ChartHue;
652
+ /** Fills the area under the line with a `currentColor` gradient. */
653
+ showArea?: boolean;
654
+ /** Point labels for the hover bubble (falls back to `#<index>`). */
655
+ labels?: string[];
656
+ valueFormatter?: (value: number) => string;
657
+ /** Shows a marker + label/value bubble at the nearest point (default on). */
658
+ showTooltip?: boolean;
659
+ width?: number;
660
+ height?: number;
661
+ };
662
+ declare const Sparkline: ({ className, classNames, unstyled, data, color, showArea, labels, valueFormatter, showTooltip, width, height, ref, ...props }: SparklineProps) => react_jsx_runtime.JSX.Element;
663
+
664
+ export { BarChart, type BarChartProps, type BarChartSlots, type BarChartVariantProps, type ChartDatum, type ChartHue, ChartLegend, ChartLegendItem, type ChartLegendItemData, type ChartLegendItemProps, type ChartLegendProps, type ChartLegendSlots, type ChartLegendVariantProps, ChartTooltip, type ChartTooltipItem, type ChartTooltipProps, type ChartTooltipSlots, type ChartTooltipVariantProps, DEFAULT_PALETTE, DonutChart, type DonutChartDatum, type DonutChartProps, type DonutChartSlots, type DonutChartVariantProps, GroupedBarChart, type GroupedBarChartProps, type GroupedBarChartSlots, type GroupedBarChartVariantProps, type GroupedChartDatum, HUE_BG_MAP, HUE_BG_SUBTLE_MAP, HUE_ON_BG_FILL_MAP, HUE_STROKE_MAP, HUE_TEXT_MAP, Sparkline, type SparklineProps, type SparklineSlots, type SparklineVariantProps, barChartStyles, chartLegendStyles, chartTooltipStyles, donutChartStyles, groupedBarChartStyles, sparklineStyles };