@unicom-cloud/ui 0.8.63 → 0.8.65
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.
- package/Affix.js +2 -2
- package/Alert.js +2 -2
- package/Anchor.js +1 -1
- package/AutoComplete.js +4 -4
- package/Avatar.js +2 -2
- package/BackTop.js +2 -2
- package/Badge.js +37 -31
- package/Breadcrumb.js +3 -3
- package/Button.js +82 -71
- package/Calendar.js +4 -4
- package/Card.js +2 -2
- package/Carousel.js +2 -2
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +5 -5
- package/Comment.js +2 -2
- package/ConfigProvider.js +2 -2
- package/Copy.js +3 -3
- package/DatePicker.js +92 -92
- package/Descriptions.js +2 -2
- package/Divider.js +2 -2
- package/Draggable.js +2 -2
- package/Drawer.js +1 -1
- package/Dropdown.js +27 -26
- package/Empty.js +2 -2
- package/Form.js +4 -4
- package/Grid.js +3 -3
- package/Icon.js +3 -2
- package/IconHover.js +2 -2
- package/Image.js +4 -1
- package/Input.js +11 -2
- package/InputNumber.js +3 -3
- package/InputTag.js +1 -1
- package/Layout.js +25 -21
- package/Link.js +2 -2
- package/List.js +31 -30
- package/Mentions.js +4 -4
- package/Menu.js +7 -2
- package/Message.js +4 -3
- package/Modal.js +1 -1
- package/Notice.js +2 -2
- package/Notification.js +4 -3
- package/OverflowEllipsis.js +2 -2
- package/PageHeader.js +2 -2
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +2 -2
- package/Popover.js +2 -2
- package/Progress.js +2 -2
- package/Radio.js +4 -2
- package/Rate.js +2 -2
- package/ResizeBox.js +140 -137
- package/Result.js +2 -2
- package/Select.js +4 -1
- package/SelectView.js +7 -7
- package/Skeleton.js +2 -2
- package/Slider.js +5 -5
- package/Space.js +54 -50
- package/Spin.js +2 -2
- package/Statistic.js +29 -28
- package/Steps.js +41 -39
- package/Switch.js +3 -3
- package/Table.js +8 -5
- package/Tabs.js +6 -2
- package/Tag.js +2 -2
- package/TimePicker.js +38 -37
- package/Timeline.js +4 -2
- package/Tooltip.js +2 -2
- package/Transfer.js +4 -4
- package/Tree.js +1 -1
- package/TreeSelect.js +3 -1
- package/Trigger.js +43 -42
- package/Typography.js +6 -2
- package/Upload.js +3 -3
- package/VerificationCode.js +1 -1
- package/Version.js +5 -3
- package/Watermark.js +1 -1
- package/chunk/{DDDuw0Zi.js → 1GQdnTJp.js} +2 -2
- package/chunk/BAWsPQBM.js +11 -0
- package/chunk/{CfZWOhnc.js → BS09tn7B.js} +2 -2
- package/chunk/{CZ1wrD_H.js → BUCEs557.js} +2 -2
- package/chunk/BqGtwxTi.js +777 -0
- package/chunk/{BcwdVUDs.js → Bqk6yh16.js} +2 -2
- package/chunk/{CD7dGcUa.js → BqufsN8i.js} +4 -4
- package/chunk/{Dpzgtdt-.js → BtlvlGQN.js} +2 -2
- package/chunk/{BoDdbbF_.js → CF6p9R93.js} +4 -3
- package/chunk/{BnLshM9R.js → CGZ0In1p.js} +189 -182
- package/chunk/{B5gIo-hD.js → CH1UUxsg.js} +4 -4
- package/chunk/{D3dcFbex.js → CIlGCedk.js} +3 -3
- package/chunk/{CgDayZDE.js → CPcm9Cm5.js} +2 -2
- package/chunk/{Cqyp4qni.js → CSC_V_25.js} +45 -45
- package/chunk/{JpKOcIfl.js → CWgltRVL.js} +44 -41
- package/chunk/{BLLKKgZJ.js → CsbCHnFk.js} +23 -21
- package/chunk/{Cb_oWoGj.js → CwhPMMWy.js} +14 -14
- package/chunk/{B9w_puFP.js → DG-epQqF.js} +2 -2
- package/chunk/{QFkhCtUr.js → DIx0qmCq.js} +3 -3
- package/chunk/{Bn2-vqTg.js → DK4KcodH.js} +201 -195
- package/chunk/{BEB_A9eY.js → DLvMA1OW.js} +2 -2
- package/chunk/{DbPYtS7-.js → DQDkV47j.js} +2 -2
- package/chunk/{rlfmXePI.js → DTjcKyDN.js} +135 -134
- package/chunk/{BmO1y0vr.js → DUeHQKtx.js} +12 -12
- package/chunk/{C6Zb_-OE.js → DXZEpA3t.js} +2 -2
- package/chunk/{aqSmxUbY.js → DjtWv6Wn.js} +1 -1
- package/chunk/{C5S_amaH.js → DlLL5JQo.js} +106 -101
- package/chunk/{CvlD3aiv.js → Dnycc1qJ.js} +133 -130
- package/chunk/{DbLgopUR.js → DqFhzTWC.js} +3 -3
- package/chunk/{DXZ8-ha7.js → Dv_xRzvR.js} +3 -3
- package/chunk/{Dk6hL04k.js → Ek8U5CTN.js} +222 -221
- package/chunk/{CfTcP6nF.js → ewRDIDUz.js} +4 -4
- package/chunk/{CAxIyiy6.js → tYXLFPVI.js} +6 -4
- package/hooks/useIntersectionObserver.js +1 -1
- package/hooks/useMergeValue.js +2 -2
- package/index.js +530 -476
- package/locale/en-US.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/package.json +1 -1
- package/style/variable.less +820 -0
- package/style.css +1 -1
- package/types/badge/index.d.ts +2 -2
- package/types/button/index.d.ts +3 -1
- package/types/calendar/hook/useCellClassName.d.ts +2 -1
- package/types/checkbox/IconCheck.d.ts +2 -1
- package/types/config-provider/interface.d.ts +1 -1
- package/types/date-picker/hook/useCellClassName.d.ts +2 -1
- package/types/date-picker/panel/Footer.d.ts +2 -1
- package/types/dropdown/index.d.ts +1 -0
- package/types/form/IconSymbol.d.ts +2 -1
- package/types/form/useForm.d.ts +2 -1
- package/types/icon/addFromIconFontCn.d.ts +2 -1
- package/types/icon/index.d.ts +2 -0
- package/types/image/Image.d.ts +1 -0
- package/types/image/index.d.ts +2 -1
- package/types/image/util/getFixTranslate.d.ts +2 -1
- package/types/image/util/hook/useImageStatus.d.ts +2 -2
- package/types/image/util/hook/useShowFooter.d.ts +2 -2
- package/types/index.d.ts +26 -26
- package/types/input/Input.d.ts +1 -0
- package/types/input/index.d.ts +1 -0
- package/types/input/useComposition.d.ts +2 -1
- package/types/input-number/useSelectionRange.d.ts +2 -1
- package/types/layout/index.d.ts +1 -0
- package/types/list/index.d.ts +1 -0
- package/types/menu/Indent.d.ts +2 -1
- package/types/menu/Menu.d.ts +1 -0
- package/types/menu/index.d.ts +1 -0
- package/types/message/index.d.ts +2 -0
- package/types/notification/index.d.ts +2 -0
- package/types/overflow-ellipsis/OverflowItem.d.ts +2 -2
- package/types/overflow-ellipsis/index.d.ts +2 -2
- package/types/radio/Radio.d.ts +2 -0
- package/types/radio/index.d.ts +2 -1
- package/types/resize-box/ResizeTrigger.d.ts +2 -1
- package/types/resize-box/index.d.ts +1 -0
- package/types/result/403.d.ts +2 -1
- package/types/result/404.d.ts +2 -1
- package/types/result/500.d.ts +2 -1
- package/types/select/Select.d.ts +1 -1
- package/types/select/index.d.ts +1 -0
- package/types/select/interface.d.ts +1 -1
- package/types/skeleton/Image.d.ts +2 -1
- package/types/skeleton/Text.d.ts +2 -1
- package/types/slider/hook/useLegalValue.d.ts +2 -1
- package/types/space/index.d.ts +2 -0
- package/types/space/toArray.d.ts +2 -1
- package/types/speech-synthesis/index.d.ts +2 -1
- package/types/spin/DotLoading.d.ts +2 -1
- package/types/statistic/index.d.ts +1 -0
- package/types/steps/index.d.ts +1 -0
- package/types/table/hook/useComponent.d.ts +2 -1
- package/types/table/hook/useExpand.d.ts +2 -1
- package/types/table/hook/useRowSelection.d.ts +2 -1
- package/types/table/hook/useSorter.d.ts +2 -1
- package/types/table/index.d.ts +2 -1
- package/types/table/summary/index.d.ts +3 -0
- package/types/tabs/Tab.d.ts +1 -0
- package/types/tabs/TabContent.d.ts +2 -2
- package/types/tabs/hook/useDomSize.d.ts +2 -1
- package/types/tabs/hook/useHeaderScroll.d.ts +2 -1
- package/types/tabs/index.d.ts +1 -0
- package/types/tabs/tab-header/DropdownIcon.d.ts +2 -1
- package/types/time-picker/TimeColumn.d.ts +2 -2
- package/types/time-picker/index.d.ts +5 -0
- package/types/timeline/Timeline.d.ts +1 -0
- package/types/timeline/index.d.ts +1 -0
- package/types/tree-select/Select.d.ts +5 -0
- package/types/tree-select/hook/useTreeData.d.ts +2 -1
- package/types/tree-select/index.d.ts +2 -1
- package/types/typography/Operations.d.ts +2 -1
- package/types/typography/index.d.ts +1 -0
- package/types/upload/Upload.d.ts +2 -1
- package/types/upload/index.d.ts +2 -3
- package/types/utils/fillNBSP.d.ts +2 -1
- package/types/utils/getHighlightText.d.ts +2 -1
- package/types/utils/getHotkeyHandler.d.ts +2 -1
- package/types/utils/getStringLength.d.ts +2 -1
- package/types/utils/include.d.ts +2 -1
- package/types/utils/mergeProps.d.ts +2 -1
- package/types/utils/mergedToString.d.ts +2 -1
- package/types/utils/omit.d.ts +2 -1
- package/types/utils/pick.d.ts +2 -1
- package/types/utils/throttleByRaf.d.ts +2 -1
- package/types/utils/throttleByRafV2.d.ts +2 -1
- package/types/utils/warning.d.ts +2 -1
- package/types/version/index.d.ts +2 -0
- package/utils/className.js +1 -1
- package/utils/contextHolder.js +1 -1
- package/utils/copy.js +1 -1
- package/utils/index.js +41 -41
- package/utils/is.js +37 -37
- package/utils/reactDOM.js +3 -3
- package/utils/scrollIntoView.js +1 -1
- package/chunk/BzPkh4Zv.js +0 -11
- package/chunk/Co3idurS.js +0 -774
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var z = (e, t, r) =>
|
|
4
|
-
import { jsx as N, jsxs as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import ce, { useContext as de, useRef as
|
|
9
|
-
import { d as fe, I as
|
|
10
|
-
import { useMergeProps as
|
|
1
|
+
var Qe = Object.defineProperty;
|
|
2
|
+
var Ze = (e, t, r) => t in e ? Qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var z = (e, t, r) => Ze(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { jsx as N, jsxs as ie, Fragment as et } from "react/jsx-runtime";
|
|
5
|
+
import le from "lodash/isPlainObject";
|
|
6
|
+
import tt from "lodash/isString";
|
|
7
|
+
import nt from "lodash/isUndefined";
|
|
8
|
+
import ce, { useContext as de, useRef as Z, useState as ae, useMemo as he, useImperativeHandle as Ae, useCallback as rt, useEffect as we } from "react";
|
|
9
|
+
import { d as fe, I as it } from "./DlLL5JQo.js";
|
|
10
|
+
import { useMergeProps as ze } from "../hooks/useMergeProps.js";
|
|
11
11
|
import { useMergeValue as ye } from "../hooks/useMergeValue.js";
|
|
12
|
-
import { y as F } from "./
|
|
12
|
+
import { y as F } from "./BAWsPQBM.js";
|
|
13
13
|
import { contains as Te } from "../utils/dom.js";
|
|
14
|
-
import { u as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import { useKeyboardEvent as
|
|
14
|
+
import { u as st, I as ot } from "./Dv_xRzvR.js";
|
|
15
|
+
import at from "@unicom-cloud/icons/IconUiDown";
|
|
16
|
+
import lt from "@unicom-cloud/icons/IconUiMinus";
|
|
17
|
+
import ut from "@unicom-cloud/icons/IconUiPlus";
|
|
18
|
+
import ct from "@unicom-cloud/icons/IconUiUp";
|
|
19
|
+
import se from "lodash/isNumber";
|
|
20
|
+
import dt from "@unicom-cloud/icons/IconUiEye";
|
|
21
|
+
import ft from "@unicom-cloud/icons/IconUiEyeInvisible";
|
|
22
|
+
import { useKeyboardEvent as mt } from "../hooks/useKeyboardEvent.js";
|
|
23
23
|
import $e from "../utils/omit.js";
|
|
24
|
-
import
|
|
24
|
+
import gt from "@unicom-cloud/icons/IconUiLoading";
|
|
25
25
|
import De from "@unicom-cloud/icons/IconUiSearch";
|
|
26
|
-
import
|
|
27
|
-
import { I as
|
|
28
|
-
import
|
|
29
|
-
import { useIsomorphicLayoutEffect as
|
|
26
|
+
import ht from "../Button.js";
|
|
27
|
+
import { I as pt } from "./BqufsN8i.js";
|
|
28
|
+
import Nt from "@unicom-cloud/icons/IconUiClose";
|
|
29
|
+
import { useIsomorphicLayoutEffect as Fe } from "../hooks/useIsomorphicLayoutEffect.js";
|
|
30
30
|
import "../utils/is.js";
|
|
31
|
-
import
|
|
32
|
-
|
|
31
|
+
import Le from "lodash/isPlainObject.js";
|
|
32
|
+
import { A as St, c as xt } from "./C2lIz2F9.js";
|
|
33
|
+
const ke = ce.forwardRef((e, t) => {
|
|
33
34
|
const { getPrefixCls: r } = de(fe), { className: i, style: s, children: u, compact: n, ...m } = e, l = r("input-group"), h = F(
|
|
34
35
|
l,
|
|
35
36
|
{
|
|
@@ -39,8 +40,8 @@ const Fe = ce.forwardRef((e, t) => {
|
|
|
39
40
|
);
|
|
40
41
|
return /* @__PURE__ */ N("div", { ref: t, className: h, style: s, ...m, children: u });
|
|
41
42
|
});
|
|
42
|
-
|
|
43
|
-
function
|
|
43
|
+
ke.displayName = "InputGroup";
|
|
44
|
+
function He(e) {
|
|
44
45
|
return !Number.isNaN(Number(e)) && String(e).includes("e");
|
|
45
46
|
}
|
|
46
47
|
function Ee() {
|
|
@@ -48,15 +49,15 @@ function Ee() {
|
|
|
48
49
|
}
|
|
49
50
|
function Ce(e) {
|
|
50
51
|
const t = String(e);
|
|
51
|
-
if (
|
|
52
|
+
if (He(e)) {
|
|
52
53
|
let r = Number(t.slice(t.indexOf("e-") + 2));
|
|
53
54
|
return t.replace(/\.(\d+)/, (i, s) => (r += s.length, i)), r;
|
|
54
55
|
}
|
|
55
|
-
return t.includes(".") &&
|
|
56
|
+
return t.includes(".") && Oe(t) ? t.length - t.indexOf(".") - 1 : 0;
|
|
56
57
|
}
|
|
57
|
-
function
|
|
58
|
+
function Ue(e) {
|
|
58
59
|
let t = String(e);
|
|
59
|
-
if (
|
|
60
|
+
if (He(e)) {
|
|
60
61
|
if (e < Number.MIN_SAFE_INTEGER)
|
|
61
62
|
return Ee() ? BigInt(e).toString() : Number.MIN_SAFE_INTEGER.toString();
|
|
62
63
|
if (e > Number.MAX_SAFE_INTEGER)
|
|
@@ -66,7 +67,7 @@ function He(e) {
|
|
|
66
67
|
}
|
|
67
68
|
return pe(t).fullStr;
|
|
68
69
|
}
|
|
69
|
-
function
|
|
70
|
+
function Oe(e) {
|
|
70
71
|
return typeof e == "number" ? !Number.isNaN(e) : e ? (
|
|
71
72
|
// 1.1
|
|
72
73
|
/^\s*-?\d+(\.\d+)?\s*$/.test(e) || // 1.
|
|
@@ -106,8 +107,8 @@ class Ne {
|
|
|
106
107
|
this.isNaN = !0;
|
|
107
108
|
return;
|
|
108
109
|
}
|
|
109
|
-
const r =
|
|
110
|
-
if (
|
|
110
|
+
const r = Ue(t);
|
|
111
|
+
if (Oe(r)) {
|
|
111
112
|
const { negative: i, trimStr: s } = pe(r), [u, n = "0"] = s.split(".");
|
|
112
113
|
this.isNegative = i, this.integer = BigInt(u), this.decimal = BigInt(n), this.decimalLen = n.length;
|
|
113
114
|
} else
|
|
@@ -171,7 +172,7 @@ class Ne {
|
|
|
171
172
|
return typeof i == "number" ? Re(s, i) : s;
|
|
172
173
|
}
|
|
173
174
|
}
|
|
174
|
-
class
|
|
175
|
+
class re {
|
|
175
176
|
constructor(t) {
|
|
176
177
|
z(this, "isEmpty");
|
|
177
178
|
z(this, "isNaN");
|
|
@@ -183,7 +184,7 @@ class ie {
|
|
|
183
184
|
return this.isEmpty || this.isNaN;
|
|
184
185
|
}
|
|
185
186
|
negate() {
|
|
186
|
-
return new
|
|
187
|
+
return new re(-this.toNumber());
|
|
187
188
|
}
|
|
188
189
|
equals(t) {
|
|
189
190
|
return this.toNumber() === (t == null ? void 0 : t.toNumber());
|
|
@@ -192,32 +193,32 @@ class ie {
|
|
|
192
193
|
return this.isInvalid || t.isInvalid ? !1 : this.add(t.negate().toString()).toNumber() < 0;
|
|
193
194
|
}
|
|
194
195
|
add(t) {
|
|
195
|
-
const r = new
|
|
196
|
+
const r = new re(t);
|
|
196
197
|
if (r.isInvalid)
|
|
197
198
|
return this;
|
|
198
199
|
if (this.isInvalid)
|
|
199
200
|
return r;
|
|
200
201
|
const i = this.number + r.number;
|
|
201
202
|
if (i > Number.MAX_SAFE_INTEGER)
|
|
202
|
-
return new
|
|
203
|
+
return new re(Number.MAX_SAFE_INTEGER);
|
|
203
204
|
if (i < Number.MIN_SAFE_INTEGER)
|
|
204
|
-
return new
|
|
205
|
+
return new re(Number.MIN_SAFE_INTEGER);
|
|
205
206
|
const s = Math.max(
|
|
206
207
|
Ce(this.number),
|
|
207
208
|
Ce(r.number)
|
|
208
209
|
);
|
|
209
|
-
return new
|
|
210
|
+
return new re(i.toFixed(s));
|
|
210
211
|
}
|
|
211
212
|
toNumber() {
|
|
212
213
|
return this.number;
|
|
213
214
|
}
|
|
214
215
|
toString(t = { safe: !0 }) {
|
|
215
|
-
const { safe: r, precision: i } = t, s = r ? this.isInvalid ? "" :
|
|
216
|
+
const { safe: r, precision: i } = t, s = r ? this.isInvalid ? "" : Ue(this.number) : this.origin;
|
|
216
217
|
return typeof i == "number" ? Re(s, i) : s;
|
|
217
218
|
}
|
|
218
219
|
}
|
|
219
|
-
function
|
|
220
|
-
return Ee() ? new Ne(e) : new
|
|
220
|
+
function ne(e) {
|
|
221
|
+
return Ee() ? new Ne(e) : new re(e);
|
|
221
222
|
}
|
|
222
223
|
function Re(e, t, r = !1) {
|
|
223
224
|
if (e === "")
|
|
@@ -226,7 +227,7 @@ function Re(e, t, r = !1) {
|
|
|
226
227
|
if (t >= 0) {
|
|
227
228
|
const h = Number(n[t]);
|
|
228
229
|
if (h >= 5 && !r) {
|
|
229
|
-
const g =
|
|
230
|
+
const g = ne(e).add(
|
|
230
231
|
`${s}0.${"0".repeat(t)}${10 - h}`
|
|
231
232
|
);
|
|
232
233
|
return Re(g.toString(), t, r);
|
|
@@ -235,15 +236,15 @@ function Re(e, t, r = !1) {
|
|
|
235
236
|
}
|
|
236
237
|
return `${l}${m === ".0" ? "" : m}`;
|
|
237
238
|
}
|
|
238
|
-
function
|
|
239
|
+
function vt({
|
|
239
240
|
inputElement: e,
|
|
240
241
|
inputValue: t
|
|
241
242
|
}) {
|
|
242
|
-
const r =
|
|
243
|
-
return
|
|
243
|
+
const r = Z(null);
|
|
244
|
+
return Fe(() => {
|
|
244
245
|
try {
|
|
245
246
|
const i = r.current;
|
|
246
|
-
if (e && t &&
|
|
247
|
+
if (e && t && se(i)) {
|
|
247
248
|
const s = Math.max(0, t.length - i);
|
|
248
249
|
e.setSelectionRange(s, s);
|
|
249
250
|
}
|
|
@@ -252,26 +253,26 @@ function St({
|
|
|
252
253
|
}
|
|
253
254
|
}, [t]), (i) => {
|
|
254
255
|
const { selectionEnd: s, value: u } = i.target;
|
|
255
|
-
|
|
256
|
+
se(s) && (r.current = u.length - s);
|
|
256
257
|
};
|
|
257
258
|
}
|
|
258
|
-
const
|
|
259
|
+
const bt = 200, yt = 1e3, $t = {
|
|
259
260
|
max: 1 / 0,
|
|
260
261
|
min: -1 / 0,
|
|
261
262
|
step: 1,
|
|
262
263
|
mode: "embed",
|
|
263
264
|
parser: (e) => (e == null ? void 0 : e.replace(/[^\w.-]+/g, "")) || ""
|
|
264
265
|
};
|
|
265
|
-
function
|
|
266
|
-
var
|
|
266
|
+
function It(e, t) {
|
|
267
|
+
var Me;
|
|
267
268
|
const {
|
|
268
269
|
getPrefixCls: r,
|
|
269
270
|
size: i,
|
|
270
271
|
componentConfig: s,
|
|
271
272
|
rtl: u
|
|
272
|
-
} = de(fe), n =
|
|
273
|
+
} = de(fe), n = ze(
|
|
273
274
|
e,
|
|
274
|
-
|
|
275
|
+
$t,
|
|
275
276
|
s == null ? void 0 : s.InputNumber
|
|
276
277
|
), {
|
|
277
278
|
className: m,
|
|
@@ -281,11 +282,11 @@ function $t(e, t) {
|
|
|
281
282
|
error: I,
|
|
282
283
|
readOnly: v,
|
|
283
284
|
strictMode: E,
|
|
284
|
-
placeholder:
|
|
285
|
+
placeholder: M,
|
|
285
286
|
hideControl: R,
|
|
286
287
|
suffix: V,
|
|
287
288
|
prefix: T,
|
|
288
|
-
icons:
|
|
289
|
+
icons: S,
|
|
289
290
|
mode: y,
|
|
290
291
|
size: p,
|
|
291
292
|
step: b,
|
|
@@ -294,22 +295,22 @@ function $t(e, t) {
|
|
|
294
295
|
max: U,
|
|
295
296
|
parser: j,
|
|
296
297
|
formatter: O,
|
|
297
|
-
onBlur:
|
|
298
|
+
onBlur: P,
|
|
298
299
|
onFocus: K,
|
|
299
300
|
onChange: W,
|
|
300
301
|
onKeyDown: B,
|
|
301
302
|
...me
|
|
302
303
|
} = n, C = r("input-number"), a = p || i, L = (() => {
|
|
303
|
-
if (
|
|
304
|
-
const o = `${b}`.split(".")[1],
|
|
305
|
-
return Math.max(
|
|
304
|
+
if (se(H)) {
|
|
305
|
+
const o = `${b}`.split(".")[1], x = o && o.length || 0;
|
|
306
|
+
return Math.max(x, H);
|
|
306
307
|
}
|
|
307
308
|
return null;
|
|
308
|
-
})(), [q, X] =
|
|
309
|
+
})(), [q, X] = ae(() => ne(
|
|
309
310
|
"value" in n ? n.value : "defaultValue" in n ? h : void 0
|
|
310
|
-
)), [D,
|
|
311
|
+
)), [D, ee] = ae(""), [oe, Y] = ae(!1), [J, _] = ae(!1), f = Z(null), c = Z(null), w = Z(!1), d = he(() => "value" in n ? ne(n.value) : q, [n.value, q]), [G, te] = he(() => [ne(U), ne($)], [U, $]);
|
|
311
312
|
Ae(t, () => c.current, []);
|
|
312
|
-
const
|
|
313
|
+
const Se = (o, x) => {
|
|
313
314
|
if (X(o), !o.equals(d) && W) {
|
|
314
315
|
const A = o.toString({
|
|
315
316
|
safe: !0,
|
|
@@ -317,75 +318,75 @@ function $t(e, t) {
|
|
|
317
318
|
});
|
|
318
319
|
W(
|
|
319
320
|
o.isEmpty ? void 0 : E ? A : o.isNaN ? NaN : Number(A),
|
|
320
|
-
|
|
321
|
+
x
|
|
321
322
|
);
|
|
322
323
|
}
|
|
323
|
-
},
|
|
324
|
+
}, xe = () => {
|
|
324
325
|
f.current && clearTimeout(f.current), f.current = null;
|
|
325
|
-
}, ge =
|
|
326
|
+
}, ge = rt(
|
|
326
327
|
(o) => {
|
|
327
|
-
let
|
|
328
|
-
return
|
|
328
|
+
let x = o;
|
|
329
|
+
return x.less(te) ? x = te : G.less(x) && (x = G), x;
|
|
329
330
|
},
|
|
330
|
-
[
|
|
331
|
+
[te, G]
|
|
331
332
|
);
|
|
332
|
-
we(() => () =>
|
|
333
|
+
we(() => () => xe(), []), we(() => {
|
|
333
334
|
w.current = !1;
|
|
334
335
|
}, [n.value]), we(() => {
|
|
335
|
-
const o = d.less(
|
|
336
|
-
o && w.current &&
|
|
337
|
-
}, [
|
|
338
|
-
const Ie = (o,
|
|
336
|
+
const o = d.less(te) || G.less(d);
|
|
337
|
+
o && w.current && Se(ge(d), "outOfRange"), Y(o);
|
|
338
|
+
}, [te, G, d, ge]);
|
|
339
|
+
const Ie = (o, x, A = !1) => {
|
|
339
340
|
if (o.persist(), o.preventDefault(), _(!1), g || v)
|
|
340
341
|
return;
|
|
341
|
-
const
|
|
342
|
-
if (
|
|
343
|
-
ge(
|
|
344
|
-
|
|
342
|
+
const Ye = d.isInvalid ? ne($ === -1 / 0 || $ <= 0 && U >= 0 ? 0 : $) : d.add(x === "plus" ? b : -b);
|
|
343
|
+
if (Se(
|
|
344
|
+
ge(Ye),
|
|
345
|
+
x === "plus" ? "increase" : "decrease"
|
|
345
346
|
), c.current && c.current.focus(), A) {
|
|
346
|
-
const
|
|
347
|
+
const Je = f.current === null;
|
|
347
348
|
f.current = setTimeout(
|
|
348
349
|
() => o.target.dispatchEvent(o.nativeEvent),
|
|
349
|
-
|
|
350
|
+
Je ? yt : bt
|
|
350
351
|
);
|
|
351
352
|
}
|
|
352
353
|
}, Ve = he(() => {
|
|
353
354
|
let o;
|
|
354
|
-
return J ? o = j ? `${j(D)}` : D :
|
|
355
|
-
}, [d, D, J, L, j, O]),
|
|
356
|
-
inputElement: (
|
|
355
|
+
return J ? o = j ? `${j(D)}` : D : se(L) ? o = d.toString({ safe: !0, precision: L }) : d.isInvalid ? o = "" : o = d.toString(), O ? O(o, { userTyping: J, input: D }) : o;
|
|
356
|
+
}, [d, D, J, L, j, O]), je = vt({
|
|
357
|
+
inputElement: (Me = c.current) == null ? void 0 : Me.dom,
|
|
357
358
|
inputValue: Ve
|
|
358
|
-
}),
|
|
359
|
-
onChange: (o,
|
|
359
|
+
}), Ke = {
|
|
360
|
+
onChange: (o, x) => {
|
|
360
361
|
_(!0), o = o.trim().replace(/。/g, ".");
|
|
361
362
|
const A = j ? j(o) : o;
|
|
362
|
-
(
|
|
363
|
+
(se(+A) || A === "-" || !A || A === ".") && (ee(o), Se(ge(ne(A)), "manual"), je(x));
|
|
363
364
|
},
|
|
364
365
|
onKeyDown: (o) => {
|
|
365
|
-
const
|
|
366
|
-
|
|
366
|
+
const x = o.key;
|
|
367
|
+
x === St.key ? (o.stopPropagation(), Ie(o, "minus")) : x === xt.key && (o.stopPropagation(), Ie(o, "plus")), xe(), B == null || B(o);
|
|
367
368
|
},
|
|
368
369
|
onFocus: (o) => {
|
|
369
|
-
var
|
|
370
|
-
w.current = !0,
|
|
370
|
+
var x, A;
|
|
371
|
+
w.current = !0, ee((A = (x = c.current) == null ? void 0 : x.dom) == null ? void 0 : A.value), K == null || K(o);
|
|
371
372
|
},
|
|
372
373
|
onBlur: (o) => {
|
|
373
|
-
|
|
374
|
+
Se(ge(d), "outOfRange"), _(!1), P == null || P(o);
|
|
374
375
|
}
|
|
375
|
-
},
|
|
376
|
-
onMouseDown: (
|
|
377
|
-
},
|
|
378
|
-
const A = !g && (d.isInvalid || (o === "plus" ? G.isInvalid || d.less(G) :
|
|
376
|
+
}, Xe = (o) => v ? {} : {
|
|
377
|
+
onMouseDown: (x) => Ie(x, o, !0)
|
|
378
|
+
}, Pe = !R && y === "button", qe = !R && !v && y === "embed", ve = (o, x) => {
|
|
379
|
+
const A = !g && (d.isInvalid || (o === "plus" ? G.isInvalid || d.less(G) : te.isInvalid || te.less(d)));
|
|
379
380
|
return /* @__PURE__ */ N(
|
|
380
381
|
"div",
|
|
381
382
|
{
|
|
382
383
|
className: F(`${C}-step-button`, {
|
|
383
384
|
[`${C}-step-button-disabled`]: !A
|
|
384
385
|
}),
|
|
385
|
-
onMouseLeave:
|
|
386
|
-
onMouseUp:
|
|
387
|
-
...A ?
|
|
388
|
-
children:
|
|
386
|
+
onMouseLeave: xe,
|
|
387
|
+
onMouseUp: xe,
|
|
388
|
+
...A ? Xe(o) : {},
|
|
389
|
+
children: x
|
|
389
390
|
}
|
|
390
391
|
);
|
|
391
392
|
};
|
|
@@ -398,7 +399,7 @@ function $t(e, t) {
|
|
|
398
399
|
"aria-valuemin": $,
|
|
399
400
|
"aria-valuenow": d.isEmpty ? void 0 : d.toNumber(),
|
|
400
401
|
...$e(me, ["allowClear"]),
|
|
401
|
-
...
|
|
402
|
+
...Ke,
|
|
402
403
|
style: l,
|
|
403
404
|
className: F(
|
|
404
405
|
C,
|
|
@@ -407,7 +408,7 @@ function $t(e, t) {
|
|
|
407
408
|
{
|
|
408
409
|
[`${C}-rtl`]: u,
|
|
409
410
|
[`${C}-readonly`]: v,
|
|
410
|
-
[`${C}-illegal-value`]: !d.isEmpty &&
|
|
411
|
+
[`${C}-illegal-value`]: !d.isEmpty && oe
|
|
411
412
|
},
|
|
412
413
|
m
|
|
413
414
|
),
|
|
@@ -417,42 +418,42 @@ function $t(e, t) {
|
|
|
417
418
|
disabled: g,
|
|
418
419
|
readOnly: v,
|
|
419
420
|
value: Ve,
|
|
420
|
-
placeholder:
|
|
421
|
+
placeholder: M,
|
|
421
422
|
prefix: T && /* @__PURE__ */ N("div", { className: `${C}-prefix`, children: T }),
|
|
422
|
-
suffix: /* @__PURE__ */
|
|
423
|
-
|
|
423
|
+
suffix: /* @__PURE__ */ ie(et, { children: [
|
|
424
|
+
qe && /* @__PURE__ */ ie("div", { className: `${C}-step-layer`, children: [
|
|
424
425
|
ve(
|
|
425
426
|
"plus",
|
|
426
|
-
|
|
427
|
+
S && S.up ? S.up : /* @__PURE__ */ N(ct, {})
|
|
427
428
|
),
|
|
428
429
|
ve(
|
|
429
430
|
"minus",
|
|
430
|
-
|
|
431
|
+
S && S.down ? S.down : /* @__PURE__ */ N(at, {})
|
|
431
432
|
)
|
|
432
433
|
] }),
|
|
433
434
|
V && /* @__PURE__ */ N("div", { className: `${C}-suffix`, children: V })
|
|
434
435
|
] }),
|
|
435
|
-
addBefore:
|
|
436
|
+
addBefore: Pe && ve(
|
|
436
437
|
"minus",
|
|
437
|
-
|
|
438
|
+
S && S.minus ? S.minus : /* @__PURE__ */ N(lt, {})
|
|
438
439
|
),
|
|
439
|
-
addAfter:
|
|
440
|
+
addAfter: Pe && ve(
|
|
440
441
|
"plus",
|
|
441
|
-
|
|
442
|
+
S && S.plus ? S.plus : /* @__PURE__ */ N(ut, {})
|
|
442
443
|
)
|
|
443
444
|
}
|
|
444
445
|
);
|
|
445
446
|
}
|
|
446
|
-
const Oe = ce.forwardRef(
|
|
447
|
-
$t
|
|
448
|
-
);
|
|
449
|
-
Oe.displayName = "InputNumber";
|
|
450
447
|
const We = ce.forwardRef(
|
|
448
|
+
It
|
|
449
|
+
);
|
|
450
|
+
We.displayName = "InputNumber";
|
|
451
|
+
const Be = ce.forwardRef(
|
|
451
452
|
(e, t) => {
|
|
452
453
|
const [r, i] = ye(!1, {
|
|
453
454
|
defaultValue: e.defaultVisibility,
|
|
454
455
|
value: e.visibility
|
|
455
|
-
}), { getPrefixCls: s } = de(fe), u =
|
|
456
|
+
}), { getPrefixCls: s } = de(fe), u = mt(), {
|
|
456
457
|
className: n,
|
|
457
458
|
visibilityToggle: m = !0,
|
|
458
459
|
onVisibilityChange: l,
|
|
@@ -467,21 +468,21 @@ const We = ce.forwardRef(
|
|
|
467
468
|
"visibility" in e || i(R), l == null || l(R);
|
|
468
469
|
};
|
|
469
470
|
let E = e.suffix;
|
|
470
|
-
const
|
|
471
|
+
const M = () => {
|
|
471
472
|
v(!r);
|
|
472
473
|
};
|
|
473
474
|
if (m) {
|
|
474
475
|
const R = {
|
|
475
|
-
onClick:
|
|
476
|
+
onClick: M,
|
|
476
477
|
// 预防focus丢失
|
|
477
478
|
onMouseDown: (V) => V.preventDefault(),
|
|
478
479
|
onMouseUp: (V) => V.preventDefault(),
|
|
479
480
|
...u({
|
|
480
|
-
onPressEnter:
|
|
481
|
+
onPressEnter: M
|
|
481
482
|
})
|
|
482
483
|
};
|
|
483
484
|
e.suffix ? E = /* @__PURE__ */ N("span", { ...R, children: e.suffix }) : E = /* @__PURE__ */ N(
|
|
484
|
-
r ?
|
|
485
|
+
r ? dt : ft,
|
|
485
486
|
{
|
|
486
487
|
...R,
|
|
487
488
|
focusable: void 0,
|
|
@@ -503,8 +504,8 @@ const We = ce.forwardRef(
|
|
|
503
504
|
);
|
|
504
505
|
}
|
|
505
506
|
);
|
|
506
|
-
|
|
507
|
-
const
|
|
507
|
+
Be.displayName = "Password";
|
|
508
|
+
const _e = ce.forwardRef(
|
|
508
509
|
(e, t) => {
|
|
509
510
|
const { getPrefixCls: r } = de(fe), {
|
|
510
511
|
className: i,
|
|
@@ -517,10 +518,10 @@ const Be = ce.forwardRef(
|
|
|
517
518
|
addAfter: g,
|
|
518
519
|
suffix: I,
|
|
519
520
|
...v
|
|
520
|
-
} = e, E =
|
|
521
|
-
defaultValue: "defaultValue" in e ? ue(e.defaultValue,
|
|
522
|
-
value: "value" in e ? ue(e.value,
|
|
523
|
-
}), T = r("input-search"),
|
|
521
|
+
} = e, E = le(e.maxLength) ? e.maxLength.length : e.maxLength, M = le(e.maxLength) && e.maxLength.errorOnly ? void 0 : E, [R, V] = ye("", {
|
|
522
|
+
defaultValue: "defaultValue" in e ? ue(e.defaultValue, M) : void 0,
|
|
523
|
+
value: "value" in e ? ue(e.value, M) : void 0
|
|
524
|
+
}), T = r("input-search"), S = F(
|
|
524
525
|
T,
|
|
525
526
|
{
|
|
526
527
|
[`${T}-button`]: m
|
|
@@ -535,12 +536,12 @@ const Be = ce.forwardRef(
|
|
|
535
536
|
{
|
|
536
537
|
...$e(v, ["onSearch"]),
|
|
537
538
|
disabled: n,
|
|
538
|
-
className:
|
|
539
|
+
className: S,
|
|
539
540
|
style: s,
|
|
540
541
|
ref: t,
|
|
541
542
|
placeholder: u,
|
|
542
543
|
addAfter: g !== void 0 ? g : m ? /* @__PURE__ */ N(
|
|
543
|
-
|
|
544
|
+
ht,
|
|
544
545
|
{
|
|
545
546
|
disabled: n,
|
|
546
547
|
size: v.size,
|
|
@@ -554,7 +555,7 @@ const Be = ce.forwardRef(
|
|
|
554
555
|
children: m !== !0 && m
|
|
555
556
|
}
|
|
556
557
|
) : null,
|
|
557
|
-
suffix: I !== void 0 ? I : !m && (l ? /* @__PURE__ */ N(
|
|
558
|
+
suffix: I !== void 0 ? I : !m && (l ? /* @__PURE__ */ N(gt, {}) : /* @__PURE__ */ N(De, { onClick: y })),
|
|
558
559
|
onChange: (p, b) => {
|
|
559
560
|
var H;
|
|
560
561
|
V(p), (H = e.onChange) == null || H.call(e, p, b);
|
|
@@ -568,8 +569,8 @@ const Be = ce.forwardRef(
|
|
|
568
569
|
);
|
|
569
570
|
}
|
|
570
571
|
);
|
|
571
|
-
|
|
572
|
-
const
|
|
572
|
+
_e.displayName = "Search";
|
|
573
|
+
const wt = [
|
|
573
574
|
"position: absolute",
|
|
574
575
|
"min-height: 0 !important",
|
|
575
576
|
"max-height: none",
|
|
@@ -578,7 +579,7 @@ const It = [
|
|
|
578
579
|
"z-index: -100",
|
|
579
580
|
"top: 0",
|
|
580
581
|
"right: 0"
|
|
581
|
-
].join(";"),
|
|
582
|
+
].join(";"), Et = [
|
|
582
583
|
"border-width",
|
|
583
584
|
"box-sizing",
|
|
584
585
|
"font-family",
|
|
@@ -597,10 +598,10 @@ const It = [
|
|
|
597
598
|
"width"
|
|
598
599
|
];
|
|
599
600
|
let Q;
|
|
600
|
-
function
|
|
601
|
+
function Ct(e) {
|
|
601
602
|
Q || (Q = document.createElement("textarea"), document.body.appendChild(Q));
|
|
602
|
-
const t = window.getComputedStyle(e), r =
|
|
603
|
-
Q.setAttribute("style",
|
|
603
|
+
const t = window.getComputedStyle(e), r = Et.map((n) => `${n}:${t.getPropertyValue(n)}`).join(";");
|
|
604
|
+
Q.setAttribute("style", wt + r);
|
|
604
605
|
const i = parseFloat(t.getPropertyValue("padding-top")) + parseFloat(t.getPropertyValue("padding-bottom")), s = t.getPropertyValue("box-sizing"), u = parseFloat(t.getPropertyValue("border-top-width")) + parseFloat(t.getPropertyValue("border-bottom-width"));
|
|
605
606
|
return {
|
|
606
607
|
paddingSize: i,
|
|
@@ -608,28 +609,28 @@ function Et(e) {
|
|
|
608
609
|
borderSize: u
|
|
609
610
|
};
|
|
610
611
|
}
|
|
611
|
-
function
|
|
612
|
+
function At(e, t) {
|
|
612
613
|
const r = () => {
|
|
613
614
|
let i, s;
|
|
614
|
-
return
|
|
615
|
+
return le(e) && (i = e.minRows, s = e.maxRows), {
|
|
615
616
|
minRows: i,
|
|
616
617
|
maxRows: s
|
|
617
618
|
};
|
|
618
619
|
};
|
|
619
620
|
if (e) {
|
|
620
|
-
const { minRows: i, maxRows: s } = r(), u = t, { paddingSize: n, boxSizing: m, borderSize: l } =
|
|
621
|
+
const { minRows: i, maxRows: s } = r(), u = t, { paddingSize: n, boxSizing: m, borderSize: l } = Ct(u);
|
|
621
622
|
Q.value = u.value || u.placeholder || "";
|
|
622
623
|
let h = Q.scrollHeight + l, g, I, v;
|
|
623
624
|
if (i || s) {
|
|
624
625
|
Q.value = "";
|
|
625
|
-
const
|
|
626
|
-
|
|
626
|
+
const M = Q.scrollHeight - n;
|
|
627
|
+
se(i) && (g = M * i, m === "border-box" && (g += n, g += l), h = Math.max(h, g)), se(s) && (I = M * s, m === "border-box" && (I += n, I += l), v = h > I ? "auto" : "", I = Math.min(h, I));
|
|
627
628
|
}
|
|
628
629
|
const E = {};
|
|
629
630
|
return E.height = h, g && (E.minHeight = g), I && (E.maxHeight = I), v && (E.overflowY = v), E;
|
|
630
631
|
}
|
|
631
632
|
}
|
|
632
|
-
const
|
|
633
|
+
const Rt = (e, t) => {
|
|
633
634
|
const {
|
|
634
635
|
className: r,
|
|
635
636
|
style: i,
|
|
@@ -643,25 +644,25 @@ const At = (e, t) => {
|
|
|
643
644
|
onChange: I,
|
|
644
645
|
onClear: v,
|
|
645
646
|
onKeyDown: E,
|
|
646
|
-
onPressEnter:
|
|
647
|
+
onPressEnter: M,
|
|
647
648
|
status: R,
|
|
648
649
|
clearIcon: V,
|
|
649
650
|
...T
|
|
650
|
-
} = e,
|
|
651
|
+
} = e, S = Le(l) ? l.length : l, y = Le(l) ? l.errorOnly ? void 0 : l.length : l, p = Z(), [b, H] = ae({}), [$, U] = ye("", {
|
|
651
652
|
defaultValue: "defaultValue" in e ? ue(e.defaultValue, y) : void 0,
|
|
652
653
|
value: "value" in e ? ue(e.value, y) : void 0
|
|
653
654
|
}), {
|
|
654
655
|
compositionValue: j,
|
|
655
656
|
compositionHandler: O,
|
|
656
|
-
valueChangeHandler:
|
|
657
|
+
valueChangeHandler: P,
|
|
657
658
|
keyDownHandler: K,
|
|
658
659
|
triggerValueChangeCallback: W
|
|
659
|
-
} =
|
|
660
|
+
} = st({
|
|
660
661
|
value: $,
|
|
661
662
|
maxLength: y,
|
|
662
663
|
onChange: I,
|
|
663
664
|
onKeyDown: E,
|
|
664
|
-
onPressEnter:
|
|
665
|
+
onPressEnter: M,
|
|
665
666
|
beforeTriggerValueChangeCallback: (f) => {
|
|
666
667
|
!("value" in e) && (y === void 0 || f.length <= y) && U(f);
|
|
667
668
|
}
|
|
@@ -676,7 +677,7 @@ const At = (e, t) => {
|
|
|
676
677
|
p.current.focus();
|
|
677
678
|
}
|
|
678
679
|
}, q = () => {
|
|
679
|
-
const f =
|
|
680
|
+
const f = At(
|
|
680
681
|
e.autoSize,
|
|
681
682
|
p.current
|
|
682
683
|
);
|
|
@@ -684,7 +685,7 @@ const At = (e, t) => {
|
|
|
684
685
|
}, X = (f) => {
|
|
685
686
|
f.stopPropagation(), L(), W("", f), v == null || v();
|
|
686
687
|
};
|
|
687
|
-
|
|
688
|
+
Fe(() => {
|
|
688
689
|
q();
|
|
689
690
|
}, [B]), Ae(
|
|
690
691
|
t,
|
|
@@ -701,7 +702,7 @@ const At = (e, t) => {
|
|
|
701
702
|
}),
|
|
702
703
|
[]
|
|
703
704
|
);
|
|
704
|
-
const D = $ ? $.length : 0,
|
|
705
|
+
const D = $ ? $.length : 0, ee = S && h || g, oe = he(() => !y && S ? D > S : !1, [D, S, y]), Y = R || (m || oe ? "error" : void 0), J = F(
|
|
705
706
|
a,
|
|
706
707
|
{
|
|
707
708
|
[`${a}-${Y}`]: Y,
|
|
@@ -721,16 +722,16 @@ const At = (e, t) => {
|
|
|
721
722
|
placeholder: u,
|
|
722
723
|
disabled: n,
|
|
723
724
|
value: B,
|
|
724
|
-
onChange:
|
|
725
|
+
onChange: P,
|
|
725
726
|
onKeyDown: K,
|
|
726
727
|
onCompositionStart: O,
|
|
727
728
|
onCompositionUpdate: O,
|
|
728
729
|
onCompositionEnd: O
|
|
729
730
|
}
|
|
730
731
|
);
|
|
731
|
-
if (
|
|
732
|
-
const f = !n && g && $, [c, w] = C ? [
|
|
733
|
-
return /* @__PURE__ */
|
|
732
|
+
if (ee) {
|
|
733
|
+
const f = !n && g && $, [c, w] = C ? [S, D] : [D, S];
|
|
734
|
+
return /* @__PURE__ */ ie(
|
|
734
735
|
"div",
|
|
735
736
|
{
|
|
736
737
|
className: F(`${a}-wrapper`, {
|
|
@@ -750,8 +751,8 @@ const At = (e, t) => {
|
|
|
750
751
|
},
|
|
751
752
|
children: V
|
|
752
753
|
}
|
|
753
|
-
) : /* @__PURE__ */ N(
|
|
754
|
-
|
|
754
|
+
) : /* @__PURE__ */ N(it, { className: `${a}-clear-icon`, children: /* @__PURE__ */ N(
|
|
755
|
+
Nt,
|
|
755
756
|
{
|
|
756
757
|
onClick: X,
|
|
757
758
|
onMouseDown: (d) => {
|
|
@@ -759,11 +760,11 @@ const At = (e, t) => {
|
|
|
759
760
|
}
|
|
760
761
|
}
|
|
761
762
|
) }) : null,
|
|
762
|
-
|
|
763
|
+
S && h && /* @__PURE__ */ ie(
|
|
763
764
|
"span",
|
|
764
765
|
{
|
|
765
766
|
className: F(`${a}-word-limit`, {
|
|
766
|
-
[`${a}-word-limit-error`]:
|
|
767
|
+
[`${a}-word-limit-error`]: oe
|
|
767
768
|
}),
|
|
768
769
|
children: [
|
|
769
770
|
c,
|
|
@@ -777,22 +778,22 @@ const At = (e, t) => {
|
|
|
777
778
|
);
|
|
778
779
|
}
|
|
779
780
|
return _;
|
|
780
|
-
},
|
|
781
|
-
|
|
782
|
-
const
|
|
781
|
+
}, Ge = ce.forwardRef(Rt);
|
|
782
|
+
Ge.displayName = "TextArea";
|
|
783
|
+
const Vt = (e) => {
|
|
783
784
|
e.target.tagName !== "INPUT" && e.preventDefault();
|
|
784
785
|
}, be = (e, t, r = {}, i) => t ? /* @__PURE__ */ N("span", { style: r, className: e, onClick: i, children: t }) : null;
|
|
785
786
|
function ue(e, t) {
|
|
786
|
-
const r = e !== null && !
|
|
787
|
+
const r = e !== null && !nt(e) && !tt(e) ? String(e) : e || "";
|
|
787
788
|
return t ? r.slice(0, t) : r;
|
|
788
789
|
}
|
|
789
|
-
function
|
|
790
|
+
function Pt(e, t) {
|
|
790
791
|
const {
|
|
791
792
|
getPrefixCls: r,
|
|
792
793
|
size: i,
|
|
793
794
|
componentConfig: s,
|
|
794
795
|
rtl: u
|
|
795
|
-
} = de(fe), n =
|
|
796
|
+
} = de(fe), n = ze(
|
|
796
797
|
e,
|
|
797
798
|
{},
|
|
798
799
|
s == null ? void 0 : s.Input
|
|
@@ -804,23 +805,23 @@ function Vt(e, t) {
|
|
|
804
805
|
suffix: I,
|
|
805
806
|
prefix: v,
|
|
806
807
|
beforeStyle: E,
|
|
807
|
-
afterStyle:
|
|
808
|
+
afterStyle: M,
|
|
808
809
|
height: R,
|
|
809
810
|
disabled: V,
|
|
810
811
|
maxLength: T,
|
|
811
|
-
showWordLimit:
|
|
812
|
+
showWordLimit: S,
|
|
812
813
|
allowClear: y,
|
|
813
814
|
autoWidth: p
|
|
814
815
|
} = n, b = p ? {
|
|
815
816
|
minWidth: 0,
|
|
816
817
|
maxWidth: "100%",
|
|
817
|
-
...
|
|
818
|
+
...le(p) ? p : {}
|
|
818
819
|
} : null, H = {
|
|
819
820
|
minWidth: b == null ? void 0 : b.minWidth,
|
|
820
821
|
maxWidth: b == null ? void 0 : b.maxWidth,
|
|
821
822
|
width: b && "auto",
|
|
822
823
|
...l
|
|
823
|
-
}, $ =
|
|
824
|
+
}, $ = le(T) ? T.length : T, U = le(T) && T.errorOnly ? void 0 : $, [j, O] = ae(!1), P = Z(), K = Z(), W = Z(), [B, me] = ye("", {
|
|
824
825
|
defaultValue: "defaultValue" in n ? ue(n.defaultValue, U) : void 0,
|
|
825
826
|
value: "value" in n ? ue(n.value, U) : void 0
|
|
826
827
|
});
|
|
@@ -829,13 +830,13 @@ function Vt(e, t) {
|
|
|
829
830
|
() => {
|
|
830
831
|
var c, w, d;
|
|
831
832
|
return {
|
|
832
|
-
focus: (c =
|
|
833
|
-
blur: (w =
|
|
834
|
-
dom: (d =
|
|
833
|
+
focus: (c = P.current) == null ? void 0 : c.focus,
|
|
834
|
+
blur: (w = P.current) == null ? void 0 : w.blur,
|
|
835
|
+
dom: (d = P.current) == null ? void 0 : d.dom,
|
|
835
836
|
// 保持之前逻辑
|
|
836
837
|
getRootDOMNode: () => {
|
|
837
838
|
var G;
|
|
838
|
-
return K.current || ((G =
|
|
839
|
+
return K.current || ((G = P.current) == null ? void 0 : G.dom);
|
|
839
840
|
}
|
|
840
841
|
};
|
|
841
842
|
},
|
|
@@ -846,14 +847,14 @@ function Vt(e, t) {
|
|
|
846
847
|
"value" in n || me(c), (d = n.onChange) == null || d.call(n, c, w);
|
|
847
848
|
}, a = r("input"), L = n.size || i, q = "height" in n;
|
|
848
849
|
let X = I;
|
|
849
|
-
const D = B ? B.length : 0,
|
|
850
|
-
if ($ &&
|
|
850
|
+
const D = B ? B.length : 0, ee = he(() => !U && $ ? D > $ : !1, [D, $, U]);
|
|
851
|
+
if ($ && S) {
|
|
851
852
|
const [c, w] = u ? [$, D] : [D, $];
|
|
852
|
-
X = /* @__PURE__ */
|
|
853
|
+
X = /* @__PURE__ */ ie(
|
|
853
854
|
"span",
|
|
854
855
|
{
|
|
855
856
|
className: F(`${a}-word-limit`, {
|
|
856
|
-
[`${a}-word-limit-error`]:
|
|
857
|
+
[`${a}-word-limit-error`]: ee
|
|
857
858
|
}),
|
|
858
859
|
children: [
|
|
859
860
|
c,
|
|
@@ -863,7 +864,7 @@ function Vt(e, t) {
|
|
|
863
864
|
}
|
|
864
865
|
);
|
|
865
866
|
}
|
|
866
|
-
const
|
|
867
|
+
const oe = F(
|
|
867
868
|
`${a}-group-wrapper`,
|
|
868
869
|
`${a}-group-wrapper-${L}`,
|
|
869
870
|
{
|
|
@@ -874,10 +875,10 @@ function Vt(e, t) {
|
|
|
874
875
|
[`${a}-group-wrapper-autowidth`]: b
|
|
875
876
|
},
|
|
876
877
|
m
|
|
877
|
-
), Y = n.status || (n.error ||
|
|
878
|
-
|
|
878
|
+
), Y = n.status || (n.error || ee ? "error" : void 0), J = h || g || X || v, _ = /* @__PURE__ */ N(
|
|
879
|
+
ot,
|
|
879
880
|
{
|
|
880
|
-
ref:
|
|
881
|
+
ref: P,
|
|
881
882
|
...n,
|
|
882
883
|
autoFitWidth: !!b,
|
|
883
884
|
style: H,
|
|
@@ -909,11 +910,11 @@ function Vt(e, t) {
|
|
|
909
910
|
"div",
|
|
910
911
|
{
|
|
911
912
|
ref: K,
|
|
912
|
-
className:
|
|
913
|
+
className: oe,
|
|
913
914
|
style: { ...H, ...q ? { height: R } : {} },
|
|
914
|
-
children: /* @__PURE__ */
|
|
915
|
+
children: /* @__PURE__ */ ie("span", { className: `${a}-group`, children: [
|
|
915
916
|
be(`${a}-group-addbefore`, h, E),
|
|
916
|
-
/* @__PURE__ */
|
|
917
|
+
/* @__PURE__ */ ie(
|
|
917
918
|
"span",
|
|
918
919
|
{
|
|
919
920
|
className: f,
|
|
@@ -922,7 +923,7 @@ function Vt(e, t) {
|
|
|
922
923
|
c.target.tagName !== "INPUT" && W.current && Te(W.current, c.target) && c.preventDefault();
|
|
923
924
|
},
|
|
924
925
|
onClick: (c) => {
|
|
925
|
-
W.current && Te(W.current, c.target) &&
|
|
926
|
+
W.current && Te(W.current, c.target) && P.current && P.current.focus();
|
|
926
927
|
},
|
|
927
928
|
children: [
|
|
928
929
|
be(`${a}-group-prefix`, v),
|
|
@@ -931,7 +932,7 @@ function Vt(e, t) {
|
|
|
931
932
|
]
|
|
932
933
|
}
|
|
933
934
|
),
|
|
934
|
-
be(`${a}-group-addafter`, g,
|
|
935
|
+
be(`${a}-group-addafter`, g, M)
|
|
935
936
|
] })
|
|
936
937
|
}
|
|
937
938
|
) : y ? /* @__PURE__ */ N(
|
|
@@ -940,23 +941,28 @@ function Vt(e, t) {
|
|
|
940
941
|
ref: K,
|
|
941
942
|
className: F(m, f),
|
|
942
943
|
style: { ...H, ...q ? { height: R } : {} },
|
|
943
|
-
onMouseDown:
|
|
944
|
+
onMouseDown: Vt,
|
|
944
945
|
onClick: () => {
|
|
945
|
-
|
|
946
|
+
P.current && P.current.focus();
|
|
946
947
|
},
|
|
947
948
|
children: _
|
|
948
949
|
}
|
|
949
950
|
) : _;
|
|
950
951
|
}
|
|
951
|
-
const k = ce.forwardRef(
|
|
952
|
+
const k = ce.forwardRef(Pt);
|
|
952
953
|
k.displayName = "Input";
|
|
953
|
-
k.Search =
|
|
954
|
-
k.TextArea =
|
|
955
|
-
k.Password =
|
|
956
|
-
k.Number = k.InputNumber =
|
|
957
|
-
k.Tag = k.InputTag =
|
|
958
|
-
k.Group =
|
|
954
|
+
k.Search = _e;
|
|
955
|
+
k.TextArea = Ge;
|
|
956
|
+
k.Password = Be;
|
|
957
|
+
k.Number = k.InputNumber = We;
|
|
958
|
+
k.Tag = k.InputTag = pt;
|
|
959
|
+
k.Group = ke;
|
|
959
960
|
export {
|
|
961
|
+
ke as G,
|
|
960
962
|
k as I,
|
|
961
|
-
|
|
963
|
+
Be as P,
|
|
964
|
+
_e as S,
|
|
965
|
+
Ge as T,
|
|
966
|
+
We as a,
|
|
967
|
+
ue as f
|
|
962
968
|
};
|