@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/modal/index.js CHANGED
@@ -1,4 +1,6 @@
1
- import t from "./Modal.js";
1
+ import e from "./Modal.js";
2
+ import { default as r } from "./use-modal/index.js";
2
3
  export {
3
- t as default
4
+ e as default,
5
+ r as useModal
4
6
  };
@@ -24,9 +24,9 @@ function j() {
24
24
  },
25
25
  c
26
26
  );
27
- r.current?.addInstance(i);
27
+ r.current?.addInstance?.(i);
28
28
  function C() {
29
- r.current?.removeInstance(i);
29
+ r.current?.removeInstance?.(i);
30
30
  }
31
31
  function a() {
32
32
  e?.close();
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@unicom-cloud/ui","version":"0.8.106","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
+ };