@unicom-cloud/ui 0.8.103 → 0.8.104
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/Spin.js +6 -3
- package/badge/Count.js +12 -12
- package/badge/index.js +35 -35
- package/divider/index.js +45 -31
- package/marquee/index.js +90 -85
- package/package.json +1 -1
- package/spin/DotLoading.js +3 -3
- package/spin/index.js +70 -57
- package/style.css +1 -1
- package/types/pc/divider/interface.d.ts +9 -1
- package/types/pc/spin/interface.d.ts +2 -3
- package/version/index.js +1 -1
package/Spin.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "@unicom-cloud/icons/IconUiLoading";
|
|
3
|
+
import "@unicom-cloud/icons/IconUiLoadingDots";
|
|
4
|
+
import "@unicom-cloud/icons/IconUiLoadingInfinity";
|
|
5
|
+
import "@unicom-cloud/icons/IconUiLoadingRing";
|
|
6
|
+
import "@unicom-cloud/icons/IconUiLoadingSpinner";
|
|
3
7
|
import "lodash/debounce";
|
|
4
8
|
import "react";
|
|
5
9
|
import "./config-provider/ConfigProvider.js";
|
|
6
10
|
import "./components/common/hooks/useMergeProps.js";
|
|
7
11
|
import "@unicom-cloud/utils/class-name";
|
|
8
12
|
import "./components/common/utils/is.js";
|
|
9
|
-
import "./spin/DotLoading.js";
|
|
10
13
|
import "./config-provider/context.js";
|
|
11
|
-
import { default as
|
|
14
|
+
import { default as g } from "./spin/index.js";
|
|
12
15
|
export {
|
|
13
|
-
|
|
16
|
+
g as default
|
|
14
17
|
};
|
package/badge/Count.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
4
|
-
import { PqbCSSTransition as
|
|
5
|
-
import
|
|
6
|
-
function
|
|
7
|
-
const [
|
|
2
|
+
import { useState as u } from "react";
|
|
3
|
+
import d from "../components/common/hooks/usePrevious.js";
|
|
4
|
+
import { PqbCSSTransition as p } from "../components/common/utils/PqbCSSTransition.js";
|
|
5
|
+
import c from "@unicom-cloud/utils/class-name";
|
|
6
|
+
function $({ prefixCls: t, maxCount: r, count: e, className: n, style: o }) {
|
|
7
|
+
const [a, m] = u(!1), i = d(e), l = e !== i;
|
|
8
8
|
return /* @__PURE__ */ s(
|
|
9
|
-
|
|
9
|
+
p,
|
|
10
10
|
{
|
|
11
|
-
classNames:
|
|
11
|
+
classNames: `${t}-zoom`,
|
|
12
12
|
in: e > 0,
|
|
13
13
|
timeout: 300,
|
|
14
14
|
appear: !0,
|
|
@@ -17,11 +17,11 @@ function S({ prefixCls: t, maxCount: r, count: e, className: n, style: a }) {
|
|
|
17
17
|
onEntered: () => {
|
|
18
18
|
m(!0);
|
|
19
19
|
},
|
|
20
|
-
children: /* @__PURE__ */ s("span", { className: n, style:
|
|
20
|
+
children: /* @__PURE__ */ s("span", { className: n, style: o, children: /* @__PURE__ */ s(
|
|
21
21
|
"span",
|
|
22
22
|
{
|
|
23
|
-
className:
|
|
24
|
-
[`${t}-number-text`]:
|
|
23
|
+
className: c({
|
|
24
|
+
[`${t}-number-text`]: a && l
|
|
25
25
|
}),
|
|
26
26
|
children: r && e > r ? `${r}+` : e
|
|
27
27
|
},
|
|
@@ -31,5 +31,5 @@ function S({ prefixCls: t, maxCount: r, count: e, className: n, style: a }) {
|
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
33
|
export {
|
|
34
|
-
|
|
34
|
+
$ as default
|
|
35
35
|
};
|
package/badge/index.js
CHANGED
|
@@ -40,14 +40,14 @@ function Q(O, B) {
|
|
|
40
40
|
dot: g,
|
|
41
41
|
dotAnimation: C,
|
|
42
42
|
maxCount: T,
|
|
43
|
-
color:
|
|
43
|
+
color: e,
|
|
44
44
|
dotStyle: w,
|
|
45
45
|
offset: E,
|
|
46
46
|
style: j,
|
|
47
47
|
status: m,
|
|
48
48
|
children: N,
|
|
49
49
|
...v
|
|
50
|
-
} = R, p = H(null),
|
|
50
|
+
} = R, p = H(null), t = D?.("badge"), a = { ...w || {} }, [x, y] = E || [];
|
|
51
51
|
x && (a.marginRight = -x), y && (a.marginTop = y), L(B, () => ({
|
|
52
52
|
dom: p.current,
|
|
53
53
|
getRootDOMNode() {
|
|
@@ -59,42 +59,42 @@ function Q(O, B) {
|
|
|
59
59
|
return /* @__PURE__ */ o(
|
|
60
60
|
"span",
|
|
61
61
|
{
|
|
62
|
-
className: l(`${
|
|
62
|
+
className: l(`${t}-custom-dot`, i),
|
|
63
63
|
style: a,
|
|
64
64
|
children: n
|
|
65
65
|
}
|
|
66
66
|
);
|
|
67
|
-
const r =
|
|
68
|
-
return u && !
|
|
67
|
+
const r = e ? f.includes(e) : !1, c = !e || r ? {} : { backgroundColor: e };
|
|
68
|
+
return u && !e && !m ? /* @__PURE__ */ o(
|
|
69
69
|
"span",
|
|
70
70
|
{
|
|
71
|
-
className: l(`${
|
|
71
|
+
className: l(`${t}-text`, i),
|
|
72
72
|
style: a,
|
|
73
73
|
children: u
|
|
74
74
|
}
|
|
75
|
-
) : m ||
|
|
76
|
-
!!b && /* @__PURE__ */ o("span", { className: `${
|
|
75
|
+
) : m || e && typeof n == "number" && n <= 0 ? /* @__PURE__ */ d("span", { className: `${t}-status-wrapper`, children: [
|
|
76
|
+
!!b && /* @__PURE__ */ o("span", { className: `${t}-status-prefix-text`, children: b }),
|
|
77
77
|
/* @__PURE__ */ o(
|
|
78
78
|
"span",
|
|
79
79
|
{
|
|
80
80
|
style: { ...c, ...a },
|
|
81
81
|
className: l(
|
|
82
|
-
`${
|
|
82
|
+
`${t}-status-dot`,
|
|
83
83
|
{
|
|
84
|
-
[`${
|
|
85
|
-
[`${
|
|
86
|
-
[`${
|
|
84
|
+
[`${t}-dot-pulse`]: C,
|
|
85
|
+
[`${t}-status-${m}`]: m,
|
|
86
|
+
[`${t}-color-${e}`]: e && r
|
|
87
87
|
},
|
|
88
88
|
i
|
|
89
89
|
)
|
|
90
90
|
}
|
|
91
91
|
),
|
|
92
|
-
!!u && /* @__PURE__ */ o("span", { className: `${
|
|
93
|
-
] }) : (g ||
|
|
92
|
+
!!u && /* @__PURE__ */ o("span", { className: `${t}-status-text`, children: u })
|
|
93
|
+
] }) : (g || e) && typeof n == "number" && n > 0 ? /* @__PURE__ */ o(
|
|
94
94
|
F,
|
|
95
95
|
{
|
|
96
|
-
classNames:
|
|
97
|
-
in: g || !!
|
|
96
|
+
classNames: `${t}-zoom`,
|
|
97
|
+
in: g || !!e,
|
|
98
98
|
timeout: 200,
|
|
99
99
|
appear: !0,
|
|
100
100
|
mountOnEnter: !0,
|
|
@@ -103,10 +103,10 @@ function Q(O, B) {
|
|
|
103
103
|
"span",
|
|
104
104
|
{
|
|
105
105
|
className: l(
|
|
106
|
-
`${
|
|
106
|
+
`${t}-dot`,
|
|
107
107
|
{
|
|
108
|
-
[`${
|
|
109
|
-
[`${
|
|
108
|
+
[`${t}-dot-pulse`]: C,
|
|
109
|
+
[`${t}-color-${e}`]: e && r
|
|
110
110
|
},
|
|
111
111
|
i
|
|
112
112
|
),
|
|
@@ -117,8 +117,8 @@ function Q(O, B) {
|
|
|
117
117
|
) : /* @__PURE__ */ o(
|
|
118
118
|
h,
|
|
119
119
|
{
|
|
120
|
-
prefixCls:
|
|
121
|
-
className: l(`${
|
|
120
|
+
prefixCls: t,
|
|
121
|
+
className: l(`${t}-number`, i),
|
|
122
122
|
style: { ...c, ...a },
|
|
123
123
|
maxCount: T,
|
|
124
124
|
count: n
|
|
@@ -134,18 +134,18 @@ function Q(O, B) {
|
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
136
136
|
className: l(
|
|
137
|
-
`${
|
|
138
|
-
`${
|
|
137
|
+
`${t}-ribbon`,
|
|
138
|
+
`${t}-ribbon-${M}`,
|
|
139
139
|
{
|
|
140
|
-
[`${
|
|
141
|
-
[`${
|
|
140
|
+
[`${t}-rtl`]: $,
|
|
141
|
+
[`${t}-color-${r}`]: r && c
|
|
142
142
|
},
|
|
143
143
|
s.className
|
|
144
144
|
),
|
|
145
145
|
style: I,
|
|
146
146
|
children: [
|
|
147
|
-
/* @__PURE__ */ o("span", { className: `${
|
|
148
|
-
/* @__PURE__ */ o("div", { className: `${
|
|
147
|
+
/* @__PURE__ */ o("span", { className: `${t}-ribbon-text`, children: s.text }),
|
|
148
|
+
/* @__PURE__ */ o("div", { className: `${t}-ribbon-corner` })
|
|
149
149
|
]
|
|
150
150
|
}
|
|
151
151
|
);
|
|
@@ -154,13 +154,13 @@ function Q(O, B) {
|
|
|
154
154
|
"span",
|
|
155
155
|
{
|
|
156
156
|
className: l(
|
|
157
|
-
|
|
157
|
+
t,
|
|
158
158
|
{
|
|
159
|
-
[`${
|
|
160
|
-
[`${
|
|
161
|
-
[`${
|
|
159
|
+
[`${t}-status`]: m,
|
|
160
|
+
[`${t}-no-children`]: !N,
|
|
161
|
+
[`${t}-rtl`]: $
|
|
162
162
|
},
|
|
163
|
-
!!s && `${
|
|
163
|
+
!!s && `${t}-ribbon-wrapper`,
|
|
164
164
|
A
|
|
165
165
|
),
|
|
166
166
|
ref: p,
|
|
@@ -176,7 +176,7 @@ function Q(O, B) {
|
|
|
176
176
|
const S = q(Q);
|
|
177
177
|
S.displayName = "Badge";
|
|
178
178
|
S.Count = h;
|
|
179
|
-
const
|
|
179
|
+
const st = f, nt = [
|
|
180
180
|
"default",
|
|
181
181
|
"processing",
|
|
182
182
|
"success",
|
|
@@ -184,8 +184,8 @@ const se = f, ne = [
|
|
|
184
184
|
"error"
|
|
185
185
|
];
|
|
186
186
|
export {
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
st as BADGE_COLORS,
|
|
188
|
+
nt as BADGE_STATUS,
|
|
189
189
|
h as BadgeCount,
|
|
190
190
|
S as default
|
|
191
191
|
};
|
package/divider/index.js
CHANGED
|
@@ -1,47 +1,61 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as f, useContext as b, useMemo as D } from "react";
|
|
3
3
|
import "../config-provider/ConfigProvider.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
4
|
+
import g from "../components/common/hooks/useMergeProps.js";
|
|
5
|
+
import P from "@unicom-cloud/utils/class-name";
|
|
6
|
+
import w from "../config-provider/context.js";
|
|
7
|
+
const z = {
|
|
8
8
|
type: "horizontal",
|
|
9
9
|
orientation: "center"
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
const { getPrefixCls:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
), {
|
|
11
|
+
function S(n, a) {
|
|
12
|
+
const { getPrefixCls: u, componentConfig: x } = b(w), h = g(
|
|
13
|
+
n,
|
|
14
|
+
z,
|
|
15
|
+
x?.Divider
|
|
16
|
+
), {
|
|
17
|
+
children: o,
|
|
18
|
+
style: m,
|
|
19
|
+
className: $,
|
|
20
|
+
type: p,
|
|
21
|
+
orientation: l,
|
|
22
|
+
borderStyle: r,
|
|
23
|
+
// 潘启宝添加
|
|
24
|
+
borderWidth: i,
|
|
25
|
+
// 潘启宝添加
|
|
26
|
+
...v
|
|
27
|
+
} = h, s = p === "horizontal", t = u?.("divider"), N = P(
|
|
17
28
|
t,
|
|
18
|
-
`${t}-${
|
|
29
|
+
`${t}-${p}`,
|
|
19
30
|
{
|
|
20
|
-
[`${t}-with-text`]:
|
|
21
|
-
[`${t}-with-text-${
|
|
31
|
+
[`${t}-with-text`]: o,
|
|
32
|
+
[`${t}-with-text-${l}`]: o && l
|
|
22
33
|
},
|
|
23
|
-
|
|
24
|
-
)
|
|
25
|
-
|
|
34
|
+
$
|
|
35
|
+
), C = D(() => {
|
|
36
|
+
const e = { ...m };
|
|
37
|
+
return r && (s ? e.borderBottomStyle = r : e.borderLeftStyle = r), i && (s ? e.borderBottomWidth = i : e.borderLeftWidth = i), e;
|
|
38
|
+
}, [r, i, s, m]);
|
|
39
|
+
return /* @__PURE__ */ c(
|
|
26
40
|
"div",
|
|
27
41
|
{
|
|
28
42
|
role: "separator",
|
|
29
|
-
ref:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
children:
|
|
43
|
+
ref: a,
|
|
44
|
+
style: C,
|
|
45
|
+
className: N,
|
|
46
|
+
...v,
|
|
47
|
+
children: o && s ? /* @__PURE__ */ c("span", { className: `${t}-text ${t}-text-${l}`, children: o }) : null
|
|
34
48
|
}
|
|
35
49
|
);
|
|
36
50
|
}
|
|
37
|
-
const
|
|
38
|
-
|
|
51
|
+
const d = f(
|
|
52
|
+
S
|
|
39
53
|
);
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
54
|
+
d.displayName = "Divider";
|
|
55
|
+
const y = f((n, a) => /* @__PURE__ */ c(d, { ref: a, type: "vertical", ...n }));
|
|
56
|
+
y.displayName = "DividerVertical";
|
|
57
|
+
d.Vertical = y;
|
|
44
58
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
59
|
+
y as DividerVertical,
|
|
60
|
+
d as default
|
|
47
61
|
};
|
package/marquee/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as s, Fragment as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as s, Fragment as rt, jsxs as H } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as it, useContext as ot, useState as C, useRef as j, useCallback as A, useEffect as O, useMemo as h, Fragment as nt, Children as B } from "react";
|
|
3
3
|
import "../config-provider/ConfigProvider.js";
|
|
4
4
|
import "lodash/isEqualWith";
|
|
5
5
|
import "../components/common/utils/is.js";
|
|
6
6
|
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
7
7
|
import "lodash/isNumber";
|
|
8
|
-
import
|
|
8
|
+
import at from "lodash/merge";
|
|
9
9
|
import "../components/common/utils/dom.js";
|
|
10
10
|
import "../components/common/hooks/useIntersectionObserver.js";
|
|
11
11
|
import st from "../components/common/hooks/useMergeProps.js";
|
|
@@ -14,7 +14,7 @@ import "@unicom-cloud/utils/constant";
|
|
|
14
14
|
import "lodash/debounce";
|
|
15
15
|
import "@unicom-cloud/utils/date";
|
|
16
16
|
import "@unicom-cloud/utils/case-name";
|
|
17
|
-
import
|
|
17
|
+
import lt from "@unicom-cloud/utils/class-name";
|
|
18
18
|
import "@unicom-cloud/utils/constant/ui";
|
|
19
19
|
import "../utils/contextHolder.js";
|
|
20
20
|
import "@unicom-cloud/utils/clipboard-copy";
|
|
@@ -45,7 +45,7 @@ import "../dist/react-transition-group/src/ReplaceTransition.js";
|
|
|
45
45
|
import "../dist/react-transition-group/src/SwitchTransition.js";
|
|
46
46
|
import "../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
47
47
|
import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
48
|
-
import { resizeObserver as
|
|
48
|
+
import { resizeObserver as mt } from "../components/common/utils/resizeObserver.js";
|
|
49
49
|
import "uuid";
|
|
50
50
|
import "@unicom-cloud/utils/file/saveAs";
|
|
51
51
|
import "@unicom-cloud/utils/screenfull";
|
|
@@ -54,143 +54,148 @@ import "@unicom-cloud/utils/ui-color";
|
|
|
54
54
|
import "@unicom-cloud/utils/constant/ui.js";
|
|
55
55
|
import "react-is";
|
|
56
56
|
import "@unicom-cloud/utils/tree";
|
|
57
|
-
import { isPlainObject as
|
|
57
|
+
import { isPlainObject as pt } from "@unicom-cloud/utils/is";
|
|
58
58
|
import "../dist/validate/src/index.js";
|
|
59
|
-
import
|
|
60
|
-
const
|
|
59
|
+
import ct from "../config-provider/context.js";
|
|
60
|
+
const o = {
|
|
61
|
+
autoFill: !1,
|
|
62
|
+
play: !0,
|
|
61
63
|
speed: 50,
|
|
62
64
|
direction: "left",
|
|
63
65
|
pauseOnHover: !1,
|
|
66
|
+
pauseOnClick: !1,
|
|
67
|
+
delay: 0.0227,
|
|
68
|
+
// 设置非 0 为了解决 onAnimationEnd={onFinish} 立即被调用的问题
|
|
64
69
|
loop: 0
|
|
65
|
-
}, ye =
|
|
66
|
-
function(
|
|
67
|
-
const { getPrefixCls: z, componentConfig:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
}, ye = it(
|
|
71
|
+
function(E, I) {
|
|
72
|
+
const { getPrefixCls: z, componentConfig: V } = ot(ct), i = z?.("marquee"), t = z?.("marquee-var"), _ = st(
|
|
73
|
+
E,
|
|
74
|
+
o,
|
|
75
|
+
V?.Marquee
|
|
71
76
|
), {
|
|
72
|
-
style:
|
|
73
|
-
className:
|
|
74
|
-
autoFill:
|
|
75
|
-
play:
|
|
76
|
-
pauseOnHover:
|
|
77
|
-
pauseOnClick:
|
|
78
|
-
direction: e =
|
|
79
|
-
speed:
|
|
80
|
-
delay:
|
|
81
|
-
loop:
|
|
82
|
-
gradient:
|
|
83
|
-
onFinish:
|
|
84
|
-
onCycleComplete:
|
|
85
|
-
onMount:
|
|
86
|
-
children:
|
|
87
|
-
} =
|
|
88
|
-
let r =
|
|
89
|
-
r === !0 && (r = {}),
|
|
90
|
-
{ size:
|
|
77
|
+
style: F,
|
|
78
|
+
className: D,
|
|
79
|
+
autoFill: l = o.autoFill,
|
|
80
|
+
play: c = o.play,
|
|
81
|
+
pauseOnHover: v = o.pauseOnHover,
|
|
82
|
+
pauseOnClick: M = o.pauseOnClick,
|
|
83
|
+
direction: e = o.direction,
|
|
84
|
+
speed: q = o.speed,
|
|
85
|
+
delay: W = o.delay,
|
|
86
|
+
loop: x = o.loop,
|
|
87
|
+
gradient: G,
|
|
88
|
+
onFinish: J,
|
|
89
|
+
onCycleComplete: K,
|
|
90
|
+
onMount: w,
|
|
91
|
+
children: g
|
|
92
|
+
} = _, L = e === "left" || e === "right";
|
|
93
|
+
let r = G;
|
|
94
|
+
r === !0 && (r = {}), pt(r) && (r = at(
|
|
95
|
+
{ size: L ? 50 : 20, color: "#fff" },
|
|
91
96
|
r
|
|
92
97
|
));
|
|
93
|
-
const [
|
|
94
|
-
if (
|
|
95
|
-
const
|
|
96
|
-
let
|
|
97
|
-
(e === "up" || e === "down") && (
|
|
98
|
-
|
|
99
|
-
),
|
|
98
|
+
const [k, Q] = C(0), [$, T] = C(0), [y, U] = C(1), [N, X] = C(!1), Y = j(null), m = I || Y, u = j(null), d = A(() => {
|
|
99
|
+
if (u.current && m.current) {
|
|
100
|
+
const n = m.current.getBoundingClientRect(), f = u.current.getBoundingClientRect();
|
|
101
|
+
let a = n.width, p = f.width;
|
|
102
|
+
(e === "up" || e === "down") && (a = n.height, p = f.height), U(
|
|
103
|
+
l && a && p ? Math.max(2, Math.ceil(a / p)) : 1
|
|
104
|
+
), Q(a), T(p);
|
|
100
105
|
}
|
|
101
|
-
}, [
|
|
102
|
-
|
|
103
|
-
if (!
|
|
104
|
-
|
|
105
|
-
const
|
|
106
|
-
[
|
|
107
|
-
|
|
106
|
+
}, [l, m, e]);
|
|
107
|
+
O(() => {
|
|
108
|
+
if (!N) return;
|
|
109
|
+
d();
|
|
110
|
+
const n = mt(
|
|
111
|
+
[m.current, u.current],
|
|
112
|
+
d
|
|
108
113
|
);
|
|
109
114
|
return () => {
|
|
110
|
-
|
|
115
|
+
n();
|
|
111
116
|
};
|
|
112
|
-
}, [
|
|
113
|
-
}), [
|
|
114
|
-
}), [
|
|
115
|
-
const P =
|
|
117
|
+
}, [d, m, u, N]), O(() => (d(), () => {
|
|
118
|
+
}), [d, g]), O(() => (X(!0), w && w(), () => {
|
|
119
|
+
}), [w]);
|
|
120
|
+
const P = h(() => $ ? l ? $ * y / q : Math.max(k, $) / q : 0, [l, k, $, y, q]), Z = h(
|
|
116
121
|
() => ({
|
|
117
|
-
...
|
|
118
|
-
[`--${t}-pause-on-hover`]: !
|
|
119
|
-
[`--${t}-pause-on-click`]: !
|
|
122
|
+
...F,
|
|
123
|
+
[`--${t}-pause-on-hover`]: !c || v ? "paused" : "running",
|
|
124
|
+
[`--${t}-pause-on-click`]: !c || v && !M || M ? "paused" : "running",
|
|
120
125
|
[`--${t}-width`]: e === "up" || e === "down" ? "100vh" : "100%",
|
|
121
126
|
[`--${t}-transform`]: e === "up" ? "rotate(-90deg)" : e === "down" ? "rotate(90deg)" : "none"
|
|
122
127
|
}),
|
|
123
|
-
[
|
|
124
|
-
),
|
|
128
|
+
[F, t, c, v, M, e]
|
|
129
|
+
), tt = h(
|
|
125
130
|
() => ({
|
|
126
131
|
[`--${t}-gradient-color`]: r?.color,
|
|
127
132
|
[`--${t}-gradient-width`]: typeof r?.size == "number" ? `${r?.size}px` : r?.size
|
|
128
133
|
}),
|
|
129
134
|
[r?.color, r?.size, t]
|
|
130
|
-
), S =
|
|
135
|
+
), S = h(
|
|
131
136
|
() => ({
|
|
132
|
-
[`--${t}-play`]:
|
|
137
|
+
[`--${t}-play`]: c ? "running" : "paused",
|
|
133
138
|
[`--${t}-direction`]: e === "left" ? "normal" : "reverse",
|
|
134
139
|
[`--${t}-duration`]: `${P}s`,
|
|
135
|
-
[`--${t}-delay`]: `${
|
|
136
|
-
[`--${t}-iteration-count`]:
|
|
137
|
-
[`--${t}-min-width`]:
|
|
140
|
+
[`--${t}-delay`]: `${W}s`,
|
|
141
|
+
[`--${t}-iteration-count`]: x ? `${x}` : "infinite",
|
|
142
|
+
[`--${t}-min-width`]: l ? "auto" : "100%"
|
|
138
143
|
}),
|
|
139
|
-
[t,
|
|
140
|
-
),
|
|
144
|
+
[t, c, e, P, W, x, l]
|
|
145
|
+
), R = h(
|
|
141
146
|
() => ({
|
|
142
147
|
[`--${t}-transform`]: e === "up" ? "rotate(90deg)" : e === "down" ? "rotate(-90deg)" : "none"
|
|
143
148
|
}),
|
|
144
149
|
[e, t]
|
|
145
150
|
), b = A(
|
|
146
|
-
(
|
|
151
|
+
(n) => Array.from({ length: n }).map((f, a) => /* @__PURE__ */ s(nt, { children: B.map(g, (p, et) => /* @__PURE__ */ s(
|
|
147
152
|
"div",
|
|
148
153
|
{
|
|
149
|
-
style:
|
|
154
|
+
style: R,
|
|
150
155
|
className: `${i}-child`,
|
|
151
|
-
children:
|
|
156
|
+
children: p
|
|
152
157
|
},
|
|
153
|
-
`child-${
|
|
154
|
-
)) },
|
|
155
|
-
[
|
|
158
|
+
`child-${a}-${et}`
|
|
159
|
+
)) }, a)),
|
|
160
|
+
[g, R, i]
|
|
156
161
|
);
|
|
157
|
-
return
|
|
162
|
+
return N ? /* @__PURE__ */ s(rt, { children: /* @__PURE__ */ H(
|
|
158
163
|
"div",
|
|
159
164
|
{
|
|
160
|
-
ref:
|
|
161
|
-
style:
|
|
162
|
-
className:
|
|
165
|
+
ref: m,
|
|
166
|
+
style: Z,
|
|
167
|
+
className: lt(i, `${i}-${e}`, D),
|
|
163
168
|
children: [
|
|
164
|
-
!!r && /* @__PURE__ */ s("div", { style:
|
|
165
|
-
/* @__PURE__ */
|
|
169
|
+
!!r && /* @__PURE__ */ s("div", { style: tt, className: `${i}-overlay` }),
|
|
170
|
+
/* @__PURE__ */ H(
|
|
166
171
|
"div",
|
|
167
172
|
{
|
|
168
173
|
style: S,
|
|
169
174
|
className: `${i}-item`,
|
|
170
|
-
onAnimationIteration:
|
|
171
|
-
onAnimationEnd:
|
|
175
|
+
onAnimationIteration: K,
|
|
176
|
+
onAnimationEnd: J,
|
|
172
177
|
children: [
|
|
173
178
|
/* @__PURE__ */ s(
|
|
174
179
|
"div",
|
|
175
180
|
{
|
|
176
|
-
ref:
|
|
181
|
+
ref: u,
|
|
177
182
|
className: `${i}-initial-child-container`,
|
|
178
|
-
children:
|
|
183
|
+
children: B.map(g, (n, f) => /* @__PURE__ */ s(
|
|
179
184
|
"div",
|
|
180
185
|
{
|
|
181
|
-
style:
|
|
186
|
+
style: R,
|
|
182
187
|
className: `${i}-child`,
|
|
183
|
-
children:
|
|
188
|
+
children: n
|
|
184
189
|
},
|
|
185
|
-
`original-${
|
|
190
|
+
`original-${f}`
|
|
186
191
|
))
|
|
187
192
|
}
|
|
188
193
|
),
|
|
189
|
-
b(
|
|
194
|
+
b(y - 1)
|
|
190
195
|
]
|
|
191
196
|
}
|
|
192
197
|
),
|
|
193
|
-
/* @__PURE__ */ s("div", { style: S, className: `${i}-item`, children: b(
|
|
198
|
+
/* @__PURE__ */ s("div", { style: S, className: `${i}-item`, children: b(y) })
|
|
194
199
|
]
|
|
195
200
|
}
|
|
196
201
|
) }) : null;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@unicom-cloud/ui","version":"0.8.
|
|
1
|
+
{"name":"@unicom-cloud/ui","version":"0.8.104","dependencies":{"@unicom-cloud/icons":"latest"},"peerDependencies":{"react":"^18.3.1","react-dom":"^18.3.1","dayjs":"^1.11.10","lodash":"^4.17.21","uuid":"^11.1.0","qrcode.react":"^4.2.0"},"peerDependenciesMeta":{},"type":"module","types":"types/pc/index.d.ts","main":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
|
package/spin/DotLoading.js
CHANGED
|
@@ -3,7 +3,7 @@ import m from "lodash/isNumber";
|
|
|
3
3
|
import { useContext as a } from "react";
|
|
4
4
|
import "../config-provider/ConfigProvider.js";
|
|
5
5
|
import l from "../config-provider/context.js";
|
|
6
|
-
function
|
|
6
|
+
function z(t) {
|
|
7
7
|
const { getPrefixCls: r } = a(l), i = `${r?.("spin")}-dot`, o = {
|
|
8
8
|
width: t.size,
|
|
9
9
|
height: t.size
|
|
@@ -16,10 +16,10 @@ function x(t) {
|
|
|
16
16
|
height: t.size,
|
|
17
17
|
width: m(e) && e > 0 ? e * 7 : ""
|
|
18
18
|
},
|
|
19
|
-
children: [...new Array(5)].map((d, n) => /* @__PURE__ */ s("div", { className: i, style: o }, n))
|
|
19
|
+
children: [...new Array(5)].map((d, n, f) => /* @__PURE__ */ s("div", { className: i, style: o }, n))
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
}
|
|
23
23
|
export {
|
|
24
|
-
|
|
24
|
+
z as default
|
|
25
25
|
};
|