@unicom-cloud/ui 0.8.51 → 0.8.53

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 (130) hide show
  1. package/Affix.js +41 -40
  2. package/Alert.js +2 -2
  3. package/Anchor.js +1 -1
  4. package/AutoComplete.js +3 -3
  5. package/Avatar.js +1 -1
  6. package/BackTop.js +2 -2
  7. package/Badge.js +2 -2
  8. package/Breadcrumb.js +2 -2
  9. package/Button.js +1 -1
  10. package/Calendar.js +3 -3
  11. package/Card.js +1 -1
  12. package/Carousel.js +1 -1
  13. package/Cascader.js +1 -1
  14. package/Checkbox.js +1 -1
  15. package/Collapse.js +1 -1
  16. package/ColorPicker.js +3 -3
  17. package/Comment.js +1 -1
  18. package/ConfigProvider.js +2 -2
  19. package/Copy.js +1 -1
  20. package/DatePicker.js +1268 -1233
  21. package/Descriptions.js +1 -1
  22. package/Divider.js +1 -1
  23. package/Draggable.js +1 -1
  24. package/Drawer.js +1 -1
  25. package/Dropdown.js +1 -1
  26. package/Empty.js +1 -1
  27. package/Form.js +122 -117
  28. package/Grid.js +86 -83
  29. package/Icon.js +1 -1
  30. package/IconHover.js +1 -1
  31. package/Image.js +1 -1
  32. package/Input.js +1 -1
  33. package/InputNumber.js +2 -2
  34. package/InputTag.js +1 -1
  35. package/Layout.js +2 -2
  36. package/Link.js +1 -1
  37. package/List.js +3 -3
  38. package/Mentions.js +3 -3
  39. package/Menu.js +1 -1
  40. package/Message.js +2 -2
  41. package/Modal.js +1 -1
  42. package/Notice.js +1 -1
  43. package/Notification.js +2 -2
  44. package/OverflowEllipsis.js +1 -1
  45. package/PageHeader.js +1 -1
  46. package/Pagination.js +1 -1
  47. package/Picker.js +1 -1
  48. package/Popconfirm.js +1 -1
  49. package/Popover.js +1 -1
  50. package/Progress.js +1 -1
  51. package/Radio.js +2 -2
  52. package/Rate.js +1 -1
  53. package/ResizeBox.js +33 -32
  54. package/Result.js +1 -1
  55. package/Select.js +1 -1
  56. package/SelectView.js +142 -141
  57. package/Skeleton.js +1 -1
  58. package/Slider.js +2 -2
  59. package/Space.js +1 -1
  60. package/Spin.js +1 -1
  61. package/Statistic.js +1 -1
  62. package/Steps.js +1 -1
  63. package/Switch.js +15 -14
  64. package/Table.js +946 -934
  65. package/Tabs.js +1 -1
  66. package/Tag.js +111 -82
  67. package/TimePicker.js +3 -3
  68. package/Timeline.js +1 -1
  69. package/Tooltip.js +1 -1
  70. package/Transfer.js +3 -3
  71. package/Tree.js +1 -1
  72. package/TreeSelect.js +1 -1
  73. package/Trigger.js +31 -30
  74. package/Typography.js +25 -25
  75. package/Upload.js +1 -1
  76. package/VerificationCode.js +1 -1
  77. package/Version.js +1 -1
  78. package/Watermark.js +1 -1
  79. package/chunk/{CoevJNNj.js → -sV-N67P.js} +1 -1
  80. package/chunk/{CkIWpIl6.js → 8hWViek4.js} +1 -1
  81. package/chunk/{Ct7mcZuW.js → B8IzaBdN.js} +1 -1
  82. package/chunk/{DCe3olyi.js → BEVtQ2QL.js} +101 -99
  83. package/chunk/{tkU8zIK4.js → BEiJmFHq.js} +1 -1
  84. package/chunk/{CQvJK4kb.js → BOUZ7hSf.js} +12 -12
  85. package/chunk/{DMeJAY1S.js → BYMRs7t5.js} +6 -5
  86. package/chunk/{DWGwYNvC.js → CBaVCRtG.js} +2 -2
  87. package/chunk/{5PpvDpEt.js → CLU6Le34.js} +2 -2
  88. package/chunk/{dhljdm11.js → COWsswcW.js} +64 -63
  89. package/chunk/{B9nYZhXo.js → CRxPui7e.js} +2 -2
  90. package/chunk/CYyPBcnp.js +970 -0
  91. package/chunk/{DfvdYCUz.js → CccPQyYX.js} +1 -1
  92. package/chunk/{DUX5Hw8l.js → CmEyvBdT.js} +3 -3
  93. package/chunk/{Cku5-xbe.js → Cwp65v9h.js} +47 -46
  94. package/chunk/{I0bfWb5y.js → CyVLxv_U.js} +95 -93
  95. package/chunk/{Cw63stMm.js → Cz65nXZD.js} +18 -18
  96. package/chunk/D3pUE3-b.js +445 -0
  97. package/chunk/{9AJ-uN8F.js → D6BMh1k4.js} +1 -1
  98. package/chunk/{BHWpeAbb.js → DGK45cuc.js} +1 -1
  99. package/chunk/{CfqAfcA3.js → DNyP-r9G.js} +2 -2
  100. package/chunk/DQ3uFRJD.js +892 -0
  101. package/chunk/{4XXtB4ZV.js → DY9WA4bf.js} +1 -1
  102. package/chunk/{DG5zSZDd.js → DdVbiC4t.js} +2 -2
  103. package/chunk/{n58kSv9T.js → DfMf16uZ.js} +11 -5
  104. package/chunk/{z7sBNzI4.js → Lyg-9NEt.js} +17 -17
  105. package/chunk/{BXZYc88i.js → PRN8SqRA.js} +3 -3
  106. package/chunk/bcn23eHi.js +277 -0
  107. package/index.js +408 -346
  108. package/package.json +1 -23
  109. package/style.css +1 -1
  110. package/types/color-picker/colors.d.ts +1 -1
  111. package/types/date-picker/Picker.d.ts +4 -3
  112. package/types/date-picker/PickerRange.d.ts +3 -7
  113. package/types/date-picker/interface.d.ts +9 -1
  114. package/types/grid/index.d.ts +2 -1
  115. package/types/index.d.ts +1 -0
  116. package/types/pagination/interface.d.ts +1 -0
  117. package/types/picker/InputRange.d.ts +1 -1
  118. package/types/select/Select.d.ts +1 -1
  119. package/types/tag/interface.d.ts +7 -3
  120. package/types/utils/CSSTransition.d.ts +2 -1
  121. package/types/utils/is.d.ts +4 -17
  122. package/types/version/index.d.ts +1 -1
  123. package/utils/CSSTransition.js +1 -1
  124. package/utils/contextHolder.js +1 -1
  125. package/utils/is.js +102 -104
  126. package/utils/reactDOM.js +19 -19
  127. package/chunk/C61BEbHK.js +0 -263
  128. package/chunk/DXMtLuTP.js +0 -443
  129. package/chunk/m3_n9fBe.js +0 -961
  130. package/chunk/uUGMUxt_.js +0 -474
