@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.
Files changed (47) hide show
  1. package/Message.js +1 -1
  2. package/Notification.js +1 -1
  3. package/Switch.js +1 -1
  4. package/Trigger.js +1 -1
  5. package/alert/index.js +50 -49
  6. package/back-top/index.js +8 -8
  7. package/cascader/panel/List.js +1 -1
  8. package/collapse/Item.js +1 -1
  9. package/components/common/hooks/useForceUpdate.js +6 -2
  10. package/components/common/hooks/useId.js +8 -8
  11. package/components/common/space/index.js +2 -3
  12. package/components/common/utils/PqbCSSTransition.js +1 -1
  13. package/details/index.js +32 -31
  14. package/dist/react-transition-group/src/CSSTransition.js +1 -1
  15. package/dist/react-transition-group/src/SwitchTransition.js +1 -1
  16. package/dist/tween/src/tween.js +24 -25
  17. package/hooks/index.js +50 -52
  18. package/index.js +674 -680
  19. package/input-tag/InputTag.js +1 -1
  20. package/message/index.js +1 -1
  21. package/notification/index.js +1 -1
  22. package/package.json +1 -1
  23. package/rate/index.js +1 -1
  24. package/slider/index.js +1 -1
  25. package/slider/util.js +1 -1
  26. package/statistic/index.js +16 -16
  27. package/style.css +1 -1
  28. package/switch/index.js +1 -1
  29. package/table/Table.js +16 -16
  30. package/time-picker/util.js +4 -4
  31. package/trigger/index.js +1 -1
  32. package/types/common/utils/math.d.ts +1 -1
  33. package/types/pc/alert/interface.d.ts +2 -2
  34. package/types/pc/details/interface.d.ts +2 -2
  35. package/types/pc/hooks/index.d.ts +0 -1
  36. package/types/pc/utils/math.d.ts +1 -1
  37. package/typography/Ellipsis.js +4 -5
  38. package/upload/list/index.js +1 -1
  39. package/utils/index.js +173 -177
  40. package/utils/math.js +7 -11
  41. package/utils/reactTransitionGroup.js +1 -1
  42. package/version/index.js +1 -1
  43. package/components/common/hooks/useComputedState.js +0 -11
  44. package/hooks/useComputedState.js +0 -4
  45. package/types/common/hooks/useComputedState.d.ts +0 -4
  46. package/types/pc/hooks/useComputedState.d.ts +0 -1
  47. /package/dist/react-transition-group/chunk/{C6QwjD4L.js → CPfP7aNL.js} +0 -0
@@ -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/C6QwjD4L.js";
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/C6QwjD4L.js";
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";
@@ -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/C6QwjD4L.js";
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.95","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"}}
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, divide as et } from "@unicom-cloud/utils/math";
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 { divide as Fe, plus as Je, times as qe } from "@unicom-cloud/utils/math";
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
@@ -1,4 +1,4 @@
1
- import { minus as i, times as d, plus as m, divide as l } from "@unicom-cloud/utils/math";
1
+ import { minus as i, times as d, plus as m, div as l } from "@unicom-cloud/utils/math";
2
2
  function I(t) {
3
3
  const n = `${t}`.split(".")[1];
4
4
  return n && n.length || 0;
@@ -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 y, useState as J, useEffect as K, useImperativeHandle as Q, useMemo as X } from "react";
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: I,
35
- styleDecimal: O,
36
- loading: P,
37
- ..._
38
- } = t, i = y(), g = y(), [e, v] = J(
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: (H) => {
52
- v(H.value.toFixed(s));
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: k, decimal: x } = X(() => {
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]), E = A(F) ? F : (n, o) => o, b = c(Number(e)), C = /* @__PURE__ */ l(L, { children: [
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
- E(e, b ? k : e)
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(_, ["value", "countUp", "countFrom", "countDuration"]),
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: !!P,
92
+ loading: !!_,
93
93
  text: { rows: 1, width: "100%" },
94
- children: /* @__PURE__ */ l("div", { className: `${r}-value`, style: I, children: [
95
- b ? /* @__PURE__ */ a("span", { className: `${r}-value-int`, children: C }) : C,
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: O,
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