@tipp/ui 0.1.3 → 0.1.4
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/chart/chart.cjs +55 -0
- package/dist/chart/chart.cjs.map +1 -0
- package/dist/chart/chart.d.cts +6 -0
- package/dist/chart/chart.d.ts +6 -0
- package/dist/chart/chart.js +20 -0
- package/dist/chart/chart.js.map +1 -0
- package/dist/index.js +14 -14
- package/package.json +14 -3
- package/src/chart/chart.tsx +20 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __export = (target, all) => {
|
|
21
|
+
for (var name in all)
|
|
22
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
23
|
+
};
|
|
24
|
+
var __copyProps = (to, from, except, desc) => {
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
26
|
+
for (let key of __getOwnPropNames(from))
|
|
27
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
28
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
29
|
+
}
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
32
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
|
+
|
|
34
|
+
// src/chart/chart.tsx
|
|
35
|
+
var chart_exports = {};
|
|
36
|
+
__export(chart_exports, {
|
|
37
|
+
Chart: () => Chart
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(chart_exports);
|
|
40
|
+
var import_react_echarts = require("@kbox-labs/react-echarts");
|
|
41
|
+
var import_react_resize_detector = require("react-resize-detector");
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
|
+
function Chart(props) {
|
|
44
|
+
const { width, height, ref } = (0, import_react_resize_detector.useResizeDetector)({
|
|
45
|
+
handleHeight: false,
|
|
46
|
+
refreshMode: "debounce",
|
|
47
|
+
refreshRate: 100
|
|
48
|
+
});
|
|
49
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_echarts.EChart, __spreadValues({ style: { width, height } }, props)) });
|
|
50
|
+
}
|
|
51
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
+
0 && (module.exports = {
|
|
53
|
+
Chart
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=chart.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/chart/chart.tsx"],"sourcesContent":["import React from 'react';\nimport { EChart } from '@kbox-labs/react-echarts';\nimport type { EChartProps } from '@kbox-labs/react-echarts';\nimport { useResizeDetector } from 'react-resize-detector';\n\nexport type ChartProps = EChartProps;\n\nexport function Chart(props: ChartProps): JSX.Element {\n const { width, height, ref } = useResizeDetector({\n handleHeight: false,\n refreshMode: 'debounce',\n refreshRate: 100,\n });\n\n return (\n <div ref={ref} style={{ width: '100%', height: '100%' }}>\n <EChart style={{ width, height }} {...props} />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,2BAAuB;AAEvB,mCAAkC;AAa5B;AATC,SAAS,MAAM,OAAgC;AACpD,QAAM,EAAE,OAAO,QAAQ,IAAI,QAAI,gDAAkB;AAAA,IAC/C,cAAc;AAAA,IACd,aAAa;AAAA,IACb,aAAa;AAAA,EACf,CAAC;AAED,SACE,4CAAC,SAAI,KAAU,OAAO,EAAE,OAAO,QAAQ,QAAQ,OAAO,GACpD,sDAAC,8CAAO,OAAO,EAAE,OAAO,OAAO,KAAO,MAAO,GAC/C;AAEJ;","names":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__spreadValues
|
|
3
|
+
} from "../chunk-LGTAQGUA.js";
|
|
4
|
+
|
|
5
|
+
// src/chart/chart.tsx
|
|
6
|
+
import { EChart } from "@kbox-labs/react-echarts";
|
|
7
|
+
import { useResizeDetector } from "react-resize-detector";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function Chart(props) {
|
|
10
|
+
const { width, height, ref } = useResizeDetector({
|
|
11
|
+
handleHeight: false,
|
|
12
|
+
refreshMode: "debounce",
|
|
13
|
+
refreshRate: 100
|
|
14
|
+
});
|
|
15
|
+
return /* @__PURE__ */ jsx("div", { ref, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsx(EChart, __spreadValues({ style: { width, height } }, props)) });
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
Chart
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/chart/chart.tsx"],"sourcesContent":["import React from 'react';\nimport { EChart } from '@kbox-labs/react-echarts';\nimport type { EChartProps } from '@kbox-labs/react-echarts';\nimport { useResizeDetector } from 'react-resize-detector';\n\nexport type ChartProps = EChartProps;\n\nexport function Chart(props: ChartProps): JSX.Element {\n const { width, height, ref } = useResizeDetector({\n handleHeight: false,\n refreshMode: 'debounce',\n refreshRate: 100,\n });\n\n return (\n <div ref={ref} style={{ width: '100%', height: '100%' }}>\n <EChart style={{ width, height }} {...props} />\n </div>\n );\n}\n"],"mappings":";;;;;AACA,SAAS,cAAc;AAEvB,SAAS,yBAAyB;AAa5B;AATC,SAAS,MAAM,OAAgC;AACpD,QAAM,EAAE,OAAO,QAAQ,IAAI,IAAI,kBAAkB;AAAA,IAC/C,cAAc;AAAA,IACd,aAAa;AAAA,IACb,aAAa;AAAA,EACf,CAAC;AAED,SACE,oBAAC,SAAI,KAAU,OAAO,EAAE,OAAO,QAAQ,QAAQ,OAAO,GACpD,8BAAC,yBAAO,OAAO,EAAE,OAAO,OAAO,KAAO,MAAO,GAC/C;AAEJ;","names":[]}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Tooltip
|
|
3
|
+
} from "./chunk-ACVANQJ4.js";
|
|
1
4
|
import {
|
|
2
5
|
ThemeProvider
|
|
3
6
|
} from "./chunk-LREYUDKD.js";
|
|
@@ -10,6 +13,9 @@ import {
|
|
|
10
13
|
import {
|
|
11
14
|
DatePicker
|
|
12
15
|
} from "./chunk-D5QWAVBB.js";
|
|
16
|
+
import {
|
|
17
|
+
Skeleton
|
|
18
|
+
} from "./chunk-5H3YPCZK.js";
|
|
13
19
|
import {
|
|
14
20
|
Strong
|
|
15
21
|
} from "./chunk-74DX4CU7.js";
|
|
@@ -32,8 +38,8 @@ import {
|
|
|
32
38
|
Text
|
|
33
39
|
} from "./chunk-DYUKDKUS.js";
|
|
34
40
|
import {
|
|
35
|
-
|
|
36
|
-
} from "./chunk-
|
|
41
|
+
RadioCards
|
|
42
|
+
} from "./chunk-6IVCARWS.js";
|
|
37
43
|
import {
|
|
38
44
|
RadioGroup
|
|
39
45
|
} from "./chunk-6DJOIRMF.js";
|
|
@@ -56,8 +62,8 @@ import {
|
|
|
56
62
|
Separator
|
|
57
63
|
} from "./chunk-HYITAA4J.js";
|
|
58
64
|
import {
|
|
59
|
-
|
|
60
|
-
} from "./chunk-
|
|
65
|
+
HoverCard
|
|
66
|
+
} from "./chunk-O3T3TM3V.js";
|
|
61
67
|
import {
|
|
62
68
|
IconButton
|
|
63
69
|
} from "./chunk-O3DNDMV3.js";
|
|
@@ -80,8 +86,8 @@ import {
|
|
|
80
86
|
Quote
|
|
81
87
|
} from "./chunk-YO3BQW6S.js";
|
|
82
88
|
import {
|
|
83
|
-
|
|
84
|
-
} from "./chunk-
|
|
89
|
+
Container
|
|
90
|
+
} from "./chunk-Q37G2GS6.js";
|
|
85
91
|
import {
|
|
86
92
|
DataList
|
|
87
93
|
} from "./chunk-VTJZMOSP.js";
|
|
@@ -104,8 +110,8 @@ import {
|
|
|
104
110
|
Heading
|
|
105
111
|
} from "./chunk-MYTJIEMB.js";
|
|
106
112
|
import {
|
|
107
|
-
|
|
108
|
-
} from "./chunk-
|
|
113
|
+
Box
|
|
114
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
109
115
|
import {
|
|
110
116
|
Button
|
|
111
117
|
} from "./chunk-LFJCZVNE.js";
|
|
@@ -127,9 +133,6 @@ import {
|
|
|
127
133
|
import {
|
|
128
134
|
Code
|
|
129
135
|
} from "./chunk-OHMOP5PV.js";
|
|
130
|
-
import {
|
|
131
|
-
Container
|
|
132
|
-
} from "./chunk-Q37G2GS6.js";
|
|
133
136
|
import {
|
|
134
137
|
BookmarkIcon,
|
|
135
138
|
ChatBubbleIcon,
|
|
@@ -155,9 +158,6 @@ import {
|
|
|
155
158
|
import {
|
|
156
159
|
Blockquote
|
|
157
160
|
} from "./chunk-YGL6SWKN.js";
|
|
158
|
-
import {
|
|
159
|
-
Box
|
|
160
|
-
} from "./chunk-4Y5BEXVN.js";
|
|
161
161
|
import "./chunk-LGTAQGUA.js";
|
|
162
162
|
export {
|
|
163
163
|
AlertDialog,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tipp/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -34,6 +34,16 @@
|
|
|
34
34
|
"default": "./dist/theme/theme-provider.js"
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
+
"./chart": {
|
|
38
|
+
"require": {
|
|
39
|
+
"types": "./dist/chart/chart.d.ts",
|
|
40
|
+
"default": "./dist/chart/chart.cjs"
|
|
41
|
+
},
|
|
42
|
+
"import": {
|
|
43
|
+
"types": "./dist/chart/chart.d.ts",
|
|
44
|
+
"default": "./dist/chart/chart.js"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
37
47
|
"./*": "./*"
|
|
38
48
|
},
|
|
39
49
|
"main": "dist/index.js",
|
|
@@ -44,6 +54,7 @@
|
|
|
44
54
|
"dist/**"
|
|
45
55
|
],
|
|
46
56
|
"dependencies": {
|
|
57
|
+
"@kbox-labs/react-echarts": "^1.2.0",
|
|
47
58
|
"@radix-ui/react-icons": "^1.3.0",
|
|
48
59
|
"@radix-ui/themes": "^3.1.1",
|
|
49
60
|
"react": "^18.3.1",
|
|
@@ -65,8 +76,8 @@
|
|
|
65
76
|
"postcss-nesting": "12.0.2",
|
|
66
77
|
"tsup": "^8.0.2",
|
|
67
78
|
"typescript": "^5.3.3",
|
|
68
|
-
"@tipp/eslint-config": "0.2.
|
|
69
|
-
"@tipp/typescript-config": "0.0.
|
|
79
|
+
"@tipp/eslint-config": "0.2.2",
|
|
80
|
+
"@tipp/typescript-config": "0.0.3"
|
|
70
81
|
},
|
|
71
82
|
"scripts": {
|
|
72
83
|
"build": "pnpm run build:js && pnpm run build:css",
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EChart } from '@kbox-labs/react-echarts';
|
|
3
|
+
import type { EChartProps } from '@kbox-labs/react-echarts';
|
|
4
|
+
import { useResizeDetector } from 'react-resize-detector';
|
|
5
|
+
|
|
6
|
+
export type ChartProps = EChartProps;
|
|
7
|
+
|
|
8
|
+
export function Chart(props: ChartProps): JSX.Element {
|
|
9
|
+
const { width, height, ref } = useResizeDetector({
|
|
10
|
+
handleHeight: false,
|
|
11
|
+
refreshMode: 'debounce',
|
|
12
|
+
refreshRate: 100,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<div ref={ref} style={{ width: '100%', height: '100%' }}>
|
|
17
|
+
<EChart style={{ width, height }} {...props} />
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
}
|