@unicom-cloud/ui 0.8.80 → 0.8.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +1 -1
  3. package/AutoComplete.js +2 -2
  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 +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/InputNumber.js +1 -1
  28. package/Layout.js +1 -1
  29. package/Link.js +1 -1
  30. package/List.js +2 -2
  31. package/Mentions.js +2 -2
  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 +5 -5
  37. package/OverflowEllipsis.js +1 -1
  38. package/PageHeader.js +1 -1
  39. package/Pagination.js +1 -1
  40. package/Popconfirm.js +1 -1
  41. package/Popover.js +1 -1
  42. package/Progress.js +1 -1
  43. package/Radio.js +1 -1
  44. package/Rate.js +1 -1
  45. package/ResizeBox.js +1 -1
  46. package/Result.js +1 -1
  47. package/Select.js +1 -1
  48. package/Skeleton.js +1 -1
  49. package/Slider.js +1 -1
  50. package/Space.js +1 -1
  51. package/Spin.js +1 -1
  52. package/Statistic.js +1 -1
  53. package/Steps.js +1 -1
  54. package/Switch.js +1 -1
  55. package/Table.js +1 -1
  56. package/Tabs.js +1 -1
  57. package/Tag.js +1 -1
  58. package/Tooltip.js +1 -1
  59. package/Transfer.js +2 -2
  60. package/Tree.js +1 -1
  61. package/TreeSelect.js +1 -1
  62. package/Trigger.js +1 -1
  63. package/Typography.js +1 -1
  64. package/affix/index.js +60 -57
  65. package/alert/index.js +53 -53
  66. package/anchor/Anchor.js +72 -72
  67. package/anchor/Link.js +27 -27
  68. package/auto-complete/index.js +2 -2
  69. package/avatar/Avatar.js +31 -31
  70. package/avatar/Group.js +25 -25
  71. package/back-top/index.js +24 -24
  72. package/badge/index.js +37 -37
  73. package/breadcrumb/index.js +26 -26
  74. package/button/Group.js +7 -7
  75. package/button/index.js +29 -29
  76. package/calendar/index.js +2 -2
  77. package/card/Grid.js +12 -12
  78. package/card/Meta.js +17 -17
  79. package/card/index.js +44 -44
  80. package/carousel/Arrow.js +19 -19
  81. package/carousel/Indicator.js +25 -25
  82. package/carousel/index.js +77 -77
  83. package/cascader/Cascader.js +2 -2
  84. package/cascader/index.js +1 -1
  85. package/cascader/util.js +1 -1
  86. package/checkbox/Checkbox.js +2 -2
  87. package/checkbox/Group.js +2 -2
  88. package/checkbox/GroupBlock.js +2 -2
  89. package/checkbox/index.js +2 -2
  90. package/chunk/{yLRv5RIK.js → CQI1gsQs.js} +181 -181
  91. package/chunk/CmMehQON.js +1464 -0
  92. package/chunk/Cplu5dtQ.js +730 -0
  93. package/chunk/{C5X4hOkx.js → D0338Pbq.js} +80 -80
  94. package/chunk/{DYspELhF.js → DXDbeIai.js} +223 -223
  95. package/chunk/{DEiyXzBZ.js → DfrB26fI.js} +63 -63
  96. package/chunk/{BG7YGUsx.js → dKvAiKxr.js} +119 -119
  97. package/chunk/{D73Vr7fa.js → w221i0nK.js} +2871 -2870
  98. package/collapse/Collapse.js +2 -2
  99. package/collapse/Item.js +2 -2
  100. package/collapse/index.js +1 -1
  101. package/color-picker/ControlBar.js +36 -36
  102. package/color-picker/InputAlpha.js +11 -11
  103. package/color-picker/InputHex.js +24 -24
  104. package/color-picker/InputRgb.js +23 -23
  105. package/color-picker/Palette.js +18 -18
  106. package/color-picker/Panel.js +2 -2
  107. package/color-picker/index.js +2 -2
  108. package/comment/index.js +31 -31
  109. package/config-provider/ConfigProvider.js +5 -4
  110. package/config-provider/context.js +2 -2
  111. package/config-provider/index.js +4 -3
  112. package/copy/index.js +28 -28
  113. package/date-picker/Picker.js +276 -276
  114. package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
  115. package/date-picker/index.js +26 -27
  116. package/descriptions/index.js +33 -33
  117. package/divider/index.js +12 -12
  118. package/draggable/index.js +23 -23
  119. package/drawer/Drawer.js +81 -81
  120. package/dropdown/Button.js +1 -1
  121. package/dropdown/index.js +56 -56
  122. package/empty/index.js +1 -1
  123. package/form/Form.js +76 -76
  124. package/form/FormItem.js +64 -64
  125. package/grid/Col.js +53 -53
  126. package/grid/Row.js +34 -34
  127. package/grid/grid-item.js +29 -29
  128. package/grid/grid.js +50 -50
  129. package/icon/index.js +20 -19
  130. package/icon-hover/index.js +1 -1
  131. package/image/Image.js +86 -86
  132. package/image/ImagePreview.js +2 -2
  133. package/image/ImagePreviewArrow.js +22 -22
  134. package/image/ImagePreviewGroup.js +1 -1
  135. package/image/index.js +1 -1
  136. package/index.js +404 -402
  137. package/input/Group.js +8 -8
  138. package/input/Input.js +322 -322
  139. package/input/InputElement.js +1 -1
  140. package/input/Password.js +1 -1
  141. package/input/Search.js +1 -1
  142. package/input/Textarea.js +1 -1
  143. package/input-number/index.js +1 -1
  144. package/input-tag/InputTag.js +40 -40
  145. package/layout/Content.js +7 -7
  146. package/layout/Footer.js +9 -9
  147. package/layout/Header.js +7 -7
  148. package/layout/Sider.js +55 -55
  149. package/layout/index.js +32 -32
  150. package/link/index.js +35 -35
  151. package/list/Item.js +29 -29
  152. package/list/Meta.js +12 -12
  153. package/list/index.js +2 -2
  154. package/mentions/index.js +2 -2
  155. package/menu/Menu.js +2 -2
  156. package/menu/OverflowWrap.js +1 -1
  157. package/menu/index.js +2 -2
  158. package/message/index.js +1 -1
  159. package/message/useMessage.js +1 -1
  160. package/modal/Confirm.js +2 -2
  161. package/modal/Modal.js +2 -2
  162. package/modal/index.js +1 -1
  163. package/notice/index.js +1 -1
  164. package/notification/index.js +5 -5
  165. package/notification/useNotification.js +1 -1
  166. package/overflow-ellipsis/OverflowItem.js +12 -12
  167. package/overflow-ellipsis/index.js +24 -24
  168. package/package.json +1 -1
  169. package/page-header/index.js +38 -38
  170. package/pagination/PageItem.js +16 -16
  171. package/pagination/PageJumper.js +1 -1
  172. package/pagination/PageOption.js +2 -2
  173. package/pagination/Pagination.js +2 -2
  174. package/pagination/index.js +1 -1
  175. package/picker/Input.js +69 -69
  176. package/picker/InputRange.js +111 -111
  177. package/popconfirm/index.js +61 -61
  178. package/popover/index.js +35 -35
  179. package/progress/index.js +22 -22
  180. package/radio/Group.js +2 -2
  181. package/radio/GroupBlock.js +2 -2
  182. package/radio/Radio.js +2 -2
  183. package/radio/index.js +2 -2
  184. package/rate/index.js +49 -49
  185. package/resize-box/ResizeTrigger.js +34 -34
  186. package/resize-box/Split.js +56 -56
  187. package/resize-box/SplitGroup.js +55 -55
  188. package/resize-box/index.js +51 -51
  189. package/result/index.js +41 -41
  190. package/select/Option.js +1 -1
  191. package/select/Select.js +2 -2
  192. package/select/index.js +2 -2
  193. package/select/util.js +1 -1
  194. package/select-view/Core.js +125 -125
  195. package/skeleton/index.js +20 -20
  196. package/slider/Button.js +57 -57
  197. package/slider/index.js +116 -116
  198. package/space/index.js +46 -44
  199. package/spin/DotLoading.js +10 -10
  200. package/spin/index.js +44 -44
  201. package/statistic/Countdown.js +34 -34
  202. package/statistic/index.js +61 -61
  203. package/steps/index.js +55 -55
  204. package/style.css +1 -1
  205. package/switch/index.js +54 -54
  206. package/table/Table.js +2 -2
  207. package/table/index.js +1 -1
  208. package/tabs/Tab.js +2 -2
  209. package/tabs/TabContent.js +2 -2
  210. package/tabs/TabPane.js +12 -12
  211. package/tabs/index.js +2 -2
  212. package/tag/index.js +45 -45
  213. package/time-picker/Picker.js +76 -76
  214. package/time-picker/TimePicker.js +136 -136
  215. package/time-picker/index.js +8 -8
  216. package/timeline/Item.js +47 -47
  217. package/timeline/Timeline.js +41 -41
  218. package/tooltip/index.js +29 -29
  219. package/transfer/Item.js +2 -2
  220. package/transfer/List.js +2 -2
  221. package/transfer/index.js +2 -2
  222. package/tree/Animation.js +2 -2
  223. package/tree/Node.js +2 -2
  224. package/tree/NodeList.js +1 -1
  225. package/tree/Tree.js +2 -2
  226. package/tree/index.js +1 -1
  227. package/tree-select/List.js +1 -1
  228. package/tree-select/Select.js +2 -2
  229. package/tree-select/index.js +2 -2
  230. package/trigger/index.js +60 -60
  231. package/types/config-provider/ConfigProvider.d.ts +2 -2
  232. package/types/config-provider/context.d.ts +1 -1
  233. package/types/date-picker/index.d.ts +8 -9
  234. package/types/date-picker/interface.d.ts +9 -9
  235. package/types/index.d.ts +1 -1
  236. package/types/picker/Input.d.ts +2 -2
  237. package/types/space/index.d.ts +2 -1
  238. package/types/utils/names.d.ts +1 -1
  239. package/typography/Base.js +53 -53
  240. package/typography/Ellipsis.js +6 -6
  241. package/typography/Operations.js +28 -28
  242. package/typography/Paragraph.js +8 -8
  243. package/typography/Typography.js +7 -7
  244. package/typography/index.js +1 -1
  245. package/upload/TriggerNode.js +47 -47
  246. package/upload/Upload.js +184 -184
  247. package/utils/contextHolder.js +3 -3
  248. package/utils/index.js +1 -1
  249. package/utils/names.js +1 -1
  250. package/utils/setPrimaryColor.js +18 -13
  251. package/verification-code/VerificationCode.js +49 -49
  252. package/version/index.js +1 -1
  253. package/watermark/Watermark.js +24 -24
  254. package/chunk/CQvM33Vg.js +0 -724
  255. package/chunk/yhU2zeeu.js +0 -1461
  256. /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
