@unicom-cloud/ui 0.8.82 → 0.8.83

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 +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 +1 -1
  17. package/Copy.js +1 -1
  18. package/DatePicker.js +1 -1
  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/Input.js +11 -10
  28. package/InputNumber.js +1 -1
  29. package/Layout.js +1 -1
  30. package/Link.js +1 -1
  31. package/List.js +2 -2
  32. package/Mentions.js +2 -2
  33. package/Menu.js +1 -1
  34. package/Message.js +1 -1
  35. package/Modal.js +1 -1
  36. package/Notice.js +1 -1
  37. package/Notification.js +1 -1
  38. package/OverflowEllipsis.js +1 -1
  39. package/PageHeader.js +1 -1
  40. package/Pagination.js +1 -1
  41. package/Popconfirm.js +1 -1
  42. package/Popover.js +1 -1
  43. package/Progress.js +1 -1
  44. package/Radio.js +1 -1
  45. package/Rate.js +1 -1
  46. package/ResizeBox.js +1 -1
  47. package/Result.js +1 -1
  48. package/Select.js +1 -1
  49. package/Skeleton.js +1 -1
  50. package/Slider.js +1 -1
  51. package/Space.js +1 -1
  52. package/Spin.js +1 -1
  53. package/Statistic.js +1 -1
  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 +1 -1
  66. package/alert/index.js +1 -1
  67. package/anchor/Anchor.js +1 -1
  68. package/anchor/Link.js +1 -1
  69. package/auto-complete/index.js +2 -2
  70. package/avatar/Avatar.js +1 -1
  71. package/avatar/Group.js +1 -1
  72. package/back-top/index.js +1 -1
  73. package/badge/index.js +1 -1
  74. package/breadcrumb/index.js +2 -2
  75. package/button/Group.js +1 -1
  76. package/button/index.js +1 -1
  77. package/calendar/index.js +2 -2
  78. package/card/Grid.js +1 -1
  79. package/card/Meta.js +1 -1
  80. package/card/index.js +1 -1
  81. package/carousel/Arrow.js +1 -1
  82. package/carousel/Indicator.js +1 -1
  83. package/carousel/index.js +1 -1
  84. package/cascader/Cascader.js +2 -2
  85. package/cascader/index.js +1 -1
  86. package/cascader/util.js +1 -1
  87. package/checkbox/Checkbox.js +2 -2
  88. package/checkbox/Group.js +2 -2
  89. package/checkbox/GroupBlock.js +2 -2
  90. package/checkbox/index.js +2 -2
  91. package/chunk/B6r8jPCd.js +6 -0
  92. package/chunk/{w221i0nK.js → BmulTYLW.js} +14 -13
  93. package/chunk/C9oo3EJI.js +692 -0
  94. package/chunk/{D0338Pbq.js → CVSWh4ZZ.js} +1 -1
  95. package/chunk/{CmMehQON.js → DILUZgXW.js} +1 -1
  96. package/chunk/DSRHFFrc.js +53 -0
  97. package/chunk/{CQI1gsQs.js → DdJVL_4g.js} +1 -1
  98. package/chunk/{DXDbeIai.js → DlHiTTJO.js} +1 -1
  99. package/chunk/{dKvAiKxr.js → R-uQJib2.js} +2 -2
  100. package/chunk/{DfrB26fI.js → ev6oHWqY.js} +1 -1
  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 +1 -1
  105. package/color-picker/InputAlpha.js +1 -1
  106. package/color-picker/InputHex.js +1 -1
  107. package/color-picker/InputRgb.js +1 -1
  108. package/color-picker/Palette.js +1 -1
  109. package/color-picker/Panel.js +2 -2
  110. package/color-picker/index.js +2 -2
  111. package/comment/index.js +1 -1
  112. package/config-provider/ConfigProvider.js +6 -5
  113. package/config-provider/context.js +1 -1
  114. package/config-provider/index.js +2 -2
  115. package/copy/index.js +1 -1
  116. package/date-picker/Picker.js +1 -1
  117. package/date-picker/RangePicker.js +2 -2
  118. package/date-picker/index.js +1 -1
  119. package/descriptions/index.js +1 -1
  120. package/divider/index.js +1 -1
  121. package/draggable/index.js +1 -1
  122. package/drawer/Drawer.js +1 -1
  123. package/dropdown/Button.js +1 -1
  124. package/dropdown/index.js +1 -1
  125. package/empty/index.js +1 -1
  126. package/form/Form.js +1 -1
  127. package/form/FormItem.js +1 -1
  128. package/form/context.js +1 -1
  129. package/grid/Col.js +1 -1
  130. package/grid/Row.js +1 -1
  131. package/grid/grid-item.js +1 -1
  132. package/grid/grid.js +1 -1
  133. package/icon/index.js +1 -1
  134. package/icon-hover/index.js +1 -1
  135. package/image/Image.js +2 -2
  136. package/image/ImagePreview.js +2 -2
  137. package/image/ImagePreviewArrow.js +1 -1
  138. package/image/ImagePreviewGroup.js +1 -1
  139. package/image/index.js +1 -1
  140. package/index.js +448 -445
  141. package/input/Button.js +11 -0
  142. package/input/Group.js +1 -1
  143. package/input/Input.js +451 -397
  144. package/input/InputElement.js +1 -1
  145. package/input/Password.js +1 -1
  146. package/input/Search.js +1 -1
  147. package/input/Textarea.js +1 -1
  148. package/input/index.js +9 -8
  149. package/input-number/index.js +1 -1
  150. package/input-tag/InputTag.js +1 -1
  151. package/layout/Content.js +1 -1
  152. package/layout/Footer.js +1 -1
  153. package/layout/Header.js +1 -1
  154. package/layout/Sider.js +1 -1
  155. package/layout/index.js +1 -1
  156. package/link/index.js +1 -1
  157. package/list/Item.js +1 -1
  158. package/list/Meta.js +1 -1
  159. package/list/index.js +2 -2
  160. package/mentions/index.js +2 -2
  161. package/menu/Menu.js +2 -2
  162. package/menu/OverflowWrap.js +1 -1
  163. package/menu/index.js +2 -2
  164. package/message/index.js +1 -1
  165. package/message/useMessage.js +1 -1
  166. package/modal/Confirm.js +2 -2
  167. package/modal/Modal.js +2 -2
  168. package/modal/index.js +1 -1
  169. package/notice/index.js +1 -1
  170. package/notification/index.js +1 -1
  171. package/notification/useNotification.js +1 -1
  172. package/overflow-ellipsis/OverflowItem.js +1 -1
  173. package/overflow-ellipsis/index.js +1 -1
  174. package/package.json +1 -1
  175. package/page-header/index.js +1 -1
  176. package/pagination/PageItem.js +1 -1
  177. package/pagination/PageJumper.js +1 -1
  178. package/pagination/PageOption.js +2 -2
  179. package/pagination/Pagination.js +2 -2
  180. package/pagination/index.js +1 -1
  181. package/picker/Input.js +1 -1
  182. package/picker/InputRange.js +1 -1
  183. package/popconfirm/index.js +1 -1
  184. package/popover/index.js +1 -1
  185. package/progress/index.js +1 -1
  186. package/radio/Group.js +2 -2
  187. package/radio/GroupBlock.js +2 -2
  188. package/radio/Radio.js +2 -2
  189. package/radio/index.js +2 -2
  190. package/rate/index.js +1 -1
  191. package/resize-box/ResizeTrigger.js +1 -1
  192. package/resize-box/Split.js +1 -1
  193. package/resize-box/SplitGroup.js +1 -1
  194. package/resize-box/index.js +1 -1
  195. package/result/index.js +1 -1
  196. package/select/Option.js +1 -1
  197. package/select/Select.js +2 -2
  198. package/select/index.js +2 -2
  199. package/select/util.js +1 -1
  200. package/select-view/Core.js +1 -1
  201. package/skeleton/index.js +1 -1
  202. package/slider/Button.js +1 -1
  203. package/slider/index.js +1 -1
  204. package/space/index.js +1 -1
  205. package/spin/DotLoading.js +1 -1
  206. package/spin/index.js +1 -1
  207. package/statistic/Countdown.js +1 -1
  208. package/statistic/index.js +1 -1
  209. package/steps/index.js +1 -1
  210. package/style.css +1 -1
  211. package/switch/index.js +1 -1
  212. package/table/Table.js +2 -2
  213. package/table/index.js +1 -1
  214. package/tabs/Tab.js +2 -2
  215. package/tabs/TabContent.js +2 -2
  216. package/tabs/TabPane.js +1 -1
  217. package/tabs/index.js +2 -2
  218. package/tag/index.js +1 -1
  219. package/time-picker/Picker.js +1 -1
  220. package/time-picker/TimePicker.js +1 -1
  221. package/timeline/Item.js +1 -1
  222. package/timeline/Timeline.js +1 -1
  223. package/tooltip/index.js +1 -1
  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 +1 -1
  236. package/types/index.d.ts +1 -1
  237. package/types/input/Button.d.ts +5 -0
  238. package/types/input/Input.d.ts +4 -1
  239. package/types/input/interface.d.ts +7 -0
  240. package/types/utils/index.d.ts +1 -0
  241. package/types/utils/setTheme.d.ts +2 -0
  242. package/typography/Base.js +1 -1
  243. package/typography/Ellipsis.js +8 -7
  244. package/typography/Paragraph.js +1 -1
  245. package/typography/Typography.js +1 -1
  246. package/typography/index.js +1 -1
  247. package/upload/TriggerNode.js +1 -1
  248. package/upload/Upload.js +1 -1
  249. package/upload/request.js +1 -1
  250. package/upload/request_.js +1 -1
  251. package/utils/constant.js +1 -1
  252. package/utils/contextHolder.js +1 -1
  253. package/utils/dom.js +1 -1
  254. package/utils/index.js +110 -108
  255. package/utils/setDarkTheme.js +23 -22
  256. package/utils/setPrimaryColor.js +20 -19
  257. package/utils/setTheme.js +9 -0
  258. package/verification-code/VerificationCode.js +1 -1
  259. package/version/index.js +1 -1
  260. package/watermark/Watermark.js +1 -1
  261. package/chunk/Cplu5dtQ.js +0 -730
  262. package/chunk/D0ZWT7db.js +0 -5
