@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
package/ResizeBox.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { jsx as m, jsxs as ft } from "react/jsx-runtime";
2
2
  import vt from "lodash/isNumber";
3
3
  import Bt, { useContext as ut, useRef as F, useEffect as lt, forwardRef as Ct, useState as st, useImperativeHandle as Nt } from "react";
4
- import { a as mt } from "./chunk/z7sBNzI4.js";
4
+ import { a as mt } from "./chunk/Lyg-9NEt.js";
5
5
  import Yt from "./hooks/useMergeProps.js";
6
6
  import Tt from "./hooks/useMergeValue.js";
7
- import P from "@unicom-cloud/utils/class-name";
7
+ import S from "@unicom-cloud/utils/class-name";
8
8
  import { on as $, off as y } from "./utils/dom.js";
9
9
  import zt from "./utils/omit.js";
10
10
  import Ft from "@unicom-cloud/icons/IconUiCaretDown";
@@ -14,11 +14,12 @@ import kt from "@unicom-cloud/icons/IconUiCaretUp";
14
14
  import Ut from "@unicom-cloud/icons/IconUiDragDot";
15
15
  import Vt from "@unicom-cloud/icons/IconUiDragDotVertical";
16
16
  import wt from "lodash/isFunction";
17
- import { isObject as St } from "./utils/is.js";
17
+ import "./utils/is.js";
18
+ import { isPlainObject as Pt } from "@unicom-cloud/utils/is";
18
19
  import _t from "./hooks/useIsomorphicLayoutEffect.js";
19
20
  import ct from "lodash/isPlainObject";
20
21
  import Lt from "lodash/isString";
