@unicom-cloud/ui 0.8.68 → 0.8.70

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