@@ -0,0 +1,692 @@
1
+ import { jsx as i, jsxs as X, Fragment as me } from "react/jsx-runtime";
2
+ import Y from "@unicom-cloud/icons/context";
3
+ import { s as Le } from "./DSRHFFrc.js";
4
+ import { UI_PC_PREFIX as F } from "@unicom-cloud/utils/constant/ui";
5
+ import ue from "lodash/merge";
6
+ import A, { forwardRef as te, useContext as D, createContext as Se, useRef as k, useImperativeHandle as oe, useEffect as _, useState as ze, useMemo as qe } from "react";
7
+ import { u as ne } from "./BFTV6myl.js";
8
+ import { b as xe } from "./BJ9_azwQ.js";
9
+ import H from "lodash/isNumber";
10
+ import j from "lodash/isUndefined";
11
+ import { createRoot as ge } from "react-dom/client";
12
+ import Ge from "@unicom-cloud/icons/IconUiCheckCircleFill";
13
+ import pe from "@unicom-cloud/icons/IconUiClose";
14
+ import Qe from "@unicom-cloud/icons/IconUiCloseCircleFill";
15
+ import Xe from "@unicom-cloud/icons/IconUiExclamationCircleFill";
16
+ import Ae from "@unicom-cloud/icons/IconUiInfoCircleFill";
17
+ import Be from "@unicom-cloud/icons/IconUiLoading";
18
+ import { setConfigProviderProps as Je } from "../modal/config.js";
19
+ import { createPortal as Ke } from "react-dom";
20
+ import { P as he } from "./NPajzdOv.js";
21
+ import S from "@unicom-cloud/utils/class-name";
22
+ import Ve from "@unicom-cloud/icons/IconUiEmpty";
23
+ import We from "../locale/zh-CN.js";
24
+ import Ne from "../notification/withNotification.js";
25
+ import "lodash/isEqualWith";
26
+ import "./ClM74To2.js";
27
+ import "@unicom-cloud/utils/constant/keyboardCode";
28
+ import "../utils/dom.js";
29
+ import "./B4WG1mhs.js";
30
+ import "./BZ3igxQN.js";
31
+ import "@unicom-cloud/utils/constant";
32
+ import "lodash/debounce";
33
+ import Ye from "lodash/isString";
34
+ function Ze(e, o) {
35
+ const {
36
+ getPrefixCls: t,
37
+ locale: l,
38
+ componentConfig: f
39
+ } = D(w), n = ne(
40
+ e,
41
+ {},
42
+ f == null ? void 0 : f.Empty
43
+ ), { style: s, className: u, description: r, icon: c, imgSrc: d, ...m } = n, C = t == null ? void 0 : t("empty"), N = S(C, u), x = l.Empty.noData, a = typeof r == "string" ? r : "empty";
44
+ return /* @__PURE__ */ i("div", { ref: o, className: N, style: s, ...m, children: /* @__PURE__ */ X("div", { className: `${C}-wrapper`, children: [
45
+ /* @__PURE__ */ i("div", { className: `${C}-image`, children: d ? /* @__PURE__ */ i("img", { alt: a, src: d }) : c || /* @__PURE__ */ i(Ve, {}) }),
46
+ /* @__PURE__ */ i("div", { className: `${C}-description`, children: r || x })
47
+ ] }) });
48
+ }
49
+ const ve = te(Ze);
50
+ ve.displayName = "Empty";
51
+ const et = A.memo(ve);
52
+ function tt(e) {
53
+ return /* @__PURE__ */ i(et, {});
54
+ }
55
+ const $e = {
56
+ locale: We,
57
+ prefixCls: F,
58
+ getPrefixCls(e, o) {
59
+ return `${o || F}-${e}`;
60
+ },
61
+ getPopupContainer() {
62
+ return window.document.body;
63
+ },
64
+ size: "default",
65
+ renderEmpty: tt
66
+ }, w = Se({
67
+ ...$e
68
+ });
69
+ function ot(e, o) {
70
+ const {
71
+ children: t,
72
+ className: l,
73
+ disabled: f,
74
+ prefix: n,
75
+ size: s = "default",
76
+ ...u
77
+ } = e, { getPrefixCls: r } = D(w), c = r == null ? void 0 : r("icon-hover"), d = k();
78
+ return oe(o, () => ({
79
+ getRootDOMNode: () => d.current
80
+ })), /* @__PURE__ */ i(
81
+ "span",
82
+ {
83
+ ref: d,
84
+ className: S(
85
+ c,
86
+ {
87
+ [`${n}-icon-hover`]: n,
88
+ [`${c}-size-${s}`]: s && s !== "default",
89
+ [`${c}-disabled`]: f
90
+ },
91
+ l
92
+ ),
93
+ onClick: e.onClick,
94
+ ...u,
95
+ children: t
96
+ }
97
+ );
98
+ }
99
+ const Ce = A.forwardRef(ot), nt = {
100
+ type: "info",
101
+ showIcon: !0,
102
+ noticeType: "message",
103
+ duration: 3e3
104
+ };
105
+ function rt(e, o) {
106
+ const {
107
+ getPrefixCls: t,
108
+ componentConfig: l,
109
+ rtl: f
110
+ } = D(w), n = ne(
111
+ e,
112
+ nt,
113
+ l == null ? void 0 : l.Notice
114
+ ), s = D(w), u = t == null ? void 0 : t("notice");
115
+ k();
116
+ const r = k(), c = k(), d = k(), {
117
+ title: m,
118
+ content: C,
119
+ showIcon: N,
120
+ className: x,
121
+ style: a,
122
+ type: p,
123
+ btn: g,
124
+ icon: $,
125
+ prefixCls: h,
126
+ closable: v,
127
+ noticeType: R,
128
+ iconPrefix: ce,
129
+ rtl: Fe = f,
130
+ closeIcon: z,
131
+ classPrefixCls: le
132
+ } = n, He = S(
133
+ h,
134
+ `${h}-${p}`,
135
+ {
136
+ [`${h}-closable`]: v,
137
+ [`${h}-rtl`]: Fe
138
+ },
139
+ x
140
+ );
141
+ let B = "closable" in n ? v : !0, J = N;
142
+ p === "normal" && !$ && (J = !1);
143
+ const ae = { ...s };
144
+ le && (ae.prefixCls = le);
145
+ function Oe() {
146
+ return c.current;
147
+ }
148
+ function K() {
149
+ const { duration: b, onClose: U, id: V } = n;
150
+ b !== 0 && (r.current = window.setTimeout(() => {
151
+ U == null || U(V), O();
152
+ }, b));
153
+ }
154
+ function O() {
155
+ r.current && (window.clearTimeout(r.current), r.current = null);
156
+ }
157
+ function q() {
158
+ var b;
159
+ (b = n.onClose) == null || b.call(n, n.id);
160
+ }
161
+ function fe() {
162
+ const { showIcon: b, icon: U, type: V, iconPrefix: de } = n;
163
+ let I;
164
+ if (U)
165
+ I = U;
166
+ else if (b) {
167
+ switch (V) {
168
+ case "info":
169
+ I = /* @__PURE__ */ i(Ae, {});
170
+ break;
171
+ case "success":
172
+ I = /* @__PURE__ */ i(Ge, {});
173
+ break;
174
+ case "error":
175
+ I = /* @__PURE__ */ i(Qe, {});
176
+ break;
177
+ case "warning":
178
+ I = /* @__PURE__ */ i(Xe, {});
179
+ break;
180
+ case "loading":
181
+ I = /* @__PURE__ */ i(Be, {});
182
+ break;
183
+ }
184
+ I = /* @__PURE__ */ i(
185
+ Y.Provider,
186
+ {
187
+ value: de ? { prefixCls: de } : {},
188
+ children: I
189
+ }
190
+ );
191
+ }
192
+ return /* @__PURE__ */ i("span", { className: `${h}-icon`, children: I });
193
+ }
194
+ function je() {
195
+ O();
196
+ }
197
+ function De() {
198
+ O(), K();
199
+ }
200
+ oe(o, () => ({
201
+ getRootDOMNode: Oe
202
+ }), []), _(() => {
203
+ const b = d.current;
204
+ return (b && (b == null ? void 0 : b.duration) !== n.duration || n.update) && (O(), K()), d.current = n, () => {
205
+ };
206
+ }, [n.duration, n.update]), _(() => (K(), () => {
207
+ O();
208
+ }), []);
209
+ let T;
210
+ return R === "message" && (B = v, T = /* @__PURE__ */ X(me, { children: [
211
+ J && fe(),
212
+ /* @__PURE__ */ i("span", { className: `${h}-content`, children: C }),
213
+ B && (z !== void 0 ? /* @__PURE__ */ i("span", { onClick: q, className: `${h}-close-btn`, children: z }) : /* @__PURE__ */ i(
214
+ Ce,
215
+ {
216
+ prefix: h,
217
+ className: `${h}-close-btn`,
218
+ onClick: q,
219
+ children: /* @__PURE__ */ i(pe, {})
220
+ }
221
+ ))
222
+ ] })), R === "notification" && (T = /* @__PURE__ */ X(me, { children: [
223
+ J && /* @__PURE__ */ i("div", { className: `${h}-left`, children: fe() }),
224
+ /* @__PURE__ */ X("div", { className: `${h}-right`, children: [
225
+ m && /* @__PURE__ */ i("div", { className: `${h}-title`, children: m }),
226
+ /* @__PURE__ */ i("div", { className: `${h}-content`, children: C }),
227
+ g && /* @__PURE__ */ i("div", { className: `${h}-btn-wrapper`, children: g })
228
+ ] }),
229
+ B && (z !== void 0 ? /* @__PURE__ */ i("span", { onClick: q, className: `${h}-close-btn`, children: z }) : /* @__PURE__ */ i(
230
+ Ce,
231
+ {
232
+ prefix: h,
233
+ className: `${h}-close-btn`,
234
+ onClick: q,
235
+ children: /* @__PURE__ */ i(
236
+ Y.Provider,
237
+ {
238
+ value: ce ? { prefixCls: ce } : {},
239
+ children: /* @__PURE__ */ i(pe, {})
240
+ }
241
+ )
242
+ }
243
+ ))
244
+ ] })), T && (T = /* @__PURE__ */ i(se, { ...ae, childrenName: "notice", children: /* @__PURE__ */ i(
245
+ "div",
246
+ {
247
+ ref: c,
248
+ className: `${u}-${R}`,
249
+ onMouseEnter: je,
250
+ onMouseLeave: De,
251
+ children: /* @__PURE__ */ i("div", { className: He, style: a, role: "alert", children: T })
252
+ }
253
+ ) })), T;
254
+ }
255
+ const be = te(rt);
256
+ function ye(e, o) {
257
+ const t = D(w), [l, f] = ze([]);
258
+ function n(r) {
259
+ f((c) => [...c, r]);
260
+ }
261
+ function s(r) {
262
+ f(
263
+ (c) => c.filter((d) => r !== d)
264
+ );
265
+ }
266
+ function u() {
267
+ return t;
268
+ }
269
+ return oe(o, () => ({
270
+ addInstance: n,
271
+ removeInstance: s,
272
+ getContextConfig: u
273
+ })), A.Children.map(
274
+ l,
275
+ (r, c) => A.cloneElement(r, { key: c })
276
+ );
277
+ }
278
+ ye.displayName = "ContextHolderElement";
279
+ const Ie = te(ye);
280
+ function it(e = {}) {
281
+ const {
282
+ maxCount: o,
283
+ duration: t = 3e3,
284
+ prefixCls: l,
285
+ getContainer: f
286
+ } = e, n = k(), s = /* @__PURE__ */ i(Ie, { ref: n }), u = {};
287
+ let r;
288
+ function c(m) {
289
+ let C, N;
290
+ if (n.current) {
291
+ const $ = n.current.getContextConfig();
292
+ N = $.rtl, C = $.prefixCls;
293
+ }
294
+ const x = l || C, a = ie(m.position, N), p = {
295
+ duration: t,
296
+ ...m
297
+ }, g = u[a];
298
+ if (g) {
299
+ if (g.notices.length >= o) {
300
+ const $ = g.notices[0];
301
+ p.id = $.id, g.shift();
302
+ }
303
+ g.add({ ...p });
304
+ } else
305
+ r = /* @__PURE__ */ i(
306
+ y,
307
+ {
308
+ ...p,
309
+ prefixCls: x,
310
+ rtl: N,
311
+ getContainer: f,
312
+ ref: ($) => {
313
+ u[a] = $;
314
+ }
315
+ }
316
+ ), n.current.addInstance(r);
317
+ return u[a];
318
+ }
319
+ const d = {};
320
+ return re.forEach((m) => {
321
+ d[m] = (C) => c({
322
+ ...C,
323
+ type: m
324
+ });
325
+ }), [d, s];
326
+ }
327
+ const re = [
328
+ "info",
329
+ "success",
330
+ "error",
331
+ "warning",
332
+ "loading",
333
+ "normal"
334
+ ];
335
+ let P = {}, G = [], Ee, Pe, we, Z, L;
336
+ function ie(e, o) {
337
+ return j(e) && (e = o || L ? "topLeft" : "topRight"), e;
338
+ }
339
+ function st(e) {
340
+ const { prefixCls: o, rtl: t, getContainer: l, notices: f } = e, n = j(t) ? L : t, s = ie(e.position, n), u = o || Pe, r = u ? `${u}-notification` : "pqb-notification";
341
+ let c;
342
+ s === "topLeft" || s === "bottomLeft" ? c = "slideNoticeLeft" : c = "slideNoticeRight";
343
+ const d = S(
344
+ `${r}-wrapper`,
345
+ `${r}-wrapper-${s}`,
346
+ { [`${r}-wrapper-rtl`]: L }
347
+ ), m = l == null ? void 0 : l();
348
+ function C(x) {
349
+ const a = f.find((p) => p.id === x);
350
+ a && e.update({
351
+ ...a,
352
+ style: { ...a.style, opacity: 0 }
353
+ }), setTimeout(() => {
354
+ e.remove(x);
355
+ }, 200);
356
+ }
357
+ _(() => (e.add(e), () => {
358
+ e.clear();
359
+ }), []);
360
+ const N = /* @__PURE__ */ i("div", { className: d, children: /* @__PURE__ */ i(xe, { component: null, children: f.map((x) => /* @__PURE__ */ i(
361
+ he,
362
+ {
363
+ timeout: {
364
+ enter: 400,
365
+ exit: 300
366
+ },
367
+ classNames: c,
368
+ onExit: (a) => {
369
+ a && (a.style.height = `${a.scrollHeight}px`);
370
+ },
371
+ onExiting: (a) => {
372
+ a && (a.style.height = 0);
373
+ },
374
+ onExited: (a) => {
375
+ var p;
376
+ a && (a.style.height = 0, (p = x.onClose) == null || p.call(x));
377
+ },
378
+ children: /* @__PURE__ */ i(
379
+ be,
380
+ {
381
+ ...x,
382
+ onClose: C,
383
+ prefixCls: r,
384
+ iconPrefix: u,
385
+ classPrefixCls: u,
386
+ noticeType: "notification",
387
+ rtl: n
388
+ }
389
+ )
390
+ },
391
+ x.id
392
+ )) }) });
393
+ return m ? Ke(N, m) : N;
394
+ }
395
+ const y = Ne(st);
396
+ y.useNotification = it;
397
+ y.config = (e = {}) => {
398
+ var o;
399
+ H(e.maxCount) && (Ee = e.maxCount), e.prefixCls && (Pe = e.prefixCls), H(e.duration) && (we = e.duration), typeof e.rtl == "boolean" && (L = e.rtl), e.getContainer && ((o = e.getContainer) == null ? void 0 : o.call(e)) !== Z && (Z = e.getContainer(), Object.values(P).forEach(
400
+ (t) => {
401
+ var l;
402
+ return (l = t == null ? void 0 : t.clear) == null ? void 0 : l.call(t);
403
+ }
404
+ ), P = {});
405
+ };
406
+ y.clear = () => {
407
+ Object.values(P).forEach((e) => {
408
+ e == null || e.clear();
409
+ });
410
+ };
411
+ y.remove = (e) => {
412
+ Object.values(P).forEach((o) => {
413
+ o == null || o.remove(e);
414
+ });
415
+ };
416
+ y.addInstance = (e) => {
417
+ const o = ie(e.position, L), t = P[o], l = {
418
+ duration: we,
419
+ ...e
420
+ };
421
+ if (t) {
422
+ const f = t.notices.find(
423
+ (s) => s.id === e.id
424
+ ), n = {
425
+ ...l,
426
+ update: f
427
+ };
428
+ t.notices.length >= Ee && (f ? n.id = f.id : t.shift()), t.add({ ...n });
429
+ }
430
+ if (t === null && G.push(e), t === void 0) {
431
+ const f = document.createElement("div");
432
+ (Z || document.body).appendChild(f), ge(f).render(
433
+ /* @__PURE__ */ i(
434
+ y,
435
+ {
436
+ ...l,
437
+ ref: (s) => {
438
+ if (s) {
439
+ for (let u = 0; u < G.length; u++)
440
+ s.add(G[u]);
441
+ G = [], P[o] = s;
442
+ }
443
+ }
444
+ }
445
+ )
446
+ ), P[o] = null;
447
+ }
448
+ return P[o];
449
+ };
450
+ re.forEach((e) => {
451
+ y[e] = (o) => y.addInstance({
452
+ ...o,
453
+ type: e
454
+ });
455
+ });
456
+ function ct(e = {}) {
457
+ const { maxCount: o, duration: t = 3e3, prefixCls: l } = e, f = k(), n = qe(
458
+ () => /* @__PURE__ */ i(Ie, { ref: f }),
459
+ []
460
+ ), s = {};
461
+ let u;
462
+ function r(d) {
463
+ let m, C;
464
+ if (f.current) {
465
+ const v = f.current.getContextConfig();
466
+ C = v.rtl, m = v.prefixCls;
467
+ }
468
+ const N = l || m, x = {
469
+ position: "top",
470
+ duration: t,
471
+ ...d
472
+ }, { position: a, transitionClassNames: p } = x;
473
+ let g;
474
+ const $ = s[a];
475
+ if ($) {
476
+ const v = $.notices;
477
+ v.length >= o ? (g = v[0].id, $.shift(), $.add({ ...x, id: g })) : g = $.add(x);
478
+ } else
479
+ u = /* @__PURE__ */ i(
480
+ E,
481
+ {
482
+ ...x,
483
+ transitionClassNames: p,
484
+ prefixCls: N,
485
+ rtl: C,
486
+ ref: (v) => {
487
+ s[a] = v;
488
+ }
489
+ }
490
+ ), f.current.addInstance(u);
491
+ return () => {
492
+ var v, R;
493
+ (R = (v = s[a]) == null ? void 0 : v.remove) == null || R.call(v, g);
494
+ };
495
+ }
496
+ const c = {};
497
+ return Re.forEach((d) => {
498
+ c[d] = (m) => {
499
+ const C = Ye(m) ? { content: m } : m;
500
+ return r({
501
+ ...C,
502
+ type: d
503
+ });
504
+ };
505
+ }), [c, n];
506
+ }
507
+ const Re = [...re];
508
+ let M = {}, Q = [], ke, Me, _e, ee, Te, Ue;
509
+ function lt(e) {
510
+ const {
511
+ transitionClassNames: o,
512
+ transitionTimeout: t,
513
+ prefixCls: l,
514
+ rtl: f,
515
+ closable: n,
516
+ notices: s,
517
+ position: u
518
+ } = e;
519
+ function r(a) {
520
+ const p = e.notices.find((g) => g.id === a);
521
+ p && e.update({
522
+ ...p,
523
+ style: { ...p.style, opacity: 0 }
524
+ }), setTimeout(() => {
525
+ e.remove(a);
526
+ }, 100);
527
+ }
528
+ _(() => (e.add(e), () => {
529
+ e.clear();
530
+ }), []);
531
+ const c = l || Me, d = j(f) ? Te : f, m = j(n) ? Ue : n, C = c ? `${c}-message` : "pqb-message", N = {
532
+ enter: H(t == null ? void 0 : t.enter) ? t == null ? void 0 : t.enter : 100,
533
+ exit: H(t == null ? void 0 : t.exit) ? t == null ? void 0 : t.exit : 300
534
+ }, x = S(
535
+ `${C}-wrapper`,
536
+ `${C}-wrapper-${u}`
537
+ );
538
+ return /* @__PURE__ */ i("div", { className: x, children: /* @__PURE__ */ i(xe, { component: null, children: s.map((a) => /* @__PURE__ */ i(
539
+ he,
540
+ {
541
+ timeout: N,
542
+ classNames: o || "fadeMessage",
543
+ onExit: (p) => {
544
+ p && (p.style.height = `${p.scrollHeight}px`);
545
+ },
546
+ onExiting: (p) => {
547
+ p && (p.style.height = 0);
548
+ },
549
+ onExited: (p) => {
550
+ var g;
551
+ p && (p.style.height = 0, (g = a.onClose) == null || g.call(a));
552
+ },
553
+ children: /* @__PURE__ */ i(
554
+ be,
555
+ {
556
+ ...a,
557
+ prefixCls: C,
558
+ classPrefixCls: c,
559
+ iconPrefix: c,
560
+ onClose: r,
561
+ noticeType: "message",
562
+ rtl: d,
563
+ ...j(m) ? {} : { closable: m }
564
+ }
565
+ )
566
+ },
567
+ a.id
568
+ )) }) });
569
+ }
570
+ const E = Ne(lt);
571
+ E.config = (e = {}) => {
572
+ var o;
573
+ H(e.maxCount) && (ke = e.maxCount), e.prefixCls && (Me = e.prefixCls), H(e.duration) && (_e = e.duration), typeof e.rtl == "boolean" && (Te = e.rtl), typeof e.closable == "boolean" && (Ue = e.closable), ((o = e.getContainer) == null ? void 0 : o.call(e)) !== ee && (ee = e.getContainer(), Object.values(M).forEach((t) => t == null ? void 0 : t.clear()), M = {});
574
+ };
575
+ E.clear = () => {
576
+ Object.values(M).forEach((e) => {
577
+ e == null || e.clear();
578
+ });
579
+ };
580
+ E.addInstance = (e) => {
581
+ const o = {
582
+ position: "top",
583
+ duration: _e,
584
+ ...e
585
+ }, { position: t, transitionClassNames: l, transitionTimeout: f } = o;
586
+ let n;
587
+ const s = M[t];
588
+ if (s) {
589
+ const r = s.notices.find(
590
+ (d) => d.id === e.id
591
+ ), c = {
592
+ ...o,
593
+ update: r
594
+ };
595
+ s.notices.length >= ke ? r ? s.add({
596
+ ...c,
597
+ id: r.id
598
+ }) : (s.shift(), s.add(c)) : n = s.add(c);
599
+ }
600
+ if (s === null && Q.push(e), s === void 0) {
601
+ const r = document.createElement("div");
602
+ (ee || document.body).appendChild(r), ge(r).render(
603
+ /* @__PURE__ */ i(
604
+ E,
605
+ {
606
+ transitionClassNames: l,
607
+ transitionTimeout: f,
608
+ ...o,
609
+ ref: (d) => {
610
+ if (d) {
611
+ for (let m = 0; m < Q.length; m++)
612
+ d.add(Q[m]);
613
+ Q = [], M[t] = d;
614
+ }
615
+ }
616
+ }
617
+ )
618
+ ), M[t] = null;
619
+ }
620
+ return () => {
621
+ var r, c;
622
+ (c = (r = M[t]) == null ? void 0 : r.remove) == null || c.call(r, n);
623
+ };
624
+ };
625
+ Re.forEach((e) => {
626
+ E[e] = (o) => {
627
+ const t = typeof o == "string" ? { content: o } : o;
628
+ return E.addInstance({
629
+ ...t,
630
+ type: e
631
+ });
632
+ };
633
+ });
634
+ E.useMessage = ct;
635
+ const at = $e;
636
+ let W = {};
637
+ const ft = {};
638
+ function se(e) {
639
+ const o = ne(
640
+ e,
641
+ at,
642
+ ft
643
+ ), {
644
+ theme: t,
645
+ prefixCls: l = F,
646
+ locale: f,
647
+ rtl: n,
648
+ effectGlobalNotice: s = !0,
649
+ effectGlobalModal: u = !0
650
+ } = o, {
651
+ children: r,
652
+ isRootConfig: c,
653
+ keepConfig: d,
654
+ // 潘启宝添加
655
+ ...m
656
+ } = o;
657
+ (c || d) && (W = ue({}, W, m));
658
+ const C = ue({}, W, m, {
659
+ getPrefixCls: N
660
+ });
661
+ function N(a, p) {
662
+ return `${p || l || F}-${a}`;
663
+ }
664
+ _(() => (Le({ prefix: F, theme: t }), () => {
665
+ }), [t]), _(() => {
666
+ s && (E.config({ prefixCls: l, rtl: n }), y.config({ prefixCls: l, rtl: n }));
667
+ }, [l, n, s]), _(() => {
668
+ u && Je({ locale: f, prefixCls: l, rtl: n });
669
+ }, [f, l, n, u]);
670
+ let x = r;
671
+ return l && l !== F && (x = /* @__PURE__ */ i(Y.Provider, { value: { prefixCls: l }, children: r })), /* @__PURE__ */ i(w.Provider, { value: C, children: x });
672
+ }
673
+ se.ConfigContext = w;
674
+ se.displayName = "ConfigProvider";
675
+ const Qt = w.Consumer;
676
+ export {
677
+ Qt as C,
678
+ et as E,
679
+ Ce as I,
680
+ E as M,
681
+ y as N,
682
+ w as a,
683
+ se as b,
684
+ $e as c,
685
+ it as d,
686
+ Ie as e,
687
+ be as f,
688
+ ie as g,
689
+ Re as m,
690
+ re as n,
691
+ ct as u
692
+ };
@@ -3,7 +3,7 @@ import Ke from "@unicom-cloud/icons/IconUiMenuFold";
3
3
  import Re from "@unicom-cloud/icons/IconUiMenuUnfold";
4
4
  import _e from "lodash/isPlainObject";
5
5
  import F, { useContext as A, useState as fe, forwardRef as he, useEffect as ne, useRef as te, useMemo as Ae } from "react";
6
- import { a as ge } from "./Cplu5dtQ.js";
6
+ import { a as ge } from "./C9oo3EJI.js";
7
7
  import { u as Te } from "./CQ_WOOmf.js";
8
8
  import { u as oe } from "./B4YRLi8r.js";
9
9
  import { u as Ue } from "./BYdIoY50.js";
@@ -6,7 +6,7 @@ import G from "lodash/isArray";
6
6
  import Ge from "lodash/isPlainObject";
7
7
  import Fn from "lodash/isUndefined";
8
8
  import _n, { useContext as ce, useMemo as un, forwardRef as Wn, useRef as Le, useImperativeHandle as Bn, useState as ie, useEffect as Ke } from "react";
9
- import { a as xe } from "./Cplu5dtQ.js";
9
+ import { a as xe } from "./C9oo3EJI.js";
10
10
  import { u as zn } from "./BFTV6myl.js";
11
11
  import { u as Xt } from "./VSe_Wq1g.js";
12
12
  import { u as Zt } from "./a3hR6zLw.js";