@nocoo/basalt 2.0.0-rc.1 → 2.0.2
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/charts/area.d.ts +8 -4
- package/dist/charts/area.js +41 -42
- package/dist/charts/area.js.map +1 -1
- package/dist/charts/bar.d.ts +7 -4
- package/dist/charts/bar.js +34 -27
- package/dist/charts/bar.js.map +1 -1
- package/dist/charts/bullet.d.ts +6 -4
- package/dist/charts/bullet.js +18 -23
- package/dist/charts/bullet.js.map +1 -1
- package/dist/charts/chart-colors.d.ts +3 -0
- package/dist/charts/charts.d.ts +6 -4
- package/dist/charts/charts.js +4 -3
- package/dist/charts/charts.js.map +1 -1
- package/dist/charts/config.d.ts +26 -15
- package/dist/charts/config.js +58 -44
- package/dist/charts/config.js.map +1 -1
- package/dist/charts/custom-chart.d.ts +6 -4
- package/dist/charts/custom-chart.js +4 -3
- package/dist/charts/custom-chart.js.map +1 -1
- package/dist/charts/date-navigation.d.ts +5 -0
- package/dist/charts/date-navigation.js.map +1 -1
- package/dist/charts/donut.d.ts +6 -4
- package/dist/charts/donut.js +38 -28
- package/dist/charts/donut.js.map +1 -1
- package/dist/charts/frame.d.ts +7 -3
- package/dist/charts/frame.js +30 -7
- package/dist/charts/frame.js.map +1 -1
- package/dist/charts/funnel.d.ts +6 -4
- package/dist/charts/funnel.js +16 -17
- package/dist/charts/funnel.js.map +1 -1
- package/dist/charts/gauge.d.ts +6 -3
- package/dist/charts/gauge.js +18 -17
- package/dist/charts/gauge.js.map +1 -1
- package/dist/charts/grouped-bar.d.ts +8 -4
- package/dist/charts/grouped-bar.js +36 -29
- package/dist/charts/grouped-bar.js.map +1 -1
- package/dist/charts/heatmap-calendar.d.ts +11 -5
- package/dist/charts/heatmap-calendar.js +25 -20
- package/dist/charts/heatmap-calendar.js.map +1 -1
- package/dist/charts/item-list.d.ts +9 -7
- package/dist/charts/item-list.js +1 -5
- package/dist/charts/item-list.js.map +1 -1
- package/dist/charts/legend.d.ts +7 -0
- package/dist/charts/legend.js +56 -0
- package/dist/charts/legend.js.map +1 -0
- package/dist/charts/line.d.ts +7 -4
- package/dist/charts/line.js +33 -41
- package/dist/charts/line.js.map +1 -1
- package/dist/charts/palette.d.ts +3 -2
- package/dist/charts/palette.js.map +1 -1
- package/dist/charts/radar.d.ts +6 -4
- package/dist/charts/radar.js +18 -18
- package/dist/charts/radar.js.map +1 -1
- package/dist/charts/sample.d.ts +8 -42
- package/dist/charts/sample.js.map +1 -1
- package/dist/charts/sankey.d.ts +5 -4
- package/dist/charts/sankey.js +15 -16
- package/dist/charts/sankey.js.map +1 -1
- package/dist/charts/series.d.ts +48 -0
- package/dist/charts/series.js +19 -0
- package/dist/charts/series.js.map +1 -0
- package/dist/charts/slot-bar.d.ts +12 -5
- package/dist/charts/slot-bar.js +27 -22
- package/dist/charts/slot-bar.js.map +1 -1
- package/dist/charts/sparkline.d.ts +6 -4
- package/dist/charts/sparkline.js +12 -11
- package/dist/charts/sparkline.js.map +1 -1
- package/dist/charts/stacked-bar.d.ts +8 -4
- package/dist/charts/stacked-bar.js +40 -37
- package/dist/charts/stacked-bar.js.map +1 -1
- package/dist/charts/stat-card.d.ts +7 -5
- package/dist/charts/stat-card.js +1 -1
- package/dist/charts/stat-card.js.map +1 -1
- package/dist/charts/timeline.d.ts +15 -8
- package/dist/charts/timeline.js +9 -14
- package/dist/charts/timeline.js.map +1 -1
- package/dist/charts/timeseries.d.ts +6 -4
- package/dist/charts/timeseries.js +4 -3
- package/dist/charts/timeseries.js.map +1 -1
- package/dist/charts/tooltip.d.ts +16 -0
- package/dist/charts/tooltip.js +105 -0
- package/dist/charts/tooltip.js.map +1 -0
- package/dist/components/alert-dialog.js +1 -0
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/button.js +2 -2
- package/dist/components/button.js.map +1 -1
- package/dist/components/confirm-dialog.d.ts +5 -1
- package/dist/components/confirm-dialog.js +52 -25
- package/dist/components/confirm-dialog.js.map +1 -1
- package/dist/components/delete-resource.d.ts +5 -0
- package/dist/components/delete-resource.js +38 -0
- package/dist/components/delete-resource.js.map +1 -0
- package/dist/components/description-list.d.ts +21 -0
- package/dist/components/description-list.js +35 -0
- package/dist/components/description-list.js.map +1 -0
- package/dist/components/dialog.js +2 -1
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/layer-card.d.ts +23 -4
- package/dist/components/layer-card.js +83 -50
- package/dist/components/layer-card.js.map +1 -1
- package/dist/components/loading-screen.js +9 -5
- package/dist/components/loading-screen.js.map +1 -1
- package/dist/components/page-header.d.ts +4 -4
- package/dist/components/page-header.js +20 -23
- package/dist/components/page-header.js.map +1 -1
- package/dist/components/resource-list.d.ts +10 -0
- package/dist/components/resource-list.js +30 -0
- package/dist/components/resource-list.js.map +1 -0
- package/dist/components/section-rule.d.ts +10 -0
- package/dist/components/section-rule.js +44 -0
- package/dist/components/section-rule.js.map +1 -0
- package/dist/components/sheet.d.ts +4 -4
- package/dist/components/sheet.js +5 -4
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/sidebar.js +1 -0
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/table.js +6 -5
- package/dist/components/table.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +26 -25
- package/dist/providers/accent.d.ts +23 -0
- package/dist/providers/accent.js +232 -0
- package/dist/providers/accent.js.map +1 -0
- package/dist/styles/standalone.css +274 -111
- package/dist/styles/tailwind.css +1 -0
- package/dist/styles/tokens.css +69 -0
- package/dist/utils/control-surface.d.ts +1 -1
- package/dist/utils/control-surface.js +1 -1
- package/dist/utils/control-surface.js.map +1 -1
- package/package.json +1 -1
package/dist/charts/area.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { type XYPoint } from "./
|
|
2
|
-
export
|
|
3
|
-
data
|
|
1
|
+
import { type XYPoint, type XYSeriesDescriptor } from "./series.js";
|
|
2
|
+
export type AreaChartProps = {
|
|
3
|
+
data: XYPoint[];
|
|
4
|
+
series?: XYSeriesDescriptor[];
|
|
4
5
|
ariaLabel?: string;
|
|
5
6
|
className?: string;
|
|
6
7
|
showAxes?: boolean;
|
|
8
|
+
showLegend?: boolean;
|
|
7
9
|
stacked?: boolean;
|
|
8
|
-
|
|
10
|
+
valueFormatter?: (value: number) => string;
|
|
11
|
+
};
|
|
12
|
+
export declare function AreaChart({ data, series, ariaLabel, className, showAxes, showLegend, stacked, valueFormatter, }: AreaChartProps): import("react").JSX.Element;
|
package/dist/charts/area.js
CHANGED
|
@@ -1,55 +1,54 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { jsx as
|
|
7
|
-
import { Area as
|
|
2
|
+
import { ANIMATION_PROPS as e, CHART_PLOT_MARGIN as t, CHART_PLOT_MARGIN_BARE as n, CHART_TYPE as r, GRID_PROPS as i, cartesianAxisProps as a, chartTooltipProps as o, seriesColor as s } from "./config.js";
|
|
3
|
+
import { resolveChartSeries as c, xyFallbackKeys as l } from "./series.js";
|
|
4
|
+
import { ChartShell as u } from "./frame.js";
|
|
5
|
+
import { ChartLegend as d } from "./legend.js";
|
|
6
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
+
import { Area as m, AreaChart as h, CartesianGrid as g, Tooltip as _, XAxis as v, YAxis as y } from "recharts";
|
|
8
8
|
//#region src/charts/area.tsx
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
ariaLabel:
|
|
13
|
-
className:
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
function b({ data: b, series: x, ariaLabel: S = "Area chart", className: C, showAxes: w = !1, showLegend: T = !1, stacked: E = !1, valueFormatter: D }) {
|
|
10
|
+
let O = c(x, l(b)), k = E ? "stack" : void 0;
|
|
11
|
+
return /* @__PURE__ */ f(u, {
|
|
12
|
+
ariaLabel: S,
|
|
13
|
+
className: C,
|
|
14
|
+
legend: T ? /* @__PURE__ */ f(d, {
|
|
15
|
+
items: O,
|
|
16
|
+
shape: "area"
|
|
17
|
+
}) : void 0,
|
|
18
|
+
children: /* @__PURE__ */ p(h, {
|
|
19
|
+
data: b,
|
|
20
|
+
margin: w ? t : n,
|
|
16
21
|
children: [
|
|
17
|
-
|
|
18
|
-
/* @__PURE__ */
|
|
22
|
+
w ? /* @__PURE__ */ f(g, { ...i }) : null,
|
|
23
|
+
/* @__PURE__ */ f(v, {
|
|
19
24
|
dataKey: "x",
|
|
20
|
-
...
|
|
25
|
+
...a(!w)
|
|
21
26
|
}),
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
dataKey: "y",
|
|
26
|
-
stackId: C,
|
|
27
|
-
stroke: e[0],
|
|
28
|
-
fill: e[0],
|
|
29
|
-
fillOpacity: n.areaFillAlpha,
|
|
30
|
-
...t
|
|
27
|
+
/* @__PURE__ */ f(y, {
|
|
28
|
+
...a(!w),
|
|
29
|
+
tickFormatter: D
|
|
31
30
|
}),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
})
|
|
31
|
+
/* @__PURE__ */ f(_, { ...o({
|
|
32
|
+
formatter: D,
|
|
33
|
+
cursor: "line"
|
|
34
|
+
}) }),
|
|
35
|
+
O.map((t, n) => {
|
|
36
|
+
let i = s(t, n);
|
|
37
|
+
return /* @__PURE__ */ f(m, {
|
|
38
|
+
dataKey: t.key,
|
|
39
|
+
name: t.label ?? t.key,
|
|
40
|
+
stackId: k,
|
|
41
|
+
stroke: i,
|
|
42
|
+
fill: i,
|
|
43
|
+
fillOpacity: r.areaFillAlpha,
|
|
44
|
+
...e
|
|
45
|
+
}, t.key);
|
|
46
|
+
})
|
|
48
47
|
]
|
|
49
48
|
})
|
|
50
49
|
});
|
|
51
50
|
}
|
|
52
51
|
//#endregion
|
|
53
|
-
export {
|
|
52
|
+
export { b as AreaChart };
|
|
54
53
|
|
|
55
54
|
//# sourceMappingURL=area.js.map
|
package/dist/charts/area.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"area.js","names":[],"sources":["../../src/charts/area.tsx"],"sourcesContent":["import { Area, CartesianGrid, AreaChart as RechartsArea, Tooltip, XAxis, YAxis } from \"recharts\";\nimport {\n\tANIMATION_PROPS,\n\tCHART_TYPE,\n\tcartesianAxisProps,\n\tchartTooltipProps,\n\tGRID_PROPS,\n} from \"./config\";\nimport {
|
|
1
|
+
{"version":3,"file":"area.js","names":[],"sources":["../../src/charts/area.tsx"],"sourcesContent":["import { Area, CartesianGrid, AreaChart as RechartsArea, Tooltip, XAxis, YAxis } from \"recharts\";\nimport {\n\tANIMATION_PROPS,\n\tCHART_PLOT_MARGIN,\n\tCHART_PLOT_MARGIN_BARE,\n\tCHART_TYPE,\n\tcartesianAxisProps,\n\tchartTooltipProps,\n\tGRID_PROPS,\n\tseriesColor,\n} from \"./config\";\nimport { ChartShell } from \"./frame\";\nimport { ChartLegend } from \"./legend\";\nimport {\n\tresolveChartSeries,\n\ttype XYPoint,\n\ttype XYSeriesDescriptor,\n\txyFallbackKeys,\n} from \"./series\";\n\nexport type AreaChartProps = {\n\tdata: XYPoint[];\n\tseries?: XYSeriesDescriptor[];\n\tariaLabel?: string;\n\tclassName?: string;\n\tshowAxes?: boolean;\n\tshowLegend?: boolean;\n\tstacked?: boolean;\n\tvalueFormatter?: (value: number) => string;\n};\n\nexport function AreaChart({\n\tdata,\n\tseries,\n\tariaLabel = \"Area chart\",\n\tclassName,\n\tshowAxes = false,\n\tshowLegend = false,\n\tstacked = false,\n\tvalueFormatter,\n}: AreaChartProps) {\n\tconst areas = resolveChartSeries(series, xyFallbackKeys(data));\n\tconst stackId = stacked ? \"stack\" : undefined;\n\treturn (\n\t\t<ChartShell\n\t\t\tariaLabel={ariaLabel}\n\t\t\tclassName={className}\n\t\t\tlegend={showLegend ? <ChartLegend items={areas} shape=\"area\" /> : undefined}\n\t\t>\n\t\t\t<RechartsArea data={data} margin={showAxes ? CHART_PLOT_MARGIN : CHART_PLOT_MARGIN_BARE}>\n\t\t\t\t{showAxes ? <CartesianGrid {...GRID_PROPS} /> : null}\n\t\t\t\t<XAxis dataKey=\"x\" {...cartesianAxisProps(!showAxes)} />\n\t\t\t\t<YAxis {...cartesianAxisProps(!showAxes)} tickFormatter={valueFormatter} />\n\t\t\t\t<Tooltip {...chartTooltipProps({ formatter: valueFormatter, cursor: \"line\" })} />\n\t\t\t\t{areas.map((item, index) => {\n\t\t\t\t\tconst fill = seriesColor(item, index);\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Area\n\t\t\t\t\t\t\tkey={item.key}\n\t\t\t\t\t\t\tdataKey={item.key}\n\t\t\t\t\t\t\tname={item.label ?? item.key}\n\t\t\t\t\t\t\tstackId={stackId}\n\t\t\t\t\t\t\tstroke={fill}\n\t\t\t\t\t\t\tfill={fill}\n\t\t\t\t\t\t\tfillOpacity={CHART_TYPE.areaFillAlpha}\n\t\t\t\t\t\t\t{...ANIMATION_PROPS}\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</RechartsArea>\n\t\t</ChartShell>\n\t);\n}\n"],"mappings":";;;;;;;;AA+BA,SAAgB,EAAU,EACzB,SACA,WACA,eAAY,cACZ,cACA,cAAW,IACX,gBAAa,IACb,aAAU,IACV,qBACkB;CAClB,IAAM,IAAQ,EAAmB,GAAQ,EAAe,CAAI,CAAC,GACvD,IAAU,IAAU,UAAU,KAAA;CACpC,OACC,kBAAC,GAAD;EACY;EACA;EACX,QAAQ,IAAa,kBAAC,GAAD;GAAa,OAAO;GAAO,OAAM;EAAQ,CAAA,IAAI,KAAA;EAElE,UAAA,kBAAC,GAAD;GAAoB;GAAM,QAAQ,IAAW,IAAoB;GAAjE,UAAA;IACE,IAAW,kBAAC,GAAD,EAAe,GAAI,EAAa,CAAA,IAAI;IAChD,kBAAC,GAAD;KAAO,SAAQ;KAAI,GAAI,EAAmB,CAAC,CAAQ;IAAI,CAAA;IACvD,kBAAC,GAAD;KAAO,GAAI,EAAmB,CAAC,CAAQ;KAAG,eAAe;IAAiB,CAAA;IAC1E,kBAAC,GAAD,EAAS,GAAI,EAAkB;KAAE,WAAW;KAAgB,QAAQ;IAAO,CAAC,EAAI,CAAA;IAC/E,EAAM,KAAK,GAAM,MAAU;KAC3B,IAAM,IAAO,EAAY,GAAM,CAAK;KACpC,OACC,kBAAC,GAAD;MAEC,SAAS,EAAK;MACd,MAAM,EAAK,SAAS,EAAK;MAChB;MACT,QAAQ;MACF;MACN,aAAa,EAAW;MACxB,GAAI;KACJ,GARK,EAAK,GAQV;IAEH,CAAC;GACY;;CACH,CAAA;AAEd"}
|
package/dist/charts/bar.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { type XYPoint } from "./
|
|
2
|
-
export
|
|
3
|
-
data
|
|
1
|
+
import { type XYPoint, type XYSeriesDescriptor } from "./series.js";
|
|
2
|
+
export type BarChartProps = {
|
|
3
|
+
data: XYPoint[];
|
|
4
|
+
series?: XYSeriesDescriptor[];
|
|
4
5
|
ariaLabel?: string;
|
|
5
6
|
className?: string;
|
|
6
7
|
showAxes?: boolean;
|
|
8
|
+
showLegend?: boolean;
|
|
7
9
|
color?: string;
|
|
8
10
|
valueFormatter?: (value: number) => string;
|
|
9
|
-
}
|
|
11
|
+
};
|
|
12
|
+
export declare function BarChart({ data, series, ariaLabel, className, showAxes, showLegend, color, valueFormatter, }: BarChartProps): import("react").JSX.Element;
|
package/dist/charts/bar.js
CHANGED
|
@@ -1,42 +1,49 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { jsx as
|
|
7
|
-
import { Bar as
|
|
2
|
+
import { ANIMATION_PROPS as e, BAR_RADIUS as t, CHART_PLOT_MARGIN as n, CHART_PLOT_MARGIN_BARE as r, GRID_PROPS as i, cartesianAxisProps as a, chartTooltipProps as o, seriesColor as s } from "./config.js";
|
|
3
|
+
import { applyLeadColor as c, resolveChartSeries as l } from "./series.js";
|
|
4
|
+
import { ChartShell as u } from "./frame.js";
|
|
5
|
+
import { ChartLegend as d } from "./legend.js";
|
|
6
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
+
import { Bar as m, BarChart as h, CartesianGrid as g, Tooltip as _, XAxis as v, YAxis as y } from "recharts";
|
|
8
8
|
//#region src/charts/bar.tsx
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
function b({ data: b, series: x, ariaLabel: S = "Bar chart", className: C, showAxes: w = !1, showLegend: T = !1, color: E, valueFormatter: D }) {
|
|
10
|
+
let O = c(l(x, ["y"]), E);
|
|
11
|
+
return /* @__PURE__ */ f(u, {
|
|
12
|
+
ariaLabel: S,
|
|
13
|
+
className: C,
|
|
14
|
+
legend: T ? /* @__PURE__ */ f(d, {
|
|
15
|
+
items: O,
|
|
16
|
+
shape: "bar"
|
|
17
|
+
}) : void 0,
|
|
18
|
+
children: /* @__PURE__ */ p(h, {
|
|
19
|
+
data: b,
|
|
20
|
+
margin: w ? n : r,
|
|
15
21
|
children: [
|
|
16
|
-
|
|
17
|
-
/* @__PURE__ */
|
|
22
|
+
w ? /* @__PURE__ */ f(g, { ...i }) : null,
|
|
23
|
+
/* @__PURE__ */ f(v, {
|
|
18
24
|
dataKey: "x",
|
|
19
|
-
...
|
|
25
|
+
...a(!w)
|
|
20
26
|
}),
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
...
|
|
23
|
-
tickFormatter:
|
|
27
|
+
/* @__PURE__ */ f(y, {
|
|
28
|
+
...a(!w),
|
|
29
|
+
tickFormatter: D
|
|
24
30
|
}),
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
formatter:
|
|
31
|
+
/* @__PURE__ */ f(_, { ...o({
|
|
32
|
+
formatter: D,
|
|
27
33
|
cursor: "bar"
|
|
28
34
|
}) }),
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
dataKey:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
O.map((n, r) => /* @__PURE__ */ f(m, {
|
|
36
|
+
dataKey: n.key,
|
|
37
|
+
name: n.label ?? n.key,
|
|
38
|
+
fill: s(n, r),
|
|
39
|
+
radius: t.vertical,
|
|
40
|
+
...e
|
|
41
|
+
}, n.key))
|
|
35
42
|
]
|
|
36
43
|
})
|
|
37
44
|
});
|
|
38
45
|
}
|
|
39
46
|
//#endregion
|
|
40
|
-
export {
|
|
47
|
+
export { b as BarChart };
|
|
41
48
|
|
|
42
49
|
//# sourceMappingURL=bar.js.map
|
package/dist/charts/bar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bar.js","names":[],"sources":["../../src/charts/bar.tsx"],"sourcesContent":["import { Bar, CartesianGrid, BarChart as RechartsBar, Tooltip, XAxis, YAxis } from \"recharts\";\nimport {\n\tANIMATION_PROPS,\n\tBAR_RADIUS,\n\tcartesianAxisProps,\n\tchartTooltipProps,\n\tGRID_PROPS,\n} from \"./config\";\nimport {
|
|
1
|
+
{"version":3,"file":"bar.js","names":[],"sources":["../../src/charts/bar.tsx"],"sourcesContent":["import { Bar, CartesianGrid, BarChart as RechartsBar, Tooltip, XAxis, YAxis } from \"recharts\";\nimport {\n\tANIMATION_PROPS,\n\tBAR_RADIUS,\n\tCHART_PLOT_MARGIN,\n\tCHART_PLOT_MARGIN_BARE,\n\tcartesianAxisProps,\n\tchartTooltipProps,\n\tGRID_PROPS,\n\tseriesColor,\n} from \"./config\";\nimport { ChartShell } from \"./frame\";\nimport { ChartLegend } from \"./legend\";\nimport {\n\tapplyLeadColor,\n\tresolveChartSeries,\n\ttype XYPoint,\n\ttype XYSeriesDescriptor,\n} from \"./series\";\n\nexport type BarChartProps = {\n\tdata: XYPoint[];\n\tseries?: XYSeriesDescriptor[];\n\tariaLabel?: string;\n\tclassName?: string;\n\tshowAxes?: boolean;\n\tshowLegend?: boolean;\n\tcolor?: string;\n\tvalueFormatter?: (value: number) => string;\n};\n\nexport function BarChart({\n\tdata,\n\tseries,\n\tariaLabel = \"Bar chart\",\n\tclassName,\n\tshowAxes = false,\n\tshowLegend = false,\n\tcolor,\n\tvalueFormatter,\n}: BarChartProps) {\n\tconst bars = applyLeadColor(resolveChartSeries(series, [\"y\"]), color);\n\treturn (\n\t\t<ChartShell\n\t\t\tariaLabel={ariaLabel}\n\t\t\tclassName={className}\n\t\t\tlegend={showLegend ? <ChartLegend items={bars} shape=\"bar\" /> : undefined}\n\t\t>\n\t\t\t<RechartsBar data={data} margin={showAxes ? CHART_PLOT_MARGIN : CHART_PLOT_MARGIN_BARE}>\n\t\t\t\t{showAxes ? <CartesianGrid {...GRID_PROPS} /> : null}\n\t\t\t\t<XAxis dataKey=\"x\" {...cartesianAxisProps(!showAxes)} />\n\t\t\t\t<YAxis {...cartesianAxisProps(!showAxes)} tickFormatter={valueFormatter} />\n\t\t\t\t<Tooltip {...chartTooltipProps({ formatter: valueFormatter, cursor: \"bar\" })} />\n\t\t\t\t{bars.map((item, index) => (\n\t\t\t\t\t<Bar\n\t\t\t\t\t\tkey={item.key}\n\t\t\t\t\t\tdataKey={item.key}\n\t\t\t\t\t\tname={item.label ?? item.key}\n\t\t\t\t\t\tfill={seriesColor(item, index)}\n\t\t\t\t\t\tradius={BAR_RADIUS.vertical}\n\t\t\t\t\t\t{...ANIMATION_PROPS}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</RechartsBar>\n\t\t</ChartShell>\n\t);\n}\n"],"mappings":";;;;;;;;AA+BA,SAAgB,EAAS,EACxB,SACA,WACA,eAAY,aACZ,cACA,cAAW,IACX,gBAAa,IACb,UACA,qBACiB;CACjB,IAAM,IAAO,EAAe,EAAmB,GAAQ,CAAC,GAAG,CAAC,GAAG,CAAK;CACpE,OACC,kBAAC,GAAD;EACY;EACA;EACX,QAAQ,IAAa,kBAAC,GAAD;GAAa,OAAO;GAAM,OAAM;EAAO,CAAA,IAAI,KAAA;EAEhE,UAAA,kBAAC,GAAD;GAAmB;GAAM,QAAQ,IAAW,IAAoB;GAAhE,UAAA;IACE,IAAW,kBAAC,GAAD,EAAe,GAAI,EAAa,CAAA,IAAI;IAChD,kBAAC,GAAD;KAAO,SAAQ;KAAI,GAAI,EAAmB,CAAC,CAAQ;IAAI,CAAA;IACvD,kBAAC,GAAD;KAAO,GAAI,EAAmB,CAAC,CAAQ;KAAG,eAAe;IAAiB,CAAA;IAC1E,kBAAC,GAAD,EAAS,GAAI,EAAkB;KAAE,WAAW;KAAgB,QAAQ;IAAM,CAAC,EAAI,CAAA;IAC9E,EAAK,KAAK,GAAM,MAChB,kBAAC,GAAD;KAEC,SAAS,EAAK;KACd,MAAM,EAAK,SAAS,EAAK;KACzB,MAAM,EAAY,GAAM,CAAK;KAC7B,QAAQ,EAAW;KACnB,GAAI;IACJ,GANK,EAAK,GAMV,CACD;GACW;;CACF,CAAA;AAEd"}
|
package/dist/charts/bullet.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { type BulletPoint } from "./
|
|
2
|
-
export
|
|
3
|
-
data
|
|
1
|
+
import { type BulletPoint, type BulletSeriesDescriptor } from "./series.js";
|
|
2
|
+
export type BulletChartProps = {
|
|
3
|
+
data: BulletPoint[];
|
|
4
|
+
series?: BulletSeriesDescriptor[];
|
|
4
5
|
ariaLabel?: string;
|
|
5
6
|
className?: string;
|
|
6
7
|
showAxes?: boolean;
|
|
7
8
|
valueFormatter?: (value: number) => string;
|
|
8
|
-
}
|
|
9
|
+
};
|
|
10
|
+
export declare function BulletChart({ data, series, ariaLabel, className, showAxes, valueFormatter, }: BulletChartProps): import("react").JSX.Element;
|
package/dist/charts/bullet.js
CHANGED
|
@@ -1,45 +1,40 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { BULLET_SAMPLE as i } from "./sample.js";
|
|
2
|
+
import { ANIMATION_PROPS as e, cartesianAxisProps as t, chartTooltipProps as n, seriesColor as r } from "./config.js";
|
|
3
|
+
import { resolveChartSeries as i } from "./series.js";
|
|
5
4
|
import { ChartFrame as a } from "./frame.js";
|
|
6
5
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
6
|
import { Bar as c, BarChart as l, Tooltip as u, XAxis as d, YAxis as f } from "recharts";
|
|
8
7
|
//#region src/charts/bullet.tsx
|
|
9
|
-
function p({ data: p
|
|
8
|
+
function p({ data: p, series: m, ariaLabel: h = "Bullet chart", className: g, showAxes: _ = !0, valueFormatter: v }) {
|
|
9
|
+
let y = i(m, ["target", "value"]);
|
|
10
10
|
return /* @__PURE__ */ o(a, {
|
|
11
|
-
ariaLabel:
|
|
12
|
-
className:
|
|
11
|
+
ariaLabel: h,
|
|
12
|
+
className: g,
|
|
13
13
|
children: /* @__PURE__ */ s(l, {
|
|
14
14
|
data: p,
|
|
15
15
|
layout: "vertical",
|
|
16
16
|
children: [
|
|
17
17
|
/* @__PURE__ */ o(d, {
|
|
18
18
|
type: "number",
|
|
19
|
-
...
|
|
20
|
-
tickFormatter:
|
|
19
|
+
...t(!_),
|
|
20
|
+
tickFormatter: v
|
|
21
21
|
}),
|
|
22
22
|
/* @__PURE__ */ o(f, {
|
|
23
23
|
type: "category",
|
|
24
24
|
dataKey: "name",
|
|
25
|
-
...
|
|
25
|
+
...t(!_)
|
|
26
26
|
}),
|
|
27
|
-
/* @__PURE__ */ o(u, { ...
|
|
28
|
-
formatter:
|
|
27
|
+
/* @__PURE__ */ o(u, { ...n({
|
|
28
|
+
formatter: v,
|
|
29
29
|
cursor: "bar"
|
|
30
30
|
}) }),
|
|
31
|
-
/* @__PURE__ */ o(c, {
|
|
32
|
-
dataKey:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
dataKey: "value",
|
|
39
|
-
fill: e[1],
|
|
40
|
-
barSize: 6,
|
|
41
|
-
...t
|
|
42
|
-
})
|
|
31
|
+
y.map((t) => /* @__PURE__ */ o(c, {
|
|
32
|
+
dataKey: t.key,
|
|
33
|
+
name: t.label ?? t.key,
|
|
34
|
+
fill: r(t, t.key === "target" ? 6 : 1),
|
|
35
|
+
barSize: t.key === "target" ? 10 : 6,
|
|
36
|
+
...e
|
|
37
|
+
}, t.key))
|
|
43
38
|
]
|
|
44
39
|
})
|
|
45
40
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bullet.js","names":[],"sources":["../../src/charts/bullet.tsx"],"sourcesContent":["import { Bar, BarChart as RechartsBar, Tooltip, XAxis, YAxis } from \"recharts\";\nimport { ANIMATION_PROPS, cartesianAxisProps, chartTooltipProps } from \"./config\";\nimport { ChartFrame } from \"./frame\";\nimport {
|
|
1
|
+
{"version":3,"file":"bullet.js","names":[],"sources":["../../src/charts/bullet.tsx"],"sourcesContent":["import { Bar, BarChart as RechartsBar, Tooltip, XAxis, YAxis } from \"recharts\";\nimport { ANIMATION_PROPS, cartesianAxisProps, chartTooltipProps, seriesColor } from \"./config\";\nimport { ChartFrame } from \"./frame\";\nimport { type BulletPoint, type BulletSeriesDescriptor, resolveChartSeries } from \"./series\";\n\nexport type BulletChartProps = {\n\tdata: BulletPoint[];\n\tseries?: BulletSeriesDescriptor[];\n\tariaLabel?: string;\n\tclassName?: string;\n\tshowAxes?: boolean;\n\tvalueFormatter?: (value: number) => string;\n};\n\nexport function BulletChart({\n\tdata,\n\tseries,\n\tariaLabel = \"Bullet chart\",\n\tclassName,\n\tshowAxes = true,\n\tvalueFormatter,\n}: BulletChartProps) {\n\tconst bars = resolveChartSeries(series, [\"target\", \"value\"]);\n\treturn (\n\t\t<ChartFrame ariaLabel={ariaLabel} className={className}>\n\t\t\t<RechartsBar data={data} layout=\"vertical\">\n\t\t\t\t<XAxis type=\"number\" {...cartesianAxisProps(!showAxes)} tickFormatter={valueFormatter} />\n\t\t\t\t<YAxis type=\"category\" dataKey=\"name\" {...cartesianAxisProps(!showAxes)} />\n\t\t\t\t<Tooltip {...chartTooltipProps({ formatter: valueFormatter, cursor: \"bar\" })} />\n\t\t\t\t{bars.map((item) => (\n\t\t\t\t\t<Bar\n\t\t\t\t\t\tkey={item.key}\n\t\t\t\t\t\tdataKey={item.key}\n\t\t\t\t\t\tname={item.label ?? item.key}\n\t\t\t\t\t\tfill={seriesColor(item, item.key === \"target\" ? 6 : 1)}\n\t\t\t\t\t\tbarSize={item.key === \"target\" ? 10 : 6}\n\t\t\t\t\t\t{...ANIMATION_PROPS}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</RechartsBar>\n\t\t</ChartFrame>\n\t);\n}\n"],"mappings":";;;;;;;AAcA,SAAgB,EAAY,EAC3B,SACA,WACA,eAAY,gBACZ,cACA,cAAW,IACX,qBACoB;CACpB,IAAM,IAAO,EAAmB,GAAQ,CAAC,UAAU,OAAO,CAAC;CAC3D,OACC,kBAAC,GAAD;EAAuB;EAAsB;EAC5C,UAAA,kBAAC,GAAD;GAAmB;GAAM,QAAO;GAAhC,UAAA;IACC,kBAAC,GAAD;KAAO,MAAK;KAAS,GAAI,EAAmB,CAAC,CAAQ;KAAG,eAAe;IAAiB,CAAA;IACxF,kBAAC,GAAD;KAAO,MAAK;KAAW,SAAQ;KAAO,GAAI,EAAmB,CAAC,CAAQ;IAAI,CAAA;IAC1E,kBAAC,GAAD,EAAS,GAAI,EAAkB;KAAE,WAAW;KAAgB,QAAQ;IAAM,CAAC,EAAI,CAAA;IAC9E,EAAK,KAAK,MACV,kBAAC,GAAD;KAEC,SAAS,EAAK;KACd,MAAM,EAAK,SAAS,EAAK;KACzB,MAAM,EAAY,GAAM,EAAK,QAAQ,WAAW,IAAI,CAAC;KACrD,SAAS,EAAK,QAAQ,WAAW,KAAK;KACtC,GAAI;IACJ,GANK,EAAK,GAMV,CACD;GACW;;CACF,CAAA;AAEd"}
|
package/dist/charts/charts.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { XYPoint } from "./
|
|
2
|
-
export
|
|
3
|
-
data
|
|
1
|
+
import type { XYPoint, XYSeriesDescriptor } from "./series.js";
|
|
2
|
+
export type ChartsProps = {
|
|
3
|
+
data: XYPoint[];
|
|
4
|
+
series?: XYSeriesDescriptor[];
|
|
4
5
|
ariaLabel?: string;
|
|
5
6
|
className?: string;
|
|
6
|
-
}
|
|
7
|
+
};
|
|
8
|
+
export declare function Charts({ data, series, ariaLabel, className }: ChartsProps): import("react").JSX.Element;
|
package/dist/charts/charts.js
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
import { LineChart as e } from "./line.js";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
4
|
//#region src/charts/charts.tsx
|
|
5
|
-
function n({ data: n,
|
|
5
|
+
function n({ data: n, series: r, ariaLabel: i = "Charts", className: a }) {
|
|
6
6
|
return /* @__PURE__ */ t(e, {
|
|
7
7
|
data: n,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
series: r,
|
|
9
|
+
ariaLabel: i,
|
|
10
|
+
className: a
|
|
10
11
|
});
|
|
11
12
|
}
|
|
12
13
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charts.js","names":[],"sources":["../../src/charts/charts.tsx"],"sourcesContent":["import { LineChart } from \"./line\";\nimport type { XYPoint } from \"./
|
|
1
|
+
{"version":3,"file":"charts.js","names":[],"sources":["../../src/charts/charts.tsx"],"sourcesContent":["import { LineChart } from \"./line\";\nimport type { XYPoint, XYSeriesDescriptor } from \"./series\";\n\nexport type ChartsProps = {\n\tdata: XYPoint[];\n\tseries?: XYSeriesDescriptor[];\n\tariaLabel?: string;\n\tclassName?: string;\n};\n\nexport function Charts({ data, series, ariaLabel = \"Charts\", className }: ChartsProps) {\n\treturn <LineChart data={data} series={series} ariaLabel={ariaLabel} className={className} />;\n}\n"],"mappings":";;;;AAUA,SAAgB,EAAO,EAAE,SAAM,WAAQ,eAAY,UAAU,gBAA0B;CACtF,OAAO,kBAAC,GAAD;EAAiB;EAAc;EAAmB;EAAsB;CAAY,CAAA;AAC5F"}
|
package/dist/charts/config.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ChartSeriesDescriptor } from "./series.js";
|
|
2
|
+
export type { ChartSeriesDescriptor } from "./series.js";
|
|
1
3
|
export type ChartTypeFace = "axis" | "legend" | "tooltipTitle" | "tooltipBody";
|
|
2
4
|
export declare const CHART_TYPE: {
|
|
3
5
|
readonly axisFontSize: 11;
|
|
@@ -62,8 +64,10 @@ export declare function chartTooltipContentStyle(): {
|
|
|
62
64
|
background: string;
|
|
63
65
|
border: string;
|
|
64
66
|
borderRadius: string;
|
|
67
|
+
boxShadow: string;
|
|
65
68
|
fontSize: number;
|
|
66
69
|
color: string;
|
|
70
|
+
padding: string;
|
|
67
71
|
};
|
|
68
72
|
export declare function chartTooltipProps(options?: {
|
|
69
73
|
formatter?: (value: number) => string;
|
|
@@ -72,6 +76,10 @@ export declare function chartTooltipProps(options?: {
|
|
|
72
76
|
isAnimationActive: boolean;
|
|
73
77
|
animationDuration: number;
|
|
74
78
|
offset: number;
|
|
79
|
+
allowEscapeViewBox: {
|
|
80
|
+
x: boolean;
|
|
81
|
+
y: boolean;
|
|
82
|
+
};
|
|
75
83
|
cursor: boolean | {
|
|
76
84
|
readonly stroke: string;
|
|
77
85
|
readonly strokeOpacity: 0.35;
|
|
@@ -84,30 +92,21 @@ export declare function chartTooltipProps(options?: {
|
|
|
84
92
|
outline: string;
|
|
85
93
|
zIndex: number;
|
|
86
94
|
pointerEvents: "none";
|
|
95
|
+
transition: string;
|
|
96
|
+
animation: string;
|
|
87
97
|
};
|
|
88
98
|
contentStyle: {
|
|
89
99
|
background: string;
|
|
90
100
|
border: string;
|
|
91
101
|
borderRadius: string;
|
|
102
|
+
boxShadow: string;
|
|
92
103
|
fontSize: number;
|
|
93
104
|
color: string;
|
|
105
|
+
padding: string;
|
|
94
106
|
};
|
|
95
|
-
|
|
96
|
-
fontSize: number;
|
|
97
|
-
color: string;
|
|
98
|
-
};
|
|
99
|
-
itemStyle: {
|
|
100
|
-
fontSize: number;
|
|
101
|
-
};
|
|
102
|
-
formatter: ((value: unknown) => string | undefined) | undefined;
|
|
103
|
-
};
|
|
104
|
-
export declare function chartLegendProps(): {
|
|
105
|
-
wrapperStyle: {
|
|
106
|
-
fontSize: number;
|
|
107
|
-
color: string;
|
|
108
|
-
};
|
|
109
|
-
iconSize: number;
|
|
107
|
+
content: never;
|
|
110
108
|
};
|
|
109
|
+
export declare function seriesColor(series: ChartSeriesDescriptor | undefined, index: number): string | undefined;
|
|
111
110
|
export declare const RESPONSIVE_CONTAINER_PROPS: {
|
|
112
111
|
width: "100%";
|
|
113
112
|
height: "100%";
|
|
@@ -115,3 +114,15 @@ export declare const RESPONSIVE_CONTAINER_PROPS: {
|
|
|
115
114
|
minHeight: number;
|
|
116
115
|
debounce: number;
|
|
117
116
|
};
|
|
117
|
+
export declare const CHART_PLOT_MARGIN: {
|
|
118
|
+
readonly top: 4;
|
|
119
|
+
readonly right: 4;
|
|
120
|
+
readonly bottom: 0;
|
|
121
|
+
readonly left: 0;
|
|
122
|
+
};
|
|
123
|
+
export declare const CHART_PLOT_MARGIN_BARE: {
|
|
124
|
+
readonly top: 2;
|
|
125
|
+
readonly right: 2;
|
|
126
|
+
readonly bottom: 2;
|
|
127
|
+
readonly left: 2;
|
|
128
|
+
};
|
package/dist/charts/config.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { CHART_COLORS as e, chartAxis as t, withAlpha as n } from "./palette.js";
|
|
3
|
+
import { ChartTooltipContent as r } from "./tooltip.js";
|
|
4
|
+
import { createElement as i } from "react";
|
|
3
5
|
//#region src/charts/config.ts
|
|
4
|
-
var
|
|
6
|
+
var a = {
|
|
5
7
|
axisFontSize: 11,
|
|
6
8
|
legendFontSize: 12,
|
|
7
9
|
tooltipTitleSize: 12,
|
|
@@ -12,40 +14,40 @@ var r = {
|
|
|
12
14
|
gridOpacity: .15,
|
|
13
15
|
areaFillAlpha: .2
|
|
14
16
|
};
|
|
15
|
-
function
|
|
16
|
-
return e === "legend" ?
|
|
17
|
+
function o(e) {
|
|
18
|
+
return e === "legend" ? a.legendFontSize : e === "tooltipTitle" ? a.tooltipTitleSize : e === "tooltipBody" ? a.tooltipBodySize : a.axisFontSize;
|
|
17
19
|
}
|
|
18
|
-
function
|
|
19
|
-
return { fontSize:
|
|
20
|
+
function s(e) {
|
|
21
|
+
return { fontSize: o(e) };
|
|
20
22
|
}
|
|
21
|
-
function
|
|
23
|
+
function c(e = "axis") {
|
|
22
24
|
return {
|
|
23
|
-
fontSize:
|
|
25
|
+
fontSize: o(e),
|
|
24
26
|
fill: t
|
|
25
27
|
};
|
|
26
28
|
}
|
|
27
|
-
function
|
|
29
|
+
function l(t) {
|
|
28
30
|
return e[t % e.length] ?? e[0];
|
|
29
31
|
}
|
|
30
|
-
var
|
|
32
|
+
var u = {
|
|
31
33
|
get tick() {
|
|
32
|
-
return
|
|
34
|
+
return c("axis");
|
|
33
35
|
},
|
|
34
36
|
axisLine: !1,
|
|
35
37
|
tickLine: !1
|
|
36
38
|
};
|
|
37
|
-
function
|
|
39
|
+
function d(e = !1) {
|
|
38
40
|
return {
|
|
39
41
|
hide: e,
|
|
40
|
-
...
|
|
42
|
+
...u
|
|
41
43
|
};
|
|
42
44
|
}
|
|
43
|
-
var
|
|
45
|
+
var f = {
|
|
44
46
|
vertical: !1,
|
|
45
47
|
stroke: t,
|
|
46
|
-
strokeOpacity:
|
|
47
|
-
strokeDasharray:
|
|
48
|
-
},
|
|
48
|
+
strokeOpacity: a.gridOpacity,
|
|
49
|
+
strokeDasharray: a.gridDash
|
|
50
|
+
}, p = {
|
|
49
51
|
horizontal: [
|
|
50
52
|
0,
|
|
51
53
|
4,
|
|
@@ -58,60 +60,72 @@ var u = {
|
|
|
58
60
|
0,
|
|
59
61
|
0
|
|
60
62
|
]
|
|
61
|
-
},
|
|
63
|
+
}, m = { isAnimationActive: !1 }, h = {
|
|
62
64
|
stroke: t,
|
|
63
65
|
strokeOpacity: .35,
|
|
64
66
|
strokeWidth: 1
|
|
65
|
-
},
|
|
67
|
+
}, g = {
|
|
66
68
|
fill: n("foreground", .06),
|
|
67
69
|
stroke: "none"
|
|
68
70
|
};
|
|
69
|
-
function
|
|
71
|
+
function _() {
|
|
70
72
|
return {
|
|
71
|
-
background: "
|
|
72
|
-
border: "
|
|
73
|
-
borderRadius: "
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
background: "transparent",
|
|
74
|
+
border: "none",
|
|
75
|
+
borderRadius: "0",
|
|
76
|
+
boxShadow: "none",
|
|
77
|
+
fontSize: o("tooltipBody"),
|
|
78
|
+
color: "hsl(var(--basalt-foreground))",
|
|
79
|
+
padding: "0"
|
|
76
80
|
};
|
|
77
81
|
}
|
|
78
|
-
function
|
|
82
|
+
function v(e) {
|
|
79
83
|
return {
|
|
80
84
|
isAnimationActive: !1,
|
|
81
85
|
animationDuration: 0,
|
|
82
86
|
offset: 12,
|
|
83
|
-
|
|
87
|
+
allowEscapeViewBox: {
|
|
88
|
+
x: !1,
|
|
89
|
+
y: !1
|
|
90
|
+
},
|
|
91
|
+
cursor: e?.cursor === !1 ? !1 : e?.cursor === "line" ? h : g,
|
|
84
92
|
wrapperStyle: {
|
|
85
93
|
outline: "none",
|
|
86
94
|
zIndex: 40,
|
|
87
|
-
pointerEvents: "none"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
labelStyle: {
|
|
91
|
-
fontSize: i("tooltipTitle"),
|
|
92
|
-
color: "hsl(var(--basalt-foreground))"
|
|
95
|
+
pointerEvents: "none",
|
|
96
|
+
transition: "none",
|
|
97
|
+
animation: "none"
|
|
93
98
|
},
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
contentStyle: _(),
|
|
100
|
+
content: ((t) => i(r, {
|
|
101
|
+
active: t.active,
|
|
102
|
+
payload: t.payload,
|
|
103
|
+
label: t.label,
|
|
104
|
+
formatter: e?.formatter
|
|
105
|
+
}))
|
|
96
106
|
};
|
|
97
107
|
}
|
|
98
|
-
function
|
|
99
|
-
return
|
|
100
|
-
wrapperStyle: {
|
|
101
|
-
fontSize: i("legend"),
|
|
102
|
-
color: t
|
|
103
|
-
},
|
|
104
|
-
iconSize: 8
|
|
105
|
-
};
|
|
108
|
+
function y(t, n) {
|
|
109
|
+
return t?.color ?? e[n % e.length];
|
|
106
110
|
}
|
|
107
|
-
var
|
|
111
|
+
var b = {
|
|
108
112
|
width: "100%",
|
|
109
113
|
height: "100%",
|
|
110
114
|
minWidth: 0,
|
|
111
115
|
minHeight: 0,
|
|
112
116
|
debounce: 150
|
|
117
|
+
}, x = {
|
|
118
|
+
top: 4,
|
|
119
|
+
right: 4,
|
|
120
|
+
bottom: 0,
|
|
121
|
+
left: 0
|
|
122
|
+
}, S = {
|
|
123
|
+
top: 2,
|
|
124
|
+
right: 2,
|
|
125
|
+
bottom: 2,
|
|
126
|
+
left: 2
|
|
113
127
|
};
|
|
114
128
|
//#endregion
|
|
115
|
-
export {
|
|
129
|
+
export { m as ANIMATION_PROPS, u as AXIS_CONFIG, p as BAR_RADIUS, x as CHART_PLOT_MARGIN, S as CHART_PLOT_MARGIN_BARE, g as CHART_TOOLTIP_CURSOR_BAR, h as CHART_TOOLTIP_CURSOR_LINE, a as CHART_TYPE, f as GRID_PROPS, b as RESPONSIVE_CONTAINER_PROPS, d as cartesianAxisProps, o as chartFontSize, s as chartTextStyle, c as chartTickStyle, _ as chartTooltipContentStyle, v as chartTooltipProps, l as getChartColor, y as seriesColor };
|
|
116
130
|
|
|
117
131
|
//# sourceMappingURL=config.js.map
|