bruv-ui 0.2.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 (44) hide show
  1. package/dist/area-chart.d.ts +84 -0
  2. package/dist/area-chart.js +2002 -0
  3. package/dist/area-chart.js.map +1 -0
  4. package/dist/bar-chart.d.ts +80 -0
  5. package/dist/bar-chart.js +2251 -0
  6. package/dist/bar-chart.js.map +1 -0
  7. package/dist/chart-background-BK77UXhl.d.ts +9 -0
  8. package/dist/chart-brush-BoxY9aDm.d.ts +72 -0
  9. package/dist/chart-dot-8H287EDv.d.ts +17 -0
  10. package/dist/chart-legend-Dv9pqes-.d.ts +16 -0
  11. package/dist/chart-tooltip-DajpzJRy.d.ts +68 -0
  12. package/dist/charts.d.ts +17 -0
  13. package/dist/charts.js +5097 -0
  14. package/dist/charts.js.map +1 -0
  15. package/dist/composed-chart.d.ts +93 -0
  16. package/dist/composed-chart.js +2338 -0
  17. package/dist/composed-chart.js.map +1 -0
  18. package/dist/form-dK_DJRTw.d.ts +43 -0
  19. package/dist/form-rhf.d.ts +26 -0
  20. package/dist/form-rhf.js +268 -0
  21. package/dist/form-rhf.js.map +1 -0
  22. package/dist/index.d.ts +2881 -0
  23. package/dist/index.js +9368 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/line-chart.d.ts +81 -0
  26. package/dist/line-chart.js +1879 -0
  27. package/dist/line-chart.js.map +1 -0
  28. package/dist/pie-chart.d.ts +64 -0
  29. package/dist/pie-chart.js +1094 -0
  30. package/dist/pie-chart.js.map +1 -0
  31. package/dist/radar-chart.d.ts +67 -0
  32. package/dist/radar-chart.js +1318 -0
  33. package/dist/radar-chart.js.map +1 -0
  34. package/dist/radial-chart.d.ts +56 -0
  35. package/dist/radial-chart.js +1051 -0
  36. package/dist/radial-chart.js.map +1 -0
  37. package/dist/sankey-chart.d.ts +58 -0
  38. package/dist/sankey-chart.js +1179 -0
  39. package/dist/sankey-chart.js.map +1 -0
  40. package/package.json +135 -0
  41. package/src/scales.css +288 -0
  42. package/src/shiki.css +37 -0
  43. package/src/styles.css +23 -0
  44. package/src/theme.css +659 -0
