@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
package/switch/index.js CHANGED
@@ -3,7 +3,7 @@ import q from "@unicom-cloud/icons/IconUiLoading";
3
3
  import "../dist/react-transition-group/src/CSSTransition.js";
4
4
  import "../dist/react-transition-group/src/ReplaceTransition.js";
5
5
  import A from "../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 "../dist/react-transition-group/src/TransitionGroup.js";
8
8
  import B from "lodash/isArray";
9
9
  import { forwardRef as L, useContext as M, useState as O } from "react";
package/table/Table.js CHANGED
@@ -74,7 +74,7 @@ function kr(P, ce) {
74
74
  pagination: N,
75
75
  onChange: y,
76
76
  pagePosition: w,
77
- childrenColumnName: I,
77
+ childrenColumnName: W,
78
78
  indentSize: xe,
79
79
  rowSelection: D,
80
80
  tableLayoutFixed: Se,
@@ -83,11 +83,11 @@ function kr(P, ce) {
83
83
  footer: Lt,
84
84
  virtualized: z,
85
85
  renderPagination: zt,
86
- summary: W,
86
+ summary: I,
87
87
  rowKey: q
88
88
  } = x, Rt = lt(
89
- () => Dr(d, I),
90
- [d, I]
89
+ () => Dr(d, W),
90
+ [d, W]
91
91
  ), n = dt == null ? void 0 : dt("table"), pt = x.size || (["default", "middle", "small"].indexOf(Pt) > -1 ? Pt : "default"), R = $(null), p = $(null), mt = $(null), g = $(null), _ = $(null), yt = $(null), U = $(null), G = $(0), gt = $(!1), [Ht, f] = xr(x), { currentFilters: Ce, defaultSorters: we } = He(), [A, ht] = j(1), [Te, $e] = j(
92
92
  F.pageSize || F.defaultPageSize || 10
93
93
  ), [Et, kt] = j(Ce), [Fe, Ne] = j(0), [ve, Pe] = j([]), bt = Fr(f), [De, Ot] = $r(
@@ -193,9 +193,9 @@ function kr(P, ce) {
193
193
  action: "filter"
194
194
  }
195
195
  );
196
- } else K(e) && !e.length && It(t);
196
+ } else K(e) && !e.length && Wt(t);
197
197
  }
198
- function It({ dataIndex: t }) {
198
+ function Wt({ dataIndex: t }) {
199
199
  const e = {
200
200
  ...B
201
201
  };
@@ -228,9 +228,9 @@ function kr(P, ce) {
228
228
  )));
229
229
  }
230
230
  });
