@unicom-cloud/ui 0.8.95 → 0.8.96
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/Message.js +1 -1
- package/Notification.js +1 -1
- package/Switch.js +1 -1
- package/Trigger.js +1 -1
- package/alert/index.js +50 -49
- package/back-top/index.js +8 -8
- package/cascader/panel/List.js +1 -1
- package/collapse/Item.js +1 -1
- package/components/common/hooks/useForceUpdate.js +6 -2
- package/components/common/hooks/useId.js +8 -8
- package/components/common/space/index.js +2 -3
- package/components/common/utils/PqbCSSTransition.js +1 -1
- package/details/index.js +32 -31
- package/dist/react-transition-group/src/CSSTransition.js +1 -1
- package/dist/react-transition-group/src/SwitchTransition.js +1 -1
- package/dist/tween/src/tween.js +24 -25
- package/hooks/index.js +50 -52
- package/index.js +674 -680
- package/input-tag/InputTag.js +1 -1
- package/message/index.js +1 -1
- package/notification/index.js +1 -1
- package/package.json +1 -1
- package/rate/index.js +1 -1
- package/slider/index.js +1 -1
- package/slider/util.js +1 -1
- package/statistic/index.js +16 -16
- package/style.css +1 -1
- package/switch/index.js +1 -1
- package/table/Table.js +16 -16
- package/time-picker/util.js +4 -4
- package/trigger/index.js +1 -1
- package/types/common/utils/math.d.ts +1 -1
- package/types/pc/alert/interface.d.ts +2 -2
- package/types/pc/details/interface.d.ts +2 -2
- package/types/pc/hooks/index.d.ts +0 -1
- package/types/pc/utils/math.d.ts +1 -1
- package/typography/Ellipsis.js +4 -5
- package/upload/list/index.js +1 -1
- package/utils/index.js +173 -177
- package/utils/math.js +7 -11
- package/utils/reactTransitionGroup.js +1 -1
- package/version/index.js +1 -1
- package/components/common/hooks/useComputedState.js +0 -11
- package/hooks/useComputedState.js +0 -4
- package/types/common/hooks/useComputedState.d.ts +0 -4
- package/types/pc/hooks/useComputedState.d.ts +0 -1
- /package/dist/react-transition-group/chunk/{C6QwjD4L.js → CPfP7aNL.js} +0 -0
package/input-tag/InputTag.js
CHANGED
|
@@ -3,7 +3,7 @@ import Ge from "@unicom-cloud/icons/IconUiClose";
|
|
|
3
3
|
import "../dist/react-transition-group/src/CSSTransition.js";
|
|
4
4
|
import "../dist/react-transition-group/src/ReplaceTransition.js";
|
|
5
5
|
import "../dist/react-transition-group/src/SwitchTransition.js";
|
|
6
|
-
import "../dist/react-transition-group/chunk/
|
|
6
|
+
import "../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
7
7
|
import Ke from "../dist/react-transition-group/src/TransitionGroup.js";
|
|
8
8
|
import Te from "lodash/isArray";
|
|
9
9
|
import Ce, { useContext as qe, useRef as C, useState as Xe, useImperativeHandle as Ye, useMemo as Je, useEffect as Qe } from "react";
|
package/message/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as u } from "react/jsx-runtime";
|
|
|
2
2
|
import "../dist/react-transition-group/src/CSSTransition.js";
|
|
3
3
|
import "../dist/react-transition-group/src/ReplaceTransition.js";
|
|
4
4
|
import "../dist/react-transition-group/src/SwitchTransition.js";
|
|
5
|
-
import "../dist/react-transition-group/chunk/
|
|
5
|
+
import "../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
6
6
|
import O from "../dist/react-transition-group/src/TransitionGroup.js";
|
|
7
7
|
import C from "lodash/isNumber";
|
|
8
8
|
import y from "lodash/isUndefined";
|
package/notification/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as s } from "react/jsx-runtime";
|
|
|
2
2
|
import "../dist/react-transition-group/src/CSSTransition.js";
|
|
3
3
|
import "../dist/react-transition-group/src/ReplaceTransition.js";
|
|
4
4
|
import "../dist/react-transition-group/src/SwitchTransition.js";
|
|
5
|
-
import "../dist/react-transition-group/chunk/
|
|
5
|
+
import "../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
6
6
|
import L from "../dist/react-transition-group/src/TransitionGroup.js";
|
|
7
7
|
import b from "lodash/isNumber";
|
|
8
8
|
import y from "lodash/isUndefined";
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@unicom-cloud/ui","version":"0.8.
|
|
1
|
+
{"name":"@unicom-cloud/ui","version":"0.8.96","dependencies":{"@unicom-cloud/icons":"latest"},"peerDependencies":{"dayjs":"^1.11.10","lodash":"^4.17.21","react":"^18.3.1","react-dom":"^18.3.1"},"peerDependenciesMeta":{},"type":"module","types":"types/pc/index.d.ts","main":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
|
package/rate/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import Z from "@unicom-cloud/icons/IconUiFaceFrownFill";
|
|
|
3
3
|
import U from "@unicom-cloud/icons/IconUiFaceMehFill";
|
|
4
4
|
import x from "@unicom-cloud/icons/IconUiFaceSmileFill";
|
|
5
5
|
import tt from "@unicom-cloud/icons/IconUiStarFill";
|
|
6
|
-
import { times as rt,
|
|
6
|
+
import { times as rt, div as et } from "@unicom-cloud/utils/math";
|
|
7
7
|
import _, { useContext as ot, useState as y } from "react";
|
|
8
8
|
import "../config-provider/ConfigProvider.js";
|
|
9
9
|
import at from "../components/common/hooks/useMergeProps.js";
|
package/slider/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as v, jsxs as oe } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { div as Fe, plus as Je, times as qe } from "@unicom-cloud/utils/math";
|
|
3
3
|
import re from "lodash/isArray";
|
|
4
4
|
import ae from "lodash/isFunction";
|
|
5
5
|
import ie from "lodash/isPlainObject";
|
package/slider/util.js
CHANGED
package/statistic/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { quartOut as W } from "../dist/tween/src/easing.js";
|
|
|
4
4
|
import z from "dayjs";
|
|
5
5
|
import A from "lodash/isFunction";
|
|
6
6
|
import c from "lodash/isNumber";
|
|
7
|
-
import { forwardRef as B, useContext as G, useRef as
|
|
7
|
+
import { forwardRef as B, useContext as G, useRef as C, useState as J, useEffect as K, useImperativeHandle as Q, useMemo as X } from "react";
|
|
8
8
|
import "../config-provider/ConfigProvider.js";
|
|
9
9
|
import Y from "../components/common/hooks/useMergeProps.js";
|
|
10
10
|
import Z from "../skeleton/index.js";
|
|
@@ -31,11 +31,11 @@ function nt(R, U) {
|
|
|
31
31
|
suffix: u,
|
|
32
32
|
format: f,
|
|
33
33
|
renderFormat: F,
|
|
34
|
-
styleValue:
|
|
35
|
-
styleDecimal:
|
|
36
|
-
loading:
|
|
37
|
-
...
|
|
38
|
-
} = t, i =
|
|
34
|
+
styleValue: O,
|
|
35
|
+
styleDecimal: P,
|
|
36
|
+
loading: _,
|
|
37
|
+
...k
|
|
38
|
+
} = t, i = C(), g = C(), [e, v] = J(
|
|
39
39
|
"value" in t ? t.value : void 0
|
|
40
40
|
), r = m == null ? void 0 : m("statistic"), N = (n = t.countFrom, o = t.value) => {
|
|
41
41
|
const { countDuration: h } = t;
|
|
@@ -48,8 +48,8 @@ function nt(R, U) {
|
|
|
48
48
|
},
|
|
49
49
|
duration: h,
|
|
50
50
|
easing: W,
|
|
51
|
-
onUpdate: (
|
|
52
|
-
v(
|
|
51
|
+
onUpdate: (I) => {
|
|
52
|
+
v(I.value.toFixed(s));
|
|
53
53
|
},
|
|
54
54
|
onFinish: () => {
|
|
55
55
|
v(o);
|
|
@@ -62,7 +62,7 @@ function nt(R, U) {
|
|
|
62
62
|
countUp: N,
|
|
63
63
|
getRootDOMNode: () => g.current
|
|
64
64
|
}));
|
|
65
|
-
const { int:
|
|
65
|
+
const { int: E, decimal: x } = X(() => {
|
|
66
66
|
let n = e;
|
|
67
67
|
f && (n = z(e).format(f)), c(s) && s >= 0 && (n = Number(e).toFixed(s));
|
|
68
68
|
let o = String(n).split(".")[0];
|
|
@@ -71,16 +71,16 @@ function nt(R, U) {
|
|
|
71
71
|
int: o,
|
|
72
72
|
decimal: h
|
|
73
73
|
};
|
|
74
|
-
}, [f, w, s, e]),
|
|
74
|
+
}, [f, w, s, e]), H = A(F) ? F : (n, o) => o, b = c(Number(e)), y = /* @__PURE__ */ l(L, { children: [
|
|
75
75
|
p != null ? /* @__PURE__ */ a("span", { className: `${r}-value-prefix`, children: p }) : null,
|
|
76
|
-
|
|
76
|
+
H(e, b ? E : e)
|
|
77
77
|
] });
|
|
78
78
|
return /* @__PURE__ */ l(
|
|
79
79
|
"div",
|
|
80
80
|
{
|
|
81
81
|
className: tt(`${r}`, { [`${r}-rtl`]: j }, M),
|
|
82
82
|
style: q,
|
|
83
|
-
...et(
|
|
83
|
+
...et(k, ["value", "countUp", "countFrom", "countDuration"]),
|
|
84
84
|
ref: g,
|
|
85
85
|
children: [
|
|
86
86
|
S && /* @__PURE__ */ a("div", { className: `${r}-title`, children: S }),
|
|
@@ -89,15 +89,15 @@ function nt(R, U) {
|
|
|
89
89
|
Z,
|
|
90
90
|
{
|
|
91
91
|
animation: !0,
|
|
92
|
-
loading: !!
|
|
92
|
+
loading: !!_,
|
|
93
93
|
text: { rows: 1, width: "100%" },
|
|
94
|
-
children: /* @__PURE__ */ l("div", { className: `${r}-value`, style:
|
|
95
|
-
b ? /* @__PURE__ */ a("span", { className: `${r}-value-int`, children:
|
|
94
|
+
children: /* @__PURE__ */ l("div", { className: `${r}-value`, style: O, children: [
|
|
95
|
+
b ? /* @__PURE__ */ a("span", { className: `${r}-value-int`, children: y }) : y,
|
|
96
96
|
x !== void 0 || u ? /* @__PURE__ */ l(
|
|
97
97
|
"span",
|
|
98
98
|
{
|
|
99
99
|
className: `${r}-value-decimal`,
|
|
100
|
-
style:
|
|
100
|
+
style: P,
|
|
101
101
|
children: [
|
|
102
102
|
c(Number(e)) && x !== void 0 && `.${x}`,
|
|
103
103
|
u != null ? /* @__PURE__ */ a("span", { className: `${r}-value-suffix`, children: u }) : null
|