@unicom-cloud/ui 0.8.82 → 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 (262) 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 +1 -1
  17. package/Copy.js +1 -1
  18. package/DatePicker.js +1 -1
  19. package/Descriptions.js +1 -1
  20. package/Divider.js +1 -1
  21. package/Draggable.js +1 -1
  22. package/Dropdown.js +1 -1
  23. package/Empty.js +1 -1
  24. package/Icon.js +1 -1
  25. package/IconHover.js +1 -1
  26. package/Image.js +1 -1
  27. package/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 +1 -1
  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/Spin.js +1 -1
  53. package/Statistic.js +1 -1
  54. package/Steps.js +1 -1
  55. package/Switch.js +1 -1
  56. package/Table.js +1 -1
  57. package/Tabs.js +1 -1
  58. package/Tag.js +1 -1
  59. package/Tooltip.js +1 -1
  60. package/Transfer.js +2 -2
  61. package/Tree.js +1 -1
  62. package/TreeSelect.js +1 -1
  63. package/Trigger.js +1 -1
  64. package/Typography.js +1 -1
  65. package/affix/index.js +1 -1
  66. package/alert/index.js +1 -1
  67. package/anchor/Anchor.js +1 -1
  68. package/anchor/Link.js +1 -1
  69. package/auto-complete/index.js +2 -2
  70. package/avatar/Avatar.js +1 -1
  71. package/avatar/Group.js +1 -1
  72. package/back-top/index.js +1 -1
  73. package/badge/index.js +1 -1
  74. package/breadcrumb/index.js +2 -2
  75. package/button/Group.js +1 -1
  76. package/button/index.js +1 -1
  77. package/calendar/index.js +2 -2
  78. package/card/Grid.js +1 -1
  79. package/card/Meta.js +1 -1
  80. package/card/index.js +1 -1
  81. package/carousel/Arrow.js +1 -1
  82. package/carousel/Indicator.js +1 -1
  83. package/carousel/index.js +1 -1
  84. package/cascader/Cascader.js +2 -2
  85. package/cascader/index.js +1 -1
  86. package/cascader/util.js +1 -1
  87. package/checkbox/Checkbox.js +2 -2
  88. package/checkbox/Group.js +2 -2
  89. package/checkbox/GroupBlock.js +2 -2
  90. package/checkbox/index.js +2 -2
  91. package/chunk/B6r8jPCd.js +6 -0
  92. package/chunk/{w221i0nK.js → BmulTYLW.js} +14 -13
  93. package/chunk/C9oo3EJI.js +692 -0
  94. package/chunk/{D0338Pbq.js → CVSWh4ZZ.js} +1 -1
  95. package/chunk/{CmMehQON.js → DILUZgXW.js} +1 -1
  96. package/chunk/DSRHFFrc.js +53 -0
  97. package/chunk/{CQI1gsQs.js → DdJVL_4g.js} +1 -1
  98. package/chunk/{DXDbeIai.js → DlHiTTJO.js} +1 -1
  99. package/chunk/{dKvAiKxr.js → R-uQJib2.js} +2 -2
  100. package/chunk/{DfrB26fI.js → ev6oHWqY.js} +1 -1
  101. package/collapse/Collapse.js +2 -2
  102. package/collapse/Item.js +2 -2
  103. package/collapse/index.js +1 -1
  104. package/color-picker/ControlBar.js +1 -1
  105. package/color-picker/InputAlpha.js +1 -1
  106. package/color-picker/InputHex.js +1 -1
  107. package/color-picker/InputRgb.js +1 -1
  108. package/color-picker/Palette.js +1 -1
  109. package/color-picker/Panel.js +2 -2
  110. package/color-picker/index.js +2 -2
  111. package/comment/index.js +1 -1
  112. package/config-provider/ConfigProvider.js +6 -5
  113. package/config-provider/context.js +1 -1
  114. package/config-provider/index.js +2 -2
  115. package/copy/index.js +1 -1
  116. package/date-picker/Picker.js +1 -1
  117. package/date-picker/RangePicker.js +2 -2
  118. package/date-picker/index.js +1 -1
  119. package/descriptions/index.js +1 -1
  120. package/divider/index.js +1 -1
  121. package/draggable/index.js +1 -1
  122. package/drawer/Drawer.js +1 -1
  123. package/dropdown/Button.js +1 -1
  124. package/dropdown/index.js +1 -1
  125. package/empty/index.js +1 -1
  126. package/form/Form.js +1 -1
  127. package/form/FormItem.js +1 -1
  128. package/form/context.js +1 -1
  129. package/grid/Col.js +1 -1
  130. package/grid/Row.js +1 -1
  131. package/grid/grid-item.js +1 -1
  132. package/grid/grid.js +1 -1
  133. package/icon/index.js +1 -1
  134. package/icon-hover/index.js +1 -1
  135. package/image/Image.js +2 -2
  136. package/image/ImagePreview.js +2 -2
  137. package/image/ImagePreviewArrow.js +1 -1
  138. package/image/ImagePreviewGroup.js +1 -1
  139. package/image/index.js +1 -1
  140. package/index.js +448 -445
  141. package/input/Button.js +11 -0
  142. package/input/Group.js +1 -1
  143. package/input/Input.js +451 -397
  144. package/input/InputElement.js +1 -1
  145. package/input/Password.js +1 -1
  146. package/input/Search.js +1 -1
  147. package/input/Textarea.js +1 -1
  148. package/input/index.js +9 -8
  149. package/input-number/index.js +1 -1
  150. package/input-tag/InputTag.js +1 -1
  151. package/layout/Content.js +1 -1
  152. package/layout/Footer.js +1 -1
  153. package/layout/Header.js +1 -1
  154. package/layout/Sider.js +1 -1
  155. package/layout/index.js +1 -1
  156. package/link/index.js +1 -1
  157. package/list/Item.js +1 -1
  158. package/list/Meta.js +1 -1
  159. package/list/index.js +2 -2
  160. package/mentions/index.js +2 -2
  161. package/menu/Menu.js +2 -2
  162. package/menu/OverflowWrap.js +1 -1
  163. package/menu/index.js +2 -2
  164. package/message/index.js +1 -1
  165. package/message/useMessage.js +1 -1
  166. package/modal/Confirm.js +2 -2
  167. package/modal/Modal.js +2 -2
  168. package/modal/index.js +1 -1
  169. package/notice/index.js +1 -1
  170. package/notification/index.js +1 -1
  171. package/notification/useNotification.js +1 -1
  172. package/overflow-ellipsis/OverflowItem.js +1 -1
  173. package/overflow-ellipsis/index.js +1 -1
  174. package/package.json +1 -1
  175. package/page-header/index.js +1 -1
  176. package/pagination/PageItem.js +1 -1
  177. package/pagination/PageJumper.js +1 -1
  178. package/pagination/PageOption.js +2 -2
  179. package/pagination/Pagination.js +2 -2
  180. package/pagination/index.js +1 -1
  181. package/picker/Input.js +1 -1
  182. package/picker/InputRange.js +1 -1
  183. package/popconfirm/index.js +1 -1
  184. package/popover/index.js +1 -1
  185. package/progress/index.js +1 -1
  186. package/radio/Group.js +2 -2
  187. package/radio/GroupBlock.js +2 -2
  188. package/radio/Radio.js +2 -2
  189. package/radio/index.js +2 -2
  190. package/rate/index.js +1 -1
  191. package/resize-box/ResizeTrigger.js +1 -1
  192. package/resize-box/Split.js +1 -1
  193. package/resize-box/SplitGroup.js +1 -1
  194. package/resize-box/index.js +1 -1
  195. package/result/index.js +1 -1
  196. package/select/Option.js +1 -1
  197. package/select/Select.js +2 -2
  198. package/select/index.js +2 -2
  199. package/select/util.js +1 -1
  200. package/select-view/Core.js +1 -1
  201. package/skeleton/index.js +1 -1
  202. package/slider/Button.js +1 -1
  203. package/slider/index.js +1 -1
  204. package/space/index.js +1 -1
  205. package/spin/DotLoading.js +1 -1
  206. package/spin/index.js +1 -1
  207. package/statistic/Countdown.js +1 -1
  208. package/statistic/index.js +1 -1
  209. package/steps/index.js +1 -1
  210. package/style.css +1 -1
  211. package/switch/index.js +1 -1
  212. package/table/Table.js +2 -2
  213. package/table/index.js +1 -1
  214. package/tabs/Tab.js +2 -2
  215. package/tabs/TabContent.js +2 -2
  216. package/tabs/TabPane.js +1 -1
  217. package/tabs/index.js +2 -2
  218. package/tag/index.js +1 -1
  219. package/time-picker/Picker.js +1 -1
  220. package/time-picker/TimePicker.js +1 -1
  221. package/timeline/Item.js +1 -1
  222. package/timeline/Timeline.js +1 -1
  223. package/tooltip/index.js +1 -1
  224. package/transfer/Item.js +2 -2
  225. package/transfer/List.js +2 -2
  226. package/transfer/index.js +2 -2
  227. package/tree/Animation.js +2 -2
  228. package/tree/Node.js +2 -2
  229. package/tree/NodeList.js +1 -1
  230. package/tree/Tree.js +2 -2
  231. package/tree/index.js +1 -1
  232. package/tree-select/List.js +1 -1
  233. package/tree-select/Select.js +2 -2
  234. package/tree-select/index.js +2 -2
  235. package/trigger/index.js +1 -1
  236. package/types/index.d.ts +1 -1
  237. package/types/input/Button.d.ts +5 -0
  238. package/types/input/Input.d.ts +4 -1
  239. package/types/input/interface.d.ts +7 -0
  240. package/types/utils/index.d.ts +1 -0
  241. package/types/utils/setTheme.d.ts +2 -0
  242. package/typography/Base.js +1 -1
  243. package/typography/Ellipsis.js +8 -7
  244. package/typography/Paragraph.js +1 -1
  245. package/typography/Typography.js +1 -1
  246. package/typography/index.js +1 -1
  247. package/upload/TriggerNode.js +1 -1
  248. package/upload/Upload.js +1 -1
  249. package/upload/request.js +1 -1
  250. package/upload/request_.js +1 -1
  251. package/utils/constant.js +1 -1
  252. package/utils/contextHolder.js +1 -1
  253. package/utils/dom.js +1 -1
  254. package/utils/index.js +110 -108
  255. package/utils/setDarkTheme.js +23 -22
  256. package/utils/setPrimaryColor.js +20 -19
  257. package/utils/setTheme.js +9 -0
  258. package/verification-code/VerificationCode.js +1 -1
  259. package/version/index.js +1 -1
  260. package/watermark/Watermark.js +1 -1
  261. package/chunk/Cplu5dtQ.js +0 -730
  262. package/chunk/D0ZWT7db.js +0 -5
