@unicom-cloud/ui 0.8.81 → 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 (262) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +1 -1
  3. package/AutoComplete.js +2 -2
  4. package/BackTop.js +2 -2
  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/SpeechSynthesis.js +1 -1
  52. package/Spin.js +1 -1
  53. package/Statistic.js +2 -2
  54. package/Steps.js +1 -1
  55. package/Switch.js +1 -1
  56. package/Table.js +1 -1
  57. package/Tabs.js +1 -1
  58. package/Tag.js +1 -1
  59. package/Tooltip.js +1 -1
  60. package/Transfer.js +2 -2
  61. package/Tree.js +1 -1
  62. package/TreeSelect.js +1 -1
  63. package/Trigger.js +1 -1
  64. package/Typography.js +1 -1
  65. package/affix/index.js +60 -57
  66. package/alert/index.js +53 -53
  67. package/anchor/Anchor.js +72 -72
  68. package/anchor/Link.js +27 -27
  69. package/anchor/util.js +1 -1
  70. package/auto-complete/index.js +2 -2
  71. package/avatar/Avatar.js +31 -31
  72. package/avatar/Group.js +25 -25
  73. package/back-top/index.js +30 -30
  74. package/badge/index.js +37 -37
  75. package/breadcrumb/index.js +26 -26
  76. package/button/Group.js +7 -7
  77. package/button/index.js +29 -29
  78. package/calendar/index.js +2 -2
  79. package/card/Grid.js +12 -12
  80. package/card/Meta.js +17 -17
  81. package/card/index.js +44 -44
  82. package/carousel/Arrow.js +19 -19
  83. package/carousel/Indicator.js +25 -25
  84. package/carousel/index.js +77 -77
  85. package/cascader/Cascader.js +2 -2
  86. package/cascader/index.js +1 -1
  87. package/cascader/util.js +1 -1
  88. package/checkbox/Checkbox.js +2 -2
  89. package/checkbox/Group.js +2 -2
  90. package/checkbox/GroupBlock.js +2 -2
  91. package/checkbox/index.js +2 -2
  92. package/chunk/{yLRv5RIK.js → CQI1gsQs.js} +181 -181
  93. package/chunk/CmMehQON.js +1464 -0
  94. package/chunk/Cplu5dtQ.js +730 -0
  95. package/chunk/{C5X4hOkx.js → D0338Pbq.js} +80 -80
  96. package/chunk/{DYspELhF.js → DXDbeIai.js} +223 -223
  97. package/chunk/{DEiyXzBZ.js → DfrB26fI.js} +63 -63
  98. package/chunk/{BG7YGUsx.js → dKvAiKxr.js} +119 -119
  99. package/chunk/{BNevupAU.js → uKZyjtff.js} +5 -4
  100. package/chunk/{DLBfXSnU.js → w221i0nK.js} +2872 -2871
  101. package/collapse/Collapse.js +2 -2
  102. package/collapse/Item.js +2 -2
  103. package/collapse/index.js +1 -1
  104. package/color-picker/ControlBar.js +36 -36
  105. package/color-picker/InputAlpha.js +11 -11
  106. package/color-picker/InputHex.js +24 -24
  107. package/color-picker/InputRgb.js +23 -23
  108. package/color-picker/Palette.js +18 -18
  109. package/color-picker/Panel.js +2 -2
  110. package/color-picker/index.js +2 -2
  111. package/comment/index.js +31 -31
  112. package/config-provider/ConfigProvider.js +5 -4
  113. package/config-provider/context.js +2 -2
  114. package/config-provider/index.js +4 -3
  115. package/copy/index.js +28 -28
  116. package/date-picker/Picker.js +276 -276
  117. package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
  118. package/date-picker/index.js +26 -27
  119. package/descriptions/index.js +33 -33
  120. package/divider/index.js +12 -12
  121. package/draggable/index.js +23 -23
  122. package/drawer/Drawer.js +81 -81
  123. package/dropdown/Button.js +1 -1
  124. package/dropdown/index.js +56 -56
  125. package/empty/index.js +1 -1
  126. package/form/Form.js +76 -76
  127. package/form/FormItem.js +64 -64
  128. package/grid/Col.js +53 -53
  129. package/grid/Row.js +34 -34
  130. package/grid/grid-item.js +29 -29
  131. package/grid/grid.js +50 -50
  132. package/icon/index.js +20 -19
  133. package/icon-hover/index.js +1 -1
  134. package/image/Image.js +86 -86
  135. package/image/ImagePreview.js +2 -2
  136. package/image/ImagePreviewArrow.js +22 -22
  137. package/image/ImagePreviewGroup.js +1 -1
  138. package/image/index.js +1 -1
  139. package/index.js +410 -408
  140. package/input/Group.js +8 -8
  141. package/input/Input.js +322 -322
  142. package/input/InputElement.js +1 -1
  143. package/input/Password.js +1 -1
  144. package/input/Search.js +1 -1
  145. package/input/Textarea.js +1 -1
  146. package/input-number/index.js +1 -1
  147. package/input-tag/InputTag.js +40 -40
  148. package/layout/Content.js +7 -7
  149. package/layout/Footer.js +9 -9
  150. package/layout/Header.js +7 -7
  151. package/layout/Sider.js +55 -55
  152. package/layout/index.js +32 -32
  153. package/link/index.js +35 -35
  154. package/list/Item.js +29 -29
  155. package/list/Meta.js +12 -12
  156. package/list/index.js +2 -2
  157. package/mentions/index.js +2 -2
  158. package/menu/Menu.js +2 -2
  159. package/menu/OverflowWrap.js +1 -1
  160. package/menu/index.js +2 -2
  161. package/message/index.js +1 -1
  162. package/message/useMessage.js +1 -1
  163. package/modal/Confirm.js +2 -2
  164. package/modal/Modal.js +2 -2
  165. package/modal/index.js +1 -1
  166. package/notice/index.js +1 -1
  167. package/notification/index.js +5 -5
  168. package/notification/useNotification.js +1 -1
  169. package/overflow-ellipsis/OverflowItem.js +12 -12
  170. package/overflow-ellipsis/index.js +24 -24
  171. package/package.json +1 -1
  172. package/page-header/index.js +38 -38
  173. package/pagination/PageItem.js +16 -16
  174. package/pagination/PageJumper.js +1 -1
  175. package/pagination/PageOption.js +2 -2
  176. package/pagination/Pagination.js +2 -2
  177. package/pagination/index.js +1 -1
  178. package/picker/Input.js +69 -69
  179. package/picker/InputRange.js +111 -111
  180. package/popconfirm/index.js +61 -61
  181. package/popover/index.js +35 -35
  182. package/progress/index.js +22 -22
  183. package/radio/Group.js +2 -2
  184. package/radio/GroupBlock.js +2 -2
  185. package/radio/Radio.js +2 -2
  186. package/radio/index.js +2 -2
  187. package/rate/index.js +49 -49
  188. package/resize-box/ResizeTrigger.js +34 -34
  189. package/resize-box/Split.js +56 -56
  190. package/resize-box/SplitGroup.js +55 -55
  191. package/resize-box/index.js +51 -51
  192. package/result/index.js +41 -41
  193. package/select/Option.js +1 -1
  194. package/select/Select.js +2 -2
  195. package/select/index.js +2 -2
  196. package/select/util.js +1 -1
  197. package/select-view/Core.js +125 -125
  198. package/skeleton/index.js +20 -20
  199. package/slider/Button.js +57 -57
  200. package/slider/index.js +116 -116
  201. package/space/index.js +46 -44
  202. package/speech-synthesis/index.js +1 -1
  203. package/spin/DotLoading.js +10 -10
  204. package/spin/index.js +44 -44
  205. package/statistic/Countdown.js +34 -34
  206. package/statistic/index.js +67 -67
  207. package/steps/index.js +55 -55
  208. package/style.css +1 -1
  209. package/switch/index.js +54 -54
  210. package/table/Table.js +3 -3
  211. package/table/index.js +1 -1
  212. package/tabs/Tab.js +2 -2
  213. package/tabs/TabContent.js +2 -2
  214. package/tabs/TabPane.js +12 -12
  215. package/tabs/index.js +2 -2
  216. package/tag/index.js +45 -45
  217. package/time-picker/Picker.js +76 -76
  218. package/time-picker/TimePicker.js +136 -136
  219. package/time-picker/index.js +8 -8
  220. package/time-picker/util.js +5 -5
  221. package/timeline/Item.js +47 -47
  222. package/timeline/Timeline.js +41 -41
  223. package/tooltip/index.js +29 -29
  224. package/transfer/Item.js +2 -2
  225. package/transfer/List.js +2 -2
  226. package/transfer/index.js +2 -2
  227. package/tree/Animation.js +2 -2
  228. package/tree/Node.js +2 -2
  229. package/tree/NodeList.js +1 -1
  230. package/tree/Tree.js +2 -2
  231. package/tree/index.js +1 -1
  232. package/tree-select/List.js +1 -1
  233. package/tree-select/Select.js +2 -2
  234. package/tree-select/index.js +2 -2
  235. package/trigger/index.js +60 -60
  236. package/types/config-provider/ConfigProvider.d.ts +2 -2
  237. package/types/config-provider/context.d.ts +1 -1
  238. package/types/date-picker/index.d.ts +8 -9
  239. package/types/date-picker/interface.d.ts +9 -9
  240. package/types/index.d.ts +1 -1
  241. package/types/picker/Input.d.ts +2 -2
  242. package/types/space/index.d.ts +2 -1
  243. package/types/utils/names.d.ts +1 -1
  244. package/typography/Base.js +53 -53
  245. package/typography/Ellipsis.js +9 -8
  246. package/typography/Operations.js +28 -28
  247. package/typography/Paragraph.js +8 -8
  248. package/typography/Typography.js +7 -7
  249. package/typography/index.js +1 -1
  250. package/upload/TriggerNode.js +47 -47
  251. package/upload/Upload.js +184 -184
  252. package/utils/contextHolder.js +3 -3
  253. package/utils/index.js +13 -13
  254. package/utils/names.js +1 -1
  255. package/utils/setPrimaryColor.js +18 -13
  256. package/utils/tween.js +1 -1
  257. package/verification-code/VerificationCode.js +49 -49
  258. package/version/index.js +1 -1
  259. package/watermark/Watermark.js +24 -24
  260. package/chunk/CQvM33Vg.js +0 -724
  261. package/chunk/yhU2zeeu.js +0 -1461
  262. /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