231
- const s = (c) => c.slice().sort(ke(e)).map((l) => K(l[I]) ? {
231
+ const s = (c) => c.slice().sort(ke(e)).map((l) => K(l[W]) ? {
232
232
  ...l,
233
- [I]: s(l[I])
233
+ [W]: s(l[W])
234
234
  } : l);
235
235
  return t.direction && typeof t.sorterFn == "function" || e.length ? s(o) : o;
236
236
  }
@@ -272,14 +272,14 @@ function kr(P, ce) {
272
272
  const { current: r = 0, pageSize: o = 10 } = e;
273
273
  return N === !1 || m(N) && d.length <= o ? t : t.slice((r - 1) * o, r * o);
274
274
  }
275
- const Wt = cr(_t, 100), T = !!(i && i.y), Y = W == null ? void 0 : W(S(H)), St = W && fr.isValidElement(Y) && Y.props.fixed, Ie = T && St;
275
+ const It = cr(_t, 100), T = !!(i && i.y), Y = I == null ? void 0 : I(S(H)), St = I && fr.isValidElement(Y) && Y.props.fixed, We = T && St;
276
276
  yr(() => {
277
- _t(), ct(window, "resize", Wt);
277
+ _t(), ct(window, "resize", It);
278
278
  const t = R.current, e = p.current, r = g.current;
279
279
  e && ct(e, "scroll", O);
280
280
  const o = t && t.parentNode;
281
281
  return t && o && ct(o, "scroll", O), r && ct(r, "scroll", O), () => {
282
- at(window, "resize", Wt), e && at(e, "scroll", O), o && at(o, "scroll", O), r && at(r, "scroll", O);
282
+ at(window, "resize", It), e && at(e, "scroll", O), o && at(o, "scroll", O), r && at(r, "scroll", O);
283
283
  };
284
284
  }, [
285
285
  Q,
@@ -312,7 +312,7 @@ function kr(P, ce) {
312
312
  Ne(s);
313
313
  }
314
314
  }
315
- const We = mr(
315
+ const Ie = mr(
316
316
  ar(() => {
317
317
  const t = _.current, e = T ? p.current : U.current && U.current.parentNode;
318
318
  if (e) {
@@ -344,7 +344,7 @@ function kr(P, ce) {
344
344
  ), Z && At(
345
345
  t.classList,
346
346
  `${n}-has-fixed-col-right`
347
- )), We();
347
+ )), Ie();
348
348
  }
349
349
  }
350
350
  function At(t, e) {
@@ -440,7 +440,7 @@ function kr(P, ce) {
440
440
  onSort: Ee,
441
441
  data: k,
442
442
  onHandleFilter: Oe,
443
- onHandleFilterReset: It,
443
+ onHandleFilterReset: Wt,
444
444
  prefixCls: n,
445
445
  allSelectedRowKeys: Ke,
446
446
  groupColumns: Ht,
@@ -474,7 +474,7 @@ function kr(P, ce) {
474
474
  vr,
475
475
  {
476
476
  prefixCls: n,
477
- summary: W,
477
+ summary: I,
478
478
  data: k,
479
479
  columns: f,
480
480
  stickyOffsets: bt,
@@ -508,7 +508,7 @@ function kr(P, ce) {
508
508
  },
509
509
  ___dangerouslySetInnerHTML___: x.___dangerouslySetInnerHTML___
510
510
  }
511
- ), Gt = !z && !Ie ? /* @__PURE__ */ v(vt, { children: [
511
+ ), Gt = !z && !We ? /* @__PURE__ */ v(vt, { children: [
512
512
  Ut,
513
513
  qt
514
514
  ] }) : Ut;
@@ -2,7 +2,7 @@ import { Tween as i } from "../dist/tween/src/tween.js";
2
2
  import { quartInOut as l } from "../dist/tween/src/easing.js";
3
3
  import { isDayjs as m } from "dayjs";
4
4
  import { dayjs as f, methods as e } from "../components/common/utils/dayjs.js";
5
- function h(o) {
5
+ function y(o) {
6
6
  const t = ["H", "h", "m", "s", "a", "A"], s = [];
7
7
  let a = !1;
8
8
  return t.forEach((r) => {
@@ -13,7 +13,7 @@ function h(o) {
13
13
  };
14
14
  }
15
15
  const c = /* @__PURE__ */ new Map();
16
- function y(o, t, s) {
16
+ function h(o, t, s) {
17
17
  c.get(o) && cancelAnimationFrame(c.get(o)), s <= 0 && (o.scrollTop = t), c.set(
18
18
  o,
19
19
  requestAnimationFrame(() => {
@@ -38,7 +38,7 @@ function g(o) {
38
38
  return o;
39
39
  }
40
40
  export {
41
- h as getColumnsFromFormat,
41
+ y as getColumnsFromFormat,
42
42
  g as getFormatTime,
43
- y as scrollTo
43
+ h as scrollTo
44
44
  };
package/trigger/index.js CHANGED
@@ -2,7 +2,7 @@ import { jsx as D, jsxs as $e } from "react/jsx-runtime";
2
2
  import ut from "../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 "../dist/react-transition-group/src/TransitionGroup.js";
7
7
  import ct from "lodash/isArray";
8
8
  import S from "lodash/isFunction";
@@ -1 +1 @@
1
- export { add, default, div, divide, default as math, minus, multiply, plus, subtract, times, } from '@unicom-cloud/utils/math';
1
+ export { default, div, default as math, minus, plus, times, } from '@unicom-cloud/utils/math';
@@ -29,9 +29,9 @@ export interface AlertProps {
29
29
  /**
30
30
  * @zh 警告的类型
31
31
  * @en Type of Alert
32
- * @defaultValue info
32
+ * @defaultValue default
33
33
  */
34
- type?: 'info' | 'success' | 'warning' | 'error';
34
+ type?: 'default' | 'info' | 'success' | 'warning' | 'error';
35
35
  /**
36
36
  * @zh 标题
37
37
  * @en Alert title
@@ -8,9 +8,9 @@ export interface DetailsProps {
8
8
  /**
9
9
  * @zh 警告的类型
10
10
  * @en Type of Details
11
- * @defaultValue info
11
+ * @defaultValue default
12
12
  */
13
- type?: 'info' | 'success' | 'warning' | 'error';
13
+ type?: 'default' | 'info' | 'success' | 'warning' | 'error';
14
14
  /**
15
15
  * @zh 标题
16
16
  * @en Details title
@@ -1,6 +1,5 @@
1
1
  export { default as useVerificationCode } from "./use-verification-code";
2
2
  export { default as useWatermark } from "./use-watermark";
3
- export { default as useComputedState } from "./useComputedState";
4
3
  export { default as useCreate } from "./useCreate";
5
4
  export { default as useForceUpdate } from "./useForceUpdate";
6
5
  export { default as useId } from "./useId";
@@ -1 +1 @@
1
- export { add, default, div, divide, default as math, minus, multiply, plus, subtract, times, } from '@unicom-cloud/utils/math';
1
+ export { default, div, default as math, minus, plus, times, } from '@unicom-cloud/utils/math';
@@ -43,14 +43,14 @@ import "lodash/isPlainObject";
43
43
  import "../dist/react-transition-group/src/CSSTransition.js";
44
44
  import "../dist/react-transition-group/src/ReplaceTransition.js";
45
45
  import "../dist/react-transition-group/src/SwitchTransition.js";
46
- import "../dist/react-transition-group/chunk/C6QwjD4L.js";
46
+ import "../dist/react-transition-group/chunk/CPfP7aNL.js";
47
47
  import "../dist/react-transition-group/src/TransitionGroup.js";
48
48
  import "@unicom-cloud/utils/file/saveAs";
49
49
  import "@unicom-cloud/utils/screenfull";
50
50
  import "@unicom-cloud/utils/constant/ui.js";
51
51
  import { throttleByRaf as Z } from "../components/common/utils/throttleByRaf.js";
52
52
  import "@unicom-cloud/utils/tree";
53
- import "lodash/isFunction";
53
+ import { isPlainObject as j } from "@unicom-cloud/utils/is";
54
54
  import "uuid";
55
55
  import "../dist/validate/src/index.js";
56
56
  import "../affix/index.js";
@@ -137,7 +137,6 @@ import "../virtual-list/VirtualList.js";
137
137
  import "../watermark/Watermark.js";
138
138
  import { resizeObserverEffect as rt } from "../components/common/utils/resizeObserverEffect.js";
139
139
  import ot from "../config-provider/context.js";
140
- import { isPlainObject as j } from "@unicom-cloud/utils/is";
141
140
  const it = {
142
141
  rows: 1,
143
142
  expandable: !0,
@@ -280,7 +279,7 @@ const it = {
280
279
  G(),
281
280
  I()
282
281
  ] });
283
- }, So = J(et);
282
+ }, Lo = J(et);
284
283
  export {
285
- So as default
284
+ Lo as default
286
285
  };
@@ -2,7 +2,7 @@ import { jsx as n, jsxs as L, Fragment 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 v from "../../dist/react-transition-group/src/TransitionGroup.js";
7
7
  import x from "lodash/isFunction";
8
8
  import { useContext as T, useState as g, useEffect as b } from "react";