@@ -1,25 +1,26 @@
1
1
  import { jsx as i, jsxs as R, Fragment as Be } from "react/jsx-runtime";
2
- import { P as Ie, j as Ge } from "./uUGMUxt_.js";
2
+ import { P as Ie, b as Ge } from "./DQ3uFRJD.js";
3
3
  import $e from "lodash/isArray";
4
4
  import Ve, { useContext as Ke, useRef as C, useState as Xe, useImperativeHandle as qe, useMemo as Ye, useEffect as Je } from "react";
5
- import { a as Qe, I as Ze } from "./z7sBNzI4.js";
6
- import ye from "../hooks/useMergeValue.js";
7
- import { I as et } from "./Cku5-xbe.js";
5
+ import { a as Qe, I as Ze } from "./Lyg-9NEt.js";
6
+ import be from "../hooks/useMergeValue.js";
7
+ import { I as et } from "./Cwp65v9h.js";
8
8
  import tt from "../Tag.js";
9
9
  import S from "@unicom-cloud/utils/class-name";
10
10
  import at from "../utils/getHotkeyHandler.js";
11
11
  import { Backspace as ot } from "../utils/keyCode.js";
12
12
  import rt from "../Draggable.js";
13
- import st from "../hooks/useMergeProps.js";
14
- import nt from "../utils/fillNBSP.js";
13
+ import nt from "../hooks/useMergeProps.js";
14
+ import st from "../utils/fillNBSP.js";
15
15
  import lt from "../utils/omit.js";
16
16
  import ct from "@unicom-cloud/icons/IconUiClose";
17
17
  import it from "../Popover.js";
18
18
  import ut from "../OverflowEllipsis.js";
