@unicom-cloud/ui 0.8.107 → 0.8.108

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 (137) hide show
  1. package/ColorPicker.js +15 -14
  2. package/Constant.js +4 -0
  3. package/Copy.js +4 -3
  4. package/Countdown.js +25 -0
  5. package/Grid.js +8 -10
  6. package/LiquidFill.js +4 -3
  7. package/List.js +7 -6
  8. package/Marquee.js +4 -3
  9. package/PageHeader.js +3 -2
  10. package/QrCode.js +4 -3
  11. package/RowCol.js +8 -0
  12. package/Segmented.js +14 -4
  13. package/Statistic.js +5 -4
  14. package/Tour.js +4 -3
  15. package/Transfer.js +4 -2
  16. package/anchor/Link.js +1 -1
  17. package/avatar/Group.js +1 -1
  18. package/button/index.js +52 -51
  19. package/calendar/Lunar.js +21 -21
  20. package/cascader/base/node.js +22 -20
  21. package/cascader/base/store.js +10 -10
  22. package/cascader/util.js +29 -27
  23. package/color-picker/Mode.js +8 -7
  24. package/color-picker/hooks/useColorPicker.js +56 -55
  25. package/color-picker/index.js +54 -53
  26. package/color-picker/utils.js +58 -57
  27. package/components/common/empty/index.js +2 -2
  28. package/components/common/flex/index.js +64 -55
  29. package/components/common/flex/interface.js +6 -6
  30. package/components/common/hooks/useInterval.js +6 -6
  31. package/components/common/space/index.js +53 -53
  32. package/components/common/utils/dayjs.js +75 -62
  33. package/components/common/utils/toArray.js +7 -5
  34. package/constant/index.js +4 -0
  35. package/copy/index.js +2 -1
  36. package/countdown/index.js +113 -0
  37. package/countdown/interface.js +1 -0
  38. package/countdown/util.js +29 -0
  39. package/descriptions/index.js +26 -26
  40. package/dropdown/Button.js +1 -1
  41. package/flex/index.js +30 -29
  42. package/form/FormItem.js +126 -122
  43. package/grid/Grid.js +40 -41
  44. package/grid/Item.js +37 -37
  45. package/grid/context.js +2 -3
  46. package/grid/index.js +6 -8
  47. package/hooks/useResponsiveState.js +54 -0
  48. package/index.js +614 -610
  49. package/input/InputElement.js +25 -24
  50. package/layout/Sider.js +1 -1
  51. package/liquid-fill/index.js +4 -3
  52. package/list/Item.js +21 -21
  53. package/list/index.js +53 -52
  54. package/marquee/index.js +20 -19
  55. package/marquee-/index.js +4 -3
  56. package/mentions/util.js +9 -8
  57. package/package.json +1 -1
  58. package/page-header/index.js +57 -56
  59. package/pagination/Pagination.js +89 -92
  60. package/qr-code/index.js +4 -3
  61. package/radio/Group.js +1 -1
  62. package/row-col/Col-.js +88 -0
  63. package/row-col/Col.js +159 -0
  64. package/row-col/Row.js +73 -0
  65. package/row-col/context.js +5 -0
  66. package/row-col/index.js +11 -0
  67. package/row-col/interface.js +1 -0
  68. package/segmented/index.js +257 -206
  69. package/select/Select.js +191 -191
  70. package/select/util.js +50 -50
  71. package/space/index.js +15 -13
  72. package/statistic/index.js +56 -55
  73. package/statistic/interface.js +4 -1
  74. package/style.css +1 -1
  75. package/table/hook/useColumns.js +27 -26
  76. package/table/hook/useStickyClassNames.js +9 -8
  77. package/table/hook/useThResizable.js +4 -3
  78. package/table/th-resizable/index.js +11 -10
  79. package/table/thead/index.js +18 -16
  80. package/timeline/Item.js +1 -1
  81. package/tour/index.js +4 -3
  82. package/transfer/index.js +93 -91
  83. package/trigger/index.js +66 -66
  84. package/types/common/flex/index.d.ts +3 -9
  85. package/types/common/flex/interface.d.ts +15 -4
  86. package/types/common/space/index.d.ts +3 -5
  87. package/types/common/space/interface.d.ts +2 -0
  88. package/types/common/utils/dayjs.d.ts +3 -1
  89. package/types/pc/button/interface.d.ts +2 -2
  90. package/types/pc/config-provider/interface.d.ts +16 -11
  91. package/types/pc/constant/index.d.ts +1 -0
  92. package/types/pc/countdown/interface.d.ts +65 -0
  93. package/types/pc/countdown/util.d.ts +7 -0
  94. package/types/pc/flex/index.d.ts +8 -6
  95. package/types/pc/flex/interface.d.ts +3 -10
  96. package/types/pc/form/FormItem.d.ts +1 -1
  97. package/types/pc/form/interface.d.ts +1 -1
  98. package/types/pc/grid/Grid.d.ts +1 -2
  99. package/types/pc/grid/Item.d.ts +1 -2
  100. package/types/pc/grid/context.d.ts +0 -5
  101. package/types/pc/grid/index.d.ts +4 -6
  102. package/types/pc/grid/interface.d.ts +7 -125
  103. package/types/pc/hooks/useResponsiveState.d.ts +3 -0
  104. package/types/pc/index.d.ts +7 -3
  105. package/types/pc/list/interface.d.ts +2 -1
  106. package/types/pc/pagination/PageOption.d.ts +0 -1
  107. package/types/pc/pagination/interface.d.ts +5 -6
  108. package/types/pc/{grid → row-col}/Col-.d.ts +1 -1
  109. package/types/pc/{grid → row-col}/Col.d.ts +1 -2
  110. package/types/pc/{grid → row-col}/Row.d.ts +1 -2
  111. package/types/pc/row-col/context.d.ts +6 -0
  112. package/types/pc/row-col/index.d.ts +7 -0
  113. package/types/pc/row-col/interface.d.ts +112 -0
  114. package/types/pc/segmented/index.d.ts +3 -7
  115. package/types/pc/segmented/interface.d.ts +38 -5
  116. package/types/pc/space/index.d.ts +5 -7
  117. package/types/pc/space/interface.d.ts +3 -10
  118. package/types/pc/statistic/index.d.ts +1 -1
  119. package/types/pc/statistic/interface.d.ts +1 -49
  120. package/types/pc/utils/names.d.ts +121 -113
  121. package/types/pc/utils/responsiveObserve.d.ts +8 -8
  122. package/typography/Ellipsis.js +5 -4
  123. package/typography/Operations.js +4 -3
  124. package/utils/dayjs.js +13 -11
  125. package/utils/index.js +244 -242
  126. package/utils/names.js +15 -10
  127. package/utils/responsiveObserve.js +43 -36
  128. package/version/index.js +1 -1
  129. package/grid/Col-.js +0 -86
  130. package/grid/Col.js +0 -169
  131. package/grid/Row.js +0 -96
  132. package/grid/hook/useResponsiveState.js +0 -35
  133. package/statistic/Countdown.js +0 -56
  134. package/statistic/util.js +0 -33
  135. package/types/pc/grid/hook/useResponsiveState.d.ts +0 -2
  136. package/types/pc/statistic/util.d.ts +0 -1
  137. /package/types/pc/{statistic/Countdown.d.ts → countdown/index.d.ts} +0 -0
