@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,158 +1,158 @@
1
- import { jsxs as q, jsx as f } from "react/jsx-runtime";
2
- import sc from "@unicom-cloud/icons/IconUiClose";
3
- import F from "lodash/isArray";
4
- import { forwardRef as fc, useContext as nc, useRef as D, useState as mc, useImperativeHandle as ic } from "react";
5
- import { a as uc, I as $c } from "../chunk/CQvM33Vg.js";
6
- import B from "@unicom-cloud/utils/class-name";
1
+ import { jsxs as E, jsx as s } from "react/jsx-runtime";
2
+ import nc from "@unicom-cloud/icons/IconUiClose";
3
+ import w from "lodash/isArray";
4
+ import { forwardRef as sc, useContext as fc, useRef as z, useState as mc, useImperativeHandle as ic } from "react";
5
+ import { a as uc, I as $c } from "../chunk/C9oo3EJI.js";
6
+ import G from "@unicom-cloud/utils/class-name";
7
7
  import { Enter as hc, Tab as yc } from "@unicom-cloud/utils/constant/keyboardCode";
8
- import { o as Cc } from "../chunk/BKKEev13.js";
9
- function Nc({
10
- allowClear: E,
11
- error: G,
12
- status: J,
13
- style: Q,
14
- className: V,
15
- disabled: n,
16
- placeholder: w = [],
8
+ import { o as Nc } from "../chunk/BKKEev13.js";
9
+ function Cc({
10
+ allowClear: J,
11
+ error: Q,
12
+ status: V,
13
+ style: X,
14
+ className: Y,
15
+ disabled: f,
16
+ placeholder: R = [],
17
17
  value: m = [],
18
- popupVisible: X,
18
+ popupVisible: Z,
19
19
  format: i,
20
- size: Y,
21
- onClear: Z,
22
- editable: _,
23
- inputValue: z,
20
+ size: _,
21
+ onClear: T,
22
+ editable: I,
23
+ inputValue: K,
24
24
  onPressEnter: u,
25
25
  onPressTab: $,
26
26
  onChange: h,
27
- separator: T,
28
- suffixIcon: I,
29
- changeFocusedInputIndex: R,
30
- focusedInputIndex: s,
31
- isPlaceholder: x,
27
+ separator: x,
28
+ suffixIcon: p,
29
+ changeFocusedInputIndex: j,
30
+ focusedInputIndex: n,
31
+ isPlaceholder: P,
32
32
  prefix: y,
33
- inputProps: a = [],
34
- onBlur: C,
35
- ...p
36
- }, P) {
33
+ inputProps: t = [],
34
+ onBlur: N,
35
+ ...cc
36
+ }, ec) {
37
37
  const {
38
- getPrefixCls: cc,
39
- size: ec,
40
- locale: oc,
41
- rtl: lc
42
- } = nc(uc), N = D(null), g = D(null), K = D(null), [j, O] = mc([!1, !1]), k = F(n) ? n[0] : n, v = F(n) ? n[1] : n;
43
- ic(P, () => ({
38
+ getPrefixCls: C,
39
+ size: oc,
40
+ locale: g,
41
+ rtl: ac
42
+ } = fc(uc), k = z(null), v = z(null), O = z(null), [S, H] = mc([!1, !1]), F = w(f) ? f[0] : f, D = w(f) ? f[1] : f;
43
+ ic(ec, () => ({
44
44
  focus(c) {
45
- var l, r;
46
- (s === 0 && !k || s === 1 && !v) && ((r = (l = ((typeof c == "number" ? c : s) === 0 ? N : g).current) == null ? void 0 : l.focus) == null || r.call(l));
45
+ var a, r;
46
+ (n === 0 && !F || n === 1 && !D) && ((r = (a = ((typeof c == "number" ? c : n) === 0 ? k : v).current) == null ? void 0 : a.focus) == null || r.call(a));
47
47
  },
48
48
  blur() {
49
- var c, o, e, l;
50
- s === 0 && ((o = (c = N.current) == null ? void 0 : c.blur) == null || o.call(c)), s === 1 && ((l = (e = g.current) == null ? void 0 : e.blur) == null || l.call(e));
49
+ var c, o, e, a;
50
+ n === 0 && ((o = (c = k.current) == null ? void 0 : c.blur) == null || o.call(c)), n === 1 && ((a = (e = v.current) == null ? void 0 : e.blur) == null || a.call(e));
51
51
  },
52
- getRootDOMNode: () => K.current
52
+ getRootDOMNode: () => O.current
53
53
  }));
54
- function S(c, o) {
55
- var e, l;
56
- (l = (e = a == null ? void 0 : a[o]) == null ? void 0 : e.onClick) == null || l.call(e, c), s !== o && R(o);
57
- }
58
- function H(c, o) {
59
- var l, r;
60
- const e = c.key;
61
- (r = (l = a == null ? void 0 : a[o]) == null ? void 0 : l.onKeyDown) == null || r.call(l, c), e === hc.key && (u == null || u()), e === yc.key && ($ == null || $(c));
62
- }
63
54
  function b(c, o) {
64
- var e, l;
65
- c.stopPropagation(), (l = (e = a == null ? void 0 : a[o]) == null ? void 0 : e.onChange) == null || l.call(e, c), h == null || h(c);
55
+ var e, a;
56
+ (a = (e = t == null ? void 0 : t[o]) == null ? void 0 : e.onClick) == null || a.call(e, c), n !== o && j(o);
66
57
  }
67
58
  function A(c, o) {
68
- var e, l;
69
- O((r) => (r[o] = !1, [...r])), (l = (e = a == null ? void 0 : a[o]) == null ? void 0 : e.onBlur) == null || l.call(e, c), C == null || C(c);
59
+ var a, r;
60
+ const e = c.key;
61
+ (r = (a = t == null ? void 0 : t[o]) == null ? void 0 : a.onKeyDown) == null || r.call(a, c), e === hc.key && (u == null || u()), e === yc.key && ($ == null || $(c));
70
62
  }
71
63
  function L(c, o) {
72
- var e, l;
73
- (o === 0 || o === 1) && (O((r) => (r[o] = !0, [...r])), s !== o && R(o, !0)), (l = (e = a == null ? void 0 : a[o]) == null ? void 0 : e.onFocus) == null || l.call(e, c);
64
+ var e, a;
65
+ c.stopPropagation(), (a = (e = t == null ? void 0 : t[o]) == null ? void 0 : e.onChange) == null || a.call(e, c), h == null || h(c);
66
+ }
67
+ function M(c, o) {
68
+ var e, a;
69
+ H((r) => (r[o] = !1, [...r])), (a = (e = t == null ? void 0 : t[o]) == null ? void 0 : e.onBlur) == null || a.call(e, c), N == null || N(c);
70
+ }
71
+ function U(c, o) {
72
+ var e, a;
73
+ (o === 0 || o === 1) && (H((r) => (r[o] = !0, [...r])), n !== o && j(o, !0)), (a = (e = t == null ? void 0 : t[o]) == null ? void 0 : e.onFocus) == null || a.call(e, c);
74
74
  }
75
- const t = cc("picker"), ac = Y || ec, tc = j[0] || j[1] || !!X, M = J || (G ? "error" : void 0), rc = B(
76
- t,
77
- `${t}-range`,
78
- `${t}-size-${ac}`,
75
+ const l = C == null ? void 0 : C("picker"), tc = _ || oc, lc = S[0] || S[1] || !!Z, W = V || (Q ? "error" : void 0), rc = G(
76
+ l,
77
+ `${l}-range`,
78
+ `${l}-size-${tc}`,
79
79
  {
80
- [`${t}-focused`]: tc,
81
- [`${t}-disabled`]: k && v,
82
- [`${t}-${M}`]: M,
83
- [`${t}-rtl`]: lc,
84
- [`${t}-has-prefix`]: y
80
+ [`${l}-focused`]: lc,
81
+ [`${l}-disabled`]: F && D,
82
+ [`${l}-${W}`]: W,
83
+ [`${l}-rtl`]: ac,
84
+ [`${l}-has-prefix`]: y
85
85
  },
86
- V
87
- ), U = (c) => {
88
- const o = m[c] ? m[c].locale(oc.dayjsLocale).format(F(i) ? i[c] : i) : "";
89
- return z && c === s ? z : o;
90
- }, W = _ ? {} : { readOnly: !0 };
91
- function d(c) {
92
- return B(`${t}-input`, {
93
- [`${t}-input-active`]: s === c,
94
- [`${t}-input-placeholder`]: x && s === c
86
+ Y
87
+ ), d = (c) => {
88
+ const o = m[c] ? m[c].locale(g == null ? void 0 : g.dayjsLocale).format(w(i) ? i[c] : i) : "";
89
+ return K && c === n ? K : o;
90
+ }, q = I ? {} : { readOnly: !0 };
91
+ function B(c) {
92
+ return G(`${l}-input`, {
93
+ [`${l}-input-active`]: n === c,
94
+ [`${l}-input-placeholder`]: P && n === c
95
95
  });
96
96
  }
97
- return /* @__PURE__ */ q(
97
+ return /* @__PURE__ */ E(
98
98
  "div",
99
99
  {
100
- style: Q,
101
- ref: K,
100
+ style: X,
101
+ ref: O,
102
102
  className: rc,
103
- ...Cc(p, ["onChange", "onPressEnter"]),
103
+ ...Nc(cc, ["onChange", "onPressEnter"]),
104
104
  children: [
105
- y && /* @__PURE__ */ f("div", { className: `${t}-prefix`, children: y }),
106
- /* @__PURE__ */ f("div", { className: d(0), children: /* @__PURE__ */ f(
105
+ y && /* @__PURE__ */ s("div", { className: `${l}-prefix`, children: y }),
106
+ /* @__PURE__ */ s("div", { className: B(0), children: /* @__PURE__ */ s(
107
107
  "input",
108
108
  {
109
- ref: N,
110
- ...a[0],
111
- disabled: k,
112
- placeholder: w[0],
113
- value: U(0),
114
- onChange: (c) => b(c, 0),
115
- onKeyDown: (c) => H(c, 0),
116
- onClick: (c) => S(c, 0),
117
- onBlur: (c) => A(c, 0),
118
- onFocus: (c) => L(c, 0),
119
- ...W
109
+ ref: k,
110
+ ...t[0],
111
+ disabled: F,
112
+ placeholder: R[0],
113
+ value: d(0),
114
+ onChange: (c) => L(c, 0),
115
+ onKeyDown: (c) => A(c, 0),
116
+ onClick: (c) => b(c, 0),
117
+ onBlur: (c) => M(c, 0),
118
+ onFocus: (c) => U(c, 0),
119
+ ...q
120
120
  }
121
121
  ) }),
122
- /* @__PURE__ */ f("span", { className: `${t}-separator`, children: T || "-" }),
123
- /* @__PURE__ */ f("div", { className: d(1), children: /* @__PURE__ */ f(
122
+ /* @__PURE__ */ s("span", { className: `${l}-separator`, children: x || "-" }),
123
+ /* @__PURE__ */ s("div", { className: B(1), children: /* @__PURE__ */ s(
124
124
  "input",
125
125
  {
126
- ref: g,
127
- ...a[1],
128
- disabled: v,
129
- placeholder: w[1],
130
- value: U(1),
131
- onChange: (c) => b(c, 1),
132
- onKeyDown: (c) => H(c, 1),
133
- onClick: (c) => S(c, 1),
134
- onBlur: (c) => A(c, 1),
135
- onFocus: (c) => L(c, 1),
136
- ...W
126
+ ref: v,
127
+ ...t[1],
128
+ disabled: D,
129
+ placeholder: R[1],
130
+ value: d(1),
131
+ onChange: (c) => L(c, 1),
132
+ onKeyDown: (c) => A(c, 1),
133
+ onClick: (c) => b(c, 1),
134
+ onBlur: (c) => M(c, 1),
135
+ onFocus: (c) => U(c, 1),
136
+ ...q
137
137
  }
138
138
  ) }),
139
- /* @__PURE__ */ q("div", { className: `${t}-suffix`, children: [
140
- E && m.length === 2 && /* @__PURE__ */ f(
139
+ /* @__PURE__ */ E("div", { className: `${l}-suffix`, children: [
140
+ J && m.length === 2 && /* @__PURE__ */ s(
141
141
  $c,
142
142
  {
143
- prefix: t,
144
- onClick: Z,
145
- className: `${t}-clear-icon`,
146
- children: /* @__PURE__ */ f(sc, {})
143
+ prefix: l,
144
+ onClick: T,
145
+ className: `${l}-clear-icon`,
146
+ children: /* @__PURE__ */ s(nc, {})
147
147
  }
148
148
  ),
149
- /* @__PURE__ */ f("span", { className: `${t}-suffix-icon`, children: I })
149
+ /* @__PURE__ */ s("span", { className: `${l}-suffix-icon`, children: p })
150
150
  ] })
151
151
  ]
152
152
  }
153
153
  );
154
154
  }
155
- const Kc = fc(Nc);
155
+ const Kc = sc(Cc);
156
156
  export {
157
157
  Kc as default
158
158
  };
@@ -1,15 +1,15 @@
1
- import { jsx as t, jsxs as d, Fragment as G } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as h, Fragment as G } from "react/jsx-runtime";
2
2
  import J from "@unicom-cloud/icons/IconUiExclamationCircleFill";
3
- import b from "lodash/isFunction";
3
+ import V from "lodash/isFunction";
4
4
  import K from "lodash/isNil";
5
5
  import { forwardRef as Q, useContext as X, useState as Y, useImperativeHandle as Z, useEffect as _ } from "react";
6
- import V from "../button/index.js";
7
- import { a as ee } from "../chunk/CQvM33Vg.js";
8
- import { u as oe } from "../chunk/BFTV6myl.js";
9
- import { u as ne } from "../chunk/CXPOj2uy.js";
10
- import te from "../tooltip/index.js";
11
- import ie from "@unicom-cloud/utils/class-name";
12
- const re = {
6
+ import k from "../button/index.js";
7
+ import { a as oo } from "../chunk/C9oo3EJI.js";
8
+ import { u as eo } from "../chunk/BFTV6myl.js";
9
+ import { u as no } from "../chunk/CXPOj2uy.js";
10
+ import to from "../tooltip/index.js";
11
+ import io from "@unicom-cloud/utils/class-name";
12
+ const ro = {
13
13
  position: "top",
14
14
  okType: "primary",
15
15
  icon: /* @__PURE__ */ t(J, {}),
@@ -18,25 +18,25 @@ const re = {
18
18
  trigger: "click",
19
19
  escToClose: !0
20
20
  };
21
- function se(k, h) {
22
- const { getPrefixCls: y, locale: C, componentConfig: a, rtl: $ } = X(ee), e = oe(
23
- k,
24
- re,
25
- a == null ? void 0 : a.Popconfirm
21
+ function so(y, C) {
22
+ const { getPrefixCls: a, locale: P, componentConfig: p, rtl: $ } = X(oo), o = eo(
23
+ y,
24
+ ro,
25
+ p == null ? void 0 : p.Popconfirm
26
26
  ), {
27
27
  style: v,
28
28
  className: E,
29
- children: p,
29
+ children: m,
30
30
  position: H,
31
31
  getPopupContainer: B,
32
32
  blurToHide: F,
33
33
  unmountOnExit: O,
34
34
  trigger: j,
35
35
  escToClose: w,
36
- onVisibleChange: m,
36
+ onVisibleChange: f,
37
37
  triggerProps: r,
38
- title: f,
39
- icon: P,
38
+ title: u,
39
+ icon: g,
40
40
  okText: z,
41
41
  cancelText: I,
42
42
  okType: L,
@@ -44,87 +44,87 @@ function se(k, h) {
44
44
  cancelButtonProps: S,
45
45
  content: s,
46
46
  ...R
47
- } = e, [u, U] = ne(!1, {
48
- defaultValue: e.defaultPopupVisible,
49
- value: e.popupVisible
50
- }), [g, l] = Y(!1), o = y("popconfirm"), x = !K(s), N = (n) => {
51
- "popupVisible" in e || U(n), r && r.onVisibleChange && r.onVisibleChange(n), m == null || m(n);
52
- }, c = () => {
53
- N(!1);
47
+ } = o, [d, U] = no(!1, {
48
+ defaultValue: o.defaultPopupVisible,
49
+ value: o.popupVisible
50
+ }), [x, c] = Y(!1), e = a == null ? void 0 : a("popconfirm"), N = !K(s), T = (n) => {
51
+ "popupVisible" in o || U(n), r && r.onVisibleChange && r.onVisibleChange(n), f == null || f(n);
52
+ }, l = () => {
53
+ T(!1);
54
54
  }, W = (n) => {
55
55
  var i;
56
- c(), (i = e.onCancel) == null || i.call(e, n);
56
+ l(), (i = o.onCancel) == null || i.call(o, n);
57
57
  }, q = (n) => {
58
- var T;
59
- let i = (T = e.onOk) == null ? void 0 : T.call(e, n);
60
- i != null && i.then && (l(!0), i.then(
58
+ var b;
59
+ const i = (b = o.onOk) == null ? void 0 : b.call(o, n);
60
+ i != null && i.then && (c(!0), i.then(
61
61
  () => {
62
- c();
62
+ l();
63
63
  },
64
64
  (D) => {
65
- l(!1), console.error(D);
65
+ c(!1), console.error(D);
66
66
  }
67
- )), i || c();
67
+ )), i || l();
68
68
  }, A = () => {
69
- const n = /* @__PURE__ */ d(G, { children: [
70
- /* @__PURE__ */ t(V, { onClick: W, size: "mini", ...S, children: I || C.Popconfirm.cancelText }),
69
+ const n = /* @__PURE__ */ h(G, { children: [
70
+ /* @__PURE__ */ t(k, { onClick: W, size: "mini", ...S, children: I || P.Popconfirm.cancelText }),
71
71
  /* @__PURE__ */ t(
72
- V,
72
+ k,
73
73
  {
74
- loading: g,
74
+ loading: x,
75
75
  onClick: q,
76
76
  size: "mini",
77
77
  type: L,
78
78
  ...M,
79
- children: z || C.Popconfirm.okText
79
+ children: z || P.Popconfirm.okText
80
80
  }
81
81
  )
82
82
  ] });
83
- return /* @__PURE__ */ d("div", { className: `${o}-wrapper`, children: [
84
- /* @__PURE__ */ d("div", { className: `${o}-title`, children: [
85
- P && /* @__PURE__ */ t("span", { className: `${o}-title-icon`, children: P }),
86
- /* @__PURE__ */ t("div", { className: `${o}-title-text`, children: b(f) ? f() : f })
83
+ return /* @__PURE__ */ h("div", { className: `${e}-wrapper`, children: [
84
+ /* @__PURE__ */ h("div", { className: `${e}-title`, children: [
85
+ g && /* @__PURE__ */ t("span", { className: `${e}-title-icon`, children: g }),
86
+ /* @__PURE__ */ t("div", { className: `${e}-title-text`, children: V(u) ? u() : u })
87
87
  ] }),
88
- x && /* @__PURE__ */ t("div", { className: `${o}-inner-content`, children: b(s) ? s() : s }),
89
- /* @__PURE__ */ t("div", { className: `${o}-btn`, children: n })
88
+ N && /* @__PURE__ */ t("div", { className: `${e}-inner-content`, children: V(s) ? s() : s }),
89
+ /* @__PURE__ */ t("div", { className: `${e}-btn`, children: n })
90
90
  ] });
91
91
  };
92
- return Z(h, () => ({
93
- close: c
94
- })), _(() => (!u && g && l(!1), () => {
95
- l(!1);
96
- }), [u]), /* @__PURE__ */ t(
97
- te,
92
+ return Z(C, () => ({
93
+ close: l
94
+ })), _(() => (!d && x && c(!1), () => {
95
+ c(!1);
96
+ }), [d]), /* @__PURE__ */ t(
97
+ to,
98
98
  {
99
99
  ...R,
100
- ref: h,
100
+ ref: C,
101
101
  style: {
102
102
  maxWidth: 350,
103
103
  ...v
104
104
  },
105
- className: ie(E, {
106
- [`${o}-rtl`]: $,
107
- [`${o}-has-content`]: x
105
+ className: io(E, {
106
+ [`${e}-rtl`]: $,
107
+ [`${e}-has-content`]: N
108
108
  }),
109
- prefixCls: o,
109
+ prefixCls: e,
110
110
  getPopupContainer: B,
111
111
  position: H,
112
112
  trigger: j,
113
113
  escToClose: w,
114
- popupVisible: u,
114
+ popupVisible: d,
115
115
  content: A,
116
116
  unmountOnExit: O,
117
117
  blurToHide: F,
118
118
  popupHoverStay: !0,
119
119
  triggerProps: r,
120
- onVisibleChange: N,
121
- childrenPrefix: o,
122
- children: typeof p == "string" ? /* @__PURE__ */ t("span", { children: p }) : p
120
+ onVisibleChange: T,
121
+ childrenPrefix: e,
122
+ children: typeof m == "string" ? /* @__PURE__ */ t("span", { children: m }) : m
123
123
  }
124
124
  );
125
125
  }
126
- const le = Q(se);
127
- le.displayName = "Popconfirm";
126
+ const co = Q(so);
127
+ co.displayName = "Popconfirm";
128
128
  export {
129
- le as default
129
+ co as default
130
130
  };
package/popover/index.js CHANGED
@@ -1,71 +1,71 @@
1
- import { jsxs as j, jsx as o } from "react/jsx-runtime";
2
- import m from "lodash/isFunction";
1
+ import { jsxs as j, jsx as e } from "react/jsx-runtime";
2
+ import c from "lodash/isFunction";
3
3
  import { forwardRef as O, useContext as R } from "react";
4
- import { a as T } from "../chunk/CQvM33Vg.js";
4
+ import { a as T } from "../chunk/C9oo3EJI.js";
5
5
  import { u as w } from "../chunk/BFTV6myl.js";
6
6
  import F from "../tooltip/index.js";
7
7
  import H from "@unicom-cloud/utils/class-name";
8
- import { c } from "../chunk/ClM74To2.js";
8
+ import { c as u } from "../chunk/ClM74To2.js";
9
9
  const M = {
10
10
  position: "top",
11
11
  trigger: "hover",
12
12
  unmountOnExit: !0
13
13
  };
14
- function S(u, d) {
15
- const { getPrefixCls: f, componentConfig: t, rtl: g } = R(T), l = w(
16
- u,
14
+ function S(d, f) {
15
+ const { getPrefixCls: t, componentConfig: n, rtl: g } = R(T), a = w(
16
+ d,
17
17
  M,
18
- t == null ? void 0 : t.Popover
18
+ n == null ? void 0 : n.Popover
19
19
  ), {
20
- style: C,
21
- className: h,
22
- children: n,
23
- position: v,
20
+ style: h,
21
+ className: v,
22
+ children: r,
23
+ position: C,
24
24
  getPopupContainer: x,
25
- trigger: P,
26
- defaultPopupVisible: N,
25
+ trigger: N,
26
+ defaultPopupVisible: P,
27
27
  popupVisible: b,
28
- triggerProps: r,
28
+ triggerProps: i,
29
29
  unmountOnExit: y,
30
30
  onVisibleChange: V,
31
- content: i,
32
- title: s,
31
+ content: s,
32
+ title: p,
33
33
  ...$
34
- } = l, e = f("popover"), p = m(s) ? s() : s, a = m(i) ? i() : i, E = c(p, !0) && c(a, !0) ? null : /* @__PURE__ */ j(
34
+ } = a, o = t == null ? void 0 : t("popover"), l = c(p) ? p() : p, m = c(s) ? s() : s, E = u(l, !0) && u(m, !0) ? null : /* @__PURE__ */ j(
35
35
  "div",
36
36
  {
37
- className: H(`${e}-inner`, {
38
- [`${e}-inner-rtl`]: g
37
+ className: H(`${o}-inner`, {
38
+ [`${o}-inner-rtl`]: g
39
39
  }),
40
40
  children: [
41
- p ? /* @__PURE__ */ o("div", { className: `${e}-title`, children: p }) : null,
42
- /* @__PURE__ */ o("div", { className: `${e}-inner-content`, children: a })
41
+ l ? /* @__PURE__ */ e("div", { className: `${o}-title`, children: l }) : null,
42
+ /* @__PURE__ */ e("div", { className: `${o}-inner-content`, children: m })
43
43
  ]
44
44
  }
45
45
  );
46
- return /* @__PURE__ */ o(
46
+ return /* @__PURE__ */ e(
47
47
  F,
48
48
  {
49
49
  ...$,
50
- ref: d,
50
+ ref: f,
51
51
  style: {
52
52
  maxWidth: 350,
53
- ...C
53
+ ...h
54
54
  },
55
- className: h,
56
- prefixCls: e,
55
+ className: v,
56
+ prefixCls: o,
57
57
  getPopupContainer: x,
58
- position: v,
59
- trigger: P,
58
+ position: C,
59
+ trigger: N,
60
60
  content: E,
61
61
  popupHoverStay: !0,
62
62
  unmountOnExit: y,
63
- triggerProps: r,
64
- defaultPopupVisible: N,
65
- onVisibleChange: V || (r ? r.onVisibleChange : void 0),
66
- childrenPrefix: e,
67
- ..."popupVisible" in l ? { popupVisible: b } : {},
68
- children: typeof n == "string" ? /* @__PURE__ */ o("span", { children: n }) : n
63
+ triggerProps: i,
64
+ defaultPopupVisible: P,
65
+ onVisibleChange: V || (i ? i.onVisibleChange : void 0),
66
+ childrenPrefix: o,
67
+ ..."popupVisible" in a ? { popupVisible: b } : {},
68
+ children: typeof r == "string" ? /* @__PURE__ */ e("span", { children: r }) : r
69
69
  }
70
70
  );
71
71
  }