@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
package/input/Input.js CHANGED
@@ -1,491 +1,542 @@
1
- import { jsx as c, jsxs as Z, 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 re, useRef as ee, useMemo as le, useImperativeHandle as $e, useCallback as Fe, useEffect as ye } from "react";
6
- import { a as fe, I as _e } from "../chunk/CQvM33Vg.js";
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
7
  import { u as Ee } from "../chunk/BFTV6myl.js";
8
- import { u as he } from "../chunk/CXPOj2uy.js";
9
- import k from "@unicom-cloud/utils/class-name";
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";
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";
17
18
  import Ne 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";
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 Re 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 st from "./autoSizeTextAreaHeight.js";
30
- import ot from "./useComposition.js";
31
- import { isPlainObject as Pe } from "@unicom-cloud/utils/is";
32
- import { ArrowDown as at, ArrowUp as it } from "@unicom-cloud/utils/constant/keyboardCode";
33
- import { getDecimal as ne } from "../input-number/decimal.js";
34
- import lt from "../input-number/useSelectionRange.js";
35
- const ut = 200, ct = 1e3, ft = {
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,
39
90
  mode: "embed",
40
91
  parser: (e) => (e == null ? void 0 : e.replace(/[^\w.-]+/g, "")) || ""
41
92
  };