package/input/Input.js CHANGED
@@ -1,38 +1,89 @@
1
- import { jsx as c, jsxs as ee, Fragment as We } from "react/jsx-runtime";
2
- import ie from "lodash/isPlainObject";
3
- import He from "lodash/isString";
4
- import Be from "lodash/isUndefined";
5
- import ue, { useContext as ce, useState as oe, useRef as te, useMemo as le, useImperativeHandle as $e, useCallback as Fe, useEffect as Ne } from "react";
6
- import { a as me, I as _e } from "../chunk/Cplu5dtQ.js";
7
- import { u as Re } from "../chunk/BFTV6myl.js";
8
- import { u as he } from "../chunk/CXPOj2uy.js";
9
- import k from "@unicom-cloud/utils/class-name";
1
+ import { jsx as c, jsxs as te, Fragment as He } from "react/jsx-runtime";
2
+ import ne from "lodash/isPlainObject";
3
+ import Fe from "lodash/isString";
4
+ import _e from "lodash/isUndefined";
5
+ import ie, { useContext as le, useState as se, useRef as re, useMemo as de, useImperativeHandle as be, useCallback as Ge, useEffect as xe } from "react";
6
+ import { a as ue, I as je } from "../chunk/C9oo3EJI.js";
7
+ import { u as Ee } from "../chunk/BFTV6myl.js";
8
+ import { u as me } from "../chunk/CXPOj2uy.js";
9
+ import O from "@unicom-cloud/utils/class-name";
10
10
  import { contains as Se } from "../utils/dom.js";
11
- import Ge from "./Group.js";
12
- import je from "./InputElement.js";
13
- import Ke from "@unicom-cloud/icons/IconUiDown";
14
- import qe from "@unicom-cloud/icons/IconUiMinus";
15
- import Ye from "@unicom-cloud/icons/IconUiPlus";
16
- import Je from "@unicom-cloud/icons/IconUiUp";
17
- import xe from "lodash/isNumber";
18
- import Qe from "@unicom-cloud/icons/IconUiEye";
19
- import Xe from "@unicom-cloud/icons/IconUiEyeInvisible";
20
- import { u as Ze } from "../chunk/BYdIoY50.js";
11
+ import Re from "../button/index.js";
12
+ import Ke from "./Group.js";
13
+ import qe from "./InputElement.js";
14
+ import Ye from "@unicom-cloud/icons/IconUiDown";
15
+ import Je from "@unicom-cloud/icons/IconUiMinus";
16
+ import Qe from "@unicom-cloud/icons/IconUiPlus";
17
+ import Xe from "@unicom-cloud/icons/IconUiUp";
18
+ import Ne from "lodash/isNumber";
19
+ import { ArrowDown as Ze, ArrowUp as et } from "@unicom-cloud/utils/constant/keyboardCode";
21
20
  import { o as ve } from "../chunk/BKKEev13.js";
22
- import et from "@unicom-cloud/icons/IconUiLoading";
23
- import Ve from "@unicom-cloud/icons/IconUiSearch";
24
- import tt from "../button/index.js";
25
- import Ae from "../input-tag/InputTag.js";
26
- import nt from "@unicom-cloud/icons/IconUiClose";
27
- import { u as rt } from "../chunk/B2yFlXke.js";
21
+ import { getDecimal as oe } from "../input-number/decimal.js";
22
+ import tt from "../input-number/useSelectionRange.js";
23
+ import nt from "@unicom-cloud/icons/IconUiEye";
24
+ import rt from "@unicom-cloud/icons/IconUiEyeInvisible";
25
+ import { u as at } from "../chunk/BYdIoY50.js";
26
+ import ot from "@unicom-cloud/icons/IconUiLoading";
27
+ import Le from "@unicom-cloud/icons/IconUiSearch";
28
+ import De from "../input-tag/InputTag.js";
29
+ import st from "@unicom-cloud/icons/IconUiClose";
30
+ import { u as it } from "../chunk/B2yFlXke.js";
28
31
  import "../chunk/ClM74To2.js";