package/Transfer.js CHANGED
@@ -4,12 +4,12 @@ import "@unicom-cloud/icons/IconUiRight";
4
4
  import "lodash/isPlainObject";
5
5
  import "react";
6
6
  import "./button/index.js";
7
- import "./chunk/CQvM33Vg.js";
7
+ import "./chunk/Cplu5dtQ.js";
8
8
  import "./chunk/BFTV6myl.js";
9
9
  import "./chunk/CXPOj2uy.js";
10
10
  import "@unicom-cloud/utils/class-name";
11
11
  import "./chunk/ClqoGc3r.js";
12
- import { r as x } from "./chunk/DLBfXSnU.js";
12
+ import { r as x } from "./chunk/w221i0nK.js";
13
13
  export {
14
14
  x as default
15
15
  };
package/Tree.js CHANGED
@@ -1,4 +1,4 @@
1
- import { N as o, s as r } from "./chunk/DLBfXSnU.js";
1
+ import { N as o, s as r } from "./chunk/w221i0nK.js";
2
2
  export {
3
3
  o as TreeNode,
4
4
  r as default
package/TreeSelect.js CHANGED
@@ -1,4 +1,4 @@
1
- import { v as t, t as a } from "./chunk/DLBfXSnU.js";
1
+ import { v as t, t as a } from "./chunk/w221i0nK.js";
2
2
  export {
3
3
  t as TreeSelectTreeNode,
4
4
  a as default
package/Trigger.js CHANGED
@@ -4,7 +4,7 @@ import "lodash/isArray";
4
4
  import "lodash/isFunction";
5
5
  import "react";
6
6
  import "react-dom";
7
- import "./chunk/CQvM33Vg.js";
7
+ import "./chunk/Cplu5dtQ.js";
8
8
  import "@unicom-cloud/utils/class-name";
9
9
  import "./utils/dom.js";
10
10
  import "./chunk/ClM74To2.js";
package/Typography.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as o, w as t } from "./chunk/DLBfXSnU.js";
1
+ import { E as o, w as t } from "./chunk/w221i0nK.js";
2
2
  import { default as f } from "./typography/Paragraph.js";
3
3
  import { default as l } from "./typography/Text.js";
4
4
  import { default as T } from "./typography/Title.js";
package/affix/index.js CHANGED
@@ -1,57 +1,60 @@
1
- import { jsxs as L, jsx as E } from "react/jsx-runtime";
2
- import h from "lodash/isFunction";
3
- import P from "lodash/isPlainObject";
4
- import q from "lodash/isUndefined";
5
- import { forwardRef as G, useContext as J, useState as K, useRef as C, useMemo as Q, useCallback as V, useEffect as m, useImperativeHandle as X } from "react";
6
- import { a as Y } from "../chunk/CQvM33Vg.js";
7
- import { u as Z } from "../chunk/B2yFlXke.js";
1
+ import { jsxs as k, jsx as h } from "react/jsx-runtime";
2
+ import N from "lodash/isFunction";
3
+ import q from "lodash/isPlainObject";
4
+ import G from "lodash/isUndefined";
5
+ import { forwardRef as J, useContext as K, useState as Q, useRef as b, useMemo as V, useCallback as X, useEffect as m, useImperativeHandle as Y } from "react";
6
+ import { a as Z } from "../chunk/Cplu5dtQ.js";
7
+ import { u as P } from "../chunk/B2yFlXke.js";
8
8
  import { u as tt } from "../chunk/BFTV6myl.js";
9
- import M from "@unicom-cloud/utils/class-name";
10
- import { getScrollElements as et, on as N, off as p } from "../utils/dom.js";
9
+ import v from "@unicom-cloud/utils/class-name";
10
+ import { getScrollElements as et, on as A, off as p } from "../utils/dom.js";
11
11
  import { l as rt } from "../chunk/ClM74To2.js";
12
12
  import { r as st } from "../chunk/CIRG541s.js";
13
13
  import ot from "../utils/throttleByRaf.js";
14
- function nt(c) {
15
- return rt(c) ? {
14
+ function nt(i) {
15
+ return rt(i) ? {
16
16
  top: 0,
17
17
  bottom: window.innerHeight
18
- } : c.getBoundingClientRect();
18
+ } : i instanceof HTMLElement ? i.getBoundingClientRect() : {
19
+ top: 0,
20
+ bottom: 0
21
+ };
19
22
  }
20
23
  const it = {
21
24
  offsetTop: 0
22
25
  };
23
- function ft(c, v) {
24
- const { getPrefixCls: O, componentConfig: d, rtl: U } = J(Y), _ = tt(
25
- c,
26
+ function ft(i, H) {
27
+ const { getPrefixCls: d, componentConfig: x, rtl: O } = K(Z), U = tt(
28
+ i,
26
29
  it,
27
- d == null ? void 0 : d.Affix
30
+ x == null ? void 0 : x.Affix
28
31
  ), {
29
- className: B,
30
- style: H,
32
+ className: _,
33
+ style: B,
31
34
  affixClassName: I,
32
- affixStyle: A,
35
+ affixStyle: C,
33
36
  offsetTop: l,
34
- offsetBottom: i,
35
- target: x,
37
+ offsetBottom: f,
38
+ target: S,
36
39
  targetContainer: a,
37
40
  children: j,
38
- onChange: S,
41
+ onChange: y,
39
42
  ...D
40
- } = _, [g, b] = K({
43
+ } = U, [g, T] = Q({
41
44
  status: "MEASURE_DONE",
42
45
  isFixed: !1,
43
46
  sizeStyles: {},
44
47
  fixedStyles: {}
45
- }), { isFixed: y, sizeStyles: W, fixedStyles: $ } = g, z = C(y), F = O("affix"), k = M(
46
- { [F]: y, [`${F}-rtl`]: U },
48
+ }), { isFixed: R, sizeStyles: L, fixedStyles: W } = g, z = b(R), F = d == null ? void 0 : d("affix"), $ = v(
49
+ { [F]: R, [`${F}-rtl`]: O },
47
50
  I
48
- ), r = C(null), s = C(null), R = Q(() => {
49
- var n, f;
51
+ ), r = b(null), s = b(null), w = V(() => {
52
+ var n, c;
50
53
  let e = null;
51
- return h(x) ? e = x() : e = ((f = (n = et(r.current)) == null ? void 0 : n.at) == null ? void 0 : f.call(n, -1)) || window, e;
52
- }, [r.current, x]), t = V(
54
+ return N(S) ? e = S() : e = ((c = (n = et(r.current)) == null ? void 0 : n.at) == null ? void 0 : c.call(n, -1)) || window, e;
55
+ }, [r.current, S]), t = X(
53
56
  ot(() => {
54
- b({
57
+ T({
55
58
  status: "MEASURE_START",
56
59
  isFixed: !1,
57
60
  fixedStyles: {},
@@ -60,45 +63,45 @@ function ft(c, v) {
60
63
  }),
61
64
  []
62
65
  );
63
- return Z(() => {
66
+ return P(() => {
64
67
  const { status: e } = g;
65
68
  if (e !== "MEASURE_START" || !r.current || !s.current)
66
69
  return;
67
- const n = q(i) ? "top" : "bottom", f = r.current.getBoundingClientRect(), u = nt(s.current);
68
- let o = !1, w = {};
69
- n === "top" ? (o = f.top - u.top < (l || 0), w = o ? {
70
+ const n = G(f) ? "top" : "bottom", c = r.current.getBoundingClientRect(), u = nt(s.current);
71
+ let o = !1, E = {};
72
+ n === "top" ? (o = c.top - u.top < (l || 0), E = o ? {
70
73
  position: "fixed",
71
74
  top: u.top + (l || 0)
72
- } : {}) : (o = u.bottom - f.bottom < (i || 0), w = o ? {
75
+ } : {}) : (o = u.bottom - c.bottom < (f || 0), E = o ? {
73
76
  position: "fixed",
74
- bottom: window.innerHeight - u.bottom + (i || 0)
77
+ bottom: window.innerHeight - u.bottom + (f || 0)
75
78
  } : {});
76
- const T = o ? {
79
+ const M = o ? {
77
80
  width: r.current.offsetWidth,
78
81
  height: r.current.offsetHeight
79
82
  } : {};
80
- b({
83
+ T({
81
84
  status: "MEASURE_DONE",
82
85
  isFixed: o,
83
- sizeStyles: T,
84
- fixedStyles: { ...w, ...T }
85
- }), o !== z.current && (z.current = o, h(S) && S(o));
86
- }, [g, i, l, S]), m(() => (t(), () => {
86
+ sizeStyles: M,
87
+ fixedStyles: { ...E, ...M }
88
+ }), o !== z.current && (z.current = o, N(y) && y(o));
89
+ }, [g, f, l, y]), m(() => (t(), () => {
87
90
  var e;
88
91
  (e = t == null ? void 0 : t.cancel) == null || e.call(t);
89
- }), [R, a, i, l, t]), m(() => {
90
- if (s.current = R, s.current)
91
- return N(s.current, "scroll", t), N(s.current, "resize", t), () => {
92
+ }), [w, a, f, l, t]), m(() => {
93
+ if (s.current = w, s.current)
94
+ return A(s.current, "scroll", t), A(s.current, "resize", t), () => {
92
95
  p(s.current, "scroll", t), p(s.current, "resize", t);
93
96
  };
94
- }, [R, t]), m(() => {
95
- const e = h(a) ? a() : null;
96
- return s.current !== window && e ? (N(e, "scroll", t), () => {
97
+ }, [w, t]), m(() => {
98
+ const e = N(a) ? a() : null;
99
+ return s.current !== window && e ? (A(e, "scroll", t), () => {
97
100
  p(e, "scroll", t);
98
101
  }) : () => {
99
102
  p(e, "scroll", t);
100
103
  };
101
- }, [a, t]), X(v, () => ({
104
+ }, [a, t]), Y(H, () => ({
102
105
  updatePosition: t,
103
106
  getRootDOMNode: () => r.current
104
107
  })), m(() => {
@@ -106,22 +109,22 @@ function ft(c, v) {
106
109
  return () => {
107
110
  e();
108
111
  };
109
- }, [r.current]), /* @__PURE__ */ L("div", { className: M(B), style: H, ref: r, ...D, children: [
110
- y && /* @__PURE__ */ E("div", { style: W }),
111
- /* @__PURE__ */ E(
112
+ }, [r.current]), /* @__PURE__ */ k("div", { className: v(_), style: B, ref: r, ...D, children: [
113
+ R && /* @__PURE__ */ h("div", { style: L }),
114
+ /* @__PURE__ */ h(
112
115
  "div",
113
116
  {
114
- className: k,
117
+ className: $,
115
118
  style: {
116
- ...$,
117
- ...P(A) ? A : {}
119
+ ...W,
120
+ ...q(C) ? C : {}
118
121
  },
119
- children: j || /* @__PURE__ */ E("span", {})
122
+ children: j || /* @__PURE__ */ h("span", {})
120
123
  }
121
124
  )
122
125
  ] });
123
126
  }
124
- const ct = G(
127
+ const ct = J(
125
128
  ft
126
129
  );
127
130
  ct.displayName = "Affix";
package/alert/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
- import S from "@unicom-cloud/icons/IconUiCheckCircleFill";
3
- import j from "@unicom-cloud/icons/IconUiClose";
4
- import k from "@unicom-cloud/icons/IconUiCloseCircleFill";
5
- import R from "@unicom-cloud/icons/IconUiExclamationCircleFill";
6
- import T from "@unicom-cloud/icons/IconUiInfoCircleFill";
1
+ import { jsx as t, jsxs as d } from "react/jsx-runtime";
2
+ import j from "@unicom-cloud/icons/IconUiCheckCircleFill";
3
+ import k from "@unicom-cloud/icons/IconUiClose";
4
+ import R from "@unicom-cloud/icons/IconUiCloseCircleFill";
5
+ import T from "@unicom-cloud/icons/IconUiExclamationCircleFill";
6
+ import g from "@unicom-cloud/icons/IconUiInfoCircleFill";
7
7
  import { forwardRef as q, useRef as z, useContext as H, useState as M } from "react";
8
- import { a as O } from "../chunk/CQvM33Vg.js";
8
+ import { a as O } from "../chunk/Cplu5dtQ.js";
9
9
  import { u as V } from "../chunk/BFTV6myl.js";
10
10
  import _ from "@unicom-cloud/utils/class-name";
11
11
  import { P as B } from "../chunk/NPajzdOv.js";
@@ -13,90 +13,90 @@ const D = {
13
13
  showIcon: !0,
14
14
  type: "info"
15
15
  };
16
- function G(d, l) {
17
- l || (l = z());
18
- const { getPrefixCls: h, componentConfig: o, rtl: C } = H(O), c = V(
19
- d,
16
+ function G(h, c) {
17
+ c || (c = z());
18
+ const { getPrefixCls: o, componentConfig: r, rtl: N } = H(O), a = V(
19
+ h,
20
20
  D,
21
- o == null ? void 0 : o.Alert
21
+ r == null ? void 0 : r.Alert
22
22
  ), {
23
- style: N,
24
- className: b,
25
- action: a,
26
- type: m = "info",
27
- title: r,
28
- content: u,
23
+ style: b,
24
+ className: $,
25
+ action: m,
26
+ type: u = "info",
27
+ title: n,
28
+ content: p,
29
29
  icon: f,
30
- showIcon: $,
31
- closable: x,
32
- closeable: I,
33
- afterClose: n,
34
- onClose: s,
35
- closeElement: w,
30
+ showIcon: C,
31
+ closable: I,
32
+ closeable: w,
33
+ afterClose: s,
34
+ onClose: i,
35
+ closeElement: x,
36
36
  banner: v,
37
37
  ...y
38
- } = c, e = h("alert"), [P, U] = M(!0);
39
- function A(i) {
38
+ } = a, e = o == null ? void 0 : o("alert"), [U, A] = M(!0);
39
+ function E(l) {
40
40
  if (f)
41
41
  return f;
42
- switch (i) {
42
+ switch (l) {
43
43
  case "info":
44
- return /* @__PURE__ */ t(T, {});
44
+ return /* @__PURE__ */ t(g, {});
45
45
  case "success":
46
- return /* @__PURE__ */ t(S, {});
46
+ return /* @__PURE__ */ t(j, {});
47
47
  case "warning":
48
- return /* @__PURE__ */ t(R, {});
48
+ return /* @__PURE__ */ t(T, {});
49
49
  case "error":
50
- return /* @__PURE__ */ t(k, {});
50
+ return /* @__PURE__ */ t(R, {});
51
51
  default:
52
52
  return null;
53
53
  }
54
54
  }
55
- function E(i) {
56
- U(!1), s == null || s(i);
55
+ function F(l) {
56
+ A(!1), i == null || i(l);
57
57
  }
58
- const F = _(
58
+ const P = _(
59
59
  e,
60
- `${e}-${m}`,
60
+ `${e}-${u}`,
61
61
  {
62
- [`${e}-with-title`]: r,
62
+ [`${e}-with-title`]: n,
63
63
  [`${e}-banner`]: v,
64
- [`${e}-rtl`]: C
64
+ [`${e}-rtl`]: N
65
65
  },
66
- b
67
- ), g = "closeable" in c ? I : x;
66
+ $
67
+ ), S = "closeable" in a ? w : I;
68
68
  return /* @__PURE__ */ t(
69
69
  B,
70
70
  {
71
- in: P,
71
+ in: U,
72
72
  timeout: 300,
73
73
  classNames: "zoomInTop",
74
74
  unmountOnExit: !0,
75
75
  onExited: () => {
76
- n == null || n();
76
+ s == null || s();
77
77
  },
78
- children: /* @__PURE__ */ p(
78
+ children: /* @__PURE__ */ d(
79
79
  "div",
80
80
  {
81
- ref: l,
82
- style: N,
83
- className: F,
81
+ ref: c,
82
+ style: b,
83
+ className: P,
84
84
  role: "alert",
85
85
  ...y,
86
86
  children: [
87
- $ && /* @__PURE__ */ t("div", { className: `${e}-icon-wrapper`, children: A(m) }),
88
- /* @__PURE__ */ p("div", { className: `${e}-content-wrapper`, children: [
89
- r && /* @__PURE__ */ t("div", { className: `${e}-title`, children: r }),
90
- u && /* @__PURE__ */ t("div", { className: `${e}-content`, children: u })
87
+ C && /* @__PURE__ */ t("div", { className: `${e}-icon-wrapper`, children: E(u) }),
88
+ /* @__PURE__ */ d("div", { className: `${e}-content-wrapper`, children: [
89
+ n && /* @__PURE__ */ t("div", { className: `${e}-title`, children: n }),
90
+ p && /* @__PURE__ */ t("div", { className: `${e}-content`, children: p })
91
91
  ] }),
92
- a && /* @__PURE__ */ t("div", { className: `${e}-action`, children: a }),
93
- g && /* @__PURE__ */ t(
92
+ m && /* @__PURE__ */ t("div", { className: `${e}-action`, children: m }),
93
+ S && /* @__PURE__ */ t(
94
94
  "button",
95
95
  {
96
96
  type: "button",
97
- onClick: E,
97
+ onClick: F,
98
98
  className: `${e}-close-btn`,
99
- children: w || /* @__PURE__ */ t(j, {})
99
+ children: x || /* @__PURE__ */ t(k, {})
100
100
  }
101
101
  )
102
102
  ]
package/anchor/Anchor.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { jsxs as mt, jsx as w } from "react/jsx-runtime";
2
2
  import { compute as dt } from "../utils/computeScrollIntoView.js";
3
3
  import { p as pt } from "../chunk/Coz3rCng.js";
4
- import D from "lodash/isFunction";
5
- import P from "lodash/isNumber";
4
+ import _ from "lodash/isFunction";
5
+ import E from "lodash/isNumber";
6
6
  import gt from "lodash/throttle";
7
- import { forwardRef as ht, useContext as Ct, useRef as x, useState as xt, useEffect as N, useCallback as S, useImperativeHandle as kt } from "react";
7
+ import { forwardRef as ht, useContext as Ct, useRef as k, useState as kt, useEffect as N, useCallback as S, useImperativeHandle as xt } from "react";
8
8
  import yt from "../affix/index.js";
9
- import { a as Lt } from "../chunk/CQvM33Vg.js";
9
+ import { a as Lt } from "../chunk/Cplu5dtQ.js";
10
10
  import { u as Rt } from "../chunk/oopARUrq.js";
11
11
  import { u as wt } from "../chunk/BFTV6myl.js";
12
12
  import { u as Nt } from "../chunk/Duezix3m.js";
@@ -15,108 +15,108 @@ import { on as $t, off as At } from "../utils/dom.js";
15
15
  import { l as Tt } from "../chunk/ClM74To2.js";
16
16
  import vt from "./context.js";
17
17
  import bt from "./Link.js";
18
- import { findNode as M, getContainerElement as Pt, getContainer as Mt, getScrollParent as Et, slide as Ft } from "./util.js";
18
+ import { findNode as P, getContainerElement as Mt, getContainer as Et, getScrollParent as Pt, slide as Ft } from "./util.js";
19
19
  const It = {
20
20
  animation: !0,
21
21
  affix: !0,
22
22
  hash: !0,
23
23
  boundary: "start"
24
24
  };
25
- function Ht(q, G) {
26
- const { getPrefixCls: J, componentConfig: $, rtl: E } = Ct(Lt), K = wt(
27
- q,
25
+ function Ht(G, J) {
26
+ const { getPrefixCls: $, componentConfig: A, rtl: F } = Ct(Lt), K = wt(
27
+ G,
28
28
  It,
29
- $ == null ? void 0 : $.Anchor
29
+ A == null ? void 0 : A.Anchor
30
30
  ), {
31
31
  className: Q,
32
32
  style: X,
33
33
  scrollContainer: m,
34
34
  animation: Y = !0,
35
- lineless: k,
35
+ lineless: x,
36
36
  affix: Z = !0,
37
37
  affixStyle: tt,
38
38
  offsetBottom: et,
39
39
  offsetTop: nt,
40
- hash: F = !0,
40
+ hash: I = !0,
41
41
  boundary: i = "start",
42
- targetOffset: A,
42
+ targetOffset: T,
43
43
  children: rt,
44
44
  direction: y = "vertical",
45
- onSelect: I,
46
- onChange: T,
45
+ onSelect: H,
46
+ onChange: v,
47
47
  ...ot
48
- } = K, f = J("anchor"), it = St(f, Q, {
49
- [`${f}-lineless`]: k,
50
- [`${f}-rtl`]: E,
51
- [`${f}-horizontal`]: y === "horizontal"
52
- }), s = x(null), d = x(null), a = x(/* @__PURE__ */ new Map()), v = x(!1), p = x(null), [st, H] = xt(0), [o, ct] = Nt(""), lt = Rt();
53
- function O() {
54
- let t = Mt(m);
55
- return m || (t = Et(s.current)), t;
48
+ } = K, a = $ == null ? void 0 : $("anchor"), it = St(a, Q, {
49
+ [`${a}-lineless`]: x,
50
+ [`${a}-rtl`]: F,
51
+ [`${a}-horizontal`]: y === "horizontal"
52
+ }), s = k(null), d = k(null), f = k(/* @__PURE__ */ new Map()), b = k(!1), p = k(null), [st, O] = kt(0), [o, ct] = Nt(""), lt = Rt();
53
+ function z() {
54
+ let t = Et(m);
55
+ return m || (t = Pt(s.current)), t;
56
56
  }
57
57
  N(() => {
58
- const t = O();
58
+ const t = z();
59
59
  p.current = t;
60
60
  }, [m]);
61
- const ft = S(() => O(), [m]);
62
- kt(
63
- G,
61
+ const at = S(() => z(), [m]);
62
+ xt(
63
+ J,
64
64
  () => ({
65
65
  dom: s.current,
66
66
  getRootDOMNode: () => s.current
67
67
  }),
68
68
  []
69
69
  );
70
- function z(t, e) {
71
- t && (a.current.set(t, e), H(Math.random()));
70
+ function B(t, e) {
71
+ t && (f.current.set(t, e), O(Math.random()));
72
72
  }
73
- function at(t) {
74
- a.current.delete(t), H(Math.random());
73
+ function ft(t) {
74
+ f.current.delete(t), O(Math.random());
75
75
  }
76
76
  const L = S(
77
77
  (t) => {
78
78
  if (!t || !s.current)
79
79
  return;
80
- if (!a.current.has(t)) {
81
- const n = M(s.current, `a[data-href='${t}']`);
82
- n && z(t, n);
80
+ if (!f.current.has(t)) {
81
+ const n = P(s.current, `a[data-href='${t}']`);
82
+ n && B(t, n);
83
83
  }
84
- const e = a.current.get(t);
84
+ const e = f.current.get(t);
85
85
  e && t !== o && (pt(e, {
86
86
  behavior: "auto",
87
87
  block: "nearest",
88
88
  scrollMode: "if-needed",
89
89
  boundary: s.current
90
90
  }), ct(t).then(() => {
91
- D(T) && T(t, o);
91
+ _(v) && v(t, o);
92
92
  }));
93
93
  },
94
- [o, T]
95
- ), B = S(() => {
94
+ [o, v]
95
+ ), U = S(() => {
96
96
  let t;
97
- const e = P(i) ? i : 0, n = p.current, h = Pt(n).getBoundingClientRect(), R = document.documentElement.clientHeight;
98
- return [...a.current.keys()].some((b) => {
99
- const c = M(document, b);
97
+ const e = E(i) ? i : 0, n = p.current, h = Mt(n).getBoundingClientRect(), R = document.documentElement.clientHeight;
98
+ return [...f.current.keys()].some((M) => {
99
+ const c = P(document, M);
100
100
  let u = !1;
101
101
  if (c) {
102
102
  const { top: r, height: C } = c.getBoundingClientRect();
103
103
  if (Tt(n)) {
104
- const l = A ?? R / 2;
104
+ const l = T ?? R / 2;
105
105
  u = r >= e && r <= l || r <= e && r + C >= l;
106
106
  } else {
107
- const l = r - h.top - e, j = A ?? h.height / 2;
108
- u = l >= 0 && l <= j || l <= 0 && l + C >= j;
107
+ const l = r - h.top - e, D = T ?? h.height / 2;
108
+ u = l >= 0 && l <= D || l <= 0 && l + C >= D;
109
109
  }
110
110
  u && (t = c);
111
111
  }
112
112
  return u;
113
113
  }), t;
114
- }, [i, A]), g = S(
114
+ }, [i, T]), g = S(
115
115
  gt(
116
116
  (t) => {
117
- if (v.current)
117
+ if (b.current)
118
118
  return;
119
- const e = B();
119
+ const e = U();
120
120
  if (e && e.id) {
121
121
  const n = `#${e.id}`;
122
122
  L(n);
@@ -125,29 +125,29 @@ function Ht(q, G) {
125
125
  30,
126
126
  { trailing: !0 }
127
127
  ),
128
- [B, L]
128
+ [U, L]
129
129
  );
130
- function U(t) {
130
+ function V(t) {
131
131
  if (t)
132
132
  try {
133
- const e = M(document, t);
133
+ const e = P(document, t);
134
134
  if (!e)
135
135
  return;
136
- const n = P(i) ? "start" : i, W = P(i) ? i : 0, h = dt(e, { block: n });
136
+ const n = E(i) ? "start" : i, j = E(i) ? i : 0, h = dt(e, { block: n });
137
137
  if (!h.length)
138
138
  return;
139
139
  let R = !1;
140
- const b = h.map(({ el: c, top: u }) => new Promise((r) => {
140
+ const M = h.map(({ el: c, top: u }) => new Promise((r) => {
141
141
  if (!R) {
142
142
  c === p.current && (R = !0);
143
- const C = u - W;
144
- return Y ? Ft(c, C, r) : (F || (c.scrollTop = C), r(null));
143
+ const C = u - j;
144
+ return Y ? Ft(c, C, r) : (I || (c.scrollTop = C), r(null));
145
145
  }
146
146
  r(null);
147
147
  }));
148
- v.current = !0, Promise.all(b).then(() => {
148
+ b.current = !0, Promise.all(M).then(() => {
149
149
  setTimeout(() => {
150
- v.current = !1;
150
+ b.current = !1;
151
151
  }, 27);
152
152
  });
153
153
  } catch (e) {
@@ -155,30 +155,30 @@ function Ht(q, G) {
155
155
  }
156
156
  }
157
157
  function ut(t, e) {
158
- F || t.preventDefault(), L(e), U(e), D(I) && I(e, o);
158
+ I || t.preventDefault(), L(e), V(e), _(H) && H(e, o);
159
159
  }
160
160
  N(() => {
161
161
  const t = decodeURIComponent(location.hash);
162
- t ? (L(t), U(t)) : g(null);
162
+ t ? (L(t), V(t)) : g(null);
163
163
  }, []), N(() => (lt || g(null), $t(p.current, "scroll", g), () => {
164
164
  At(p.current, "scroll", g);
165
165
  }), [m, g]), N(() => {
166
- const t = a.current.get(o);
167
- t && !k && d.current && (y === "horizontal" ? (d.current.style.left = `${t.offsetLeft}px`, d.current.style.width = `${t.clientWidth}px`) : d.current.style.top = `${t.offsetTop}px`);
168
- }, [o, k, y, E, st]);
169
- const V = /* @__PURE__ */ mt("div", { className: it, style: X, ref: s, ...ot, children: [
170
- !k && o && /* @__PURE__ */ w("div", { className: `${f}-line-slider`, ref: d }),
166
+ const t = f.current.get(o);
167
+ t && !x && d.current && (y === "horizontal" ? (d.current.style.left = `${t.offsetLeft}px`, d.current.style.width = `${t.clientWidth}px`) : d.current.style.top = `${t.offsetTop}px`);
168
+ }, [o, x, y, F, st]);
169
+ const W = /* @__PURE__ */ mt("div", { className: it, style: X, ref: s, ...ot, children: [
170
+ !x && o && /* @__PURE__ */ w("div", { className: `${a}-line-slider`, ref: d }),
171
171
  /* @__PURE__ */ w(
172
172
  vt.Provider,
173
173
  {
174
174
  value: {
175
175
  direction: y,
176
176
  currentLink: o,
177
- addLink: z,
178
- removeLink: at,
177
+ addLink: B,
178
+ removeLink: ft,
179
179
  onLinkClick: ut
180
180
  },
181
- children: /* @__PURE__ */ w("div", { className: `${f}-list`, children: rt })
181
+ children: /* @__PURE__ */ w("div", { className: `${a}-list`, children: rt })
182
182
  }
183
183
  )
184
184
  ] });
@@ -188,14 +188,14 @@ function Ht(q, G) {
188
188
  offsetTop: nt,
189
189
  offsetBottom: et,
190
190
  style: tt,
191
- target: ft,
192
- children: V
191
+ target: at,
192
+ children: W
193
193
  }
194
- ) : V;
194
+ ) : W;
195
195
  }
196
- const Ot = ht(Ht), _ = Ot;
197
- _.displayName = "Anchor";
198
- _.Link = bt;
196
+ const Ot = ht(Ht), q = Ot;
197
+ q.displayName = "Anchor";
198
+ q.Link = bt;
199
199
  export {
200
- _ as default
200
+ q as default
201
201
  };