@unicom-cloud/ui 0.8.81 → 0.8.83

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 (280) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +1 -1
  3. package/AutoComplete.js +2 -2
  4. package/BackTop.js +2 -2
  5. package/Badge.js +1 -1
  6. package/Breadcrumb.js +2 -2
  7. package/Button.js +1 -1
  8. package/Calendar.js +2 -2
  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 +2 -2
  15. package/Comment.js +1 -1
  16. package/ConfigProvider.js +5 -4
  17. package/Copy.js +1 -1
  18. package/DatePicker.js +7 -7
  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/Input.js +11 -10
  28. package/InputNumber.js +1 -1
  29. package/Layout.js +1 -1
  30. package/Link.js +1 -1
  31. package/List.js +2 -2
  32. package/Mentions.js +2 -2
  33. package/Menu.js +1 -1
  34. package/Message.js +1 -1
  35. package/Modal.js +1 -1
  36. package/Notice.js +1 -1
  37. package/Notification.js +5 -5
  38. package/OverflowEllipsis.js +1 -1
  39. package/PageHeader.js +1 -1
  40. package/Pagination.js +1 -1
  41. package/Popconfirm.js +1 -1
  42. package/Popover.js +1 -1
  43. package/Progress.js +1 -1
  44. package/Radio.js +1 -1
  45. package/Rate.js +1 -1
  46. package/ResizeBox.js +1 -1
  47. package/Result.js +1 -1
  48. package/Select.js +1 -1
  49. package/Skeleton.js +1 -1
  50. package/Slider.js +1 -1
  51. package/Space.js +1 -1
  52. package/SpeechSynthesis.js +1 -1
  53. package/Spin.js +1 -1
  54. package/Statistic.js +2 -2
  55. package/Steps.js +1 -1
  56. package/Switch.js +1 -1
  57. package/Table.js +1 -1
  58. package/Tabs.js +1 -1
  59. package/Tag.js +1 -1
  60. package/Tooltip.js +1 -1
  61. package/Transfer.js +2 -2
  62. package/Tree.js +1 -1
  63. package/TreeSelect.js +1 -1
  64. package/Trigger.js +1 -1
  65. package/Typography.js +1 -1
  66. package/affix/index.js +60 -57
  67. package/alert/index.js +53 -53
  68. package/anchor/Anchor.js +72 -72
  69. package/anchor/Link.js +27 -27
  70. package/anchor/util.js +1 -1
  71. package/auto-complete/index.js +2 -2
  72. package/avatar/Avatar.js +31 -31
  73. package/avatar/Group.js +25 -25
  74. package/back-top/index.js +30 -30
  75. package/badge/index.js +37 -37
  76. package/breadcrumb/index.js +26 -26
  77. package/button/Group.js +7 -7
  78. package/button/index.js +29 -29
  79. package/calendar/index.js +2 -2
  80. package/card/Grid.js +12 -12
  81. package/card/Meta.js +17 -17
  82. package/card/index.js +44 -44
  83. package/carousel/Arrow.js +19 -19
  84. package/carousel/Indicator.js +25 -25
  85. package/carousel/index.js +77 -77
  86. package/cascader/Cascader.js +2 -2
  87. package/cascader/index.js +1 -1
  88. package/cascader/util.js +1 -1
  89. package/checkbox/Checkbox.js +2 -2
  90. package/checkbox/Group.js +2 -2
  91. package/checkbox/GroupBlock.js +2 -2
  92. package/checkbox/index.js +2 -2
  93. package/chunk/B6r8jPCd.js +6 -0
  94. package/chunk/{DLBfXSnU.js → BmulTYLW.js} +2880 -2878
  95. package/chunk/C9oo3EJI.js +692 -0
  96. package/chunk/{C5X4hOkx.js → CVSWh4ZZ.js} +80 -80
  97. package/chunk/DILUZgXW.js +1464 -0
  98. package/chunk/DSRHFFrc.js +53 -0
  99. package/chunk/{yLRv5RIK.js → DdJVL_4g.js} +181 -181
  100. package/chunk/{DYspELhF.js → DlHiTTJO.js} +223 -223
  101. package/chunk/{BG7YGUsx.js → R-uQJib2.js} +119 -119
  102. package/chunk/{DEiyXzBZ.js → ev6oHWqY.js} +63 -63
  103. package/chunk/{BNevupAU.js → uKZyjtff.js} +5 -4
  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 +36 -36
  108. package/color-picker/InputAlpha.js +11 -11
  109. package/color-picker/InputHex.js +24 -24
  110. package/color-picker/InputRgb.js +23 -23
  111. package/color-picker/Palette.js +18 -18
  112. package/color-picker/Panel.js +2 -2
  113. package/color-picker/index.js +2 -2
  114. package/comment/index.js +31 -31
  115. package/config-provider/ConfigProvider.js +5 -3
  116. package/config-provider/context.js +2 -2
  117. package/config-provider/index.js +4 -3
  118. package/copy/index.js +28 -28
  119. package/date-picker/Picker.js +276 -276
  120. package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
  121. package/date-picker/index.js +26 -27
  122. package/descriptions/index.js +33 -33
  123. package/divider/index.js +12 -12
  124. package/draggable/index.js +23 -23
  125. package/drawer/Drawer.js +81 -81
  126. package/dropdown/Button.js +1 -1
  127. package/dropdown/index.js +56 -56
  128. package/empty/index.js +1 -1
  129. package/form/Form.js +76 -76
  130. package/form/FormItem.js +64 -64
  131. package/form/context.js +1 -1
  132. package/grid/Col.js +53 -53
  133. package/grid/Row.js +34 -34
  134. package/grid/grid-item.js +29 -29
  135. package/grid/grid.js +50 -50
  136. package/icon/index.js +20 -19
  137. package/icon-hover/index.js +1 -1
  138. package/image/Image.js +86 -86
  139. package/image/ImagePreview.js +2 -2
  140. package/image/ImagePreviewArrow.js +22 -22
  141. package/image/ImagePreviewGroup.js +1 -1
  142. package/image/index.js +1 -1
  143. package/index.js +498 -493
  144. package/input/Button.js +11 -0
  145. package/input/Group.js +8 -8
  146. package/input/Input.js +488 -434
  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/index.js +9 -8
  152. package/input-number/index.js +1 -1
  153. package/input-tag/InputTag.js +40 -40
  154. package/layout/Content.js +7 -7
  155. package/layout/Footer.js +9 -9
  156. package/layout/Header.js +7 -7
  157. package/layout/Sider.js +55 -55
  158. package/layout/index.js +32 -32
  159. package/link/index.js +35 -35
  160. package/list/Item.js +29 -29
  161. package/list/Meta.js +12 -12
  162. package/list/index.js +2 -2
  163. package/mentions/index.js +2 -2
  164. package/menu/Menu.js +2 -2
  165. package/menu/OverflowWrap.js +1 -1
  166. package/menu/index.js +2 -2
  167. package/message/index.js +1 -1
  168. package/message/useMessage.js +1 -1
  169. package/modal/Confirm.js +2 -2
  170. package/modal/Modal.js +2 -2
  171. package/modal/index.js +1 -1
  172. package/notice/index.js +1 -1
  173. package/notification/index.js +5 -5
  174. package/notification/useNotification.js +1 -1
  175. package/overflow-ellipsis/OverflowItem.js +12 -12
  176. package/overflow-ellipsis/index.js +24 -24
  177. package/package.json +1 -1
  178. package/page-header/index.js +38 -38
  179. package/pagination/PageItem.js +16 -16
  180. package/pagination/PageJumper.js +1 -1
  181. package/pagination/PageOption.js +2 -2
  182. package/pagination/Pagination.js +2 -2
  183. package/pagination/index.js +1 -1
  184. package/picker/Input.js +69 -69
  185. package/picker/InputRange.js +111 -111
  186. package/popconfirm/index.js +61 -61
  187. package/popover/index.js +35 -35
  188. package/progress/index.js +22 -22
  189. package/radio/Group.js +2 -2
  190. package/radio/GroupBlock.js +2 -2
  191. package/radio/Radio.js +2 -2
  192. package/radio/index.js +2 -2
  193. package/rate/index.js +49 -49
  194. package/resize-box/ResizeTrigger.js +34 -34
  195. package/resize-box/Split.js +56 -56
  196. package/resize-box/SplitGroup.js +55 -55
  197. package/resize-box/index.js +51 -51
  198. package/result/index.js +41 -41
  199. package/select/Option.js +1 -1
  200. package/select/Select.js +2 -2
  201. package/select/index.js +2 -2
  202. package/select/util.js +1 -1
  203. package/select-view/Core.js +125 -125
  204. package/skeleton/index.js +20 -20
  205. package/slider/Button.js +57 -57
  206. package/slider/index.js +116 -116
  207. package/space/index.js +46 -44
  208. package/speech-synthesis/index.js +1 -1
  209. package/spin/DotLoading.js +10 -10
  210. package/spin/index.js +44 -44
  211. package/statistic/Countdown.js +34 -34
  212. package/statistic/index.js +67 -67
  213. package/steps/index.js +55 -55
  214. package/style.css +1 -1
  215. package/switch/index.js +54 -54
  216. package/table/Table.js +3 -3
  217. package/table/index.js +1 -1
  218. package/tabs/Tab.js +2 -2
  219. package/tabs/TabContent.js +2 -2
  220. package/tabs/TabPane.js +12 -12
  221. package/tabs/index.js +2 -2
  222. package/tag/index.js +45 -45
  223. package/time-picker/Picker.js +76 -76
  224. package/time-picker/TimePicker.js +136 -136
  225. package/time-picker/index.js +8 -8
  226. package/time-picker/util.js +5 -5
  227. package/timeline/Item.js +47 -47
  228. package/timeline/Timeline.js +41 -41
  229. package/tooltip/index.js +29 -29
  230. package/transfer/Item.js +2 -2
  231. package/transfer/List.js +2 -2
  232. package/transfer/index.js +2 -2
  233. package/tree/Animation.js +2 -2
  234. package/tree/Node.js +2 -2
  235. package/tree/NodeList.js +1 -1
  236. package/tree/Tree.js +2 -2
  237. package/tree/index.js +1 -1
  238. package/tree-select/List.js +1 -1
  239. package/tree-select/Select.js +2 -2
  240. package/tree-select/index.js +2 -2
  241. package/trigger/index.js +60 -60
  242. package/types/config-provider/ConfigProvider.d.ts +2 -2
  243. package/types/config-provider/context.d.ts +1 -1
  244. package/types/date-picker/index.d.ts +8 -9
  245. package/types/date-picker/interface.d.ts +9 -9
  246. package/types/index.d.ts +2 -2
  247. package/types/input/Button.d.ts +5 -0
  248. package/types/input/Input.d.ts +4 -1
  249. package/types/input/interface.d.ts +7 -0
  250. package/types/picker/Input.d.ts +2 -2
  251. package/types/space/index.d.ts +2 -1
  252. package/types/utils/index.d.ts +1 -0
  253. package/types/utils/names.d.ts +1 -1
  254. package/types/utils/setTheme.d.ts +2 -0
  255. package/typography/Base.js +53 -53
  256. package/typography/Ellipsis.js +10 -8
  257. package/typography/Operations.js +28 -28
  258. package/typography/Paragraph.js +8 -8
  259. package/typography/Typography.js +7 -7
  260. package/typography/index.js +1 -1
  261. package/upload/TriggerNode.js +47 -47
  262. package/upload/Upload.js +184 -184
  263. package/upload/request.js +1 -1
  264. package/upload/request_.js +1 -1
  265. package/utils/constant.js +1 -1
  266. package/utils/contextHolder.js +3 -3
  267. package/utils/dom.js +1 -1
  268. package/utils/index.js +116 -114
  269. package/utils/names.js +1 -1
  270. package/utils/setDarkTheme.js +23 -22
  271. package/utils/setPrimaryColor.js +22 -16
  272. package/utils/setTheme.js +9 -0
  273. package/utils/tween.js +1 -1
  274. package/verification-code/VerificationCode.js +49 -49
  275. package/version/index.js +1 -1
  276. package/watermark/Watermark.js +24 -24
  277. package/chunk/CQvM33Vg.js +0 -724
  278. package/chunk/D0ZWT7db.js +0 -5
  279. package/chunk/yhU2zeeu.js +0 -1461
  280. /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
