@unicom-cloud/ui 0.8.88 → 0.8.90

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 (140) hide show
  1. package/Anchor.js +4 -2
  2. package/AutoComplete.js +4 -2
  3. package/Avatar.js +4 -3
  4. package/Badge.js +6 -5
  5. package/Breadcrumb.js +4 -3
  6. package/Calendar.js +7 -5
  7. package/Card.js +6 -4
  8. package/Cascader.js +1 -1
  9. package/Checkbox.js +4 -4
  10. package/Collapse.js +3 -2
  11. package/ColorPicker.js +13 -2
  12. package/DatePicker.js +8 -8
  13. package/Form.js +3 -3
  14. package/Grid.js +10 -8
  15. package/List.js +1 -1
  16. package/Mentions.js +1 -1
  17. package/Pagination.js +1 -1
  18. package/Radio.js +5 -5
  19. package/Select.js +1 -1
  20. package/Table.js +3 -3
  21. package/TimePicker.js +2 -2
  22. package/Transfer.js +2 -2
  23. package/Tree.js +1 -1
  24. package/TreeSelect.js +3 -3
  25. package/Typography.js +1 -1
  26. package/anchor/Anchor.js +30 -29
  27. package/anchor/index.js +2 -0
  28. package/auto-complete/index.js +4 -2
  29. package/avatar/index.js +4 -3
  30. package/badge/index.js +39 -43
  31. package/breadcrumb/index.js +18 -17
  32. package/calendar/Month.js +2 -2
  33. package/calendar/Year.js +2 -2
  34. package/calendar/index.js +7 -5
  35. package/card/index.js +31 -29
  36. package/cascader/Cascader.js +1 -1
  37. package/cascader/index.js +1 -1
  38. package/cascader/util.js +1 -1
  39. package/checkbox/Checkbox.js +6 -6
  40. package/checkbox/Group.js +1 -1
  41. package/checkbox/GroupBlock.js +2 -2
  42. package/checkbox/index.js +4 -4
  43. package/chunk/B3LeSidy.js +192 -0
  44. package/chunk/{CgyNQvYg.js → BbQEqpOn.js} +388 -381
  45. package/chunk/{BP4igg_F.js → BcCuJQY8.js} +41 -40
  46. package/chunk/{Doi4-DdV.js → C8Kcc_9d.js} +99 -92
  47. package/chunk/D-Hw4x_H.js +88 -0
  48. package/chunk/{BC2OXILt.js → Dc-uXGtN.js} +1 -1
  49. package/collapse/Collapse.js +255 -13
  50. package/collapse/Item.js +2 -2
  51. package/collapse/index.js +4 -2
  52. package/color-picker/Panel.js +1 -1
  53. package/color-picker/index.js +13 -2
  54. package/date-picker/Picker.js +142 -138
  55. package/date-picker/RangePicker.js +2 -2
  56. package/date-picker/index.js +22 -22
  57. package/date-picker/util.js +1 -1
  58. package/form/Form.js +1 -1
  59. package/form/index.js +32 -32
  60. package/grid/index.js +13 -12
  61. package/image/Image.js +26 -25
  62. package/index.js +600 -571
  63. package/list/index.js +1 -1
  64. package/mentions/index.js +1 -1
  65. package/package.json +1 -1
  66. package/pagination/PageOption.js +1 -1
  67. package/pagination/Pagination.js +1 -1
  68. package/pagination/index.js +1 -1
  69. package/radio/Group.js +1 -1
  70. package/radio/GroupBlock.js +2 -2
  71. package/radio/Radio.js +4 -4
  72. package/radio/index.js +4 -4
  73. package/select/Option.js +1 -1
  74. package/select/Select.js +1 -1
  75. package/select/index.js +2 -2
  76. package/select/util.js +2 -2
  77. package/space/index.js +58 -56
  78. package/statistic/Countdown.js +1 -1
  79. package/steps/index.js +50 -49
  80. package/style.css +1 -1
  81. package/table/Table.js +2 -2
  82. package/table/index.js +3 -3
  83. package/time-picker/Picker.js +17 -17
  84. package/time-picker/RangePicker.js +7 -7
  85. package/time-picker/TimePicker.js +2 -2
  86. package/time-picker/index.js +2 -2
  87. package/time-picker/util.js +1 -1
  88. package/transfer/Item.js +1 -1
  89. package/transfer/List.js +1 -1
  90. package/transfer/index.js +2 -2
  91. package/tree/Animation.js +1 -1
  92. package/tree/Node.js +1 -1
  93. package/tree/NodeList.js +1 -1
  94. package/tree/Tree.js +3 -3
  95. package/tree/index.js +1 -1
  96. package/tree-select/List.js +1 -1
  97. package/tree-select/Select.js +1 -1
  98. package/tree-select/index.js +2 -2
  99. package/types/common/space/interface.d.ts +4 -0
  100. package/types/common/utils/dayjs.d.ts +2 -2
  101. package/types/pc/anchor/Anchor.d.ts +1 -0
  102. package/types/pc/anchor/index.d.ts +2 -1
  103. package/types/pc/auto-complete/index.d.ts +6 -0
  104. package/types/pc/avatar/index.d.ts +1 -0
  105. package/types/pc/badge/index.d.ts +5 -3
  106. package/types/pc/breadcrumb/index.d.ts +1 -0
  107. package/types/pc/calendar/index.d.ts +3 -0
  108. package/types/pc/card/index.d.ts +1 -0
  109. package/types/pc/cascader/Cascader.d.ts +1 -1
  110. package/types/pc/collapse/Collapse.d.ts +1 -0
  111. package/types/pc/collapse/index.d.ts +2 -1
  112. package/types/pc/color-picker/index.d.ts +7 -0
  113. package/types/pc/date-picker/index.d.ts +1 -1
  114. package/types/pc/date-picker/interface.d.ts +2 -2
  115. package/types/pc/date-picker/panel/Body.d.ts +1 -1
  116. package/types/pc/form/hook/useForm.d.ts +1 -1
  117. package/types/pc/form/index.d.ts +1 -1
  118. package/types/pc/grid/index.d.ts +3 -4
  119. package/types/pc/index.d.ts +15 -14
  120. package/types/pc/menu/Indent.d.ts +1 -1
  121. package/types/pc/space/index.d.ts +2 -2
  122. package/types/pc/steps/index.d.ts +1 -0
  123. package/types/pc/time-picker/index.d.ts +1 -1
  124. package/types/pc/utils/constant.d.ts +2 -2
  125. package/types/pc/utils/index.d.ts +1 -0
  126. package/types/pc/utils/names.d.ts +396 -85
  127. package/typography/Ellipsis.js +5 -4
  128. package/typography/index.js +1 -1
  129. package/utils/constant.js +6 -6
  130. package/utils/dayjs.js +1 -1
  131. package/utils/index.js +202 -200
  132. package/utils/names.js +294 -86
  133. package/version/index.js +1 -1
  134. package/virtual-list/VirtualList.js +117 -116
  135. package/chunk/C7bohPVD.js +0 -185
  136. package/chunk/DYmI9fFY.js +0 -257
  137. /package/grid/{grid.js → Grid.js} +0 -0
  138. /package/grid/{grid-item.js → GridItem.js} +0 -0
  139. /package/types/pc/grid/{grid.d.ts → Grid.d.ts} +0 -0
  140. /package/types/pc/grid/{grid-item.d.ts → GridItem.d.ts} +0 -0