29
- import ot from "./autoSizeTextAreaHeight.js";
30
- import st from "./useComposition.js";
31
- import { isPlainObject as Ee } from "@unicom-cloud/utils/is";
32
- import { ArrowDown as at, ArrowUp as it } from "@unicom-cloud/utils/constant/keyboardCode";
33
- import { getDecimal as re } from "../input-number/decimal.js";
34
- import lt from "../input-number/useSelectionRange.js";
35
- const ut = 200, ct = 1e3, mt = {
32
+ import lt from "./autoSizeTextAreaHeight.js";
33
+ import ut from "./useComposition.js";
34
+ import { isPlainObject as Ae } from "@unicom-cloud/utils/is";
35
+ const $e = ie.forwardRef(
36
+ (e, b) => {
37
+ const { getPrefixCls: l } = le(ue), {
38
+ className: M,
39
+ style: $,
40
+ placeholder: T,
41
+ disabled: n,
42
+ loading: x,
43
+ defaultValue: f,
44
+ addAfter: A,
45
+ ...h
46
+ } = e, E = l == null ? void 0 : l("input-button"), p = O(E, `${E}-button`, M), P = ne(e.maxLength) ? e.maxLength.length : e.maxLength, R = ne(e.maxLength) && e.maxLength.errorOnly ? void 0 : P, [I, w] = me("", {
47
+ defaultValue: "defaultValue" in e ? Q(e.defaultValue, R) : void 0,
48
+ value: "value" in e ? Q(e.value, R) : void 0
49
+ });
50
+ return /* @__PURE__ */ c(
51
+ L,
52
+ {
53
+ ...h,
54
+ disabled: n,
55
+ className: p,
56
+ style: $,
57
+ ref: b,
58
+ placeholder: T,
59
+ addAfter: A !== void 0 ? A : /* @__PURE__ */ c(
60
+ Re,
61
+ {
62
+ disabled: n,
63
+ size: h.size,
64
+ className: `${E}-btn`,
65
+ type: "primary",
66
+ onClick: (y) => {
67
+ var a, u;
68
+ (a = e.onCallback) == null || a.call(e, I), (u = e.onClick) == null || u.call(e, y);
69
+ },
70
+ loading: x,
71
+ loadingFixedWidth: !0,
72
+ ...e == null ? void 0 : e.buttonProps,
73
+ children: e.label ?? "确定"
74
+ }
75
+ ),
76
+ defaultValue: f,
77
+ onChange: (y, a) => {
78
+ var u;
79
+ w(y), (u = e.onChange) == null || u.call(e, y, a);
80
+ }
81
+ }
82
+ );
83
+ }
84
+ );
85
+ $e.displayName = "Input.Button";
86
+ const ct = 200, dt = 1e3, mt = {
36
87
  max: 1 / 0,
37
88
  min: -1 / 0,
38
89
  step: 1,
@@ -40,404 +91,404 @@ const ut = 200, ct = 1e3, mt = {
40
91
  parser: (e) => (e == null ? void 0 : e.replace(/[^\w.-]+/g, "")) || ""
41
92
  };
42
93
  function ft(e, b) {
43
- var Ce;
94
+ var Ve;
44
95
  const {
45
- getPrefixCls: m,
46
- size: D,
47
- componentConfig: I,
48
- rtl: L
49
- } = ce(me), n = Re(
96
+ getPrefixCls: l,
97
+ size: M,
98
+ componentConfig: $,
99
+ rtl: T
100
+ } = le(ue), n = Ee(
50
101
  e,
51
102
  mt,
52
- I == null ? void 0 : I.InputNumber
103
+ $ == null ? void 0 : $.InputNumber
53
104
  ), {
54
105
  className: x,
55
- style: g,
56
- defaultValue: T,
57
- disabled: y,
58
- error: z,
59
- readOnly: h,
60
- strictMode: M,
61
- placeholder: P,
62
- hideControl: w,
63
- suffix: C,
64
- prefix: V,
65
- icons: l,
66
- mode: d,
67
- size: i,
68
- step: f,
106
+ style: f,
107
+ defaultValue: A,
108
+ disabled: h,
109
+ error: E,
110
+ readOnly: p,
111
+ strictMode: P,
112
+ placeholder: R,
113
+ hideControl: I,
114
+ suffix: w,
115
+ prefix: y,
116
+ icons: a,
117
+ mode: u,
118
+ size: d,
119
+ step: g,
69
120
  precision: U,
70
- min: p,
71
- max: O,
121
+ min: v,
122
+ max: z,
72
123
  parser: G,
73
124
  formatter: W,
74
125
  onBlur: S,
75
126
  onFocus: j,
76
- onChange: H,
77
- onKeyDown: B,
78
- ...Q
79
- } = n, N = m == null ? void 0 : m("input-number"), r = i || D, R = (() => {
80
- if (xe(U)) {
81
- const t = `${f}`.split(".")[1], u = t && t.length || 0;
82
- return Math.max(u, U);
127
+ onChange: B,
128
+ onKeyDown: H,
129
+ ...X
130
+ } = n, C = l == null ? void 0 : l("input-number"), r = d || M, k = (() => {
131
+ if (Ne(U)) {
132
+ const t = `${g}`.split(".")[1], m = t && t.length || 0;
133
+ return Math.max(m, U);
83
134
  }
84
135
  return null;
85
- })(), [q, K] = oe(() => re(
86
- "value" in n ? n.value : "defaultValue" in n ? T : void 0
87
- )), [E, X] = oe(""), [ne, Y] = oe(!1), [J, F] = oe(!1), a = te(null), o = te(null), v = te(!1), s = le(() => "value" in n ? re(n.value) : q, [n.value, q]), [_, Z] = le(() => [re(O), re(p)], [O, p]);
88
- $e(b, () => o.current, []);
89
- const fe = (t, u) => {
90
- if (K(t), !t.equals(s) && H) {
91
- const $ = t.toString({
136
+ })(), [q, K] = se(() => oe(
137
+ "value" in n ? n.value : "defaultValue" in n ? A : void 0
138
+ )), [D, Z] = se(""), [ae, Y] = se(!1), [J, F] = se(!1), i = re(null), o = re(null), N = re(!1), s = de(() => "value" in n ? oe(n.value) : q, [n.value, q]), [_, ee] = de(() => [oe(z), oe(v)], [z, v]);
139
+ be(b, () => o.current, []);
140
+ const fe = (t, m) => {
141
+ if (K(t), !t.equals(s) && B) {
142
+ const V = t.toString({
92
143
  safe: !0,
93
- precision: R
144
+ precision: k
94
145
  });
95
- H(
96
- t.isEmpty ? void 0 : M ? $ : t.isNaN ? NaN : Number($),
97
- u
146
+ B(
147
+ t.isEmpty ? void 0 : P ? V : t.isNaN ? NaN : Number(V),
148
+ m
98
149
  );
99
150
  }
100
- }, de = () => {
101
- a.current && clearTimeout(a.current), a.current = null;
102
- }, ae = Fe(
151
+ }, ge = () => {
152
+ i.current && clearTimeout(i.current), i.current = null;
153
+ }, ce = Ge(
103
154
  (t) => {
104
- let u = t;
105
- return u.less(Z) ? u = Z : _.less(u) && (u = _), u;
155
+ let m = t;
156
+ return m.less(ee) ? m = ee : _.less(m) && (m = _), m;
106
157
  },
107
- [Z, _]
158
+ [ee, _]
108
159
  );
109
- Ne(() => () => de(), []), Ne(() => {
110
- v.current = !1;
111
- }, [n.value]), Ne(() => {
112
- const t = s.less(Z) || _.less(s);
113
- t && v.current && fe(ae(s), "outOfRange"), Y(t);
114
- }, [Z, _, s, ae]);
115
- const ye = (t, u, $ = !1) => {
116
- if (t.persist(), t.preventDefault(), F(!1), y || h)
160
+ xe(() => () => ge(), []), xe(() => {
161
+ N.current = !1;
162
+ }, [n.value]), xe(() => {
163
+ const t = s.less(ee) || _.less(s);
164
+ t && N.current && fe(ce(s), "outOfRange"), Y(t);
165
+ }, [ee, _, s, ce]);
166
+ const ye = (t, m, V = !1) => {
167
+ if (t.persist(), t.preventDefault(), F(!1), h || p)
117
168
  return;
118
- const ke = s.isInvalid ? re(p === -1 / 0 || p <= 0 && O >= 0 ? 0 : p) : s.add(u === "plus" ? f : -f);
169
+ const We = s.isInvalid ? oe(v === -1 / 0 || v <= 0 && z >= 0 ? 0 : v) : s.add(m === "plus" ? g : -g);
119
170
  if (fe(
120
- ae(ke),
121
- u === "plus" ? "increase" : "decrease"
122
- ), o.current && o.current.focus(), $) {
123
- const ze = a.current === null;
124
- a.current = setTimeout(
171
+ ce(We),
172
+ m === "plus" ? "increase" : "decrease"
173
+ ), o.current && o.current.focus(), V) {
174
+ const Be = i.current === null;
175
+ i.current = setTimeout(
125
176
  () => t.target.dispatchEvent(t.nativeEvent),
126
- ze ? ct : ut
177
+ Be ? dt : ct
127
178
  );
128
179
  }
129
- }, Ie = le(() => {
180
+ }, we = de(() => {
130
181
  let t;
131
- return J ? t = G ? `${G(E)}` : E : xe(R) ? t = s.toString({ safe: !0, precision: R }) : s.isInvalid ? t = "" : t = s.toString(), W ? W(t, { userTyping: J, input: E }) : t;
132
- }, [s, E, J, R, G, W]), Me = lt({
133
- inputElement: (Ce = o.current) == null ? void 0 : Ce.dom,
134
- inputValue: Ie
135
- }), Pe = {
136
- onChange: (t, u) => {
182
+ return J ? t = G ? `${G(D)}` : D : Ne(k) ? t = s.toString({ safe: !0, precision: k }) : s.isInvalid ? t = "" : t = s.toString(), W ? W(t, { userTyping: J, input: D }) : t;
183
+ }, [s, D, J, k, G, W]), ke = tt({
184
+ inputElement: (Ve = o.current) == null ? void 0 : Ve.dom,
185
+ inputValue: we
186
+ }), Oe = {
187
+ onChange: (t, m) => {
137
188
  F(!0), t = t.trim().replace(/。/g, ".");
138
- const $ = G ? G(t) : t;
139
- (xe(+$) || $ === "-" || !$ || $ === ".") && (X(t), fe(ae(re($)), "manual"), Me(u));
189
+ const V = G ? G(t) : t;
190
+ (Ne(+V) || V === "-" || !V || V === ".") && (Z(t), fe(ce(oe(V)), "manual"), ke(m));
140
191
  },
141
192
  onKeyDown: (t) => {
142
- const u = t.key;
143
- u === at.key ? (t.stopPropagation(), ye(t, "minus")) : u === it.key && (t.stopPropagation(), ye(t, "plus")), de(), B == null || B(t);
193
+ const m = t.key;
194
+ m === Ze.key ? (t.stopPropagation(), ye(t, "minus")) : m === et.key && (t.stopPropagation(), ye(t, "plus")), ge(), H == null || H(t);
144
195
  },
145
196
  onFocus: (t) => {
146
- var u, $;
147
- v.current = !0, X(($ = (u = o.current) == null ? void 0 : u.dom) == null ? void 0 : $.value), j == null || j(t);
197
+ var m, V;
198
+ N.current = !0, Z((V = (m = o.current) == null ? void 0 : m.dom) == null ? void 0 : V.value), j == null || j(t);
148
199
  },
149
200
  onBlur: (t) => {
150
- fe(ae(s), "outOfRange"), F(!1), S == null || S(t);
201
+ fe(ce(s), "outOfRange"), F(!1), S == null || S(t);
151
202
  }
152
- }, Ue = (t) => h ? {} : {
153
- onMouseDown: (u) => ye(u, t, !0)
154
- }, we = !w && d === "button", Oe = !w && !h && d === "embed", pe = (t, u) => {
155
- const $ = !y && (s.isInvalid || (t === "plus" ? _.isInvalid || s.less(_) : Z.isInvalid || Z.less(s)));
203
+ }, Ue = (t) => p ? {} : {
204
+ onMouseDown: (m) => ye(m, t, !0)
205
+ }, Ce = !I && u === "button", ze = !I && !p && u === "embed", he = (t, m) => {
206
+ const V = !h && (s.isInvalid || (t === "plus" ? _.isInvalid || s.less(_) : ee.isInvalid || ee.less(s)));
156
207
  return /* @__PURE__ */ c(
157
208
  "div",
158
209
  {
159
- className: k(`${N}-step-button`, {
160
- [`${N}-step-button-disabled`]: !$
210
+ className: O(`${C}-step-button`, {
211
+ [`${C}-step-button-disabled`]: !V
161
212
  }),
162
- onMouseLeave: de,
163
- onMouseUp: de,
164
- ...$ ? Ue(t) : {},
165
- children: u
213
+ onMouseLeave: ge,
214
+ onMouseUp: ge,
215
+ ...V ? Ue(t) : {},
216
+ children: m
166
217
  }
167
218
  );
168
219
  };
169
220
  return /* @__PURE__ */ c(
170
- A,
221
+ L,
171
222
  {
172
223
  _ignorePropsFromGlobal: !0,
173
224
  role: "spinbutton",
174
- "aria-valuemax": O,
175
- "aria-valuemin": p,
225
+ "aria-valuemax": z,
226
+ "aria-valuemin": v,
176
227
  "aria-valuenow": s.isEmpty ? void 0 : s.toNumber(),
177
- ...ve(Q, ["allowClear"]),
178
- ...Pe,
179
- style: g,
180
- className: k(
181
- N,
182
- `${N}-mode-${d}`,
183
- `${N}-size-${r}`,
228
+ ...ve(X, ["allowClear"]),
229
+ ...Oe,
230
+ style: f,
231
+ className: O(
232
+ C,
233
+ `${C}-mode-${u}`,
234
+ `${C}-size-${r}`,
184
235
  {
185
- [`${N}-rtl`]: L,
186
- [`${N}-readonly`]: h,
187
- [`${N}-illegal-value`]: !s.isEmpty && ne
236
+ [`${C}-rtl`]: T,
237
+ [`${C}-readonly`]: p,
238
+ [`${C}-illegal-value`]: !s.isEmpty && ae
188
239
  },
189
240
  x
190
241
  ),
191
242
  ref: o,
192
243
  size: r,
193
- error: z,
194
- disabled: y,
195
- readOnly: h,
196
- value: Ie,
197
- placeholder: P,
198
- prefix: V && /* @__PURE__ */ c("div", { className: `${N}-prefix`, children: V }),
199
- suffix: /* @__PURE__ */ ee(We, { children: [
200
- Oe && /* @__PURE__ */ ee("div", { className: `${N}-step-layer`, children: [
201
- pe(
244
+ error: E,
245
+ disabled: h,
246
+ readOnly: p,
247
+ value: we,
248
+ placeholder: R,
249
+ prefix: y && /* @__PURE__ */ c("div", { className: `${C}-prefix`, children: y }),
250
+ suffix: /* @__PURE__ */ te(He, { children: [
251
+ ze && /* @__PURE__ */ te("div", { className: `${C}-step-layer`, children: [
252
+ he(
202
253
  "plus",
203
- l && l.up ? l.up : /* @__PURE__ */ c(Je, {})
254
+ a && a.up ? a.up : /* @__PURE__ */ c(Xe, {})
204
255
  ),
205
- pe(
256
+ he(
206
257
  "minus",
207
- l && l.down ? l.down : /* @__PURE__ */ c(Ke, {})
258
+ a && a.down ? a.down : /* @__PURE__ */ c(Ye, {})
208
259
  )
209
260
  ] }),
210
- C && /* @__PURE__ */ c("div", { className: `${N}-suffix`, children: C })
261
+ w && /* @__PURE__ */ c("div", { className: `${C}-suffix`, children: w })
211
262
  ] }),
212
- addBefore: we && pe(
263
+ addBefore: Ce && he(
213
264
  "minus",
214
- l && l.minus ? l.minus : /* @__PURE__ */ c(qe, {})
265
+ a && a.minus ? a.minus : /* @__PURE__ */ c(Je, {})
215
266
  ),
216
- addAfter: we && pe(
267
+ addAfter: Ce && he(
217
268
  "plus",
218
- l && l.plus ? l.plus : /* @__PURE__ */ c(Ye, {})
269
+ a && a.plus ? a.plus : /* @__PURE__ */ c(Qe, {})
219
270
  )
220
271
  }
221
272
  );
222
273
  }
223
- const be = ue.forwardRef(
274
+ const Ie = ie.forwardRef(
224
275
  ft
225
276
  );
226
- be.displayName = "InputNumber";
227
- const De = ue.forwardRef(
277
+ Ie.displayName = "InputNumber";
278
+ const Me = ie.forwardRef(
228
279
  (e, b) => {
229
- const [m, D] = he(!1, {
280
+ const [l, M] = me(!1, {
230
281
  defaultValue: e.defaultVisibility,
231
282
  value: e.visibility
232
- }), { getPrefixCls: I } = ce(me), L = Ze(), {
283
+ }), { getPrefixCls: $ } = le(ue), T = at(), {
233
284
  className: n,
234
285
  visibilityToggle: x = !0,
235
- onVisibilityChange: g,
236
- ...T
237
- } = e, y = I == null ? void 0 : I("input-password"), z = k(
238
- y,
286
+ onVisibilityChange: f,
287
+ ...A
288
+ } = e, h = $ == null ? void 0 : $("input-password"), E = O(
289
+ h,
239
290
  {
240
- [`${y}-visibility`]: x
291
+ [`${h}-visibility`]: x
241
292
  },
242
293
  n
243
- ), h = (w) => {
244
- "visibility" in e || D(w), g == null || g(w);
294
+ ), p = (I) => {
295
+ "visibility" in e || M(I), f == null || f(I);
245
296
  };
246
- let M = e.suffix;
247
- const P = () => {
248
- h(!m);
297
+ let P = e.suffix;
298
+ const R = () => {
299
+ p(!l);
249
300
  };
250
301
  if (x) {
251
- const w = {
252
- onClick: P,
302
+ const I = {
303
+ onClick: R,
253
304
  // 预防focus丢失
254
- onMouseDown: (C) => C.preventDefault(),
255
- onMouseUp: (C) => C.preventDefault(),
256
- ...L({
257
- onPressEnter: P
305
+ onMouseDown: (w) => w.preventDefault(),
306
+ onMouseUp: (w) => w.preventDefault(),
307
+ ...T({
308
+ onPressEnter: R
258
309
  })
259
310
  };
260
- e.suffix ? M = /* @__PURE__ */ c("span", { ...w, children: e.suffix }) : M = /* @__PURE__ */ c(
261
- m ? Qe : Xe,
311
+ e.suffix ? P = /* @__PURE__ */ c("span", { ...I, children: e.suffix }) : P = /* @__PURE__ */ c(
312
+ l ? nt : rt,
262
313
  {
263
- ...w,
314
+ ...I,
264
315
  focusable: void 0,
265
316
  "aria-hidden": void 0,
266
317
  // tabIndex: 0,
267
- className: `${y}-visibility-icon`
318
+ className: `${h}-visibility-icon`
268
319
  }
269
320
  );
270
321
  }
271
322
  return /* @__PURE__ */ c(
272
- A,
323
+ L,
273
324
  {
274
- ...ve(T, ["visibility", "defaultVisibility"]),
275
- type: m ? "text" : "password",
276
- className: z,
325
+ ...ve(A, ["visibility", "defaultVisibility"]),
326
+ type: l ? "text" : "password",
327
+ className: E,
277
328
  ref: b,
278
- suffix: M
329
+ suffix: P
279
330
  }
280
331
  );
281
332
  }
282
333
  );
283
- De.displayName = "Password";
284
- const Le = ue.forwardRef(
334
+ Me.displayName = "Password";
335
+ const Te = ie.forwardRef(
285
336
  (e, b) => {
286
- const { getPrefixCls: m } = ce(me), {
287
- className: D,
288
- style: I,
289
- placeholder: L,
337
+ const { getPrefixCls: l } = le(ue), {
338
+ className: M,
339
+ style: $,
340
+ placeholder: T,
290
341
  disabled: n,
291
342
  searchButton: x,
292
- loading: g,
293
- defaultValue: T,
294
- addAfter: y,
295
- suffix: z,
296
- ...h
297
- } = e, M = ie(e.maxLength) ? e.maxLength.length : e.maxLength, P = ie(e.maxLength) && e.maxLength.errorOnly ? void 0 : M, [w, C] = he("", {
298
- defaultValue: "defaultValue" in e ? se(e.defaultValue, P) : void 0,
299
- value: "value" in e ? se(e.value, P) : void 0
300
- }), V = m == null ? void 0 : m("input-search"), l = k(
301
- V,
343
+ loading: f,
344
+ defaultValue: A,
345
+ addAfter: h,
346
+ suffix: E,
347
+ ...p
348
+ } = e, P = ne(e.maxLength) ? e.maxLength.length : e.maxLength, R = ne(e.maxLength) && e.maxLength.errorOnly ? void 0 : P, [I, w] = me("", {
349
+ defaultValue: "defaultValue" in e ? Q(e.defaultValue, R) : void 0,
350
+ value: "value" in e ? Q(e.value, R) : void 0
351
+ }), y = l == null ? void 0 : l("input-search"), a = O(
352
+ y,
302
353
  {
303
- [`${V}-button`]: x
354
+ [`${y}-button`]: x
304
355
  },
305
- D
306
- ), d = () => {
307
- var i;
308
- !n && ((i = e.onSearch) == null || i.call(e, w));
356
+ M
357
+ ), u = () => {
358
+ var d;
359
+ !n && ((d = e.onSearch) == null || d.call(e, I));
309
360
  };
310
361
  return /* @__PURE__ */ c(
311
- A,
362
+ L,
312
363
  {
313
- ...ve(h, ["onSearch"]),
364
+ ...ve(p, ["onSearch"]),
314
365
  disabled: n,
315
- className: l,
316
- style: I,
366
+ className: a,
367
+ style: $,
317
368
  ref: b,
318
- placeholder: L,
319
- addAfter: y !== void 0 ? y : x ? /* @__PURE__ */ c(
320
- tt,
369
+ placeholder: T,
370
+ addAfter: h !== void 0 ? h : x ? /* @__PURE__ */ c(
371
+ Re,
321
372
  {
322
373
  disabled: n,
323
- size: h.size,
324
- className: `${V}-btn`,
374
+ size: p.size,
375
+ className: `${y}-btn`,
325
376
  type: "primary",
326
- onClick: d,
327
- loading: g,
377
+ onClick: u,
378
+ loading: f,
328
379
  loadingFixedWidth: !0,
329
- icon: x === !0 && !g && /* @__PURE__ */ c(Ve, {}),
380
+ icon: x === !0 && !f && /* @__PURE__ */ c(Le, {}),
330
381
  ...e == null ? void 0 : e.searchButtonProps,
331
382
  children: x !== !0 && x
332
383
  }
333
384
  ) : null,
334
- suffix: z !== void 0 ? z : !x && (g ? /* @__PURE__ */ c(et, {}) : /* @__PURE__ */ c(Ve, { onClick: d })),
335
- onChange: (i, f) => {
385
+ suffix: E !== void 0 ? E : !x && (f ? /* @__PURE__ */ c(ot, {}) : /* @__PURE__ */ c(Le, { onClick: u })),
386
+ onChange: (d, g) => {
336
387
  var U;
337
- C(i), (U = e.onChange) == null || U.call(e, i, f);
388
+ w(d), (U = e.onChange) == null || U.call(e, d, g);
338
389
  },
339
- defaultValue: T,
340
- onPressEnter: (i) => {
341
- var f;
342
- d(), (f = e.onPressEnter) == null || f.call(e, i);
390
+ defaultValue: A,
391
+ onPressEnter: (d) => {
392
+ var g;
393
+ u(), (g = e.onPressEnter) == null || g.call(e, d);
343
394
  }
344
395
  }
345
396
  );
346
397
  }
347
398
  );
348
- Le.displayName = "Search";
349
- const dt = (e, b) => {
399
+ Te.displayName = "Search";
400
+ const gt = (e, b) => {
350
401
  const {
351
- className: m,
352
- style: D,
353
- wrapperStyle: I,
354
- placeholder: L,
402
+ className: l,
403
+ style: M,
404
+ wrapperStyle: $,
405
+ placeholder: T,
355
406
  disabled: n,
356
407
  error: x,
357
- maxLength: g,
358
- showWordLimit: T,
359
- allowClear: y,
360
- onChange: z,
361
- onClear: h,
362
- onKeyDown: M,
363
- onPressEnter: P,
364
- status: w,
365
- clearIcon: C,
366
- ...V
367
- } = e, l = Ee(g) ? g.length : g, d = Ee(g) ? g.errorOnly ? void 0 : g.length : g, i = te(), [f, U] = oe({}), [p, O] = he("", {
368
- defaultValue: "defaultValue" in e ? se(e.defaultValue, d) : void 0,
369
- value: "value" in e ? se(e.value, d) : void 0
408
+ maxLength: f,
409
+ showWordLimit: A,
410
+ allowClear: h,
411
+ onChange: E,
412
+ onClear: p,
413
+ onKeyDown: P,
414
+ onPressEnter: R,
415
+ status: I,
416
+ clearIcon: w,
417
+ ...y
418
+ } = e, a = Ae(f) ? f.length : f, u = Ae(f) ? f.errorOnly ? void 0 : f.length : f, d = re(), [g, U] = se({}), [v, z] = me("", {
419
+ defaultValue: "defaultValue" in e ? Q(e.defaultValue, u) : void 0,
420
+ value: "value" in e ? Q(e.value, u) : void 0
370
421
  }), {
371
422
  compositionValue: G,
372
423
  compositionHandler: W,
373
424
  valueChangeHandler: S,
374
425
  keyDownHandler: j,
375
- triggerValueChangeCallback: H
376
- } = st({
377
- value: p,
378
- maxLength: d,
379
- onChange: z,
380
- onKeyDown: M,
381
- onPressEnter: P,
382
- beforeTriggerValueChangeCallback: (a) => {
383
- !("value" in e) && (d === void 0 || a.length <= d) && O(a);
426
+ triggerValueChangeCallback: B
427
+ } = ut({
428
+ value: v,
429
+ maxLength: u,
430
+ onChange: E,
431
+ onKeyDown: P,
432
+ onPressEnter: R,
433
+ beforeTriggerValueChangeCallback: (i) => {
434
+ !("value" in e) && (u === void 0 || i.length <= u) && z(i);
384
435
  }
385
- }), B = G || p || "", { getPrefixCls: Q, rtl: N } = ce(me), r = Q == null ? void 0 : Q("textarea");
386
- n && (f.resize = "none");
387
- const R = () => {
388
- if (i.current && i.current.focus) {
389
- if (i.current.setSelectionRange) {
390
- const a = i.current.textContent.length;
391
- i.current.setSelectionRange(a, a);
436
+ }), H = G || v || "", { getPrefixCls: X, rtl: C } = le(ue), r = X == null ? void 0 : X("textarea");
437
+ n && (g.resize = "none");
438
+ const k = () => {
439
+ if (d.current && d.current.focus) {
440
+ if (d.current.setSelectionRange) {
441
+ const i = d.current.textContent.length;
442
+ d.current.setSelectionRange(i, i);
392
443
  }
393
- i.current.focus();
444
+ d.current.focus();
394
445
  }
395
446
  }, q = () => {
396
- const a = ot(
447
+ const i = lt(
397
448
  e.autoSize,
398
- i.current
449
+ d.current
399
450
  );
400
- a && U(a);
401
- }, K = (a) => {
402
- a.stopPropagation(), R(), H("", a), h == null || h();
451
+ i && U(i);
452
+ }, K = (i) => {
453
+ i.stopPropagation(), k(), B("", i), p == null || p();
403
454
  };
404
- rt(() => {
455
+ it(() => {
405
456
  q();
406
- }, [B]), $e(
457
+ }, [H]), be(
407
458
  b,
408
459
  () => ({
409
- dom: i.current,
460
+ dom: d.current,
410
461
  focus: () => {
411
- R();
462
+ k();
412
463
  },
413
464
  blur: () => {
414
- var a, o;
415
- (o = (a = i.current) == null ? void 0 : a.blur) == null || o.call(a);
465
+ var i, o;
466
+ (o = (i = d.current) == null ? void 0 : i.blur) == null || o.call(i);
416
467
  },
417
- getRootDOMNode: () => i.current
468
+ getRootDOMNode: () => d.current
418
469
  }),
419
470
  []
420
471
  );
421
- const E = p ? p.length : 0, X = l && T || y, ne = le(() => !d && l ? E > l : !1, [E, l, d]), Y = w || (x || ne ? "error" : void 0), J = k(
472
+ const D = v ? v.length : 0, Z = a && A || h, ae = de(() => !u && a ? D > a : !1, [D, a, u]), Y = I || (x || ae ? "error" : void 0), J = O(
422
473
  r,
423
474
  {
424
475
  [`${r}-${Y}`]: Y,
425
476
  // [`${prefixCls}-error`]: error || lengthError || status === 'error',
426
477
  [`${r}-disabled`]: n,
427
- [`${r}-rtl`]: N
478
+ [`${r}-rtl`]: C
428
479
  },
429
- m
480
+ l
430
481
  ), F = /* @__PURE__ */ c(
431
482
  "textarea",
432
483
  {
433
- ...ve(V, ["autoSize", "defaultValue"]),
434
- maxLength: d,
435
- ref: i,
436
- style: { ...D, ...f },
484
+ ...ve(y, ["autoSize", "defaultValue"]),
485
+ maxLength: u,
486
+ ref: d,
487
+ style: { ...M, ...g },
437
488
  className: J,
438
- placeholder: L,
489
+ placeholder: T,
439
490
  disabled: n,
440
- value: B,
491
+ value: H,
441
492
  onChange: S,
442
493
  onKeyDown: j,
443
494
  onCompositionStart: W,
@@ -445,19 +496,19 @@ const dt = (e, b) => {
445
496
  onCompositionEnd: W
446
497
  }
447
498
  );
448
- if (X) {
449
- const a = !n && y && p, [o, v] = N ? [l, E] : [E, l];
450
- return /* @__PURE__ */ ee(
499
+ if (Z) {
500
+ const i = !n && h && v, [o, N] = C ? [a, D] : [D, a];
501
+ return /* @__PURE__ */ te(
451
502
  "div",
452
503
  {
453
- className: k(`${r}-wrapper`, {
454
- [`${r}-clear-wrapper`]: y,
455
- [`${r}-wrapper-rtl`]: N
504
+ className: O(`${r}-wrapper`, {
505
+ [`${r}-clear-wrapper`]: h,
506
+ [`${r}-wrapper-rtl`]: C
456
507
  }),
457
- style: I,
508
+ style: $,
458
509
  children: [
459
510
  F,
460
- a ? C !== void 0 ? /* @__PURE__ */ c(
511
+ i ? w !== void 0 ? /* @__PURE__ */ c(
461
512
  "span",
462
513
  {
463
514
  className: `${r}-clear-icon`,
@@ -465,10 +516,10 @@ const dt = (e, b) => {
465
516
  onMouseDown: (s) => {
466
517
  s.preventDefault();
467
518
  },
468
- children: C
519
+ children: w
469
520
  }
470
- ) : /* @__PURE__ */ c(_e, { className: `${r}-clear-icon`, children: /* @__PURE__ */ c(
471
- nt,
521
+ ) : /* @__PURE__ */ c(je, { className: `${r}-clear-icon`, children: /* @__PURE__ */ c(
522
+ st,
472
523
  {
473
524
  onClick: K,
474
525
  onMouseDown: (s) => {
@@ -476,16 +527,16 @@ const dt = (e, b) => {
476
527
  }
477
528
  }
478
529
  ) }) : null,
479
- l && T && /* @__PURE__ */ ee(
530
+ a && A && /* @__PURE__ */ te(
480
531
  "span",
481
532
  {
482
- className: k(`${r}-word-limit`, {
483
- [`${r}-word-limit-error`]: ne
533
+ className: O(`${r}-word-limit`, {
534
+ [`${r}-word-limit-error`]: ae
484
535
  }),
485
536
  children: [
486
537
  o,
487
538
  "/",
488
- v
539
+ N
489
540
  ]
490
541
  }
491
542
  )
@@ -494,60 +545,60 @@ const dt = (e, b) => {
494
545
  );
495
546
  }
496
547
  return F;
497
- }, Te = ue.forwardRef(dt);
498
- Te.displayName = "TextArea";
499
- const pt = (e) => {
548
+ }, Pe = ie.forwardRef(gt);
549
+ Pe.displayName = "TextArea";
550
+ const ht = (e) => {
500
551
  e.target.tagName !== "INPUT" && e.preventDefault();
501
- }, ge = (e, b, m = {}, D) => b ? /* @__PURE__ */ c("span", { style: m, className: e, onClick: D, children: b }) : null;
502
- function se(e, b) {
503
- const m = e !== null && !Be(e) && !He(e) ? String(e) : e || "";
504
- return b ? m.slice(0, b) : m;
552
+ }, pe = (e, b, l = {}, M) => b ? /* @__PURE__ */ c("span", { style: l, className: e, onClick: M, children: b }) : null;
553
+ function Q(e, b) {
554
+ const l = e !== null && !_e(e) && !Fe(e) ? String(e) : e || "";
555
+ return b ? l.slice(0, b) : l;
505
556
  }
506
- function gt(e, b) {
557
+ function pt(e, b) {
507
558
  const {
508
- getPrefixCls: m,
509
- size: D,
510
- componentConfig: I,
511
- rtl: L
512
- } = ce(me), n = Re(
559
+ getPrefixCls: l,
560
+ size: M,
561
+ componentConfig: $,
562
+ rtl: T
563
+ } = le(ue), n = Ee(
513
564
  e,
514
565
  {},
515
- I == null ? void 0 : I.Input
566
+ $ == null ? void 0 : $.Input
516
567
  ), {
517
568
  className: x,
518
- style: g,
519
- addBefore: T,
520
- addAfter: y,
521
- suffix: z,
522
- prefix: h,
523
- beforeStyle: M,
524
- afterStyle: P,
525
- height: w,
526
- disabled: C,
527
- maxLength: V,
528
- showWordLimit: l,
529
- allowClear: d,
530
- autoWidth: i
531
- } = n, f = i ? {
569
+ style: f,
570
+ addBefore: A,
571
+ addAfter: h,
572
+ suffix: E,
573
+ prefix: p,
574
+ beforeStyle: P,
575
+ afterStyle: R,
576
+ height: I,
577
+ disabled: w,
578
+ maxLength: y,
579
+ showWordLimit: a,
580
+ allowClear: u,
581
+ autoWidth: d
582
+ } = n, g = d ? {
532
583
  minWidth: 0,
533
584
  maxWidth: "100%",
534
- ...ie(i) ? i : {}
585
+ ...ne(d) ? d : {}
535
586
  } : null, U = {
536
- minWidth: f == null ? void 0 : f.minWidth,
537
- maxWidth: f == null ? void 0 : f.maxWidth,
538
- width: f && "auto",
539
- ...g
540
- }, p = ie(V) ? V.length : V, O = ie(V) && V.errorOnly ? void 0 : p, [G, W] = oe(!1), S = te(), j = te(), H = te(), [B, Q] = he("", {
541
- defaultValue: "defaultValue" in n ? se(n.defaultValue, O) : void 0,
542
- value: "value" in n ? se(n.value, O) : void 0
587
+ minWidth: g == null ? void 0 : g.minWidth,
588
+ maxWidth: g == null ? void 0 : g.maxWidth,
589
+ width: g && "auto",
590
+ ...f
591
+ }, v = ne(y) ? y.length : y, z = ne(y) && y.errorOnly ? void 0 : v, [G, W] = se(!1), S = re(), j = re(), B = re(), [H, X] = me("", {
592
+ defaultValue: "defaultValue" in n ? Q(n.defaultValue, z) : void 0,
593
+ value: "value" in n ? Q(n.value, z) : void 0
543
594
  });
544
- $e(
595
+ be(
545
596
  b,
546
597
  () => {
547
- var o, v, s;
598
+ var o, N, s;
548
599
  return {
549
600
  focus: (o = S.current) == null ? void 0 : o.focus,
550
- blur: (v = S.current) == null ? void 0 : v.blur,
601
+ blur: (N = S.current) == null ? void 0 : N.blur,
551
602
  dom: (s = S.current) == null ? void 0 : s.dom,
552
603
  // 保持之前逻辑
553
604
  getRootDOMNode: () => {
@@ -558,106 +609,106 @@ function gt(e, b) {
558
609
  },
559
610
  []
560
611
  );
561
- const N = (o, v) => {
612
+ const C = (o, N) => {
562
613
  var s;
563
- "value" in n || Q(o), (s = n.onChange) == null || s.call(n, o, v);
564
- }, r = m == null ? void 0 : m("input"), R = n.size || D, q = "height" in n;
565
- let K = z;
566
- const E = B ? B.length : 0, X = le(() => !O && p ? E > p : !1, [E, p, O]);
567
- if (p && l) {
568
- const [o, v] = L ? [p, E] : [E, p];
569
- K = /* @__PURE__ */ ee(
614
+ "value" in n || X(o), (s = n.onChange) == null || s.call(n, o, N);
615
+ }, r = l == null ? void 0 : l("input"), k = n.size || M, q = "height" in n;
616
+ let K = E;
617
+ const D = H ? H.length : 0, Z = de(() => !z && v ? D > v : !1, [D, v, z]);
618
+ if (v && a) {
619
+ const [o, N] = T ? [v, D] : [D, v];
620
+ K = /* @__PURE__ */ te(
570
621
  "span",
571
622
  {
572
- className: k(`${r}-word-limit`, {
573
- [`${r}-word-limit-error`]: X
623
+ className: O(`${r}-word-limit`, {
624
+ [`${r}-word-limit-error`]: Z
574
625
  }),
575
626
  children: [
576
627
  o,
577
628
  "/",
578
- v
629
+ N
579
630
  ]
580
631
  }
581
632
  );
582
633
  }
583
- const ne = k(
634
+ const ae = O(
584
635
  `${r}-group-wrapper`,
585
- `${r}-group-wrapper-${R}`,
636
+ `${r}-group-wrapper-${k}`,
586
637
  {
587
638
  [`${r}-custom-height`]: q,
588
639
  [`${r}-has-suffix`]: K,
589
- [`${r}-group-wrapper-disabled`]: C,
590
- [`${r}-group-wrapper-rtl`]: L,
591
- [`${r}-group-wrapper-autowidth`]: f
640
+ [`${r}-group-wrapper-disabled`]: w,
641
+ [`${r}-group-wrapper-rtl`]: T,
642
+ [`${r}-group-wrapper-autowidth`]: g
592
643
  },
593
644
  x
594
- ), Y = n.status || (n.error || X ? "error" : void 0), J = T || y || K || h, F = /* @__PURE__ */ c(
595
- je,
645
+ ), Y = n.status || (n.error || Z ? "error" : void 0), J = A || h || K || p, F = /* @__PURE__ */ c(
646
+ qe,
596
647
  {
597
648
  ref: S,
598
649
  ...n,
599
- autoFitWidth: !!f,
650
+ autoFitWidth: !!g,
600
651
  style: U,
601
652
  status: Y,
602
653
  onFocus: (o) => {
603
- var v;
604
- W(!0), (v = n.onFocus) == null || v.call(n, o);
654
+ var N;
655
+ W(!0), (N = n.onFocus) == null || N.call(n, o);
605
656
  },
606
657
  onBlur: (o) => {
607
- var v;
608
- W(!1), (v = n.onBlur) == null || v.call(n, o);
658
+ var N;
659
+ W(!1), (N = n.onBlur) == null || N.call(n, o);
609
660
  },
610
- onChange: N,
661
+ onChange: C,
611
662
  prefixCls: r,
612
- value: B,
613
- hasParent: !!J || d,
614
- size: R
663
+ value: H,
664
+ hasParent: !!J || u,
665
+ size: k
615
666
  }
616
- ), a = k(`${r}-inner-wrapper`, {
667
+ ), i = O(`${r}-inner-wrapper`, {
617
668
  [`${r}-inner-wrapper-${Y}`]: Y,
618
- [`${r}-inner-wrapper-disabled`]: C,
669
+ [`${r}-inner-wrapper-disabled`]: w,
619
670
  [`${r}-inner-wrapper-focus`]: G,
620
- [`${r}-inner-wrapper-has-prefix`]: h,
621
- [`${r}-inner-wrapper-${R}`]: R,
622
- [`${r}-clear-wrapper`]: d,
623
- [`${r}-inner-wrapper-rtl`]: L
671
+ [`${r}-inner-wrapper-has-prefix`]: p,
672
+ [`${r}-inner-wrapper-${k}`]: k,
673
+ [`${r}-clear-wrapper`]: u,
674
+ [`${r}-inner-wrapper-rtl`]: T
624
675
  });
625
676
  return J ? /* @__PURE__ */ c(
626
677
  "div",
627
678
  {
628
679
  ref: j,
629
- className: ne,
630
- style: { ...U, ...q ? { height: w } : {} },
631
- children: /* @__PURE__ */ ee("span", { className: `${r}-group`, children: [
632
- ge(`${r}-group-addbefore`, T, M),
633
- /* @__PURE__ */ ee(
680
+ className: ae,
681
+ style: { ...U, ...q ? { height: I } : {} },
682
+ children: /* @__PURE__ */ te("span", { className: `${r}-group`, children: [
683
+ pe(`${r}-group-addbefore`, A, P),
684
+ /* @__PURE__ */ te(
634
685
  "span",
635
686
  {
636
- className: a,
637
- ref: H,
687
+ className: i,
688
+ ref: B,
638
689
  onMouseDown: (o) => {
639
- o.target.tagName !== "INPUT" && H.current && Se(H.current, o.target) && o.preventDefault();
690
+ o.target.tagName !== "INPUT" && B.current && Se(B.current, o.target) && o.preventDefault();
640
691
  },
641
692
  onClick: (o) => {
642
- H.current && Se(H.current, o.target) && S.current && S.current.focus();
693
+ B.current && Se(B.current, o.target) && S.current && S.current.focus();
643
694
  },
644
695
  children: [
645
- ge(`${r}-group-prefix`, h),
696
+ pe(`${r}-group-prefix`, p),
646
697
  F,
647
- ge(`${r}-group-suffix`, K)
698
+ pe(`${r}-group-suffix`, K)
648
699
  ]
649
700
  }
650
701
  ),
651
- ge(`${r}-group-addafter`, y, P)
702
+ pe(`${r}-group-addafter`, h, R)
652
703
  ] })
653
704
  }
654
- ) : d ? /* @__PURE__ */ c(
705
+ ) : u ? /* @__PURE__ */ c(
655
706
  "span",
656
707
  {
657
708
  ref: j,
658
- className: k(x, a),
659
- style: { ...U, ...q ? { height: w } : {} },
660
- onMouseDown: pt,
709
+ className: O(x, i),
710
+ style: { ...U, ...q ? { height: I } : {} },
711
+ onMouseDown: ht,
661
712
  onClick: () => {
662
713
  S.current && S.current.focus();
663
714
  },
@@ -665,24 +716,27 @@ function gt(e, b) {
665
716
  }
666
717
  ) : F;
667
718
  }
668
- const A = ue.forwardRef(gt);
669
- A.displayName = "Input";
670
- A.Search = Le;
671
- A.TextArea = Te;
672
- A.Password = De;
673
- A.Number = be;
674
- A.InputNumber = be;
675
- A.Tag = Ae;
676
- A.InputTag = Ae;
677
- A.Group = Ge;
719
+ const L = ie.forwardRef(pt);
720
+ L.displayName = "Input";
721
+ L.Search = Te;
722
+ L.Button = $e;
723
+ L.InputButton = $e;
724
+ L.TextArea = Pe;
725
+ L.Password = Me;
726
+ L.Number = Ie;
727
+ L.InputNumber = Ie;
728
+ L.Tag = De;
729
+ L.InputTag = De;
730
+ L.Group = Ke;
678
731
  export {
679
- Ge as InputGroup,
680
- be as InputNumber,
681
- De as InputPassword,
682
- Le as InputSearch,
683
- Ae as InputTag,
684
- Te as InputTextArea,
685
- Te as TextArea,
686
- A as default,
687
- se as formatValue
732
+ $e as InputButton,
733
+ Ke as InputGroup,
734
+ Ie as InputNumber,
735
+ Me as InputPassword,
736
+ Te as InputSearch,
737
+ De as InputTag,
738
+ Pe as InputTextArea,
739
+ Pe as TextArea,
740
+ L as default,
741
+ Q as formatValue
688
742
  };