@yamada-ui/charts 1.1.2-next-20240429233030 → 1.1.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/package.json +5 -5
- package/dist/area-chart-gradient.d.mts +0 -11
- package/dist/area-chart-gradient.d.ts +0 -11
- package/dist/area-chart-gradient.js +0 -47
- package/dist/area-chart-gradient.js.map +0 -1
- package/dist/area-chart-gradient.mjs +0 -8
- package/dist/area-chart-gradient.mjs.map +0 -1
- package/dist/area-chart-split.d.mts +0 -10
- package/dist/area-chart-split.d.ts +0 -10
- package/dist/area-chart-split.js +0 -52
- package/dist/area-chart-split.js.map +0 -1
- package/dist/area-chart-split.mjs +0 -8
- package/dist/area-chart-split.mjs.map +0 -1
- package/dist/area-chart.d.mts +0 -41
- package/dist/area-chart.d.ts +0 -41
- package/dist/area-chart.js +0 -1223
- package/dist/area-chart.js.map +0 -1
- package/dist/area-chart.mjs +0 -21
- package/dist/area-chart.mjs.map +0 -1
- package/dist/bar-chart.d.mts +0 -38
- package/dist/bar-chart.d.ts +0 -38
- package/dist/bar-chart.js +0 -1027
- package/dist/bar-chart.js.map +0 -1
- package/dist/bar-chart.mjs +0 -19
- package/dist/bar-chart.mjs.map +0 -1
- package/dist/chart-legend.d.mts +0 -12
- package/dist/chart-legend.d.ts +0 -12
- package/dist/chart-legend.js +0 -90
- package/dist/chart-legend.js.map +0 -1
- package/dist/chart-legend.mjs +0 -11
- package/dist/chart-legend.mjs.map +0 -1
- package/dist/chart-tooltip.d.mts +0 -12
- package/dist/chart-tooltip.d.ts +0 -12
- package/dist/chart-tooltip.js +0 -121
- package/dist/chart-tooltip.js.map +0 -1
- package/dist/chart-tooltip.mjs +0 -11
- package/dist/chart-tooltip.mjs.map +0 -1
- package/dist/chart-utils.d.mts +0 -9
- package/dist/chart-utils.d.ts +0 -9
- package/dist/chart-utils.js +0 -45
- package/dist/chart-utils.js.map +0 -1
- package/dist/chart-utils.mjs +0 -10
- package/dist/chart-utils.mjs.map +0 -1
- package/dist/chart.types.d.mts +0 -78
- package/dist/chart.types.d.ts +0 -78
- package/dist/chart.types.js +0 -20
- package/dist/chart.types.js.map +0 -1
- package/dist/chart.types.mjs +0 -2
- package/dist/chart.types.mjs.map +0 -1
- package/dist/chunk-4WX5YS7M.mjs +0 -179
- package/dist/chunk-4WX5YS7M.mjs.map +0 -1
- package/dist/chunk-5TVYPA64.mjs +0 -256
- package/dist/chunk-5TVYPA64.mjs.map +0 -1
- package/dist/chunk-BPR7YL3O.mjs +0 -179
- package/dist/chunk-BPR7YL3O.mjs.map +0 -1
- package/dist/chunk-E2I2XAZ6.mjs +0 -232
- package/dist/chunk-E2I2XAZ6.mjs.map +0 -1
- package/dist/chunk-HDOYOHLA.mjs +0 -326
- package/dist/chunk-HDOYOHLA.mjs.map +0 -1
- package/dist/chunk-KNAADLWO.mjs +0 -225
- package/dist/chunk-KNAADLWO.mjs.map +0 -1
- package/dist/chunk-KT4YOMM4.mjs +0 -344
- package/dist/chunk-KT4YOMM4.mjs.map +0 -1
- package/dist/chunk-LBC2B6UX.mjs +0 -84
- package/dist/chunk-LBC2B6UX.mjs.map +0 -1
- package/dist/chunk-LGMALZCN.mjs +0 -42
- package/dist/chunk-LGMALZCN.mjs.map +0 -1
- package/dist/chunk-LHI57S6P.mjs +0 -215
- package/dist/chunk-LHI57S6P.mjs.map +0 -1
- package/dist/chunk-LM2DQK2P.mjs +0 -33
- package/dist/chunk-LM2DQK2P.mjs.map +0 -1
- package/dist/chunk-MSIOYYWR.mjs +0 -24
- package/dist/chunk-MSIOYYWR.mjs.map +0 -1
- package/dist/chunk-MWPICUEW.mjs +0 -56
- package/dist/chunk-MWPICUEW.mjs.map +0 -1
- package/dist/chunk-NEGDEVRX.mjs +0 -53
- package/dist/chunk-NEGDEVRX.mjs.map +0 -1
- package/dist/chunk-OSNFBRHL.mjs +0 -474
- package/dist/chunk-OSNFBRHL.mjs.map +0 -1
- package/dist/chunk-OW7SOTEF.mjs +0 -206
- package/dist/chunk-OW7SOTEF.mjs.map +0 -1
- package/dist/chunk-P7AFSM5W.mjs +0 -114
- package/dist/chunk-P7AFSM5W.mjs.map +0 -1
- package/dist/chunk-PNE3JG54.mjs +0 -29
- package/dist/chunk-PNE3JG54.mjs.map +0 -1
- package/dist/chunk-QL3DB7OJ.mjs +0 -21
- package/dist/chunk-QL3DB7OJ.mjs.map +0 -1
- package/dist/chunk-QZ5OXZ6Z.mjs +0 -251
- package/dist/chunk-QZ5OXZ6Z.mjs.map +0 -1
- package/dist/chunk-RN6PXJAD.mjs +0 -47
- package/dist/chunk-RN6PXJAD.mjs.map +0 -1
- package/dist/chunk-STBYRLC5.mjs +0 -208
- package/dist/chunk-STBYRLC5.mjs.map +0 -1
- package/dist/chunk-XIFDRM7J.mjs +0 -56
- package/dist/chunk-XIFDRM7J.mjs.map +0 -1
- package/dist/donut-chart.d.mts +0 -31
- package/dist/donut-chart.d.ts +0 -31
- package/dist/donut-chart.js +0 -702
- package/dist/donut-chart.js.map +0 -1
- package/dist/donut-chart.mjs +0 -16
- package/dist/donut-chart.mjs.map +0 -1
- package/dist/index.d.mts +0 -26
- package/dist/index.d.ts +0 -26
- package/dist/index.js +0 -3228
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -45
- package/dist/index.mjs.map +0 -1
- package/dist/line-chart.d.mts +0 -38
- package/dist/line-chart.d.ts +0 -38
- package/dist/line-chart.js +0 -1088
- package/dist/line-chart.js.map +0 -1
- package/dist/line-chart.mjs +0 -19
- package/dist/line-chart.mjs.map +0 -1
- package/dist/pie-chart.d.mts +0 -49
- package/dist/pie-chart.d.ts +0 -49
- package/dist/pie-chart.js +0 -702
- package/dist/pie-chart.js.map +0 -1
- package/dist/pie-chart.mjs +0 -16
- package/dist/pie-chart.mjs.map +0 -1
- package/dist/radar-chart.d.mts +0 -57
- package/dist/radar-chart.d.ts +0 -57
- package/dist/radar-chart.js +0 -918
- package/dist/radar-chart.js.map +0 -1
- package/dist/radar-chart.mjs +0 -16
- package/dist/radar-chart.mjs.map +0 -1
- package/dist/rechart-properties.d.mts +0 -26
- package/dist/rechart-properties.d.ts +0 -26
- package/dist/rechart-properties.js +0 -517
- package/dist/rechart-properties.js.map +0 -1
- package/dist/rechart-properties.mjs +0 -48
- package/dist/rechart-properties.mjs.map +0 -1
- package/dist/use-area-chart.d.mts +0 -123
- package/dist/use-area-chart.d.ts +0 -123
- package/dist/use-area-chart.js +0 -420
- package/dist/use-area-chart.js.map +0 -1
- package/dist/use-area-chart.mjs +0 -10
- package/dist/use-area-chart.mjs.map +0 -1
- package/dist/use-bar-chart.d.mts +0 -73
- package/dist/use-bar-chart.d.ts +0 -73
- package/dist/use-bar-chart.js +0 -290
- package/dist/use-bar-chart.js.map +0 -1
- package/dist/use-bar-chart.mjs +0 -10
- package/dist/use-bar-chart.mjs.map +0 -1
- package/dist/use-chart-axis.d.mts +0 -73
- package/dist/use-chart-axis.d.ts +0 -73
- package/dist/use-chart-axis.js +0 -227
- package/dist/use-chart-axis.js.map +0 -1
- package/dist/use-chart-axis.mjs +0 -10
- package/dist/use-chart-axis.mjs.map +0 -1
- package/dist/use-chart-grid.d.mts +0 -32
- package/dist/use-chart-grid.d.ts +0 -32
- package/dist/use-chart-grid.js +0 -92
- package/dist/use-chart-grid.js.map +0 -1
- package/dist/use-chart-grid.mjs +0 -10
- package/dist/use-chart-grid.mjs.map +0 -1
- package/dist/use-chart-legend.d.mts +0 -18
- package/dist/use-chart-legend.d.ts +0 -18
- package/dist/use-chart-legend.js +0 -81
- package/dist/use-chart-legend.js.map +0 -1
- package/dist/use-chart-legend.mjs +0 -9
- package/dist/use-chart-legend.mjs.map +0 -1
- package/dist/use-chart-reference-line.d.mts +0 -22
- package/dist/use-chart-reference-line.d.ts +0 -22
- package/dist/use-chart-reference-line.js +0 -105
- package/dist/use-chart-reference-line.js.map +0 -1
- package/dist/use-chart-reference-line.mjs +0 -10
- package/dist/use-chart-reference-line.mjs.map +0 -1
- package/dist/use-chart-tooltip.d.mts +0 -27
- package/dist/use-chart-tooltip.d.ts +0 -27
- package/dist/use-chart-tooltip.js +0 -100
- package/dist/use-chart-tooltip.js.map +0 -1
- package/dist/use-chart-tooltip.mjs +0 -10
- package/dist/use-chart-tooltip.mjs.map +0 -1
- package/dist/use-chart.d.mts +0 -33
- package/dist/use-chart.d.ts +0 -33
- package/dist/use-chart.js +0 -104
- package/dist/use-chart.js.map +0 -1
- package/dist/use-chart.mjs +0 -18
- package/dist/use-chart.mjs.map +0 -1
- package/dist/use-line-chart.d.mts +0 -97
- package/dist/use-line-chart.d.ts +0 -97
- package/dist/use-line-chart.js +0 -344
- package/dist/use-line-chart.js.map +0 -1
- package/dist/use-line-chart.mjs +0 -10
- package/dist/use-line-chart.mjs.map +0 -1
- package/dist/use-pie-chart.d.mts +0 -112
- package/dist/use-pie-chart.d.ts +0 -112
- package/dist/use-pie-chart.js +0 -282
- package/dist/use-pie-chart.js.map +0 -1
- package/dist/use-pie-chart.mjs +0 -10
- package/dist/use-pie-chart.mjs.map +0 -1
- package/dist/use-radar-chart.d.mts +0 -105
- package/dist/use-radar-chart.d.ts +0 -105
- package/dist/use-radar-chart.js +0 -473
- package/dist/use-radar-chart.js.map +0 -1
- package/dist/use-radar-chart.mjs +0 -10
- package/dist/use-radar-chart.mjs.map +0 -1
@@ -1,73 +0,0 @@
|
|
1
|
-
import { CSSUIObject } from '@yamada-ui/core';
|
2
|
-
import { Dict } from '@yamada-ui/utils';
|
3
|
-
import * as Recharts from 'recharts';
|
4
|
-
import { AreaChartType, ChartLayoutType, ChartAxisType, XAxisProps, YAxisProps, ChartPropGetter } from './chart.types.mjs';
|
5
|
-
import 'react';
|
6
|
-
|
7
|
-
type UseChartAxisOptions = {
|
8
|
-
/**
|
9
|
-
* The key of a group of data which should be unique in an chart.
|
10
|
-
*/
|
11
|
-
dataKey: string;
|
12
|
-
/**
|
13
|
-
* Controls how chart areas are positioned relative to each other
|
14
|
-
*
|
15
|
-
* @default `default`
|
16
|
-
*/
|
17
|
-
type?: AreaChartType;
|
18
|
-
/**
|
19
|
-
* Chart orientation.
|
20
|
-
*
|
21
|
-
* @default 'horizontal'
|
22
|
-
*/
|
23
|
-
layoutType?: ChartLayoutType;
|
24
|
-
/**
|
25
|
-
* The option is the configuration of tick lines.
|
26
|
-
*
|
27
|
-
* @default 'y'
|
28
|
-
*/
|
29
|
-
tickLine?: ChartAxisType;
|
30
|
-
/**
|
31
|
-
* Specifies which lines should be displayed in the grid.
|
32
|
-
*
|
33
|
-
* @default 'x'
|
34
|
-
*/
|
35
|
-
gridAxis?: ChartAxisType;
|
36
|
-
/**
|
37
|
-
* If `true`, X axis is visible.
|
38
|
-
*
|
39
|
-
* @default true
|
40
|
-
*/
|
41
|
-
withXAxis?: boolean;
|
42
|
-
/**
|
43
|
-
* If `true`, Y axis is visible.
|
44
|
-
*
|
45
|
-
* @default true
|
46
|
-
*/
|
47
|
-
withYAxis?: boolean;
|
48
|
-
/**
|
49
|
-
* Props passed down to recharts 'XAxis' component.
|
50
|
-
*/
|
51
|
-
xAxisProps?: XAxisProps;
|
52
|
-
/**
|
53
|
-
* Props passed down to recharts 'YAxis' component.
|
54
|
-
*/
|
55
|
-
yAxisProps?: YAxisProps;
|
56
|
-
/**
|
57
|
-
* Unit displayed next to each tick in y-axis.
|
58
|
-
*/
|
59
|
-
unit?: string;
|
60
|
-
/**
|
61
|
-
* A function to format values on Y axis and inside the tooltip
|
62
|
-
*/
|
63
|
-
valueFormatter?: (value: number) => string;
|
64
|
-
};
|
65
|
-
type UseChartAxisProps = UseChartAxisOptions & {
|
66
|
-
styles: Dict<CSSUIObject>;
|
67
|
-
};
|
68
|
-
declare const useChartAxis: ({ dataKey, type, layoutType, tickLine, gridAxis, withXAxis, withYAxis, xAxisProps: _xAxisProps, yAxisProps: _yAxisProps, unit, valueFormatter, styles, }: UseChartAxisProps) => {
|
69
|
-
getXAxisProps: ChartPropGetter<"div", Partial<Recharts.XAxisProps>, Recharts.XAxisProps>;
|
70
|
-
getYAxisProps: ChartPropGetter<"div", Partial<Recharts.YAxisProps>, Recharts.YAxisProps>;
|
71
|
-
};
|
72
|
-
|
73
|
-
export { type UseChartAxisOptions, type UseChartAxisProps, useChartAxis };
|
package/dist/use-chart-axis.d.ts
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
import { CSSUIObject } from '@yamada-ui/core';
|
2
|
-
import { Dict } from '@yamada-ui/utils';
|
3
|
-
import * as Recharts from 'recharts';
|
4
|
-
import { AreaChartType, ChartLayoutType, ChartAxisType, XAxisProps, YAxisProps, ChartPropGetter } from './chart.types.js';
|
5
|
-
import 'react';
|
6
|
-
|
7
|
-
type UseChartAxisOptions = {
|
8
|
-
/**
|
9
|
-
* The key of a group of data which should be unique in an chart.
|
10
|
-
*/
|
11
|
-
dataKey: string;
|
12
|
-
/**
|
13
|
-
* Controls how chart areas are positioned relative to each other
|
14
|
-
*
|
15
|
-
* @default `default`
|
16
|
-
*/
|
17
|
-
type?: AreaChartType;
|
18
|
-
/**
|
19
|
-
* Chart orientation.
|
20
|
-
*
|
21
|
-
* @default 'horizontal'
|
22
|
-
*/
|
23
|
-
layoutType?: ChartLayoutType;
|
24
|
-
/**
|
25
|
-
* The option is the configuration of tick lines.
|
26
|
-
*
|
27
|
-
* @default 'y'
|
28
|
-
*/
|
29
|
-
tickLine?: ChartAxisType;
|
30
|
-
/**
|
31
|
-
* Specifies which lines should be displayed in the grid.
|
32
|
-
*
|
33
|
-
* @default 'x'
|
34
|
-
*/
|
35
|
-
gridAxis?: ChartAxisType;
|
36
|
-
/**
|
37
|
-
* If `true`, X axis is visible.
|
38
|
-
*
|
39
|
-
* @default true
|
40
|
-
*/
|
41
|
-
withXAxis?: boolean;
|
42
|
-
/**
|
43
|
-
* If `true`, Y axis is visible.
|
44
|
-
*
|
45
|
-
* @default true
|
46
|
-
*/
|
47
|
-
withYAxis?: boolean;
|
48
|
-
/**
|
49
|
-
* Props passed down to recharts 'XAxis' component.
|
50
|
-
*/
|
51
|
-
xAxisProps?: XAxisProps;
|
52
|
-
/**
|
53
|
-
* Props passed down to recharts 'YAxis' component.
|
54
|
-
*/
|
55
|
-
yAxisProps?: YAxisProps;
|
56
|
-
/**
|
57
|
-
* Unit displayed next to each tick in y-axis.
|
58
|
-
*/
|
59
|
-
unit?: string;
|
60
|
-
/**
|
61
|
-
* A function to format values on Y axis and inside the tooltip
|
62
|
-
*/
|
63
|
-
valueFormatter?: (value: number) => string;
|
64
|
-
};
|
65
|
-
type UseChartAxisProps = UseChartAxisOptions & {
|
66
|
-
styles: Dict<CSSUIObject>;
|
67
|
-
};
|
68
|
-
declare const useChartAxis: ({ dataKey, type, layoutType, tickLine, gridAxis, withXAxis, withYAxis, xAxisProps: _xAxisProps, yAxisProps: _yAxisProps, unit, valueFormatter, styles, }: UseChartAxisProps) => {
|
69
|
-
getXAxisProps: ChartPropGetter<"div", Partial<Recharts.XAxisProps>, Recharts.XAxisProps>;
|
70
|
-
getYAxisProps: ChartPropGetter<"div", Partial<Recharts.YAxisProps>, Recharts.YAxisProps>;
|
71
|
-
};
|
72
|
-
|
73
|
-
export { type UseChartAxisOptions, type UseChartAxisProps, useChartAxis };
|
package/dist/use-chart-axis.js
DELETED
@@ -1,227 +0,0 @@
|
|
1
|
-
"use client"
|
2
|
-
"use strict";
|
3
|
-
var __defProp = Object.defineProperty;
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
-
var __export = (target, all) => {
|
8
|
-
for (var name in all)
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
-
};
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
-
for (let key of __getOwnPropNames(from))
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
-
}
|
17
|
-
return to;
|
18
|
-
};
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
20
|
-
|
21
|
-
// src/use-chart-axis.ts
|
22
|
-
var use_chart_axis_exports = {};
|
23
|
-
__export(use_chart_axis_exports, {
|
24
|
-
useChartAxis: () => useChartAxis
|
25
|
-
});
|
26
|
-
module.exports = __toCommonJS(use_chart_axis_exports);
|
27
|
-
var import_core2 = require("@yamada-ui/core");
|
28
|
-
var import_utils2 = require("@yamada-ui/utils");
|
29
|
-
var import_react = require("react");
|
30
|
-
|
31
|
-
// src/chart-utils.ts
|
32
|
-
var import_core = require("@yamada-ui/core");
|
33
|
-
var import_utils = require("@yamada-ui/utils");
|
34
|
-
var getClassName = (...styles) => (theme) => (0, import_utils.cx)(
|
35
|
-
...styles.map(
|
36
|
-
(style) => (0, import_utils.isString)(style) ? style : (0, import_core.getCSS)(style)(theme)
|
37
|
-
)
|
38
|
-
);
|
39
|
-
var getComponentProps = ([obj, keys], ...props) => (theme, isContain) => {
|
40
|
-
const [pickedProps, omittedProps] = (0, import_utils.splitObject)(obj, keys);
|
41
|
-
const className = getClassName(...props, omittedProps)(theme);
|
42
|
-
return !isContain ? [pickedProps, className] : { ...pickedProps, className };
|
43
|
-
};
|
44
|
-
|
45
|
-
// src/rechart-properties.ts
|
46
|
-
var xAxisProperties = [
|
47
|
-
"hide",
|
48
|
-
"dataKey",
|
49
|
-
"xAxisId",
|
50
|
-
"width",
|
51
|
-
"height",
|
52
|
-
"orientation",
|
53
|
-
"type",
|
54
|
-
"allowDecimals",
|
55
|
-
"allowDataOverflow",
|
56
|
-
"allowDuplicatedCategory",
|
57
|
-
"angle",
|
58
|
-
"tickCount",
|
59
|
-
"domain",
|
60
|
-
"includeHidden",
|
61
|
-
"interval",
|
62
|
-
"padding",
|
63
|
-
"minTickGap",
|
64
|
-
"axisLine",
|
65
|
-
"tickLine",
|
66
|
-
"tickSize",
|
67
|
-
"tickFormatter",
|
68
|
-
"ticks",
|
69
|
-
"tick",
|
70
|
-
"mirror",
|
71
|
-
"reversed",
|
72
|
-
"label",
|
73
|
-
"scale",
|
74
|
-
"unit",
|
75
|
-
"name",
|
76
|
-
"onClick",
|
77
|
-
"onMouseDown",
|
78
|
-
"onMouseUp",
|
79
|
-
"onMouseMove",
|
80
|
-
"onMouseOver",
|
81
|
-
"onMouseOut",
|
82
|
-
"onMouseEnter",
|
83
|
-
"onMouseLeave",
|
84
|
-
"tickMargin"
|
85
|
-
];
|
86
|
-
var yAxisProperties = [
|
87
|
-
"hide",
|
88
|
-
"dataKey",
|
89
|
-
"yAxisId",
|
90
|
-
"width",
|
91
|
-
"height",
|
92
|
-
"orientation",
|
93
|
-
"type",
|
94
|
-
"tickCount",
|
95
|
-
"domain",
|
96
|
-
"includeHidden",
|
97
|
-
"interval",
|
98
|
-
"padding",
|
99
|
-
"minTickGap",
|
100
|
-
"allowDecimals",
|
101
|
-
"allowDataOverflow",
|
102
|
-
"allowDuplicatedCategory",
|
103
|
-
"axisLine",
|
104
|
-
"tickLine",
|
105
|
-
"tickSize",
|
106
|
-
"tickFormatter",
|
107
|
-
"ticks",
|
108
|
-
"tick",
|
109
|
-
"mirror",
|
110
|
-
"reversed",
|
111
|
-
"label",
|
112
|
-
"scale",
|
113
|
-
"unit",
|
114
|
-
"name",
|
115
|
-
"onClick",
|
116
|
-
"onMouseDown",
|
117
|
-
"onMouseUp",
|
118
|
-
"onMouseMove",
|
119
|
-
"onMouseOver",
|
120
|
-
"onMouseOut",
|
121
|
-
"onMouseEnter",
|
122
|
-
"onMouseLeave",
|
123
|
-
"tickMargin"
|
124
|
-
];
|
125
|
-
|
126
|
-
// src/use-chart-axis.ts
|
127
|
-
var useChartAxis = ({
|
128
|
-
dataKey,
|
129
|
-
type,
|
130
|
-
layoutType = "horizontal",
|
131
|
-
tickLine = "y",
|
132
|
-
gridAxis = "x",
|
133
|
-
withXAxis = true,
|
134
|
-
withYAxis = true,
|
135
|
-
xAxisProps: _xAxisProps = {},
|
136
|
-
yAxisProps: _yAxisProps = {},
|
137
|
-
unit,
|
138
|
-
valueFormatter,
|
139
|
-
styles
|
140
|
-
}) => {
|
141
|
-
const { theme } = (0, import_core2.useTheme)();
|
142
|
-
const xAxisKey = (0, import_react.useMemo)(
|
143
|
-
() => layoutType === "vertical" ? { type: "number" } : { dataKey },
|
144
|
-
[dataKey, layoutType]
|
145
|
-
);
|
146
|
-
const yAxisKey = (0, import_react.useMemo)(
|
147
|
-
() => layoutType === "vertical" ? { dataKey, type: "category" } : { type: "number" },
|
148
|
-
[dataKey, layoutType]
|
149
|
-
);
|
150
|
-
const withXTickLine = gridAxis !== "none" && (tickLine === "x" || tickLine === "xy");
|
151
|
-
const withYTickLine = gridAxis !== "none" && (tickLine === "y" || tickLine === "xy");
|
152
|
-
const getTickLine = (withTickLine) => withTickLine ? { stroke: "currentColor" } : false;
|
153
|
-
const xTickLine = getTickLine(withXTickLine);
|
154
|
-
const yTickLine = getTickLine(withYTickLine);
|
155
|
-
const yAxisTickFormatter = type === "percent" && layoutType !== "vertical" ? valueToPercent : valueFormatter;
|
156
|
-
const xAxisTickFormatter = type === "percent" && layoutType === "vertical" ? valueToPercent : valueFormatter;
|
157
|
-
const [xAxisReChartsProps, xAxisClassName] = getComponentProps(
|
158
|
-
[_xAxisProps, xAxisProperties],
|
159
|
-
styles.xAxis
|
160
|
-
)(theme);
|
161
|
-
const [yAxisReChartsProps, yAxisClassName] = getComponentProps(
|
162
|
-
[_yAxisProps, yAxisProperties],
|
163
|
-
styles.yAxis
|
164
|
-
)(theme);
|
165
|
-
const getXAxisProps = (0, import_react.useCallback)(
|
166
|
-
({ className, ...props } = {}) => ({
|
167
|
-
className: (0, import_utils2.cx)(className, xAxisClassName),
|
168
|
-
hide: !withXAxis,
|
169
|
-
...xAxisKey,
|
170
|
-
tick: {
|
171
|
-
transform: "translate(0, 10)",
|
172
|
-
fill: "currentColor"
|
173
|
-
},
|
174
|
-
stroke: "",
|
175
|
-
interval: "preserveStartEnd",
|
176
|
-
tickLine: xTickLine,
|
177
|
-
minTickGap: 5,
|
178
|
-
tickFormatter: xAxisTickFormatter,
|
179
|
-
...props,
|
180
|
-
...xAxisReChartsProps
|
181
|
-
}),
|
182
|
-
[
|
183
|
-
xAxisClassName,
|
184
|
-
withXAxis,
|
185
|
-
xAxisKey,
|
186
|
-
xTickLine,
|
187
|
-
xAxisTickFormatter,
|
188
|
-
xAxisReChartsProps
|
189
|
-
]
|
190
|
-
);
|
191
|
-
const getYAxisProps = (0, import_react.useCallback)(
|
192
|
-
({ className, ...props } = {}) => ({
|
193
|
-
className: (0, import_utils2.cx)(className, yAxisClassName),
|
194
|
-
hide: !withYAxis,
|
195
|
-
axisLine: false,
|
196
|
-
...yAxisKey,
|
197
|
-
tickLine: yTickLine,
|
198
|
-
tick: {
|
199
|
-
transform: "translate(-10, 0)",
|
200
|
-
fill: "currentColor"
|
201
|
-
},
|
202
|
-
allowDecimals: true,
|
203
|
-
unit,
|
204
|
-
tickFormatter: yAxisTickFormatter,
|
205
|
-
...props,
|
206
|
-
...yAxisReChartsProps
|
207
|
-
}),
|
208
|
-
[
|
209
|
-
yAxisClassName,
|
210
|
-
withYAxis,
|
211
|
-
yAxisKey,
|
212
|
-
yTickLine,
|
213
|
-
unit,
|
214
|
-
yAxisTickFormatter,
|
215
|
-
yAxisReChartsProps
|
216
|
-
]
|
217
|
-
);
|
218
|
-
return { getXAxisProps, getYAxisProps };
|
219
|
-
};
|
220
|
-
var valueToPercent = (value) => {
|
221
|
-
return `${(value * 100).toFixed(0)}%`;
|
222
|
-
};
|
223
|
-
// Annotate the CommonJS export names for ESM import in node:
|
224
|
-
0 && (module.exports = {
|
225
|
-
useChartAxis
|
226
|
-
});
|
227
|
-
//# sourceMappingURL=use-chart-axis.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../src/use-chart-axis.ts","../src/chart-utils.ts","../src/rechart-properties.ts"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport { useTheme } from \"@yamada-ui/core\"\nimport type { Dict } from \"@yamada-ui/utils\"\nimport { cx } from \"@yamada-ui/utils\"\nimport type { SVGProps } from \"react\"\nimport { useCallback, useMemo } from \"react\"\nimport type * as Recharts from \"recharts\"\nimport { getComponentProps } from \"./chart-utils\"\nimport type {\n ChartAxisType,\n ChartLayoutType,\n XAxisProps,\n YAxisProps,\n ChartPropGetter,\n AreaChartType,\n} from \"./chart.types\"\nimport { xAxisProperties, yAxisProperties } from \"./rechart-properties\"\n\nexport type UseChartAxisOptions = {\n /**\n * The key of a group of data which should be unique in an chart.\n */\n dataKey: string\n /**\n * Controls how chart areas are positioned relative to each other\n *\n * @default `default`\n */\n type?: AreaChartType\n /**\n * Chart orientation.\n *\n * @default 'horizontal'\n */\n layoutType?: ChartLayoutType\n /**\n * The option is the configuration of tick lines.\n *\n * @default 'y'\n */\n tickLine?: ChartAxisType\n /**\n * Specifies which lines should be displayed in the grid.\n *\n * @default 'x'\n */\n gridAxis?: ChartAxisType\n /**\n * If `true`, X axis is visible.\n *\n * @default true\n */\n withXAxis?: boolean\n /**\n * If `true`, Y axis is visible.\n *\n * @default true\n */\n withYAxis?: boolean\n /**\n * Props passed down to recharts 'XAxis' component.\n */\n xAxisProps?: XAxisProps\n /**\n * Props passed down to recharts 'YAxis' component.\n */\n yAxisProps?: YAxisProps\n /**\n * Unit displayed next to each tick in y-axis.\n */\n unit?: string\n /**\n * A function to format values on Y axis and inside the tooltip\n */\n valueFormatter?: (value: number) => string\n}\n\nexport type UseChartAxisProps = UseChartAxisOptions & {\n styles: Dict<CSSUIObject>\n}\n\nexport const useChartAxis = ({\n dataKey,\n type,\n layoutType = \"horizontal\",\n tickLine = \"y\",\n gridAxis = \"x\",\n withXAxis = true,\n withYAxis = true,\n xAxisProps: _xAxisProps = {},\n yAxisProps: _yAxisProps = {},\n unit,\n valueFormatter,\n styles,\n}: UseChartAxisProps) => {\n const { theme } = useTheme()\n const xAxisKey: Recharts.XAxisProps = useMemo(\n () => (layoutType === \"vertical\" ? { type: \"number\" } : { dataKey }),\n [dataKey, layoutType],\n )\n\n const yAxisKey: Recharts.YAxisProps = useMemo(\n () =>\n layoutType === \"vertical\"\n ? { dataKey, type: \"category\" }\n : { type: \"number\" },\n [dataKey, layoutType],\n )\n const withXTickLine =\n gridAxis !== \"none\" && (tickLine === \"x\" || tickLine === \"xy\")\n const withYTickLine =\n gridAxis !== \"none\" && (tickLine === \"y\" || tickLine === \"xy\")\n const getTickLine = (\n withTickLine: boolean,\n ): boolean | SVGProps<SVGTextElement> =>\n withTickLine ? { stroke: \"currentColor\" } : false\n const xTickLine = getTickLine(withXTickLine)\n const yTickLine = getTickLine(withYTickLine)\n const yAxisTickFormatter =\n type === \"percent\" && layoutType !== \"vertical\"\n ? valueToPercent\n : valueFormatter\n const xAxisTickFormatter =\n type === \"percent\" && layoutType === \"vertical\"\n ? valueToPercent\n : valueFormatter\n\n const [xAxisReChartsProps, xAxisClassName] = getComponentProps<Dict, string>(\n [_xAxisProps, xAxisProperties],\n styles.xAxis,\n )(theme)\n\n const [yAxisReChartsProps, yAxisClassName] = getComponentProps<Dict, string>(\n [_yAxisProps, yAxisProperties],\n styles.yAxis,\n )(theme)\n\n const getXAxisProps: ChartPropGetter<\n \"div\",\n Partial<Recharts.XAxisProps>,\n Recharts.XAxisProps\n > = useCallback(\n ({ className, ...props } = {}) => ({\n className: cx(className, xAxisClassName),\n hide: !withXAxis,\n ...xAxisKey,\n tick: {\n transform: \"translate(0, 10)\",\n fill: \"currentColor\",\n },\n stroke: \"\",\n interval: \"preserveStartEnd\",\n tickLine: xTickLine,\n minTickGap: 5,\n tickFormatter: xAxisTickFormatter,\n ...props,\n ...(xAxisReChartsProps as Recharts.XAxisProps),\n }),\n [\n xAxisClassName,\n withXAxis,\n xAxisKey,\n xTickLine,\n xAxisTickFormatter,\n xAxisReChartsProps,\n ],\n )\n\n const getYAxisProps: ChartPropGetter<\n \"div\",\n Partial<Recharts.YAxisProps>,\n Recharts.YAxisProps\n > = useCallback(\n ({ className, ...props } = {}) => ({\n className: cx(className, yAxisClassName),\n hide: !withYAxis,\n axisLine: false,\n ...yAxisKey,\n tickLine: yTickLine,\n tick: {\n transform: \"translate(-10, 0)\",\n fill: \"currentColor\",\n },\n allowDecimals: true,\n unit: unit,\n tickFormatter: yAxisTickFormatter,\n ...props,\n ...(yAxisReChartsProps as Recharts.YAxisProps),\n }),\n [\n yAxisClassName,\n withYAxis,\n yAxisKey,\n yTickLine,\n unit,\n yAxisTickFormatter,\n yAxisReChartsProps,\n ],\n )\n return { getXAxisProps, getYAxisProps }\n}\n\nconst valueToPercent = (value: number) => {\n return `${(value * 100).toFixed(0)}%`\n}\n","import type { StyledTheme } from \"@yamada-ui/core\"\nimport { getCSS } from \"@yamada-ui/core\"\nimport type { Dict } from \"@yamada-ui/utils\"\nimport { cx, isString, splitObject } from \"@yamada-ui/utils\"\n\nexport const getClassName =\n (...styles: (Dict | string | undefined)[]) =>\n (theme: StyledTheme) =>\n cx(\n ...styles.map((style) =>\n isString(style) ? style : getCSS(style)(theme),\n ),\n )\n\nexport const getComponentProps =\n <T extends Dict, K extends keyof T>(\n [obj, keys]: [T, K[]],\n ...props: (Dict | string | undefined)[]\n ) =>\n <P extends boolean = false>(theme: StyledTheme, isContain?: P) => {\n const [pickedProps, omittedProps] = splitObject<T, K>(obj, keys)\n const className = getClassName(...props, omittedProps)(theme)\n\n return (\n !isContain ? [pickedProps, className] : { ...pickedProps, className }\n ) as P extends false\n ? [{ [P in K]: T[P] }, string]\n : { [P in K]: T[P] } & { className: string }\n }\n","import type { ComponentPropsWithoutRef } from \"react\"\nimport type * as Recharts from \"recharts\"\n\nexport const areaChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.AreaChart\n>)[] = [\n \"layout\",\n \"syncId\",\n \"syncMethod\",\n \"width\",\n \"height\",\n \"data\",\n \"margin\",\n \"stackOffset\",\n \"onClick\",\n \"onMouseEnter\",\n \"onMouseMove\",\n \"onMouseLeave\",\n]\n\nexport const barChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.BarChart\n>)[] = [\n \"layout\",\n \"syncId\",\n \"syncMethod\",\n \"width\",\n \"height\",\n \"data\",\n \"margin\",\n \"barCategoryGap\",\n \"barGap\",\n \"barSize\",\n \"maxBarSize\",\n \"stackOffset\",\n \"reverseStackOrder\",\n \"onClick\",\n \"onMouseEnter\",\n \"onMouseMove\",\n \"onMouseLeave\",\n]\n\nexport const lineChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.LineChart\n>)[] = [\n \"layout\",\n \"syncId\",\n \"syncMethod\",\n \"width\",\n \"height\",\n \"data\",\n \"margin\",\n \"onClick\",\n \"onMouseEnter\",\n \"onMouseMove\",\n \"onMouseLeave\",\n]\n\nexport const radarChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.RadarChart\n>)[] = [\n \"width\",\n \"height\",\n \"data\",\n \"cx\",\n \"cy\",\n \"startAngle\",\n \"endAngle\",\n \"innerRadius\",\n \"outerRadius\",\n \"margin\",\n \"onMouseEnter\",\n \"onClick\",\n]\n\nexport const pieChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.PieChart\n>)[] = [\"width\", \"height\", \"margin\", \"onClick\", \"onMouseEnter\", \"onMouseLeave\"]\n\nexport const referenceLineProperties: (keyof Recharts.ReferenceLineProps)[] = [\n \"xAxisId\",\n \"yAxisId\",\n \"x\",\n \"y\",\n \"ifOverflow\",\n \"viewBox\",\n \"xAxis\",\n \"yAxis\",\n \"label\",\n \"isFront\",\n \"strokeWidth\",\n \"segment\",\n]\n\nexport const containerProperties: (keyof Omit<\n Recharts.ResponsiveContainerProps,\n \"children\"\n>)[] = [\n \"aspect\",\n \"width\",\n \"height\",\n \"minWidth\",\n \"minHeight\",\n \"debounce\",\n \"onResize\",\n]\n\nexport const gridProperties: (keyof Recharts.CartesianGridProps)[] = [\n \"x\",\n \"y\",\n \"width\",\n \"height\",\n \"horizontal\",\n \"vertical\",\n \"horizontalPoints\",\n \"horizontalCoordinatesGenerator\",\n \"verticalPoints\",\n \"verticalCoordinatesGenerator\",\n \"fill\",\n \"fillOpacity\",\n \"strokeDasharray\",\n]\n\nexport const xAxisProperties: (keyof Recharts.XAxisProps)[] = [\n \"hide\",\n \"dataKey\",\n \"xAxisId\",\n \"width\",\n \"height\",\n \"orientation\",\n \"type\",\n \"allowDecimals\",\n \"allowDataOverflow\",\n \"allowDuplicatedCategory\",\n \"angle\",\n \"tickCount\",\n \"domain\",\n \"includeHidden\",\n \"interval\",\n \"padding\",\n \"minTickGap\",\n \"axisLine\",\n \"tickLine\",\n \"tickSize\",\n \"tickFormatter\",\n \"ticks\",\n \"tick\",\n \"mirror\",\n \"reversed\",\n \"label\",\n \"scale\",\n \"unit\",\n \"name\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"tickMargin\",\n]\n\nexport const yAxisProperties: (keyof Recharts.YAxisProps)[] = [\n \"hide\",\n \"dataKey\",\n \"yAxisId\",\n \"width\",\n \"height\",\n \"orientation\",\n \"type\",\n \"tickCount\",\n \"domain\",\n \"includeHidden\",\n \"interval\",\n \"padding\",\n \"minTickGap\",\n \"allowDecimals\",\n \"allowDataOverflow\",\n \"allowDuplicatedCategory\",\n \"axisLine\",\n \"tickLine\",\n \"tickSize\",\n \"tickFormatter\",\n \"ticks\",\n \"tick\",\n \"mirror\",\n \"reversed\",\n \"label\",\n \"scale\",\n \"unit\",\n \"name\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"tickMargin\",\n]\n\nexport const legendProperties: (keyof Omit<Recharts.LegendProps, \"ref\">)[] = [\n \"width\",\n \"height\",\n \"layout\",\n \"align\",\n \"verticalAlign\",\n \"iconSize\",\n \"iconType\",\n \"payload\",\n \"chartWidth\",\n \"chartHeight\",\n \"margin\",\n \"content\",\n \"formatter\",\n \"wrapperStyle\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n]\n\nexport const tooltipProperties: (keyof Recharts.TooltipProps<any, any>)[] = [\n \"offset\",\n \"filterNull\",\n \"itemStyle\",\n \"wrapperStyle\",\n \"contentStyle\",\n \"labelStyle\",\n \"cursor\",\n \"viewBox\",\n \"allowEscapeViewBox\",\n \"active\",\n \"position\",\n \"coordinate\",\n \"payload\",\n \"label\",\n \"content\",\n \"formatter\",\n \"labelFormatter\",\n \"itemSorter\",\n \"isAnimationActive\",\n \"animationDuration\",\n \"animationEasing\",\n]\n\nexport const areaProperties: (keyof Omit<Recharts.AreaProps, \"ref\">)[] = [\n \"type\",\n \"dataKey\",\n \"xAxisId\",\n \"yAxisId\",\n \"legendType\",\n \"dot\",\n \"activeDot\",\n \"label\",\n \"stroke\",\n \"strokeWidth\",\n \"layout\",\n \"baseLine\",\n \"points\",\n \"stackId\",\n \"connectNulls\",\n \"unit\",\n \"name\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"id\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n]\n\nexport const barProperties: (keyof Omit<Recharts.BarProps, \"ref\">)[] = [\n \"layout\",\n \"dataKey\",\n \"xAxisId\",\n \"yAxisId\",\n \"legendType\",\n \"label\",\n \"data\",\n \"barSize\",\n \"maxBarSize\",\n \"minPointSize\",\n \"background\",\n \"shape\",\n \"activeBar\",\n \"stackId\",\n \"unit\",\n \"name\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"id\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"radius\",\n]\n\nexport const radarProperties: (keyof Omit<Recharts.RadarProps, \"ref\">)[] = [\n \"dataKey\",\n \"points\",\n \"shape\",\n \"dot\",\n \"activeDot\",\n \"legendType\",\n \"label\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n]\n\nexport const lineProperties: (keyof Omit<Recharts.LineProps, \"ref\">)[] = [\n \"type\",\n \"dataKey\",\n \"xAxisId\",\n \"yAxisId\",\n \"legendType\",\n \"dot\",\n \"activeDot\",\n \"label\",\n \"hide\",\n \"points\",\n \"stroke\",\n \"strokeWidth\",\n \"layout\",\n \"connectNulls\",\n \"unit\",\n \"name\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"id\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"strokeDasharray\",\n]\n\nexport const pieProperties: (keyof Omit<Recharts.PieProps, \"ref\">)[] = [\n \"cx\",\n \"cy\",\n \"innerRadius\",\n \"outerRadius\",\n \"startAngle\",\n \"endAngle\",\n \"minAngle\",\n \"paddingAngle\",\n \"nameKey\",\n \"dataKey\",\n \"legendType\",\n \"label\",\n \"labelLine\",\n \"data\",\n \"activeIndex\",\n \"activeShape\",\n \"inactiveShape\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n]\n\nexport const dotProperties: (keyof Omit<Recharts.DotProps, \"ref\">)[] = [\n \"cx\",\n \"cy\",\n \"r\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n]\n\nexport const polarGridProperties: (keyof Recharts.PolarGridProps)[] = [\n \"cx\",\n \"cy\",\n \"innerRadius\",\n \"outerRadius\",\n \"polarAngles\",\n \"polarRadius\",\n \"gridType\",\n]\n\nexport const polarAngleAxisProperties: (keyof Recharts.PolarAngleAxisProps)[] =\n [\n \"dataKey\",\n \"cx\",\n \"cy\",\n \"radius\",\n \"axisLine\",\n \"axisLineType\",\n \"tickLine\",\n \"tickSize\",\n \"tick\",\n \"ticks\",\n \"orient\",\n \"tickFormatter\",\n \"type\",\n \"allowDuplicatedCategory\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n ]\nexport const polarRadiusAxisProperties: (keyof Recharts.PolarRadiusAxisProps)[] =\n [\n \"angle\",\n \"type\",\n \"allowDuplicatedCategory\",\n \"cx\",\n \"cy\",\n \"domain\",\n \"reversed\",\n \"label\",\n \"orientation\",\n \"axisLine\",\n \"tick\",\n \"tickSize\",\n \"tickFormatter\",\n \"tickCount\",\n \"scale\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n ]\n"],"mappings":"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","names":["import_core","import_utils"]}
|
package/dist/use-chart-axis.mjs
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
import { CSSUIObject } from '@yamada-ui/core';
|
2
|
-
import { Dict } from '@yamada-ui/utils';
|
3
|
-
import { CartesianGridProps } from 'recharts';
|
4
|
-
import { GridProps, ChartAxisType, ChartPropGetter } from './chart.types.mjs';
|
5
|
-
import 'react';
|
6
|
-
|
7
|
-
type UseChartGridOptions = {
|
8
|
-
/**
|
9
|
-
* Props passed down to recharts 'CartesianGrid' component.
|
10
|
-
*/
|
11
|
-
gridProps?: GridProps;
|
12
|
-
/**
|
13
|
-
* Specifies which lines should be displayed in the grid.
|
14
|
-
*
|
15
|
-
* @default 'x'
|
16
|
-
*/
|
17
|
-
gridAxis?: ChartAxisType;
|
18
|
-
/**
|
19
|
-
* Dash array for the grid lines and cursor. The first number is the length of the solid line section and the second number is the length of the interval.
|
20
|
-
*
|
21
|
-
* @default '5 5'
|
22
|
-
*/
|
23
|
-
strokeDasharray?: string | number;
|
24
|
-
};
|
25
|
-
type UseChartGridProps = UseChartGridOptions & {
|
26
|
-
styles: Dict<CSSUIObject>;
|
27
|
-
};
|
28
|
-
declare const useChartGrid: ({ gridProps, gridAxis, strokeDasharray, styles, }: UseChartGridProps) => {
|
29
|
-
getGridProps: ChartPropGetter<"div", Partial<CartesianGridProps>, CartesianGridProps>;
|
30
|
-
};
|
31
|
-
|
32
|
-
export { type UseChartGridOptions, useChartGrid };
|
package/dist/use-chart-grid.d.ts
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
import { CSSUIObject } from '@yamada-ui/core';
|
2
|
-
import { Dict } from '@yamada-ui/utils';
|
3
|
-
import { CartesianGridProps } from 'recharts';
|
4
|
-
import { GridProps, ChartAxisType, ChartPropGetter } from './chart.types.js';
|
5
|
-
import 'react';
|
6
|
-
|
7
|
-
type UseChartGridOptions = {
|
8
|
-
/**
|
9
|
-
* Props passed down to recharts 'CartesianGrid' component.
|
10
|
-
*/
|
11
|
-
gridProps?: GridProps;
|
12
|
-
/**
|
13
|
-
* Specifies which lines should be displayed in the grid.
|
14
|
-
*
|
15
|
-
* @default 'x'
|
16
|
-
*/
|
17
|
-
gridAxis?: ChartAxisType;
|
18
|
-
/**
|
19
|
-
* Dash array for the grid lines and cursor. The first number is the length of the solid line section and the second number is the length of the interval.
|
20
|
-
*
|
21
|
-
* @default '5 5'
|
22
|
-
*/
|
23
|
-
strokeDasharray?: string | number;
|
24
|
-
};
|
25
|
-
type UseChartGridProps = UseChartGridOptions & {
|
26
|
-
styles: Dict<CSSUIObject>;
|
27
|
-
};
|
28
|
-
declare const useChartGrid: ({ gridProps, gridAxis, strokeDasharray, styles, }: UseChartGridProps) => {
|
29
|
-
getGridProps: ChartPropGetter<"div", Partial<CartesianGridProps>, CartesianGridProps>;
|
30
|
-
};
|
31
|
-
|
32
|
-
export { type UseChartGridOptions, useChartGrid };
|
package/dist/use-chart-grid.js
DELETED
@@ -1,92 +0,0 @@
|
|
1
|
-
"use client"
|
2
|
-
"use strict";
|
3
|
-
var __defProp = Object.defineProperty;
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
-
var __export = (target, all) => {
|
8
|
-
for (var name in all)
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
-
};
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
-
for (let key of __getOwnPropNames(from))
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
-
}
|
17
|
-
return to;
|
18
|
-
};
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
20
|
-
|
21
|
-
// src/use-chart-grid.ts
|
22
|
-
var use_chart_grid_exports = {};
|
23
|
-
__export(use_chart_grid_exports, {
|
24
|
-
useChartGrid: () => useChartGrid
|
25
|
-
});
|
26
|
-
module.exports = __toCommonJS(use_chart_grid_exports);
|
27
|
-
var import_core2 = require("@yamada-ui/core");
|
28
|
-
var import_utils2 = require("@yamada-ui/utils");
|
29
|
-
var import_react = require("react");
|
30
|
-
|
31
|
-
// src/chart-utils.ts
|
32
|
-
var import_core = require("@yamada-ui/core");
|
33
|
-
var import_utils = require("@yamada-ui/utils");
|
34
|
-
var getClassName = (...styles) => (theme) => (0, import_utils.cx)(
|
35
|
-
...styles.map(
|
36
|
-
(style) => (0, import_utils.isString)(style) ? style : (0, import_core.getCSS)(style)(theme)
|
37
|
-
)
|
38
|
-
);
|
39
|
-
var getComponentProps = ([obj, keys], ...props) => (theme, isContain) => {
|
40
|
-
const [pickedProps, omittedProps] = (0, import_utils.splitObject)(obj, keys);
|
41
|
-
const className = getClassName(...props, omittedProps)(theme);
|
42
|
-
return !isContain ? [pickedProps, className] : { ...pickedProps, className };
|
43
|
-
};
|
44
|
-
|
45
|
-
// src/rechart-properties.ts
|
46
|
-
var gridProperties = [
|
47
|
-
"x",
|
48
|
-
"y",
|
49
|
-
"width",
|
50
|
-
"height",
|
51
|
-
"horizontal",
|
52
|
-
"vertical",
|
53
|
-
"horizontalPoints",
|
54
|
-
"horizontalCoordinatesGenerator",
|
55
|
-
"verticalPoints",
|
56
|
-
"verticalCoordinatesGenerator",
|
57
|
-
"fill",
|
58
|
-
"fillOpacity",
|
59
|
-
"strokeDasharray"
|
60
|
-
];
|
61
|
-
|
62
|
-
// src/use-chart-grid.ts
|
63
|
-
var useChartGrid = ({
|
64
|
-
gridProps = {},
|
65
|
-
gridAxis = "x",
|
66
|
-
strokeDasharray = "5 5",
|
67
|
-
styles
|
68
|
-
}) => {
|
69
|
-
const { theme } = (0, import_core2.useTheme)();
|
70
|
-
const [reChartsProps, propClassName] = getComponentProps(
|
71
|
-
[gridProps, gridProperties],
|
72
|
-
styles.grid
|
73
|
-
)(theme);
|
74
|
-
const getGridProps = (0, import_react.useCallback)(
|
75
|
-
({ className, ...props } = {}, ref = null) => ({
|
76
|
-
ref,
|
77
|
-
className: (0, import_utils2.cx)("ui-chart__grid", className, propClassName),
|
78
|
-
strokeDasharray,
|
79
|
-
vertical: gridAxis === "y" || gridAxis === "xy",
|
80
|
-
horizontal: gridAxis === "x" || gridAxis === "xy",
|
81
|
-
...props,
|
82
|
-
...reChartsProps
|
83
|
-
}),
|
84
|
-
[propClassName, strokeDasharray, gridAxis, reChartsProps]
|
85
|
-
);
|
86
|
-
return { getGridProps };
|
87
|
-
};
|
88
|
-
// Annotate the CommonJS export names for ESM import in node:
|
89
|
-
0 && (module.exports = {
|
90
|
-
useChartGrid
|
91
|
-
});
|
92
|
-
//# sourceMappingURL=use-chart-grid.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../src/use-chart-grid.ts","../src/chart-utils.ts","../src/rechart-properties.ts"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport { useTheme } from \"@yamada-ui/core\"\nimport type { Dict } from \"@yamada-ui/utils\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useCallback } from \"react\"\nimport type { CartesianGridProps } from \"recharts\"\nimport { getComponentProps } from \"./chart-utils\"\nimport type { ChartAxisType, ChartPropGetter, GridProps } from \"./chart.types\"\nimport { gridProperties } from \"./rechart-properties\"\n\nexport type UseChartGridOptions = {\n /**\n * Props passed down to recharts 'CartesianGrid' component.\n */\n gridProps?: GridProps\n /**\n * Specifies which lines should be displayed in the grid.\n *\n * @default 'x'\n */\n gridAxis?: ChartAxisType\n /**\n * Dash array for the grid lines and cursor. The first number is the length of the solid line section and the second number is the length of the interval.\n *\n * @default '5 5'\n */\n strokeDasharray?: string | number\n}\n\ntype UseChartGridProps = UseChartGridOptions & {\n styles: Dict<CSSUIObject>\n}\n\nexport const useChartGrid = ({\n gridProps = {},\n gridAxis = \"x\",\n strokeDasharray = \"5 5\",\n styles,\n}: UseChartGridProps) => {\n const { theme } = useTheme()\n const [reChartsProps, propClassName] = getComponentProps(\n [gridProps, gridProperties],\n styles.grid,\n )(theme)\n\n const getGridProps: ChartPropGetter<\n \"div\",\n Partial<CartesianGridProps>,\n CartesianGridProps\n > = useCallback(\n ({ className, ...props } = {}, ref = null) => ({\n ref,\n className: cx(\"ui-chart__grid\", className, propClassName),\n strokeDasharray: strokeDasharray,\n vertical: gridAxis === \"y\" || gridAxis === \"xy\",\n horizontal: gridAxis === \"x\" || gridAxis === \"xy\",\n ...props,\n ...reChartsProps,\n }),\n [propClassName, strokeDasharray, gridAxis, reChartsProps],\n )\n\n return { getGridProps }\n}\n","import type { StyledTheme } from \"@yamada-ui/core\"\nimport { getCSS } from \"@yamada-ui/core\"\nimport type { Dict } from \"@yamada-ui/utils\"\nimport { cx, isString, splitObject } from \"@yamada-ui/utils\"\n\nexport const getClassName =\n (...styles: (Dict | string | undefined)[]) =>\n (theme: StyledTheme) =>\n cx(\n ...styles.map((style) =>\n isString(style) ? style : getCSS(style)(theme),\n ),\n )\n\nexport const getComponentProps =\n <T extends Dict, K extends keyof T>(\n [obj, keys]: [T, K[]],\n ...props: (Dict | string | undefined)[]\n ) =>\n <P extends boolean = false>(theme: StyledTheme, isContain?: P) => {\n const [pickedProps, omittedProps] = splitObject<T, K>(obj, keys)\n const className = getClassName(...props, omittedProps)(theme)\n\n return (\n !isContain ? [pickedProps, className] : { ...pickedProps, className }\n ) as P extends false\n ? [{ [P in K]: T[P] }, string]\n : { [P in K]: T[P] } & { className: string }\n }\n","import type { ComponentPropsWithoutRef } from \"react\"\nimport type * as Recharts from \"recharts\"\n\nexport const areaChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.AreaChart\n>)[] = [\n \"layout\",\n \"syncId\",\n \"syncMethod\",\n \"width\",\n \"height\",\n \"data\",\n \"margin\",\n \"stackOffset\",\n \"onClick\",\n \"onMouseEnter\",\n \"onMouseMove\",\n \"onMouseLeave\",\n]\n\nexport const barChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.BarChart\n>)[] = [\n \"layout\",\n \"syncId\",\n \"syncMethod\",\n \"width\",\n \"height\",\n \"data\",\n \"margin\",\n \"barCategoryGap\",\n \"barGap\",\n \"barSize\",\n \"maxBarSize\",\n \"stackOffset\",\n \"reverseStackOrder\",\n \"onClick\",\n \"onMouseEnter\",\n \"onMouseMove\",\n \"onMouseLeave\",\n]\n\nexport const lineChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.LineChart\n>)[] = [\n \"layout\",\n \"syncId\",\n \"syncMethod\",\n \"width\",\n \"height\",\n \"data\",\n \"margin\",\n \"onClick\",\n \"onMouseEnter\",\n \"onMouseMove\",\n \"onMouseLeave\",\n]\n\nexport const radarChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.RadarChart\n>)[] = [\n \"width\",\n \"height\",\n \"data\",\n \"cx\",\n \"cy\",\n \"startAngle\",\n \"endAngle\",\n \"innerRadius\",\n \"outerRadius\",\n \"margin\",\n \"onMouseEnter\",\n \"onClick\",\n]\n\nexport const pieChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.PieChart\n>)[] = [\"width\", \"height\", \"margin\", \"onClick\", \"onMouseEnter\", \"onMouseLeave\"]\n\nexport const referenceLineProperties: (keyof Recharts.ReferenceLineProps)[] = [\n \"xAxisId\",\n \"yAxisId\",\n \"x\",\n \"y\",\n \"ifOverflow\",\n \"viewBox\",\n \"xAxis\",\n \"yAxis\",\n \"label\",\n \"isFront\",\n \"strokeWidth\",\n \"segment\",\n]\n\nexport const containerProperties: (keyof Omit<\n Recharts.ResponsiveContainerProps,\n \"children\"\n>)[] = [\n \"aspect\",\n \"width\",\n \"height\",\n \"minWidth\",\n \"minHeight\",\n \"debounce\",\n \"onResize\",\n]\n\nexport const gridProperties: (keyof Recharts.CartesianGridProps)[] = [\n \"x\",\n \"y\",\n \"width\",\n \"height\",\n \"horizontal\",\n \"vertical\",\n \"horizontalPoints\",\n \"horizontalCoordinatesGenerator\",\n \"verticalPoints\",\n \"verticalCoordinatesGenerator\",\n \"fill\",\n \"fillOpacity\",\n \"strokeDasharray\",\n]\n\nexport const xAxisProperties: (keyof Recharts.XAxisProps)[] = [\n \"hide\",\n \"dataKey\",\n \"xAxisId\",\n \"width\",\n \"height\",\n \"orientation\",\n \"type\",\n \"allowDecimals\",\n \"allowDataOverflow\",\n \"allowDuplicatedCategory\",\n \"angle\",\n \"tickCount\",\n \"domain\",\n \"includeHidden\",\n \"interval\",\n \"padding\",\n \"minTickGap\",\n \"axisLine\",\n \"tickLine\",\n \"tickSize\",\n \"tickFormatter\",\n \"ticks\",\n \"tick\",\n \"mirror\",\n \"reversed\",\n \"label\",\n \"scale\",\n \"unit\",\n \"name\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"tickMargin\",\n]\n\nexport const yAxisProperties: (keyof Recharts.YAxisProps)[] = [\n \"hide\",\n \"dataKey\",\n \"yAxisId\",\n \"width\",\n \"height\",\n \"orientation\",\n \"type\",\n \"tickCount\",\n \"domain\",\n \"includeHidden\",\n \"interval\",\n \"padding\",\n \"minTickGap\",\n \"allowDecimals\",\n \"allowDataOverflow\",\n \"allowDuplicatedCategory\",\n \"axisLine\",\n \"tickLine\",\n \"tickSize\",\n \"tickFormatter\",\n \"ticks\",\n \"tick\",\n \"mirror\",\n \"reversed\",\n \"label\",\n \"scale\",\n \"unit\",\n \"name\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"tickMargin\",\n]\n\nexport const legendProperties: (keyof Omit<Recharts.LegendProps, \"ref\">)[] = [\n \"width\",\n \"height\",\n \"layout\",\n \"align\",\n \"verticalAlign\",\n \"iconSize\",\n \"iconType\",\n \"payload\",\n \"chartWidth\",\n \"chartHeight\",\n \"margin\",\n \"content\",\n \"formatter\",\n \"wrapperStyle\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n]\n\nexport const tooltipProperties: (keyof Recharts.TooltipProps<any, any>)[] = [\n \"offset\",\n \"filterNull\",\n \"itemStyle\",\n \"wrapperStyle\",\n \"contentStyle\",\n \"labelStyle\",\n \"cursor\",\n \"viewBox\",\n \"allowEscapeViewBox\",\n \"active\",\n \"position\",\n \"coordinate\",\n \"payload\",\n \"label\",\n \"content\",\n \"formatter\",\n \"labelFormatter\",\n \"itemSorter\",\n \"isAnimationActive\",\n \"animationDuration\",\n \"animationEasing\",\n]\n\nexport const areaProperties: (keyof Omit<Recharts.AreaProps, \"ref\">)[] = [\n \"type\",\n \"dataKey\",\n \"xAxisId\",\n \"yAxisId\",\n \"legendType\",\n \"dot\",\n \"activeDot\",\n \"label\",\n \"stroke\",\n \"strokeWidth\",\n \"layout\",\n \"baseLine\",\n \"points\",\n \"stackId\",\n \"connectNulls\",\n \"unit\",\n \"name\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"id\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n]\n\nexport const barProperties: (keyof Omit<Recharts.BarProps, \"ref\">)[] = [\n \"layout\",\n \"dataKey\",\n \"xAxisId\",\n \"yAxisId\",\n \"legendType\",\n \"label\",\n \"data\",\n \"barSize\",\n \"maxBarSize\",\n \"minPointSize\",\n \"background\",\n \"shape\",\n \"activeBar\",\n \"stackId\",\n \"unit\",\n \"name\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"id\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"radius\",\n]\n\nexport const radarProperties: (keyof Omit<Recharts.RadarProps, \"ref\">)[] = [\n \"dataKey\",\n \"points\",\n \"shape\",\n \"dot\",\n \"activeDot\",\n \"legendType\",\n \"label\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n]\n\nexport const lineProperties: (keyof Omit<Recharts.LineProps, \"ref\">)[] = [\n \"type\",\n \"dataKey\",\n \"xAxisId\",\n \"yAxisId\",\n \"legendType\",\n \"dot\",\n \"activeDot\",\n \"label\",\n \"hide\",\n \"points\",\n \"stroke\",\n \"strokeWidth\",\n \"layout\",\n \"connectNulls\",\n \"unit\",\n \"name\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"id\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"strokeDasharray\",\n]\n\nexport const pieProperties: (keyof Omit<Recharts.PieProps, \"ref\">)[] = [\n \"cx\",\n \"cy\",\n \"innerRadius\",\n \"outerRadius\",\n \"startAngle\",\n \"endAngle\",\n \"minAngle\",\n \"paddingAngle\",\n \"nameKey\",\n \"dataKey\",\n \"legendType\",\n \"label\",\n \"labelLine\",\n \"data\",\n \"activeIndex\",\n \"activeShape\",\n \"inactiveShape\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n]\n\nexport const dotProperties: (keyof Omit<Recharts.DotProps, \"ref\">)[] = [\n \"cx\",\n \"cy\",\n \"r\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n]\n\nexport const polarGridProperties: (keyof Recharts.PolarGridProps)[] = [\n \"cx\",\n \"cy\",\n \"innerRadius\",\n \"outerRadius\",\n \"polarAngles\",\n \"polarRadius\",\n \"gridType\",\n]\n\nexport const polarAngleAxisProperties: (keyof Recharts.PolarAngleAxisProps)[] =\n [\n \"dataKey\",\n \"cx\",\n \"cy\",\n \"radius\",\n \"axisLine\",\n \"axisLineType\",\n \"tickLine\",\n \"tickSize\",\n \"tick\",\n \"ticks\",\n \"orient\",\n \"tickFormatter\",\n \"type\",\n \"allowDuplicatedCategory\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n ]\nexport const polarRadiusAxisProperties: (keyof Recharts.PolarRadiusAxisProps)[] =\n [\n \"angle\",\n \"type\",\n \"allowDuplicatedCategory\",\n \"cx\",\n \"cy\",\n \"domain\",\n \"reversed\",\n \"label\",\n \"orientation\",\n \"axisLine\",\n \"tick\",\n \"tickSize\",\n \"tickFormatter\",\n \"tickCount\",\n \"scale\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n ]\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,IAAAA,eAAyB;AAEzB,IAAAC,gBAAmB;AACnB,mBAA4B;;;ACH5B,kBAAuB;AAEvB,mBAA0C;AAEnC,IAAM,eACX,IAAI,WACJ,CAAC,cACC;AAAA,EACE,GAAG,OAAO;AAAA,IAAI,CAAC,cACb,uBAAS,KAAK,IAAI,YAAQ,oBAAO,KAAK,EAAE,KAAK;AAAA,EAC/C;AACF;AAEG,IAAM,oBACX,CACE,CAAC,KAAK,IAAI,MACP,UAEL,CAA4B,OAAoB,cAAkB;AAChE,QAAM,CAAC,aAAa,YAAY,QAAI,0BAAkB,KAAK,IAAI;AAC/D,QAAM,YAAY,aAAa,GAAG,OAAO,YAAY,EAAE,KAAK;AAE5D,SACE,CAAC,YAAY,CAAC,aAAa,SAAS,IAAI,EAAE,GAAG,aAAa,UAAU;AAIxE;;;AC+EK,IAAM,iBAAwD;AAAA,EACnE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;;;AFxFO,IAAM,eAAe,CAAC;AAAA,EAC3B,YAAY,CAAC;AAAA,EACb,WAAW;AAAA,EACX,kBAAkB;AAAA,EAClB;AACF,MAAyB;AACvB,QAAM,EAAE,MAAM,QAAI,uBAAS;AAC3B,QAAM,CAAC,eAAe,aAAa,IAAI;AAAA,IACrC,CAAC,WAAW,cAAc;AAAA,IAC1B,OAAO;AAAA,EACT,EAAE,KAAK;AAEP,QAAM,mBAIF;AAAA,IACF,CAAC,EAAE,WAAW,GAAG,MAAM,IAAI,CAAC,GAAG,MAAM,UAAU;AAAA,MAC7C;AAAA,MACA,eAAW,kBAAG,kBAAkB,WAAW,aAAa;AAAA,MACxD;AAAA,MACA,UAAU,aAAa,OAAO,aAAa;AAAA,MAC3C,YAAY,aAAa,OAAO,aAAa;AAAA,MAC7C,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,CAAC,eAAe,iBAAiB,UAAU,aAAa;AAAA,EAC1D;AAEA,SAAO,EAAE,aAAa;AACxB;","names":["import_core","import_utils"]}
|
package/dist/use-chart-grid.mjs
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|