@unicom-cloud/ui 0.8.96 → 0.8.98
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/Carousel.js +1 -1
- package/LiquidFill.js +4 -0
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/QrCode.js +57 -0
- package/Tour.js +63 -0
- package/Trigger.js +1 -1
- package/_virtual/_commonjsHelpers.js +6 -0
- package/_virtual/index.js +7 -0
- package/_virtual/index2.js +4 -0
- package/affix/index.js +70 -72
- package/alert/index.js +56 -56
- package/anchor/Anchor.js +55 -55
- package/anchor/Link.js +34 -34
- package/anchor/util.js +5 -5
- package/auto-complete/index.js +116 -122
- package/avatar/Avatar.js +33 -33
- package/avatar/Group.js +26 -26
- package/back-top/index.js +58 -61
- package/badge/index.js +46 -46
- package/breadcrumb/Item.js +42 -43
- package/breadcrumb/index.js +47 -47
- package/button/Group.js +6 -6
- package/button/index.js +91 -91
- package/calendar/Month.js +75 -75
- package/calendar/Year.js +35 -35
- package/calendar/header/index.js +25 -25
- package/calendar/index.js +103 -103
- package/card/Grid.js +8 -8
- package/card/Meta.js +16 -16
- package/card/index.js +49 -49
- package/carousel/Arrow.js +19 -19
- package/carousel/Indicator.js +26 -26
- package/carousel/index.js +108 -108
- package/cascader/Cascader.js +178 -191
- package/cascader/base/node.js +133 -136
- package/cascader/base/store.js +82 -85
- package/cascader/panel/List.js +125 -129
- package/cascader/panel/Search.js +79 -81
- package/cascader/util.js +13 -13
- package/checkbox/Checkbox.js +94 -96
- package/checkbox/Group.js +54 -56
- package/checkbox/GroupBlock.js +28 -29
- package/collapse/Collapse.js +45 -45
- package/collapse/Item.js +53 -55
- package/color-picker/ControlBar.js +43 -43
- package/color-picker/InputAlpha.js +12 -12
- package/color-picker/InputHex.js +30 -31
- package/color-picker/InputRgb.js +24 -24
- package/color-picker/Palette.js +18 -18
- package/color-picker/Panel.js +122 -125
- package/color-picker/hooks/useColorPicker.js +85 -88
- package/color-picker/hooks/useControlBlock.js +38 -40
- package/color-picker/index.js +47 -47
- package/comment/index.js +29 -29
- package/components/common/higher-order/with-speech-synthesis/index.js +37 -40
- package/components/common/hooks/useId.js +8 -8
- package/components/common/hooks/useInView.js +16 -16
- package/components/common/hooks/useIntersectionObserver.js +1 -1
- package/components/common/hooks/useKeyboardEvent.js +9 -10
- package/components/common/hooks/useOverflowHidden.js +1 -4
- package/components/common/hooks/usePersistCallback.js +7 -7
- package/components/common/hooks/useStateCallback.js +9 -10
- package/components/common/hooks/useWindowSize.js +8 -8
- package/components/common/space/index.js +9 -7
- package/components/common/utils/convertToDurationBasedOnTimeUnits.js +6 -0
- package/components/common/utils/dom.js +27 -29
- package/components/common/utils/findScrollParent.js +17 -0
- package/components/common/utils/intersectionObserver.js +21 -0
- package/components/common/utils/is.js +99 -109
- package/components/common/utils/mutationObserver.js +19 -0
- package/components/common/utils/reactDOM.js +34 -34
- package/components/common/utils/resizeObserver.js +21 -0
- package/copy/index.js +38 -40
- package/date-picker/Picker.js +290 -295
- package/date-picker/RangePicker.js +367 -372
- package/date-picker/index.js +33 -35
- package/date-picker/panel/Body.js +46 -47
- package/date-picker/panel/Header.js +33 -33
- package/date-picker/panel/Shortcut.js +31 -31
- package/date-picker/panel/date/index.js +85 -85
- package/date-picker/panel/month/index.js +59 -59
- package/date-picker/panel/quarter/index.js +67 -70
- package/date-picker/panel/range/index.js +101 -101
- package/date-picker/panel/year/index.js +39 -39
- package/date-picker/util.js +17 -18
- package/descriptions/index.js +62 -62
- package/details/index.js +53 -55
- package/development/index.js +9 -9
- package/dist/tinycolor/chunk/BOzCVdr0.js +1 -1
- package/dist/validate/src/index.js +5 -5
- package/dist/validate/src/util.js +1 -1
- package/divider/index.js +21 -21
- package/draggable/Item.js +35 -35
- package/draggable/index.js +22 -22
- package/drawer/Drawer.js +142 -147
- package/dropdown/Button.js +48 -48
- package/dropdown/index.js +88 -92
- package/empty/index.js +16 -16
- package/form/Control.js +211 -225
- package/form/Form.js +109 -113
- package/form/FormItem.js +118 -120
- package/form/FormList.js +60 -66
- package/form/FormProvider.js +31 -34
- package/form/hook/useContext.js +17 -19
- package/form/hook/useState.js +22 -23
- package/form/hook/useWatch.js +26 -27
- package/form/promisify.js +14 -18
- package/form/store.js +304 -316
- package/form/util.js +14 -15
- package/grid/Col.js +64 -64
- package/grid/Grid.js +51 -51
- package/grid/GridItem.js +48 -48
- package/grid/Row.js +39 -39
- package/hooks/useVerificationCode.js +41 -43
- package/hooks/useWatermark.js +89 -92
- package/icon/index.js +23 -24
- package/icon-hover/index.js +16 -16
- package/icons/file.js +11 -11
- package/image/Image.js +140 -141
- package/image/ImagePreview.js +252 -255
- package/image/ImagePreviewArrow.js +25 -25
- package/image/ImagePreviewGroup.js +62 -62
- package/image/util/getScale.js +25 -28
- package/index.js +684 -675
- package/input/Button.js +48 -50
- package/input/Group.js +9 -9
- package/input/Input.js +145 -154
- package/input/InputElement.js +108 -115
- package/input/Password.js +38 -38
- package/input/Search.js +51 -55
- package/input/Textarea.js +80 -81
- package/input/useComposition.js +23 -23
- package/input-number/decimal.js +59 -62
- package/input-number/index.js +139 -141
- package/input-tag/InputTag.js +222 -230
- package/layout/Content.js +6 -6
- package/layout/Footer.js +8 -8
- package/layout/Header.js +7 -7
- package/layout/Sider.js +88 -90
- package/layout/index.js +30 -30
- package/link/index.js +45 -46
- package/liquid-fill/LiquidFill.js +226 -0
- package/liquid-fill/LiquidFill2.js +3 -0
- package/liquid-fill/index.js +4 -0
- package/list/Item.js +28 -28
- package/list/Meta.js +12 -12
- package/list/index.js +146 -148
- package/mentions/index.js +75 -76
- package/menu/Item.js +58 -58
- package/menu/Menu.js +125 -127
- package/menu/OverflowWrap.js +39 -40
- package/menu/sub-menu/Inline.js +45 -45
- package/menu/util.js +26 -28
- package/message/index.js +96 -99
- package/message/useMessage.js +26 -27
- package/modal/Confirm.js +47 -49
- package/modal/Modal.js +250 -257
- package/modal/use-modal/Hook.js +26 -28
- package/modal/use-modal/index.js +46 -49
- package/notice/index.js +89 -90
- package/notification/index.js +60 -65
- package/notification/withNotification.js +35 -35
- package/overflow-ellipsis/OverflowItem.js +19 -20
- package/overflow-ellipsis/index.js +45 -46
- package/package.json +1 -1
- package/page-header/index.js +45 -45
- package/pagination/PageItem.js +87 -91
- package/pagination/PageJumper.js +40 -41
- package/pagination/PageOption.js +31 -35
- package/pagination/Pagination.js +162 -163
- package/picker/Input.js +90 -96
- package/picker/InputRange.js +115 -122
- package/popconfirm/index.js +98 -100
- package/popover/index.js +28 -28
- package/portal/Portal.js +10 -11
- package/progress/index.js +36 -36
- package/qr-code/index.js +99 -0
- package/qr-code/interface.js +1 -0
- package/radio/Group.js +48 -48
- package/radio/GroupBlock.js +32 -33
- package/radio/Radio.js +62 -64
- package/rate/index.js +88 -88
- package/resize-box/ResizeTrigger.js +39 -39
- package/resize-box/Split.js +92 -96
- package/resize-box/SplitGroup.js +116 -122
- package/resize-box/index.js +112 -115
- package/result/index.js +44 -44
- package/select/Option.js +53 -56
- package/select/Select.js +365 -381
- package/select/util.js +95 -99
- package/select-view/Core.js +159 -160
- package/skeleton/index.js +23 -23
- package/slider/Button.js +84 -92
- package/slider/Input.js +47 -49
- package/slider/Tick.js +28 -31
- package/slider/index.js +107 -107
- package/space/index.js +26 -26
- package/space-/index.js +51 -51
- package/spin/DotLoading.js +8 -8
- package/spin/index.js +47 -47
- package/statistic/Countdown.js +37 -37
- package/statistic/index.js +58 -58
- package/steps/Step.js +42 -42
- package/steps/index.js +54 -54
- package/style.css +1 -1
- package/switch/index.js +77 -78
- package/table/ColGroup.js +36 -37
- package/table/Table.js +447 -450
- package/table/hook/useExpand.js +24 -24
- package/table/hook/useRowSelection.js +62 -62
- package/table/summary/Row.js +16 -17
- package/table/tbody/Td.js +119 -118
- package/table/tbody/Tr.js +119 -121
- package/table/tbody/index.js +62 -63
- package/table/th-resizable/index.js +30 -30
- package/table/thead/Column.js +148 -148
- package/table/thead/index.js +87 -88
- package/tabs/Tab.js +55 -55
- package/tabs/TabContent.js +8 -8
- package/tabs/TabPane.js +15 -15
- package/tabs/hook/useHeaderScroll.js +36 -36
- package/tabs/tab-header/TabInk.js +31 -33
- package/tabs/tab-header/TabNavIcon.js +34 -35
- package/tabs/tab-header/index.js +192 -195
- package/tag/index.js +94 -97
- package/time-picker/Picker.js +167 -172
- package/time-picker/RangePicker.js +28 -28
- package/time-picker/TimePicker.js +146 -146
- package/timeline/Item.js +46 -46
- package/timeline/Timeline.js +52 -52
- package/tooltip/index.js +89 -95
- package/tour/index.js +289 -0
- package/transfer/Item.js +54 -54
- package/transfer/List.js +134 -136
- package/transfer/index.js +91 -91
- package/tree/Animation.js +49 -52
- package/tree/Node.js +114 -122
- package/tree/NodeList.js +51 -51
- package/tree/Tree.js +386 -393
- package/tree-select/List.js +71 -72
- package/tree-select/Select.js +135 -143
- package/tree-select/hook/useKeyCache.js +39 -39
- package/tree-select/hook/useStateValue.js +12 -12
- package/trigger/getPopupStyle.js +60 -61
- package/trigger/index.js +337 -346
- package/types/common/space/interface.d.ts +1 -1
- package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
- package/types/common/utils/findScrollParent.d.ts +2 -0
- package/types/common/utils/index.d.ts +5 -0
- package/types/common/utils/intersectionObserver.d.ts +2 -0
- package/types/common/utils/mutationObserver.d.ts +2 -0
- package/types/common/utils/resizeObserver.d.ts +2 -0
- package/types/pc/config-provider/interface.d.ts +6 -0
- package/types/pc/index.d.ts +3 -0
- package/types/pc/liquid-fill/LiquidFill.d.ts +115 -0
- package/types/pc/liquid-fill/LiquidFill2.d.ts +1 -0
- package/types/pc/liquid-fill/index.d.ts +2 -0
- package/types/pc/qr-code/index.d.ts +34 -0
- package/types/pc/qr-code/interface.d.ts +39 -0
- package/types/pc/table/interface.d.ts +2 -2
- package/types/pc/tour/index.d.ts +42 -0
- package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
- package/types/pc/utils/findScrollParent.d.ts +2 -0
- package/types/pc/utils/index.d.ts +5 -0
- package/types/pc/utils/intersectionObserver.d.ts +2 -0
- package/types/pc/utils/mutationObserver.d.ts +2 -0
- package/types/pc/utils/names.d.ts +18 -0
- package/types/pc/utils/resizeObserver.d.ts +2 -0
- package/typography/Base.js +79 -81
- package/typography/EditContent.js +30 -33
- package/typography/Ellipsis.js +77 -73
- package/typography/Operations.js +50 -52
- package/typography/Paragraph.js +7 -7
- package/typography/Typography.js +7 -7
- package/typography/useEllipsis.js +105 -106
- package/upload/TriggerNode.js +69 -76
- package/upload/Upload.js +84 -87
- package/upload/Uploader.js +115 -118
- package/upload/list/PictureItem.js +61 -71
- package/upload/list/TextItem.js +61 -67
- package/upload/list/UploadProgress.js +42 -49
- package/upload/list/index.js +48 -49
- package/upload/request_.js +37 -38
- package/upload/util.js +39 -39
- package/utils/convertToDurationBasedOnTimeUnits.js +6 -0
- package/utils/findScrollParent.js +4 -0
- package/utils/index.js +281 -278
- package/utils/intersectionObserver.js +4 -0
- package/utils/mutationObserver.js +4 -0
- package/utils/names.js +12 -0
- package/utils/resizeObserver.js +4 -0
- package/verification-code/VerificationCode.js +50 -51
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +243 -244
- package/virtual-list/util/item.js +3 -4
- package/watermark/Watermark.js +27 -31
- package/components/common/utils/resizeObserverEffect.js +0 -23
- package/types/common/utils/resizeObserverEffect.d.ts +0 -2
- package/types/pc/utils/resizeObserverEffect.d.ts +0 -2
- package/utils/resizeObserverEffect.js +0 -4
package/input/Button.js
CHANGED
|
@@ -1,69 +1,67 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import d from "lodash/isPlainObject";
|
|
3
|
+
import A, { useContext as B } from "react";
|
|
4
|
+
import M from "../button/index.js";
|
|
5
5
|
import "../config-provider/ConfigProvider.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
11
|
-
(e,
|
|
12
|
-
const { getPrefixCls:
|
|
13
|
-
className:
|
|
14
|
-
style:
|
|
15
|
-
placeholder:
|
|
16
|
-
disabled:
|
|
17
|
-
loading:
|
|
18
|
-
defaultValue:
|
|
19
|
-
addAfter:
|
|
6
|
+
import P from "../components/common/hooks/useMergeValue.js";
|
|
7
|
+
import s from "@unicom-cloud/utils/class-name";
|
|
8
|
+
import $, { formatValue as f } from "./Input.js";
|
|
9
|
+
import j from "../config-provider/context.js";
|
|
10
|
+
const z = A.forwardRef(
|
|
11
|
+
(e, c) => {
|
|
12
|
+
const { getPrefixCls: g } = B(j), {
|
|
13
|
+
className: h,
|
|
14
|
+
style: x,
|
|
15
|
+
placeholder: C,
|
|
16
|
+
disabled: o,
|
|
17
|
+
loading: I,
|
|
18
|
+
defaultValue: b,
|
|
19
|
+
addAfter: l,
|
|
20
20
|
buttonProps: a,
|
|
21
|
-
label:
|
|
22
|
-
onCallback:
|
|
23
|
-
...
|
|
24
|
-
} = e,
|
|
25
|
-
|
|
21
|
+
label: v,
|
|
22
|
+
onCallback: L,
|
|
23
|
+
...i
|
|
24
|
+
} = e, n = g?.("input-button"), m = l === void 0 ? /* @__PURE__ */ u(
|
|
25
|
+
M,
|
|
26
26
|
{
|
|
27
27
|
type: "primary",
|
|
28
|
-
disabled:
|
|
29
|
-
size:
|
|
28
|
+
disabled: o,
|
|
29
|
+
size: i.size,
|
|
30
30
|
loadingFixedWidth: !0,
|
|
31
31
|
...a,
|
|
32
|
-
className:
|
|
32
|
+
className: s(`${n}-btn`, a?.className),
|
|
33
33
|
onClick: (t) => {
|
|
34
|
-
|
|
35
|
-
i == null || i(B), (l = e.onClick) == null || l.call(e, t), (n = a == null ? void 0 : a.onClick) == null || n.call(a, t);
|
|
34
|
+
L?.(V), e.onClick?.(t), a?.onClick?.(t);
|
|
36
35
|
},
|
|
37
|
-
children:
|
|
36
|
+
children: v ?? "确定"
|
|
38
37
|
}
|
|
39
|
-
) :
|
|
40
|
-
defaultValue: "defaultValue" in e ?
|
|
41
|
-
value: "value" in e ?
|
|
38
|
+
) : l, N = d(e.maxLength) ? e.maxLength.length : e.maxLength, r = d(e.maxLength) && e.maxLength.errorOnly ? void 0 : N, [V, y] = P("", {
|
|
39
|
+
defaultValue: "defaultValue" in e ? f(e.defaultValue, r) : void 0,
|
|
40
|
+
value: "value" in e ? f(e.value, r) : void 0
|
|
42
41
|
});
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
|
|
42
|
+
return /* @__PURE__ */ u(
|
|
43
|
+
$,
|
|
45
44
|
{
|
|
46
|
-
...
|
|
47
|
-
className:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
...i,
|
|
46
|
+
className: s(
|
|
47
|
+
n,
|
|
48
|
+
m && `${n}-has-after`,
|
|
49
|
+
h
|
|
51
50
|
),
|
|
52
|
-
style:
|
|
53
|
-
ref:
|
|
54
|
-
defaultValue:
|
|
55
|
-
placeholder:
|
|
56
|
-
addAfter:
|
|
57
|
-
disabled:
|
|
58
|
-
onChange: (t,
|
|
59
|
-
|
|
60
|
-
M(t), (n = e.onChange) == null || n.call(e, t, l);
|
|
51
|
+
style: x,
|
|
52
|
+
ref: c,
|
|
53
|
+
defaultValue: b,
|
|
54
|
+
placeholder: C,
|
|
55
|
+
addAfter: m,
|
|
56
|
+
disabled: o,
|
|
57
|
+
onChange: (t, k) => {
|
|
58
|
+
y(t), e.onChange?.(t, k);
|
|
61
59
|
}
|
|
62
60
|
}
|
|
63
61
|
);
|
|
64
62
|
}
|
|
65
63
|
);
|
|
66
|
-
|
|
64
|
+
z.displayName = "Input.Button";
|
|
67
65
|
export {
|
|
68
|
-
|
|
66
|
+
z as default
|
|
69
67
|
};
|
package/input/Group.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import l, { useContext as f } from "react";
|
|
3
3
|
import "../config-provider/ConfigProvider.js";
|
|
4
4
|
import u from "@unicom-cloud/utils/class-name";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
const { getPrefixCls:
|
|
5
|
+
import x from "../config-provider/context.js";
|
|
6
|
+
const N = l.forwardRef((o, s) => {
|
|
7
|
+
const { getPrefixCls: r } = f(x), { className: e, style: a, children: m, compact: c, ...p } = o, t = r?.("input-group"), i = u(
|
|
8
8
|
t,
|
|
9
9
|
{
|
|
10
|
-
[`${t}-compact`]:
|
|
10
|
+
[`${t}-compact`]: c
|
|
11
11
|
},
|
|
12
|
-
|
|
12
|
+
e
|
|
13
13
|
);
|
|
14
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ n("div", { ref: s, className: i, style: a, ...p, children: m });
|
|
15
15
|
});
|
|
16
|
-
|
|
16
|
+
N.displayName = "InputGroup";
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
N as default
|
|
19
19
|
};
|
package/input/Input.js
CHANGED
|
@@ -1,212 +1,203 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as R, jsx as $ } from "react/jsx-runtime";
|
|
2
|
+
import nr from "lodash/isNil";
|
|
3
|
+
import B from "lodash/isPlainObject";
|
|
4
|
+
import sr from "lodash/isString";
|
|
5
|
+
import { forwardRef as ar, useContext as ir, useState as ur, useRef as A, useImperativeHandle as pr, useMemo as lr } from "react";
|
|
6
6
|
import "../config-provider/ConfigProvider.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { contains as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
const
|
|
7
|
+
import cr from "../components/common/hooks/useMergeProps.js";
|
|
8
|
+
import fr from "../components/common/hooks/useMergeValue.js";
|
|
9
|
+
import h from "@unicom-cloud/utils/class-name";
|
|
10
|
+
import { contains as O } from "../components/common/utils/dom.js";
|
|
11
|
+
import U from "./Button.js";
|
|
12
|
+
import mr from "./Group.js";
|
|
13
|
+
import dr from "./InputElement.js";
|
|
14
|
+
import q from "../input-number/index.js";
|
|
15
|
+
import gr from "./Password.js";
|
|
16
|
+
import hr from "./Search.js";
|
|
17
|
+
import J from "../input-tag/InputTag.js";
|
|
18
|
+
import wr from "./Textarea.js";
|
|
19
|
+
import $r from "../config-provider/context.js";
|
|
20
|
+
const xr = (o) => {
|
|
21
21
|
o.target.tagName === "INPUT" || o.preventDefault();
|
|
22
|
-
},
|
|
23
|
-
function
|
|
22
|
+
}, w = (o, i, a = {}, x) => i ? /* @__PURE__ */ $("span", { style: a, className: o, onClick: x, children: i }) : null;
|
|
23
|
+
function H(o, i) {
|
|
24
24
|
let a = o || "";
|
|
25
|
-
return
|
|
25
|
+
return sr(o) || nr(o) || (a = String(o)), i && (a = a.slice(0, i)), a;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function Ir(o, i) {
|
|
28
28
|
const {
|
|
29
29
|
getPrefixCls: a,
|
|
30
|
-
size:
|
|
31
|
-
componentConfig:
|
|
32
|
-
rtl:
|
|
33
|
-
} =
|
|
30
|
+
size: x,
|
|
31
|
+
componentConfig: K,
|
|
32
|
+
rtl: I
|
|
33
|
+
} = ir($r), e = cr(
|
|
34
34
|
o,
|
|
35
35
|
{},
|
|
36
|
-
|
|
36
|
+
K?.Input
|
|
37
37
|
), {
|
|
38
|
-
className:
|
|
39
|
-
style:
|
|
40
|
-
addBefore:
|
|
41
|
-
addAfter:
|
|
42
|
-
suffix:
|
|
43
|
-
prefix:
|
|
44
|
-
beforeStyle:
|
|
45
|
-
afterStyle:
|
|
46
|
-
height:
|
|
47
|
-
disabled:
|
|
48
|
-
maxLength:
|
|
49
|
-
showWordLimit:
|
|
50
|
-
allowClear:
|
|
51
|
-
autoWidth:
|
|
52
|
-
} = e,
|
|
38
|
+
className: F,
|
|
39
|
+
style: Q,
|
|
40
|
+
addBefore: V,
|
|
41
|
+
addAfter: D,
|
|
42
|
+
suffix: X,
|
|
43
|
+
prefix: N,
|
|
44
|
+
beforeStyle: Y,
|
|
45
|
+
afterStyle: Z,
|
|
46
|
+
height: z,
|
|
47
|
+
disabled: L,
|
|
48
|
+
maxLength: p,
|
|
49
|
+
showWordLimit: _,
|
|
50
|
+
allowClear: C,
|
|
51
|
+
autoWidth: W
|
|
52
|
+
} = e, l = W ? {
|
|
53
53
|
minWidth: 0,
|
|
54
54
|
maxWidth: "100%",
|
|
55
|
-
...
|
|
56
|
-
} : null,
|
|
57
|
-
minWidth:
|
|
58
|
-
maxWidth:
|
|
59
|
-
width:
|
|
60
|
-
...
|
|
61
|
-
},
|
|
62
|
-
defaultValue: "defaultValue" in e ?
|
|
63
|
-
value: "value" in e ?
|
|
55
|
+
...B(W) ? W : {}
|
|
56
|
+
} : null, b = {
|
|
57
|
+
minWidth: l?.minWidth,
|
|
58
|
+
maxWidth: l?.maxWidth,
|
|
59
|
+
width: l && "auto",
|
|
60
|
+
...Q
|
|
61
|
+
}, u = B(p) ? p.length : p, f = B(p) && p.errorOnly ? void 0 : u, [rr, j] = ur(!1), s = A(), v = A(), c = A(), [S, er] = fr("", {
|
|
62
|
+
defaultValue: "defaultValue" in e ? H(e.defaultValue, f) : void 0,
|
|
63
|
+
value: "value" in e ? H(e.value, f) : void 0
|
|
64
64
|
});
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
() => {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
getRootDOMNode: () => {
|
|
75
|
-
var U;
|
|
76
|
-
return T.current || ((U = i.current) == null ? void 0 : U.dom);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
},
|
|
65
|
+
pr(
|
|
66
|
+
i,
|
|
67
|
+
() => ({
|
|
68
|
+
focus: s.current?.focus,
|
|
69
|
+
blur: s.current?.blur,
|
|
70
|
+
dom: s.current?.dom,
|
|
71
|
+
// 保持之前逻辑
|
|
72
|
+
getRootDOMNode: () => v.current || s.current?.dom
|
|
73
|
+
}),
|
|
80
74
|
[]
|
|
81
75
|
);
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
h = /* @__PURE__ */ A(
|
|
76
|
+
const tr = (t, M) => {
|
|
77
|
+
"value" in e || er(t), e.onChange?.(t, M);
|
|
78
|
+
}, r = a?.("input"), m = e.size || x, y = "height" in e;
|
|
79
|
+
let d = X;
|
|
80
|
+
const g = S ? S.length : 0, k = lr(() => !f && u ? g > u : !1, [g, u, f]);
|
|
81
|
+
if (u && _) {
|
|
82
|
+
const [t, M] = I ? [u, g] : [g, u];
|
|
83
|
+
d = /* @__PURE__ */ R(
|
|
91
84
|
"span",
|
|
92
85
|
{
|
|
93
|
-
className:
|
|
94
|
-
[`${r}-word-limit-error`]:
|
|
86
|
+
className: h(`${r}-word-limit`, {
|
|
87
|
+
[`${r}-word-limit-error`]: k
|
|
95
88
|
}),
|
|
96
89
|
children: [
|
|
97
90
|
t,
|
|
98
91
|
"/",
|
|
99
|
-
|
|
92
|
+
M
|
|
100
93
|
]
|
|
101
94
|
}
|
|
102
95
|
);
|
|
103
96
|
}
|
|
104
|
-
const
|
|
97
|
+
const or = h(
|
|
105
98
|
`${r}-group-wrapper`,
|
|
106
|
-
`${r}-group-wrapper-${
|
|
99
|
+
`${r}-group-wrapper-${m}`,
|
|
107
100
|
{
|
|
108
|
-
[`${r}-custom-height`]:
|
|
109
|
-
[`${r}-has-suffix`]:
|
|
110
|
-
[`${r}-group-wrapper-disabled`]:
|
|
111
|
-
[`${r}-group-wrapper-rtl`]:
|
|
112
|
-
[`${r}-group-wrapper-autowidth`]:
|
|
101
|
+
[`${r}-custom-height`]: y,
|
|
102
|
+
[`${r}-has-suffix`]: d,
|
|
103
|
+
[`${r}-group-wrapper-disabled`]: L,
|
|
104
|
+
[`${r}-group-wrapper-rtl`]: I,
|
|
105
|
+
[`${r}-group-wrapper-autowidth`]: l
|
|
113
106
|
},
|
|
114
|
-
|
|
115
|
-
),
|
|
116
|
-
|
|
107
|
+
F
|
|
108
|
+
), P = e.status || (e.error || k ? "error" : void 0), E = V || D || d || N, T = /* @__PURE__ */ $(
|
|
109
|
+
dr,
|
|
117
110
|
{
|
|
118
|
-
ref:
|
|
111
|
+
ref: s,
|
|
119
112
|
...e,
|
|
120
|
-
autoFitWidth: !!
|
|
121
|
-
style:
|
|
122
|
-
status:
|
|
113
|
+
autoFitWidth: !!l,
|
|
114
|
+
style: b,
|
|
115
|
+
status: P,
|
|
123
116
|
onFocus: (t) => {
|
|
124
|
-
|
|
125
|
-
E(!0), (n = e.onFocus) == null || n.call(e, t);
|
|
117
|
+
j(!0), e.onFocus?.(t);
|
|
126
118
|
},
|
|
127
119
|
onBlur: (t) => {
|
|
128
|
-
|
|
129
|
-
E(!1), (n = e.onBlur) == null || n.call(e, t);
|
|
120
|
+
j(!1), e.onBlur?.(t);
|
|
130
121
|
},
|
|
131
|
-
onChange:
|
|
122
|
+
onChange: tr,
|
|
132
123
|
prefixCls: r,
|
|
133
|
-
value:
|
|
134
|
-
hasParent: !!
|
|
135
|
-
size:
|
|
124
|
+
value: S,
|
|
125
|
+
hasParent: !!E || C,
|
|
126
|
+
size: m
|
|
136
127
|
}
|
|
137
|
-
),
|
|
138
|
-
[`${r}-inner-wrapper-${
|
|
139
|
-
[`${r}-inner-wrapper-disabled`]:
|
|
140
|
-
[`${r}-inner-wrapper-focus`]:
|
|
141
|
-
[`${r}-inner-wrapper-has-prefix`]:
|
|
142
|
-
[`${r}-inner-wrapper-${
|
|
143
|
-
[`${r}-clear-wrapper`]:
|
|
144
|
-
[`${r}-inner-wrapper-rtl`]:
|
|
128
|
+
), G = h(`${r}-inner-wrapper`, {
|
|
129
|
+
[`${r}-inner-wrapper-${P}`]: P,
|
|
130
|
+
[`${r}-inner-wrapper-disabled`]: L,
|
|
131
|
+
[`${r}-inner-wrapper-focus`]: rr,
|
|
132
|
+
[`${r}-inner-wrapper-has-prefix`]: N,
|
|
133
|
+
[`${r}-inner-wrapper-${m}`]: m,
|
|
134
|
+
[`${r}-clear-wrapper`]: C,
|
|
135
|
+
[`${r}-inner-wrapper-rtl`]: I
|
|
145
136
|
});
|
|
146
|
-
return
|
|
137
|
+
return E ? /* @__PURE__ */ $(
|
|
147
138
|
"div",
|
|
148
139
|
{
|
|
149
|
-
ref:
|
|
150
|
-
className:
|
|
151
|
-
style: { ...
|
|
152
|
-
children: /* @__PURE__ */
|
|
153
|
-
|
|
154
|
-
/* @__PURE__ */
|
|
140
|
+
ref: v,
|
|
141
|
+
className: or,
|
|
142
|
+
style: { ...b, ...y ? { height: z } : {} },
|
|
143
|
+
children: /* @__PURE__ */ R("span", { className: `${r}-group`, children: [
|
|
144
|
+
w(`${r}-group-addbefore`, V, Y),
|
|
145
|
+
/* @__PURE__ */ R(
|
|
155
146
|
"span",
|
|
156
147
|
{
|
|
157
|
-
className:
|
|
158
|
-
ref:
|
|
148
|
+
className: G,
|
|
149
|
+
ref: c,
|
|
159
150
|
onMouseDown: (t) => {
|
|
160
|
-
t.target.tagName !== "INPUT" &&
|
|
151
|
+
t.target.tagName !== "INPUT" && c.current && O(c.current, t.target) && t.preventDefault();
|
|
161
152
|
},
|
|
162
153
|
onClick: (t) => {
|
|
163
|
-
|
|
154
|
+
c.current && O(c.current, t.target) && s.current && s.current.focus();
|
|
164
155
|
},
|
|
165
156
|
children: [
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
157
|
+
w(`${r}-group-prefix`, N),
|
|
158
|
+
T,
|
|
159
|
+
w(`${r}-group-suffix`, d)
|
|
169
160
|
]
|
|
170
161
|
}
|
|
171
162
|
),
|
|
172
|
-
|
|
163
|
+
w(`${r}-group-addafter`, D, Z)
|
|
173
164
|
] })
|
|
174
165
|
}
|
|
175
|
-
) :
|
|
166
|
+
) : C ? /* @__PURE__ */ $(
|
|
176
167
|
"span",
|
|
177
168
|
{
|
|
178
|
-
ref:
|
|
179
|
-
className:
|
|
180
|
-
style: { ...
|
|
181
|
-
onMouseDown:
|
|
169
|
+
ref: v,
|
|
170
|
+
className: h(F, G),
|
|
171
|
+
style: { ...b, ...y ? { height: z } : {} },
|
|
172
|
+
onMouseDown: xr,
|
|
182
173
|
onClick: () => {
|
|
183
|
-
|
|
174
|
+
s.current && s.current.focus();
|
|
184
175
|
},
|
|
185
|
-
children:
|
|
176
|
+
children: T
|
|
186
177
|
}
|
|
187
|
-
) :
|
|
178
|
+
) : T;
|
|
188
179
|
}
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
180
|
+
const Nr = ar(Ir), n = Nr;
|
|
181
|
+
n.displayName = "Input";
|
|
182
|
+
n.Search = hr;
|
|
183
|
+
n.Button = U;
|
|
184
|
+
n.InputButton = U;
|
|
185
|
+
n.TextArea = wr;
|
|
186
|
+
n.Password = gr;
|
|
187
|
+
n.Number = q;
|
|
188
|
+
n.InputNumber = q;
|
|
189
|
+
n.Tag = J;
|
|
190
|
+
n.InputTag = J;
|
|
191
|
+
n.Group = mr;
|
|
201
192
|
export {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
193
|
+
U as InputButton,
|
|
194
|
+
mr as InputGroup,
|
|
195
|
+
q as InputNumber,
|
|
196
|
+
gr as InputPassword,
|
|
197
|
+
hr as InputSearch,
|
|
198
|
+
J as InputTag,
|
|
199
|
+
wr as InputTextArea,
|
|
200
|
+
wr as TextArea,
|
|
201
|
+
n as default,
|
|
202
|
+
H as formatValue
|
|
212
203
|
};
|