@unicom-cloud/ui 0.8.74 → 0.8.75

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