@unicom-cloud/ui 0.8.80 → 0.8.82

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 (256) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +1 -1
  3. package/AutoComplete.js +2 -2
  4. package/BackTop.js +1 -1
  5. package/Badge.js +1 -1
  6. package/Breadcrumb.js +2 -2
  7. package/Button.js +1 -1
  8. package/Calendar.js +2 -2
  9. package/Card.js +1 -1
  10. package/Carousel.js +1 -1
  11. package/Cascader.js +1 -1
  12. package/Checkbox.js +1 -1
  13. package/Collapse.js +1 -1
  14. package/ColorPicker.js +2 -2
  15. package/Comment.js +1 -1
  16. package/ConfigProvider.js +5 -4
  17. package/Copy.js +1 -1
  18. package/DatePicker.js +7 -7
  19. package/Descriptions.js +1 -1
  20. package/Divider.js +1 -1
  21. package/Draggable.js +1 -1
  22. package/Dropdown.js +1 -1
  23. package/Empty.js +1 -1
  24. package/Icon.js +1 -1
  25. package/IconHover.js +1 -1
  26. package/Image.js +1 -1
  27. package/InputNumber.js +1 -1
  28. package/Layout.js +1 -1
  29. package/Link.js +1 -1
  30. package/List.js +2 -2
  31. package/Mentions.js +2 -2
  32. package/Menu.js +1 -1
  33. package/Message.js +1 -1
  34. package/Modal.js +1 -1
  35. package/Notice.js +1 -1
  36. package/Notification.js +5 -5
  37. package/OverflowEllipsis.js +1 -1
  38. package/PageHeader.js +1 -1
  39. package/Pagination.js +1 -1
  40. package/Popconfirm.js +1 -1
  41. package/Popover.js +1 -1
  42. package/Progress.js +1 -1
  43. package/Radio.js +1 -1
  44. package/Rate.js +1 -1
  45. package/ResizeBox.js +1 -1
  46. package/Result.js +1 -1
  47. package/Select.js +1 -1
  48. package/Skeleton.js +1 -1
  49. package/Slider.js +1 -1
  50. package/Space.js +1 -1
  51. package/Spin.js +1 -1
  52. package/Statistic.js +1 -1
  53. package/Steps.js +1 -1
  54. package/Switch.js +1 -1
  55. package/Table.js +1 -1
  56. package/Tabs.js +1 -1
  57. package/Tag.js +1 -1
  58. package/Tooltip.js +1 -1
  59. package/Transfer.js +2 -2
  60. package/Tree.js +1 -1
  61. package/TreeSelect.js +1 -1
  62. package/Trigger.js +1 -1
  63. package/Typography.js +1 -1
  64. package/affix/index.js +60 -57
  65. package/alert/index.js +53 -53
  66. package/anchor/Anchor.js +72 -72
  67. package/anchor/Link.js +27 -27
  68. package/auto-complete/index.js +2 -2
  69. package/avatar/Avatar.js +31 -31
  70. package/avatar/Group.js +25 -25
  71. package/back-top/index.js +24 -24
  72. package/badge/index.js +37 -37
  73. package/breadcrumb/index.js +26 -26
  74. package/button/Group.js +7 -7
  75. package/button/index.js +29 -29
  76. package/calendar/index.js +2 -2
  77. package/card/Grid.js +12 -12
  78. package/card/Meta.js +17 -17
  79. package/card/index.js +44 -44
  80. package/carousel/Arrow.js +19 -19
  81. package/carousel/Indicator.js +25 -25
  82. package/carousel/index.js +77 -77
  83. package/cascader/Cascader.js +2 -2
  84. package/cascader/index.js +1 -1
  85. package/cascader/util.js +1 -1
  86. package/checkbox/Checkbox.js +2 -2
  87. package/checkbox/Group.js +2 -2
  88. package/checkbox/GroupBlock.js +2 -2
  89. package/checkbox/index.js +2 -2
  90. package/chunk/{yLRv5RIK.js → CQI1gsQs.js} +181 -181
  91. package/chunk/CmMehQON.js +1464 -0
  92. package/chunk/Cplu5dtQ.js +730 -0
  93. package/chunk/{C5X4hOkx.js → D0338Pbq.js} +80 -80
  94. package/chunk/{DYspELhF.js → DXDbeIai.js} +223 -223
  95. package/chunk/{DEiyXzBZ.js → DfrB26fI.js} +63 -63
  96. package/chunk/{BG7YGUsx.js → dKvAiKxr.js} +119 -119
  97. package/chunk/{D73Vr7fa.js → w221i0nK.js} +2871 -2870
  98. package/collapse/Collapse.js +2 -2
  99. package/collapse/Item.js +2 -2
  100. package/collapse/index.js +1 -1
  101. package/color-picker/ControlBar.js +36 -36
  102. package/color-picker/InputAlpha.js +11 -11
  103. package/color-picker/InputHex.js +24 -24
  104. package/color-picker/InputRgb.js +23 -23
  105. package/color-picker/Palette.js +18 -18
  106. package/color-picker/Panel.js +2 -2
  107. package/color-picker/index.js +2 -2
  108. package/comment/index.js +31 -31
  109. package/config-provider/ConfigProvider.js +5 -4
  110. package/config-provider/context.js +2 -2
  111. package/config-provider/index.js +4 -3
  112. package/copy/index.js +28 -28
  113. package/date-picker/Picker.js +276 -276
  114. package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
  115. package/date-picker/index.js +26 -27
  116. package/descriptions/index.js +33 -33
  117. package/divider/index.js +12 -12
  118. package/draggable/index.js +23 -23
  119. package/drawer/Drawer.js +81 -81
  120. package/dropdown/Button.js +1 -1
  121. package/dropdown/index.js +56 -56
  122. package/empty/index.js +1 -1
  123. package/form/Form.js +76 -76
  124. package/form/FormItem.js +64 -64
  125. package/grid/Col.js +53 -53
  126. package/grid/Row.js +34 -34
  127. package/grid/grid-item.js +29 -29
  128. package/grid/grid.js +50 -50
  129. package/icon/index.js +20 -19
  130. package/icon-hover/index.js +1 -1
  131. package/image/Image.js +86 -86
  132. package/image/ImagePreview.js +2 -2
  133. package/image/ImagePreviewArrow.js +22 -22
  134. package/image/ImagePreviewGroup.js +1 -1
  135. package/image/index.js +1 -1
  136. package/index.js +404 -402
  137. package/input/Group.js +8 -8
  138. package/input/Input.js +322 -322
  139. package/input/InputElement.js +1 -1
  140. package/input/Password.js +1 -1
  141. package/input/Search.js +1 -1
  142. package/input/Textarea.js +1 -1
  143. package/input-number/index.js +1 -1
  144. package/input-tag/InputTag.js +40 -40
  145. package/layout/Content.js +7 -7
  146. package/layout/Footer.js +9 -9
  147. package/layout/Header.js +7 -7
  148. package/layout/Sider.js +55 -55
  149. package/layout/index.js +32 -32
  150. package/link/index.js +35 -35
  151. package/list/Item.js +29 -29
  152. package/list/Meta.js +12 -12
  153. package/list/index.js +2 -2
  154. package/mentions/index.js +2 -2
  155. package/menu/Menu.js +2 -2
  156. package/menu/OverflowWrap.js +1 -1
  157. package/menu/index.js +2 -2
  158. package/message/index.js +1 -1
  159. package/message/useMessage.js +1 -1
  160. package/modal/Confirm.js +2 -2
  161. package/modal/Modal.js +2 -2
  162. package/modal/index.js +1 -1
  163. package/notice/index.js +1 -1
  164. package/notification/index.js +5 -5
  165. package/notification/useNotification.js +1 -1
  166. package/overflow-ellipsis/OverflowItem.js +12 -12
  167. package/overflow-ellipsis/index.js +24 -24
  168. package/package.json +1 -1
  169. package/page-header/index.js +38 -38
  170. package/pagination/PageItem.js +16 -16
  171. package/pagination/PageJumper.js +1 -1
  172. package/pagination/PageOption.js +2 -2
  173. package/pagination/Pagination.js +2 -2
  174. package/pagination/index.js +1 -1
  175. package/picker/Input.js +69 -69
  176. package/picker/InputRange.js +111 -111
  177. package/popconfirm/index.js +61 -61
  178. package/popover/index.js +35 -35
  179. package/progress/index.js +22 -22
  180. package/radio/Group.js +2 -2
  181. package/radio/GroupBlock.js +2 -2
  182. package/radio/Radio.js +2 -2
  183. package/radio/index.js +2 -2
  184. package/rate/index.js +49 -49
  185. package/resize-box/ResizeTrigger.js +34 -34
  186. package/resize-box/Split.js +56 -56
  187. package/resize-box/SplitGroup.js +55 -55
  188. package/resize-box/index.js +51 -51
  189. package/result/index.js +41 -41
  190. package/select/Option.js +1 -1
  191. package/select/Select.js +2 -2
  192. package/select/index.js +2 -2
  193. package/select/util.js +1 -1
  194. package/select-view/Core.js +125 -125
  195. package/skeleton/index.js +20 -20
  196. package/slider/Button.js +57 -57
  197. package/slider/index.js +116 -116
  198. package/space/index.js +46 -44
  199. package/spin/DotLoading.js +10 -10
  200. package/spin/index.js +44 -44
  201. package/statistic/Countdown.js +34 -34
  202. package/statistic/index.js +61 -61
  203. package/steps/index.js +55 -55
  204. package/style.css +1 -1
  205. package/switch/index.js +54 -54
  206. package/table/Table.js +2 -2
  207. package/table/index.js +1 -1
  208. package/tabs/Tab.js +2 -2
  209. package/tabs/TabContent.js +2 -2
  210. package/tabs/TabPane.js +12 -12
  211. package/tabs/index.js +2 -2
  212. package/tag/index.js +45 -45
  213. package/time-picker/Picker.js +76 -76
  214. package/time-picker/TimePicker.js +136 -136
  215. package/time-picker/index.js +8 -8
  216. package/timeline/Item.js +47 -47
  217. package/timeline/Timeline.js +41 -41
  218. package/tooltip/index.js +29 -29
  219. package/transfer/Item.js +2 -2
  220. package/transfer/List.js +2 -2
  221. package/transfer/index.js +2 -2
  222. package/tree/Animation.js +2 -2
  223. package/tree/Node.js +2 -2
  224. package/tree/NodeList.js +1 -1
  225. package/tree/Tree.js +2 -2
  226. package/tree/index.js +1 -1
  227. package/tree-select/List.js +1 -1
  228. package/tree-select/Select.js +2 -2
  229. package/tree-select/index.js +2 -2
  230. package/trigger/index.js +60 -60
  231. package/types/config-provider/ConfigProvider.d.ts +2 -2
  232. package/types/config-provider/context.d.ts +1 -1
  233. package/types/date-picker/index.d.ts +8 -9
  234. package/types/date-picker/interface.d.ts +9 -9
  235. package/types/index.d.ts +1 -1
  236. package/types/picker/Input.d.ts +2 -2
  237. package/types/space/index.d.ts +2 -1
  238. package/types/utils/names.d.ts +1 -1
  239. package/typography/Base.js +53 -53
  240. package/typography/Ellipsis.js +6 -6
  241. package/typography/Operations.js +28 -28
  242. package/typography/Paragraph.js +8 -8
  243. package/typography/Typography.js +7 -7
  244. package/typography/index.js +1 -1
  245. package/upload/TriggerNode.js +47 -47
  246. package/upload/Upload.js +184 -184
  247. package/utils/contextHolder.js +3 -3
  248. package/utils/index.js +1 -1
  249. package/utils/names.js +1 -1
  250. package/utils/setPrimaryColor.js +18 -13
  251. package/verification-code/VerificationCode.js +49 -49
  252. package/version/index.js +1 -1
  253. package/watermark/Watermark.js +24 -24
  254. package/chunk/CQvM33Vg.js +0 -724
  255. package/chunk/yhU2zeeu.js +0 -1461
  256. /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
