deepsea-components 5.16.15 → 5.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AutoFit.cjs +9 -9
- package/dist/components/AutoFit.js +9 -9
- package/dist/components/AutoScroll.cjs +4 -4
- package/dist/components/AutoScroll.js +4 -4
- package/dist/components/AutoSizeTextarea.cjs +23 -81
- package/dist/components/AutoSizeTextarea.js +23 -81
- package/dist/components/CircleText.cjs +24 -120
- package/dist/components/CircleText.js +24 -120
- package/dist/components/CopyButton.cjs +2 -2
- package/dist/components/CopyButton.js +2 -2
- package/dist/components/DraggableGrid.cjs +98 -149
- package/dist/components/DraggableGrid.js +98 -149
- package/dist/components/Echart.cjs +24 -94
- package/dist/components/Echart.js +24 -94
- package/dist/components/Flow.cjs +8 -8
- package/dist/components/Flow.js +8 -8
- package/dist/components/FormLabel.cjs +27 -92
- package/dist/components/FormLabel.js +27 -92
- package/dist/components/HlsPlayer.cjs +24 -65
- package/dist/components/HlsPlayer.js +24 -65
- package/dist/components/IconFileType.cjs +4 -14
- package/dist/components/IconFileType.js +4 -14
- package/dist/components/InfiniteScroll.cjs +4 -4
- package/dist/components/InfiniteScroll.js +4 -4
- package/dist/components/InputFile.cjs +11 -2
- package/dist/components/InputFile.d.ts +8 -0
- package/dist/components/InputFile.js +11 -2
- package/dist/components/InputFileButton.cjs +18 -9
- package/dist/components/InputFileButton.js +18 -9
- package/dist/components/ReadSheet.cjs +7 -32
- package/dist/components/ReadSheet.js +7 -32
- package/dist/components/Ring.cjs +10 -48
- package/dist/components/Ring.js +10 -48
- package/dist/components/ScrollMask.cjs +11 -97
- package/dist/components/ScrollMask.js +11 -97
- package/dist/components/SectionRing.cjs +15 -60
- package/dist/components/SectionRing.js +15 -60
- package/dist/components/TransitionBox.cjs +28 -118
- package/dist/components/TransitionBox.js +28 -118
- package/dist/components/TransitionNum.cjs +8 -8
- package/dist/components/TransitionNum.js +8 -8
- package/dist/components/Trapezium.cjs +9 -68
- package/dist/components/Trapezium.js +9 -68
- package/dist/components/Unify.cjs +19 -79
- package/dist/components/Unify.js +19 -79
- package/package.json +3 -3
- package/src/components/InputFile.tsx +23 -2
- package/src/components/InputFileButton.tsx +16 -2
|
@@ -1,135 +1,45 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { c } from "react/compiler-runtime";
|
|
4
3
|
import { forwardRef, useEffect, useRef, useState } from "react";
|
|
5
4
|
import { useSize } from "soda-hooks";
|
|
6
5
|
const TransitionBox = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
7
|
-
const
|
|
8
|
-
let children;
|
|
9
|
-
let containerClassName;
|
|
10
|
-
let containerStyle;
|
|
11
|
-
let rest;
|
|
12
|
-
let style;
|
|
13
|
-
let t0;
|
|
14
|
-
let t1;
|
|
15
|
-
let t2;
|
|
16
|
-
if ($[0] !== props) {
|
|
17
|
-
({ style, containerClassName, containerStyle, children, vertical: t0, horizontal: t1, time: t2, ...rest } = props);
|
|
18
|
-
$[0] = props;
|
|
19
|
-
$[1] = children;
|
|
20
|
-
$[2] = containerClassName;
|
|
21
|
-
$[3] = containerStyle;
|
|
22
|
-
$[4] = rest;
|
|
23
|
-
$[5] = style;
|
|
24
|
-
$[6] = t0;
|
|
25
|
-
$[7] = t1;
|
|
26
|
-
$[8] = t2;
|
|
27
|
-
} else {
|
|
28
|
-
children = $[1];
|
|
29
|
-
containerClassName = $[2];
|
|
30
|
-
containerStyle = $[3];
|
|
31
|
-
rest = $[4];
|
|
32
|
-
style = $[5];
|
|
33
|
-
t0 = $[6];
|
|
34
|
-
t1 = $[7];
|
|
35
|
-
t2 = $[8];
|
|
36
|
-
}
|
|
37
|
-
const vertical = void 0 === t0 ? true : t0;
|
|
38
|
-
const horizontal = void 0 === t1 ? true : t1;
|
|
39
|
-
const time = void 0 === t2 ? 3000 : t2;
|
|
6
|
+
const { style, containerClassName, containerStyle, children, vertical = true, horizontal = true, time = 3000, ...rest } = props;
|
|
40
7
|
const container = useRef(null);
|
|
41
8
|
const size = useSize(container);
|
|
42
9
|
const width = (null == size ? void 0 : size.width) ?? 0;
|
|
43
10
|
const height = (null == size ? void 0 : size.height) ?? 0;
|
|
44
11
|
const [count, setCount] = useState(0);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if ($[10] !== height || $[11] !== width) {
|
|
54
|
-
t4 = [
|
|
55
|
-
width,
|
|
56
|
-
height
|
|
57
|
-
];
|
|
58
|
-
$[10] = height;
|
|
59
|
-
$[11] = width;
|
|
60
|
-
$[12] = t4;
|
|
61
|
-
} else t4 = $[12];
|
|
62
|
-
useEffect(t3, t4);
|
|
63
|
-
let t5;
|
|
64
|
-
if ($[13] !== count || $[14] !== horizontal || $[15] !== vertical) {
|
|
65
|
-
t5 = 3 === count ? [
|
|
12
|
+
useEffect(()=>{
|
|
13
|
+
setCount((count)=>Math.min(count + 1, 3));
|
|
14
|
+
}, [
|
|
15
|
+
width,
|
|
16
|
+
height
|
|
17
|
+
]);
|
|
18
|
+
const outerStyle = {
|
|
19
|
+
transitionProperty: 3 === count ? [
|
|
66
20
|
horizontal && "width",
|
|
67
21
|
vertical && "height"
|
|
68
|
-
].filter(Boolean).join(", ") : void 0
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
height,
|
|
82
|
-
overflow: "hidden",
|
|
83
|
-
position: "relative",
|
|
84
|
-
...style
|
|
85
|
-
};
|
|
86
|
-
$[17] = height;
|
|
87
|
-
$[18] = style;
|
|
88
|
-
$[19] = t5;
|
|
89
|
-
$[20] = t6;
|
|
90
|
-
$[21] = width;
|
|
91
|
-
$[22] = t7;
|
|
92
|
-
} else t7 = $[22];
|
|
93
|
-
const outerStyle = t7;
|
|
94
|
-
let t8;
|
|
95
|
-
if ($[23] !== containerStyle) {
|
|
96
|
-
t8 = {
|
|
97
|
-
position: "absolute",
|
|
98
|
-
...containerStyle
|
|
99
|
-
};
|
|
100
|
-
$[23] = containerStyle;
|
|
101
|
-
$[24] = t8;
|
|
102
|
-
} else t8 = $[24];
|
|
103
|
-
let t9;
|
|
104
|
-
if ($[25] !== children || $[26] !== containerClassName || $[27] !== t8) {
|
|
105
|
-
t9 = /*#__PURE__*/ jsx("div", {
|
|
22
|
+
].filter(Boolean).join(", ") : void 0,
|
|
23
|
+
transitionDuration: 3 === count ? `${time}ms` : void 0,
|
|
24
|
+
width,
|
|
25
|
+
height,
|
|
26
|
+
overflow: "hidden",
|
|
27
|
+
position: "relative",
|
|
28
|
+
...style
|
|
29
|
+
};
|
|
30
|
+
return /*#__PURE__*/ jsx("div", {
|
|
31
|
+
ref: ref,
|
|
32
|
+
style: outerStyle,
|
|
33
|
+
...rest,
|
|
34
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
106
35
|
className: containerClassName,
|
|
107
|
-
style:
|
|
36
|
+
style: {
|
|
37
|
+
position: "absolute",
|
|
38
|
+
...containerStyle
|
|
39
|
+
},
|
|
108
40
|
ref: container,
|
|
109
41
|
children: children
|
|
110
|
-
})
|
|
111
|
-
|
|
112
|
-
$[26] = containerClassName;
|
|
113
|
-
$[27] = t8;
|
|
114
|
-
$[28] = t9;
|
|
115
|
-
} else t9 = $[28];
|
|
116
|
-
let t10;
|
|
117
|
-
if ($[29] !== outerStyle || $[30] !== ref || $[31] !== rest || $[32] !== t9) {
|
|
118
|
-
t10 = /*#__PURE__*/ jsx("div", {
|
|
119
|
-
ref: ref,
|
|
120
|
-
style: outerStyle,
|
|
121
|
-
...rest,
|
|
122
|
-
children: t9
|
|
123
|
-
});
|
|
124
|
-
$[29] = outerStyle;
|
|
125
|
-
$[30] = ref;
|
|
126
|
-
$[31] = rest;
|
|
127
|
-
$[32] = t9;
|
|
128
|
-
$[33] = t10;
|
|
129
|
-
} else t10 = $[33];
|
|
130
|
-
return t10;
|
|
42
|
+
})
|
|
43
|
+
});
|
|
131
44
|
});
|
|
132
|
-
function _temp(count_0) {
|
|
133
|
-
return Math.min(count_0 + 1, 3);
|
|
134
|
-
}
|
|
135
45
|
export { TransitionBox };
|
|
@@ -51,19 +51,19 @@ const TransitionNum = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRe
|
|
|
51
51
|
get: ()=>cache.current.show
|
|
52
52
|
}), []);
|
|
53
53
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
54
|
-
const { num
|
|
55
|
-
ele.current.innerText = (
|
|
56
|
-
if (
|
|
54
|
+
const { num, period, show, numToStr } = cache.current;
|
|
55
|
+
ele.current.innerText = (numToStr || String)(show);
|
|
56
|
+
if (num === show) return;
|
|
57
57
|
const div = ele.current;
|
|
58
|
-
const speed = (
|
|
58
|
+
const speed = (num - show) / period;
|
|
59
59
|
const cancel = (0, external_deepsea_tools_namespaceObject.setFrameInterval)(()=>{
|
|
60
|
-
const { num
|
|
60
|
+
const { num, numToStr } = cache.current;
|
|
61
61
|
cache.current.show += speed;
|
|
62
|
-
if (speed > 0 && cache.current.show >
|
|
62
|
+
if (speed > 0 && cache.current.show > num || speed < 0 && cache.current.show < num) {
|
|
63
63
|
cancel();
|
|
64
|
-
cache.current.show =
|
|
64
|
+
cache.current.show = num;
|
|
65
65
|
}
|
|
66
|
-
div.innerText = (
|
|
66
|
+
div.innerText = (numToStr || String)(speed > 0 ? Math.floor(cache.current.show) : Math.ceil(cache.current.show));
|
|
67
67
|
}, 1);
|
|
68
68
|
return cancel;
|
|
69
69
|
}, [
|
|
@@ -23,19 +23,19 @@ const TransitionNum = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
23
23
|
get: ()=>cache.current.show
|
|
24
24
|
}), []);
|
|
25
25
|
useEffect(()=>{
|
|
26
|
-
const { num
|
|
27
|
-
ele.current.innerText = (
|
|
28
|
-
if (
|
|
26
|
+
const { num, period, show, numToStr } = cache.current;
|
|
27
|
+
ele.current.innerText = (numToStr || String)(show);
|
|
28
|
+
if (num === show) return;
|
|
29
29
|
const div = ele.current;
|
|
30
|
-
const speed = (
|
|
30
|
+
const speed = (num - show) / period;
|
|
31
31
|
const cancel = setFrameInterval(()=>{
|
|
32
|
-
const { num
|
|
32
|
+
const { num, numToStr } = cache.current;
|
|
33
33
|
cache.current.show += speed;
|
|
34
|
-
if (speed > 0 && cache.current.show >
|
|
34
|
+
if (speed > 0 && cache.current.show > num || speed < 0 && cache.current.show < num) {
|
|
35
35
|
cancel();
|
|
36
|
-
cache.current.show =
|
|
36
|
+
cache.current.show = num;
|
|
37
37
|
}
|
|
38
|
-
div.innerText = (
|
|
38
|
+
div.innerText = (numToStr || String)(speed > 0 ? Math.floor(cache.current.show) : Math.ceil(cache.current.show));
|
|
39
39
|
}, 1);
|
|
40
40
|
return cancel;
|
|
41
41
|
}, [
|
|
@@ -28,39 +28,12 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
Trapezium: ()=>Trapezium
|
|
29
29
|
});
|
|
30
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
-
const compiler_runtime_namespaceObject = require("react/compiler-runtime");
|
|
32
31
|
const css_namespaceObject = require("@emotion/css");
|
|
33
32
|
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
34
33
|
const external_react_namespaceObject = require("react");
|
|
35
34
|
const index_cjs_namespaceObject = require("../utils/index.cjs");
|
|
36
35
|
const Trapezium = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>{
|
|
37
|
-
const
|
|
38
|
-
let borderRadius;
|
|
39
|
-
let bottom;
|
|
40
|
-
let className;
|
|
41
|
-
let height;
|
|
42
|
-
let rest;
|
|
43
|
-
let style;
|
|
44
|
-
let top;
|
|
45
|
-
if ($[0] !== props) {
|
|
46
|
-
({ top, bottom, height, borderRadius, className, style, ...rest } = props);
|
|
47
|
-
$[0] = props;
|
|
48
|
-
$[1] = borderRadius;
|
|
49
|
-
$[2] = bottom;
|
|
50
|
-
$[3] = className;
|
|
51
|
-
$[4] = height;
|
|
52
|
-
$[5] = rest;
|
|
53
|
-
$[6] = style;
|
|
54
|
-
$[7] = top;
|
|
55
|
-
} else {
|
|
56
|
-
borderRadius = $[1];
|
|
57
|
-
bottom = $[2];
|
|
58
|
-
className = $[3];
|
|
59
|
-
height = $[4];
|
|
60
|
-
rest = $[5];
|
|
61
|
-
style = $[6];
|
|
62
|
-
top = $[7];
|
|
63
|
-
}
|
|
36
|
+
const { top, bottom, height, borderRadius, className, style, ...rest } = props;
|
|
64
37
|
const diff = (bottom - top) / 2;
|
|
65
38
|
const a = Math.atan(height / diff) / 2;
|
|
66
39
|
const b = borderRadius / Math.tan(a);
|
|
@@ -70,52 +43,20 @@ const Trapezium = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((
|
|
|
70
43
|
const f = borderRadius / Math.tan(e);
|
|
71
44
|
const g = f * Math.cos(2 * a);
|
|
72
45
|
const h = f * Math.sin(2 * a);
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
46
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
47
|
+
ref: ref,
|
|
48
|
+
className: (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
|
|
76
49
|
width: var(--width);
|
|
77
50
|
height: var(--height);
|
|
78
51
|
clip-path: var(--clip-path);
|
|
79
|
-
`, className)
|
|
80
|
-
|
|
81
|
-
$[9] = t0;
|
|
82
|
-
} else t0 = $[9];
|
|
83
|
-
let t1;
|
|
84
|
-
if ($[10] !== b || $[11] !== borderRadius || $[12] !== bottom || $[13] !== c || $[14] !== d || $[15] !== diff || $[16] !== f || $[17] !== g || $[18] !== h || $[19] !== height || $[20] !== style || $[21] !== top) {
|
|
85
|
-
t1 = (0, index_cjs_namespaceObject.transformCSSVariable)({
|
|
52
|
+
`, className),
|
|
53
|
+
style: (0, index_cjs_namespaceObject.transformCSSVariable)({
|
|
86
54
|
width: (0, index_cjs_namespaceObject.px)(bottom),
|
|
87
55
|
height: (0, index_cjs_namespaceObject.px)(height),
|
|
88
56
|
clipath: `path("M ${diff + f} 0 A ${borderRadius} ${borderRadius} 0 0 0 ${diff - g} ${h} L ${c} ${height - d} A ${borderRadius} ${borderRadius} 0 0 0 ${b} ${height} L ${bottom - b} ${height} A ${borderRadius} ${borderRadius} 0 0 0 ${bottom - c} ${height - d} L ${top + diff + g} ${h} A ${borderRadius} ${borderRadius} 0 0 0 ${top + diff - f} 0 Z")`
|
|
89
|
-
}, style)
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
$[12] = bottom;
|
|
93
|
-
$[13] = c;
|
|
94
|
-
$[14] = d;
|
|
95
|
-
$[15] = diff;
|
|
96
|
-
$[16] = f;
|
|
97
|
-
$[17] = g;
|
|
98
|
-
$[18] = h;
|
|
99
|
-
$[19] = height;
|
|
100
|
-
$[20] = style;
|
|
101
|
-
$[21] = top;
|
|
102
|
-
$[22] = t1;
|
|
103
|
-
} else t1 = $[22];
|
|
104
|
-
let t2;
|
|
105
|
-
if ($[23] !== ref || $[24] !== rest || $[25] !== t0 || $[26] !== t1) {
|
|
106
|
-
t2 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
107
|
-
ref: ref,
|
|
108
|
-
className: t0,
|
|
109
|
-
style: t1,
|
|
110
|
-
...rest
|
|
111
|
-
});
|
|
112
|
-
$[23] = ref;
|
|
113
|
-
$[24] = rest;
|
|
114
|
-
$[25] = t0;
|
|
115
|
-
$[26] = t1;
|
|
116
|
-
$[27] = t2;
|
|
117
|
-
} else t2 = $[27];
|
|
118
|
-
return t2;
|
|
57
|
+
}, style),
|
|
58
|
+
...rest
|
|
59
|
+
});
|
|
119
60
|
});
|
|
120
61
|
exports.Trapezium = __webpack_exports__.Trapezium;
|
|
121
62
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
@@ -1,38 +1,11 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { c as compiler_runtime_c } from "react/compiler-runtime";
|
|
4
3
|
import { css } from "@emotion/css";
|
|
5
4
|
import { clsx } from "deepsea-tools";
|
|
6
5
|
import { forwardRef } from "react";
|
|
7
6
|
import { px, transformCSSVariable } from "../utils/index.js";
|
|
8
7
|
const Trapezium = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
9
|
-
const
|
|
10
|
-
let borderRadius;
|
|
11
|
-
let bottom;
|
|
12
|
-
let className;
|
|
13
|
-
let height;
|
|
14
|
-
let rest;
|
|
15
|
-
let style;
|
|
16
|
-
let top;
|
|
17
|
-
if ($[0] !== props) {
|
|
18
|
-
({ top, bottom, height, borderRadius, className, style, ...rest } = props);
|
|
19
|
-
$[0] = props;
|
|
20
|
-
$[1] = borderRadius;
|
|
21
|
-
$[2] = bottom;
|
|
22
|
-
$[3] = className;
|
|
23
|
-
$[4] = height;
|
|
24
|
-
$[5] = rest;
|
|
25
|
-
$[6] = style;
|
|
26
|
-
$[7] = top;
|
|
27
|
-
} else {
|
|
28
|
-
borderRadius = $[1];
|
|
29
|
-
bottom = $[2];
|
|
30
|
-
className = $[3];
|
|
31
|
-
height = $[4];
|
|
32
|
-
rest = $[5];
|
|
33
|
-
style = $[6];
|
|
34
|
-
top = $[7];
|
|
35
|
-
}
|
|
8
|
+
const { top, bottom, height, borderRadius, className, style, ...rest } = props;
|
|
36
9
|
const diff = (bottom - top) / 2;
|
|
37
10
|
const a = Math.atan(height / diff) / 2;
|
|
38
11
|
const b = borderRadius / Math.tan(a);
|
|
@@ -42,51 +15,19 @@ const Trapezium = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
42
15
|
const f = borderRadius / Math.tan(e);
|
|
43
16
|
const g = f * Math.cos(2 * a);
|
|
44
17
|
const h = f * Math.sin(2 * a);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
18
|
+
return /*#__PURE__*/ jsx("div", {
|
|
19
|
+
ref: ref,
|
|
20
|
+
className: clsx(css`
|
|
48
21
|
width: var(--width);
|
|
49
22
|
height: var(--height);
|
|
50
23
|
clip-path: var(--clip-path);
|
|
51
|
-
`, className)
|
|
52
|
-
|
|
53
|
-
$[9] = t0;
|
|
54
|
-
} else t0 = $[9];
|
|
55
|
-
let t1;
|
|
56
|
-
if ($[10] !== b || $[11] !== borderRadius || $[12] !== bottom || $[13] !== c || $[14] !== d || $[15] !== diff || $[16] !== f || $[17] !== g || $[18] !== h || $[19] !== height || $[20] !== style || $[21] !== top) {
|
|
57
|
-
t1 = transformCSSVariable({
|
|
24
|
+
`, className),
|
|
25
|
+
style: transformCSSVariable({
|
|
58
26
|
width: px(bottom),
|
|
59
27
|
height: px(height),
|
|
60
28
|
clipath: `path("M ${diff + f} 0 A ${borderRadius} ${borderRadius} 0 0 0 ${diff - g} ${h} L ${c} ${height - d} A ${borderRadius} ${borderRadius} 0 0 0 ${b} ${height} L ${bottom - b} ${height} A ${borderRadius} ${borderRadius} 0 0 0 ${bottom - c} ${height - d} L ${top + diff + g} ${h} A ${borderRadius} ${borderRadius} 0 0 0 ${top + diff - f} 0 Z")`
|
|
61
|
-
}, style)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
$[12] = bottom;
|
|
65
|
-
$[13] = c;
|
|
66
|
-
$[14] = d;
|
|
67
|
-
$[15] = diff;
|
|
68
|
-
$[16] = f;
|
|
69
|
-
$[17] = g;
|
|
70
|
-
$[18] = h;
|
|
71
|
-
$[19] = height;
|
|
72
|
-
$[20] = style;
|
|
73
|
-
$[21] = top;
|
|
74
|
-
$[22] = t1;
|
|
75
|
-
} else t1 = $[22];
|
|
76
|
-
let t2;
|
|
77
|
-
if ($[23] !== ref || $[24] !== rest || $[25] !== t0 || $[26] !== t1) {
|
|
78
|
-
t2 = /*#__PURE__*/ jsx("div", {
|
|
79
|
-
ref: ref,
|
|
80
|
-
className: t0,
|
|
81
|
-
style: t1,
|
|
82
|
-
...rest
|
|
83
|
-
});
|
|
84
|
-
$[23] = ref;
|
|
85
|
-
$[24] = rest;
|
|
86
|
-
$[25] = t0;
|
|
87
|
-
$[26] = t1;
|
|
88
|
-
$[27] = t2;
|
|
89
|
-
} else t2 = $[27];
|
|
90
|
-
return t2;
|
|
29
|
+
}, style),
|
|
30
|
+
...rest
|
|
31
|
+
});
|
|
91
32
|
});
|
|
92
33
|
export { Trapezium };
|
|
@@ -29,93 +29,33 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29
29
|
UnifyConfigProvider: ()=>UnifyConfigProvider
|
|
30
30
|
});
|
|
31
31
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
-
const compiler_runtime_namespaceObject = require("react/compiler-runtime");
|
|
33
32
|
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
34
33
|
const external_react_namespaceObject = require("react");
|
|
35
34
|
const UnifyConfigContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)({});
|
|
36
|
-
const UnifyConfigProvider = (
|
|
37
|
-
const $ = (0, compiler_runtime_namespaceObject.c)(12);
|
|
38
|
-
const { className, style, children } = t0;
|
|
35
|
+
const UnifyConfigProvider = ({ className, style, children })=>{
|
|
39
36
|
const { className: _className, style: _style } = (0, external_react_namespaceObject.useContext)(UnifyConfigContext);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
t1 = (0, external_deepsea_tools_namespaceObject.clsx)(_className, className);
|
|
43
|
-
$[0] = _className;
|
|
44
|
-
$[1] = className;
|
|
45
|
-
$[2] = t1;
|
|
46
|
-
} else t1 = $[2];
|
|
47
|
-
let t2;
|
|
48
|
-
if ($[3] !== _style || $[4] !== style) {
|
|
49
|
-
t2 = {
|
|
50
|
-
..._style,
|
|
51
|
-
...style
|
|
52
|
-
};
|
|
53
|
-
$[3] = _style;
|
|
54
|
-
$[4] = style;
|
|
55
|
-
$[5] = t2;
|
|
56
|
-
} else t2 = $[5];
|
|
57
|
-
let t3;
|
|
58
|
-
if ($[6] !== t1 || $[7] !== t2) {
|
|
59
|
-
t3 = {
|
|
60
|
-
className: t1,
|
|
61
|
-
style: t2
|
|
62
|
-
};
|
|
63
|
-
$[6] = t1;
|
|
64
|
-
$[7] = t2;
|
|
65
|
-
$[8] = t3;
|
|
66
|
-
} else t3 = $[8];
|
|
67
|
-
let t4;
|
|
68
|
-
if ($[9] !== children || $[10] !== t3) {
|
|
69
|
-
t4 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(UnifyConfigContext.Provider, {
|
|
70
|
-
value: t3,
|
|
71
|
-
children: children
|
|
72
|
-
});
|
|
73
|
-
$[9] = children;
|
|
74
|
-
$[10] = t3;
|
|
75
|
-
$[11] = t4;
|
|
76
|
-
} else t4 = $[11];
|
|
77
|
-
return t4;
|
|
78
|
-
};
|
|
79
|
-
function Unify(props) {
|
|
80
|
-
const $ = (0, compiler_runtime_namespaceObject.c)(12);
|
|
81
|
-
let className;
|
|
82
|
-
let rest;
|
|
83
|
-
let style;
|
|
84
|
-
let t0;
|
|
85
|
-
if ($[0] !== props) {
|
|
86
|
-
({ as: t0, className, style, ...rest } = props);
|
|
87
|
-
$[0] = props;
|
|
88
|
-
$[1] = className;
|
|
89
|
-
$[2] = rest;
|
|
90
|
-
$[3] = style;
|
|
91
|
-
$[4] = t0;
|
|
92
|
-
} else {
|
|
93
|
-
className = $[1];
|
|
94
|
-
rest = $[2];
|
|
95
|
-
style = $[3];
|
|
96
|
-
t0 = $[4];
|
|
97
|
-
}
|
|
98
|
-
const as = void 0 === t0 ? "div" : t0;
|
|
99
|
-
const { className: _className, style: _style } = (0, external_react_namespaceObject.useContext)(UnifyConfigContext);
|
|
100
|
-
let t1;
|
|
101
|
-
if ($[5] !== _className || $[6] !== _style || $[7] !== as || $[8] !== className || $[9] !== rest || $[10] !== style) {
|
|
102
|
-
t1 = /*#__PURE__*/ (0, external_react_namespaceObject.createElement)(as, {
|
|
37
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(UnifyConfigContext.Provider, {
|
|
38
|
+
value: {
|
|
103
39
|
className: (0, external_deepsea_tools_namespaceObject.clsx)(_className, className),
|
|
104
40
|
style: {
|
|
105
41
|
..._style,
|
|
106
42
|
...style
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
children: children
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
function Unify(props) {
|
|
49
|
+
const { as = "div", className, style, ...rest } = props;
|
|
50
|
+
const { className: _className, style: _style } = (0, external_react_namespaceObject.useContext)(UnifyConfigContext);
|
|
51
|
+
return /*#__PURE__*/ (0, external_react_namespaceObject.createElement)(as, {
|
|
52
|
+
className: (0, external_deepsea_tools_namespaceObject.clsx)(_className, className),
|
|
53
|
+
style: {
|
|
54
|
+
..._style,
|
|
55
|
+
...style
|
|
56
|
+
},
|
|
57
|
+
...rest
|
|
58
|
+
});
|
|
119
59
|
}
|
|
120
60
|
exports.Unify = __webpack_exports__.Unify;
|
|
121
61
|
exports.UnifyConfigProvider = __webpack_exports__.UnifyConfigProvider;
|
package/dist/components/Unify.js
CHANGED
|
@@ -1,91 +1,31 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { c } from "react/compiler-runtime";
|
|
4
3
|
import { clsx } from "deepsea-tools";
|
|
5
4
|
import { createContext, createElement, useContext } from "react";
|
|
6
5
|
const UnifyConfigContext = /*#__PURE__*/ createContext({});
|
|
7
|
-
const UnifyConfigProvider = (
|
|
8
|
-
const $ = c(12);
|
|
9
|
-
const { className, style, children } = t0;
|
|
6
|
+
const UnifyConfigProvider = ({ className, style, children })=>{
|
|
10
7
|
const { className: _className, style: _style } = useContext(UnifyConfigContext);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
t1 = clsx(_className, className);
|
|
14
|
-
$[0] = _className;
|
|
15
|
-
$[1] = className;
|
|
16
|
-
$[2] = t1;
|
|
17
|
-
} else t1 = $[2];
|
|
18
|
-
let t2;
|
|
19
|
-
if ($[3] !== _style || $[4] !== style) {
|
|
20
|
-
t2 = {
|
|
21
|
-
..._style,
|
|
22
|
-
...style
|
|
23
|
-
};
|
|
24
|
-
$[3] = _style;
|
|
25
|
-
$[4] = style;
|
|
26
|
-
$[5] = t2;
|
|
27
|
-
} else t2 = $[5];
|
|
28
|
-
let t3;
|
|
29
|
-
if ($[6] !== t1 || $[7] !== t2) {
|
|
30
|
-
t3 = {
|
|
31
|
-
className: t1,
|
|
32
|
-
style: t2
|
|
33
|
-
};
|
|
34
|
-
$[6] = t1;
|
|
35
|
-
$[7] = t2;
|
|
36
|
-
$[8] = t3;
|
|
37
|
-
} else t3 = $[8];
|
|
38
|
-
let t4;
|
|
39
|
-
if ($[9] !== children || $[10] !== t3) {
|
|
40
|
-
t4 = /*#__PURE__*/ jsx(UnifyConfigContext.Provider, {
|
|
41
|
-
value: t3,
|
|
42
|
-
children: children
|
|
43
|
-
});
|
|
44
|
-
$[9] = children;
|
|
45
|
-
$[10] = t3;
|
|
46
|
-
$[11] = t4;
|
|
47
|
-
} else t4 = $[11];
|
|
48
|
-
return t4;
|
|
49
|
-
};
|
|
50
|
-
function Unify(props) {
|
|
51
|
-
const $ = c(12);
|
|
52
|
-
let className;
|
|
53
|
-
let rest;
|
|
54
|
-
let style;
|
|
55
|
-
let t0;
|
|
56
|
-
if ($[0] !== props) {
|
|
57
|
-
({ as: t0, className, style, ...rest } = props);
|
|
58
|
-
$[0] = props;
|
|
59
|
-
$[1] = className;
|
|
60
|
-
$[2] = rest;
|
|
61
|
-
$[3] = style;
|
|
62
|
-
$[4] = t0;
|
|
63
|
-
} else {
|
|
64
|
-
className = $[1];
|
|
65
|
-
rest = $[2];
|
|
66
|
-
style = $[3];
|
|
67
|
-
t0 = $[4];
|
|
68
|
-
}
|
|
69
|
-
const as = void 0 === t0 ? "div" : t0;
|
|
70
|
-
const { className: _className, style: _style } = useContext(UnifyConfigContext);
|
|
71
|
-
let t1;
|
|
72
|
-
if ($[5] !== _className || $[6] !== _style || $[7] !== as || $[8] !== className || $[9] !== rest || $[10] !== style) {
|
|
73
|
-
t1 = /*#__PURE__*/ createElement(as, {
|
|
8
|
+
return /*#__PURE__*/ jsx(UnifyConfigContext.Provider, {
|
|
9
|
+
value: {
|
|
74
10
|
className: clsx(_className, className),
|
|
75
11
|
style: {
|
|
76
12
|
..._style,
|
|
77
13
|
...style
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
children: children
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
function Unify(props) {
|
|
20
|
+
const { as = "div", className, style, ...rest } = props;
|
|
21
|
+
const { className: _className, style: _style } = useContext(UnifyConfigContext);
|
|
22
|
+
return /*#__PURE__*/ createElement(as, {
|
|
23
|
+
className: clsx(_className, className),
|
|
24
|
+
style: {
|
|
25
|
+
..._style,
|
|
26
|
+
...style
|
|
27
|
+
},
|
|
28
|
+
...rest
|
|
29
|
+
});
|
|
90
30
|
}
|
|
91
31
|
export { Unify, UnifyConfigProvider };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deepsea-components",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.17.0",
|
|
4
4
|
"description": "格数科技自用组件库",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"echarts": "^5.6.0",
|
|
41
41
|
"hls.js": "^1.6.9",
|
|
42
42
|
"smooth-scrollbar": "^8.8.4",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
43
|
+
"deepsea-tools": "5.42.2",
|
|
44
|
+
"soda-hooks": "6.15.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"typescript": "^5.9.2"
|