@@ -0,0 +1,81 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { a as ChartConfig, f as TooltipVariant, T as TooltipRoundness } from './chart-tooltip-DajpzJRy.js';
3
+ import { Line as Line$1, LineChart as LineChart$1, CartesianGrid, XAxis as XAxis$1, YAxis as YAxis$1 } from 'recharts';
4
+ import { a as BrushRange } from './chart-brush-BoxY9aDm.js';
5
+ import { b as ChartLegendVariant } from './chart-legend-Dv9pqes-.js';
6
+ import { D as DotVariant } from './chart-dot-8H287EDv.js';
7
+ import { ComponentProps, ReactNode, FC } from 'react';
8
+ import 'recharts/types/component/DefaultTooltipContent';
9
+
10
+ type CurveType = ComponentProps<typeof Line$1>["type"];
11
+ type StrokeVariant = "solid" | "dashed" | "animated-dashed";
12
+ type LineAnimationType = "none" | "left-to-right" | "right-to-left" | "center-out" | "edges-in";
13
+ type ValidateConfigKeys<TData, TConfig> = {
14
+ [K in keyof TConfig]: K extends keyof TData ? ChartConfig[string] : never;
15
+ };
16
+ type LineChartBaseProps<TData extends Record<string, unknown>, TConfig extends Record<string, ChartConfig[string]>> = {
17
+ config: TConfig & ValidateConfigKeys<TData, TConfig>;
18
+ data: TData[];
19
+ children: ReactNode;
20
+ className?: string;
21
+ chartProps?: ComponentProps<typeof LineChart$1>;
22
+ curveType?: CurveType;
23
+ animationType?: LineAnimationType;
24
+ defaultSelectedDataKey?: string | null;
25
+ onSelectionChange?: (selectedDataKey: string | null) => void;
26
+ isLoading?: boolean;
27
+ loadingPoints?: number;
28
+ showBrush?: boolean;
29
+ xDataKey?: keyof TData & string;
30
+ brushHeight?: number;
31
+ brushFormatLabel?: (value: unknown, index: number) => string;
32
+ onBrushChange?: (range: BrushRange) => void;
33
+ };
34
+ type LineChartProps<TData extends Record<string, unknown>, TConfig extends Record<string, ChartConfig[string]>> = LineChartBaseProps<TData, TConfig>;
35
+
36
+ declare function LineChart<TData extends Record<string, unknown>, TConfig extends Record<string, ChartConfig[string]>>({ config, data, children, className, chartProps, curveType, animationType, defaultSelectedDataKey, onSelectionChange, isLoading, loadingPoints, showBrush, xDataKey, brushHeight, brushFormatLabel, onBrushChange, }: LineChartProps<TData, TConfig>): react_jsx_runtime.JSX.Element;
37
+ type LineProps = {
38
+ dataKey: string;
39
+ strokeVariant?: StrokeVariant;
40
+ curveType?: CurveType;
41
+ animationType?: LineAnimationType;
42
+ connectNulls?: boolean;
43
+ isClickable?: boolean;
44
+ enableBufferLine?: boolean;
45
+ children?: ReactNode;
46
+ lineProps?: ComponentProps<typeof Line$1>;
47
+ };
48
+ declare function Line({ dataKey, strokeVariant, curveType, animationType, connectNulls, isClickable, enableBufferLine, children, lineProps, }: LineProps): react_jsx_runtime.JSX.Element | null;
49
+ type DotProps = {
50
+ variant?: DotVariant;
51
+ };
52
+ declare const Dot: FC<DotProps>;
53
+ declare const ActiveDot: FC<DotProps>;
54
+ type XAxisProps = ComponentProps<typeof XAxis$1>;
55
+ declare function XAxis({ tickLine, axisLine, tickMargin, minTickGap, ...props }: XAxisProps): react_jsx_runtime.JSX.Element | null;
56
+ type YAxisProps = ComponentProps<typeof YAxis$1>;
57
+ declare function YAxis({ tickLine, axisLine, tickMargin, minTickGap, width, ...props }: YAxisProps): react_jsx_runtime.JSX.Element | null;
58
+ type GridProps = ComponentProps<typeof CartesianGrid>;
59
+ declare function Grid({ vertical, strokeDasharray, ...props }: GridProps): react_jsx_runtime.JSX.Element;
60
+ type TooltipProps = {
61
+ variant?: TooltipVariant;
62
+ roundness?: TooltipRoundness;
63
+ defaultIndex?: number;
64
+ cursor?: boolean;
65
+ };
66
+ declare function Tooltip({ variant, roundness, defaultIndex, cursor, }: TooltipProps): react_jsx_runtime.JSX.Element | null;
67
+ type LegendProps = {
68
+ variant?: ChartLegendVariant;
69
+ align?: "left" | "center" | "right";
70
+ verticalAlign?: "top" | "middle" | "bottom";
71
+ isClickable?: boolean;
72
+ };
73
+ declare function Legend({ variant, align, verticalAlign, isClickable, }: LegendProps): react_jsx_runtime.JSX.Element;
74
+ declare function useLoadingData(isLoading: boolean, loadingPoints?: number): {
75
+ loadingData: {
76
+ loading: number;
77
+ }[];
78
+ onShimmerExit: () => void;
79
+ };
80
+
81
+ export { ActiveDot, Dot, Grid, Legend, Line, LineChart, type LineChartProps, Tooltip, XAxis, YAxis, useLoadingData };