package/form/index.js CHANGED
@@ -1,22 +1,22 @@
1
- import { F as M, g as y, u as E } from "../chunk/BP4igg_F.js";
2
- import J from "./Control.js";
3
- import L from "./FormItem.js";
4
- import N from "./FormList.js";
5
- import O from "./FormProvider.js";
1
+ import { F as M, g as y, u as h } from "../chunk/BcCuJQY8.js";
2
+ import E from "./Control.js";
3
+ import J from "./FormItem.js";
4
+ import L from "./FormList.js";
5
+ import N from "./FormProvider.js";
6
6
  import { useContext as g, useRef as S, useCallback as R, useEffect as C, useState as w } from "react";
7
7
  import { FormContext as b } from "./context.js";
8
- import { u as P } from "../chunk/CQ_WOOmf.js";
8
+ import { u as O } from "../chunk/CQ_WOOmf.js";
9
9
  import V from "../utils/warning.js";
10
- import { SubmitStatus as U } from "./interface.js";
11
- import h from "lodash/isEqualWith";
10
+ import { SubmitStatus as P } from "./interface.js";
11
+ import U from "lodash/isEqualWith";
12
12
  import v from "lodash/get";
13
13
  import k from "lodash/isArray";
14
14
  import q from "lodash/isString";
15
15
  const A = () => {
16
- const s = g(b), o = s.store, a = S(!1), t = P(), f = R(() => {
16
+ const s = g(b), o = s.store, c = S(!1), t = O(), f = R(() => {
17
17
  var u, e, r;
18
- const { submitStatus: i } = ((r = (e = (u = o == null ? void 0 : o.getInnerMethods) == null ? void 0 : u.call(o, !0)) == null ? void 0 : e.innerGetStoreStatus) == null ? void 0 : r.call(e)) ?? {}, n = i === U.submitting;
19
- n !== a.current && (a.current = n, t());
18
+ const { submitStatus: i } = ((r = (e = (u = o == null ? void 0 : o.getInnerMethods) == null ? void 0 : u.call(o, !0)) == null ? void 0 : e.innerGetStoreStatus) == null ? void 0 : r.call(e)) ?? {}, n = i === P.submitting;
19
+ n !== c.current && (c.current = n, t());
20
20
  }, []);
21
21
  return C(() => {
22
22
  var e;
@@ -33,10 +33,10 @@ const A = () => {
33
33
  }, []), {
34
34
  form: o,
35
35
  disabled: s.disabled,
36
- isSubmitting: a.current
36
+ isSubmitting: c.current
37
37
  };
38
38
  }, G = (s, o) => {
39
- const a = g(b), t = o || a.store, f = S(s);
39
+ const c = g(b), t = o || c.store, f = S(s);
40
40
  f.current = s;
41
41
  const i = R(() => {
42
42
  const r = f.current, m = t.getFieldsState([r]);
@@ -50,7 +50,7 @@ const A = () => {
50
50
  }
51
51
  const { registerStateWatcher: r } = ((p = t == null ? void 0 : t.getInnerMethods) == null ? void 0 : p.call(t, !0)) ?? {}, m = () => {
52
52
  const F = i();
53
- h(e.current, F) || (u(F), e.current = F);
53
+ U(e.current, F) || (u(F), e.current = F);
54
54
  };
55
55
  m();
56
56
  const l = r == null ? void 0 : r(m);
@@ -59,7 +59,7 @@ const A = () => {
59
59
  };
60
60
  }, []), n;
61
61
  }, j = (s, o) => {
62
- const a = g(b), t = o || a.store, [f, i] = w(() => {
62
+ const c = g(b), t = o || c.store, [f, i] = w(() => {
63
63
  const e = t == null ? void 0 : t.getFieldsValue([].concat(s));
64
64
  return q(s) ? v(e, s) : e;
65
65
  }), n = S(s);
@@ -84,25 +84,25 @@ const A = () => {
84
84
  m == null || m();
85
85
  };
86
86
  }, []), f;
87
- }, c = M;
88
- c.Provider = O;
89
- c.Item = L;
90
- c.List = N;
91
- c.Control = J;
92
- c.getFormInstance = y;
93
- c.useForm = E;
94
- c.useFormContext = A;
95
- c.useWatch = j;
96
- c.useFormState = G;
87
+ }, a = M;
88
+ a.Provider = N;
89
+ a.Item = J;
90
+ a.List = L;
91
+ a.Control = E;
92
+ a.getFormInstance = y;
93
+ a.useForm = h;
94
+ a.useFormContext = A;
95
+ a.useWatch = j;
96
+ a.useFormState = G;
97
97
  export {
98
- J as FormControl,
99
- L as FormItem,
100
- N as FormList,
101
- O as FormProvider,
102
- c as default,
98
+ E as FormControl,
99
+ J as FormItem,
100
+ L as FormList,
101
+ N as FormProvider,
102
+ a as default,
103
103
  y as getFormInstance,
104
- E as useForm,
104
+ h as useForm,
105
105
  A as useFormContext,
106
106
  G as useFormState,
107
- j as useWatch
107
+ j as useFormWatch
108
108
  };
package/grid/index.js CHANGED
@@ -1,15 +1,16 @@
1
- import t from "./Col.js";
2
- import r from "./Row.js";
3
- import e from "./grid.js";
4
- import m from "./grid-item.js";
5
- const o = e;
6
- o.Col = t;
7
- o.Row = r;
8
- o.Item = m;
9
- o.GridItem = m;
1
+ import m from "./Col.js";
2
+ import r from "./Grid.js";
3
+ import t from "./GridItem.js";
4
+ import i from "./Row.js";
5
+ const o = r;
6
+ o.Col = m;
7
+ o.Row = i;
8
+ o.Item = t;
10
9
  export {
11
- t as Col,
12
- m as GridItem,
13
- r as Row,
10
+ m as Col,
11
+ m as GridCol,
12
+ t as GridItem,
13
+ i as GridRow,
14
+ i as Row,
14
15
  o as default
15
16
  };
package/image/Image.js CHANGED
@@ -1,10 +1,10 @@
1
- import { jsx as t, jsxs as f } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
2
  import Ce from "@unicom-cloud/icons/IconUiImageClose";
3
3
  import $e from "@unicom-cloud/icons/IconUiLoading";
4
4
  import G from "lodash/isNumber";
5
5
  import H from "lodash/isPlainObject";
6
6
  import Ne from "lodash/isUndefined";
7
- import Ve, { useContext as J, useMemo as p, useRef as Q, useEffect as g } from "react";
7
+ import Ve, { useContext as J, useMemo as g, useRef as Q, useEffect as d } from "react";
8
8
  import { a as xe } from "../chunk/B44Hj5ad.js";
9
9
  import { u as Le } from "../chunk/CCKr5jj1.js";
10
10
  import { u as ye } from "../chunk/BYdIoY50.js";
@@ -52,15 +52,15 @@ function ze(Y, Z) {
52
52
  lazyload: l,
53
53
  ...ae
54
54
  } = re, le = ye(), {
55
- previewGroup: m,
55
+ previewGroup: u,
56
56
  handleVisibleChange: ce,
57
- registerPreviewUrl: me,
58
- registerPreviewProps: ue,
57
+ registerPreviewUrl: ue,
58
+ registerPreviewProps: me,
59
59
  setCurrentIndex: de
60
- } = J(Me), o = p(() => H(I) ? I : {}, [I]), fe = p(() => H(l) ? l : {}, [l]), s = p(() => G($) || G(K) ? (R = G($) ? $ : K, R) : R++, []), x = o.src || i, [L] = je({ title: h, description: F, actions: M }), { isLoading: _, isError: y, isLoaded: c, isBeforeLoad: pe, setStatus: u } = Ue("beforeLoad"), d = Q(!1), [k, ge] = Ge(!1, {
60
+ } = J(Me), o = g(() => H(I) ? I : {}, [I]), fe = g(() => H(l) ? l : {}, [l]), s = g(() => G($) || G(K) ? (R = G($) ? $ : K, R) : R++, []), x = o.src || i, [L] = je({ title: h, description: F, actions: M }), { isLoading: _, isError: y, isLoaded: c, isBeforeLoad: pe, setStatus: m } = Ue("beforeLoad"), f = Q(!1), [k, ge] = Ge(!1, {
61
61
  defaultValue: o.defaultVisible,
62
62
  value: o.visible
63
- }), E = p(() => Re(o, [
63
+ }), E = g(() => Re(o, [
64
64
  "visible",
65
65
  "defaultVisible",
66
66
  "src",
@@ -80,13 +80,13 @@ function ze(Y, Z) {
80
80
  ie
81
81
  ), n = Q();
82
82
  function he(r) {
83
- d.current = !0, u("loaded"), V == null || V(r);
83
+ f.current = !0, m("loaded"), V == null || V(r);
84
84
  }
85
85
  function be(r) {
86
- d.current = !0, u("error"), N == null || N(r);
86
+ f.current = !0, m("error"), N == null || N(r);
87
87
  }
88
88
  function B(r) {
89
- a && m ? (de(s), ce(!0)) : a && T(!0), C == null || C(r);
89
+ a && u ? (de(s), ce(!0)) : a && T(!0), C == null || C(r);
90
90
  }
91
91
  function T(r) {
92
92
  var D;
@@ -97,25 +97,26 @@ function ze(Y, Z) {
97
97
  defaultInView: !l,
98
98
  ...fe
99
99
  });
100
- g(() => {
101
- d.current = !1, i || u("error");
102
- }, [i]), g(() => {
103
- n.current && (q ? ((n.current.src || i) && n.current.src !== i && (n.current.src = i), !d.current && !n.current.complete && u("loading")) : u("lazyload"));
104
- }, [i, q]), g(() => {
105
- if (!m)
100
+ d(() => {
101
+ f.current = !1, i || m("error");
102
+ }, [i]), d(() => {
103
+ n.current && (q ? ((n.current.src || i) && n.current.src !== i && (n.current.src = i), !f.current && !n.current.complete && m("loading")) : m("lazyload"));
104
+ }, [i, q]), d(() => {
105
+ if (!u)
106
106
  return;
107
- const r = ue(s, E);
107
+ const r = me(s, E);
108
108
  return () => r(s);
109
- }, [s, m, E]), g(() => {
110
- if (!m)
109
+ }, [s, u, E]), d(() => {
110
+ if (!u)
111
111
  return;
112
- const r = me(s, x, a);
112
+ const r = ue(s, x, a);
113
113
  return () => r(s);
114
- }, [s, m, x, a]);
115
- const Ie = /* @__PURE__ */ f("div", { className: `${e}-error`, children: [
114
+ }, [s, u, x, a]), d(() => () => {
115
+ }, [i]);
116
+ const Ie = /* @__PURE__ */ p("div", { className: `${e}-error`, children: [
116
117
  /* @__PURE__ */ t("div", { className: `${e}-error-icon`, children: /* @__PURE__ */ t(Ce, {}) }),
117
118
  P && /* @__PURE__ */ t("div", { className: `${e}-error-alt`, children: P })
118
- ] }), A = /* @__PURE__ */ t("div", { className: W(`${e}-loader`, te), children: /* @__PURE__ */ f("div", { className: `${e}-loader-spin`, children: [
119
+ ] }), A = /* @__PURE__ */ t("div", { className: W(`${e}-loader`, te), children: /* @__PURE__ */ p("div", { className: `${e}-loader-spin`, children: [
119
120
  /* @__PURE__ */ t($e, {}),
120
121
  /* @__PURE__ */ t("div", { className: `${e}-loader-spin-text`, children: se ?? "Loading" })
121
122
  ] }) }), Pe = () => {
@@ -124,7 +125,7 @@ function ze(Y, Z) {
124
125
  const r = b || A;
125
126
  return l || b ? r : null;
126
127
  };
127
- return /* @__PURE__ */ f(
128
+ return /* @__PURE__ */ p(
128
129
  "div",
129
130
  {
130
131
  className: we,
@@ -151,7 +152,7 @@ function ze(Y, Z) {
151
152
  alt: P
152
153
  }
153
154
  ),
154
- !c && /* @__PURE__ */ f("div", { className: `${e}-overlay`, children: [
155
+ !c && /* @__PURE__ */ p("div", { className: `${e}-overlay`, children: [
155
156
  y && (ne || Ie),
156
157
  _ && Pe()
157
158
  ] }),