@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
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/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@unicom-cloud/ui","version":"0.8.107","dependencies":{"@unicom-cloud/icons":"latest"},"peerDependencies":{"react":"^18.3.1","react-dom":"^18.3.1","dayjs":"^1.11.10","lodash":"^4.17.21","uuid":"^11.1.0","qrcode.react":"^4.2.0"},"peerDependenciesMeta":{},"type":"module","types":"types/pc/index.d.ts","main":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
1
+ {"name":"@unicom-cloud/ui","version":"0.8.108","dependencies":{"@unicom-cloud/icons":"latest"},"peerDependencies":{"react":"^18.3.1","react-dom":"^18.3.1","dayjs":"^1.11.10","lodash":"^4.17.21","uuid":"^11.1.0","qrcode.react":"^4.2.0"},"peerDependenciesMeta":{},"type":"module","types":"types/pc/index.d.ts","main":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
@@ -1,68 +1,69 @@
1
- import { jsxs as c, jsx as r, Fragment as H } from "react/jsx-runtime";
2
- import B from "@unicom-cloud/icons/IconUiLeft";
3
- import _ from "@unicom-cloud/icons/IconUiRight";
4
- import T, { useContext as W, useState as j, useRef as z, useImperativeHandle as K, useEffect as U } from "react";
5
- import D from "../breadcrumb/index.js";
1
+ import { jsxs as c, jsx as r, Fragment as _ } from "react/jsx-runtime";
2
+ import T from "@unicom-cloud/icons/IconUiLeft";
3
+ import W from "@unicom-cloud/icons/IconUiRight";
4
+ import m from "lodash/isArray";
5
+ import j, { useContext as z, useState as K, useRef as U, useImperativeHandle as A, useEffect as D } from "react";
6
+ import F from "../breadcrumb/index.js";
6
7
  import "../config-provider/ConfigProvider.js";
7
- import F from "../components/common/hooks/useKeyboardEvent.js";
8
- import L from "../components/common/hooks/useMergeProps.js";
9
- import M from "../icon-hover/index.js";
8
+ import L from "../components/common/hooks/useKeyboardEvent.js";
9
+ import M from "../components/common/hooks/useMergeProps.js";
10
+ import O from "../icon-hover/index.js";
10
11
  import u from "@unicom-cloud/utils/class-name";
11
- import { omit as O } from "../components/common/utils/omit.js";
12
- import { resizeObserver as S } from "../components/common/utils/resizeObserver.js";
13
- import q from "../config-provider/context.js";
14
- function p(g, $) {
15
- const { getPrefixCls: b, componentConfig: v, rtl: h } = W(q), a = L(
16
- g,
12
+ import { omit as S } from "../components/common/utils/omit.js";
13
+ import { resizeObserver as q } from "../components/common/utils/resizeObserver.js";
14
+ import G from "../config-provider/context.js";
15
+ function g($, b) {
16
+ const { getPrefixCls: v, componentConfig: N, rtl: p } = z(G), a = M(
17
+ $,
17
18
  {},
18
- v?.PageHeader
19
+ N?.PageHeader
19
20
  ), {
20
- header: N,
21
- title: x,
22
- subTitle: y,
23
- extra: k,
24
- children: m,
21
+ header: x,
22
+ title: k,
23
+ subTitle: C,
24
+ extra: w,
25
+ children: d,
25
26
  backIcon: l,
26
- footer: d,
27
- breadcrumb: f,
28
- ...A
27
+ footer: f,
28
+ breadcrumb: h,
29
+ ...P
29
30
  } = a;
30
- let i = N;
31
- Array.isArray(i) && !i.length && (i = null);
32
- let n = x;
33
- Array.isArray(n) && !n.length && (n = null);
34
- let o = y;
35
- Array.isArray(o) && !o.length && (o = null);
36
- let s = k;
37
- Array.isArray(s) && !s.length && (s = null);
38
- const C = F(), [w, P] = j(!1), t = z(), e = b?.("page-header");
39
- K($, () => ({
40
- getRootDomElement: R
31
+ let i = x;
32
+ m(i) && !i.length && (i = null);
33
+ let n = k;
34
+ m(n) && !n.length && (n = null);
35
+ let o = C;
36
+ m(o) && !o.length && (o = null);
37
+ let s = w;
38
+ m(s) && !s.length && (s = null);
39
+ const R = L(), [y, I] = K(!1), t = U(), e = v?.("page-header");
40
+ A(b, () => ({
41
+ getRootDomElement: E
41
42
  }), []);
42
- function R() {
43
+ function E() {
43
44
  return t.current;
44
45
  }
45
- function I() {
46
- t.current && P(t.current.offsetWidth < 768);
46
+ function H() {
47
+ t.current && I(t.current.offsetWidth < 768);
47
48
  }
48
- return U(() => {
49
- const E = S([t.current], I);
49
+ return D(() => {
50
+ const B = q([t.current], H);
50
51
  return () => {
51
- E();
52
+ B();
52
53
  };
53
54
  }, [t.current]), /* @__PURE__ */ c(
54
55
  "div",
55
56
  {
56
- ...O(A, ["onBack"]),
57
+ ...S(P, ["onBack"]),
57
58
  ref: t,
58
59
  className: u(
59
60
  `${e}`,
60
61
  {
61
- [`${e}-with-breadcrumb`]: f,
62
- [`${e}-with-content`]: m,
63
- [`${e}-with-footer`]: d,
64
- [`${e}-wrap`]: w,
65
- [`${e}-rtl`]: h
62
+ [`${e}-with-breadcrumb`]: h,
63
+ [`${e}-with-content`]: d,
64
+ [`${e}-with-footer`]: f,
65
+ [`${e}-wrap`]: y,
66
+ [`${e}-rtl`]: p
66
67
  },
67
68
  a.className
68
69
  ),
@@ -70,7 +71,7 @@ function p(g, $) {
70
71
  children: [
71
72
  !!i && /* @__PURE__ */ r("div", { className: `${e}-header`, children: i }),
72
73
  /* @__PURE__ */ c("div", { className: `${e}-head-wrapper`, children: [
73
- f && /* @__PURE__ */ r(D, { ...f }),
74
+ h && /* @__PURE__ */ r(F, { ...h }),
74
75
  /* @__PURE__ */ c("div", { className: `${e}-head`, children: [
75
76
  /* @__PURE__ */ c(
76
77
  "div",
@@ -80,21 +81,21 @@ function p(g, $) {
80
81
  }),
81
82
  children: [
82
83
  l && /* @__PURE__ */ r(
83
- M,
84
+ O,
84
85
  {
85
86
  prefix: e,
86
87
  tabIndex: 0,
87
88
  role: "button",
88
89
  className: `${e}-back`,
89
90
  onClick: a.onBack,
90
- ...C({
91
+ ...R({
91
92
  onPressEnter: a.onBack
92
93
  }),
93
- children: /* @__PURE__ */ r("span", { className: `${e}-back-icon`, children: l === !0 ? h ? /* @__PURE__ */ r(_, {}) : /* @__PURE__ */ r(B, {}) : l })
94
+ children: /* @__PURE__ */ r("span", { className: `${e}-back-icon`, children: l === !0 ? p ? /* @__PURE__ */ r(W, {}) : /* @__PURE__ */ r(T, {}) : l })
94
95
  }
95
96
  ),
96
97
  n && /* @__PURE__ */ r("div", { className: `${e}-title`, children: n }),
97
- o && /* @__PURE__ */ c(H, { children: [
98
+ o && /* @__PURE__ */ c(_, { children: [
98
99
  /* @__PURE__ */ r("div", { className: `${e}-divider` }),
99
100
  /* @__PURE__ */ r("div", { className: `${e}-sub-title`, children: o })
100
101
  ] })
@@ -104,14 +105,14 @@ function p(g, $) {
104
105
  s && /* @__PURE__ */ r("div", { className: `${e}-head-extra`, children: s })
105
106
  ] })
106
107
  ] }),
107
- m && /* @__PURE__ */ r("div", { className: `${e}-content`, children: m }),
108
- d && /* @__PURE__ */ r("div", { className: `${e}-footer`, children: d })
108
+ d && /* @__PURE__ */ r("div", { className: `${e}-content`, children: d }),
109
+ f && /* @__PURE__ */ r("div", { className: `${e}-footer`, children: f })
109
110
  ]
110
111
  }
111
112
  );
112
113
  }
113
- p.displayName = "PageHeader";
114
- const oe = T.forwardRef(p);
114
+ g.displayName = "PageHeader";
115
+ const ce = j.forwardRef(g);
115
116
  export {
116
- oe as default
117
+ ce as default
117
118
  };
@@ -1,17 +1,17 @@
1
- import { jsxs as E, jsx as c } from "react/jsx-runtime";
2
- import D, { forwardRef as Ne, useContext as we, useEffect as W, createElement as P } from "react";
1
+ import { jsxs as O, jsx as c } from "react/jsx-runtime";
2
+ import D, { forwardRef as we, useContext as Ne, useEffect as W, createElement as P } from "react";
3
3
  import "../config-provider/ConfigProvider.js";
4
4
  import $e from "../components/common/hooks/useMergeProps.js";
5
5
  import q from "../components/common/hooks/useMergeValue.js";
6
6
  import ve from "@unicom-cloud/utils/class-name";
7
7
  import { pickDataAttributes as be } from "../components/common/utils/pick.js";
8
- import w, { StepPager as $, JumpPager as R } from "./PageItem.js";
8
+ import N, { StepPager as $, JumpPager as E } from "./PageItem.js";
9
9
  import G from "./PageJumper.js";
10
10
  import Me from "./PageOption.js";
11
11
  import { StepType as m } from "./interface.js";
12
12
  import je from "../config-provider/context.js";
13
13
  const ke = 1, K = 10;
14
- function O(g = K, d) {
14
+ function R(g = K, d) {
15
15
  return Math.ceil(d / g);
16
16
  }
17
17
  function Je(g, d) {
@@ -26,109 +26,107 @@ const Ae = {
26
26
  pageSizeChangeResetCurrent: !0,
27
27
  bufferSize: 2
28
28
  };
29
- function Ee(g, d) {
29
+ function Oe(g, d) {
30
30
  const {
31
31
  getPrefixCls: F,
32
32
  size: v,
33
33
  locale: b,
34
34
  componentConfig: Q,
35
35
  rtl: U
36
- } = we(je), r = $e(
36
+ } = Ne(je), i = $e(
37
37
  g,
38
38
  Ae,
39
39
  Q?.Pagination
40
40
  ), {
41
- total: X,
42
- pageSize: Y,
41
+ className: X,
42
+ style: Y,
43
+ pageItemStyle: Z,
44
+ activePageItemStyle: ee,
45
+ showTotal: x,
46
+ sizeOptions: te,
47
+ simple: C,
48
+ mini: ne,
49
+ showJumper: M,
50
+ selectProps: oe,
51
+ icons: ae,
52
+ disabled: z,
53
+ itemRender: re,
54
+ hideOnSinglePage: se,
55
+ total: ie,
56
+ pageSize: le,
43
57
  current: I,
44
- showMore: Z,
45
- sizeOptions: C,
58
+ showMore: ue,
59
+ sizeOptions: S,
46
60
  pageSizeChangeResetCurrent: T,
47
- defaultCurrent: ee,
48
- defaultPageSize: te,
49
- pageOption: ne = {}
61
+ defaultCurrent: ce,
62
+ defaultPageSize: pe,
63
+ showPageOption: ge
50
64
  // 潘启宝添加
51
- } = r, [e, M] = q(ke, {
52
- defaultValue: ee,
65
+ } = i, fe = C ? !1 : ge, [e, j] = q(ke, {
66
+ defaultValue: ce,
53
67
  value: I
54
68
  }), [f, V] = q(
55
- H(C),
69
+ H(S),
56
70
  {
57
- defaultValue: te,
58
- value: Y
71
+ defaultValue: pe,
72
+ value: le
59
73
  }
60
- ), h = X, oe = !!Z;
61
- I && !r.onChange && console.warn(
74
+ ), h = ie, me = !!ue;
75
+ I && !i.onChange && console.warn(
62
76
  "Warning: you have provide current prop for pagination but without onChange handler , this will cause no-change when you change page. "
63
77
  );
64
- function ae(t, l) {
65
- const n = O(t, l);
78
+ function he(t, l) {
79
+ const n = R(t, l);
66
80
  return e > n ? n : e;
67
81
  }
68
82
  W(() => {
69
- if (C && !C.includes(f)) {
70
- const l = H(C);
71
- "pageSize" in r || V(l);
83
+ if (S && !S.includes(f)) {
84
+ const l = H(S);
85
+ "pageSize" in i || V(l);
72
86
  }
73
- }, [C]), W(() => {
74
- const t = ae(f, h);
75
- t !== e && !("current" in r) && M(t);
87
+ }, [S]), W(() => {
88
+ const t = he(f, h);
89
+ t !== e && !("current" in i) && j(t);
76
90
  }, [h, e, f]);
77
91
  const B = (t = e, l = f) => {
78
- const { onChange: n } = r;
92
+ const { onChange: n } = i;
79
93
  n?.(t, l);
80
- }, re = (t) => {
81
- const { onPageSizeChange: l } = r, n = O(t, h), a = {
94
+ }, Pe = (t) => {
95
+ const { onPageSizeChange: l } = i, n = R(t, h), a = {
82
96
  pageSize: t
83
97
  };
84
- T ? a.current = 1 : a.current = e > n ? n : e, "pageSize" in r || V(a.pageSize), !("current" in r) && e !== a.current && M(a.current), l?.(t, a.current), B(T ? 1 : a.current, t);
85
- }, j = (t) => {
86
- "current" in r || M(t), B(t);
87
- }, {
88
- className: ie,
89
- style: se,
90
- pageItemStyle: le,
91
- activePageItemStyle: ue,
92
- showTotal: S,
93
- sizeCanChange: ce,
94
- sizeOptions: pe,
95
- simple: x,
96
- mini: ge,
97
- showJumper: k,
98
- selectProps: fe,
99
- icons: me,
100
- disabled: z,
101
- itemRender: he,
102
- hideOnSinglePage: Pe
103
- } = r, de = r.size || v, o = F?.("pagination"), y = ge ? "mini" : de, Ce = ve(
98
+ T ? a.current = 1 : a.current = e > n ? n : e, "pageSize" in i || V(a.pageSize), !("current" in i) && e !== a.current && j(a.current), l?.(t, a.current), B(T ? 1 : a.current, t);
99
+ }, k = (t) => {
100
+ "current" in i || j(t), B(t);
101
+ }, de = i.size || v, o = F?.("pagination"), y = ne ? "mini" : de, Ce = ve(
104
102
  o,
105
103
  `${o}-size-${y}`,
106
104
  {
107
- [`${o}-simple`]: x,
105
+ [`${o}-simple`]: C,
108
106
  [`${o}-disabled`]: z,
109
107
  [`${o}-rtl`]: U
110
108
  },
111
- ie
109
+ X
112
110
  );
113
111
  let J;
114
- const i = [], s = O(f, h), p = Je(r.bufferSize, s);
115
- if (Pe && s <= 1)
112
+ const r = [], s = R(f, h), p = Je(i.bufferSize, s);
113
+ if (se && s <= 1)
116
114
  return null;
117
115
  const u = {
118
- onClick: j,
116
+ onClick: k,
119
117
  rootPrefixCls: o,
120
- simple: x,
118
+ simple: C,
121
119
  current: e,
122
120
  allPages: s,
123
- icons: me,
121
+ icons: ae,
124
122
  disabled: z,
125
- pageItemStyle: le,
126
- activePageItemStyle: ue,
127
- itemRender: he
123
+ pageItemStyle: Z,
124
+ activePageItemStyle: ee,
125
+ itemRender: re
128
126
  };
129
- if (x) {
127
+ if (C) {
130
128
  const t = `${o}-item-simple`;
131
- J = /* @__PURE__ */ E("ul", { className: `${o}-list`, children: [
129
+ J = /* @__PURE__ */ O("ul", { className: `${o}-list`, children: [
132
130
  /* @__PURE__ */ c($, { ...u, type: m.previous }, "previous"),
133
131
  /* @__PURE__ */ c("li", { className: `${t}-pager`, children: /* @__PURE__ */ c(
134
132
  G,
@@ -137,9 +135,9 @@ function Ee(g, d) {
137
135
  rootPrefixCls: o,
138
136
  totalPages: s,
139
137
  current: e,
140
- onPageChange: j,
138
+ onPageChange: k,
141
139
  simple: {
142
- showJumper: typeof k == "boolean" ? k : !0
140
+ showJumper: typeof M == "boolean" ? M : !0
143
141
  },
144
142
  size: y
145
143
  }
@@ -153,14 +151,14 @@ function Ee(g, d) {
153
151
  s <= 4 + p * 2 || e === t && e === l
154
152
  )
155
153
  for (let n = 1; n <= s; n++)
156
- i.push(/* @__PURE__ */ P(w, { ...u, key: n, pageNum: n }));
154
+ r.push(/* @__PURE__ */ P(N, { ...u, key: n, pageNum: n }));
157
155
  else {
158
156
  let n = 1, a = s, L = !0, _ = !0;
159
157
  e > t && e < l ? (a = e + p, n = e - p) : e <= t ? (L = !1, n = 1, a = Math.max(t, p + e)) : e >= l && (_ = !1, a = s, n = Math.min(l, e - p));
160
- for (let N = n; N <= a; N++)
161
- i.push(/* @__PURE__ */ c(w, { pageNum: N, ...u }, N));
158
+ for (let w = n; w <= a; w++)
159
+ r.push(/* @__PURE__ */ c(N, { pageNum: w, ...u }, w));
162
160
  const ze = /* @__PURE__ */ P(
163
- R,
161
+ E,
164
162
  {
165
163
  ...u,
166
164
  key: n - 1,
@@ -168,28 +166,28 @@ function Ee(g, d) {
168
166
  jumpPage: -(p * 2 + 1)
169
167
  }
170
168
  ), Se = /* @__PURE__ */ P(
171
- R,
169
+ E,
172
170
  {
173
171
  ...u,
174
172
  key: a + 1,
175
173
  type: m.next,
176
174
  jumpPage: p * 2 + 1
177
175
  }
178
- ), xe = /* @__PURE__ */ c(w, { pageNum: 1, ...u }, 1), ye = /* @__PURE__ */ P(w, { ...u, key: s, pageNum: s });
179
- L && (i[0] = D.cloneElement(i[0], {
176
+ ), xe = /* @__PURE__ */ c(N, { pageNum: 1, ...u }, 1), ye = /* @__PURE__ */ P(N, { ...u, key: s, pageNum: s });
177
+ L && (r[0] = D.cloneElement(r[0], {
180
178
  className: `${o}-item-after-pre`
181
- }), i.unshift(ze), i.unshift(xe)), _ && (i[i.length - 1] = D.cloneElement(
182
- i[i.length - 1],
179
+ }), r.unshift(ze), r.unshift(xe)), _ && (r[r.length - 1] = D.cloneElement(
180
+ r[r.length - 1],
183
181
  {
184
182
  className: `${o}-item-before-next`
185
183
  }
186
- ), i.push(Se), i.push(ye));
184
+ ), r.push(Se), r.push(ye));
187
185
  }
188
- J = /* @__PURE__ */ E("ul", { className: `${o}-list`, children: [
186
+ J = /* @__PURE__ */ O("ul", { className: `${o}-list`, children: [
189
187
  /* @__PURE__ */ P($, { ...u, key: "previous", type: m.previous }),
190
- i,
191
- oe && /* @__PURE__ */ P(
192
- R,
188
+ r,
189
+ me && /* @__PURE__ */ P(
190
+ E,
193
191
  {
194
192
  ...u,
195
193
  key: s + 1,
@@ -201,37 +199,36 @@ function Ee(g, d) {
201
199
  ] });
202
200
  }
203
201
  let A = null;
204
- return typeof S == "boolean" && S && (A = /* @__PURE__ */ c("div", { className: `${o}-total-text`, children: b?.Pagination?.total?.replace?.("{0}", h) })), typeof S == "function" && (A = /* @__PURE__ */ c("div", { className: `${o}-total-text`, children: S(h, [(e - 1) * f + 1, e * f]) })), /* @__PURE__ */ E(
202
+ return typeof x == "boolean" && x && (A = /* @__PURE__ */ c("div", { className: `${o}-total-text`, children: b?.Pagination?.total?.replace?.("{0}", h) })), typeof x == "function" && (A = /* @__PURE__ */ c("div", { className: `${o}-total-text`, children: x(h, [(e - 1) * f + 1, e * f]) })), /* @__PURE__ */ O(
205
203
  "div",
206
204
  {
207
- ...be(r),
205
+ ...be(i),
208
206
  className: Ce,
209
- style: se,
207
+ style: Y,
210
208
  ref: d,
211
209
  children: [
212
210
  A,
213
211
  J,
214
- !!ne && /* @__PURE__ */ c(
212
+ fe !== !1 && /* @__PURE__ */ c(
215
213
  Me,
216
214
  {
217
215
  disabled: z,
218
216
  rootPrefixCls: o,
219
- sizeCanChange: ce,
220
- sizeOptions: pe,
221
- onPageSizeChange: re,
217
+ sizeOptions: te,
218
+ onPageSizeChange: Pe,
222
219
  pageSize: f,
223
220
  size: y,
224
- selectProps: fe
221
+ selectProps: oe
225
222
  }
226
223
  ),
227
- !x && k && /* @__PURE__ */ c(
224
+ !C && M && /* @__PURE__ */ c(
228
225
  G,
229
226
  {
230
227
  disabled: z,
231
228
  rootPrefixCls: o,
232
229
  totalPages: s,
233
230
  current: e,
234
- onPageChange: j,
231
+ onPageChange: k,
235
232
  size: y
236
233
  }
237
234
  )
@@ -239,8 +236,8 @@ function Ee(g, d) {
239
236
  }
240
237
  );
241
238
  }
242
- const Re = Ne(Ee);
243
- Re.displayName = "Pagination";
239
+ const Ee = we(Oe);
240
+ Ee.displayName = "Pagination";
244
241
  export {
245
- Re as default
242
+ Ee as default
246
243
  };
package/qr-code/index.js CHANGED
@@ -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 "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 "@unicom-cloud/utils/is";
58
+ import "uuid";
58
59
  import "../dist/validate/src/index.js";
59
60
  import h from "../config-provider/context.js";
60
61
  const q = {
@@ -66,7 +67,7 @@ const q = {
66
67
  bgColor: "#ffffff",
67
68
  marginSize: 0,
68
69
  value: "qr-code"
69
- }, jo = (e) => {
70
+ }, wo = (e) => {
70
71
  const { getPrefixCls: s, componentConfig: n } = Q(h), d = R(
71
72
  e,
72
73
  q,
@@ -114,5 +115,5 @@ const q = {
114
115
  );
115
116
  };
116
117
  export {
117
- jo as default
118
+ wo as default
118
119
  };
package/radio/Group.js CHANGED
@@ -26,7 +26,7 @@ function E(s) {
26
26
  } = F(w), e = O(
27
27
  s,
28
28
  B,
29
- h?.["Radio.Group"]
29
+ h?.RadioGroup
30
30
  ), {
31
31
  style: b,
32
32
  className: z,
@@ -0,0 +1,88 @@
1
+ import { jsx as F } from "react/jsx-runtime";
2
+ import G from "lodash/isArray";
3
+ import H from "lodash/isNumber";
4
+ import T from "lodash/isPlainObject";
5
+ import { forwardRef as q, useContext as j, useMemo as D } from "react";
6
+ import "../config-provider/ConfigProvider.js";
7
+ import { COLS as I } from "../constant/index.js";
8
+ import J from "../components/common/hooks/useMergeProps.js";
9
+ import K from "@unicom-cloud/utils/class-name";
10
+ import { RowContext as Q } from "./context.js";
11
+ import U from "../config-provider/context.js";
12
+ const W = {
13
+ span: I
14
+ };
15
+ function L(i) {
16
+ return typeof i == "string" && /\d+[px|%|em|rem|]{1}/.test(i) ? `0 0 ${i}` : i;
17
+ }
18
+ function X(i, O) {
19
+ const { getPrefixCls: R, componentConfig: v, rtl: w } = j(U), C = J(
20
+ i,
21
+ W,
22
+ v?.Col
23
+ ), { gutter: p, div: l } = j(Q), {
24
+ className: M,
25
+ style: N,
26
+ children: V,
27
+ span: k,
28
+ offset: d,
29
+ order: a,
30
+ pull: m,
31
+ push: u,
32
+ xs: c,
33
+ sm: g,
34
+ md: x,
35
+ lg: h,
36
+ xl: y,
37
+ xxl: P,
38
+ xxxl: S,
39
+ flex: e,
40
+ ...z
41
+ } = C;
42
+ function A(r, o) {
43
+ const b = { xs: c, sm: g, md: x, lg: h, xl: y, xxl: P, xxxl: S };
44
+ return Object.keys(b).forEach((s) => {
45
+ const t = b[s];
46
+ H(t) ? t >= 0 && (o[`${r}-${s}-${t}`] = !0) : T(t) && (o[`${r}-${s}-${t.span}`] = t.span, o[`${r}-${s}-offset-${t.offset}`] = t.offset, o[`${r}-${s}-order-${t.order}`] = t.order, o[`${r}-${s}-pull-${t.pull}`] = t.pull, o[`${r}-${s}-push-${t.push}`] = t.push);
47
+ }), o;
48
+ }
49
+ const n = R?.("col");
50
+ let $ = {
51
+ [`${n}`]: !l,
52
+ [`${n}-order-${a}`]: a,
53
+ [`${n}-${k}`]: !l && !c && !g && !x && !h && !y && !P && !S,
54
+ [`${n}-offset-${d}`]: d,
55
+ [`${n}-pull-${m}`]: m,
56
+ [`${n}-push-${u}`]: u,
57
+ [`${n}-rtl`]: w
58
+ };
59
+ $ = A(n, $);
60
+ const B = K(e ? n : $, M), f = {};
61
+ if (G(p) && !l) {
62
+ const r = p[0] && p[0] / 2 || 0, o = p[1] && p[1] / 2 || 0;
63
+ r && (f.paddingLeft = r, f.paddingRight = r), o && (f.paddingTop = o, f.paddingBottom = o);
64
+ }
65
+ const E = D(
66
+ () => L(e) ? { flex: L(e) } : {},
67
+ [e]
68
+ );
69
+ return /* @__PURE__ */ F(
70
+ "div",
71
+ {
72
+ ref: O,
73
+ ...z,
74
+ style: {
75
+ ...N,
76
+ ...f,
77
+ ...E
78
+ },
79
+ className: B,
80
+ children: V
81
+ }
82
+ );
83
+ }
84
+ const Y = q(X);
85
+ Y.displayName = "Col";
86
+ export {
87
+ Y as default
88
+ };