@unicom-cloud/ui 0.8.76 → 0.8.77

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