@@ -1,17 +1,18 @@
1
1
  import { jsxs as H, Fragment as K, jsx as l } from "react/jsx-runtime";
2
2
  import Y from "@unicom-cloud/icons/IconUiClose";
3
- import Z from "lodash/isFunction";
4
- import _, { useState as ee, useRef as b, useImperativeHandle as te, useEffect as L } from "react";
5
- import oe from "../components/common/hooks/useKeyboardEvent.js";
6
- import re from "../icon-hover/index.js";
3
+ import Z from "lodash/isArray";
4
+ import _ from "lodash/isFunction";
5
+ import ee, { useState as te, useRef as b, useImperativeHandle as oe, useEffect as L } from "react";
6
+ import re from "../components/common/hooks/useKeyboardEvent.js";
7
+ import ne from "../icon-hover/index.js";
7
8
  import O from "@unicom-cloud/utils/class-name";
8
- import { fillNBSP as ne } from "../components/common/utils/fillNBSP.js";
9
+ import { fillNBSP as ie } from "../components/common/utils/fillNBSP.js";
9
10
  import "../components/common/utils/is.js";
10
- import { omit as ie } from "../components/common/utils/omit.js";
11
- import { resizeObserver as ae } from "../components/common/utils/resizeObserver.js";
12
- import se from "./useComposition.js";
11
+ import { omit as ae } from "../components/common/utils/omit.js";
12
+ import { resizeObserver as se } from "../components/common/utils/resizeObserver.js";
13
+ import le from "./useComposition.js";
13
14
  import { isPlainObject as p } from "@unicom-cloud/utils/is";