package/switch/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { jsxs as a, jsx as n, Fragment as R } from "react/jsx-runtime";
1
+ import { jsxs as d, jsx as r, Fragment as R } from "react/jsx-runtime";
2
2
  import q from "@unicom-cloud/icons/IconUiLoading";
3
3
  import { h as A } from "../chunk/BJ9_azwQ.js";
4
4
  import B from "lodash/isArray";
5
5
  import { forwardRef as L, useContext as M, useState as O } from "react";
6
- import { a as Q } from "../chunk/CQvM33Vg.js";
6
+ import { a as Q } from "../chunk/Cplu5dtQ.js";
7
7
  import { u as U } from "../chunk/BFTV6myl.js";
8
- import { P as x } from "../chunk/NPajzdOv.js";
8
+ import { P as N } from "../chunk/NPajzdOv.js";
9
9
  import W from "@unicom-cloud/utils/class-name";
10
10
  import "../chunk/ClM74To2.js";
11
11
  import { o as D } from "../chunk/BKKEev13.js";
@@ -13,94 +13,94 @@ import { isPlainObject as G } from "@unicom-cloud/utils/is";
13
13
  const J = {
14
14
  type: "circle"
15
15
  };
16
- function K(N, $) {
16
+ function K(C, S) {
17
17
  const {
18
- getPrefixCls: S,
18
+ getPrefixCls: l,
19
19
  size: y,
20
- componentConfig: d,
20
+ componentConfig: m,
21
21
  rtl: w
22
22
  } = M(Q), i = U(
23
- N,
23
+ C,
24
24
  J,
25
- d == null ? void 0 : d.Switch
25
+ m == null ? void 0 : m.Switch
26
26
  ), {
27
- className: P,
27
+ className: b,
28
28
  children: t,
29
- style: g = {},
30
- disabled: b,
31
- size: I,
32
- loading: l,
33
- onChange: m,
34
- type: h,
29
+ style: I = {},
30
+ disabled: P,
31
+ size: g,
32
+ loading: a,
33
+ onChange: h,
34
+ type: f,
35
35
  checkedText: v,
36
36
  uncheckedText: z,
37
- checkedIcon: p,
38
- uncheckedIcon: k,
37
+ checkedIcon: k,
38
+ uncheckedIcon: u,
39
39
  ...T
40
- } = i, e = S("switch"), f = I || y, [j, _] = O(
40
+ } = i, e = l == null ? void 0 : l("switch"), p = g || y, [j, _] = O(
41
41
  i.value ?? // 潘启宝添加,接收 FormItem 里传来的数据
42
42
  i.defaultChecked
43
- ), c = "checked" in i ? i.checked : j, E = (r) => {
44
- var u;
45
- l || ((u = i.onClick) == null || u.call(i, r), "checked" in i || _(!c), m == null || m(!c, r));
43
+ ), c = "checked" in i ? i.checked : j, E = (n) => {
44
+ var x;
45
+ a || ((x = i.onClick) == null || x.call(i, n), "checked" in i || _(!c), h == null || h(!c, n));
46
46
  }, F = W(
47
47
  e,
48
- f === "small" ? `${e}-${f}` : void 0,
48
+ p === "small" ? `${e}-${p}` : void 0,
49
49
  {
50
- [`${e}-type-${h}`]: h,
50
+ [`${e}-type-${f}`]: f,
51
51
  [`${e}-checked`]: c,
52
- [`${e}-loading`]: l,
52
+ [`${e}-loading`]: a,
53
53
  [`${e}-rtl`]: w
54
54
  },
55
- P
55
+ b
56
56
  );
57
- let s = v, o = z;
58
- t && B(t) ? (s = t.find(
59
- (r) => r.key === "open"
60
- ), o = t.find(
61
- (r) => r.key === "close"
62
- )) : t && G(t) && (t.key === "open" ? s = t : t.key === "close" && (o = t));
57
+ let o = v, s = z;
58
+ t && B(t) ? (o = t.find(
59
+ (n) => n.key === "open"
60
+ ), s = t.find(
61
+ (n) => n.key === "close"
62
+ )) : t && G(t) && (t.key === "open" ? o = t : t.key === "close" && (s = t));
63
63
  const H = D(T, ["onChange", "checked", "error"]);
64
- return /* @__PURE__ */ a(
64
+ return /* @__PURE__ */ d(
65
65
  "button",
66
66
  {
67
- ref: $,
67
+ ref: S,
68
68
  role: "switch",
69
69
  "aria-checked": !!c,
70
- tabIndex: l ? -1 : void 0,
70
+ tabIndex: a ? -1 : void 0,
71
71
  ...H,
72
- style: g,
72
+ style: I,
73
73
  className: F,
74
- disabled: b,
74
+ disabled: P,
75
75
  onClick: E,
76
76
  type: "button",
77
77
  children: [
78
- /* @__PURE__ */ a("div", { className: `${e}-dot`, children: [
79
- !l && (p || k) && /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(
80
- x,
78
+ /* @__PURE__ */ d("div", { className: `${e}-dot`, children: [
79
+ !a && (k || u) && /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(
80
+ N,
81
81
  {
82
82
  classNames: "fadeIn",
83
83
  timeout: 200,
84
- children: /* @__PURE__ */ n("span", { className: `${e}-dot-icon`, children: c ? p : k })
84
+ children: /* @__PURE__ */ r("span", { className: `${e}-dot-icon`, children: c ? k : u })
85
85
  },
86
86
  c ? "checked" : "unchecked"
87
87
  ) }),
88
- l && /* @__PURE__ */ n("span", { className: `${e}-dot-icon`, children: /* @__PURE__ */ n(q, {}) })
88
+ a && /* @__PURE__ */ r("span", { className: `${e}-dot-icon`, children: /* @__PURE__ */ r(q, {}) })
89
89
  ] }),
90
- f !== "small" && h !== "line" && (s || o) && /* @__PURE__ */ a(R, { children: [
91
- /* @__PURE__ */ a("div", { className: `${e}-text-holder`, children: [
92
- s && c && s,
93
- o && !c && o
90
+ p !== "small" && f !== "line" && (o || s) && /* @__PURE__ */ d(R, { children: [
91
+ /* @__PURE__ */ d("div", { className: `${e}-text-holder`, children: [
92
+ o && c && o,
93
+ s && !c && s
94
94
  ] }),
95
- /* @__PURE__ */ n(
96
- x,
95
+ /* @__PURE__ */ r(
96
+ N,
97
97
  {
98
98
  in: c,
99
99
  classNames: "switchSlideText",
100
100
  timeout: 200,
101
- children: /* @__PURE__ */ a("div", { className: `${e}-text`, children: [
102
- s && c && s,
103
- o && !c && o
101
+ children: /* @__PURE__ */ d("div", { className: `${e}-text`, children: [
102
+ o && c && o,
103
+ s && !c && s
104
104
  ] })
105
105
  }
106
106
  )
@@ -109,9 +109,9 @@ function K(N, $) {
109
109
  }
110
110
  );
111
111
  }
112
- const V = L(K), C = V;
113
- C.__PQB_SWITCH = !0;
114
- C.displayName = "Switch";
112
+ const V = L(K), $ = V;
113
+ $.__PQB_SWITCH = !0;
114
+ $.displayName = "Switch";
115
115
  export {
116
- C as default
116
+ $ as default
117
117
  };
package/table/Table.js CHANGED
@@ -6,11 +6,11 @@ import "lodash/isNumber";
6
6
  import "lodash/isPlainObject";
7
7
  import "lodash/throttle";
8
8
  import "react";
9
- import "../chunk/CQvM33Vg.js";
9
+ import "../chunk/Cplu5dtQ.js";
10
10
  import "../chunk/B2yFlXke.js";
11
11
  import "../chunk/BFTV6myl.js";
12
12
  import "../chunk/a3hR6zLw.js";
13
- import { _ as n } from "../chunk/D73Vr7fa.js";
13
+ import { _ as n } from "../chunk/w221i0nK.js";
14
14
  import "../spin/index.js";
15
15
  import "@unicom-cloud/utils/class-name";
16
16
  import "../utils/dom.js";
package/table/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { h as s, i as l, j as o, T as u, u as m, k as t, l as b, m as T, n, o as r, p as f, q as p } from "../chunk/D73Vr7fa.js";
1
+ import { h as s, i as l, j as o, T as u, u as m, k as t, l as b, m as T, n, o as r, p as f, q as p } from "../chunk/w221i0nK.js";
2
2
  import { defaultComponent as C } from "./constant.js";
3
3
  export {
4
4
  s as TableSummary,
package/tabs/Tab.js CHANGED
@@ -2,13 +2,13 @@ import "react/jsx-runtime";
2
2
  import "lodash/isFunction";
3
3
  import "lodash/isPlainObject";
4
4
  import "react";
5
- import "../chunk/CQvM33Vg.js";
5
+ import "../chunk/Cplu5dtQ.js";
6
6
  import "../chunk/B4YRLi8r.js";
7
7
  import "../chunk/BFTV6myl.js";
8
8
  import "../chunk/CXPOj2uy.js";
9
9
  import "@unicom-cloud/utils/class-name";
10
10
  import "../chunk/BKKEev13.js";
11
- import { a as d, T as l } from "../chunk/BG7YGUsx.js";
11
+ import { a as d, T as l } from "../chunk/dKvAiKxr.js";
12
12
  import { default as u, default as x } from "./TabPane.js";
13
13
  export {
14
14
  u as TabPane,
@@ -1,8 +1,8 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import "../chunk/CQvM33Vg.js";
3
+ import "../chunk/Cplu5dtQ.js";
4
4
  import "@unicom-cloud/utils/class-name";
5
- import { b as a } from "../chunk/BG7YGUsx.js";
5
+ import { b as a } from "../chunk/dKvAiKxr.js";
6
6
  export {
7
7
  a as default
8
8
  };
package/tabs/TabPane.js CHANGED
@@ -1,22 +1,22 @@
1
1
  import { jsx as u } from "react/jsx-runtime";
2
2
  import d, { useRef as p, useContext as b } from "react";
3
- import { a as x } from "../chunk/CQvM33Vg.js";
4
- import C from "@unicom-cloud/utils/class-name";
5
- import { o as N } from "../chunk/BKKEev13.js";
6
- function P(a, s) {
7
- const e = p(!1), { getPrefixCls: r } = b(x), { children: o, className: n, style: i, lazyload: c, isActive: l, ...m } = a, f = r("tabs");
8
- return e.current = c ? e.current || l : !0, e.current && /* @__PURE__ */ u(
3
+ import { a as N } from "../chunk/Cplu5dtQ.js";
4
+ import R from "@unicom-cloud/utils/class-name";
5
+ import { o as x } from "../chunk/BKKEev13.js";
6
+ function y(s, o) {
7
+ const e = p(!1), { getPrefixCls: a } = b(N), { children: r, className: n, style: c, lazyload: i, isActive: m, ...l } = s, f = a == null ? void 0 : a("tabs");
8
+ return e.current = i ? e.current || m : !0, e.current && /* @__PURE__ */ u(
9
9
  "div",
10
10
  {
11
- ref: s,
12
- ...N(m, ["destroyOnHide", "title", "closable"]),
13
- className: C(`${f}-pane`, n),
14
- style: i,
15
- children: o
11
+ ref: o,
12
+ ...x(l, ["destroyOnHide", "title", "closable"]),
13
+ className: R(`${f}-pane`, n),
14
+ style: c,
15
+ children: r
16
16
  }
17
17
  );
18
18
  }
19
- const t = d.forwardRef(P);
19
+ const t = d.forwardRef(y);
20
20
  t.displayName = "TabPane";
21
21
  t.isTabPane = !0;
22
22
  export {
package/tabs/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { T as e } from "../chunk/BG7YGUsx.js";
2
- import { a as s } from "../chunk/BG7YGUsx.js";
1
+ import { T as e } from "../chunk/dKvAiKxr.js";
2
+ import { a as s } from "../chunk/dKvAiKxr.js";
3
3
  import { default as f, default as T } from "./TabPane.js";
4
4
  export {
5
5
  f as TabPane,
package/tag/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { jsx as c, jsxs as T, Fragment as J } from "react/jsx-runtime";
1
+ import { jsx as c, jsxs as _, Fragment as J } from "react/jsx-runtime";
2
2
  import Q from "@unicom-cloud/icons/IconUiClose";
3
3
  import W from "@unicom-cloud/icons/IconUiLoading";
4
- import b from "lodash/isPlainObject";
5
- import { forwardRef as X, useContext as Y, useState as v } from "react";
6
- import { a as Z, I as S } from "../chunk/CQvM33Vg.js";
4
+ import v from "lodash/isPlainObject";
5
+ import { forwardRef as X, useContext as Y, useState as N } from "react";
6
+ import { a as Z, I as S } from "../chunk/Cplu5dtQ.js";
7
7
  import { u as ee } from "../chunk/BYdIoY50.js";
8
8
  import { u as oe } from "../chunk/BFTV6myl.js";
9
9
  import ne from "../popconfirm/index.js";
@@ -25,90 +25,90 @@ const se = [
25
25
  ], te = {
26
26
  size: "default"
27
27
  };
28
- function ce(_, j) {
29
- var E;
30
- const { getPrefixCls: z, componentConfig: m, rtl: H } = Y(Z), L = ee(), r = oe(
31
- _,
28
+ function ce(j, z) {
29
+ var T;
30
+ const { getPrefixCls: m, componentConfig: l, rtl: H } = Y(Z), L = ee(), r = oe(
31
+ j,
32
32
  te,
33
- m == null ? void 0 : m.Tag
33
+ l == null ? void 0 : l.Tag
34
34
  ), {
35
35
  className: w,
36
36
  style: K,
37
37
  children: x,
38
38
  color: s,
39
39
  closable: e,
40
- checkable: l,
40
+ checkable: p,
41
41
  defaultChecked: R,
42
- size: N,
42
+ size: I,
43
43
  onClose: f,
44
- onCheck: p,
45
- icon: P,
46
- closeIcon: h,
44
+ onCheck: h,
45
+ icon: O,
46
+ closeIcon: u,
47
47
  bordered: U,
48
48
  __closeIconProps: V,
49
49
  ...q
50
- } = r, o = z("tag"), [F, I] = v(
50
+ } = r, o = m == null ? void 0 : m("tag"), [F, P] = N(
51
51
  "visible" in r ? r.visible : !0
52
- ), [M, A] = v(
52
+ ), [M, A] = N(
53
53
  "checked" in r ? r.checked : R
54
- ), [u, g] = v(), O = "checked" in r ? r.checked : M, B = "visible" in r ? r.visible : F;
55
- function k(n) {
54
+ ), [g, k] = N(), y = "checked" in r ? r.checked : M, B = "visible" in r ? r.visible : F;
55
+ function C(n) {
56
56
  const i = f == null ? void 0 : f(n);
57
- i && i.then ? (g(!0), i.then(() => {
58
- g(!1), I(!1);
57
+ i && i.then ? (k(!0), i.then(() => {
58
+ k(!1), P(!1);
59
59
  }).catch(() => {
60
- g(!1);
61
- })) : I(!1);
60
+ k(!1);
61
+ })) : P(!1);
62
62
  }
63
63
  function D() {
64
- const n = !O;
65
- "checked" in r || A(n), p == null || p(n);
64
+ const n = !y;
65
+ "checked" in r || A(n), h == null || h(n);
66
66
  }
67
- const d = s && se.indexOf(s) !== -1 ? s : "", C = l ? O : !0, G = ie(
67
+ const d = s && se.indexOf(s) !== -1 ? s : "", $ = p ? y : !0, G = ie(
68
68
  o,
69
69
  {
70
- [`${o}-loading`]: u,
70
+ [`${o}-loading`]: g,
71
71
  [`${o}-hide`]: !B,
72
72
  [`${o}-${d}`]: d,
73
- [`${o}-checkable`]: l,
74
- [`${o}-checked`]: C,
75
- [`${o}-size-${N}`]: N,
73
+ [`${o}-checkable`]: p,
74
+ [`${o}-checked`]: $,
75
+ [`${o}-size-${I}`]: I,
76
76
  [`${o}-bordered`]: U,
77
- [`${o}-custom-color`]: C && s && !d,
77
+ [`${o}-custom-color`]: $ && s && !d,
78
78
  [`${o}-rtl`]: H
79
79
  },
80
80
  w
81
81
  ), t = {
82
82
  ...K
83
83
  };
84
- s && !d && C && (t.backgroundColor || (t.backgroundColor = s), t.borderColor || (t.borderColor = s));
85
- const y = re(q, ["visible"]);
86
- l && (y.onClick = D);
87
- let $ = /* @__PURE__ */ c(
84
+ s && !d && $ && (t.backgroundColor || (t.backgroundColor = s), t.borderColor || (t.borderColor = s));
85
+ const E = re(q, ["visible"]);
86
+ p && (E.onClick = D);
87
+ let b = /* @__PURE__ */ c(
88
88
  S,
89
89
  {
90
90
  prefix: o,
91
91
  className: `${o}-close-btn`,
92
92
  onClick: (n) => {
93
- b(e == null ? void 0 : e.popconfirm) || k(n);
93
+ v(e == null ? void 0 : e.popconfirm) || C(n);
94
94
  },
95
95
  role: "button",
96
96
  tabIndex: 0,
97
97
  ...L({
98
98
  onPressEnter(n) {
99
- b(e == null ? void 0 : e.popconfirm) || k(n);
99
+ v(e == null ? void 0 : e.popconfirm) || C(n);
100
100
  }
101
101
  }),
102
102
  "aria-label": "Close",
103
103
  ...V,
104
- children: h !== void 0 ? h : /* @__PURE__ */ c(Q, {})
104
+ children: u !== void 0 ? u : /* @__PURE__ */ c(Q, {})
105
105
  }
106
106
  );
107
- return b(e == null ? void 0 : e.popconfirm) && ($ = /* @__PURE__ */ c(
107
+ return v(e == null ? void 0 : e.popconfirm) && (b = /* @__PURE__ */ c(
108
108
  ne,
109
109
  {
110
110
  ...e == null ? void 0 : e.popconfirm,
111
- title: ((E = e == null ? void 0 : e.popconfirm) == null ? void 0 : E.title) || /* @__PURE__ */ T(J, { children: [
111
+ title: ((T = e == null ? void 0 : e.popconfirm) == null ? void 0 : T.title) || /* @__PURE__ */ _(J, { children: [
112
112
  "确定要关闭 ",
113
113
  x
114
114
  ] }),
@@ -118,15 +118,15 @@ function ce(_, j) {
118
118
  },
119
119
  onOk: (n) => {
120
120
  var i, a;
121
- k(n), (a = (i = e == null ? void 0 : e.popconfirm) == null ? void 0 : i.onOk) == null || a.call(i, n);
121
+ C(n), (a = (i = e == null ? void 0 : e.popconfirm) == null ? void 0 : i.onOk) == null || a.call(i, n);
122
122
  },
123
- children: $
123
+ children: b
124
124
  }
125
- )), /* @__PURE__ */ T("div", { ref: j, style: t, className: G, ...y, children: [
126
- P && /* @__PURE__ */ c("span", { className: `${o}-icon`, children: P }),
125
+ )), /* @__PURE__ */ _("div", { ref: z, style: t, className: G, ...E, children: [
126
+ O && /* @__PURE__ */ c("span", { className: `${o}-icon`, children: O }),
127
127
  /* @__PURE__ */ c("span", { className: `${o}-content`, children: x }),
128
- !!e && !u && h !== null && $,
129
- u && /* @__PURE__ */ c("span", { className: `${o}-loading-icon`, children: /* @__PURE__ */ c(W, {}) })
128
+ !!e && !g && u !== null && b,
129
+ g && /* @__PURE__ */ c("span", { className: `${o}-loading-icon`, children: /* @__PURE__ */ c(W, {}) })
130
130
  ] });
131
131
  }
132
132
  const ae = X(ce);