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