@react-fabric/chart 1.0.0-beta.36 → 1.0.0-beta.37
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/{src/wrapper/Chart.module.css → css/_chart.css} +5 -5
- package/css/styles.css +24 -0
- package/dist/cjs/wrapper/ChartContainer.js +1 -2
- package/dist/cjs/wrapper/ChartToolbar.js +1 -2
- package/dist/esm/wrapper/ChartContainer.js +1 -2
- package/dist/esm/wrapper/ChartToolbar.js +1 -2
- package/package.json +6 -4
- package/src/wrapper/ChartContainer.tsx +1 -2
- package/src/wrapper/ChartToolbar.tsx +1 -2
- package/dist/cjs/wrapper/Chart.module.css +0 -1
- package/dist/esm/wrapper/Chart.module.css +0 -1
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
|
|
45
45
|
overflow: hidden;
|
|
46
46
|
|
|
47
|
-
color:
|
|
47
|
+
color: var(--color-primary-500);
|
|
48
48
|
|
|
49
49
|
appearance: none;
|
|
50
50
|
border-radius: 999px;
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
|
|
60
60
|
appearance: none;
|
|
61
61
|
opacity: 0.7;
|
|
62
|
-
background:
|
|
62
|
+
background: var(--color-primary-500);
|
|
63
63
|
clip-path: polygon(
|
|
64
64
|
100% -1px,
|
|
65
65
|
0.125rem -1px,
|
|
@@ -71,18 +71,18 @@
|
|
|
71
71
|
calc(100% + 1px) calc(100% + 1px)
|
|
72
72
|
);
|
|
73
73
|
filter: brightness(100%);
|
|
74
|
-
border: 1px solid
|
|
74
|
+
border: 1px solid var(--color-tint-50);
|
|
75
75
|
border-radius: 0.5rem;
|
|
76
76
|
box-shadow: calc(-100vmax - 1rem) 0 0 100vmax currentColor;
|
|
77
77
|
|
|
78
78
|
&:hover {
|
|
79
|
-
background:
|
|
79
|
+
background: var(--color-primary-600);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
&&::-webkit-slider-runnable-track {
|
|
84
84
|
height: 1rem;
|
|
85
|
-
background: linear-gradient(
|
|
85
|
+
background: linear-gradient(var(--color-tint-100) 0 0) scroll no-repeat
|
|
86
86
|
center / 100% 0.25rem;
|
|
87
87
|
border-radius: 99px;
|
|
88
88
|
}
|
package/css/styles.css
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* React Fabric
|
|
3
|
+
* @version: 1.0.0
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* The MIT License (MIT)
|
|
7
|
+
* Copyright (c) 2025 Adarsh Pastakia
|
|
8
|
+
*
|
|
9
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
|
10
|
+
* and associated documentation files (the "Software"), to deal in the Software without restriction,
|
|
11
|
+
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
12
|
+
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
13
|
+
* subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
16
|
+
* portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
19
|
+
* TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
20
|
+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
@import "./_chart.css";
|
|
@@ -7,7 +7,6 @@ var classNames = require('classnames');
|
|
|
7
7
|
require('echarts-wordcloud');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
require('../types/charts.js');
|
|
10
|
-
var Chart_module = require('./Chart.module.css');
|
|
11
10
|
var ChartToolbar = require('./ChartToolbar.js');
|
|
12
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
13
12
|
var echarts = require('echarts');
|
|
@@ -156,7 +155,7 @@ var ChartContainer = /*#__PURE__*/react.memo(function (_ref2) {
|
|
|
156
155
|
})]
|
|
157
156
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
158
157
|
ref: containerRef,
|
|
159
|
-
className: classNames(
|
|
158
|
+
className: classNames("rf-chartContainer", "overflow-hidden area-content")
|
|
160
159
|
}), isEmpty && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
161
160
|
className: "absolute inset-0 bg-base grid place-content-center",
|
|
162
161
|
children: /*#__PURE__*/jsxRuntime.jsx(core.EmptyContent, {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var classNames = require('classnames');
|
|
4
|
-
var Chart_module = require('./Chart.module.css');
|
|
5
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
5
|
|
|
7
6
|
/*
|
|
@@ -30,7 +29,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
30
29
|
var ChartToolbar = function ChartToolbar(_ref) {
|
|
31
30
|
var children = _ref.children;
|
|
32
31
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
33
|
-
className: classNames("flex flex-nowrap items-center justify-end bg-base area-head",
|
|
32
|
+
className: classNames("flex flex-nowrap items-center justify-end bg-base area-head", "rf-chartToolbar"),
|
|
34
33
|
children: children
|
|
35
34
|
});
|
|
36
35
|
};
|
|
@@ -7,7 +7,6 @@ import classNames from 'classnames';
|
|
|
7
7
|
import 'echarts-wordcloud';
|
|
8
8
|
import { memo, useState, useCallback, useImperativeHandle, useMemo, useEffect, Fragment } from 'react';
|
|
9
9
|
import '../types/charts.js';
|
|
10
|
-
import classes from './Chart.module.css';
|
|
11
10
|
import { ChartToolbar } from './ChartToolbar.js';
|
|
12
11
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
13
12
|
import * as echarts from 'echarts';
|
|
@@ -137,7 +136,7 @@ var ChartContainer = /*#__PURE__*/memo(function (_ref2) {
|
|
|
137
136
|
})]
|
|
138
137
|
}), /*#__PURE__*/jsx("div", {
|
|
139
138
|
ref: containerRef,
|
|
140
|
-
className: classNames(
|
|
139
|
+
className: classNames("rf-chartContainer", "overflow-hidden area-content")
|
|
141
140
|
}), isEmpty && /*#__PURE__*/jsx("div", {
|
|
142
141
|
className: "absolute inset-0 bg-base grid place-content-center",
|
|
143
142
|
children: /*#__PURE__*/jsx(EmptyContent, {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import classes from './Chart.module.css';
|
|
5
4
|
import { jsx } from 'react/jsx-runtime';
|
|
6
5
|
|
|
7
6
|
/*
|
|
@@ -30,7 +29,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
30
29
|
var ChartToolbar = function ChartToolbar(_ref) {
|
|
31
30
|
var children = _ref.children;
|
|
32
31
|
return /*#__PURE__*/jsx("div", {
|
|
33
|
-
className: classNames("flex flex-nowrap items-center justify-end bg-base area-head",
|
|
32
|
+
className: classNames("flex flex-nowrap items-center justify-end bg-base area-head", "rf-chartToolbar"),
|
|
34
33
|
children: children
|
|
35
34
|
});
|
|
36
35
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-fabric/chart",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.37",
|
|
4
4
|
"description": "RUF: Charting package",
|
|
5
5
|
"author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,9 +11,11 @@
|
|
|
11
11
|
"types": "dist/types/index.d.ts",
|
|
12
12
|
"directories": {
|
|
13
13
|
"src": "src",
|
|
14
|
+
"styles": "css",
|
|
14
15
|
"test": "tests"
|
|
15
16
|
},
|
|
16
17
|
"files": [
|
|
18
|
+
"css",
|
|
17
19
|
"src",
|
|
18
20
|
"dist"
|
|
19
21
|
],
|
|
@@ -33,8 +35,8 @@
|
|
|
33
35
|
"watch": "npm-run-all -p watch:rollup watch:dts"
|
|
34
36
|
},
|
|
35
37
|
"dependencies": {
|
|
36
|
-
"@react-fabric/core": "^1.0.0-beta.
|
|
37
|
-
"@react-fabric/utilities": "^1.0.0-beta.
|
|
38
|
+
"@react-fabric/core": "^1.0.0-beta.37",
|
|
39
|
+
"@react-fabric/utilities": "^1.0.0-beta.37",
|
|
38
40
|
"classnames": "^2.5.1",
|
|
39
41
|
"color": "^4.2.3",
|
|
40
42
|
"date-fns": "^4.0.0",
|
|
@@ -54,5 +56,5 @@
|
|
|
54
56
|
"node": ">=18.12.0",
|
|
55
57
|
"npm": ">=8.19.0"
|
|
56
58
|
},
|
|
57
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "9b737229bf24ebe986540ee2c4b8904ebc4a5a9b"
|
|
58
60
|
}
|
|
@@ -45,7 +45,6 @@ import {
|
|
|
45
45
|
} from "react";
|
|
46
46
|
import { type Theme } from "../types";
|
|
47
47
|
import echarts from "../types/charts";
|
|
48
|
-
import classes from "./Chart.module.css";
|
|
49
48
|
import { ChartToolbar } from "./ChartToolbar";
|
|
50
49
|
|
|
51
50
|
const defaultOptions = {
|
|
@@ -198,7 +197,7 @@ export const ChartContainer = memo(
|
|
|
198
197
|
<div
|
|
199
198
|
ref={containerRef}
|
|
200
199
|
className={classNames(
|
|
201
|
-
|
|
200
|
+
"rf-chartContainer",
|
|
202
201
|
"overflow-hidden area-content",
|
|
203
202
|
)}
|
|
204
203
|
/>
|
|
@@ -24,14 +24,13 @@
|
|
|
24
24
|
import { type ChildrenProp } from "@react-fabric/core/dist/types/types";
|
|
25
25
|
import classNames from "classnames";
|
|
26
26
|
import { type FC } from "react";
|
|
27
|
-
import classes from "./Chart.module.css";
|
|
28
27
|
|
|
29
28
|
export const ChartToolbar: FC<ChildrenProp> = ({ children }) => {
|
|
30
29
|
return (
|
|
31
30
|
<div
|
|
32
31
|
className={classNames(
|
|
33
32
|
"flex flex-nowrap items-center justify-end bg-base area-head",
|
|
34
|
-
|
|
33
|
+
"rf-chartToolbar",
|
|
35
34
|
)}
|
|
36
35
|
>
|
|
37
36
|
{children}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.chartContainer{&>div:last-child:not(:first-child)>:last-child{bottom:unset!important;inset-inline-end:0!important;left:unset!important;padding:.5rem;right:unset!important;top:0;&>div{float:unset!important;margin:0!important}}}.chartToolbar{input[type=range]{appearance:none;border-radius:999px;color:theme(colors.primary.500);overflow:hidden;position:relative;&::-webkit-slider-thumb{appearance:none;background:theme(colors.primary.500);border:1px solid theme(colors.tint.50);border-radius:.5rem;box-shadow:calc(-100vmax - 1rem) 0 0 100vmax currentColor;clip-path:polygon(100% -1px,.125rem -1px,0 .375rem,-100vmax .375rem,-100vmax .625rem,0 .625rem,.125rem 100%,calc(100% + 1px) calc(100% + 1px));cursor:pointer;filter:brightness(100%);height:1rem;opacity:.7;position:relative;width:1rem;&:hover{background:theme(colors.primary.600)}}&&::-webkit-slider-runnable-track{background:linear-gradient(theme(colors.tint.100) 0 0) scroll no-repeat 50% /100% .25rem;border-radius:99px;height:1rem}}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.chartContainer{&>div:last-child:not(:first-child)>:last-child{bottom:unset!important;inset-inline-end:0!important;left:unset!important;padding:.5rem;right:unset!important;top:0;&>div{float:unset!important;margin:0!important}}}.chartToolbar{input[type=range]{appearance:none;border-radius:999px;color:theme(colors.primary.500);overflow:hidden;position:relative;&::-webkit-slider-thumb{appearance:none;background:theme(colors.primary.500);border:1px solid theme(colors.tint.50);border-radius:.5rem;box-shadow:calc(-100vmax - 1rem) 0 0 100vmax currentColor;clip-path:polygon(100% -1px,.125rem -1px,0 .375rem,-100vmax .375rem,-100vmax .625rem,0 .625rem,.125rem 100%,calc(100% + 1px) calc(100% + 1px));cursor:pointer;filter:brightness(100%);height:1rem;opacity:.7;position:relative;width:1rem;&:hover{background:theme(colors.primary.600)}}&&::-webkit-slider-runnable-track{background:linear-gradient(theme(colors.tint.100) 0 0) scroll no-repeat 50% /100% .25rem;border-radius:99px;height:1rem}}}
|