21
- import Pt from "lodash/isUndefined";
22
+ import St from "lodash/isUndefined";
22
23
  function Mt(r) {
23
24
  const {
24
25
  className: ot,
@@ -31,33 +32,33 @@ function Mt(r) {
31
32
  resizable: X = !0,
32
33
  renderChildren: b,
33
34
  ...Q
34
- } = r, { getPrefixCls: rt, rtl: z } = ut(mt), d = rt("resizebox-trigger"), D = g === "horizontal", M = z && !D, T = P(
35
+ } = r, { getPrefixCls: rt, rtl: z } = ut(mt), d = rt("resizebox-trigger"), D = g === "horizontal", M = z && !D, T = S(
35
36
  d,
36
37
  `${d}-${D ? "horizontal" : "vertical"}`,
37
38
  { [`${d}-not-resizable`]: !X },
38
39
  { [`${d}-rtl`]: z },
39
40
  ot
40
- ), l = F(), k = M ? [/* @__PURE__ */ m(It, {}, "prev"), /* @__PURE__ */ m(bt, {}, "next")] : [/* @__PURE__ */ m(bt, {}, "prev"), /* @__PURE__ */ m(It, {}, "next")], I = St(N.prev) ? {
41
+ ), l = F(), k = M ? [/* @__PURE__ */ m(It, {}, "prev"), /* @__PURE__ */ m(bt, {}, "next")] : [/* @__PURE__ */ m(bt, {}, "prev"), /* @__PURE__ */ m(It, {}, "next")], I = Pt(N.prev) ? {
41
42
  ...N.prev,
42
43
  icon: N.prev.icon || (D ? /* @__PURE__ */ m(kt, {}) : k[0])
43
- } : {}, E = St(N.next) ? {
44
+ } : {}, E = Pt(N.next) ? {
44
45
  ...N.next,
45
46
  icon: N.next.icon || (D ? /* @__PURE__ */ m(Ft, {}) : k[1])
46
47
  } : {}, U = () => I.icon && !I.collapsed || E.collapsed ? /* @__PURE__ */ m(
47
48
  "span",
48
49
  {
49
- className: P(`${d}-icon`, P(`${d}-prev`)),
50
+ className: S(`${d}-icon`, S(`${d}-prev`)),
50
51
  onClick: I.onClick,
51
52
  children: I.icon
52
53
  }
53
- ) : /* @__PURE__ */ m("span", { className: P(`${d}-icon-empty`) }), tt = () => E.icon && !E.collapsed || I.collapsed ? /* @__PURE__ */ m(
54
+ ) : /* @__PURE__ */ m("span", { className: S(`${d}-icon-empty`) }), tt = () => E.icon && !E.collapsed || I.collapsed ? /* @__PURE__ */ m(
54
55
  "span",
55
56
  {
56
- className: P(`${d}-icon`, P(`${d}-next`)),
57
+ className: S(`${d}-icon`, S(`${d}-next`)),
57
58
  onClick: E.onClick,
58
59
  children: E.icon
59
60
  }
60
- ) : /* @__PURE__ */ m("span", { className: P(`${d}-icon-empty`) }), w = () => X ? /* @__PURE__ */ m("span", { className: `${d}-icon`, children: q || (D ? /* @__PURE__ */ m(Ut, {}) : /* @__PURE__ */ m(Vt, {})) }) : /* @__PURE__ */ m("span", { className: P(`${d}-icon-empty`) }), O = U(), f = w(), h = tt(), V = () => /* @__PURE__ */ ft("div", { className: `${d}-icon-wrapper`, children: [
61
+ ) : /* @__PURE__ */ m("span", { className: S(`${d}-icon-empty`) }), w = () => X ? /* @__PURE__ */ m("span", { className: `${d}-icon`, children: q || (D ? /* @__PURE__ */ m(Ut, {}) : /* @__PURE__ */ m(Vt, {})) }) : /* @__PURE__ */ m("span", { className: S(`${d}-icon-empty`) }), O = U(), f = w(), h = tt(), V = () => /* @__PURE__ */ ft("div", { className: `${d}-icon-wrapper`, children: [
61
62
  O,
62
63
  f,
63
64
  h
@@ -93,7 +94,7 @@ function Gt(r, ot) {
93
94
  panes: Q,
94
95
  disabled: rt,
95
96
  trigger: z
96
- } = r, { getPrefixCls: d, rtl: D } = ut(mt), M = d("resizebox-split"), T = x.includes(dt), l = x.includes("reverse"), k = T && D, I = !T, E = P(
97
+ } = r, { getPrefixCls: d, rtl: D } = ut(mt), M = d("resizebox-split"), T = x.includes(dt), l = x.includes("reverse"), k = T && D, I = !T, E = S(
97
98
  M,
98
99
  `${M}-${T ? dt : Dt}`,
99
100
  { [`${M}-rtl`]: D },
@@ -164,7 +165,7 @@ function Gt(r, ot) {
164
165
  const v = J, p = /* @__PURE__ */ m(
165
166
  "div",
166
167
  {
167
- className: P(`${M}-pane`, "first-pane"),
168
+ className: S(`${M}-pane`, "first-pane"),
168
169
  style: { flexBasis: c() },
169
170
  ref: (t) => {
170
171
  _.current[0] = t;
@@ -174,15 +175,15 @@ function Gt(r, ot) {
174
175
  ), R = /* @__PURE__ */ m(
175
176
  "div",
176
177
  {
177
- className: P(`${M}-pane`, "second-pane"),
178
+ className: S(`${M}-pane`, "second-pane"),
178
179
  ref: (t) => {
179
180
  _.current[1] = t;
180
181
  },
181
182
  children: tt
182
183
  }
183
- ), S = l ? [R, p] : [p, R];
184
+ ), P = l ? [R, p] : [p, R];
184
185
  return /* @__PURE__ */ ft(v, { style: g, className: E, ref: H, children: [
185
- S[0],
186
+ P[0],
186
187
  !rt && /* @__PURE__ */ m(
187
188
  Mt,
188
189
  {
@@ -194,7 +195,7 @@ function Gt(r, ot) {
194
195
  children: z
195
196
  }
196
197
  ),
197
- S[1]
198
+ P[1]
198
199
  ] });
199
200
  }
200
201
  const Ht = Ct(Gt);
@@ -221,7 +222,7 @@ function jt(r, ot) {
221
222
  new Array(g.length).fill(0)
222
223
  ), [w, O] = st(
223
224
  new Array(Math.max(g.length - 1, 0)).fill({ prev: !1, next: !1 })
224
- ), f = b("resizebox-split-group"), h = K === ht, V = h && Q, i = !h, H = P(
225
+ ), f = b("resizebox-split-group"), h = K === ht, V = h && Q, i = !h, H = S(
225
226
  f,
226
227
  `${f}-${h ? ht : Et}`,
227
228
  { [`${f}-moving`]: I },
@@ -231,10 +232,10 @@ function jt(r, ot) {
231
232
  let t = [];
232
233
  g.forEach((s) => {
233
234
  const { size: a } = s;
234
- Pt(a) ? t.push(void 0) : t.push(G(a));
235
+ St(a) ? t.push(void 0) : t.push(G(a));
235
236
  });
236
237
  const e = t.filter((s) => !s), o = (1 - t.reduce((s, a) => (s || 0) + (a || 0), 0)) / e.length;
237
- return t = t.map((s) => Pt(s) ? o : s), t;
238
+ return t = t.map((s) => St(s) ? o : s), t;
238
239
  }, W = (t) => {
239
240
  const e = U[t - 1] || 0, n = U[t];
240
241
  return `calc(${l[t] * 100}% - ${(e + n) / 2}px)`;
@@ -305,7 +306,7 @@ function jt(r, ot) {
305
306
  const t = M.current;
306
307
  d.current[t].moving = !1, E(!1), y(window, "mousemove", p), y(window, "touchmove", p), y(window, "mouseup", R), y(window, "touchend", R), y(window, "contextmenu", R), document.body.style.cursor = "default", (e = r.onMovingEnd) == null || e.call(r, t);
307
308
  }
308
- function S(t, e, n, o) {
309
+ function P(t, e, n, o) {
309
310
  var $t, yt;
310
311
  const s = e + 1, a = [...l], u = l[e], et = l[s], A = u + et, nt = h ? z.current.offsetWidth : z.current.offsetHeight, { currentMin: B, nextMin: C } = j(e);
311
312
  let Y = T.current[e], at = T.current[s], gt = w[e][n];
@@ -365,12 +366,12 @@ function jt(r, ot) {
365
366
  onMouseDown: (C) => v(C, e),
366
367
  collapsible: {
367
368
  prev: et ? {
368
- onClick: (C) => S(C, e, "prev", nt.onClick),
369
+ onClick: (C) => P(C, e, "prev", nt.onClick),
369
370
  icon: nt.icon,
370
371
  collapsed: w[e].prev
371
372
  } : void 0,
372
373
  next: A ? {
373
- onClick: (C) => S(C, e, "next", B.onClick),
374
+ onClick: (C) => P(C, e, "next", B.onClick),
374
375
  icon: B.icon,
375
376
  collapsed: w[e].next
376
377
  } : void 0
@@ -422,7 +423,7 @@ function Kt(r, ot) {
422
423
  width: d,
423
424
  height: D,
424
425
  ...M
425
- } = x, T = J ? b.map((c) => Jt(c)) : b, l = g("resizebox"), k = P(l, { [`${l}-rtl`]: J }, N), [I, E] = st({}), [U, tt] = Tt(void 0, { value: d }), [w, O] = Tt(void 0, { value: D }), f = F({
426
+ } = x, T = J ? b.map((c) => Jt(c)) : b, l = g("resizebox"), k = S(l, { [`${l}-rtl`]: J }, N), [I, E] = st({}), [U, tt] = Tt(void 0, { value: d }), [w, O] = Tt(void 0, { value: D }), f = F({
426
427
  startX: 0,
427
428
  startY: 0,
428
429
  startWidth: 0,
@@ -457,10 +458,10 @@ function Kt(r, ot) {
457
458
  function _(c, v) {
458
459
  var e, n, o;
459
460
  (e = x.onMovingStart) == null || e.call(x), f.current.moving = !0, f.current.startX = v.pageX, f.current.startY = v.pageY, f.current.direction = c;
460
- const { top: p, left: R, right: S, bottom: t } = f.current.padding;
461
+ const { top: p, left: R, right: P, bottom: t } = f.current.padding;
461
462
  f.current.startWidth = i(
462
463
  (n = h.current) == null ? void 0 : n.clientWidth,
463
- R + S
464
+ R + P
464
465
  ), f.current.startHeight = i(
465
466
  (o = h.current) == null ? void 0 : o.clientHeight,
466
467
  p + t
@@ -471,8 +472,8 @@ function Kt(r, ot) {
471
472
  function L(c) {
472
473
  var s;
473
474
  if (!f.current.moving) return !1;
474
- const { startX: v, startY: p, startWidth: R, startHeight: S } = f.current;
475
- let t = R, e = S;
475
+ const { startX: v, startY: p, startWidth: R, startHeight: P } = f.current;
476
+ let t = R, e = P;
476
477
  const n = c.pageX - v, o = c.pageY - p;
477
478
  switch (f.current.direction) {
478
479
  case Xt:
@@ -482,10 +483,10 @@ function Kt(r, ot) {
482
483
  t = R + n, tt(t);
483
484
  break;
484
485
  case xt:
485
- e = S - o, O(e);
486
+ e = P - o, O(e);
486
487
  break;
487
488
  case Rt:
488
- e = S + o, O(e);
489
+ e = P + o, O(e);
489
490
  break;
490
491
  }
491
492
  (s = x.onMoving) == null || s.call(x, c, {
@@ -501,10 +502,10 @@ function Kt(r, ot) {
501
502
  y(window, "mousemove", L), y(window, "touchmove", L), y(window, "mouseup", W), y(window, "touchend", W), y(window, "contextmenu", W);
502
503
  }
503
504
  function j(c, v) {
504
- const p = V(c), { contentRect: R } = v[0], S = `${c.slice(0, 1).toUpperCase()}${c.slice(1)}`, t = R[p ? "height" : "width"];
505
+ const p = V(c), { contentRect: R } = v[0], P = `${c.slice(0, 1).toUpperCase()}${c.slice(1)}`, t = R[p ? "height" : "width"];
505
506
  f.current.padding[c] = t, E((e) => ({
506
507
  ...e,
507
- [`padding${S}`]: t
508
+ [`padding${P}`]: t
508
509
  }));
509
510
  }
510
511
  const Z = {
package/Result.js CHANGED
@@ -4,7 +4,7 @@ import p from "@unicom-cloud/icons/IconUiClose";
4
4
  import u from "@unicom-cloud/icons/IconUiExclamation";
5
5
  import M from "@unicom-cloud/icons/IconUiInfo";
6
6
  import { forwardRef as Z, useContext as v } from "react";
7
- import { a as R } from "./chunk/z7sBNzI4.js";
7
+ import { a as R } from "./chunk/Lyg-9NEt.js";
8
8
  import N from "./hooks/useMergeProps.js";
9
9
  import m from "@unicom-cloud/utils/class-name";
10
10
  function $() {
package/Select.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S as o } from "./chunk/DCe3olyi.js";
1
+ import { S as o } from "./chunk/BEVtQ2QL.js";
2
2
  export {
3
3
  o as default
4
4
  };