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