@unicom-cloud/ui 0.8.75 → 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 (286) 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 +4 -3
  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 +86 -82
  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/{BbqvFW5R.js → 9TSjT7x_.js} +112 -112
  92. package/chunk/ATwvJ8j2.js +6 -0
  93. package/chunk/{Dv6USvVF.js → BC5fEyWK.js} +2 -1
  94. package/chunk/{WVoGhvMI.js → BPQXH_5i.js} +32 -31
  95. package/chunk/{BPD5iNdA.js → CB4jGw4K.js} +22 -18
  96. package/chunk/{B8hkFIar.js → CBgu99gQ.js} +1 -1
  97. package/chunk/CBzE-PUr.js +23 -0
  98. package/chunk/CNcLypMY.js +723 -0
  99. package/chunk/{CPlPBkN7.js → C_4I3haT.js} +1 -1
  100. package/chunk/{0mWCmQHr.js → CjqvxJml.js} +2 -2
  101. package/chunk/Cwm8LL5p.js +7818 -0
  102. package/chunk/D0ZWT7db.js +5 -0
  103. package/chunk/{CWlklVfi.js → tpmioyz1.js} +1 -1
  104. package/collapse/Collapse.js +2 -2
  105. package/collapse/Item.js +2 -2
  106. package/collapse/index.js +1 -1
  107. package/color-picker/ControlBar.js +1 -1
  108. package/color-picker/InputAlpha.js +1 -1
  109. package/color-picker/InputHex.js +2 -2
  110. package/color-picker/InputRgb.js +2 -2
  111. package/color-picker/Palette.js +2 -2
  112. package/color-picker/Panel.js +15 -266
  113. package/color-picker/colors.js +4 -4
  114. package/color-picker/index.js +13 -268
  115. package/color-picker/utils.js +1 -1
  116. package/comment/index.js +1 -1
  117. package/config-provider/ConfigProvider.js +4 -6
  118. package/config-provider/context.js +3 -2
  119. package/config-provider/index.js +4 -5
  120. package/copy/index.js +1 -1
  121. package/date-picker/Picker.js +1 -1
  122. package/date-picker/PickerRange.js +2 -2
  123. package/date-picker/index.js +1 -1
  124. package/descriptions/index.js +1 -1
  125. package/divider/index.js +1 -1
  126. package/draggable/index.js +1 -1
  127. package/drawer/Drawer.js +30 -21
  128. package/dropdown/Button.js +1 -1
  129. package/dropdown/index.js +1 -1
  130. package/empty/index.js +1 -1
  131. package/form/Form.js +10 -10
  132. package/form/FormItem.js +1 -1
  133. package/form/context.js +1 -1
  134. package/grid/Col.js +1 -1
  135. package/grid/Row.js +1 -1
  136. package/grid/grid-item.js +1 -1
  137. package/grid/grid.js +1 -1
  138. package/hooks/index.js +1 -1
  139. package/hooks/useWindowSize.js +1 -1
  140. package/icon/index.js +1 -1
  141. package/icon-hover/index.js +1 -1
  142. package/image/Image.js +2 -2
  143. package/image/ImagePreview.js +2 -2
  144. package/image/ImagePreviewArrow.js +1 -1
  145. package/image/ImagePreviewGroup.js +1 -1
  146. package/image/index.js +1 -1
  147. package/index.js +453 -463
  148. package/input/Group.js +1 -1
  149. package/input/Input.js +1 -1
  150. package/input/InputElement.js +1 -1
  151. package/input/Password.js +1 -1
  152. package/input/Search.js +1 -1
  153. package/input/Textarea.js +1 -1
  154. package/input-number/index.js +1 -1
  155. package/input-tag/InputTag.js +1 -1
  156. package/layout/Content.js +1 -1
  157. package/layout/Footer.js +1 -1
  158. package/layout/Header.js +1 -1
  159. package/layout/Sider.js +1 -1
  160. package/layout/index.js +1 -1
  161. package/link/index.js +1 -1
  162. package/list/Item.js +1 -1
  163. package/list/Meta.js +1 -1
  164. package/list/index.js +17 -267
  165. package/mentions/index.js +11 -144
  166. package/menu/Menu.js +2 -2
  167. package/menu/OverflowWrap.js +1 -1
  168. package/menu/index.js +2 -2
  169. package/message/index.js +1 -1
  170. package/message/useMessage.js +1 -1
  171. package/modal/Confirm.js +2 -2
  172. package/modal/Modal.js +2 -2
  173. package/modal/index.js +1 -1
  174. package/notice/index.js +1 -1
  175. package/notification/index.js +1 -1
  176. package/notification/useNotification.js +1 -1
  177. package/overflow-ellipsis/OverflowItem.js +1 -1
  178. package/overflow-ellipsis/index.js +1 -1
  179. package/package.json +1 -1
  180. package/page-header/index.js +1 -1
  181. package/pagination/PageItem.js +1 -1
  182. package/pagination/PageJumper.js +1 -1
  183. package/pagination/PageOption.js +5 -45
  184. package/pagination/Pagination.js +11 -243
  185. package/pagination/index.js +2 -2
  186. package/picker/Input.js +1 -1
  187. package/picker/InputRange.js +1 -1
  188. package/popconfirm/index.js +1 -1
  189. package/popover/index.js +1 -1
  190. package/progress/index.js +1 -1
  191. package/radio/Group.js +5 -5
  192. package/radio/GroupBlock.js +9 -0
  193. package/radio/Radio.js +6 -5
  194. package/radio/index.js +4 -3
  195. package/rate/index.js +1 -1
  196. package/resize-box/ResizeTrigger.js +1 -1
  197. package/resize-box/Split.js +1 -1
  198. package/resize-box/SplitGroup.js +1 -1
  199. package/resize-box/index.js +1 -1
  200. package/result/index.js +1 -1
  201. package/select/Option.js +6 -93
  202. package/select/Select.js +23 -546
  203. package/select/index.js +3 -3
  204. package/select/util.js +18 -139
  205. package/select-view/Core.js +1 -1
  206. package/skeleton/index.js +1 -1
  207. package/slider/Button.js +1 -1
  208. package/slider/index.js +1 -1
  209. package/space/index.js +1 -1
  210. package/speech-synthesis/index.js +4 -3
  211. package/spin/DotLoading.js +1 -1
  212. package/spin/index.js +1 -1
  213. package/statistic/Countdown.js +1 -1
  214. package/statistic/index.js +1 -1
  215. package/steps/index.js +1 -1
  216. package/style/variables.less +0 -484
  217. package/style.css +1 -1
  218. package/switch/index.js +1 -1
  219. package/table/Table.js +2 -3
  220. package/table/index.js +15 -109
  221. package/tabs/Tab.js +2 -2
  222. package/tabs/TabContent.js +2 -2
  223. package/tabs/TabPane.js +1 -1
  224. package/tabs/index.js +2 -2
  225. package/tag/index.js +1 -1
  226. package/time-picker/Picker.js +1 -1
  227. package/time-picker/TimePicker.js +1 -1
  228. package/timeline/Item.js +1 -1
  229. package/timeline/Timeline.js +1 -1
  230. package/tooltip/index.js +2 -2
  231. package/transfer/Item.js +9 -104
  232. package/transfer/List.js +13 -184
  233. package/transfer/index.js +13 -180
  234. package/tree/Animation.js +2 -2
  235. package/tree/Node.js +3 -4
  236. package/tree/NodeList.js +6 -80
  237. package/tree/Tree.js +17 -578
  238. package/tree/index.js +2 -3
  239. package/tree-select/List.js +6 -122
  240. package/tree-select/Select.js +22 -392
  241. package/tree-select/index.js +3 -3
  242. package/trigger/index.js +1 -1
  243. package/types/checkbox/Checkbox.d.ts +5 -2
  244. package/types/checkbox/GroupBlock.d.ts +7 -0
  245. package/types/checkbox/index.d.ts +2 -1
  246. package/types/config-provider/ConfigProvider.d.ts +0 -27
  247. package/types/config-provider/interface.d.ts +3 -1
  248. package/types/index.d.ts +2 -2
  249. package/types/menu/context.d.ts +1 -1
  250. package/types/radio/GroupBlock.d.ts +7 -0
  251. package/types/radio/Radio.d.ts +5 -3
  252. package/types/utils/constant.d.ts +2 -1
  253. package/types/utils/index.d.ts +1 -0
  254. package/types/utils/setDarkTheme.d.ts +2 -3
  255. package/types/utils/setPrimaryColor.d.ts +2 -0
  256. package/typography/Base.js +1 -1
  257. package/typography/Ellipsis.js +9 -22
  258. package/typography/Paragraph.js +1 -1
  259. package/typography/Typography.js +1 -1
  260. package/typography/index.js +10 -276
  261. package/upload/TriggerNode.js +1 -1
  262. package/upload/Upload.js +1 -1
  263. package/upload/Uploader.js +43 -44
  264. package/upload/request.js +1 -1
  265. package/upload/request_.js +1 -1
  266. package/utils/caseName.js +1 -1
  267. package/utils/color.js +1 -1
  268. package/utils/constant.js +7 -5
  269. package/utils/contextHolder.js +1 -1
  270. package/utils/dom.js +1 -1
  271. package/utils/index.js +199 -195
  272. package/utils/setDarkTheme.js +34 -5
  273. package/utils/setPrimaryColor.js +26 -0
  274. package/utils/tinycolor.js +1 -1
  275. package/verification-code/VerificationCode.js +1 -1
  276. package/version/index.js +1 -1
  277. package/watermark/Watermark.js +1 -1
  278. package/chunk/BViFMHr-.js +0 -1820
  279. package/chunk/BsWphzcT.js +0 -20
  280. package/chunk/BxZ39GzB.js +0 -209
  281. package/chunk/C9XYyypq.js +0 -713
  282. package/chunk/CIkPwQlq.js +0 -6
  283. package/chunk/DFcz9ZPP.js +0 -1020
  284. package/chunk/DeCsZrXb.js +0 -310
  285. package/chunk/DskaI8QL.js +0 -25
  286. package/chunk/EL5Jmjgr.js +0 -170
package/chunk/C9XYyypq.js DELETED
@@ -1,713 +0,0 @@
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
- };
package/chunk/CIkPwQlq.js DELETED
@@ -1,6 +0,0 @@
1
- const s = () => {
2
- }, t = "pqb-theme-dark";
3
- export {
4
- s as N,
5
- t as T
6
- };