@unicom-cloud/ui 0.8.66 → 0.8.67
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 +79 -79
- package/Alert.js +46 -46
- package/Anchor.js +1 -1
- package/AutoComplete.js +74 -74
- package/Avatar.js +36 -36
- package/BackTop.js +35 -35
- package/Badge.js +55 -55
- package/Breadcrumb.js +42 -42
- package/Button.js +24 -24
- package/Calendar.js +230 -230
- package/Card.js +18 -18
- package/Carousel.js +165 -165
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +26 -26
- package/Comment.js +18 -18
- package/ConfigProvider.js +2 -2
- package/Copy.js +28 -27
- package/DatePicker.js +872 -871
- package/Descriptions.js +34 -34
- package/Divider.js +19 -19
- package/Draggable.js +27 -26
- package/Drawer.js +1 -1
- package/Dropdown.js +110 -110
- package/Empty.js +3 -3
- package/Form.js +984 -945
- package/Grid.js +34 -34
- package/Icon.js +16 -16
- package/IconHover.js +2 -2
- package/Image.js +2 -2
- package/Input.js +7 -6
- package/InputNumber.js +6 -6
- package/InputTag.js +1 -1
- package/Layout.js +24 -24
- package/Link.js +30 -30
- package/List.js +95 -95
- package/Mentions.js +85 -84
- package/Menu.js +2 -2
- package/Message.js +7 -6
- package/Modal.js +1 -1
- package/Notice.js +14 -3
- package/Notification.js +9 -7
- package/OverflowEllipsis.js +64 -62
- package/PageHeader.js +73 -73
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +60 -60
- package/Popover.js +31 -31
- package/Portal.js +23 -31
- package/Progress.js +22 -22
- package/Radio.js +2 -2
- package/Rate.js +24 -24
- package/ResizeBox.js +274 -271
- package/Result.js +3 -3
- package/Select.js +4 -4
- package/SelectView.js +257 -238
- package/Skeleton.js +46 -46
- package/Slider.js +286 -283
- package/Space.js +28 -28
- package/SpeechSynthesis.js +62 -55
- package/Spin.js +23 -23
- package/Statistic.js +80 -80
- package/Steps.js +67 -67
- package/Switch.js +47 -47
- package/Table.js +1445 -1380
- package/Tabs.js +5 -5
- package/Tag.js +45 -45
- package/TimePicker.js +154 -154
- package/Timeline.js +2 -2
- package/Tooltip.js +80 -79
- package/Transfer.js +103 -102
- package/Tree.js +3 -2
- package/TreeSelect.js +2 -2
- package/Trigger.js +699 -772
- package/Typography.js +756 -6
- package/Upload.js +2 -2
- package/VerificationCode.js +1 -1
- package/Version.js +1 -1
- package/VirtualList.js +1 -1
- package/Watermark.js +1 -1
- package/chunk/{BHgJ5Y3T.js → -UuKKT0Z.js} +29 -29
- package/chunk/{B8QV6E2b.js → AwZqeapI.js} +5 -5
- package/chunk/B5gK1Idp.js +19 -0
- package/chunk/B7FlazNB.js +24 -0
- package/chunk/{DTBtQQ2H.js → BBvWDeuZ.js} +67 -67
- package/chunk/BCftTxEy.js +626 -0
- package/chunk/{CZOP_ZHJ.js → BGny4zSb.js} +60 -60
- package/chunk/BHF15Dog.js +98 -0
- package/chunk/BJQ5UNa-.js +1585 -0
- package/chunk/BP9sYyk9.js +8 -0
- package/chunk/BUdtVdnv.js +38 -0
- package/chunk/BVQlOzTS.js +11 -0
- package/chunk/B__a_gb_.js +519 -0
- package/chunk/BbEYToV1.js +10 -0
- package/chunk/BbdDQAnm.js +15 -0
- package/chunk/BdUcgWdu.js +11 -0
- package/chunk/BfbXSG70.js +26 -0
- package/chunk/BndfNLK4.js +186 -0
- package/chunk/BoMCZV6K.js +1098 -0
- package/chunk/Br0B6y1T.js +18 -0
- package/chunk/BrOW642m.js +130 -0
- package/chunk/BxUs8_Cr.js +9 -0
- package/chunk/{CcV4wQB1.js → C42LIMP9.js} +244 -242
- package/chunk/C4YkFMzC.js +778 -0
- package/chunk/{Bh23P4l7.js → C9Wcraj7.js} +21 -21
- package/chunk/{4-gvEY5y.js → CANgSlh3.js} +10 -10
- package/chunk/CJ_o9tZM.js +5 -0
- package/chunk/{DNAigumg.js → CK5m7rLl.js} +36 -36
- package/chunk/{CANaGbGR.js → CKNyIitu.js} +57 -56
- package/chunk/CLiqJm_T.js +10 -0
- package/chunk/{BnSVm1YC.js → CNmmhbCn.js} +32 -32
- package/chunk/{BFipyA67.js → CP0odX99.js} +51 -51
- package/chunk/CPT-OZH2.js +14 -0
- package/chunk/CVSF8p0O.js +698 -0
- package/chunk/C_agcwLN.js +31 -0
- package/chunk/{jhQQCFMn.js → C_gJWGGh.js} +201 -201
- package/chunk/{Bc7t9jkb.js → CaasmWg_.js} +11 -11
- package/chunk/Ce1j9KTi.js +6 -0
- package/chunk/{D_-UD4vO.js → Cf5QNhkG.js} +18 -18
- package/chunk/CkNSv2U7.js +56 -0
- package/chunk/Cp2f70gB.js +9 -0
- package/chunk/CpegYjdC.js +16 -0
- package/chunk/CucI3KZr.js +20 -0
- package/chunk/CwoFBTYz.js +11 -0
- package/chunk/D2KPqPhV.js +17 -0
- package/chunk/D7NyvE5f.js +17 -0
- package/chunk/D8oTPQ2H.js +384 -0
- package/chunk/{CLBavO5c.js → DC1iHEiy.js} +87 -87
- package/chunk/{DnvO8A0Z.js → DFrfrmfK.js} +120 -119
- package/chunk/DGTIZ_0O.js +6 -0
- package/chunk/DJfpiZn_.js +25 -0
- package/chunk/DKr2_PYd.js +34 -0
- package/chunk/DNUz6zgo.js +11 -0
- package/chunk/DRtM649q.js +11 -0
- package/chunk/DS_mUWn6.js +41 -0
- package/chunk/DU6bs_19.js +10 -0
- package/chunk/DWdbwz22.js +10 -0
- package/chunk/DcveZuqd.js +6 -0
- package/chunk/DdVFknul.js +24 -0
- package/chunk/DgRfikwe.js +16 -0
- package/chunk/{znkyQ-HR.js → DkyR2EfG.js} +66 -66
- package/chunk/{DUeHQKtx.js → DleQ5HwG.js} +42 -42
- package/chunk/DnrZEnQ_.js +27 -0
- package/chunk/DsRSHWtX.js +1025 -0
- package/chunk/Dz5BdmXo.js +270 -0
- package/chunk/EANe01DF.js +1030 -0
- package/chunk/{CwhPMMWy.js → Ey4YJCkX.js} +7 -7
- package/chunk/GoNx5R4F.js +873 -0
- package/chunk/HDUQku8d.js +20 -0
- package/chunk/HrAP__Hi.js +25 -0
- package/chunk/JPPo5nY_.js +9 -0
- package/chunk/{Du-bw6qA.js → SLWP34OR.js} +90 -85
- package/chunk/VVKtwaGf.js +278 -0
- package/chunk/WPNpLxSI.js +16 -0
- package/chunk/{CPvvjMwZ.js → WpO_DsK4.js} +49 -48
- package/chunk/fdU3ang6.js +14 -0
- package/chunk/{DQAot004.js → fkclKOAL.js} +298 -292
- package/chunk/flvYlqx3.js +22 -0
- package/chunk/kTDayEpF.js +288 -0
- package/chunk/{CssIjN1g.js → pZoNQ75H.js} +31 -31
- package/chunk/qFf1w_Jq.js +8 -0
- package/chunk/{CHnFKgbk.js → w-kM1L5W.js} +155 -155
- package/hooks/index.js +53 -49
- package/hooks/useComputedState.js +2 -10
- package/hooks/useCreate.js +2 -7
- package/hooks/useForceUpdate.js +2 -7
- package/hooks/useId.js +2 -10
- package/hooks/useInView.js +2 -30
- package/hooks/useIntersectionObserver.js +2 -23
- package/hooks/useInterval.js +2 -17
- package/hooks/useIsFirstRender.js +2 -9
- package/hooks/useIsomorphicLayoutEffect.js +2 -5
- package/hooks/useKeyboardEvent.js +2 -16
- package/hooks/useMedia.js +2 -15
- package/hooks/useMergeProps.js +2 -18
- package/hooks/useMergeValue.js +2 -19
- package/hooks/useOnlineStatus.js +4 -0
- package/hooks/useOverflowHidden.js +2 -25
- package/hooks/useOverrideRef.js +2 -13
- package/hooks/usePersistCallback.js +2 -13
- package/hooks/usePrefersColorSchemeDark.js +4 -0
- package/hooks/usePrevious.js +2 -9
- package/hooks/useRefs.js +2 -9
- package/hooks/useResizeObserver.js +2 -15
- package/hooks/useStateCallback.js +2 -15
- package/hooks/useStateWithPromise.js +2 -24
- package/hooks/useUpdateEffect.js +2 -9
- package/hooks/useVerificationCode.js +73 -0
- package/hooks/useWatch.js +2 -10
- package/hooks/{use-watermark.js → useWatermark.js} +27 -26
- package/hooks/useWindowSize.js +2 -20
- package/index.js +571 -584
- package/locale/en-US.js +4 -2
- package/locale/interface.js +1 -4
- package/locale/ja-JP.js +3 -1
- package/locale/tr-TR.js +1 -1
- package/locale/zh-CN.js +3 -1
- package/locale/zh-HK.js +3 -1
- package/locale/zh-TW.js +3 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/anchor/util.d.ts +1 -1
- package/types/button/index.d.ts +2 -2
- package/types/color-picker/hooks/useColorPicker.d.ts +2 -2
- package/types/form/Control-old.d.ts +56 -0
- package/types/form/Control.d.ts +6 -54
- package/types/form/FormItem.d.ts +1 -1
- package/types/form/store.d.ts +0 -1
- package/types/hooks/index.d.ts +2 -0
- package/types/hooks/useComputedState.d.ts +1 -4
- package/types/hooks/useCreate.d.ts +1 -2
- package/types/hooks/useForceUpdate.d.ts +1 -2
- package/types/hooks/useId.d.ts +1 -2
- package/types/hooks/useInView.d.ts +1 -11
- package/types/hooks/useIntersectionObserver.d.ts +1 -7
- package/types/hooks/useInterval.d.ts +1 -2
- package/types/hooks/useIsFirstRender.d.ts +1 -2
- package/types/hooks/useIsomorphicLayoutEffect.d.ts +1 -3
- package/types/hooks/useKeyboardEvent.d.ts +1 -8
- package/types/hooks/useMedia.d.ts +1 -2
- package/types/hooks/useMergeProps.d.ts +1 -5
- package/types/hooks/useMergeValue.d.ts +1 -6
- package/types/hooks/useOnlineStatus.d.ts +1 -0
- package/types/hooks/useOverflowHidden.d.ts +1 -5
- package/types/hooks/useOverrideRef.d.ts +1 -6
- package/types/hooks/usePersistCallback.d.ts +1 -2
- package/types/hooks/usePrefersColorSchemeDark.d.ts +1 -0
- package/types/hooks/usePrevious.d.ts +1 -3
- package/types/hooks/useRefs.d.ts +1 -2
- package/types/hooks/useResizeObserver.d.ts +1 -6
- package/types/hooks/useStateCallback.d.ts +1 -5
- package/types/hooks/useStateWithPromise.d.ts +1 -2
- package/types/hooks/useUpdateEffect.d.ts +1 -3
- package/types/hooks/useWatch.d.ts +1 -3
- package/types/hooks/useWindowSize.d.ts +1 -5
- package/types/image/interface.d.ts +1 -0
- package/types/index.d.ts +157 -86
- package/types/input/Input.d.ts +1 -1
- package/types/input/Textarea.d.ts +2 -2
- package/types/locale/en-US.d.ts +2 -0
- package/types/locale/interface.d.ts +1 -2
- package/types/locale/ja-JP.d.ts +2 -0
- package/types/locale/zh-CN.d.ts +2 -0
- package/types/locale/zh-HK.d.ts +2 -0
- package/types/locale/zh-TW.d.ts +2 -0
- package/types/menu/context.d.ts +1 -1
- package/types/message/index.d.ts +14 -14
- package/types/message/interface.d.ts +2 -0
- package/types/modal/config.d.ts +0 -1
- package/types/modal/interface.d.ts +0 -1
- package/types/notice/index.d.ts +2 -27
- package/types/notification/index.d.ts +15 -16
- package/types/notification/interface.d.ts +2 -0
- package/types/notification/withNotification.d.ts +2 -0
- package/types/select/util.d.ts +1 -2
- package/types/select-view/interface.d.ts +2 -1
- package/types/speech-synthesis/index.d.ts +1 -1
- package/types/table/constant.d.ts +2 -0
- package/types/table/hook/useThResizable.d.ts +7 -0
- package/types/table/index.d.ts +10 -1
- package/types/table/style/index.d.ts +1 -0
- package/types/table/th-resizable/index.d.ts +2 -0
- package/types/table/thead/Column.d.ts +1 -2
- package/types/tree/Tree.d.ts +12 -67
- package/types/tree-select/Select.d.ts +2 -2
- package/types/trigger/index.d.ts +2 -120
- package/types/trigger/interface.d.ts +2 -1
- package/types/utils/CSSTransition.d.ts +2 -3
- package/types/utils/caseName.d.ts +1 -1
- package/types/utils/className.d.ts +1 -1
- package/types/utils/constant.d.ts +2 -2
- package/types/utils/copy.d.ts +1 -1
- package/types/utils/dayjs.d.ts +1 -21
- package/types/utils/dom.d.ts +1 -6
- package/types/utils/fileToURL.d.ts +1 -1
- package/types/utils/fillNBSP.d.ts +1 -1
- package/types/utils/getHighlightText.d.ts +1 -5
- package/types/utils/getHotkeyHandler.d.ts +1 -8
- package/types/utils/getStringLength.d.ts +1 -1
- package/types/utils/include.d.ts +1 -1
- package/types/utils/index.d.ts +3 -4
- package/types/utils/is.d.ts +1 -16
- package/types/utils/keyboardCode.d.ts +3 -0
- package/types/utils/lodash.d.ts +1 -17
- package/types/utils/mergeProps.d.ts +1 -1
- package/types/utils/mergedToString.d.ts +1 -1
- package/types/utils/omit.d.ts +1 -1
- package/types/utils/pad.d.ts +1 -2
- package/types/utils/pick.d.ts +2 -4
- package/types/utils/reactDOM.d.ts +1 -7
- package/types/utils/resizeObserverEffect.d.ts +2 -0
- package/types/utils/saveAs.d.ts +1 -1
- package/types/utils/screenfull.d.ts +2 -0
- package/types/utils/scrollIntoView.d.ts +1 -2
- package/types/utils/style.d.ts +1 -3
- package/types/utils/throttleByRaf.d.ts +1 -5
- package/types/utils/throttleByRaf2.d.ts +1 -0
- package/types/utils/warning.d.ts +1 -2
- package/types/version/index.d.ts +1 -1
- package/utils/CSSTransition.js +2 -6
- package/utils/className.js +2 -2
- package/utils/constant.js +8 -9
- package/utils/contextHolder.js +1 -1
- package/utils/copy.js +1 -1
- package/utils/dayjs.js +14 -173
- package/utils/dom.js +33 -29
- package/utils/fillNBSP.js +2 -4
- package/utils/getHighlightText.js +2 -38
- package/utils/getHotkeyHandler.js +2 -25
- package/utils/getStringLength.js +2 -7
- package/utils/include.js +2 -7
- package/utils/index.js +237 -240
- package/utils/is.js +116 -156
- package/utils/keyboardCode.js +27 -0
- package/utils/mergeProps.js +2 -9
- package/utils/mergedToString.js +2 -13
- package/utils/omit.js +2 -9
- package/utils/pad.js +12 -12
- package/utils/pick.js +4 -15
- package/utils/reactDOM.js +3 -54
- package/utils/resizeObserverEffect.js +4 -0
- package/utils/saveAs.js +1 -1
- package/utils/screenfull.js +4 -0
- package/utils/scrollIntoView.js +2 -21
- package/utils/style.js +12 -11
- package/utils/throttleByRaf.js +13 -12
- package/utils/throttleByRaf2.js +5 -0
- package/utils/warning.js +5 -4
- package/NotificationBase.js +0 -53
- package/chunk/-zpSUpGE.js +0 -1501
- package/chunk/BAWsPQBM.js +0 -11
- package/chunk/BIT0j3HT.js +0 -269
- package/chunk/BbLKnaNO.js +0 -871
- package/chunk/Bfhv56O2.js +0 -638
- package/chunk/C2lIz2F9.js +0 -60
- package/chunk/C6QWSzsM.js +0 -376
- package/chunk/CVkHTbic.js +0 -995
- package/chunk/CeGEvXby.js +0 -278
- package/chunk/D3NFxdmG.js +0 -518
- package/chunk/DApXtulb.js +0 -1102
- package/chunk/DPByB1ab.js +0 -698
- package/chunk/DV1Ab_cG.js +0 -284
- package/chunk/dBnNCOIU.js +0 -778
- package/chunk/it8qlDZ3.js +0 -1032
- package/chunk/l0sNRNKZ.js +0 -1
- package/chunk/te_43YrB.js +0 -776
- package/hooks/use-verification-code.js +0 -73
- package/types/notification-base/index.d.ts +0 -15
- package/types/notification-base/style/index.d.ts +0 -2
- package/types/trigger/Portal.d.ts +0 -7
- package/types/utils/keyCode.d.ts +0 -45
- package/types/utils/raf.d.ts +0 -3
- package/types/utils/throttleByRafV2.d.ts +0 -5
- package/utils/keyCode.js +0 -12
- package/utils/raf.js +0 -19
- package/utils/throttleByRafV2.js +0 -16
package/chunk/C6QWSzsM.js
DELETED
|
@@ -1,376 +0,0 @@
|
|
|
1
|
-
import { jsx as i, jsxs as A, Fragment as Ue } from "react/jsx-runtime";
|
|
2
|
-
import Ge from "@unicom-cloud/icons/IconUiClose";
|
|
3
|
-
import { P as Ie, _ as Ke } from "./CLBavO5c.js";
|
|
4
|
-
import $e from "lodash/isArray";
|
|
5
|
-
import Ce, { useContext as qe, useRef as $, useState as Xe, useImperativeHandle as Ye, useMemo as Je, useEffect as Qe } from "react";
|
|
6
|
-
import { d as Ze, I as et } from "./-zpSUpGE.js";
|
|
7
|
-
import tt from "../Draggable.js";
|
|
8
|
-
import { useMergeProps as ot } from "../hooks/useMergeProps.js";
|
|
9
|
-
import { useMergeValue as be } from "../hooks/useMergeValue.js";
|
|
10
|
-
import { I as at } from "./BIT0j3HT.js";
|
|
11
|
-
import rt from "../OverflowEllipsis.js";
|
|
12
|
-
import nt from "../Popover.js";
|
|
13
|
-
import st from "../Tag.js";
|
|
14
|
-
import { y as M } from "./BAWsPQBM.js";
|
|
15
|
-
import lt from "../utils/fillNBSP.js";
|
|
16
|
-
import ct from "../utils/getHotkeyHandler.js";
|
|
17
|
-
import "../utils/is.js";
|
|
18
|
-
import { B as it } from "./C2lIz2F9.js";
|
|
19
|
-
import ut from "../utils/omit.js";
|
|
20
|
-
import Pe from "lodash/isPlainObject.js";
|
|
21
|
-
const X = 300, pt = "responsive", ft = `__input_${Math.random().toFixed(10).slice(2)}`, T = (s) => s == null, _ = (s) => {
|
|
22
|
-
s.target.tagName !== "INPUT" && s.preventDefault();
|
|
23
|
-
}, Ne = (s) => $e(s) ? s.map((c) => Pe(c) ? {
|
|
24
|
-
...c,
|
|
25
|
-
label: "label" in c ? c.label : c.value,
|
|
26
|
-
value: c.value,
|
|
27
|
-
closable: c.closable
|
|
28
|
-
} : {
|
|
29
|
-
label: c,
|
|
30
|
-
value: c
|
|
31
|
-
}) : [], dt = (s) => {
|
|
32
|
-
const c = $(0), d = $(s.length);
|
|
33
|
-
return Qe(() => {
|
|
34
|
-
c.current = s.length === 0 && d.current > 0 ? X : 0, d.current = s.length;
|
|
35
|
-
}, [s]), c;
|
|
36
|
-
}, Te = ({
|
|
37
|
-
prefixCls: s,
|
|
38
|
-
children: c,
|
|
39
|
-
animation: d
|
|
40
|
-
}) => /* @__PURE__ */ i("div", { className: `${s}-inner`, children: d ? /* @__PURE__ */ i(Ke, { component: null, children: c }) : c }), mt = {
|
|
41
|
-
animation: !0,
|
|
42
|
-
validate: (s, c) => s && c.every((d) => d.value !== s)
|
|
43
|
-
};
|
|
44
|
-
function gt(s, c) {
|
|
45
|
-
const {
|
|
46
|
-
getPrefixCls: d,
|
|
47
|
-
size: Ve,
|
|
48
|
-
componentConfig: E,
|
|
49
|
-
rtl: Y
|
|
50
|
-
} = qe(Ze), f = ot(
|
|
51
|
-
s,
|
|
52
|
-
mt,
|
|
53
|
-
E == null ? void 0 : E.InputTag
|
|
54
|
-
), {
|
|
55
|
-
className: we,
|
|
56
|
-
style: Se,
|
|
57
|
-
placeholder: De,
|
|
58
|
-
error: Re,
|
|
59
|
-
disabled: h,
|
|
60
|
-
readOnly: g,
|
|
61
|
-
allowClear: Ae,
|
|
62
|
-
autoFocus: Me,
|
|
63
|
-
labelInValue: _e,
|
|
64
|
-
disableInput: Ee,
|
|
65
|
-
animation: J,
|
|
66
|
-
saveOnBlur: ke,
|
|
67
|
-
dragToSort: ze,
|
|
68
|
-
icon: y,
|
|
69
|
-
prefix: Q,
|
|
70
|
-
suffix: Z,
|
|
71
|
-
addBefore: ee,
|
|
72
|
-
addAfter: te,
|
|
73
|
-
tokenSeparators: k,
|
|
74
|
-
validate: C,
|
|
75
|
-
renderTag: oe,
|
|
76
|
-
tagClassName: ae,
|
|
77
|
-
maxTagCount: m,
|
|
78
|
-
onInputChange: z,
|
|
79
|
-
onKeyDown: x,
|
|
80
|
-
onPaste: O,
|
|
81
|
-
onChange: F,
|
|
82
|
-
onFocus: j,
|
|
83
|
-
onBlur: H,
|
|
84
|
-
onPressEnter: W,
|
|
85
|
-
onRemove: B,
|
|
86
|
-
onClear: L,
|
|
87
|
-
onClick: re,
|
|
88
|
-
...xe
|
|
89
|
-
} = f, o = d("input-tag"), P = "size" in f ? f.size : Ve, V = typeof m == "object" ? m.count : m, I = $(), U = $(null), G = $(), [w, ne] = Xe(!1), [a, Oe] = be([], {
|
|
90
|
-
defaultValue: "defaultValue" in f ? Ne(f.defaultValue) : void 0,
|
|
91
|
-
value: "value" in f ? Ne(f.value) : void 0
|
|
92
|
-
}), [b, S] = be("", {
|
|
93
|
-
value: f.inputValue
|
|
94
|
-
}), Fe = dt(a), je = !!(ze && !g && !h);
|
|
95
|
-
Ye(c, () => {
|
|
96
|
-
var e, t;
|
|
97
|
-
return {
|
|
98
|
-
blur: (e = I.current) == null ? void 0 : e.blur,
|
|
99
|
-
focus: (t = I.current) == null ? void 0 : t.focus,
|
|
100
|
-
getRootDOMNode: () => G.current
|
|
101
|
-
};
|
|
102
|
-
}, []);
|
|
103
|
-
const N = (e, t) => {
|
|
104
|
-
h || g || ("value" in f || Oe(e), F == null || F(_e ? e : e.map((r) => r == null ? void 0 : r.value), t));
|
|
105
|
-
}, se = (e, t, r) => {
|
|
106
|
-
B == null || B(e, t, r), N(
|
|
107
|
-
[...a.slice(0, t), ...a.slice(t + 1)],
|
|
108
|
-
"remove"
|
|
109
|
-
);
|
|
110
|
-
}, He = ct(
|
|
111
|
-
/* @__PURE__ */ new Map([
|
|
112
|
-
[
|
|
113
|
-
it.key,
|
|
114
|
-
(e) => {
|
|
115
|
-
if (!e.target.value && a.length)
|
|
116
|
-
for (let t = a.length - 1; t >= 0; t--) {
|
|
117
|
-
const r = a[t];
|
|
118
|
-
if (r.closable !== !1) {
|
|
119
|
-
se(r, t, e);
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
]
|
|
125
|
-
])
|
|
126
|
-
), le = async () => {
|
|
127
|
-
try {
|
|
128
|
-
const e = typeof C == "function" ? await C(b, a) : !0;
|
|
129
|
-
e && (N(
|
|
130
|
-
a.concat({
|
|
131
|
-
value: e === !0 ? b : e,
|
|
132
|
-
label: b
|
|
133
|
-
}),
|
|
134
|
-
"add"
|
|
135
|
-
), S(""));
|
|
136
|
-
} catch (e) {
|
|
137
|
-
console.error(e);
|
|
138
|
-
}
|
|
139
|
-
}, ce = (e, t, r = !1) => {
|
|
140
|
-
const n = e.value;
|
|
141
|
-
let l = e.label, u = !g && !h && e.closable !== !1;
|
|
142
|
-
const p = typeof n == "object" ? t : n, v = (Le) => {
|
|
143
|
-
se(e, t, Le);
|
|
144
|
-
};
|
|
145
|
-
if (!r && typeof V == "number" && t >= V)
|
|
146
|
-
return t === a.length - 1 ? (l = ie(a.length - Number(V)), u = !1, { valueKey: p, dom: l }) : { valueKey: p, dom: null };
|
|
147
|
-
if (oe)
|
|
148
|
-
return {
|
|
149
|
-
valueKey: p,
|
|
150
|
-
dom: oe(
|
|
151
|
-
{
|
|
152
|
-
value: n,
|
|
153
|
-
label: l,
|
|
154
|
-
closable: u,
|
|
155
|
-
onClose: v
|
|
156
|
-
},
|
|
157
|
-
t,
|
|
158
|
-
a
|
|
159
|
-
)
|
|
160
|
-
};
|
|
161
|
-
const Be = {
|
|
162
|
-
closable: u,
|
|
163
|
-
onClose: v,
|
|
164
|
-
visible: !0,
|
|
165
|
-
children: lt(l),
|
|
166
|
-
closeIcon: y == null ? void 0 : y.removeIcon,
|
|
167
|
-
__closeIconProps: {
|
|
168
|
-
onMouseDown: _
|
|
169
|
-
},
|
|
170
|
-
className: M(`${o}-tag`, {
|
|
171
|
-
[ae]: ae
|
|
172
|
-
}),
|
|
173
|
-
title: typeof l == "string" ? l : void 0
|
|
174
|
-
};
|
|
175
|
-
return { valueKey: p, dom: /* @__PURE__ */ i(st, { ...Be }, `${p}-tag`) };
|
|
176
|
-
};
|
|
177
|
-
function ie(e) {
|
|
178
|
-
const t = typeof m == "object" && m.render ? m.render : () => /* @__PURE__ */ A("span", { className: `${o}-tag-ellipsis`, children: [
|
|
179
|
-
"+",
|
|
180
|
-
e
|
|
181
|
-
] }), r = Pe(m) && m.popoverProps;
|
|
182
|
-
return /* @__PURE__ */ i(
|
|
183
|
-
nt,
|
|
184
|
-
{
|
|
185
|
-
content: /* @__PURE__ */ i(Ue, { children: a.map((n, l) => ({ tagValue: n, tagIndex: l })).slice(-e).map(
|
|
186
|
-
({ tagValue: n, tagIndex: l }) => {
|
|
187
|
-
var u;
|
|
188
|
-
return (u = ce(n, l, !0)) == null ? void 0 : u.dom;
|
|
189
|
-
}
|
|
190
|
-
) }),
|
|
191
|
-
...r || {},
|
|
192
|
-
children: t(e, a)
|
|
193
|
-
}
|
|
194
|
-
);
|
|
195
|
-
}
|
|
196
|
-
const ue = async (e) => {
|
|
197
|
-
if (U.current = null, $e(k) && k.length) {
|
|
198
|
-
const t = e.split(
|
|
199
|
-
new RegExp(`[${k.join("")}]`)
|
|
200
|
-
);
|
|
201
|
-
if (t.length > 1) {
|
|
202
|
-
U.current = Date.now();
|
|
203
|
-
const r = [];
|
|
204
|
-
await Promise.all(
|
|
205
|
-
t.map(async (n) => {
|
|
206
|
-
const l = n ? typeof C == "function" ? await C(n, a) : !0 : !1;
|
|
207
|
-
l && r.push({
|
|
208
|
-
value: l === !0 ? n : l,
|
|
209
|
-
label: n
|
|
210
|
-
});
|
|
211
|
-
})
|
|
212
|
-
), r.length && N(a.concat(r), "add");
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}, pe = Ae && !h && !g && a.length ? /* @__PURE__ */ i(
|
|
216
|
-
et,
|
|
217
|
-
{
|
|
218
|
-
size: P,
|
|
219
|
-
className: `${o}-clear-icon`,
|
|
220
|
-
onClick: (e) => {
|
|
221
|
-
var t;
|
|
222
|
-
e.stopPropagation(), N([], "clear"), w || (t = I.current) == null || t.focus(), L == null || L();
|
|
223
|
-
},
|
|
224
|
-
children: y && y.clearIcon || /* @__PURE__ */ i(Ge, {})
|
|
225
|
-
},
|
|
226
|
-
"clearIcon"
|
|
227
|
-
) : null, fe = h || Ee, K = Je(() => {
|
|
228
|
-
const e = {};
|
|
229
|
-
return a.map((r, n) => {
|
|
230
|
-
const l = e[r.value] || 0, u = l >= 1;
|
|
231
|
-
e[r.value] = l + 1;
|
|
232
|
-
const { dom: p, valueKey: v } = ce(r, n);
|
|
233
|
-
return Ce.isValidElement(p) ? /* @__PURE__ */ i(
|
|
234
|
-
Ie,
|
|
235
|
-
{
|
|
236
|
-
timeout: X,
|
|
237
|
-
classNames: "zoomIn",
|
|
238
|
-
children: p
|
|
239
|
-
},
|
|
240
|
-
u ? `${v}-${n}` : v
|
|
241
|
-
) : p;
|
|
242
|
-
});
|
|
243
|
-
}, [a]), q = [
|
|
244
|
-
/* @__PURE__ */ i(
|
|
245
|
-
Ie,
|
|
246
|
-
{
|
|
247
|
-
timeout: X,
|
|
248
|
-
classNames: "zoomIn",
|
|
249
|
-
children: /* @__PURE__ */ i(
|
|
250
|
-
at,
|
|
251
|
-
{
|
|
252
|
-
autoComplete: "off",
|
|
253
|
-
size: P,
|
|
254
|
-
disabled: fe,
|
|
255
|
-
readOnly: g,
|
|
256
|
-
ref: I,
|
|
257
|
-
autoFocus: Me,
|
|
258
|
-
placeholder: a.length ? "" : De,
|
|
259
|
-
prefixCls: `${o}-input`,
|
|
260
|
-
autoFitWidth: {
|
|
261
|
-
delay: () => Fe.current,
|
|
262
|
-
pure: !0
|
|
263
|
-
},
|
|
264
|
-
onPressEnter: async (e) => {
|
|
265
|
-
b && e.preventDefault(), W == null || W(e), await le();
|
|
266
|
-
},
|
|
267
|
-
onFocus: (e) => {
|
|
268
|
-
!fe && !g && (ne(!0), j == null || j(e));
|
|
269
|
-
},
|
|
270
|
-
onBlur: async (e) => {
|
|
271
|
-
ne(!1), H == null || H(e), ke && await le(), S("");
|
|
272
|
-
},
|
|
273
|
-
value: b,
|
|
274
|
-
onChange: (e, t) => {
|
|
275
|
-
z == null || z(e, t), t.nativeEvent.inputType !== "insertFromPaste" && ue(e), U.current ? S("") : S(e);
|
|
276
|
-
},
|
|
277
|
-
onKeyDown: (e) => {
|
|
278
|
-
He(e), x == null || x(e);
|
|
279
|
-
},
|
|
280
|
-
onPaste: (e) => {
|
|
281
|
-
O == null || O(e), ue(e.clipboardData.getData("text"));
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
)
|
|
285
|
-
},
|
|
286
|
-
ft
|
|
287
|
-
)
|
|
288
|
-
], We = !T(Q), de = !T(Z) || !T(pe), me = !T(ee), ge = !T(te), D = me || ge, ve = f.status || (Re ? "error" : void 0), he = M(o, {
|
|
289
|
-
[`${o}-size-${P}`]: P,
|
|
290
|
-
[`${o}-disabled`]: h,
|
|
291
|
-
[`${o}-${ve}`]: ve,
|
|
292
|
-
[`${o}-focus`]: w,
|
|
293
|
-
[`${o}-readonly`]: g,
|
|
294
|
-
[`${o}-has-suffix`]: de,
|
|
295
|
-
[`${o}-has-placeholder`]: !a.length,
|
|
296
|
-
[`${o}-rtl`]: Y
|
|
297
|
-
}), R = { style: Se, className: we }, ye = /* @__PURE__ */ i(
|
|
298
|
-
"div",
|
|
299
|
-
{
|
|
300
|
-
...ut(xe, ["status", "size", "defaultValue", "value", "inputValue"]),
|
|
301
|
-
...D ? {} : R,
|
|
302
|
-
className: D ? he : M(he, R.className),
|
|
303
|
-
onMouseDown: (e) => {
|
|
304
|
-
w && _(e);
|
|
305
|
-
},
|
|
306
|
-
onClick: (e) => {
|
|
307
|
-
var t;
|
|
308
|
-
!w && ((t = I.current) == null || t.focus()), re && re(e);
|
|
309
|
-
},
|
|
310
|
-
ref: D ? void 0 : G,
|
|
311
|
-
children: /* @__PURE__ */ A("div", { className: `${o}-view`, children: [
|
|
312
|
-
We && /* @__PURE__ */ i("div", { className: `${o}-prefix`, onMouseDown: _, children: Q }),
|
|
313
|
-
je ? /* @__PURE__ */ i(
|
|
314
|
-
Te,
|
|
315
|
-
{
|
|
316
|
-
prefixCls: o,
|
|
317
|
-
animation: J,
|
|
318
|
-
children: /* @__PURE__ */ i(
|
|
319
|
-
tt,
|
|
320
|
-
{
|
|
321
|
-
itemWrapperStyle: { display: "inline-block" },
|
|
322
|
-
direction: "horizontal",
|
|
323
|
-
onIndexChange: (e, t) => {
|
|
324
|
-
N(function(n, l, u) {
|
|
325
|
-
n = n.slice();
|
|
326
|
-
const p = l > u, [v] = n.splice(l, 1);
|
|
327
|
-
return n.splice(p ? u : u - 1, 0, v), n;
|
|
328
|
-
}(a, t, e), "sort");
|
|
329
|
-
},
|
|
330
|
-
children: K.concat(q)
|
|
331
|
-
}
|
|
332
|
-
)
|
|
333
|
-
},
|
|
334
|
-
"transitionGroupWithDrag"
|
|
335
|
-
) : /* @__PURE__ */ i(Te, { prefixCls: o, animation: J, children: V === pt ? /* @__PURE__ */ i(
|
|
336
|
-
rt,
|
|
337
|
-
{
|
|
338
|
-
items: K,
|
|
339
|
-
suffixItems: q,
|
|
340
|
-
ellipsisNode: ({ ellipsisCount: e }) => ie(e)
|
|
341
|
-
}
|
|
342
|
-
) : K.concat(q) }),
|
|
343
|
-
de && /* @__PURE__ */ A("div", { className: `${o}-suffix`, onMouseDown: _, children: [
|
|
344
|
-
pe,
|
|
345
|
-
Z
|
|
346
|
-
] })
|
|
347
|
-
] })
|
|
348
|
-
}
|
|
349
|
-
);
|
|
350
|
-
return D ? /* @__PURE__ */ A(
|
|
351
|
-
"div",
|
|
352
|
-
{
|
|
353
|
-
...R,
|
|
354
|
-
className: M(
|
|
355
|
-
`${o}-wrapper`,
|
|
356
|
-
{
|
|
357
|
-
[`${o}-wrapper-rtl`]: Y
|
|
358
|
-
},
|
|
359
|
-
R.className
|
|
360
|
-
),
|
|
361
|
-
ref: G,
|
|
362
|
-
children: [
|
|
363
|
-
me && /* @__PURE__ */ i("div", { className: `${o}-addbefore`, children: ee }),
|
|
364
|
-
ye,
|
|
365
|
-
ge && /* @__PURE__ */ i("div", { className: `${o}-addafter`, children: te })
|
|
366
|
-
]
|
|
367
|
-
}
|
|
368
|
-
) : ye;
|
|
369
|
-
}
|
|
370
|
-
const vt = Ce.forwardRef(
|
|
371
|
-
gt
|
|
372
|
-
);
|
|
373
|
-
vt.displayName = "InputTag";
|
|
374
|
-
export {
|
|
375
|
-
vt as I
|
|
376
|
-
};
|