42
- function mt(e, C) {
43
- var we;
93
+ function ft(e, b) {
94
+ var Ve;
44
95
  const {
45
- getPrefixCls: y,
46
- size: A,
47
- componentConfig: P,
48
- rtl: D
49
- } = ce(fe), n = Ee(
96
+ getPrefixCls: l,
97
+ size: M,
98
+ componentConfig: $,
99
+ rtl: T
100
+ } = le(ue), n = Ee(
50
101
  e,
51
- ft,
52
- P == null ? void 0 : P.InputNumber
102
+ mt,
103
+ $ == null ? void 0 : $.InputNumber
53
104
  ), {
54
- className: N,
55
- style: p,
56
- defaultValue: L,
57
- disabled: v,
58
- error: z,
59
- readOnly: g,
60
- strictMode: T,
61
- placeholder: M,
62
- hideControl: b,
63
- suffix: I,
64
- prefix: S,
65
- icons: l,
66
- mode: m,
67
- size: i,
68
- step: f,
105
+ className: x,
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: d,
71
- max: O,
121
+ min: v,
122
+ max: z,
72
123
  parser: G,
73
124
  formatter: W,
74
- onBlur: w,
125
+ onBlur: S,
75
126
  onFocus: j,
76
- onChange: H,
77
- onKeyDown: B,
78
- ...oe
79
- } = n, x = y("input-number"), r = i || A, E = (() => {
127
+ onChange: B,
128
+ onKeyDown: H,
129
+ ...X
130
+ } = n, C = l == null ? void 0 : l("input-number"), r = d || M, k = (() => {
80
131
  if (Ne(U)) {
81
- const t = `${f}`.split(".")[1], u = t && t.length || 0;
82
- return Math.max(u, 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] = re(() => ne(
86
- "value" in n ? n.value : "defaultValue" in n ? L : void 0
87
- )), [V, Q] = re(""), [te, Y] = re(!1), [J, F] = re(!1), a = ee(null), s = ee(null), h = ee(!1), o = le(() => "value" in n ? ne(n.value) : q, [n.value, q]), [_, X] = le(() => [ne(O), ne(d)], [O, d]);
88
- $e(C, () => s.current, []);
89
- const me = (t, u) => {
90
- if (K(t), !t.equals(o) && 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: E
144
+ precision: k
94
145
  });
95
- H(
96
- t.isEmpty ? void 0 : T ? $ : 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(X) ? u = X : _.less(u) && (u = _), u;
155
+ let m = t;
156
+ return m.less(ee) ? m = ee : _.less(m) && (m = _), m;
106
157
  },
107
- [X, _]
158
+ [ee, _]
108
159
  );
109
- ye(() => () => de(), []), ye(() => {
110
- h.current = !1;
111
- }, [n.value]), ye(() => {
112
- const t = o.less(X) || _.less(o);
113
- t && h.current && me(ae(o), "outOfRange"), Y(t);
114
- }, [X, _, o, ae]);
115
- const xe = (t, u, $ = !1) => {
116
- if (t.persist(), t.preventDefault(), F(!1), v || g)
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 = o.isInvalid ? ne(d === -1 / 0 || d <= 0 && O >= 0 ? 0 : d) : o.add(u === "plus" ? f : -f);
119
- if (me(
120
- ae(ke),
121
- u === "plus" ? "increase" : "decrease"
122
- ), s.current && s.current.focus(), $) {
123
- const ze = a.current === null;
124
- a.current = setTimeout(
169
+ const We = s.isInvalid ? oe(v === -1 / 0 || v <= 0 && z >= 0 ? 0 : v) : s.add(m === "plus" ? g : -g);
170
+ if (fe(
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
- }, be = le(() => {
180
+ }, we = de(() => {
130
181
  let t;
131
- return J ? t = G ? `${G(V)}` : V : Ne(E) ? t = o.toString({ safe: !0, precision: E }) : o.isInvalid ? t = "" : t = o.toString(), W ? W(t, { userTyping: J, input: V }) : t;
132
- }, [o, V, J, E, G, W]), Te = lt({
133
- inputElement: (we = s.current) == null ? void 0 : we.dom,
134
- inputValue: be
135
- }), Me = {
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
- (Ne(+$) || $ === "-" || !$ || $ === ".") && (Q(t), me(ae(ne($)), "manual"), Te(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(), xe(t, "minus")) : u === it.key && (t.stopPropagation(), xe(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
- h.current = !0, Q(($ = (u = s.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
- me(ae(o), "outOfRange"), F(!1), w == null || w(t);
201
+ fe(ce(s), "outOfRange"), F(!1), S == null || S(t);
151
202
  }
152
- }, Ue = (t) => g ? {} : {
153
- onMouseDown: (u) => xe(u, t, !0)
154
- }, Ie = !b && m === "button", Oe = !b && !g && m === "embed", pe = (t, u) => {
155
- const $ = !v && (o.isInvalid || (t === "plus" ? _.isInvalid || o.less(_) : X.isInvalid || X.less(o)));
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(`${x}-step-button`, {
160
- [`${x}-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
- R,
221
+ L,
171
222
  {
172
223
  _ignorePropsFromGlobal: !0,
173
224
  role: "spinbutton",
174
- "aria-valuemax": O,
175
- "aria-valuemin": d,
176
- "aria-valuenow": o.isEmpty ? void 0 : o.toNumber(),
177
- ...ve(oe, ["allowClear"]),
178
- ...Me,
179
- style: p,
180
- className: k(
181
- x,
182
- `${x}-mode-${m}`,
183
- `${x}-size-${r}`,
225
+ "aria-valuemax": z,
226
+ "aria-valuemin": v,
227
+ "aria-valuenow": s.isEmpty ? void 0 : s.toNumber(),
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
- [`${x}-rtl`]: D,
186
- [`${x}-readonly`]: g,
187
- [`${x}-illegal-value`]: !o.isEmpty && te
236
+ [`${C}-rtl`]: T,
237
+ [`${C}-readonly`]: p,
238
+ [`${C}-illegal-value`]: !s.isEmpty && ae
188
239
  },
189
- N
240
+ x
190
241
  ),
191
- ref: s,
242
+ ref: o,
192
243
  size: r,
193
- error: z,
194
- disabled: v,
195
- readOnly: g,
196
- value: be,
197
- placeholder: M,
198
- prefix: S && /* @__PURE__ */ c("div", { className: `${x}-prefix`, children: S }),
199
- suffix: /* @__PURE__ */ Z(We, { children: [
200
- Oe && /* @__PURE__ */ Z("div", { className: `${x}-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
- I && /* @__PURE__ */ c("div", { className: `${x}-suffix`, children: I })
261
+ w && /* @__PURE__ */ c("div", { className: `${C}-suffix`, children: w })
211
262
  ] }),
212
- addBefore: Ie && 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: Ie && 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 Ce = ue.forwardRef(
224
- mt
274
+ const Ie = ie.forwardRef(
275
+ ft
225
276
  );
226
- Ce.displayName = "InputNumber";
227
- const Ae = ue.forwardRef(
228
- (e, C) => {
229
- const [y, A] = he(!1, {
277
+ Ie.displayName = "InputNumber";
278
+ const Me = ie.forwardRef(
279
+ (e, b) => {
280
+ const [l, M] = me(!1, {
230
281
  defaultValue: e.defaultVisibility,
231
282
  value: e.visibility
232
- }), { getPrefixCls: P } = ce(fe), D = Ze(), {
283
+ }), { getPrefixCls: $ } = le(ue), T = at(), {
233
284
  className: n,
234
- visibilityToggle: N = !0,
235
- onVisibilityChange: p,
236
- ...L
237
- } = e, v = P("input-password"), z = k(
238
- v,
285
+ visibilityToggle: x = !0,
286
+ onVisibilityChange: f,
287
+ ...A
288
+ } = e, h = $ == null ? void 0 : $("input-password"), E = O(
289
+ h,
239
290
  {
240
- [`${v}-visibility`]: N
291
+ [`${h}-visibility`]: x
241
292
  },
242
293
  n
243
- ), g = (b) => {
244
- "visibility" in e || A(b), p == null || p(b);
294
+ ), p = (I) => {
295
+ "visibility" in e || M(I), f == null || f(I);
245
296
  };
246
- let T = e.suffix;
247
- const M = () => {
248
- g(!y);
297
+ let P = e.suffix;
298
+ const R = () => {
299
+ p(!l);
249
300
  };
250
- if (N) {
251
- const b = {
252
- onClick: M,
301
+ if (x) {
302
+ const I = {
303
+ onClick: R,
253
304
  // 预防focus丢失
254
- onMouseDown: (I) => I.preventDefault(),
255
- onMouseUp: (I) => I.preventDefault(),
256
- ...D({
257
- onPressEnter: M
305
+ onMouseDown: (w) => w.preventDefault(),
306
+ onMouseUp: (w) => w.preventDefault(),
307
+ ...T({
308
+ onPressEnter: R
258
309
  })
259
310
  };
260
- e.suffix ? T = /* @__PURE__ */ c("span", { ...b, children: e.suffix }) : T = /* @__PURE__ */ c(
261
- y ? Qe : Xe,
311
+ e.suffix ? P = /* @__PURE__ */ c("span", { ...I, children: e.suffix }) : P = /* @__PURE__ */ c(
312
+ l ? nt : rt,
262
313
  {
263
- ...b,
314
+ ...I,
264
315
  focusable: void 0,
265
316
  "aria-hidden": void 0,
266
317
  // tabIndex: 0,
267
- className: `${v}-visibility-icon`
318
+ className: `${h}-visibility-icon`
268
319
  }
269
320
  );
270
321
  }
271
322
  return /* @__PURE__ */ c(
272
- R,
323
+ L,
273
324
  {
274
- ...ve(L, ["visibility", "defaultVisibility"]),
275
- type: y ? "text" : "password",
276
- className: z,
277
- ref: C,
278
- suffix: T
325
+ ...ve(A, ["visibility", "defaultVisibility"]),
326
+ type: l ? "text" : "password",
327
+ className: E,
328
+ ref: b,
329
+ suffix: P
279
330
  }
280
331
  );
281
332
  }
282
333
  );
283
- Ae.displayName = "Password";
284
- const De = ue.forwardRef(
285
- (e, C) => {
286
- const { getPrefixCls: y } = ce(fe), {
287
- className: A,
288
- style: P,
289
- placeholder: D,
334
+ Me.displayName = "Password";
335
+ const Te = ie.forwardRef(
336
+ (e, b) => {
337
+ const { getPrefixCls: l } = le(ue), {
338
+ className: M,
339
+ style: $,
340
+ placeholder: T,
290
341
  disabled: n,
291
- searchButton: N,
292
- loading: p,
293
- defaultValue: L,
294
- addAfter: v,
295
- suffix: z,
296
- ...g
297
- } = e, T = ie(e.maxLength) ? e.maxLength.length : e.maxLength, M = ie(e.maxLength) && e.maxLength.errorOnly ? void 0 : T, [b, I] = he("", {
298
- defaultValue: "defaultValue" in e ? se(e.defaultValue, M) : void 0,
299
- value: "value" in e ? se(e.value, M) : void 0
300
- }), S = y("input-search"), l = k(
301
- S,
342
+ searchButton: x,
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
- [`${S}-button`]: N
354
+ [`${y}-button`]: x
304
355
  },
305
- A
306
- ), m = () => {
307
- var i;
308
- !n && ((i = e.onSearch) == null || i.call(e, b));
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
- R,
362
+ L,
312
363
  {
313
- ...ve(g, ["onSearch"]),
364
+ ...ve(p, ["onSearch"]),
314
365
  disabled: n,
315
- className: l,
316
- style: P,
317
- ref: C,
318
- placeholder: D,
319
- addAfter: v !== void 0 ? v : N ? /* @__PURE__ */ c(
320
- tt,
366
+ className: a,
367
+ style: $,
368
+ ref: b,
369
+ placeholder: T,
370
+ addAfter: h !== void 0 ? h : x ? /* @__PURE__ */ c(
371
+ Re,
321
372
  {
322
373
  disabled: n,
323
- size: g.size,
324
- className: `${S}-btn`,
374
+ size: p.size,
375
+ className: `${y}-btn`,
325
376
  type: "primary",
326
- onClick: m,
327
- loading: p,
377
+ onClick: u,
378
+ loading: f,
328
379
  loadingFixedWidth: !0,
329
- icon: N === !0 && !p && /* @__PURE__ */ c(Ve, {}),
380
+ icon: x === !0 && !f && /* @__PURE__ */ c(Le, {}),
330
381
  ...e == null ? void 0 : e.searchButtonProps,
331
- children: N !== !0 && N
382
+ children: x !== !0 && x
332
383
  }
333
384
  ) : null,
334
- suffix: z !== void 0 ? z : !N && (p ? /* @__PURE__ */ c(et, {}) : /* @__PURE__ */ c(Ve, { onClick: m })),
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
- I(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: L,
340
- onPressEnter: (i) => {
341
- var f;
342
- m(), (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
- De.displayName = "Search";
349
- const dt = (e, C) => {
399
+ Te.displayName = "Search";
400
+ const gt = (e, b) => {
350
401
  const {
351
- className: y,
352
- style: A,
353
- wrapperStyle: P,
354
- placeholder: D,
402
+ className: l,
403
+ style: M,
404
+ wrapperStyle: $,
405
+ placeholder: T,
355
406
  disabled: n,
356
- error: N,
357
- maxLength: p,
358
- showWordLimit: L,
359
- allowClear: v,
360
- onChange: z,
361
- onClear: g,
362
- onKeyDown: T,
363
- onPressEnter: M,
364
- status: b,
365
- clearIcon: I,
366
- ...S
367
- } = e, l = Pe(p) ? p.length : p, m = Pe(p) ? p.errorOnly ? void 0 : p.length : p, i = ee(), [f, U] = re({}), [d, O] = he("", {
368
- defaultValue: "defaultValue" in e ? se(e.defaultValue, m) : void 0,
369
- value: "value" in e ? se(e.value, m) : void 0
407
+ error: x,
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
- valueChangeHandler: w,
424
+ valueChangeHandler: S,
374
425
  keyDownHandler: j,
375
- triggerValueChangeCallback: H
376
- } = ot({
377
- value: d,
378
- maxLength: m,
379
- onChange: z,
380
- onKeyDown: T,
381
- onPressEnter: M,
382
- beforeTriggerValueChangeCallback: (a) => {
383
- !("value" in e) && (m === void 0 || a.length <= m) && 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 || d || "", { getPrefixCls: oe, rtl: x } = ce(fe), r = oe("textarea");
386
- n && (f.resize = "none");
387
- const E = () => {
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 = st(
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(), E(), H("", a), g == null || g();
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(
407
- C,
457
+ }, [H]), be(
458
+ b,
408
459
  () => ({
409
- dom: i.current,
460
+ dom: d.current,
410
461
  focus: () => {
411
- E();
462
+ k();
412
463
  },
413
464
  blur: () => {
414
- var a, s;
415
- (s = (a = i.current) == null ? void 0 : a.blur) == null || s.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 V = d ? d.length : 0, Q = l && L || v, te = le(() => !m && l ? V > l : !1, [V, l, m]), Y = b || (N || te ? "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`]: x
478
+ [`${r}-rtl`]: C
428
479
  },
429
- y
480
+ l
430
481
  ), F = /* @__PURE__ */ c(
431
482
  "textarea",
432
483
  {
433
- ...ve(S, ["autoSize", "defaultValue"]),
434
- maxLength: m,
435
- ref: i,
436
- style: { ...A, ...f },
484
+ ...ve(y, ["autoSize", "defaultValue"]),
485
+ maxLength: u,
486
+ ref: d,
487
+ style: { ...M, ...g },
437
488
  className: J,
438
- placeholder: D,
489
+ placeholder: T,
439
490
  disabled: n,
440
- value: B,
441
- onChange: w,
491
+ value: H,
492
+ onChange: S,
442
493
  onKeyDown: j,
443
494
  onCompositionStart: W,
444
495
  onCompositionUpdate: W,
445
496
  onCompositionEnd: W
446
497
  }
447
498
  );
448
- if (Q) {
449
- const a = !n && v && d, [s, h] = x ? [l, V] : [V, l];
450
- return /* @__PURE__ */ Z(
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`]: v,
455
- [`${r}-wrapper-rtl`]: x
504
+ className: O(`${r}-wrapper`, {
505
+ [`${r}-clear-wrapper`]: h,
506
+ [`${r}-wrapper-rtl`]: C
456
507
  }),
457
- style: P,
508
+ style: $,
458
509
  children: [
459
510
  F,
460
- a ? I !== void 0 ? /* @__PURE__ */ c(
511
+ i ? w !== void 0 ? /* @__PURE__ */ c(
461
512
  "span",
462
513
  {
463
514
  className: `${r}-clear-icon`,
464
515
  onClick: K,
465
- onMouseDown: (o) => {
466
- o.preventDefault();
516
+ onMouseDown: (s) => {
517
+ s.preventDefault();
467
518
  },
468
- children: I
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
- onMouseDown: (o) => {
475
- o.preventDefault();
525
+ onMouseDown: (s) => {
526
+ s.preventDefault();
476
527
  }
477
528
  }
478
529
  ) }) : null,
479
- l && L && /* @__PURE__ */ Z(
530
+ a && A && /* @__PURE__ */ te(
480
531
  "span",
481
532
  {
482
- className: k(`${r}-word-limit`, {
483
- [`${r}-word-limit-error`]: te
533
+ className: O(`${r}-word-limit`, {
534
+ [`${r}-word-limit-error`]: ae
484
535
  }),
485
536
  children: [
486
- s,
537
+ o,
487
538
  "/",
488
- h
539
+ N
489
540
  ]
490
541
  }
491
542
  )
@@ -494,195 +545,198 @@ const dt = (e, C) => {
494
545
  );
495
546
  }
496
547
  return F;
497
- }, Le = ue.forwardRef(dt);
498
- Le.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, C, y = {}, A) => C ? /* @__PURE__ */ c("span", { style: y, className: e, onClick: A, children: C }) : null;
502
- function se(e, C) {
503
- const y = e !== null && !Be(e) && !He(e) ? String(e) : e || "";
504
- return C ? y.slice(0, C) : y;
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, C) {
557
+ function pt(e, b) {
507
558
  const {
508
- getPrefixCls: y,
509
- size: A,
510
- componentConfig: P,
511
- rtl: D
512
- } = ce(fe), n = Ee(
559
+ getPrefixCls: l,
560
+ size: M,
561
+ componentConfig: $,
562
+ rtl: T
563
+ } = le(ue), n = Ee(
513
564
  e,
514
565
  {},
515
- P == null ? void 0 : P.Input
566
+ $ == null ? void 0 : $.Input
516
567
  ), {
517
- className: N,
518
- style: p,
519
- addBefore: L,
520
- addAfter: v,
521
- suffix: z,
522
- prefix: g,
523
- beforeStyle: T,
524
- afterStyle: M,
525
- height: b,
526
- disabled: I,
527
- maxLength: S,
528
- showWordLimit: l,
529
- allowClear: m,
530
- autoWidth: i
531
- } = n, f = i ? {
568
+ className: x,
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
- ...p
540
- }, d = ie(S) ? S.length : S, O = ie(S) && S.errorOnly ? void 0 : d, [G, W] = re(!1), w = ee(), j = ee(), H = ee(), [B, oe] = 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(
545
- C,
595
+ be(
596
+ b,
546
597
  () => {
547
- var s, h, o;
598
+ var o, N, s;
548
599
  return {
549
- focus: (s = w.current) == null ? void 0 : s.focus,
550
- blur: (h = w.current) == null ? void 0 : h.blur,
551
- dom: (o = w.current) == null ? void 0 : o.dom,
600
+ focus: (o = S.current) == null ? void 0 : o.focus,
601
+ blur: (N = S.current) == null ? void 0 : N.blur,
602
+ dom: (s = S.current) == null ? void 0 : s.dom,
552
603
  // 保持之前逻辑
553
604
  getRootDOMNode: () => {
554
605
  var _;
555
- return j.current || ((_ = w.current) == null ? void 0 : _.dom);
606
+ return j.current || ((_ = S.current) == null ? void 0 : _.dom);
556
607
  }
557
608
  };
558
609
  },
559
610
  []
560
611
  );
561
- const x = (s, h) => {
562
- var o;
563
- "value" in n || oe(s), (o = n.onChange) == null || o.call(n, s, h);
564
- }, r = y("input"), E = n.size || A, q = "height" in n;
565
- let K = z;
566
- const V = B ? B.length : 0, Q = le(() => !O && d ? V > d : !1, [V, d, O]);
567
- if (d && l) {
568
- const [s, h] = D ? [d, V] : [V, d];
569
- K = /* @__PURE__ */ Z(
612
+ const C = (o, N) => {
613
+ var s;
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`]: Q
623
+ className: O(`${r}-word-limit`, {
624
+ [`${r}-word-limit-error`]: Z
574
625
  }),
575
626
  children: [
576
- s,
627
+ o,
577
628
  "/",
578
- h
629
+ N
579
630
  ]
580
631
  }
581
632
  );
582
633
  }
583
- const te = k(
634
+ const ae = O(
584
635
  `${r}-group-wrapper`,
585
- `${r}-group-wrapper-${E}`,
636
+ `${r}-group-wrapper-${k}`,
586
637
  {
587
638
  [`${r}-custom-height`]: q,
588
639
  [`${r}-has-suffix`]: K,
589
- [`${r}-group-wrapper-disabled`]: I,
590
- [`${r}-group-wrapper-rtl`]: D,
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
- N
594
- ), Y = n.status || (n.error || Q ? "error" : void 0), J = L || v || K || g, F = /* @__PURE__ */ c(
595
- je,
644
+ x
645
+ ), Y = n.status || (n.error || Z ? "error" : void 0), J = A || h || K || p, F = /* @__PURE__ */ c(
646
+ qe,
596
647
  {
597
- ref: w,
648
+ ref: S,
598
649
  ...n,
599
- autoFitWidth: !!f,
650
+ autoFitWidth: !!g,
600
651
  style: U,
601
652
  status: Y,
602
- onFocus: (s) => {
603
- var h;
604
- W(!0), (h = n.onFocus) == null || h.call(n, s);
653
+ onFocus: (o) => {
654
+ var N;
655
+ W(!0), (N = n.onFocus) == null || N.call(n, o);
605
656
  },
606
- onBlur: (s) => {
607
- var h;
608
- W(!1), (h = n.onBlur) == null || h.call(n, s);
657
+ onBlur: (o) => {
658
+ var N;
659
+ W(!1), (N = n.onBlur) == null || N.call(n, o);
609
660
  },
610
- onChange: x,
661
+ onChange: C,
611
662
  prefixCls: r,
612
- value: B,
613
- hasParent: !!J || m,
614
- size: E
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`]: I,
669
+ [`${r}-inner-wrapper-disabled`]: w,
619
670
  [`${r}-inner-wrapper-focus`]: G,
620
- [`${r}-inner-wrapper-has-prefix`]: g,
621
- [`${r}-inner-wrapper-${E}`]: E,
622
- [`${r}-clear-wrapper`]: m,
623
- [`${r}-inner-wrapper-rtl`]: D
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: te,
630
- style: { ...U, ...q ? { height: b } : {} },
631
- children: /* @__PURE__ */ Z("span", { className: `${r}-group`, children: [
632
- ge(`${r}-group-addbefore`, L, T),
633
- /* @__PURE__ */ Z(
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,
638
- onMouseDown: (s) => {
639
- s.target.tagName !== "INPUT" && H.current && Se(H.current, s.target) && s.preventDefault();
687
+ className: i,
688
+ ref: B,
689
+ onMouseDown: (o) => {
690
+ o.target.tagName !== "INPUT" && B.current && Se(B.current, o.target) && o.preventDefault();
640
691
  },
641
- onClick: (s) => {
642
- H.current && Se(H.current, s.target) && w.current && w.current.focus();
692
+ onClick: (o) => {
693
+ B.current && Se(B.current, o.target) && S.current && S.current.focus();
643
694
  },
644
695
  children: [
645
- ge(`${r}-group-prefix`, g),
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`, v, M)
702
+ pe(`${r}-group-addafter`, h, R)
652
703
  ] })
653
704
  }
654
- ) : m ? /* @__PURE__ */ c(
705
+ ) : u ? /* @__PURE__ */ c(
655
706
  "span",
656
707
  {
657
708
  ref: j,
658
- className: k(N, a),
659
- style: { ...U, ...q ? { height: b } : {} },
660
- onMouseDown: pt,
709
+ className: O(x, i),
710
+ style: { ...U, ...q ? { height: I } : {} },
711
+ onMouseDown: ht,
661
712
  onClick: () => {
662
- w.current && w.current.focus();
713
+ S.current && S.current.focus();
663
714
  },
664
715
  children: F
665
716
  }
666
717
  ) : F;
667
718
  }
668
- const R = ue.forwardRef(gt);
669
- R.displayName = "Input";
670
- R.Search = De;
671
- R.TextArea = Le;
672
- R.Password = Ae;
673
- R.Number = Ce;
674
- R.InputNumber = Ce;
675
- R.Tag = Re;
676
- R.InputTag = Re;
677
- R.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
- Ce as InputNumber,
681
- Ae as InputPassword,
682
- De as InputSearch,
683
- Re as InputTag,
684
- Le as InputTextArea,
685
- Le as TextArea,
686
- R 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
  };