@unicom-cloud/ui 0.8.69 → 0.8.71

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