package/anchor/Link.js CHANGED
@@ -1,52 +1,52 @@
1
- import { jsxs as j, jsx as k } from "react/jsx-runtime";
1
+ import { jsxs as k, jsx as P } from "react/jsx-runtime";
2
2
  import R from "lodash/isNull";
3
- import g from "lodash/isPlainObject";
4
- import E from "lodash/isString";
5
- import L from "lodash/isUndefined";
6
- import O, { forwardRef as $, useContext as f, useRef as b, useImperativeHandle as v, useEffect as w, isValidElement as I } from "react";
7
- import { a as M } from "../chunk/CQvM33Vg.js";
8
- import { u as S } from "../chunk/BFTV6myl.js";
3
+ import E from "lodash/isPlainObject";
4
+ import L from "lodash/isString";
5
+ import O from "lodash/isUndefined";
6
+ import $, { forwardRef as b, useContext as p, useRef as v, useImperativeHandle as w, useEffect as I, isValidElement as M } from "react";
7
+ import { a as S } from "../chunk/Cplu5dtQ.js";
8
+ import { u as g } from "../chunk/BFTV6myl.js";
9
9
  import z from "@unicom-cloud/utils/class-name";
10
10
  import D from "./context.js";
11
- const p = "AnchorLink", H = {
11
+ const u = "AnchorLink", H = {
12
12
  href: "#"
13
13
  };
14
14
  function U(o) {
15
- return g(o) && Object.prototype.hasOwnProperty.call(o, "displayName");
15
+ return E(o) && Object.prototype.hasOwnProperty.call(o, "displayName");
16
16
  }
17
- function V(o, u) {
18
- const { getPrefixCls: d, componentConfig: n } = f(M), { className: h, style: N, href: r, title: t, children: m, ...x } = S(
17
+ function V(o, d) {
18
+ const { getPrefixCls: n, componentConfig: s } = p(S), { className: h, style: N, href: r, title: e, children: f, ...x } = g(
19
19
  o,
20
20
  H,
21
- n == null ? void 0 : n["Anchor.Link"]
22
- ), C = f(D), { currentLink: y, addLink: s, removeLink: i, onLinkClick: a, direction: A } = C, c = d("anchor-link"), P = z(
23
- c,
21
+ s == null ? void 0 : s["Anchor.Link"]
22
+ ), y = p(D), { currentLink: C, addLink: a, removeLink: i, onLinkClick: c, direction: A } = y, l = n == null ? void 0 : n("anchor-link"), j = z(
23
+ l,
24
24
  {
25
- [`${c}-active`]: y === r
25
+ [`${l}-active`]: C === r
26
26
  },
27
27
  h
28
- ), l = b(null);
29
- return v(u, () => l.current, []), w(() => (s == null || s(r, l.current), () => {
28
+ ), m = v(null);
29
+ return w(d, () => m.current, []), I(() => (a == null || a(r, m.current), () => {
30
30
  i == null || i(r);
31
- }), [r]), /* @__PURE__ */ j("div", { className: P, style: N, ref: l, ...x, children: [
32
- !L(t) && !R(t) && /* @__PURE__ */ k(
31
+ }), [r]), /* @__PURE__ */ k("div", { className: j, style: N, ref: m, ...x, children: [
32
+ !O(e) && !R(e) && /* @__PURE__ */ P(
33
33
  "a",
34
34
  {
35
- className: `${c}-title`,
36
- title: E(t) ? t : "",
35
+ className: `${l}-title`,
36
+ title: L(e) ? e : "",
37
37
  href: r,
38
38
  "data-href": r,
39
- onClick: (e) => {
40
- a == null || a(e, r);
39
+ onClick: (t) => {
40
+ c == null || c(t, r);
41
41
  },
42
- children: t
42
+ children: e
43
43
  }
44
44
  ),
45
- m && A !== "horizontal" && O.Children.map(m, (e) => I(e) && U(e.type) && e.type.displayName === p && e)
45
+ f && A !== "horizontal" && $.Children.map(f, (t) => M(t) && U(t.type) && t.type.displayName === u && t)
46
46
  ] });
47
47
  }
48
- const Y = $(V);
49
- Y.displayName = p;
48
+ const Y = b(V);
49
+ Y.displayName = u;
50
50
  export {
51
51
  Y as default
52
52
  };
@@ -1,11 +1,11 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@unicom-cloud/icons/IconUiLoading";
3
3
  import "react";
4
- import "../chunk/CQvM33Vg.js";
4
+ import "../chunk/Cplu5dtQ.js";
5
5
  import "../chunk/BFTV6myl.js";
6
6
  import "../chunk/CXPOj2uy.js";
7
7
  import "../input/Input.js";
8
- import { A as x } from "../chunk/D73Vr7fa.js";
8
+ import { A as x } from "../chunk/w221i0nK.js";
9
9
  import "@unicom-cloud/utils/class-name";
10
10
  import "@unicom-cloud/utils/constant/keyboardCode";
11
11
  import "../chunk/BKKEev13.js";
package/avatar/Avatar.js CHANGED
@@ -1,54 +1,54 @@
1
- import { jsxs as W, jsx as m } from "react/jsx-runtime";
2
- import j from "lodash/isNumber";
3
- import y, { forwardRef as E, useContext as N, useRef as $, useImperativeHandle as H, useEffect as T } from "react";
4
- import { a as D } from "../chunk/CQvM33Vg.js";
1
+ import { jsxs as j, jsx as u } from "react/jsx-runtime";
2
+ import E from "lodash/isNumber";
3
+ import N, { forwardRef as H, useContext as $, useRef as v, useImperativeHandle as P, useEffect as T } from "react";
4
+ import { a as D } from "../chunk/Cplu5dtQ.js";
5
5
  import L from "@unicom-cloud/utils/class-name";
6
6
  import M from "./context.js";
7
7
  const O = {
8
8
  shape: "circle",
9
9
  autoFixFontSize: !0,
10
10
  triggerType: "button"
11
- }, V = E(
12
- (n, v) => {
13
- const { getPrefixCls: C, componentConfig: c, rtl: z } = N(D), t = C("avatar"), u = N(M), F = {
11
+ }, V = H(
12
+ (i, z) => {
13
+ const { getPrefixCls: c, componentConfig: l, rtl: C } = $(D), t = c == null ? void 0 : c("avatar"), d = $(M), F = {
14
14
  ...O,
15
- ...c == null ? void 0 : c.Avatar,
16
- ...u,
17
- ...n
15
+ ...l == null ? void 0 : l.Avatar,
16
+ ...d,
17
+ ...i
18
18
  }, {
19
19
  className: R,
20
20
  shape: S,
21
21
  size: e,
22
- children: s,
22
+ children: o,
23
23
  autoFixFontSize: b,
24
- triggerIcon: l,
25
- triggerIconStyle: o,
24
+ triggerIcon: m,
25
+ triggerIconStyle: s,
26
26
  triggerType: g,
27
27
  onClick: A,
28
28
  ...I
29
- } = F, r = { ...u.style, ...n.style }, a = $(), f = $();
30
- function P() {
29
+ } = F, r = { ...d.style, ...i.style }, a = v(), f = v();
30
+ function k() {
31
31
  if (a.current) {
32
- const w = a.current.clientWidth, h = n.size || f.current.offsetWidth, x = h / (w + 8);
33
- h && x < 1 && (a.current.style.transform = `scale(${x}) translateX(-50%)`);
32
+ const W = a.current.clientWidth, x = i.size || f.current.offsetWidth, y = x / (W + 8);
33
+ x && y < 1 && (a.current.style.transform = `scale(${y}) translateX(-50%)`);
34
34
  }
35
35
  }
36
- const k = L(
36
+ const w = L(
37
37
  t,
38
38
  `${t}-${S}`,
39
39
  {
40
- [`${t}-with-trigger-icon`]: l,
41
- [`${t}-rtl`]: z
40
+ [`${t}-with-trigger-icon`]: m,
41
+ [`${t}-rtl`]: C
42
42
  },
43
43
  R
44
- ), i = y.Children.toArray(s), d = i.length === 1 && y.isValidElement(i[0]) && (i[0].type === "img" || i[0].type === "picture"), p = o || {};
45
- return g === "button" && (!o || o && !o.color) && (r != null && r.backgroundColor) && (p.color = r.backgroundColor), H(v, () => ({
44
+ ), n = N.Children.toArray(o), p = n.length === 1 && N.isValidElement(n[0]) && (n[0].type === "img" || n[0].type === "picture"), h = s || {};
45
+ return g === "button" && (!s || s && !s.color) && (r != null && r.backgroundColor) && (h.color = r.backgroundColor), P(z, () => ({
46
46
  getRootDOMNode() {
47
47
  return f.current;
48
48
  }
49
49
  })), T(() => {
50
- b && P();
51
- }, [e, s]), /* @__PURE__ */ W(
50
+ b && k();
51
+ }, [e, o]), /* @__PURE__ */ j(
52
52
  "div",
53
53
  {
54
54
  ref: f,
@@ -57,19 +57,19 @@ const O = {
57
57
  style: {
58
58
  width: e,
59
59
  height: e,
60
- fontSize: j(e) ? e / 2 : "",
60
+ fontSize: E(e) ? e / 2 : "",
61
61
  ...r
62
62
  },
63
- className: k,
63
+ className: w,
64
64
  children: [
65
- d ? /* @__PURE__ */ m("span", { className: `${t}-image`, children: s }) : null,
66
- !d && /* @__PURE__ */ m("span", { ref: a, className: `${t}-text`, children: s }),
67
- l && /* @__PURE__ */ m(
65
+ p ? /* @__PURE__ */ u("span", { className: `${t}-image`, children: o }) : null,
66
+ !p && /* @__PURE__ */ u("span", { ref: a, className: `${t}-text`, children: o }),
67
+ m && /* @__PURE__ */ u(
68
68
  "div",
69
69
  {
70
70
  className: `${t}-trigger-icon-${g}`,
71
- style: p,
72
- children: l
71
+ style: h,
72
+ children: m
73
73
  }
74
74
  )
75
75
  ]
package/avatar/Group.js CHANGED
@@ -1,54 +1,54 @@
1
1
  import { jsx as o, jsxs as _ } from "react/jsx-runtime";
2
2
  import $ from "lodash/isNumber";
3
3
  import I, { forwardRef as R, useContext as b } from "react";
4
- import { a as j } from "../chunk/CQvM33Vg.js";
4
+ import { a as j } from "../chunk/Cplu5dtQ.js";
5
5
  import { u as T } from "../chunk/BFTV6myl.js";
6
6
  import k from "../popover/index.js";
7
7
  import q from "@unicom-cloud/utils/class-name";
8
8
  import w from "./Avatar.js";
9
- import v from "./context.js";
9
+ import d from "./context.js";
10
10
  const L = {
11
11
  shape: "circle",
12
12
  autoFixFontSize: !0
13
13
  };
14
- function M(d, f) {
15
- const { getPrefixCls: h, componentConfig: i, rtl: l } = b(j), g = T(
16
- d,
14
+ function M(f, h) {
15
+ const { getPrefixCls: c, componentConfig: i, rtl: l } = b(j), g = T(
16
+ f,
17
17
  L,
18
18
  i == null ? void 0 : i["Avatar.Group"]
19
19
  ), {
20
20
  className: x,
21
- style: C,
22
- children: P,
23
- size: e,
24
- shape: c,
25
- autoFixFontSize: m,
26
- zIndexAscend: N,
21
+ style: N,
22
+ children: A,
23
+ size: a,
24
+ shape: m,
25
+ autoFixFontSize: u,
26
+ zIndexAscend: C,
27
27
  maxCount: r,
28
- maxStyle: A,
28
+ maxStyle: P,
29
29
  maxPopoverTriggerProps: y,
30
30
  ...z
31
- } = g, a = h("avatar-group"), F = q(
32
- a,
31
+ } = g, e = c == null ? void 0 : c("avatar-group"), F = q(
32
+ e,
33
33
  {
34
- [`${a}-rtl`]: l
34
+ [`${e}-rtl`]: l
35
35
  },
36
36
  x
37
- ), s = I.Children.toArray(P), u = s.length;
37
+ ), s = I.Children.toArray(A), v = s.length;
38
38
  let n = s;
39
- if ($(r) && r >= 0 && u > r) {
39
+ if ($(r) && r >= 0 && v > r) {
40
40
  const p = s.slice(r);
41
41
  n = s.slice(0, r), n.push(
42
42
  /* @__PURE__ */ o(
43
43
  w,
44
44
  {
45
- style: A,
46
- className: `${a}-max-count-avatar`,
45
+ style: P,
46
+ className: `${e}-max-count-avatar`,
47
47
  children: /* @__PURE__ */ _(
48
48
  k,
49
49
  {
50
50
  triggerProps: y,
51
- content: /* @__PURE__ */ o(v.Provider, { value: { size: e, shape: c, autoFixFontSize: m }, children: /* @__PURE__ */ o("div", { className: `${a}-popover`, children: p }) }),
51
+ content: /* @__PURE__ */ o(d.Provider, { value: { size: a, shape: m, autoFixFontSize: u }, children: /* @__PURE__ */ o("div", { className: `${e}-popover`, children: p }) }),
52
52
  children: [
53
53
  "+",
54
54
  p.length
@@ -60,15 +60,15 @@ function M(d, f) {
60
60
  )
61
61
  );
62
62
  }
63
- return /* @__PURE__ */ o("div", { ref: f, style: C, className: F, ...z, children: n.map((p, t) => {
63
+ return /* @__PURE__ */ o("div", { ref: h, style: N, className: F, ...z, children: n.map((p, t) => {
64
64
  const G = l ? t === n.length - 1 : t === 0, S = {
65
- zIndex: N ? t + 1 : u - t,
66
- marginLeft: e ? G ? 0 : -e / 4 : ""
65
+ zIndex: C ? t + 1 : v - t,
66
+ marginLeft: a ? G ? 0 : -a / 4 : ""
67
67
  };
68
68
  return /* @__PURE__ */ o(
69
- v.Provider,
69
+ d.Provider,
70
70
  {
71
- value: { size: e, shape: c, autoFixFontSize: m, style: S },
71
+ value: { size: a, shape: m, autoFixFontSize: u, style: S },
72
72
  children: p
73
73
  },
74
74
  t
package/back-top/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import x from "@unicom-cloud/icons/IconUiToTop";
3
- import { q as C, I as y } from "../chunk/uKZyjtff.js";
4
- import B, { forwardRef as E, useRef as N, useContext as P, useState as R, useEffect as S } from "react";
5
- import { a as H } from "../chunk/CQvM33Vg.js";
2
+ import y from "@unicom-cloud/icons/IconUiToTop";
3
+ import { q as x, I as B } from "../chunk/uKZyjtff.js";
4
+ import C, { forwardRef as E, useRef as N, useContext as R, useState as P, useEffect as S } from "react";
5
+ import { a as H } from "../chunk/Cplu5dtQ.js";
6
6
  import { u as I } from "../chunk/BYdIoY50.js";
7
7
  import { u as $ } from "../chunk/BFTV6myl.js";
8
8
  import { P as q } from "../chunk/NPajzdOv.js";
@@ -10,23 +10,23 @@ import D from "@unicom-cloud/utils/class-name";
10
10
  import { on as K, off as U } from "../utils/dom.js";
11
11
  import { a as j } from "../chunk/ClqoGc3r.js";
12
12
  import A from "../utils/throttleByRaf.js";
13
- function M(d, c) {
14
- c || (c = N());
13
+ function M(T, m) {
14
+ m || (m = N());
15
15
  const g = {
16
16
  visibleHeight: 400,
17
17
  tween: !0,
18
- easing: C,
18
+ easing: x,
19
19
  duration: 400,
20
20
  target: () => window
21
- }, { getPrefixCls: T, componentConfig: a, rtl: b } = P(H), w = I(), t = $(
22
- d,
21
+ }, { getPrefixCls: a, componentConfig: c, rtl: b } = R(H), w = I(), t = $(
22
+ T,
23
23
  g,
24
- a == null ? void 0 : a.BackTop
25
- ), l = T("backtop"), [h, v] = R(!1), m = (e) => e === window ? document.documentElement : e;
24
+ c == null ? void 0 : c.BackTop
25
+ ), l = a == null ? void 0 : a("backtop"), [h, v] = P(!1), f = (e) => e === window ? document.documentElement : e;
26
26
  S(() => {
27
27
  var r;
28
28
  const e = (r = t.target) == null ? void 0 : r.call(t), o = A(() => {
29
- const s = t.visibleHeight, n = m(e).scrollTop;
29
+ const s = t.visibleHeight, n = f(e).scrollTop;
30
30
  v(n >= s);
31
31
  });
32
32
  return K(e, "scroll", o), o(), () => {
@@ -34,10 +34,10 @@ function M(d, c) {
34
34
  (s = o.cancel) == null || s.call(o), U(e, "scroll", o);
35
35
  };
36
36
  }, [t.target, t.visibleHeight]);
37
- const f = () => {
38
- var s, n, u;
39
- const e = (s = t.target) == null ? void 0 : s.call(t), o = m(e), r = o.scrollTop;
40
- ((n = window.getComputedStyle(o)) == null ? void 0 : n.scrollBehavior) === "smooth" || t.tween === !1 ? o.scrollTo(0, 0) : new y({
37
+ const u = () => {
38
+ var s, n, p;
39
+ const e = (s = t.target) == null ? void 0 : s.call(t), o = f(e), r = o.scrollTop;
40
+ ((n = window.getComputedStyle(o)) == null ? void 0 : n.scrollBehavior) === "smooth" || t.tween === !1 ? o.scrollTo(0, 0) : new B({
41
41
  from: { scrollTop: r },
42
42
  to: { scrollTop: 0 },
43
43
  easing: t.easing,
@@ -45,22 +45,22 @@ function M(d, c) {
45
45
  onUpdate: (k) => {
46
46
  o.scrollTop = k.scrollTop;
47
47
  }
48
- }).start(), (u = t.onClick) == null || u.call(t);
48
+ }).start(), (p = t.onClick) == null || p.call(t);
49
49
  };
50
50
  return /* @__PURE__ */ i(
51
51
  "div",
52
52
  {
53
53
  ...j(t),
54
- ref: c,
54
+ ref: m,
55
55
  className: D(
56
56
  `${l}`,
57
57
  { [`${l}-rtl`]: b },
58
58
  t.className
59
59
  ),
60
60
  style: t.style,
61
- onClick: f,
61
+ onClick: u,
62
62
  ...w({
63
- onPressEnter: f
63
+ onPressEnter: u
64
64
  }),
65
65
  children: /* @__PURE__ */ i(
66
66
  q,
@@ -69,17 +69,17 @@ function M(d, c) {
69
69
  timeout: 100,
70
70
  classNames: "fadeIn",
71
71
  unmountOnExit: !0,
72
- children: t.children || /* @__PURE__ */ i("button", { className: `${l}-button`, children: /* @__PURE__ */ i(x, {}) })
72
+ children: t.children || /* @__PURE__ */ i("button", { className: `${l}-button`, children: /* @__PURE__ */ i(y, {}) })
73
73
  }
74
74
  )
75
75
  }
76
76
  );
77
77
  }
78
- const p = E(
78
+ const d = E(
79
79
  M
80
80
  );
81
- p.displayName = "BackTop";
82
- const tt = B.memo(p);
81
+ d.displayName = "BackTop";
82
+ const tt = C.memo(d);
83
83
  export {
84
84
  tt as default
85
85
  };
package/badge/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { jsxs as $, jsx as s } from "react/jsx-runtime";
1
+ import { jsxs as x, jsx as e } from "react/jsx-runtime";
2
2
  import j from "lodash/isPlainObject";
3
3
  import { forwardRef as w, useContext as R } from "react";
4
- import { a as q } from "../chunk/CQvM33Vg.js";
4
+ import { a as q } from "../chunk/Cplu5dtQ.js";
5
5
  import { u as G } from "../chunk/BFTV6myl.js";
6
6
  import { P as _ } from "../chunk/NPajzdOv.js";
7
7
  import a from "@unicom-cloud/utils/class-name";
8
8
  import k from "./Count.js";
9
- const x = [
9
+ const y = [
10
10
  "red",
11
11
  "orangered",
12
12
  "orange",
@@ -22,32 +22,32 @@ const x = [
22
22
  count: 0,
23
23
  maxCount: 99
24
24
  };
25
- function I(y, N) {
26
- const { getPrefixCls: C, componentConfig: m, rtl: b } = R(q), h = G(
27
- y,
25
+ function I(N, C) {
26
+ const { getPrefixCls: m, componentConfig: i, rtl: b } = R(q), h = G(
27
+ N,
28
28
  z,
29
- m == null ? void 0 : m.Badge
29
+ i == null ? void 0 : i.Badge
30
30
  ), {
31
31
  count: o,
32
- prefixText: u,
32
+ prefixText: p,
33
33
  text: c,
34
34
  className: S,
35
35
  dotClassName: n,
36
- dot: p,
36
+ dot: d,
37
37
  dotAnimation: O = !0,
38
- maxCount: P,
39
- color: e,
40
- dotStyle: B,
38
+ maxCount: B,
39
+ color: s,
40
+ dotStyle: P,
41
41
  offset: T,
42
42
  style: A,
43
43
  status: l,
44
- children: d,
44
+ children: f,
45
45
  ...D
46
- } = h, t = C("badge"), r = { ...B || {} }, [f, g] = T || [];
47
- f && (r.marginRight = -f), g && (r.marginTop = g);
46
+ } = h, t = m == null ? void 0 : m("badge"), r = { ...P || {} }, [g, $] = T || [];
47
+ g && (r.marginRight = -g), $ && (r.marginTop = $);
48
48
  const E = () => {
49
49
  if (j(o))
50
- return /* @__PURE__ */ s(
50
+ return /* @__PURE__ */ e(
51
51
  "span",
52
52
  {
53
53
  className: a(`${t}-custom-dot`, n),
@@ -55,17 +55,17 @@ function I(y, N) {
55
55
  children: o
56
56
  }
57
57
  );
58
- const i = !e || x.indexOf(e) > -1 ? {} : { backgroundColor: e };
59
- return c && !e && !l ? /* @__PURE__ */ s(
58
+ const u = !s || y.indexOf(s) > -1 ? {} : { backgroundColor: s };
59
+ return c && !s && !l ? /* @__PURE__ */ e(
60
60
  "span",
61
61
  {
62
62
  className: a(`${t}-text`, n),
63
63
  style: r,
64
64
  children: c
65
65
  }
66
- ) : l || e && typeof o == "number" && o <= 0 ? /* @__PURE__ */ $("span", { className: `${t}-status-wrapper`, children: [
67
- !!u && /* @__PURE__ */ s("span", { className: `${t}-status-prefix-text`, children: u }),
68
- /* @__PURE__ */ s(
66
+ ) : l || s && typeof o == "number" && o <= 0 ? /* @__PURE__ */ x("span", { className: `${t}-status-wrapper`, children: [
67
+ !!p && /* @__PURE__ */ e("span", { className: `${t}-status-prefix-text`, children: p }),
68
+ /* @__PURE__ */ e(
69
69
  "span",
70
70
  {
71
71
  className: a(
@@ -73,65 +73,65 @@ function I(y, N) {
73
73
  {
74
74
  [`${t}-status-dot-animation`]: O,
75
75
  [`${t}-status-${l}`]: l,
76
- [`${t}-color-${e}`]: e
76
+ [`${t}-color-${s}`]: s
77
77
  },
78
78
  n
79
79
  ),
80
- style: { ...i, ...r }
80
+ style: { ...u, ...r }
81
81
  }
82
82
  ),
83
- !!c && /* @__PURE__ */ s("span", { className: `${t}-status-text`, children: c })
84
- ] }) : (p || e) && typeof o == "number" && o > 0 ? /* @__PURE__ */ s(
83
+ !!c && /* @__PURE__ */ e("span", { className: `${t}-status-text`, children: c })
84
+ ] }) : (d || s) && typeof o == "number" && o > 0 ? /* @__PURE__ */ e(
85
85
  _,
86
86
  {
87
87
  classNames: "badge-zoom",
88
- in: p || !!e,
88
+ in: d || !!s,
89
89
  timeout: 200,
90
90
  appear: !0,
91
91
  mountOnEnter: !0,
92
92
  unmountOnExit: !0,
93
- children: /* @__PURE__ */ s(
93
+ children: /* @__PURE__ */ e(
94
94
  "span",
95
95
  {
96
96
  className: a(
97
97
  `${t}-dot`,
98
98
  {
99
- [`${t}-color-${e}`]: e
99
+ [`${t}-color-${s}`]: s
100
100
  },
101
101
  n
102
102
  ),
103
- style: { ...i, ...r }
103
+ style: { ...u, ...r }
104
104
  }
105
105
  )
106
106
  }
107
- ) : /* @__PURE__ */ s(
107
+ ) : /* @__PURE__ */ e(
108
108
  k,
109
109
  {
110
110
  prefixCls: t,
111
111
  className: a(`${t}-number`, n),
112
- style: { ...i, ...r },
113
- maxCount: P,
112
+ style: { ...u, ...r },
113
+ maxCount: B,
114
114
  count: o
115
115
  }
116
116
  );
117
117
  };
118
- return /* @__PURE__ */ $(
118
+ return /* @__PURE__ */ x(
119
119
  "span",
120
120
  {
121
121
  className: a(
122
122
  t,
123
123
  {
124
124
  [`${t}-status`]: l,
125
- [`${t}-no-children`]: !d,
125
+ [`${t}-no-children`]: !f,
126
126
  [`${t}-rtl`]: b
127
127
  },
128
128
  S
129
129
  ),
130
- ref: N,
130
+ ref: C,
131
131
  style: A,
132
132
  ...D,
133
133
  children: [
134
- d,
134
+ f,
135
135
  E()
136
136
  ]
137
137
  }
@@ -139,7 +139,7 @@ function I(y, N) {
139
139
  }
140
140
  const L = w(I);
141
141
  L.displayName = "Badge";
142
- const V = x, W = [
142
+ const V = y, W = [
143
143
  "default",
144
144
  "processing",
145
145
  "success",