@unicom-cloud/ui 0.8.106 → 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 (197) hide show
  1. package/App.js +7 -0
  2. package/BackTop.js +2 -4
  3. package/Calendar.js +2 -2
  4. package/ColorPicker.js +15 -14
  5. package/Constant.js +4 -0
  6. package/Copy.js +4 -3
  7. package/Countdown.js +25 -0
  8. package/Grid.js +8 -10
  9. package/LiquidFill.js +4 -3
  10. package/List.js +7 -6
  11. package/Marquee.js +4 -3
  12. package/Modal.js +4 -2
  13. package/PageHeader.js +3 -2
  14. package/QrCode.js +4 -3
  15. package/RowCol.js +8 -0
  16. package/Segmented.js +14 -4
  17. package/Statistic.js +5 -4
  18. package/Tour.js +4 -3
  19. package/Transfer.js +4 -2
  20. package/anchor/Link.js +1 -1
  21. package/app/App.js +26 -0
  22. package/app/context.js +9 -0
  23. package/app/index.js +9 -0
  24. package/app/interface.js +1 -0
  25. package/app/useApp.js +8 -0
  26. package/avatar/Group.js +1 -1
  27. package/back-top/index.js +44 -56
  28. package/button/index.js +52 -51
  29. package/calendar/Lunar.js +71 -0
  30. package/calendar/index.js +11 -11
  31. package/cascader/base/node.js +22 -20
  32. package/cascader/base/store.js +10 -10
  33. package/cascader/util.js +29 -27
  34. package/color-picker/Mode.js +8 -7
  35. package/color-picker/hooks/useColorPicker.js +56 -55
  36. package/color-picker/index.js +49 -48
  37. package/color-picker/utils.js +58 -57
  38. package/components/common/empty/index.js +2 -2
  39. package/components/common/flex/index.js +64 -55
  40. package/components/common/flex/interface.js +6 -6
  41. package/components/common/hooks/useInterval.js +6 -6
  42. package/components/common/icons/file/index.js +13 -11
  43. package/components/common/space/index.js +53 -53
  44. package/components/common/utils/dayjs.js +114 -126
  45. package/components/common/utils/is.js +98 -104
  46. package/components/common/utils/setDir.js +12 -0
  47. package/components/common/utils/setTheme.js +13 -13
  48. package/components/common/utils/toArray.js +7 -5
  49. package/config-provider/ConfigProvider.js +32 -30
  50. package/constant/index.js +4 -0
  51. package/copy/index.js +2 -1
  52. package/countdown/index.js +113 -0
  53. package/countdown/interface.js +1 -0
  54. package/countdown/util.js +29 -0
  55. package/descriptions/index.js +45 -45
  56. package/divider/index.js +28 -20
  57. package/dropdown/Button.js +1 -1
  58. package/empty/index.js +1 -1
  59. package/flex/index.js +30 -29
  60. package/form/FormItem.js +126 -122
  61. package/grid/Grid.js +56 -90
  62. package/grid/Item.js +44 -65
  63. package/grid/context.js +2 -6
  64. package/grid/index.js +6 -8
  65. package/grid/util.js +6 -44
  66. package/hooks/useResponsiveState.js +54 -0
  67. package/index.js +614 -605
  68. package/input/Button.js +12 -12
  69. package/input/Group.js +11 -12
  70. package/input/Input.js +112 -102
  71. package/input/InputElement.js +25 -24
  72. package/input/Search.js +24 -24
  73. package/layout/Sider.js +1 -1
  74. package/liquid-fill/index.js +4 -3
  75. package/list/Item.js +21 -21
  76. package/list/index.js +53 -52
  77. package/marquee/index.js +20 -19
  78. package/marquee-/index.js +4 -3
  79. package/mentions/util.js +9 -8
  80. package/modal/Confirm.js +17 -17
  81. package/modal/Modal.js +247 -237
  82. package/modal/index.js +4 -2
  83. package/modal/use-modal/index.js +2 -2
  84. package/package.json +1 -1
  85. package/page-header/index.js +57 -56
  86. package/pagination/Pagination.js +89 -92
  87. package/qr-code/index.js +4 -3
  88. package/radio/Group.js +1 -1
  89. package/row-col/Col-.js +88 -0
  90. package/row-col/Col.js +159 -0
  91. package/row-col/Row.js +73 -0
  92. package/row-col/context.js +5 -0
  93. package/row-col/index.js +11 -0
  94. package/row-col/interface.js +1 -0
  95. package/segmented/index.js +257 -206
  96. package/select/Select.js +191 -191
  97. package/select/util.js +50 -50
  98. package/select-view/Core.js +31 -28
  99. package/space/index.js +15 -13
  100. package/splitter/SplitBar.js +44 -46
  101. package/statistic/index.js +56 -55
  102. package/statistic/interface.js +4 -1
  103. package/style.css +1 -1
  104. package/table/Table.js +198 -210
  105. package/table/hook/useColumns.js +27 -26
  106. package/table/hook/useStickyClassNames.js +9 -8
  107. package/table/hook/useThResizable.js +4 -3
  108. package/table/th-resizable/index.js +2 -2
  109. package/table/thead/index.js +18 -16
  110. package/time-picker/util.js +20 -30
  111. package/timeline/Item.js +1 -1
  112. package/tour/index.js +4 -3
  113. package/transfer/index.js +93 -91
  114. package/trigger/index.js +66 -66
  115. package/types/common/development/interface.d.ts +3 -3
  116. package/types/common/flex/index.d.ts +3 -9
  117. package/types/common/flex/interface.d.ts +15 -4
  118. package/types/common/space/index.d.ts +3 -5
  119. package/types/common/space/interface.d.ts +2 -0
  120. package/types/common/utils/dayjs.d.ts +3 -1
  121. package/types/common/utils/is.d.ts +3 -4
  122. package/types/common/utils/setDir.d.ts +2 -0
  123. package/types/pc/app/App.d.ts +6 -0
  124. package/types/pc/app/context.d.ts +4 -0
  125. package/types/pc/app/index.d.ts +5 -0
  126. package/types/pc/app/interface.d.ts +17 -0
  127. package/types/pc/app/useApp.d.ts +3 -0
  128. package/types/pc/back-top/interface.d.ts +4 -17
  129. package/types/pc/button/interface.d.ts +2 -2
  130. package/types/pc/calendar/Lunar.d.ts +17 -0
  131. package/types/pc/calendar/index.d.ts +1 -1
  132. package/types/pc/config-provider/interface.d.ts +17 -12
  133. package/types/pc/constant/index.d.ts +1 -0
  134. package/types/pc/countdown/interface.d.ts +65 -0
  135. package/types/pc/countdown/util.d.ts +7 -0
  136. package/types/pc/divider/interface.d.ts +1 -0
  137. package/types/pc/flex/index.d.ts +8 -6
  138. package/types/pc/flex/interface.d.ts +3 -10
  139. package/types/pc/form/FormItem.d.ts +1 -1
  140. package/types/pc/form/interface.d.ts +1 -1
  141. package/types/pc/grid/Grid.d.ts +2 -4
  142. package/types/pc/grid/Item.d.ts +1 -5
  143. package/types/pc/grid/context.d.ts +4 -15
  144. package/types/pc/grid/index.d.ts +4 -6
  145. package/types/pc/grid/interface.d.ts +14 -142
  146. package/types/pc/grid/util.d.ts +1 -10
  147. package/types/pc/hooks/useResponsiveState.d.ts +3 -0
  148. package/types/pc/index.d.ts +10 -4
  149. package/types/pc/input/Button.d.ts +2 -2
  150. package/types/pc/list/interface.d.ts +2 -1
  151. package/types/pc/message/index.d.ts +1 -9
  152. package/types/pc/message/interface.d.ts +8 -0
  153. package/types/pc/message/useMessage.d.ts +1 -2
  154. package/types/pc/modal/Modal.d.ts +1 -0
  155. package/types/pc/modal/config.d.ts +1 -2
  156. package/types/pc/modal/index.d.ts +2 -1
  157. package/types/pc/modal/interface.d.ts +17 -5
  158. package/types/pc/notification/index.d.ts +2 -9
  159. package/types/pc/notification/interface.d.ts +7 -0
  160. package/types/pc/notification/useNotification.d.ts +1 -2
  161. package/types/pc/pagination/PageOption.d.ts +0 -1
  162. package/types/pc/pagination/interface.d.ts +5 -6
  163. package/types/pc/{grid → row-col}/Col-.d.ts +1 -1
  164. package/types/pc/{grid → row-col}/Col.d.ts +1 -2
  165. package/types/pc/{grid → row-col}/Row.d.ts +1 -2
  166. package/types/pc/row-col/context.d.ts +6 -0
  167. package/types/pc/row-col/index.d.ts +7 -0
  168. package/types/pc/row-col/interface.d.ts +112 -0
  169. package/types/pc/segmented/index.d.ts +3 -7
  170. package/types/pc/segmented/interface.d.ts +38 -5
  171. package/types/pc/select-view/Core.d.ts +1 -8
  172. package/types/pc/select-view/index.d.ts +1 -8
  173. package/types/pc/select-view/interface.d.ts +9 -2
  174. package/types/pc/space/index.d.ts +5 -7
  175. package/types/pc/space/interface.d.ts +3 -10
  176. package/types/pc/statistic/index.d.ts +1 -1
  177. package/types/pc/statistic/interface.d.ts +1 -49
  178. package/types/pc/utils/is.d.ts +1 -1
  179. package/types/pc/utils/names.d.ts +422 -111
  180. package/types/pc/utils/responsiveObserve.d.ts +8 -8
  181. package/typography/Ellipsis.js +5 -4
  182. package/typography/Operations.js +4 -3
  183. package/utils/dayjs.js +13 -11
  184. package/utils/index.js +245 -244
  185. package/utils/is.js +65 -66
  186. package/utils/names.js +309 -150
  187. package/utils/responsiveObserve.js +43 -36
  188. package/version/index.js +1 -1
  189. package/grid/Col-.js +0 -86
  190. package/grid/Col.js +0 -169
  191. package/grid/Row.js +0 -96
  192. package/grid/hook/useResponsiveState.js +0 -38
  193. package/statistic/Countdown.js +0 -56
  194. package/statistic/util.js +0 -33
  195. package/types/pc/grid/hook/useResponsiveState.d.ts +0 -2
  196. package/types/pc/statistic/util.d.ts +0 -1
  197. /package/types/pc/{statistic/Countdown.d.ts → countdown/index.d.ts} +0 -0
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
  };