19
- import { isObject as _e } from "../utils/is.js";
20
- const be = "__arco_value_tag_placeholder", Y = 300, pt = "responsive", ft = `__input_${Math.random().toFixed(10).slice(2)}`, T = (n) => n == null, E = (n) => {
21
- n.target.tagName !== "INPUT" && n.preventDefault();
22
- }, Te = (n) => $e(n) ? n.map((l) => _e(l) ? {
19
+ import "../utils/is.js";
20
+ import { isPlainObject as _e } from "@unicom-cloud/utils/is";
21
+ const ye = "__arco_value_tag_placeholder", Y = 300, pt = "responsive", ft = `__input_${Math.random().toFixed(10).slice(2)}`, T = (s) => s == null, E = (s) => {
22
+ s.target.tagName !== "INPUT" && s.preventDefault();
23
+ }, Te = (s) => $e(s) ? s.map((l) => _e(l) ? {
23
24
  ...l,
24
25
  label: "label" in l ? l.label : l.value,
25
26
  value: l.value,
@@ -27,27 +28,27 @@ const be = "__arco_value_tag_placeholder", Y = 300, pt = "responsive", ft = `__i
27
28
  } : {
28
29
  label: l,
29
30
  value: l
30
- }) : [], dt = (n) => {
31
- const l = C(0), d = C(n.length);
31
+ }) : [], dt = (s) => {
32
+ const l = C(0), d = C(s.length);
32
33
  return Je(() => {
33
- l.current = n.length === 0 && d.current > 0 ? Y : 0, d.current = n.length;
34
- }, [n]), l;
34
+ l.current = s.length === 0 && d.current > 0 ? Y : 0, d.current = s.length;
35
+ }, [s]), l;
35
36
  }, Ce = ({
36
- prefixCls: n,
37
+ prefixCls: s,
37
38
  children: l,
38
39
  animation: d
39
- }) => /* @__PURE__ */ i("div", { className: `${n}-inner`, children: d ? /* @__PURE__ */ i(Ge, { component: null, children: l }) : l }), mt = {
40
+ }) => /* @__PURE__ */ i("div", { className: `${s}-inner`, children: d ? /* @__PURE__ */ i(Ge, { component: null, children: l }) : l }), mt = {
40
41
  animation: !0,
41
- validate: (n, l) => n && l.every((d) => d.value !== n)
42
+ validate: (s, l) => s && l.every((d) => d.value !== s)
42
43
  };
43
- function gt(n, l) {
44
+ function gt(s, l) {
44
45
  const {
45
46
  getPrefixCls: d,
46
47
  size: Pe,
47
48
  componentConfig: M,
48
49
  rtl: J
49
- } = Ke(Qe), p = st(
50
- n,
50
+ } = Ke(Qe), p = nt(
51
+ s,
51
52
  mt,
52
53
  M == null ? void 0 : M.InputTag
53
54
  ), {
@@ -76,20 +77,20 @@ function gt(n, l) {
76
77
  onInputChange: O,
77
78
  onKeyDown: z,
78
79
  onPaste: L,
79
- onChange: j,
80
- onFocus: F,
81
- onBlur: H,
80
+ onChange: F,
81
+ onFocus: H,
82
+ onBlur: j,
82
83
  onPressEnter: U,
83
84
  onRemove: W,
84
85
  onClear: B,
85
86
  onClick: re,
86
87
  ...Oe
87
- } = p, a = d("input-tag"), V = "size" in p ? p.size : Pe, _ = typeof m == "object" ? m.count : m, I = C(), G = C(null), K = C(), [P, se] = Xe(!1), [r, ze] = ye([], {
88
+ } = p, a = d("input-tag"), V = "size" in p ? p.size : Pe, _ = typeof m == "object" ? m.count : m, I = C(), G = C(null), K = C(), [P, ne] = Xe(!1), [r, ze] = be([], {
88
89
  defaultValue: "defaultValue" in p ? Te(p.defaultValue) : void 0,
89
90
  value: "value" in p ? Te(p.value) : void 0
90
- }), [y, w] = ye("", {
91
+ }), [b, w] = be("", {
91
92
  value: p.inputValue
92
- }), Le = dt(r), je = !!(ke && !g && !v);
93
+ }), Le = dt(r), Fe = !!(ke && !g && !v);
93
94
  qe(l, () => {
94
95
  var e, t;
95
96
  return {
@@ -98,23 +99,23 @@ function gt(n, l) {
98
99
  getRootDOMNode: () => K.current
99
100
  };
100
101
  }, []);
101
- const b = (e, t) => {
102
- v || g || ("value" in p || ze(e), j == null || j(Ee ? e : e.map((s) => s.value), t));
103
- }, ne = (e, t, s) => {
104
- W == null || W(e, t, s), b(
102
+ const y = (e, t) => {
103
+ v || g || ("value" in p || ze(e), F == null || F(Ee ? e : e.map((n) => n.value), t));
104
+ }, se = (e, t, n) => {
105
+ W == null || W(e, t, n), y(
105
106
  [...r.slice(0, t), ...r.slice(t + 1)],
106
107
  "remove"
107
108
  );
108
- }, Fe = at(
109
+ }, He = at(
109
110
  /* @__PURE__ */ new Map([
110
111
  [
111
112
  ot.key,
112
113
  (e) => {
113
114
  if (!e.target.value && r.length)
114
115
  for (let t = r.length - 1; t >= 0; t--) {
115
- const s = r[t];
116
- if (s.closable !== !1) {
117
- ne(s, t, e);
116
+ const n = r[t];
117
+ if (n.closable !== !1) {
118
+ se(n, t, e);
118
119
  return;
119
120
  }
120
121
  }
@@ -123,25 +124,25 @@ function gt(n, l) {
123
124
  ])
124
125
  ), le = async () => {
125
126
  try {
126
- const e = typeof $ == "function" ? await $(y, r) : !0;
127
- e && (b(
127
+ const e = typeof $ == "function" ? await $(b, r) : !0;
128
+ e && (y(
128
129
  r.concat({
129
- value: e === !0 ? y : e,
130
- label: y
130
+ value: e === !0 ? b : e,
131
+ label: b
131
132
  }),
132
133
  "add"
133
134
  ), w(""));
134
135
  } catch (e) {
135
136
  console.error(e);
136
137
  }
137
- }, ce = (e, t, s = !1) => {
138
+ }, ce = (e, t, n = !1) => {
138
139
  let { value: o, label: c } = e, f = !g && !v && e.closable !== !1, u = typeof o == "object" ? t : o;
139
140
  const h = (We) => {
140
- ne(e, t, We);
141
+ se(e, t, We);
141
142
  };
142
- if (!s && typeof _ == "number" && t >= _)
143
+ if (!n && typeof _ == "number" && t >= _)
143
144
  if (t === r.length - 1) {
144
- if (c = ie(r.length - Number(_)), o = be, f = !1, u = be, !k)
145
+ if (c = ie(r.length - Number(_)), o = ye, f = !1, u = ye, !k)
145
146
  return { valueKey: u, dom: c };
146
147
  } else
147
148
  return { valueKey: u, dom: null };
@@ -163,7 +164,7 @@ function gt(n, l) {
163
164
  closable: f,
164
165
  onClose: h,
165
166
  visible: !0,
166
- children: nt(c),
167
+ children: st(c),
167
168
  closeIcon: N == null ? void 0 : N.removeIcon,
168
169
  __closeIconProps: {
169
170
  onMouseDown: E
@@ -185,10 +186,10 @@ function gt(n, l) {
185
186
  {
186
187
  ..._e(m) ? m.popoverProps : {},
187
188
  children: t(e, r),
188
- content: /* @__PURE__ */ i(Be, { children: r.map((s, o) => ({ tagValue: s, tagIndex: o })).slice(-e).map(
189
- ({ tagValue: s, tagIndex: o }) => {
189
+ content: /* @__PURE__ */ i(Be, { children: r.map((n, o) => ({ tagValue: n, tagIndex: o })).slice(-e).map(
190
+ ({ tagValue: n, tagIndex: o }) => {
190
191
  var c;
191
- return (c = ce(s, o, !0)) == null ? void 0 : c.dom;
192
+ return (c = ce(n, o, !0)) == null ? void 0 : c.dom;
192
193
  }
193
194
  ) })
194
195
  }
@@ -201,16 +202,16 @@ function gt(n, l) {
201
202
  );
202
203
  if (t.length > 1) {
203
204
  G.current = Date.now();
204
- const s = [];
205
+ const n = [];
205
206
  await Promise.all(
206
207
  t.map(async (o) => {
207
208
  const c = o ? typeof $ == "function" ? await $(o, r) : !0 : !1;
208
- c && s.push({
209
+ c && n.push({
209
210
  value: c === !0 ? o : c,
210
211
  label: o
211
212
  });
212
213
  })
213
- ), s.length && b(r.concat(s), "add");
214
+ ), n.length && y(r.concat(n), "add");
214
215
  }
215
216
  }
216
217
  }, pe = Re && !v && !g && r.length ? /* @__PURE__ */ i(
@@ -220,17 +221,17 @@ function gt(n, l) {
220
221
  className: `${a}-clear-icon`,
221
222
  onClick: (e) => {
222
223
  var t;
223
- e.stopPropagation(), b([], "clear"), P || (t = I.current) == null || t.focus(), B == null || B();
224
+ e.stopPropagation(), y([], "clear"), P || (t = I.current) == null || t.focus(), B == null || B();
224
225
  },
225
226
  children: N && N.clearIcon || /* @__PURE__ */ i(ct, {})
226
227
  },
227
228
  "clearIcon"
228
229
  ) : null, fe = v || Me, X = Ye(() => {
229
230
  const e = {};
230
- return r.map((s, o) => {
231
- const c = e[s.value] || 0, f = c >= 1;
232
- e[s.value] = c + 1;
233
- const { dom: u, valueKey: h } = ce(s, o);
231
+ return r.map((n, o) => {
232
+ const c = e[n.value] || 0, f = c >= 1;
233
+ e[n.value] = c + 1;
234
+ const { dom: u, valueKey: h } = ce(n, o);
234
235
  return Ve.isValidElement(u) ? /* @__PURE__ */ i(
235
236
  Ie,
236
237
  {
@@ -263,20 +264,20 @@ function gt(n, l) {
263
264
  pure: !0
264
265
  },
265
266
  onPressEnter: async (e) => {
266
- y && e.preventDefault(), U == null || U(e), await le();
267
+ b && e.preventDefault(), U == null || U(e), await le();
267
268
  },
268
269
  onFocus: (e) => {
269
- !fe && !g && (se(!0), F == null || F(e));
270
+ !fe && !g && (ne(!0), H == null || H(e));
270
271
  },
271
272
  onBlur: async (e) => {
272
- se(!1), H == null || H(e), xe && await le(), w("");
273
+ ne(!1), j == null || j(e), xe && await le(), w("");
273
274
  },
274
- value: y,
275
+ value: b,
275
276
  onChange: (e, t) => {
276
277
  O == null || O(e, t), t.nativeEvent.inputType !== "insertFromPaste" && ue(e), G.current ? w("") : w(e);
277
278
  },
278
279
  onKeyDown: (e) => {
279
- Fe(e), z == null || z(e);
280
+ He(e), z == null || z(e);
280
281
  },
281
282
  onPaste: (e) => {
282
283
  L == null || L(e), ue(e.clipboardData.getData("text"));
@@ -286,7 +287,7 @@ function gt(n, l) {
286
287
  },
287
288
  ft
288
289
  )
289
- ], He = !T(Z), de = !T(ee) || !T(pe), me = !T(te), ge = !T(ae), A = me || ge, he = p.status, ve = S(a, {
290
+ ], je = !T(Z), de = !T(ee) || !T(pe), me = !T(te), ge = !T(ae), A = me || ge, he = p.status, ve = S(a, {
290
291
  [`${a}-size-${V}`]: V,
291
292
  [`${a}-disabled`]: v,
292
293
  [`${a}-${he}`]: he,
@@ -310,8 +311,8 @@ function gt(n, l) {
310
311
  },
311
312
  ref: A ? void 0 : K,
312
313
  children: /* @__PURE__ */ R("div", { className: `${a}-view`, children: [
313
- He && /* @__PURE__ */ i("div", { className: `${a}-prefix`, onMouseDown: E, children: Z }),
314
- je ? /* @__PURE__ */ i(
314
+ je && /* @__PURE__ */ i("div", { className: `${a}-prefix`, onMouseDown: E, children: Z }),
315
+ Fe ? /* @__PURE__ */ i(
315
316
  Ce,
316
317
  {
317
318
  prefixCls: a,
@@ -322,7 +323,7 @@ function gt(n, l) {
322
323
  itemWrapperStyle: { display: "inline-block" },
323
324
  direction: "horizontal",
324
325
  onIndexChange: (e, t) => {
325
- b(function(o, c, f) {
326
+ y(function(o, c, f) {
326
327
  o = o.slice();
327
328
  const u = c > f, [h] = o.splice(c, 1);
328
329
  return o.splice(u ? f : f - 1, 0, h), o;
@@ -1,8 +1,8 @@
1
1
  import { jsx as N, jsxs as b } from "react/jsx-runtime";
2
2
  import { forwardRef as w, useContext as R, useRef as F, Fragment as j, createElement as z } from "react";
3
- import { a as D } from "./z7sBNzI4.js";
3
+ import { a as D } from "./Lyg-9NEt.js";
4
4
  import E from "../hooks/useMergeProps.js";
5
- import { I as K } from "./Cku5-xbe.js";
5
+ import { I as K } from "./Cwp65v9h.js";
6
6
  import u from "@unicom-cloud/utils/class-name";
7
7
  import L from "../hooks/use-verification-code.js";
8
8
  const M = {