@unicom-cloud/ui 0.8.103 → 0.8.105
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/form/FormItem.js +1 -1
- 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/index.js
CHANGED
|
@@ -1,93 +1,106 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { jsx as n, jsxs as N, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import P from "@unicom-cloud/icons/IconUiLoading";
|
|
3
|
+
import _ from "@unicom-cloud/icons/IconUiLoadingDots";
|
|
4
|
+
import D from "@unicom-cloud/icons/IconUiLoadingInfinity";
|
|
5
|
+
import F from "@unicom-cloud/icons/IconUiLoadingRing";
|
|
6
|
+
import H from "@unicom-cloud/icons/IconUiLoadingSpinner";
|
|
7
|
+
import M from "lodash/debounce";
|
|
8
|
+
import h, { useContext as q, useState as A, useCallback as B, useRef as G, useImperativeHandle as J, useEffect as K } from "react";
|
|
5
9
|
import "../config-provider/ConfigProvider.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { isEmptyReactNode as
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
import O from "../components/common/hooks/useMergeProps.js";
|
|
11
|
+
import m from "@unicom-cloud/utils/class-name";
|
|
12
|
+
import { isEmptyReactNode as Q } from "../components/common/utils/is.js";
|
|
13
|
+
import T from "../config-provider/context.js";
|
|
14
|
+
function V(C, S) {
|
|
15
|
+
const {
|
|
16
|
+
prefixCls: x,
|
|
17
|
+
getPrefixCls: I,
|
|
18
|
+
componentConfig: L
|
|
19
|
+
} = q(T), v = O(C, {}, L?.Spin), {
|
|
20
|
+
style: R,
|
|
21
|
+
className: b,
|
|
15
22
|
children: r,
|
|
16
|
-
loading:
|
|
17
|
-
size:
|
|
23
|
+
loading: t,
|
|
24
|
+
size: s,
|
|
18
25
|
icon: f,
|
|
19
|
-
element:
|
|
20
|
-
tip:
|
|
21
|
-
|
|
26
|
+
element: z,
|
|
27
|
+
tip: a,
|
|
28
|
+
type: U,
|
|
22
29
|
delay: i,
|
|
23
|
-
block:
|
|
30
|
+
block: k = !1,
|
|
24
31
|
fullscreen: p,
|
|
25
|
-
...
|
|
26
|
-
} =
|
|
27
|
-
|
|
32
|
+
...E
|
|
33
|
+
} = v, [g, u] = A(i ? !1 : t), o = B(M(u, i), [i]), c = i ? g : t, e = I?.("spin"), y = G(null);
|
|
34
|
+
J(S, () => ({
|
|
28
35
|
// 潘启宝添加于 2023年10月23日 星期一 10时52分55秒 CST
|
|
29
|
-
dom:
|
|
30
|
-
loading:
|
|
31
|
-
setLoading:
|
|
32
|
-
debouncedSetLoading:
|
|
33
|
-
})),
|
|
34
|
-
|
|
35
|
-
}), [
|
|
36
|
-
const j =
|
|
37
|
-
|
|
36
|
+
dom: y.current,
|
|
37
|
+
loading: g,
|
|
38
|
+
setLoading: u,
|
|
39
|
+
debouncedSetLoading: o
|
|
40
|
+
})), K(() => (i && o(t), () => {
|
|
41
|
+
o && o.cancel();
|
|
42
|
+
}), [o, i, t]);
|
|
43
|
+
const j = {
|
|
44
|
+
dot: _,
|
|
45
|
+
infinity: D,
|
|
46
|
+
ring: F,
|
|
47
|
+
circle: H,
|
|
48
|
+
default: P
|
|
49
|
+
}[U || "default"], w = /* @__PURE__ */ n("span", { className: `${e}-icon`, children: f ? h.cloneElement(f, {
|
|
50
|
+
className: `${x}-icon-ui-loading`,
|
|
38
51
|
style: {
|
|
39
|
-
fontSize:
|
|
52
|
+
fontSize: s
|
|
40
53
|
}
|
|
41
|
-
}) :
|
|
42
|
-
|
|
43
|
-
|
|
54
|
+
}) : z || /* @__PURE__ */ n(j, { style: { fontSize: s } }) }), d = /* @__PURE__ */ N($, { children: [
|
|
55
|
+
w,
|
|
56
|
+
a ? /* @__PURE__ */ n("div", { className: `${e}-tip`, children: a }) : null
|
|
44
57
|
] });
|
|
45
|
-
let
|
|
46
|
-
return
|
|
58
|
+
let l;
|
|
59
|
+
return Q(r) ? p ? c && (l = /* @__PURE__ */ n(
|
|
47
60
|
"div",
|
|
48
61
|
{
|
|
49
|
-
className:
|
|
62
|
+
className: m(
|
|
50
63
|
`${e}-loading-layer`,
|
|
51
64
|
`${e}-fullscreen`
|
|
52
65
|
),
|
|
53
|
-
style: { fontSize:
|
|
54
|
-
children:
|
|
66
|
+
style: { fontSize: s },
|
|
67
|
+
children: d
|
|
55
68
|
}
|
|
56
|
-
)) :
|
|
69
|
+
)) : l = d : l = /* @__PURE__ */ N($, { children: [
|
|
57
70
|
/* @__PURE__ */ n("div", { className: `${e}-children`, children: r }),
|
|
58
|
-
|
|
71
|
+
c && /* @__PURE__ */ n(
|
|
59
72
|
"div",
|
|
60
73
|
{
|
|
61
|
-
className:
|
|
74
|
+
className: m(
|
|
62
75
|
`${e}-loading-layer`,
|
|
63
76
|
p && `${e}-fullscreen`
|
|
64
77
|
// 潘启宝添加
|
|
65
78
|
),
|
|
66
|
-
style: { fontSize:
|
|
67
|
-
children: /* @__PURE__ */ n("span", { className: `${e}-loading-layer-inner`, children:
|
|
79
|
+
style: { fontSize: s },
|
|
80
|
+
children: /* @__PURE__ */ n("span", { className: `${e}-loading-layer-inner`, children: d })
|
|
68
81
|
}
|
|
69
82
|
)
|
|
70
83
|
] }), /* @__PURE__ */ n(
|
|
71
84
|
"div",
|
|
72
85
|
{
|
|
73
|
-
ref:
|
|
74
|
-
className:
|
|
86
|
+
ref: y,
|
|
87
|
+
className: m(
|
|
75
88
|
e,
|
|
76
89
|
{
|
|
77
|
-
[`${e}-block`]:
|
|
78
|
-
[`${e}-loading`]:
|
|
79
|
-
[`${e}-with-tip`]:
|
|
90
|
+
[`${e}-block`]: k,
|
|
91
|
+
[`${e}-loading`]: c,
|
|
92
|
+
[`${e}-with-tip`]: a && !r
|
|
80
93
|
},
|
|
81
|
-
|
|
94
|
+
b
|
|
82
95
|
),
|
|
83
|
-
style:
|
|
84
|
-
...
|
|
85
|
-
children:
|
|
96
|
+
style: R,
|
|
97
|
+
...E,
|
|
98
|
+
children: l
|
|
86
99
|
}
|
|
87
100
|
);
|
|
88
101
|
}
|
|
89
|
-
const
|
|
90
|
-
|
|
102
|
+
const W = h.forwardRef(V);
|
|
103
|
+
W.displayName = "Spin";
|
|
91
104
|
export {
|
|
92
|
-
|
|
105
|
+
W as default
|
|
93
106
|
};
|