14
- const le = 2, ue = (o) => {
15
+ const ue = 2, ce = (o) => {
15
16
  if (!o)
16
17
  return {};
17
18
  const h = window.getComputedStyle(o);
@@ -31,7 +32,7 @@ const le = 2, ue = (o) => {
31
32
  "borderRight",
32
33
  "boxSizing"
33
34
  ].reduce((a, u) => (a[u] = h[u], a), {});
34
- }, ce = _.forwardRef(
35
+ }, de = ee.forwardRef(
35
36
  (o, h) => {
36
37
  const {
37
38
  allowClear: g,
@@ -53,7 +54,7 @@ const le = 2, ue = (o) => {
53
54
  maxLength: c,
54
55
  clearIcon: W,
55
56
  ...d
56
- } = o, V = ie(d, [
57
+ } = o, V = ae(d, [
57
58
  "error",
58
59
  "status",
59
60
  "showWordLimit",
@@ -68,17 +69,17 @@ const le = 2, ue = (o) => {
68
69
  "normalize",
69
70
  "normalizeTrigger",
70
71
  "autoWidth"
71
- ]), [N, A] = ee(), P = oe(), r = b(), s = b(), $ = b(null), D = p(c) ? c.errorOnly ? void 0 : c.length : c, E = (e) => {
72
+ ]), [N, U] = te(), P = re(), r = b(), s = b(), $ = b(null), D = p(c) ? c.errorOnly ? void 0 : c.length : c, E = (e) => {
72
73
  let i;
73
74
  const R = o.normalizeTrigger || ["onBlur"];
74
- return Array.isArray(R) && R.indexOf(e) > -1 && Z(o.normalize) && (i = o.normalize), i;
75
+ return Z(R) && R.indexOf(e) > -1 && _(o.normalize) && (i = o.normalize), i;
75
76
  }, {
76
- compositionValue: U,
77
+ compositionValue: A,
77
78
  valueChangeHandler: q,
78
79
  compositionHandler: v,
79
80
  keyDownHandler: G,
80
81
  triggerValueChangeCallback: B
81
- } = se({
82
+ } = le({
82
83
  value: C,
83
84
  maxLength: D,
84
85
  onChange: T,
@@ -101,7 +102,7 @@ const le = 2, ue = (o) => {
101
102
  maxLength: D,
102
103
  disabled: a,
103
104
  placeholder: u,
104
- value: U || C || "",
105
+ value: A || C || "",
105
106
  className: J,
106
107
  onKeyDown: G,
107
108
  onChange: q,
@@ -120,7 +121,7 @@ const le = 2, ue = (o) => {
120
121
  i && B(i(e.target.value), e);
121
122
  }
122
123
  };
123
- te(h, () => ({
124
+ oe(h, () => ({
124
125
  dom: r.current,
125
126
  getRootDOMNode: () => r.current,
126
127
  focus: () => {
@@ -133,11 +134,11 @@ const le = 2, ue = (o) => {
133
134
  const m = () => {
134
135
  if (s.current && r.current) {
135
136
  const e = s.current.offsetWidth;
136
- r.current.style.width = `${e + le}px`;
137
+ r.current.style.width = `${e + ue}px`;
137
138
  }
138
139
  };
139
140
  L(() => {
140
- t && ((!p(t) || !t.pure) && A(ue(r.current)), m());
141
+ t && ((!p(t) || !t.pure) && U(ce(r.current)), m());
141
142
  }, [t]);
142
143
  const Q = x.value || u, f = (e) => {
143
144
  r.current && r.current.focus && r.current.focus(), B("", e), M?.();
@@ -152,7 +153,7 @@ const le = 2, ue = (o) => {
152
153
  $.current = e;
153
154
  }
154
155
  return L(() => {
155
- const e = ae([s.current], X);
156
+ const e = se([s.current], X);
156
157
  return () => {
157
158
  e();
158
159
  };
@@ -174,7 +175,7 @@ const le = 2, ue = (o) => {
174
175
  children: W
175
176
  }
176
177
  ) : /* @__PURE__ */ l(
177
- re,
178
+ ne,
178
179
  {
179
180
  tabIndex: 0,
180
181
  className: `${n}-clear-icon`,
@@ -215,13 +216,13 @@ const le = 2, ue = (o) => {
215
216
  ..."height" in o ? { height: S } : {}
216
217
  },
217
218
  ref: s,
218
- children: ne(Q)
219
+ children: ie(Q)
219
220
  }
220
221
  )
221
222
  ] });
222
223
  }
223
224
  );
224
- ce.displayName = "InputComponent";
225
+ de.displayName = "InputComponent";
225
226
  export {
226
- ce as default
227
+ de as default
227
228
  };
package/layout/Sider.js CHANGED
@@ -40,7 +40,7 @@ function ae(o, p) {
40
40
  defaultValue: o.defaultCollapsed
41
41
  }), g = v(m) ? `${m}px` : String(m), L = v(r) ? `${r}` : String(r), [d, k] = ee(
42
42
  e ? L : g
43
- ), h = B(null), y = B(null);
43
+ ), h = B(), y = B(null);
44
44
  y.current = {
45
45
  breakpoint: $,
46
46
  collapsed: e,
@@ -46,7 +46,7 @@ import "../dist/react-transition-group/src/ReplaceTransition.js";
46
46
  import "../dist/react-transition-group/src/SwitchTransition.js";
47
47
  import "../dist/react-transition-group/chunk/CPfP7aNL.js";
48
48
  import "../dist/react-transition-group/src/TransitionGroup.js";
49
- import { v4 as A } from "uuid";
49
+ import "../utils/responsiveObserve.js";
50
50
  import "@unicom-cloud/utils/file/saveAs";
51
51
  import "@unicom-cloud/utils/screenfull";
52
52
  import "@unicom-cloud/utils/tinycolor";
@@ -55,6 +55,7 @@ import "@unicom-cloud/utils/constant/ui.js";
55
55
  import "react-is";
56
56
  import "@unicom-cloud/utils/tree";
57
57
  import { isNumber as ct } from "@unicom-cloud/utils/is";
58
+ import { v4 as A } from "uuid";
58
59
  import "../dist/validate/src/index.js";
59
60
  import pt from "../config-provider/context.js";
60
61
  const dt = {
@@ -74,7 +75,7 @@ const dt = {
74
75
  decimalPlaces: 0,
75
76
  percentFontScale: 0.5,
76
77
  waveSpeedVariation: 0.5
77
- }, we = (E) => {
78
+ }, xe = (E) => {
78
79
  const { getPrefixCls: I, componentConfig: _ } = at(pt), i = I?.("liquid-fill"), H = st(
79
80
  E,
80
81
  dt,
@@ -255,5 +256,5 @@ const dt = {
255
256
  );
256
257
  };
257
258
  export {
258
- we as default
259
+ xe as default
259
260
  };
package/list/Item.js CHANGED
@@ -1,45 +1,45 @@
1
- import { jsx as n, jsxs as m } from "react/jsx-runtime";
2
- import p, { useContext as L } from "react";
1
+ import { jsx as n, jsxs as l } from "react/jsx-runtime";
2
+ import m, { useContext as L } from "react";
3
3
  import "../config-provider/ConfigProvider.js";
4
4
  import M from "../components/common/hooks/useMergeProps.js";
5
5
  import P from "@unicom-cloud/utils/class-name";
6
- import f from "./Meta.js";
6
+ import p from "./Meta.js";
7
7
  import R from "../config-provider/context.js";
8
8
  const j = {
9
9
  actionLayout: "horizontal"
10
10
  };
11
- function w(h, u) {
12
- const { getPrefixCls: C, componentConfig: a } = L(R), x = M(
13
- h,
11
+ function w(d, h) {
12
+ const { getPrefixCls: u, componentConfig: C } = L(R), x = M(
13
+ d,
14
14
  j,
15
- a && a["List.Item"]
16
- ), { children: N, className: $, actions: e, extra: i, actionLayout: r, ...g } = x, o = `${C?.("list")}-item`, c = [], s = [];
17
- p.Children.forEach(N, (t) => {
18
- t && t.type && t.type === f ? c.push(t) : s.push(t);
15
+ C?.ListItem
16
+ ), { children: N, className: $, actions: e, extra: a, actionLayout: i, ...g } = x, o = `${u?.("list")}-item`, r = [], s = [];
17
+ m.Children.forEach(N, (t) => {
18
+ t && t.type && t.type === p ? r.push(t) : s.push(t);
19
19
  });
20
- const v = s.length ? /* @__PURE__ */ n("div", { className: `${o}-content`, children: s }) : null, y = i ? /* @__PURE__ */ n("div", { className: `${o}-extra-content`, children: i }) : null, l = e && e.length ? /* @__PURE__ */ n("div", { className: `${o}-action`, children: e.map((t, I) => /* @__PURE__ */ n("li", { children: t }, `${o}-action-${I}`)) }) : null;
21
- return /* @__PURE__ */ m(
20
+ const v = s.length ? /* @__PURE__ */ n("div", { className: `${o}-content`, children: s }) : null, y = a ? /* @__PURE__ */ n("div", { className: `${o}-extra-content`, children: a }) : null, c = e && e.length ? /* @__PURE__ */ n("div", { className: `${o}-action`, children: e.map((t, I) => /* @__PURE__ */ n("li", { children: t }, `${o}-action-${I}`)) }) : null;
21
+ return /* @__PURE__ */ l(
22
22
  "div",
23
23
  {
24
24
  role: "listitem",
25
- ref: u,
25
+ ref: h,
26
26
  className: P(o, $),
27
27
  ...g,
28
28
  children: [
29
- /* @__PURE__ */ m("div", { className: `${o}-main`, children: [
30
- c,
29
+ /* @__PURE__ */ l("div", { className: `${o}-main`, children: [
30
+ r,
31
31
  v,
32
- r === "vertical" ? l : null
32
+ i === "vertical" ? c : null
33
33
  ] }),
34
- r === "horizontal" ? l : null,
34
+ i === "horizontal" ? c : null,
35
35
  y
36
36
  ]
37
37
  }
38
38
  );
39
39
  }
40
- const z = p.forwardRef(w), d = z;
41
- d.displayName = "ListItem";
42
- d.Meta = f;
40
+ const z = m.forwardRef(w), f = z;
41
+ f.displayName = "ListItem";
42
+ f.Meta = p;
43
43
  export {
44
- d as default
44
+ f as default
45
45
  };
package/list/index.js CHANGED
@@ -1,37 +1,38 @@
1
1
  import { jsx as c, jsxs as N, Fragment as Rt } from "react/jsx-runtime";
2
2
  import Y, { useContext as jt, useRef as h, useState as j, useImperativeHandle as xt, useCallback as Dt, createElement as Ft } from "react";
3
+ import Mt from "lodash/isArray";
3
4
  import At from "lodash/throttle";
4
5
  import "../config-provider/ConfigProvider.js";
5
- import J from "../grid/Col.js";
6
- import K from "../grid/Row.js";
7
- import Mt from "../components/common/hooks/useMergeProps.js";
8
- import Ht from "../pagination/Pagination.js";
9
- import Tt from "../spin/index.js";
6
+ import Ht from "../components/common/hooks/useMergeProps.js";
7
+ import Tt from "../pagination/Pagination.js";
8
+ import J from "../row-col/index.js";
9
+ import Bt from "../spin/index.js";
10
10
  import x from "@unicom-cloud/utils/class-name";
11
- import { omit as Bt } from "../components/common/utils/omit.js";
12
- import { pickDataAttributes as Vt } from "../components/common/utils/pick.js";
13
- import { scrollIntoView as _t } from "../components/common/utils/scrollIntoViewIfNeeded.js";
14
- import kt from "../virtual-list/VirtualList.js";
15
- import Gt from "./Item.js";
16
- import Ot from "../config-provider/context.js";
17
- const Q = 10, X = 1, Ut = ["small", "default", "large"], Wt = {
11
+ import { omit as Vt } from "../components/common/utils/omit.js";
12
+ import { pickDataAttributes as _t } from "../components/common/utils/pick.js";
13
+ import { scrollIntoView as kt } from "../components/common/utils/scrollIntoViewIfNeeded.js";
14
+ import Gt from "../virtual-list/VirtualList.js";
15
+ import Ot from "./Item.js";
16
+ import Ut from "../config-provider/context.js";
17
+ import K from "../row-col/Col.js";
18
+ const Q = 10, X = 1, Wt = ["small", "default", "large"], Zt = {
18
19
  split: !0,
19
20
  bordered: !0,
20
21
  defaultCurrent: 1,
21
22
  offsetBottom: 0,
22
23
  throttleDelay: 500
23
24
  };
24
- function Zt(et, D) {
25
+ function qt(et, D) {
25
26
  const {
26
27
  getPrefixCls: rt,
27
28
  loadingElement: ot,
28
29
  size: F,
29
30
  renderEmpty: nt,
30
31
  componentConfig: lt,
31
- rtl: A
32
- } = jt(Ot), p = Mt(
32
+ rtl: M
33
+ } = jt(Ut), p = Ht(
33
34
  et,
34
- Wt,
35
+ Zt,
35
36
  lt?.List
36
37
  ), {
37
38
  style: st,
@@ -41,15 +42,15 @@ function Zt(et, D) {
41
42
  children: L = [],
42
43
  dataSource: g = [],
43
44
  size: ut,
44
- footer: M,
45
+ footer: A,
45
46
  header: H,
46
47
  pagination: r,
47
48
  bordered: mt,
48
49
  split: pt,
49
50
  render: P,
50
51
  grid: u,
51
- loading: dt,
52
- hoverable: ft,
52
+ loading: ft,
53
+ hoverable: dt,
53
54
  scrollLoading: C,
54
55
  paginationInFooter: T,
55
56
  offsetBottom: gt,
@@ -59,7 +60,7 @@ function Zt(et, D) {
59
60
  listRef: St,
60
61
  onReachBottom: y,
61
62
  onListScroll: S
62
- } = p, $t = ut || (Ut.indexOf(F) > -1 ? F : "default"), t = rt?.("list"), I = h(null), v = h(null), d = h(null), w = h(null), z = h(!0), [Nt, Lt] = j(
63
+ } = p, $t = ut || (Wt.indexOf(F) > -1 ? F : "default"), t = rt?.("list"), I = h(null), v = h(null), f = h(null), w = h(null), z = h(!0), [Nt, Lt] = j(
63
64
  r && typeof r == "object" && (r.pageSize || r.defaultPageSize) || Q
64
65
  ), [Pt, yt] = j(
65
66
  r && typeof r == "object" && (r.current || r.defaultCurrent) || X
@@ -71,8 +72,8 @@ function Zt(et, D) {
71
72
  v.current.scrollTo({ index: o, options: n });
72
73
  else if (w.current) {
73
74
  const a = w.current.children[o];
74
- a && _t(a, {
75
- boundary: d.current,
75
+ a && kt(a, {
76
+ boundary: f.current,
76
77
  ...n
77
78
  });
78
79
  }
@@ -98,12 +99,12 @@ function Zt(et, D) {
98
99
  const _ = !!(S || y), k = Dt(
99
100
  At(() => {
100
101
  if (S) {
101
- S(d.current);
102
+ S(f.current);
102
103
  return;
103
104
  }
104
- if (!d.current)
105
+ if (!f.current)
105
106
  return;
106
- const { scrollTop: o, scrollHeight: n, clientHeight: a } = d.current, s = n - (o + a);
107
+ const { scrollTop: o, scrollHeight: n, clientHeight: a } = f.current, s = n - (o + a);
107
108
  Math.abs(s) < gt + 1 ? z.current && (It(E + 1), y?.(E + 1), z.current = !1) : z.current = !0;
108
109
  }, B),
109
110
  [B, E, S, y]
@@ -124,39 +125,39 @@ function Zt(et, D) {
124
125
  column: Et,
125
126
  ...O
126
127
  } = u, R = Et || Math.floor(24 / u.span), bt = O.span || Math.floor(24 / R);
127
- let f = 0;
128
- for (; f < l.length; ) {
129
- const U = f + R, W = ~~(f / R);
128
+ let d = 0;
129
+ for (; d < l.length; ) {
130
+ const U = d + R, W = ~~(d / R);
130
131
  e.push(
131
132
  /* @__PURE__ */ c(
132
- K,
133
+ J,
133
134
  {
134
135
  className: `${t}-row`,
135
136
  gutter: $,
136
137
  justify: wt,
137
138
  align: zt,
138
- children: l.slice(f, U).map((Z, q) => /* @__PURE__ */ c(
139
- J,
139
+ children: l.slice(d, U).map((Z, q) => /* @__PURE__ */ c(
140
+ K,
140
141
  {
141
142
  className: `${t}-row-col`,
142
143
  ...O,
143
144
  span: bt,
144
- children: i ? i(Z, f + q) : Z
145
+ children: i ? i(Z, d + q) : Z
145
146
  },
146
147
  `${W}_${q}`
147
148
  ))
148
149
  },
149
150
  W
150
151
  )
151
- ), f = U;
152
+ ), d = U;
152
153
  }
153
154
  return e;
154
155
  }
155
- return /* @__PURE__ */ c(K, { className: `${t}-row`, gutter: u.gutter, children: l.map((e, $) => /* @__PURE__ */ Ft(
156
- J,
156
+ return /* @__PURE__ */ c(J, { className: `${t}-row`, gutter: u.gutter, children: l.map((e, $) => /* @__PURE__ */ Ft(
157
+ K,
157
158
  {
158
159
  className: `${t}-row-col`,
159
- ...Bt(u, ["gutter"]),
160
+ ...Vt(u, ["gutter"]),
160
161
  key: $
161
162
  },
162
163
  i ? i(e, $) : e
@@ -164,8 +165,8 @@ function Zt(et, D) {
164
165
  };
165
166
  return g.length > 0 && P ? u ? a(g, P) : n(g, P) : V > 0 ? u ? a(L) : n(L) : C ? null : Ct || nt("List");
166
167
  }, G = () => {
167
- const o = vt(), n = b && b.threshold !== null && Array.isArray(o), a = r ? /* @__PURE__ */ c(
168
- Ht,
168
+ const o = vt(), n = b && b.threshold !== null && Mt(o), a = r ? /* @__PURE__ */ c(
169
+ Tt,
169
170
  {
170
171
  ...m,
171
172
  className: x(
@@ -183,14 +184,14 @@ function Zt(et, D) {
183
184
  style: it,
184
185
  className: x(
185
186
  `${t}-wrapper`,
186
- { [`${t}-wrapper-rtl`]: A },
187
+ { [`${t}-wrapper-rtl`]: M },
187
188
  ct
188
189
  ),
189
190
  children: [
190
191
  /* @__PURE__ */ N(
191
192
  "div",
192
193
  {
193
- ...Vt(p),
194
+ ..._t(p),
194
195
  style: st,
195
196
  className: x(
196
197
  t,
@@ -198,23 +199,23 @@ function Zt(et, D) {
198
199
  {
199
200
  [`${t}-no-border`]: !mt,
200
201
  [`${t}-no-split`]: !pt,
201
- [`${t}-hoverable`]: ft,
202
- [`${t}-rtl`]: A
202
+ [`${t}-hoverable`]: dt,
203
+ [`${t}-rtl`]: M
203
204
  },
204
205
  at
205
206
  ),
206
207
  ref: (e) => {
207
- n || (d.current = e);
208
+ n || (f.current = e);
208
209
  },
209
210
  onScroll: !n && _ ? k : void 0,
210
211
  children: [
211
212
  H ? /* @__PURE__ */ c("div", { className: `${t}-header`, children: H }) : null,
212
213
  n ? /* @__PURE__ */ c(Rt, { children: /* @__PURE__ */ c(
213
- kt,
214
+ Gt,
214
215
  {
215
216
  role: "list",
216
217
  ref: (e) => {
217
- e && (v.current = e, d.current = e.dom);
218
+ e && (v.current = e, f.current = e.dom);
218
219
  },
219
220
  className: `${t}-content ${t}-virtual`,
220
221
  data: l ? o.concat(l) : o,
@@ -235,8 +236,8 @@ function Zt(et, D) {
235
236
  ]
236
237
  }
237
238
  ),
238
- M || s ? /* @__PURE__ */ N("div", { className: `${t}-footer`, children: [
239
- M,
239
+ A || s ? /* @__PURE__ */ N("div", { className: `${t}-footer`, children: [
240
+ A,
240
241
  s
241
242
  ] }) : null
242
243
  ]
@@ -248,21 +249,21 @@ function Zt(et, D) {
248
249
  );
249
250
  };
250
251
  return "loading" in p ? /* @__PURE__ */ c(
251
- Tt,
252
+ Bt,
252
253
  {
253
254
  style: { display: "block" },
254
- loading: dt,
255
+ loading: ft,
255
256
  element: ot,
256
257
  children: G()
257
258
  }
258
259
  ) : G();
259
260
  }
260
261
  const tt = Y.forwardRef(
261
- Zt
262
+ qt
262
263
  );
263
264
  tt.displayName = "List";
264
- tt.Item = Gt;
265
+ tt.Item = Ot;
265
266
  export {
266
- Gt as ListItem,
267
+ Ot as ListItem,
267
268
  tt as default
268
269
  };
package/marquee/index.js CHANGED
@@ -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 lt from "@unicom-cloud/utils/class-name";
17
+ import mt 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,8 +45,8 @@ 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 mt } from "../components/common/utils/resizeObserver.js";
49
- import "uuid";
48
+ import { resizeObserver as lt } from "../components/common/utils/resizeObserver.js";
49
+ import "../utils/responsiveObserve.js";
50
50
  import "@unicom-cloud/utils/file/saveAs";
51
51
  import "@unicom-cloud/utils/screenfull";
52
52
  import "@unicom-cloud/utils/tinycolor";
@@ -55,6 +55,7 @@ import "@unicom-cloud/utils/constant/ui.js";
55
55
  import "react-is";
56
56
  import "@unicom-cloud/utils/tree";
57
57
  import { isPlainObject as pt } from "@unicom-cloud/utils/is";
58
+ import "uuid";
58
59
  import "../dist/validate/src/index.js";
59
60
  import ct from "../config-provider/context.js";
60
61
  const o = {
@@ -67,7 +68,7 @@ const o = {
67
68
  delay: 0.0227,
68
69
  // 设置非 0 为了解决 onAnimationEnd={onFinish} 立即被调用的问题
69
70
  loop: 0
70
- }, ye = it(
71
+ }, Ce = it(
71
72
  function(E, I) {
72
73
  const { getPrefixCls: z, componentConfig: V } = ot(ct), i = z?.("marquee"), t = z?.("marquee-var"), _ = st(
73
74
  E,
@@ -76,7 +77,7 @@ const o = {
76
77
  ), {
77
78
  style: F,
78
79
  className: D,
79
- autoFill: l = o.autoFill,
80
+ autoFill: m = o.autoFill,
80
81
  play: c = o.play,
81
82
  pauseOnHover: v = o.pauseOnHover,
82
83
  pauseOnClick: M = o.pauseOnClick,
@@ -95,29 +96,29 @@ const o = {
95
96
  { size: L ? 50 : 20, color: "#fff" },
96
97
  r
97
98
  ));
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();
99
+ const [k, Q] = C(0), [$, T] = C(0), [y, U] = C(1), [N, X] = C(!1), Y = j(null), l = I || Y, u = j(null), d = A(() => {
100
+ if (u.current && l.current) {
101
+ const n = l.current.getBoundingClientRect(), f = u.current.getBoundingClientRect();
101
102
  let a = n.width, p = f.width;
102
103
  (e === "up" || e === "down") && (a = n.height, p = f.height), U(
103
- l && a && p ? Math.max(2, Math.ceil(a / p)) : 1
104
+ m && a && p ? Math.max(2, Math.ceil(a / p)) : 1
104
105
  ), Q(a), T(p);
105
106
  }
106
- }, [l, m, e]);
107
+ }, [m, l, e]);
107
108
  O(() => {
108
109
  if (!N) return;
109
110
  d();
110
- const n = mt(
111
- [m.current, u.current],
111
+ const n = lt(
112
+ [l.current, u.current],
112
113
  d
113
114
  );
114
115
  return () => {
115
116
  n();
116
117
  };
117
- }, [d, m, u, N]), O(() => (d(), () => {
118
+ }, [d, l, u, N]), O(() => (d(), () => {
118
119
  }), [d, g]), O(() => (X(!0), w && w(), () => {
119
120
  }), [w]);
120
- const P = h(() => $ ? l ? $ * y / q : Math.max(k, $) / q : 0, [l, k, $, y, q]), Z = h(
121
+ const P = h(() => $ ? m ? $ * y / q : Math.max(k, $) / q : 0, [m, k, $, y, q]), Z = h(
121
122
  () => ({
122
123
  ...F,
123
124
  [`--${t}-pause-on-hover`]: !c || v ? "paused" : "running",
@@ -139,9 +140,9 @@ const o = {
139
140
  [`--${t}-duration`]: `${P}s`,
140
141
  [`--${t}-delay`]: `${W}s`,
141
142
  [`--${t}-iteration-count`]: x ? `${x}` : "infinite",
142
- [`--${t}-min-width`]: l ? "auto" : "100%"
143
+ [`--${t}-min-width`]: m ? "auto" : "100%"
143
144
  }),
144
- [t, c, e, P, W, x, l]
145
+ [t, c, e, P, W, x, m]
145
146
  ), R = h(
146
147
  () => ({
147
148
  [`--${t}-transform`]: e === "up" ? "rotate(90deg)" : e === "down" ? "rotate(-90deg)" : "none"
@@ -162,9 +163,9 @@ const o = {
162
163
  return N ? /* @__PURE__ */ s(rt, { children: /* @__PURE__ */ H(
163
164
  "div",
164
165
  {
165
- ref: m,
166
+ ref: l,
166
167
  style: Z,
167
- className: lt(i, `${i}-${e}`, D),
168
+ className: mt(i, `${i}-${e}`, D),
168
169
  children: [
169
170
  !!r && /* @__PURE__ */ s("div", { style: tt, className: `${i}-overlay` }),
170
171
  /* @__PURE__ */ H(
@@ -202,5 +203,5 @@ const o = {
202
203
  }
203
204
  );
204
205
  export {
205
- ye as default
206
+ Ce as default
206
207
  };
package/marquee-/index.js CHANGED
@@ -46,7 +46,7 @@ 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
48
  import { resizeObserver as et } from "../components/common/utils/resizeObserver.js";
49
- import "uuid";
49
+ import "../utils/responsiveObserve.js";
50
50
  import "@unicom-cloud/utils/file/saveAs";
51
51
  import "@unicom-cloud/utils/screenfull";
52
52
  import "@unicom-cloud/utils/tinycolor";
@@ -55,6 +55,7 @@ import "@unicom-cloud/utils/constant/ui.js";
55
55
  import "react-is";
56
56
  import "@unicom-cloud/utils/tree";
57
57
  import { isPlainObject as q } from "@unicom-cloud/utils/is";
58
+ import "uuid";
58
59
  import "../dist/validate/src/index.js";
59
60
  import rt from "../config-provider/context.js";
60
61
  const ot = {
@@ -62,7 +63,7 @@ const ot = {
62
63
  direction: "left",
63
64
  pauseOnHover: !1,
64
65
  loop: 0
65
- }, me = (R) => {
66
+ }, pe = (R) => {
66
67
  const { getPrefixCls: L, componentConfig: D } = V(rt), s = L?.("marquee"), E = _(
67
68
  R,
68
69
  ot,
@@ -256,5 +257,5 @@ const ot = {
256
257
  );
257
258
  };
258
259
  export {
259
- me as default
260
+ pe as default
260
261
  };