@unicom-cloud/ui 0.8.54 → 0.8.56
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 +36 -36
- package/Alert.js +41 -45
- package/Anchor.js +1 -1
- package/AutoComplete.js +40 -40
- package/Avatar.js +36 -36
- package/BackTop.js +26 -26
- package/Badge.js +43 -43
- package/Breadcrumb.js +17 -17
- package/Button.js +42 -42
- package/Calendar.js +54 -56
- package/Card.js +28 -28
- package/Carousel.js +42 -43
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +11 -580
- package/Comment.js +14 -14
- package/ConfigProvider.js +2 -2
- package/Copy.js +26 -26
- package/DatePicker.js +661 -670
- package/Descriptions.js +53 -53
- package/Divider.js +15 -15
- package/Draggable.js +16 -16
- package/Drawer.js +1 -1
- package/Dropdown.js +10 -10
- package/Empty.js +3 -3
- package/Form.js +10 -1410
- package/Grid.js +49 -49
- package/Icon.js +10 -10
- package/IconHover.js +2 -2
- package/Image.js +1 -1
- package/Input.js +1 -1
- package/InputNumber.js +7 -7
- package/InputTag.js +1 -1
- package/Layout.js +34 -34
- package/Link.js +26 -26
- package/List.js +39 -39
- package/Mentions.js +17 -17
- package/Menu.js +1 -1
- package/Message.js +3 -3
- package/Modal.js +1 -1
- package/Notice.js +4 -10
- package/Notification.js +3 -3
- package/OverflowEllipsis.js +18 -18
- package/PageHeader.js +26 -27
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +15 -15
- package/Popover.js +22 -22
- package/Progress.js +18 -18
- package/Radio.js +2 -2
- package/Rate.js +40 -43
- package/ResizeBox.js +191 -192
- package/Result.js +17 -17
- package/Select.js +1 -1
- package/SelectView.js +56 -56
- package/Skeleton.js +35 -35
- package/Slider.js +81 -81
- package/Space.js +27 -27
- package/SpeechSynthesis.js +29 -32
- package/Spin.js +15 -15
- package/Statistic.js +54 -54
- package/Steps.js +44 -44
- package/Switch.js +39 -38
- package/Table.js +488 -488
- package/Tabs.js +1 -1
- package/Tag.js +13 -14
- package/TimePicker.js +68 -68
- package/Timeline.js +1 -1
- package/Tooltip.js +27 -28
- package/Transfer.js +29 -30
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +53 -52
- package/Typography.js +2 -737
- package/Upload.js +1 -1
- package/VerificationCode.js +1 -1
- package/Version.js +1 -1
- package/Watermark.js +1 -1
- package/chunk/1mEO29GP.js +23 -0
- package/chunk/5pZ3ayqs.js +29 -0
- package/chunk/9Gh1afjL.js +23 -0
- package/chunk/B1S1OEw6.js +29 -0
- package/chunk/{RRWbBHK-.js → B2Bp3i5u.js} +221 -221
- package/chunk/B45v5S9k.js +209 -0
- package/chunk/B6fn5y_s.js +23 -0
- package/chunk/B9PsJar0.js +118 -0
- package/chunk/BA02BFUV.js +41 -0
- package/chunk/BCk8e9fj.js +29 -0
- package/chunk/BHK9zpXn.js +207 -0
- package/chunk/BHLTzWzi.js +29 -0
- package/chunk/BK1FKNAX.js +41 -0
- package/chunk/BM6dpkeM.js +32 -0
- package/chunk/{DQ3uFRJD.js → BP7xX86Q.js} +223 -202
- package/chunk/BWx1cVT_.js +66 -0
- package/chunk/BbI3gqVr.js +23 -0
- package/chunk/{CIc4yo9k.js → BbYzi8M0.js} +46 -46
- package/chunk/Be7oeWU8.js +34 -0
- package/chunk/BeM2hfks.js +88 -0
- package/chunk/BkHxm4sv.js +41 -0
- package/chunk/{BUQBof6z.js → Bl-ODC57.js} +206 -207
- package/chunk/BlKc_pDZ.js +678 -0
- package/chunk/{BzqZZHGK.js → Bny52uiG.js} +48 -48
- package/chunk/{PuuHmqnW.js → BpwDupra.js} +238 -238
- package/chunk/BqxwlITu.js +52 -0
- package/chunk/BuEC_zcc.js +278 -0
- package/chunk/{CqcZfQQ4.js → Bv8ZRDFt.js} +80 -80
- package/chunk/{DZGcv_9A.js → C-w9pFY-.js} +32 -32
- package/chunk/C2fspJbE.js +23 -0
- package/chunk/C7Okdv4u.js +34 -0
- package/chunk/C95ipQ6b.js +41 -0
- package/chunk/{BzMYgxgO.js → CF3Telny.js} +26 -26
- package/chunk/CPl52AZh.js +206 -0
- package/chunk/CXNW5Y2a.js +23 -0
- package/chunk/Cb_oWoGj.js +40 -0
- package/chunk/CcX2pBUh.js +46 -0
- package/chunk/{BdJcAQ0Q.js → CggcswbO.js} +18 -18
- package/chunk/CilQ012k.js +1796 -0
- package/chunk/CkAOsst1.js +73 -0
- package/chunk/CnY8SvgY.js +126 -0
- package/chunk/{CTSIr-Pr.js → CwXmtKib.js} +89 -101
- package/chunk/{C3I_L73_.js → CwjaGytU.js} +39 -40
- package/chunk/{DTgc2wl4.js → D6RTBH4C.js} +36 -36
- package/chunk/D6mVoX-C.js +116 -0
- package/chunk/D9TqtOhq.js +40 -0
- package/chunk/{qSJXQ1qu.js → DBJ8d0o0.js} +183 -189
- package/chunk/{RL1SNlng.js → DDda6s72.js} +16 -16
- package/chunk/{BH5fVprw.js → DJmWXheU.js} +9 -9
- package/chunk/DPvnQJ-H.js +52 -0
- package/chunk/DQXq1QT0.js +58 -0
- package/chunk/DRJO1GfY.js +855 -0
- package/chunk/DUxWiN2U.js +1465 -0
- package/chunk/DYZzQ2uT.js +29 -0
- package/chunk/{CK0H_Yi4.js → DafaH1Qt.js} +140 -138
- package/chunk/{ShWkfsJd.js → DalIRWr7.js} +21 -21
- package/chunk/{CzTYWtfa.js → Dg2DmtzA.js} +31 -30
- package/chunk/DhLbnw3R.js +29 -0
- package/chunk/{BmtF7P8U.js → DkIjpuBZ.js} +170 -170
- package/chunk/Do1aMgY3.js +12 -0
- package/chunk/Dtnux4qL.js +38 -0
- package/chunk/{Niaq_og8.js → Dw4SJ4o1.js} +219 -225
- package/chunk/{DbtCtriE.js → DxNRWF67.js} +30 -31
- package/chunk/JnyGFb5j.js +284 -0
- package/chunk/Lk60-jkf.js +1098 -0
- package/chunk/V_IcWDFx.js +49 -0
- package/chunk/{DG7VgAhL.js → WkB0MERB.js} +107 -108
- package/chunk/bsawGxt8.js +32 -0
- package/chunk/cUuQh7L_.js +46 -0
- package/chunk/fqgc8r6C.js +29 -0
- package/chunk/m_kOQCiU.js +29 -0
- package/chunk/sl8s35SK.js +29 -0
- package/chunk/{Dki1RB5p.js → t51ig1FZ.js} +154 -155
- package/chunk/{BC0PujUD.js → yvbAFxtk.js} +119 -121
- package/hooks/index.js +52 -246
- package/hooks/useForceUpdate.js +6 -6
- package/hooks/useIntersectionObserver.js +12 -10
- package/hooks/useKeyboardEvent.js +7 -7
- package/hooks/useMedia.js +9 -12
- package/hooks/useMergeValue.js +10 -8
- package/hooks/useResizeObserver.js +16 -0
- package/hooks/useUpdateEffect.js +7 -9
- package/hooks/useWindowSize.js +16 -20
- package/icons.js +6003 -0
- package/index.js +377 -472
- package/locale/en-US.js +20 -6
- package/locale/ja-JP.js +4 -2
- package/locale/ko-KR.js +2 -2
- package/locale/pt-BR.js +3 -3
- package/locale/pt-PT.js +3 -3
- package/locale/tr-TR.js +11 -3
- package/locale/zh-CN.js +6 -0
- package/locale/zh-HK.js +2 -0
- package/locale/zh-TW.js +2 -0
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/anchor/util.d.ts +1 -0
- package/types/button/index.d.ts +2 -2
- package/types/color-picker/colors.d.ts +1 -1
- package/types/date-picker/util.d.ts +1 -1
- package/types/hooks/index.d.ts +3 -101
- package/types/hooks/useForceUpdate.d.ts +1 -2
- package/types/hooks/useIntersectionObserver.d.ts +1 -1
- package/types/hooks/useKeyboardEvent.d.ts +2 -2
- package/types/hooks/useMergeProps.d.ts +1 -1
- package/types/hooks/useResizeObserver.d.ts +5 -0
- package/types/hooks/useUpdateEffect.d.ts +2 -3
- package/types/hooks/useWindowSize.d.ts +1 -1
- package/types/icons.d.ts +4 -0
- package/types/index.d.ts +12 -2
- package/types/locale/en-US.d.ts +4 -0
- package/types/locale/interface.d.ts +2 -0
- package/types/locale/ja-JP.d.ts +4 -0
- package/types/locale/zh-CN.d.ts +4 -0
- package/types/locale/zh-HK.d.ts +4 -0
- package/types/locale/zh-TW.d.ts +4 -0
- package/types/modal/config.d.ts +1 -1
- package/types/version/index.d.ts +1 -1
- package/utils/CSSTransition.js +1 -1
- package/utils/className.js +2 -3
- package/utils/contextHolder.js +2 -2
- package/utils/copy.js +2 -3
- package/utils/is.js +127 -90
- package/utils/reactDOM.js +17 -15
- package/utils/responsiveObserve.js +16 -16
- package/utils/saveAs.js +2 -3
- package/utils/scrollIntoView.js +1 -1
- package/chunk/BdYAMaw9.js +0 -6
- package/chunk/CiZVOdJ3.js +0 -122
- package/chunk/DdtfPvgk.js +0 -272
- package/chunk/I4RV9SKZ.js +0 -135
- package/chunk/TXCrI0jN.js +0 -20
- package/chunk/i1A7W8Qt.js +0 -277
- package/chunk/xPzFRQJn.js +0 -740
- package/hooks/useAsync.js +0 -13
- package/hooks/useAsyncFn.js +0 -15
- package/hooks/useAsyncRetry.js +0 -17
- package/hooks/useAudio.js +0 -5
- package/hooks/useBeforeUnload.js +0 -18
- package/hooks/useBoolean.js +0 -4
- package/hooks/useClickAway.js +0 -22
- package/hooks/useCopyToClipboard.js +0 -51
- package/hooks/useCounter.js +0 -45
- package/hooks/useCreation.js +0 -17
- package/hooks/useCustomCompareEffect.js +0 -15
- package/hooks/useDebounce.js +0 -9
- package/hooks/useDefault.js +0 -10
- package/hooks/useDrop.js +0 -44
- package/hooks/useDropArea.js +0 -45
- package/hooks/useEffectOnce.js +0 -7
- package/hooks/useEffectState.js +0 -9
- package/hooks/useEnsuredForwardedRef.js +0 -17
- package/hooks/useError.js +0 -13
- package/hooks/useEvent.js +0 -13
- package/hooks/useEventListener.js +0 -39
- package/hooks/useFavicon.js +0 -16
- package/hooks/useFirstMountState.js +0 -8
- package/hooks/useFullscreen.js +0 -39
- package/hooks/useGeolocation.js +0 -38
- package/hooks/useGetSet.js +0 -18
- package/hooks/useGetSetState.js +0 -12
- package/hooks/useHash.js +0 -26
- package/hooks/useHover.js +0 -16
- package/hooks/useHoverDirty.js +0 -17
- package/hooks/useIdle.js +0 -34
- package/hooks/useIntersection.js +0 -19
- package/hooks/useIsomorphicLayoutEffect2.js +0 -6
- package/hooks/useKey.js +0 -16
- package/hooks/useKeyPress.js +0 -13
- package/hooks/useKeyPressEvent.js +0 -11
- package/hooks/useLatest.js +0 -8
- package/hooks/useLifecycles.js +0 -9
- package/hooks/useList.js +0 -67
- package/hooks/useLocalStorage.js +0 -42
- package/hooks/useLocation.js +0 -51
- package/hooks/useLockBodyScroll.js +0 -55
- package/hooks/useLogger.js +0 -10
- package/hooks/useLongPress.js +0 -24
- package/hooks/useMap.js +0 -31
- package/hooks/useMeasure.js +0 -34
- package/hooks/useMeasureDirty.js +0 -24
- package/hooks/useMediaDevices.js +0 -26
- package/hooks/useMediatedState.js +0 -14
- package/hooks/useMethods.js +0 -14
- package/hooks/useMotion.js +0 -56
- package/hooks/useMount.js +0 -9
- package/hooks/useMountedState.js +0 -10
- package/hooks/useMouse.js +0 -44
- package/hooks/useMouseHovered.js +0 -9
- package/hooks/useMouseWheel.js +0 -14
- package/hooks/useMultiStateValidator.js +0 -19
- package/hooks/useNetworkState.js +0 -31
- package/hooks/useNumber.js +0 -4
- package/hooks/useObservable.js +0 -12
- package/hooks/useOrientation.js +0 -30
- package/hooks/usePageLeave.js +0 -19
- package/hooks/usePermission.js +0 -19
- package/hooks/usePinchZoom.js +0 -40
- package/hooks/usePreviousDistinct.js +0 -10
- package/hooks/usePromise.js +0 -19
- package/hooks/useQueue.js +0 -25
- package/hooks/useRaf.js +0 -24
- package/hooks/useRafLoop.js +0 -24
- package/hooks/useRafState.js +0 -15
- package/hooks/useReactive.js +0 -21
- package/hooks/useRendersCount.js +0 -7
- package/hooks/useScroll.js +0 -27
- package/hooks/useScrolling.js +0 -23
- package/hooks/useSearchParam.js +0 -18
- package/hooks/useSessionStorage.js +0 -29
- package/hooks/useSet.js +0 -15
- package/hooks/useSetState.js +0 -16
- package/hooks/useSize.js +0 -58
- package/hooks/useSlider.js +0 -48
- package/hooks/useSpeech.js +0 -45
- package/hooks/useStartTyping.js +0 -30
- package/hooks/useStateList.js +0 -37
- package/hooks/useStateValidator.js +0 -17
- package/hooks/useStateWithHistory.js +0 -46
- package/hooks/useSyncState.js +0 -14
- package/hooks/useThrottle.js +0 -21
- package/hooks/useThrottleFn.js +0 -21
- package/hooks/useTimeout.js +0 -17
- package/hooks/useTimeoutFn.js +0 -16
- package/hooks/useTitle.js +0 -18
- package/hooks/useToggle.js +0 -5
- package/hooks/useTween.js +0 -11
- package/hooks/useUnmount.js +0 -9
- package/hooks/useUnmountPromise.js +0 -20
- package/hooks/useUpdate.js +0 -10
- package/hooks/useUpdateTimeout.js +0 -9
- package/hooks/useUpsert.js +0 -16
- package/hooks/useVibrate.js +0 -21
- package/hooks/useVideo.js +0 -5
- package/hooks/useWindowScroll.js +0 -29
- package/types/hooks/component/UseKey.d.ts +0 -2
- package/types/hooks/factory/createBreakpoint.d.ts +0 -4
- package/types/hooks/factory/createGlobalState.d.ts +0 -7
- package/types/hooks/factory/createHTMLMediaHook.d.ts +0 -33
- package/types/hooks/factory/createMemo.d.ts +0 -2
- package/types/hooks/factory/createReducer.d.ts +0 -8
- package/types/hooks/factory/createReducerContext.d.ts +0 -5
- package/types/hooks/factory/createRenderProp.d.ts +0 -1
- package/types/hooks/factory/createRouter.d.ts +0 -7
- package/types/hooks/factory/createStateContext.d.ts +0 -5
- package/types/hooks/misc/hookState.d.ts +0 -8
- package/types/hooks/misc/parseTimeRanges.d.ts +0 -4
- package/types/hooks/misc/types.d.ts +0 -2
- package/types/hooks/misc/util.d.ts +0 -5
- package/types/hooks/useAsync.d.ts +0 -20
- package/types/hooks/useAsyncFn.d.ts +0 -23
- package/types/hooks/useAsyncRetry.d.ts +0 -27
- package/types/hooks/useAudio.d.ts +0 -11
- package/types/hooks/useBeforeUnload.d.ts +0 -2
- package/types/hooks/useBoolean.d.ts +0 -2
- package/types/hooks/useClickAway.d.ts +0 -3
- package/types/hooks/useCopyToClipboard.d.ts +0 -7
- package/types/hooks/useCounter.d.ts +0 -9
- package/types/hooks/useCreation.d.ts +0 -2
- package/types/hooks/useCustomCompareEffect.d.ts +0 -4
- package/types/hooks/useDebounce.d.ts +0 -3
- package/types/hooks/useDefault.d.ts +0 -2
- package/types/hooks/useDrop.d.ts +0 -17
- package/types/hooks/useDropArea.d.ts +0 -18
- package/types/hooks/useEffectOnce.d.ts +0 -3
- package/types/hooks/useEffectState.d.ts +0 -2
- package/types/hooks/useEnsuredForwardedRef.d.ts +0 -3
- package/types/hooks/useError.d.ts +0 -2
- package/types/hooks/useEvent.d.ts +0 -13
- package/types/hooks/useEventListener.d.ts +0 -2
- package/types/hooks/useFavicon.d.ts +0 -2
- package/types/hooks/useFirstMountState.d.ts +0 -1
- package/types/hooks/useFullscreen.d.ts +0 -10
- package/types/hooks/useGeolocation.d.ts +0 -21
- package/types/hooks/useGetSet.d.ts +0 -3
- package/types/hooks/useGetSetState.d.ts +0 -2
- package/types/hooks/useHash.d.ts +0 -2
- package/types/hooks/useHover.d.ts +0 -4
- package/types/hooks/useHoverDirty.d.ts +0 -3
- package/types/hooks/useIdle.d.ts +0 -2
- package/types/hooks/useIntersection.d.ts +0 -3
- package/types/hooks/useIsomorphicLayoutEffect2.d.ts +0 -3
- package/types/hooks/useKey.d.ts +0 -12
- package/types/hooks/useKeyPress.d.ts +0 -3
- package/types/hooks/useKeyPressEvent.d.ts +0 -3
- package/types/hooks/useLatest.d.ts +0 -4
- package/types/hooks/useLifecycles.d.ts +0 -2
- package/types/hooks/useList.d.ts +0 -18
- package/types/hooks/useLocalStorage.d.ts +0 -10
- package/types/hooks/useLocation.d.ts +0 -16
- package/types/hooks/useLockBodyScroll.d.ts +0 -8
- package/types/hooks/useLogger.d.ts +0 -2
- package/types/hooks/useLongPress.d.ts +0 -12
- package/types/hooks/useMap.d.ts +0 -11
- package/types/hooks/useMeasure.d.ts +0 -9
- package/types/hooks/useMeasureDirty.d.ts +0 -11
- package/types/hooks/useMediaDevices.d.ts +0 -2
- package/types/hooks/useMediatedState.d.ts +0 -9
- package/types/hooks/useMethods.d.ts +0 -8
- package/types/hooks/useMotion.d.ts +0 -20
- package/types/hooks/useMount.d.ts +0 -2
- package/types/hooks/useMountedState.d.ts +0 -1
- package/types/hooks/useMouse.d.ts +0 -13
- package/types/hooks/useMouseHovered.d.ts +0 -8
- package/types/hooks/useMouseWheel.d.ts +0 -2
- package/types/hooks/useMultiStateValidator.d.ts +0 -9
- package/types/hooks/useNetworkState.d.ts +0 -22
- package/types/hooks/useNumber.d.ts +0 -2
- package/types/hooks/useObservable.d.ts +0 -8
- package/types/hooks/useOrientation.d.ts +0 -6
- package/types/hooks/usePageLeave.d.ts +0 -2
- package/types/hooks/usePermission.d.ts +0 -16
- package/types/hooks/usePinchZoom.d.ts +0 -18
- package/types/hooks/usePreviousDistinct.d.ts +0 -2
- package/types/hooks/usePromise.d.ts +0 -3
- package/types/hooks/useQueue.d.ts +0 -9
- package/types/hooks/useRaf.d.ts +0 -2
- package/types/hooks/useRafLoop.d.ts +0 -2
- package/types/hooks/useRafState.d.ts +0 -3
- package/types/hooks/useReactive.d.ts +0 -2
- package/types/hooks/useRendersCount.d.ts +0 -1
- package/types/hooks/useScroll.d.ts +0 -7
- package/types/hooks/useScrolling.d.ts +0 -3
- package/types/hooks/useSearchParam.d.ts +0 -3
- package/types/hooks/useSessionStorage.d.ts +0 -2
- package/types/hooks/useSet.d.ts +0 -11
- package/types/hooks/useSetState.d.ts +0 -2
- package/types/hooks/useSize.d.ts +0 -8
- package/types/hooks/useSlider.d.ts +0 -15
- package/types/hooks/useSpeech.d.ts +0 -16
- package/types/hooks/useStartTyping.d.ts +0 -2
- package/types/hooks/useStateList.d.ts +0 -9
- package/types/hooks/useStateValidator.d.ts +0 -8
- package/types/hooks/useStateWithHistory.d.ts +0 -18
- package/types/hooks/useSyncState.d.ts +0 -3
- package/types/hooks/useThrottle.d.ts +0 -2
- package/types/hooks/useThrottleFn.d.ts +0 -2
- package/types/hooks/useTimeout.d.ts +0 -2
- package/types/hooks/useTimeoutFn.d.ts +0 -2
- package/types/hooks/useTitle.d.ts +0 -6
- package/types/hooks/useToggle.d.ts +0 -2
- package/types/hooks/useTween.d.ts +0 -3
- package/types/hooks/useUnmount.d.ts +0 -2
- package/types/hooks/useUnmountPromise.d.ts +0 -3
- package/types/hooks/useUpdate.d.ts +0 -2
- package/types/hooks/useUpdateTimeout.d.ts +0 -2
- package/types/hooks/useUpsert.d.ts +0 -6
- package/types/hooks/useVibrate.d.ts +0 -4
- package/types/hooks/useVideo.d.ts +0 -11
- package/types/hooks/useWindowScroll.d.ts +0 -6
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import i from "react";
|
|
3
|
+
import { u as n } from "./B45v5S9k.js";
|
|
4
|
+
const h = i.forwardRef(function(e, r) {
|
|
5
|
+
const t = n({ ...e, name: "ui-file" });
|
|
6
|
+
return /* @__PURE__ */ o(
|
|
7
|
+
"svg",
|
|
8
|
+
{
|
|
9
|
+
width: "1em",
|
|
10
|
+
height: "1em",
|
|
11
|
+
viewBox: "0 0 48 48",
|
|
12
|
+
fill: "none",
|
|
13
|
+
stroke: "currentColor",
|
|
14
|
+
ref: r,
|
|
15
|
+
...t,
|
|
16
|
+
strokeWidth: "4",
|
|
17
|
+
children: /* @__PURE__ */ o(
|
|
18
|
+
"path",
|
|
19
|
+
{
|
|
20
|
+
d: "M16 21h16m-16 8h10m11 13H11a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h21l7 7v27a2 2 0 0 1-2 2Z",
|
|
21
|
+
strokeLinecap: "butt"
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
h as I
|
|
29
|
+
};
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { jsx as i, jsxs as R, Fragment as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as i, jsxs as R, Fragment as Ge } from "react/jsx-runtime";
|
|
2
|
+
import { I as Ke } from "./B45v5S9k.js";
|
|
3
|
+
import { P as be, b as Xe } from "./BP7xX86Q.js";
|
|
3
4
|
import $e from "lodash/isArray";
|
|
4
|
-
import Ve, { useContext as
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { I as
|
|
8
|
-
import
|
|
9
|
-
import S from "
|
|
10
|
-
import
|
|
11
|
-
import { Backspace as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import ut from "../OverflowEllipsis.js";
|
|
5
|
+
import Ve, { useContext as qe, useRef as C, useState as Ye, useImperativeHandle as Je, useMemo as Qe, useEffect as Ze } from "react";
|
|
6
|
+
import { b as et, I as tt } from "./DUxWiN2U.js";
|
|
7
|
+
import ye from "../hooks/useMergeValue.js";
|
|
8
|
+
import { I as ot } from "./Dg2DmtzA.js";
|
|
9
|
+
import at from "../Tag.js";
|
|
10
|
+
import { y as S } from "./Do1aMgY3.js";
|
|
11
|
+
import rt from "../utils/getHotkeyHandler.js";
|
|
12
|
+
import { Backspace as nt } from "../utils/keyCode.js";
|
|
13
|
+
import st from "../Draggable.js";
|
|
14
|
+
import lt from "../hooks/useMergeProps.js";
|
|
15
|
+
import ct from "../utils/fillNBSP.js";
|
|
16
|
+
import it from "../utils/omit.js";
|
|
17
|
+
import ut from "../Popover.js";
|
|
18
|
+
import pt from "../OverflowEllipsis.js";
|
|
19
19
|
import "../utils/is.js";
|
|
20
|
-
import
|
|
21
|
-
|
|
20
|
+
import "./BeM2hfks.js";
|
|
21
|
+
import _e from "lodash/isPlainObject";
|
|
22
|
+
const Ne = "__arco_value_tag_placeholder", Y = 300, ft = "responsive", dt = `__input_${Math.random().toFixed(10).slice(2)}`, T = (s) => s == null, E = (s) => {
|
|
22
23
|
s.target.tagName !== "INPUT" && s.preventDefault();
|
|
23
24
|
}, Te = (s) => $e(s) ? s.map((l) => _e(l) ? {
|
|
24
25
|
...l,
|
|
@@ -28,54 +29,55 @@ const ye = "__arco_value_tag_placeholder", Y = 300, pt = "responsive", ft = `__i
|
|
|
28
29
|
} : {
|
|
29
30
|
label: l,
|
|
30
31
|
value: l
|
|
31
|
-
}) : [],
|
|
32
|
+
}) : [], mt = (s) => {
|
|
32
33
|
const l = C(0), d = C(s.length);
|
|
33
|
-
return
|
|
34
|
+
return Ze(() => {
|
|
34
35
|
l.current = s.length === 0 && d.current > 0 ? Y : 0, d.current = s.length;
|
|
35
36
|
}, [s]), l;
|
|
36
37
|
}, Ce = ({
|
|
37
38
|
prefixCls: s,
|
|
38
39
|
children: l,
|
|
39
40
|
animation: d
|
|
40
|
-
}) => /* @__PURE__ */ i("div", { className: `${s}-inner`, children: d ? /* @__PURE__ */ i(
|
|
41
|
+
}) => /* @__PURE__ */ i("div", { className: `${s}-inner`, children: d ? /* @__PURE__ */ i(Xe, { component: null, children: l }) : l }), gt = {
|
|
41
42
|
animation: !0,
|
|
42
43
|
validate: (s, l) => s && l.every((d) => d.value !== s)
|
|
43
44
|
};
|
|
44
|
-
function
|
|
45
|
+
function ht(s, l) {
|
|
45
46
|
const {
|
|
46
47
|
getPrefixCls: d,
|
|
47
48
|
size: Pe,
|
|
48
49
|
componentConfig: M,
|
|
49
50
|
rtl: J
|
|
50
|
-
} =
|
|
51
|
+
} = qe(et), p = lt(
|
|
51
52
|
s,
|
|
52
|
-
|
|
53
|
+
gt,
|
|
53
54
|
M == null ? void 0 : M.InputTag
|
|
54
55
|
), {
|
|
55
56
|
className: we,
|
|
56
57
|
style: Ae,
|
|
57
58
|
placeholder: De,
|
|
59
|
+
error: Re,
|
|
58
60
|
disabled: v,
|
|
59
61
|
readOnly: g,
|
|
60
|
-
allowClear:
|
|
61
|
-
autoFocus:
|
|
62
|
-
labelInValue:
|
|
63
|
-
disableInput:
|
|
62
|
+
allowClear: Se,
|
|
63
|
+
autoFocus: Ee,
|
|
64
|
+
labelInValue: Me,
|
|
65
|
+
disableInput: ke,
|
|
64
66
|
animation: Q,
|
|
65
|
-
saveOnBlur:
|
|
66
|
-
dragToSort:
|
|
67
|
-
icon:
|
|
67
|
+
saveOnBlur: Oe,
|
|
68
|
+
dragToSort: ze,
|
|
69
|
+
icon: I,
|
|
68
70
|
prefix: Z,
|
|
69
71
|
suffix: ee,
|
|
70
72
|
addBefore: te,
|
|
71
|
-
addAfter:
|
|
72
|
-
tokenSeparators:
|
|
73
|
+
addAfter: oe,
|
|
74
|
+
tokenSeparators: k,
|
|
73
75
|
validate: $,
|
|
74
|
-
renderTag:
|
|
75
|
-
tagClassName:
|
|
76
|
+
renderTag: O,
|
|
77
|
+
tagClassName: ae,
|
|
76
78
|
maxTagCount: m,
|
|
77
|
-
onInputChange:
|
|
78
|
-
onKeyDown:
|
|
79
|
+
onInputChange: z,
|
|
80
|
+
onKeyDown: x,
|
|
79
81
|
onPaste: L,
|
|
80
82
|
onChange: F,
|
|
81
83
|
onFocus: H,
|
|
@@ -84,38 +86,38 @@ function gt(s, l) {
|
|
|
84
86
|
onRemove: W,
|
|
85
87
|
onClear: B,
|
|
86
88
|
onClick: re,
|
|
87
|
-
...
|
|
88
|
-
} = p, a = d("input-tag"), V = "size" in p ? p.size : Pe, _ = typeof m == "object" ? m.count : m,
|
|
89
|
+
...xe
|
|
90
|
+
} = p, a = d("input-tag"), V = "size" in p ? p.size : Pe, _ = typeof m == "object" ? m.count : m, b = C(), G = C(null), K = C(), [P, ne] = Ye(!1), [n, Le] = ye([], {
|
|
89
91
|
defaultValue: "defaultValue" in p ? Te(p.defaultValue) : void 0,
|
|
90
92
|
value: "value" in p ? Te(p.value) : void 0
|
|
91
|
-
}), [
|
|
93
|
+
}), [y, w] = ye("", {
|
|
92
94
|
value: p.inputValue
|
|
93
|
-
}),
|
|
94
|
-
|
|
95
|
+
}), Fe = mt(n), He = !!(ze && !g && !v);
|
|
96
|
+
Je(l, () => {
|
|
95
97
|
var e, t;
|
|
96
98
|
return {
|
|
97
|
-
blur: (e =
|
|
98
|
-
focus: (t =
|
|
99
|
+
blur: (e = b.current) == null ? void 0 : e.blur,
|
|
100
|
+
focus: (t = b.current) == null ? void 0 : t.focus,
|
|
99
101
|
getRootDOMNode: () => K.current
|
|
100
102
|
};
|
|
101
103
|
}, []);
|
|
102
|
-
const
|
|
103
|
-
v || g || ("value" in p ||
|
|
104
|
-
}, se = (e, t,
|
|
105
|
-
W == null || W(e, t,
|
|
106
|
-
[...
|
|
104
|
+
const N = (e, t) => {
|
|
105
|
+
v || g || ("value" in p || Le(e), F == null || F(Me ? e : e.map((o) => o == null ? void 0 : o.value), t));
|
|
106
|
+
}, se = (e, t, o) => {
|
|
107
|
+
W == null || W(e, t, o), N(
|
|
108
|
+
[...n.slice(0, t), ...n.slice(t + 1)],
|
|
107
109
|
"remove"
|
|
108
110
|
);
|
|
109
|
-
},
|
|
111
|
+
}, je = rt(
|
|
110
112
|
/* @__PURE__ */ new Map([
|
|
111
113
|
[
|
|
112
|
-
|
|
114
|
+
nt.key,
|
|
113
115
|
(e) => {
|
|
114
|
-
if (!e.target.value &&
|
|
115
|
-
for (let t =
|
|
116
|
-
const
|
|
117
|
-
if (
|
|
118
|
-
se(
|
|
116
|
+
if (!e.target.value && n.length)
|
|
117
|
+
for (let t = n.length - 1; t >= 0; t--) {
|
|
118
|
+
const o = n[t];
|
|
119
|
+
if (o.closable !== !1) {
|
|
120
|
+
se(o, t, e);
|
|
119
121
|
return;
|
|
120
122
|
}
|
|
121
123
|
}
|
|
@@ -124,57 +126,57 @@ function gt(s, l) {
|
|
|
124
126
|
])
|
|
125
127
|
), le = async () => {
|
|
126
128
|
try {
|
|
127
|
-
const e = typeof $ == "function" ? await $(
|
|
128
|
-
e && (
|
|
129
|
-
|
|
130
|
-
value: e === !0 ?
|
|
131
|
-
label:
|
|
129
|
+
const e = typeof $ == "function" ? await $(y, n) : !0;
|
|
130
|
+
e && (N(
|
|
131
|
+
n.concat({
|
|
132
|
+
value: e === !0 ? y : e,
|
|
133
|
+
label: y
|
|
132
134
|
}),
|
|
133
135
|
"add"
|
|
134
136
|
), w(""));
|
|
135
137
|
} catch (e) {
|
|
136
138
|
console.error(e);
|
|
137
139
|
}
|
|
138
|
-
}, ce = (e, t,
|
|
139
|
-
let { value:
|
|
140
|
-
const h = (
|
|
141
|
-
se(e, t,
|
|
140
|
+
}, ce = (e, t, o = !1) => {
|
|
141
|
+
let { value: r, label: c } = e, f = !g && !v && e.closable !== !1, u = typeof r == "object" ? t : r;
|
|
142
|
+
const h = (Be) => {
|
|
143
|
+
se(e, t, Be);
|
|
142
144
|
};
|
|
143
|
-
if (!
|
|
144
|
-
if (t ===
|
|
145
|
-
if (c = ie(
|
|
145
|
+
if (!o && typeof _ == "number" && t >= _)
|
|
146
|
+
if (t === n.length - 1) {
|
|
147
|
+
if (c = ie(n.length - Number(_)), r = Ne, f = !1, u = Ne, !O)
|
|
146
148
|
return { valueKey: u, dom: c };
|
|
147
149
|
} else
|
|
148
150
|
return { valueKey: u, dom: null };
|
|
149
|
-
if (
|
|
151
|
+
if (O)
|
|
150
152
|
return {
|
|
151
153
|
valueKey: u,
|
|
152
|
-
dom:
|
|
154
|
+
dom: O(
|
|
153
155
|
{
|
|
154
|
-
value:
|
|
156
|
+
value: r,
|
|
155
157
|
label: c,
|
|
156
158
|
closable: f,
|
|
157
159
|
onClose: h
|
|
158
160
|
},
|
|
159
161
|
t,
|
|
160
|
-
|
|
162
|
+
n
|
|
161
163
|
)
|
|
162
164
|
};
|
|
163
|
-
const
|
|
165
|
+
const We = {
|
|
164
166
|
closable: f,
|
|
165
167
|
onClose: h,
|
|
166
168
|
visible: !0,
|
|
167
|
-
children:
|
|
168
|
-
closeIcon:
|
|
169
|
+
children: ct(c),
|
|
170
|
+
closeIcon: I == null ? void 0 : I.removeIcon,
|
|
169
171
|
__closeIconProps: {
|
|
170
172
|
onMouseDown: E
|
|
171
173
|
},
|
|
172
174
|
className: S(`${a}-tag`, {
|
|
173
|
-
[
|
|
175
|
+
[ae]: ae
|
|
174
176
|
}),
|
|
175
177
|
title: typeof c == "string" ? c : void 0
|
|
176
178
|
};
|
|
177
|
-
return { valueKey: u, dom: /* @__PURE__ */ i(
|
|
179
|
+
return { valueKey: u, dom: /* @__PURE__ */ i(at, { ...We }, `${u}-tag`) };
|
|
178
180
|
};
|
|
179
181
|
function ie(e) {
|
|
180
182
|
const t = typeof m == "object" && m.render ? m.render : () => /* @__PURE__ */ R("span", { className: `${a}-tag-ellipsis`, children: [
|
|
@@ -182,102 +184,102 @@ function gt(s, l) {
|
|
|
182
184
|
e
|
|
183
185
|
] });
|
|
184
186
|
return /* @__PURE__ */ i(
|
|
185
|
-
|
|
187
|
+
ut,
|
|
186
188
|
{
|
|
187
189
|
..._e(m) ? m.popoverProps : {},
|
|
188
|
-
children: t(e,
|
|
189
|
-
content: /* @__PURE__ */ i(
|
|
190
|
-
({ tagValue:
|
|
190
|
+
children: t(e, n),
|
|
191
|
+
content: /* @__PURE__ */ i(Ge, { children: n.map((o, r) => ({ tagValue: o, tagIndex: r })).slice(-e).map(
|
|
192
|
+
({ tagValue: o, tagIndex: r }) => {
|
|
191
193
|
var c;
|
|
192
|
-
return (c = ce(
|
|
194
|
+
return (c = ce(o, r, !0)) == null ? void 0 : c.dom;
|
|
193
195
|
}
|
|
194
196
|
) })
|
|
195
197
|
}
|
|
196
198
|
);
|
|
197
199
|
}
|
|
198
200
|
const ue = async (e) => {
|
|
199
|
-
if (G.current = null, $e(
|
|
201
|
+
if (G.current = null, $e(k) && k.length) {
|
|
200
202
|
const t = e.split(
|
|
201
|
-
new RegExp(`[${
|
|
203
|
+
new RegExp(`[${k.join("")}]`)
|
|
202
204
|
);
|
|
203
205
|
if (t.length > 1) {
|
|
204
206
|
G.current = Date.now();
|
|
205
|
-
const
|
|
207
|
+
const o = [];
|
|
206
208
|
await Promise.all(
|
|
207
|
-
t.map(async (
|
|
208
|
-
const c =
|
|
209
|
-
c &&
|
|
210
|
-
value: c === !0 ?
|
|
211
|
-
label:
|
|
209
|
+
t.map(async (r) => {
|
|
210
|
+
const c = r ? typeof $ == "function" ? await $(r, n) : !0 : !1;
|
|
211
|
+
c && o.push({
|
|
212
|
+
value: c === !0 ? r : c,
|
|
213
|
+
label: r
|
|
212
214
|
});
|
|
213
215
|
})
|
|
214
|
-
),
|
|
216
|
+
), o.length && N(n.concat(o), "add");
|
|
215
217
|
}
|
|
216
218
|
}
|
|
217
|
-
}, pe =
|
|
218
|
-
|
|
219
|
+
}, pe = Se && !v && !g && n.length ? /* @__PURE__ */ i(
|
|
220
|
+
tt,
|
|
219
221
|
{
|
|
220
222
|
size: V,
|
|
221
223
|
className: `${a}-clear-icon`,
|
|
222
224
|
onClick: (e) => {
|
|
223
225
|
var t;
|
|
224
|
-
e.stopPropagation(),
|
|
226
|
+
e.stopPropagation(), N([], "clear"), P || (t = b.current) == null || t.focus(), B == null || B();
|
|
225
227
|
},
|
|
226
|
-
children:
|
|
228
|
+
children: I && I.clearIcon || /* @__PURE__ */ i(Ke, {})
|
|
227
229
|
},
|
|
228
230
|
"clearIcon"
|
|
229
|
-
) : null, fe = v ||
|
|
231
|
+
) : null, fe = v || ke, X = Qe(() => {
|
|
230
232
|
const e = {};
|
|
231
|
-
return
|
|
232
|
-
const c = e[
|
|
233
|
-
e[
|
|
234
|
-
const { dom: u, valueKey: h } = ce(
|
|
233
|
+
return n.map((o, r) => {
|
|
234
|
+
const c = e[o.value] || 0, f = c >= 1;
|
|
235
|
+
e[o.value] = c + 1;
|
|
236
|
+
const { dom: u, valueKey: h } = ce(o, r);
|
|
235
237
|
return Ve.isValidElement(u) ? /* @__PURE__ */ i(
|
|
236
|
-
|
|
238
|
+
be,
|
|
237
239
|
{
|
|
238
240
|
timeout: Y,
|
|
239
241
|
classNames: "zoomIn",
|
|
240
242
|
children: u
|
|
241
243
|
},
|
|
242
|
-
f ? `${h}-${
|
|
244
|
+
f ? `${h}-${r}` : h
|
|
243
245
|
) : u;
|
|
244
246
|
});
|
|
245
|
-
}, [
|
|
247
|
+
}, [n]), q = [
|
|
246
248
|
/* @__PURE__ */ i(
|
|
247
|
-
|
|
249
|
+
be,
|
|
248
250
|
{
|
|
249
251
|
timeout: Y,
|
|
250
252
|
classNames: "zoomIn",
|
|
251
253
|
children: /* @__PURE__ */ i(
|
|
252
|
-
|
|
254
|
+
ot,
|
|
253
255
|
{
|
|
254
256
|
autoComplete: "off",
|
|
255
257
|
size: V,
|
|
256
258
|
disabled: fe,
|
|
257
259
|
readOnly: g,
|
|
258
|
-
ref:
|
|
259
|
-
autoFocus:
|
|
260
|
-
placeholder:
|
|
260
|
+
ref: b,
|
|
261
|
+
autoFocus: Ee,
|
|
262
|
+
placeholder: n.length ? "" : De,
|
|
261
263
|
prefixCls: `${a}-input`,
|
|
262
264
|
autoFitWidth: {
|
|
263
|
-
delay: () =>
|
|
265
|
+
delay: () => Fe.current,
|
|
264
266
|
pure: !0
|
|
265
267
|
},
|
|
266
268
|
onPressEnter: async (e) => {
|
|
267
|
-
|
|
269
|
+
y && e.preventDefault(), U == null || U(e), await le();
|
|
268
270
|
},
|
|
269
271
|
onFocus: (e) => {
|
|
270
272
|
!fe && !g && (ne(!0), H == null || H(e));
|
|
271
273
|
},
|
|
272
274
|
onBlur: async (e) => {
|
|
273
|
-
ne(!1), j == null || j(e),
|
|
275
|
+
ne(!1), j == null || j(e), Oe && await le(), w("");
|
|
274
276
|
},
|
|
275
|
-
value:
|
|
277
|
+
value: y,
|
|
276
278
|
onChange: (e, t) => {
|
|
277
|
-
|
|
279
|
+
z == null || z(e, t), t.nativeEvent.inputType !== "insertFromPaste" && ue(e), G.current ? w("") : w(e);
|
|
278
280
|
},
|
|
279
281
|
onKeyDown: (e) => {
|
|
280
|
-
|
|
282
|
+
je(e), x == null || x(e);
|
|
281
283
|
},
|
|
282
284
|
onPaste: (e) => {
|
|
283
285
|
L == null || L(e), ue(e.clipboardData.getData("text"));
|
|
@@ -285,21 +287,21 @@ function gt(s, l) {
|
|
|
285
287
|
}
|
|
286
288
|
)
|
|
287
289
|
},
|
|
288
|
-
|
|
290
|
+
dt
|
|
289
291
|
)
|
|
290
|
-
],
|
|
292
|
+
], Ue = !T(Z), de = !T(ee) || !T(pe), me = !T(te), ge = !T(oe), A = me || ge, he = p.status || (Re ? "error" : void 0), ve = S(a, {
|
|
291
293
|
[`${a}-size-${V}`]: V,
|
|
292
294
|
[`${a}-disabled`]: v,
|
|
293
295
|
[`${a}-${he}`]: he,
|
|
294
296
|
[`${a}-focus`]: P,
|
|
295
297
|
[`${a}-readonly`]: g,
|
|
296
298
|
[`${a}-has-suffix`]: de,
|
|
297
|
-
[`${a}-has-placeholder`]: !
|
|
299
|
+
[`${a}-has-placeholder`]: !n.length,
|
|
298
300
|
[`${a}-rtl`]: J
|
|
299
|
-
}), D = { style: Ae, className: we },
|
|
301
|
+
}), D = { style: Ae, className: we }, Ie = /* @__PURE__ */ i(
|
|
300
302
|
"div",
|
|
301
303
|
{
|
|
302
|
-
...
|
|
304
|
+
...it(xe, ["status", "size", "defaultValue", "value", "inputValue"]),
|
|
303
305
|
...A ? {} : D,
|
|
304
306
|
className: A ? ve : S(ve, D.className),
|
|
305
307
|
onMouseDown: (e) => {
|
|
@@ -307,35 +309,35 @@ function gt(s, l) {
|
|
|
307
309
|
},
|
|
308
310
|
onClick: (e) => {
|
|
309
311
|
var t;
|
|
310
|
-
!P && ((t =
|
|
312
|
+
!P && ((t = b.current) == null || t.focus()), re && re(e);
|
|
311
313
|
},
|
|
312
314
|
ref: A ? void 0 : K,
|
|
313
315
|
children: /* @__PURE__ */ R("div", { className: `${a}-view`, children: [
|
|
314
|
-
|
|
315
|
-
|
|
316
|
+
Ue && /* @__PURE__ */ i("div", { className: `${a}-prefix`, onMouseDown: E, children: Z }),
|
|
317
|
+
He ? /* @__PURE__ */ i(
|
|
316
318
|
Ce,
|
|
317
319
|
{
|
|
318
320
|
prefixCls: a,
|
|
319
321
|
animation: Q,
|
|
320
322
|
children: /* @__PURE__ */ i(
|
|
321
|
-
|
|
323
|
+
st,
|
|
322
324
|
{
|
|
323
325
|
itemWrapperStyle: { display: "inline-block" },
|
|
324
326
|
direction: "horizontal",
|
|
325
327
|
onIndexChange: (e, t) => {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
const u = c > f, [h] =
|
|
329
|
-
return
|
|
330
|
-
}(
|
|
328
|
+
N(function(r, c, f) {
|
|
329
|
+
r = r.slice();
|
|
330
|
+
const u = c > f, [h] = r.splice(c, 1);
|
|
331
|
+
return r.splice(u ? f : f - 1, 0, h), r;
|
|
332
|
+
}(n, t, e), "sort");
|
|
331
333
|
},
|
|
332
334
|
children: X.concat(q)
|
|
333
335
|
}
|
|
334
336
|
)
|
|
335
337
|
},
|
|
336
338
|
"transitionGroupWithDrag"
|
|
337
|
-
) : /* @__PURE__ */ i(Ce, { prefixCls: a, animation: Q, children: _ ===
|
|
338
|
-
|
|
339
|
+
) : /* @__PURE__ */ i(Ce, { prefixCls: a, animation: Q, children: _ === ft ? /* @__PURE__ */ i(
|
|
340
|
+
pt,
|
|
339
341
|
{
|
|
340
342
|
items: X,
|
|
341
343
|
suffixItems: q,
|
|
@@ -363,16 +365,16 @@ function gt(s, l) {
|
|
|
363
365
|
ref: K,
|
|
364
366
|
children: [
|
|
365
367
|
me && /* @__PURE__ */ i("div", { className: `${a}-addbefore`, children: te }),
|
|
366
|
-
|
|
367
|
-
ge && /* @__PURE__ */ i("div", { className: `${a}-addafter`, children:
|
|
368
|
+
Ie,
|
|
369
|
+
ge && /* @__PURE__ */ i("div", { className: `${a}-addafter`, children: oe })
|
|
368
370
|
]
|
|
369
371
|
}
|
|
370
|
-
) :
|
|
372
|
+
) : Ie;
|
|
371
373
|
}
|
|
372
|
-
const
|
|
373
|
-
|
|
374
|
+
const vt = Ve.forwardRef(
|
|
375
|
+
ht
|
|
374
376
|
);
|
|
375
|
-
|
|
377
|
+
vt.displayName = "InputTag";
|
|
376
378
|
export {
|
|
377
|
-
|
|
379
|
+
vt as I
|
|
378
380
|
};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as k, jsxs as w } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as N, useContext as R, useRef as F, Fragment as j, createElement as z } from "react";
|
|
3
|
+
import { b as D } from "./DUxWiN2U.js";
|
|
4
4
|
import E from "../hooks/useMergeProps.js";
|
|
5
|
-
import { I as K } from "./
|
|
6
|
-
import u from "
|
|
5
|
+
import { I as K } from "./Dg2DmtzA.js";
|
|
6
|
+
import { y as u } from "./Do1aMgY3.js";
|
|
7
7
|
import L from "../hooks/use-verification-code.js";
|
|
8
8
|
const M = {
|
|
9
9
|
length: 6
|
|
10
10
|
};
|
|
11
|
-
function C(
|
|
11
|
+
function C(y, _) {
|
|
12
12
|
var d;
|
|
13
13
|
const o = R(D), e = E(
|
|
14
|
-
|
|
14
|
+
y,
|
|
15
15
|
M,
|
|
16
16
|
(d = o.componentConfig) == null ? void 0 : d.VerificationCode
|
|
17
|
-
), { size: l, separator:
|
|
17
|
+
), { size: l, separator: s, status: f, length: g, masked: h, disabled: v } = e, c = F([]), { value: $, filledValue: P, getInputProps: x } = L({
|
|
18
18
|
defaultValue: e.defaultValue,
|
|
19
19
|
value: e.value,
|
|
20
|
-
length:
|
|
21
|
-
getInputRefList: () =>
|
|
20
|
+
length: g,
|
|
21
|
+
getInputRefList: () => c.current,
|
|
22
22
|
onChange: e.onChange,
|
|
23
23
|
onFinish: e.onFinish
|
|
24
24
|
}), i = o.getPrefixCls("verification-code"), n = o.getPrefixCls("input");
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ k(
|
|
26
26
|
"div",
|
|
27
27
|
{
|
|
28
28
|
className: u(`${i}`, e.className, {
|
|
29
29
|
[`${i}-rtl`]: o.rtl
|
|
30
30
|
}),
|
|
31
31
|
style: e.style,
|
|
32
|
-
children: P.map((V,
|
|
33
|
-
const { onChange: m, onClick: I, onPaste: O, onKeyDown:
|
|
34
|
-
return /* @__PURE__ */
|
|
32
|
+
children: P.map((V, r) => {
|
|
33
|
+
const { onChange: m, onClick: I, onPaste: O, onKeyDown: b, ...p } = x(r);
|
|
34
|
+
return /* @__PURE__ */ w(j, { children: [
|
|
35
35
|
/* @__PURE__ */ z(
|
|
36
36
|
K,
|
|
37
37
|
{
|
|
@@ -39,23 +39,23 @@ function C(g, _) {
|
|
|
39
39
|
readOnly: e.readOnly,
|
|
40
40
|
className: u(n, `${i}-input`, {
|
|
41
41
|
[`${n}-size-${l}`]: l,
|
|
42
|
-
[`${n}-${
|
|
42
|
+
[`${n}-${f}`]: f,
|
|
43
43
|
[`${n}-disabled`]: v,
|
|
44
44
|
[`${n}-rtl`]: o.rtl
|
|
45
45
|
}),
|
|
46
46
|
ref: (t) => {
|
|
47
|
-
|
|
47
|
+
c.current[r] = t == null ? void 0 : t.dom;
|
|
48
48
|
},
|
|
49
49
|
...p,
|
|
50
50
|
key: p.key,
|
|
51
51
|
onClick: e.readOnly ? void 0 : I,
|
|
52
52
|
onPaste: e.readOnly ? void 0 : O,
|
|
53
|
-
onKeyDown: e.readOnly ? void 0 :
|
|
53
|
+
onKeyDown: e.readOnly ? void 0 : b,
|
|
54
54
|
onChange: e.readOnly ? void 0 : (t) => {
|
|
55
55
|
if (e.validate) {
|
|
56
56
|
const a = e == null ? void 0 : e.validate({
|
|
57
57
|
inputValue: t,
|
|
58
|
-
index:
|
|
58
|
+
index: r,
|
|
59
59
|
value: $
|
|
60
60
|
});
|
|
61
61
|
a !== !1 && m(
|
|
@@ -67,14 +67,14 @@ function C(g, _) {
|
|
|
67
67
|
type: h ? "password" : "text"
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
|
-
|
|
71
|
-
] },
|
|
70
|
+
s == null ? void 0 : s({ index: r, character: V })
|
|
71
|
+
] }, r);
|
|
72
72
|
})
|
|
73
73
|
}
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
76
|
C.displayName = "VerificationCodeComponent";
|
|
77
|
-
const S =
|
|
77
|
+
const S = N(C);
|
|
78
78
|
export {
|
|
79
79
|
S as V
|
|
80
80
|
};
|