@@ -1,78 +1,78 @@
1
- import { jsx as s, jsxs as O, Fragment as rn } from "react/jsx-runtime";
2
- import ln from "@unicom-cloud/icons/IconUiClose";
3
- import Ie from "lodash/isFunction";
4
- import sn, { forwardRef as Oe, useState as D, useImperativeHandle as an, useRef as x, useContext as cn, useCallback as U, useEffect as oe } from "react";
5
- import $e from "../button/index.js";
6
- import { b as Le, d as un, a as dn, I as mn } from "./CQvM33Vg.js";
7
- import { u as fn } from "./oopARUrq.js";
8
- import { u as pn } from "./BFTV6myl.js";
9
- import { u as Cn } from "./CXPOj2uy.js";
10
- import { u as hn } from "./DU1RCDfh.js";
11
- import bn from "../portal/index.js";
12
- import { P as De } from "./NPajzdOv.js";
13
- import Be from "@unicom-cloud/utils/class-name";
14
- import { contains as gn, isServerRendering as xn } from "../utils/dom.js";
15
- import { Esc as kn } from "@unicom-cloud/utils/constant/keyboardCode";
16
- import { o as vn } from "./BKKEev13.js";
17
- import { f as Mn } from "./BZ3igxQN.js";
18
- import En from "@unicom-cloud/icons/IconUiCheckCircleFill";
19
- import wn from "@unicom-cloud/icons/IconUiCloseCircleFill";
20
- import Re from "@unicom-cloud/icons/IconUiExclamationCircleFill";
21
- import Tn from "@unicom-cloud/icons/IconUiInfoCircleFill";
22
- import { createRoot as yn } from "react-dom/client";
23
- import { destroyList as $, getConfigProviderProps as Nn, getModalConfig as Pn, setModalConfig as In } from "../modal/config.js";
24
- function $n(n) {
25
- const { prefixCls: i, simple: u } = Pn();
26
- return /* @__PURE__ */ s(T, { prefixCls: i, simple: u, ...n, children: n.content });
1
+ import { jsx as s, jsxs as L, Fragment as ln } from "react/jsx-runtime";
2
+ import sn from "@unicom-cloud/icons/IconUiClose";
3
+ import $e from "lodash/isFunction";
4
+ import an, { forwardRef as Le, useState as B, useImperativeHandle as cn, useRef as k, useContext as un, useCallback as V, useEffect as oe } from "react";
5
+ import De from "../button/index.js";
6
+ import { b as Xe, e as dn, a as mn, I as fn } from "./C9oo3EJI.js";
7
+ import { u as pn } from "./oopARUrq.js";
8
+ import { u as Cn } from "./BFTV6myl.js";
9
+ import { u as hn } from "./CXPOj2uy.js";
10
+ import { u as bn } from "./DU1RCDfh.js";
11
+ import gn from "../portal/index.js";
12
+ import { P as Be } from "./NPajzdOv.js";
13
+ import Re from "@unicom-cloud/utils/class-name";
14
+ import { contains as kn, isServerRendering as vn } from "../utils/dom.js";
15
+ import { Esc as xn } from "@unicom-cloud/utils/constant/keyboardCode";
16
+ import { o as Mn } from "./BKKEev13.js";
17
+ import { f as En } from "./BZ3igxQN.js";
18
+ import wn from "@unicom-cloud/icons/IconUiCheckCircleFill";
19
+ import Tn from "@unicom-cloud/icons/IconUiCloseCircleFill";
20
+ import Oe from "@unicom-cloud/icons/IconUiExclamationCircleFill";
21
+ import yn from "@unicom-cloud/icons/IconUiInfoCircleFill";
22
+ import { createRoot as Nn } from "react-dom/client";
23
+ import { destroyList as D, getConfigProviderProps as Pn, getModalConfig as In, setModalConfig as $n } from "../modal/config.js";
24
+ function Dn(n) {
25
+ const { prefixCls: i, simple: c } = In();
26
+ return /* @__PURE__ */ s(T, { prefixCls: i, simple: c, ...n, children: n.content });
27
27
  }
28
- const V = (n) => {
28
+ const z = (n) => {
29
29
  let i = n.icon;
30
30
  if (!i) {
31
31
  if (i !== null) {
32
- if (i = /* @__PURE__ */ s(Re, {}), n.isNotice)
32
+ if (i = /* @__PURE__ */ s(Oe, {}), n.isNotice)
33
33
  switch (n.noticeType) {
34
34
  case "info":
35
- i = /* @__PURE__ */ s(Tn, {});
35
+ i = /* @__PURE__ */ s(yn, {});
36
36
  break;
37
37
  case "success":
38
- i = /* @__PURE__ */ s(En, {});
38
+ i = /* @__PURE__ */ s(wn, {});
39
39
  break;
40
40
  case "warning":
41
- i = /* @__PURE__ */ s(Re, {});
41
+ i = /* @__PURE__ */ s(Oe, {});
42
42
  break;
43
43
  case "error":
44
- i = /* @__PURE__ */ s(wn, {});
44
+ i = /* @__PURE__ */ s(Tn, {});
45
45
  break;
46
46
  }
47
47
  }
48
48
  }
49
- return n.noticeType === "show" && (i = n.icon), n.isNotice && (n.hideCancel = !0), n.title = i === null && n.title === null ? null : /* @__PURE__ */ O("span", { children: [
49
+ return n.noticeType === "show" && (i = n.icon), n.isNotice && (n.hideCancel = !0), n.title = i === null && n.title === null ? null : /* @__PURE__ */ L("span", { children: [
50
50
  i,
51
51
  n.title
52
52
  ] }), n;
53
53
  };
54
54
  function le(n, i) {
55
- let u;
55
+ let c;
56
56
  const t = document.createElement("div");
57
57
  t.className = "pqb-modal-root", document.body.appendChild(t);
58
- const m = Nn();
59
- function k(a) {
60
- const h = /* @__PURE__ */ s(Le, { ...m, childrenName: "ModalConfirm", children: /* @__PURE__ */ s(
61
- $n,
58
+ const m = Pn();
59
+ function v(a) {
60
+ const h = /* @__PURE__ */ s(Xe, { ...m, childrenName: "ModalConfirm", children: /* @__PURE__ */ s(
61
+ Dn,
62
62
  {
63
63
  getPopupContainer: () => t,
64
64
  ...a,
65
65
  onCancel: C
66
66
  }
67
67
  ) });
68
- u || (u = yn(t)), u.render(h);
68
+ c || (c = Nn(t)), c.render(h);
69
69
  }
70
- const l = i || k;
70
+ const l = i || v;
71
71
  let r = {
72
72
  ...n,
73
73
  visible: !1
74
74
  };
75
- const c = () => {
75
+ const u = () => {
76
76
  let a;
77
77
  const h = n.onOk;
78
78
  h && (a = h(C)), a && a.then && (r.confirmLoading = !0, l(r), a.then(
@@ -84,21 +84,21 @@ function le(n, i) {
84
84
  }
85
85
  )), a || C(!0);
86
86
  };
87
- r.onOk = c, r = V(r), r.visible = !0, l(r);
87
+ r.onOk = u, r = z(r), r.visible = !0, l(r);
88
88
  function b() {
89
89
  t.remove();
90
- for (let a = 0; a < $.length; a++)
91
- if ($[a] === v) {
92
- $.splice(a, 1);
90
+ for (let a = 0; a < D.length; a++)
91
+ if (D[a] === x) {
92
+ D.splice(a, 1);
93
93
  break;
94
94
  }
95
- u && setTimeout(() => {
96
- u.unmount(), u = null;
95
+ c && setTimeout(() => {
96
+ c.unmount(), c = null;
97
97
  }, 7);
98
98
  }
99
99
  function C(a) {
100
100
  var h;
101
- !a && ((h = n.onCancel) == null || h.call(n)), v();
101
+ !a && ((h = n.onCancel) == null || h.call(n)), x();
102
102
  }
103
103
  function P(a) {
104
104
  r = {
@@ -106,25 +106,25 @@ function le(n, i) {
106
106
  title: n.title,
107
107
  // 避免 newConfig 未传递 title 时,icon 出现多个的问题
108
108
  ...a
109
- }, r = V(r), l(r);
109
+ }, r = z(r), l(r);
110
110
  }
111
- function v() {
111
+ function x() {
112
112
  r.visible = !1, r.afterClose = () => {
113
113
  var a;
114
114
  (a = n.afterClose) == null || a.call(n), b();
115
115
  }, l(r);
116
116
  }
117
- return $.push(v), {
118
- close: v,
117
+ return D.push(x), {
118
+ close: x,
119
119
  update: P,
120
120
  destroy: b
121
121
  };
122
122
  }
123
- function Dn(n, i) {
124
- const [u, t] = D(!0), [m, k] = D(n);
125
- an(i, () => ({
126
- update: (c) => {
127
- k(c);
123
+ function Bn(n, i) {
124
+ const [c, t] = B(!0), [m, v] = B(n);
125
+ cn(i, () => ({
126
+ update: (u) => {
127
+ v(u);
128
128
  },
129
129
  close: () => {
130
130
  t(!1);
@@ -132,25 +132,25 @@ function Dn(n, i) {
132
132
  }));
133
133
  function l() {
134
134
  var b;
135
- const c = (b = m.onOk) == null ? void 0 : b.call(m);
136
- c && c.then && (k((C) => ({
135
+ const u = (b = m.onOk) == null ? void 0 : b.call(m);
136
+ u && u.then && (v((C) => ({
137
137
  ...C,
138
138
  confirmLoading: !0
139
- })), c.then(
139
+ })), u.then(
140
140
  () => {
141
141
  t(!1);
142
142
  },
143
143
  (C) => {
144
- console.error(C), k((P) => ({
144
+ console.error(C), v((P) => ({
145
145
  ...P,
146
146
  confirmLoading: !1
147
147
  }));
148
148
  }
149
- )), c || t(!1);
149
+ )), u || t(!1);
150
150
  }
151
151
  function r() {
152
- var c;
153
- (c = m.onCancel) == null || c.call(m), t(!1);
152
+ var u;
153
+ (u = m.onCancel) == null || u.call(m), t(!1);
154
154
  }
155
155
  return /* @__PURE__ */ s(
156
156
  T,
@@ -158,52 +158,52 @@ function Dn(n, i) {
158
158
  unmountOnExit: !0,
159
159
  simple: !0,
160
160
  ...m,
161
- visible: u,
161
+ visible: c,
162
162
  onOk: l,
163
163
  onCancel: r,
164
164
  children: m.content
165
165
  }
166
166
  );
167
167
  }
168
- const Bn = Oe(Dn);
169
- function Rn() {
170
- const n = x(), i = /* @__PURE__ */ s(un, { ref: n });
171
- let u = 0;
168
+ const Rn = Le(Bn);
169
+ function On() {
170
+ const n = k(), i = /* @__PURE__ */ s(dn, { ref: n });
171
+ let c = 0;
172
172
  function t(l) {
173
173
  var h;
174
- u += 1;
175
- let r, c = { ...l };
174
+ c += 1;
175
+ let r, u = { ...l };
176
176
  function b() {
177
177
  var f;
178
178
  (f = l.afterClose) == null || f.call(l), P();
179
179
  }
180
180
  const C = /* @__PURE__ */ s(
181
- Bn,
181
+ Rn,
182
182
  {
183
183
  ref: (f) => {
184
184
  r = f;
185
185
  },
186
- ...V({ ...l }),
186
+ ...z({ ...l }),
187
187
  afterClose: b
188
188
  },
189
- u
189
+ c
190
190
  );
191
191
  (h = n.current) == null || h.addInstance(C);
192
192
  function P() {
193
193
  var f;
194
194
  (f = n.current) == null || f.removeInstance(C);
195
195
  }
196
- function v() {
196
+ function x() {
197
197
  r == null || r.close();
198
198
  }
199
199
  function a(f) {
200
- c = {
201
- ...c,
200
+ u = {
201
+ ...u,
202
202
  ...f
203
- }, r == null || r.update(V({ ...c }));
203
+ }, r == null || r.update(z({ ...u }));
204
204
  }
205
- return $.push(v), {
206
- close: v,
205
+ return D.push(x), {
206
+ close: x,
207
207
  update: a
208
208
  };
209
209
  }
@@ -212,21 +212,21 @@ function Rn() {
212
212
  ...l
213
213
  });
214
214
  }
215
- const k = {
215
+ const v = {
216
216
  confirm: m,
217
217
  show: m
218
218
  // 潘启宝添加于 2023年10月18日 星期三 10时31分58秒 CST
219
219
  };
220
220
  return ["info", "success", "warning", "error"].forEach((l) => {
221
- k[l] = (r) => t({
221
+ v[l] = (r) => t({
222
222
  ...r,
223
223
  isNotice: !0,
224
224
  noticeType: l
225
225
  });
226
- }), [k, i];
226
+ }), [v, i];
227
227
  }
228
- let re = null, On = 0;
229
- xn || document.documentElement.addEventListener(
228
+ let re = null, Ln = 0;
229
+ vn || document.documentElement.addEventListener(
230
230
  "click",
231
231
  (n) => {
232
232
  re = {
@@ -238,7 +238,7 @@ xn || document.documentElement.addEventListener(
238
238
  },
239
239
  !0
240
240
  );
241
- const Ln = {
241
+ const Xn = {
242
242
  mask: !0,
243
243
  maskClosable: !0,
244
244
  mountOnEnter: !0,
@@ -246,56 +246,56 @@ const Ln = {
246
246
  getPopupContainer: () => document.body,
247
247
  alignCenter: !0
248
248
  };
249
- function Xn(n, i) {
250
- var Ee;
251
- i || (i = x());
252
- const u = cn(dn), t = pn(
249
+ function Yn(n, i) {
250
+ var Ee, we;
251
+ i || (i = k());
252
+ const c = un(mn), t = Cn(
253
253
  n,
254
- Ln,
255
- (Ee = u.componentConfig) == null ? void 0 : Ee.Modal
254
+ Xn,
255
+ (Ee = c.componentConfig) == null ? void 0 : Ee.Modal
256
256
  ), {
257
257
  className: m,
258
- style: k,
258
+ style: v,
259
259
  visible: l,
260
260
  simple: r,
261
- title: c,
261
+ title: u,
262
262
  subtitle: b,
263
263
  children: C,
264
264
  cancelText: P,
265
- okText: v,
265
+ okText: x,
266
266
  okButtonProps: a,
267
267
  cancelButtonProps: h,
268
268
  getPopupContainer: f = () => document.body,
269
- footer: L,
270
- afterClose: z,
271
- confirmLoading: Xe,
272
- mountOnEnter: q,
273
- unmountOnExit: W,
274
- afterOpen: Z,
275
- hideCancel: Ye,
276
- maskClosable: Fe,
277
- mask: X,
278
- alignCenter: He,
269
+ footer: X,
270
+ afterClose: q,
271
+ confirmLoading: Ye,
272
+ mountOnEnter: W,
273
+ unmountOnExit: Z,
274
+ afterOpen: j,
275
+ hideCancel: Fe,
276
+ maskClosable: He,
277
+ mask: Y,
278
+ alignCenter: Se,
279
279
  getChildrenPopupContainer: se,
280
- wrapClassName: Se,
281
- escToExit: j,
280
+ wrapClassName: Ue,
281
+ escToExit: A,
282
282
  modalRender: ie,
283
- maskStyle: Ue,
284
- wrapStyle: Ve,
283
+ maskStyle: Ve,
284
+ wrapStyle: ze,
285
285
  closeIcon: ae,
286
- fullscreenable: Yn,
286
+ fullscreenable: Fn,
287
287
  ...ce
288
- } = t, B = x(null), ue = x(null), M = x(null), [de, me] = D(), [fe, ze] = D(), Y = x(null), R = x(!1), [qe, pe] = D(""), [Ce, he] = D("");
289
- fn();
290
- const A = x(!0);
291
- l && A.current && (A.current = !1);
292
- const F = x();
293
- F.current || (F.current = On++);
294
- const [We, K] = Cn(!1, {
288
+ } = t, R = k(null), ue = k(null), M = k(null), [de, me] = B(), [fe, qe] = B(), F = k(null), O = k(!1), [We, pe] = B(""), [Ce, he] = B("");
289
+ pn();
290
+ const K = k(!0);
291
+ l && K.current && (K.current = !1);
292
+ const H = k();
293
+ H.current || (H.current = Ln++);
294
+ const [Ze, G] = hn(!1, {
295
295
  defaultValue: !1,
296
- value: Xe
297
- }), d = u.getPrefixCls("modal", t.prefixCls), { locale: G, rtl: be } = u, Ze = !r || ce.noticeType === "show", je = "closable" in t ? t.closable : Ze, Ae = U(() => Mn(f()), [f]);
298
- hn(Ae, { hidden: l && X });
296
+ value: Ye
297
+ }), d = (we = c.getPrefixCls) == null ? void 0 : we.call(c, "modal", t.prefixCls), { locale: I, rtl: be } = c, je = !r || ce.noticeType === "show", Ae = "closable" in t ? t.closable : je, Ke = V(() => En(f()), [f]);
298
+ bn(Ke, { hidden: l && Y });
299
299
  function J(e) {
300
300
  e.stopPropagation(), Q();
301
301
  }
@@ -303,103 +303,103 @@ function Xn(n, i) {
303
303
  var e;
304
304
  (e = t.onCancel) == null || e.call(t);
305
305
  }
306
- const Ke = (e) => {
307
- j && l && e.key === kn.key && (e.stopPropagation(), Q());
308
- }, _ = x(!1), Ge = (e) => {
309
- R.current && (R.current = !1, !_.current && Fe && X && e.target === e.currentTarget && setTimeout(() => {
306
+ const Ge = (e) => {
307
+ A && l && e.key === xn.key && (e.stopPropagation(), Q());
308
+ }, _ = k(!1), Je = (e) => {
309
+ O.current && (O.current = !1, !_.current && He && Y && e.target === e.currentTarget && setTimeout(() => {
310
310
  Q();
311
311
  }, 100));
312
- }, Je = (e) => {
312
+ }, Qe = (e) => {
313
313
  var p;
314
314
  const o = (p = t.onOk ?? t.onConfirm) == null ? void 0 : p(e);
315
- o != null && o.then && (K(!0), o.then(
315
+ o != null && o.then && (G(!0), o.then(
316
316
  () => {
317
- K(!1);
317
+ G(!1);
318
318
  },
319
319
  (g) => {
320
- K(!1), console.error(g);
320
+ G(!1), console.error(g);
321
321
  }
322
322
  ));
323
323
  };
324
324
  oe(() => {
325
325
  let e = null;
326
- return j && (e = setTimeout(() => {
326
+ return A && (e = setTimeout(() => {
327
327
  var o;
328
- gn(document.body, B.current) && ((o = B.current) == null || o.focus());
328
+ kn(document.body, R.current) && ((o = R.current) == null || o.focus());
329
329
  })), () => {
330
330
  e && clearTimeout(e);
331
331
  };
332
- }, [l, j]);
333
- const Qe = () => {
332
+ }, [l, A]);
333
+ const _e = () => {
334
334
  var e;
335
- if (l && fe === void 0 && B.current) {
336
- const o = +((e = window.getComputedStyle(B.current, null)) == null ? void 0 : e.zIndex);
337
- isNaN(o) || ze(o + 1);
335
+ if (l && fe === void 0 && R.current) {
336
+ const o = +((e = window.getComputedStyle(R.current, null)) == null ? void 0 : e.zIndex);
337
+ isNaN(o) || qe(o + 1);
338
338
  }
339
- }, _e = () => {
340
- var g, E, w, I, S, y, N, we, Te, ye, Ne, Pe;
341
- if (L === null)
339
+ }, en = () => {
340
+ var g, E, w, $, U, y, N, Te, ye, Ne, Pe, Ie;
341
+ if (X === null)
342
342
  return;
343
343
  const e = ((g = t.cancelButton) == null ? void 0 : g.visible) !== !1 && /* @__PURE__ */ s(
344
- $e,
344
+ De,
345
345
  {
346
346
  onClick: J,
347
347
  ...h,
348
348
  ...(E = t.cancelButton) == null ? void 0 : E.props,
349
- children: ((I = (w = t.cancelButton) == null ? void 0 : w.props) == null ? void 0 : I.children) || ((S = t.cancelButton) == null ? void 0 : S.label) || ((y = t.cancelButton) == null ? void 0 : y.text) || P || G.Modal.cancelText
349
+ children: (($ = (w = t.cancelButton) == null ? void 0 : w.props) == null ? void 0 : $.children) || ((U = t.cancelButton) == null ? void 0 : U.label) || ((y = t.cancelButton) == null ? void 0 : y.text) || P || (I == null ? void 0 : I.Modal.cancelText)
350
350
  }
351
351
  ), o = ((N = t.okButton) == null ? void 0 : N.visible) !== !1 && /* @__PURE__ */ s(
352
- $e,
352
+ De,
353
353
  {
354
- loading: We,
355
- onClick: Je,
354
+ loading: Ze,
355
+ onClick: Qe,
356
356
  type: "primary",
357
357
  ...a,
358
- ...(we = t.okButton) == null ? void 0 : we.props,
359
- children: ((ye = (Te = t.okButton) == null ? void 0 : Te.props) == null ? void 0 : ye.children) || ((Ne = t.okButton) == null ? void 0 : Ne.label) || ((Pe = t.okButton) == null ? void 0 : Pe.text) || v || G.Modal.okText
358
+ ...(Te = t.okButton) == null ? void 0 : Te.props,
359
+ children: ((Ne = (ye = t.okButton) == null ? void 0 : ye.props) == null ? void 0 : Ne.children) || ((Pe = t.okButton) == null ? void 0 : Pe.label) || ((Ie = t.okButton) == null ? void 0 : Ie.text) || x || (I == null ? void 0 : I.Modal.okText)
360
360
  }
361
- ), p = Ie(L) ? L(e, o) : L || /* @__PURE__ */ O(rn, { children: [
362
- !Ye && e,
361
+ ), p = $e(X) ? X(e, o) : X || /* @__PURE__ */ L(ln, { children: [
362
+ !Fe && e,
363
363
  o
364
364
  ] });
365
365
  return /* @__PURE__ */ s("div", { className: `${d}-footer`, children: p });
366
- }, ee = x(
367
- ke()
368
- ), en = U((e) => {
369
- var p, g, E, w, I;
366
+ }, ee = k(
367
+ ve()
368
+ ), nn = V((e) => {
369
+ var p, g, E, w, $;
370
370
  if (!M.current) return;
371
371
  e.preventDefault();
372
372
  const o = ee.current;
373
- o.screenX = e.screenX, o.screenY = e.screenY, o.prewTranslateX = o.translateX, o.prewTranslateY = o.translateY, o.boundingClientRect = ((g = (p = M.current) == null ? void 0 : p.getBoundingClientRect) == null ? void 0 : g.call(p)) ?? {}, o.offsetParentBoundingClientRect = ((I = (w = (E = M.current) == null ? void 0 : E.offsetParent) == null ? void 0 : w.getBoundingClientRect) == null ? void 0 : I.call(w)) ?? {}, H(), nn();
374
- }, []), ge = U((e) => {
373
+ o.screenX = e.screenX, o.screenY = e.screenY, o.prewTranslateX = o.translateX, o.prewTranslateY = o.translateY, o.boundingClientRect = ((g = (p = M.current) == null ? void 0 : p.getBoundingClientRect) == null ? void 0 : g.call(p)) ?? {}, o.offsetParentBoundingClientRect = (($ = (w = (E = M.current) == null ? void 0 : E.offsetParent) == null ? void 0 : w.getBoundingClientRect) == null ? void 0 : $.call(w)) ?? {}, S(), tn();
374
+ }, []), ge = V((e) => {
375
375
  e.preventDefault();
376
- const o = ee.current, { left: p, right: g, top: E, bottom: w } = o.boundingClientRect ?? {}, { width: I, height: S } = o.offsetParentBoundingClientRect ?? {};
376
+ const o = ee.current, { left: p, right: g, top: E, bottom: w } = o.boundingClientRect ?? {}, { width: $, height: U } = o.offsetParentBoundingClientRect ?? {};
377
377
  let y = Math.max(e.screenX - o.screenX, -p);
378
- y = Math.min(y, I - g);
378
+ y = Math.min(y, $ - g);
379
379
  let N = Math.max(e.screenY - o.screenY, -E);
380
- N = Math.min(N, S - w), y += o.prewTranslateX, N += o.prewTranslateY, o.translateX = y, o.translateY = N, pe(`translate(${y}px, ${N}px)`);
381
- }, []), xe = U((e) => {
382
- e.preventDefault(), H();
380
+ N = Math.min(N, U - w), y += o.prewTranslateX, N += o.prewTranslateY, o.translateX = y, o.translateY = N, pe(`translate(${y}px, ${N}px)`);
381
+ }, []), ke = V((e) => {
382
+ e.preventDefault(), S();
383
383
  }, []);
384
- function nn() {
384
+ function tn() {
385
385
  document.documentElement.addEventListener(
386
386
  "mousemove",
387
387
  ge
388
388
  ), document.documentElement.addEventListener(
389
389
  "mouseup",
390
- xe
390
+ ke
391
391
  );
392
392
  }
393
- function H() {
393
+ function S() {
394
394
  document.documentElement.removeEventListener(
395
395
  "mousemove",
396
396
  ge
397
397
  ), document.documentElement.removeEventListener(
398
398
  "mouseup",
399
- xe
399
+ ke
400
400
  );
401
401
  }
402
- function ke() {
402
+ function ve() {
403
403
  return {
404
404
  screenX: 0,
405
405
  screenY: 0,
@@ -412,44 +412,44 @@ function Xn(n, i) {
412
412
  };
413
413
  }
414
414
  function ne() {
415
- ee.current = ke(), pe(""), he("");
415
+ ee.current = ve(), pe(""), he("");
416
416
  }
417
417
  oe(() => () => {
418
- ne(), H();
419
- }, []), oe(() => (M.current || (ne(), H()), () => {
418
+ ne(), S();
419
+ }, []), oe(() => (M.current || (ne(), S()), () => {
420
420
  }), [M.current]);
421
- const tn = /* @__PURE__ */ O(
422
- Le,
421
+ const on = /* @__PURE__ */ L(
422
+ Xe,
423
423
  {
424
- ...u,
424
+ ...c,
425
425
  childrenName: "Modal",
426
- prefixCls: t.prefixCls || u.prefixCls,
427
- locale: G,
426
+ prefixCls: t.prefixCls || c.prefixCls,
427
+ locale: I,
428
428
  zIndex: fe || 1050,
429
429
  getPopupContainer: (e) => typeof se == "function" ? se(e) : ue.current,
430
430
  children: [
431
- (!!c || !!b) && /* @__PURE__ */ O("div", { className: `${d}-header`, children: [
432
- !!c && /* @__PURE__ */ s(
431
+ (!!u || !!b) && /* @__PURE__ */ L("div", { className: `${d}-header`, children: [
432
+ !!u && /* @__PURE__ */ s(
433
433
  "div",
434
434
  {
435
435
  className: `${d}-title`,
436
- id: `pqb-dialog-${F.current}`,
437
- children: c
436
+ id: `pqb-dialog-${H.current}`,
437
+ children: u
438
438
  }
439
439
  ),
440
440
  !!b && /* @__PURE__ */ s("div", { className: `${d}-subtitle`, children: b })
441
441
  ] }),
442
442
  /* @__PURE__ */ s("div", { ref: ue, className: `${d}-content`, children: C }),
443
- _e(),
443
+ en(),
444
444
  !t.fullscreenable && t.draggable !== !1 && /* @__PURE__ */ s(
445
445
  "div",
446
446
  {
447
447
  className: `${d}-drag-icon`,
448
- onMouseDown: en,
448
+ onMouseDown: nn,
449
449
  onDoubleClick: ne
450
450
  }
451
451
  ),
452
- (je || !!t.fullscreenable) && (ae !== void 0 ? /* @__PURE__ */ s(
452
+ (Ae || !!t.fullscreenable) && (ae !== void 0 ? /* @__PURE__ */ s(
453
453
  "span",
454
454
  {
455
455
  className: `${d}-close-icon`,
@@ -457,25 +457,25 @@ function Xn(n, i) {
457
457
  children: ae
458
458
  }
459
459
  ) : /* @__PURE__ */ s(
460
- mn,
460
+ fn,
461
461
  {
462
462
  tabIndex: -1,
463
463
  className: `${d}-close-icon`,
464
464
  onClick: J,
465
465
  role: "button",
466
466
  "aria-label": "Close",
467
- children: /* @__PURE__ */ s(ln, {})
467
+ children: /* @__PURE__ */ s(sn, {})
468
468
  }
469
469
  ))
470
470
  ]
471
471
  }
472
- ), on = c ? { "aria-labelledby": `pqb-dialog-${F.current}` } : {}, ve = /* @__PURE__ */ s(
472
+ ), rn = u ? { "aria-labelledby": `pqb-dialog-${H.current}` } : {}, xe = /* @__PURE__ */ s(
473
473
  "div",
474
474
  {
475
475
  role: "dialog",
476
476
  "aria-modal": "true",
477
- ...on,
478
- className: Be(
477
+ ...rn,
478
+ className: Re(
479
479
  d,
480
480
  {
481
481
  [`${d}-simple`]: r,
@@ -485,44 +485,44 @@ function Xn(n, i) {
485
485
  m
486
486
  ),
487
487
  style: {
488
- ...k,
489
- transform: qe,
488
+ ...v,
489
+ transform: We,
490
490
  transformOrigin: Ce
491
491
  },
492
492
  ref: M,
493
- children: tn
493
+ children: on
494
494
  }
495
495
  ), te = (e) => {
496
496
  if (Ce)
497
497
  return;
498
498
  let o = "";
499
- if (Y.current) {
500
- const p = e.getBoundingClientRect(), { left: g, top: E } = Y.current;
499
+ if (F.current) {
500
+ const p = e.getBoundingClientRect(), { left: g, top: E } = F.current;
501
501
  o = `${g - p.left}px ${E - p.top}px`;
502
502
  }
503
503
  he(o);
504
- }, Me = A.current ? !q : !!M.current;
504
+ }, Me = K.current ? !W : !!M.current;
505
505
  return l || Me ? /* @__PURE__ */ s(
506
- bn,
506
+ gn,
507
507
  {
508
508
  visible: l,
509
509
  forceRender: Me,
510
510
  getContainer: f,
511
- children: /* @__PURE__ */ O(
511
+ children: /* @__PURE__ */ L(
512
512
  "div",
513
513
  {
514
514
  ref: i,
515
515
  className: `${d}-container`,
516
516
  children: [
517
- X ? /* @__PURE__ */ s(
518
- De,
517
+ Y ? /* @__PURE__ */ s(
518
+ Be,
519
519
  {
520
520
  in: l,
521
521
  timeout: 400,
522
522
  appear: !0,
523
- mountOnEnter: q,
523
+ mountOnEnter: W,
524
524
  classNames: "fadeModal",
525
- unmountOnExit: W,
525
+ unmountOnExit: Z,
526
526
  onEnter: (e) => {
527
527
  e && (e.style.display = "block");
528
528
  },
@@ -534,7 +534,7 @@ function Xn(n, i) {
534
534
  {
535
535
  "aria-hidden": !0,
536
536
  className: `${d}-mask`,
537
- style: Ue
537
+ style: Ve
538
538
  }
539
539
  )
540
540
  }
@@ -542,7 +542,7 @@ function Xn(n, i) {
542
542
  /* @__PURE__ */ s(
543
543
  "div",
544
544
  {
545
- ...vn(ce, [
545
+ ...Mn(ce, [
546
546
  "content",
547
547
  "icon",
548
548
  "showIcon",
@@ -556,57 +556,57 @@ function Xn(n, i) {
556
556
  ]),
557
557
  tabIndex: -1,
558
558
  ref: (e) => {
559
- B.current = e, Qe();
559
+ R.current = e, _e();
560
560
  },
561
- className: Be(
561
+ className: Re(
562
562
  `${d}-wrapper`,
563
563
  {
564
- [`${d}-wrapper-no-mask`]: !X,
565
- [`${d}-wrapper-align-center`]: He,
564
+ [`${d}-wrapper-no-mask`]: !Y,
565
+ [`${d}-wrapper-align-center`]: Se,
566
566
  [`${d}-wrapper-rtl`]: be
567
567
  },
568
- Se
568
+ Ue
569
569
  ),
570
570
  style: {
571
- ...Ve || {},
571
+ ...ze || {},
572
572
  // 必须 visible=false,立即设置display:none,否则modal加载react-monaco-editor的时候,编辑器显示异常
573
573
  display: l || de ? "block" : "none",
574
574
  overflow: !l && de ? "hidden" : ""
575
575
  },
576
- onKeyDown: Ke,
576
+ onKeyDown: Ge,
577
577
  onMouseDown: (e) => {
578
- R.current = e.target === e.currentTarget;
578
+ O.current = e.target === e.currentTarget;
579
579
  },
580
- onClick: Ge,
580
+ onClick: Je,
581
581
  children: /* @__PURE__ */ s(
582
- De,
582
+ Be,
583
583
  {
584
584
  in: l,
585
585
  timeout: 400,
586
586
  appear: !0,
587
587
  classNames: "zoomModal",
588
- unmountOnExit: W,
589
- mountOnEnter: q,
588
+ unmountOnExit: Z,
589
+ mountOnEnter: W,
590
590
  onEnter: (e) => {
591
- e && (me(!0), Y.current = re, te(e), M.current = e);
591
+ e && (me(!0), F.current = re, te(e), M.current = e);
592
592
  },
593
593
  onEntered: (e) => {
594
- e && (te(e), Y.current = null, Z == null || Z());
594
+ e && (te(e), F.current = null, j == null || j());
595
595
  },
596
596
  onExit: () => {
597
597
  _.current = !0;
598
598
  },
599
599
  onExited: (e) => {
600
- e && (me(!1), te(e), z == null || z(), _.current = !1, W && (M.current = null));
600
+ e && (me(!1), te(e), q == null || q(), _.current = !1, Z && (M.current = null));
601
601
  },
602
- children: sn.cloneElement(
603
- Ie(ie) ? ie(ve) : ve,
602
+ children: an.cloneElement(
603
+ $e(ie) ? ie(xe) : xe,
604
604
  {
605
605
  onMouseDown: () => {
606
- R.current = !1;
606
+ O.current = !1;
607
607
  },
608
608
  onMouseUp: () => {
609
- R.current = !1;
609
+ O.current = !1;
610
610
  }
611
611
  }
612
612
  )
@@ -620,14 +620,14 @@ function Xn(n, i) {
620
620
  }
621
621
  ) : null;
622
622
  }
623
- const T = Oe(
624
- Xn
623
+ const T = Le(
624
+ Yn
625
625
  );
626
626
  T.displayName = "Modal";
627
- T.config = In;
627
+ T.config = $n;
628
628
  T.show = (n) => le({ ...n, noticeType: "show" });
629
629
  T.confirm = (n) => le(n);
630
- T.useModal = Rn;
630
+ T.useModal = On;
631
631
  ["info", "success", "warning", "error"].forEach((n) => {
632
632
  T[n] = (i) => le({
633
633
  ...i,
@@ -636,13 +636,13 @@ T.useModal = Rn;
636
636
  });
637
637
  });
638
638
  T.destroyAll = () => {
639
- for (; $.length; ) {
640
- const n = $.pop();
639
+ for (; D.length; ) {
640
+ const n = D.pop();
641
641
  n && n();
642
642
  }
643
643
  };
644
644
  export {
645
645
  T as E,
646
646
  le as c,
647
- V as n
647
+ z as n
648
648
  };