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