package/mentions/util.js CHANGED
@@ -1,4 +1,5 @@
1
- function c(n, { split: e }) {
1
+ import i from "lodash/isArray";
2
+ function u(n, { split: e }) {
2
3
  return !e || n.indexOf(e) === -1;
3
4
  }
4
5
  function a({
@@ -7,12 +8,12 @@ function a({
7
8
  }) {
8
9
  return n.slice(0, e);
9
10
  }
10
- function s(n, e = "") {
11
- return (Array.isArray(e) ? e : [e]).reduce(
11
+ function f(n, e = "") {
12
+ return (i(e) ? e : [e]).reduce(
12
13
  (t, r) => {
13
- const i = n.lastIndexOf(r);
14
- return i > t.location ? {
15
- location: i,
14
+ const o = n.lastIndexOf(r);
15
+ return o > t.location ? {
16
+ location: o,
16
17
  prefix: r
17
18
  } : t;
18
19
  },
@@ -21,6 +22,6 @@ function s(n, e = "") {
21
22
  }
22
23
  export {
23
24
  a as getBeforeSelectionText,
24
- s as getLastMeasureIndex,
25
- c as isValidSearch
25
+ f as getLastMeasureIndex,
26
+ u as isValidSearch
26
27
  };
package/modal/Confirm.js CHANGED
@@ -1,5 +1,5 @@
1
- import { jsx as n, jsxs as x } from "react/jsx-runtime";
2
- import P from "@unicom-cloud/icons/IconUiCheckCircleFill";
1
+ import { jsx as r, jsxs as P } from "react/jsx-runtime";
2
+ import x from "@unicom-cloud/icons/IconUiCheckCircleFill";
3
3
  import y from "@unicom-cloud/icons/IconUiCloseCircleFill";
4
4
  import u from "@unicom-cloud/icons/IconUiExclamationCircleFill";
5
5
  import F from "@unicom-cloud/icons/IconUiInfoCircleFill";
@@ -8,42 +8,42 @@ import M from "../config-provider/ConfigProvider.js";
8
8
  import N from "./Modal.js";
9
9
  import { destroyList as f, getConfigProviderProps as O, getModalConfig as U } from "./config.js";
10
10
  function w(e) {
11
- const { prefixCls: r, simple: i } = U();
12
- return /* @__PURE__ */ n(N, { prefixCls: r, simple: i, ...e, children: e.content });
11
+ const { simple: n } = U();
12
+ return /* @__PURE__ */ r(N, { simple: n, ...e, children: e.content });
13
13
  }
14
14
  const p = (e) => {
15
- let r = e.icon;
16
- if (!r) {
17
- if (r !== null) {
18
- if (r = /* @__PURE__ */ n(u, {}), e.isNotice)
15
+ let n = e.icon;
16
+ if (!n) {
17
+ if (n !== null) {
18
+ if (n = /* @__PURE__ */ r(u, {}), e.isNotice)
19
19
  switch (e.noticeType) {
20
20
  case "info":
21
- r = /* @__PURE__ */ n(F, {});
21
+ n = /* @__PURE__ */ r(F, {});
22
22
  break;
23
23
  case "success":
24
- r = /* @__PURE__ */ n(P, {});
24
+ n = /* @__PURE__ */ r(x, {});
25
25
  break;
26
26
  case "warning":
27
- r = /* @__PURE__ */ n(u, {});
27
+ n = /* @__PURE__ */ r(u, {});
28
28
  break;
29
29
  case "error":
30
- r = /* @__PURE__ */ n(y, {});
30
+ n = /* @__PURE__ */ r(y, {});
31
31
  break;
32
32
  }
33
33
  }
34
34
  }
35
- return e.noticeType === "show" && (r = e.icon), e.isNotice && (e.hideCancel = !0), e.title = r === null && e.title === null ? null : /* @__PURE__ */ x("span", { children: [
36
- r,
35
+ return e.noticeType === "show" && (n = e.icon), e.isNotice && (e.hideCancel = !0), e.title = n === null && e.title === null ? null : /* @__PURE__ */ P("span", { children: [
36
+ n,
37
37
  e.title
38
38
  ] }), e;
39
39
  };
40
- function D(e, r) {
40
+ function D(e, n) {
41
41
  let i;
42
42
  const l = document.createElement("div");
43
43
  l.className = "pqb-modal-root", document.body.appendChild(l);
44
44
  const C = O();
45
45
  function h(t) {
46
- const c = /* @__PURE__ */ n(M, { ...C, childrenName: "ModalConfirm", children: /* @__PURE__ */ n(
46
+ const c = /* @__PURE__ */ r(M, { ...C, childrenName: "ModalConfirm", children: /* @__PURE__ */ r(
47
47
  w,
48
48
  {
49
49
  getPopupContainer: () => l,
@@ -53,7 +53,7 @@ function D(e, r) {
53
53
  ) });
54
54
  i ||= I(l), i.render(c);
55
55
  }
56
- const s = r || h;
56
+ const s = n || h;
57
57
  let o = {
58
58
  ...e,
59
59
  visible: !1