@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
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useRef as a, useState as p, useEffect as s } from "react";
|
|
2
|
+
import "./CkNSv2U7.js";
|
|
3
|
+
import { n as c } from "./DU6bs_19.js";
|
|
4
|
+
import "./CSC_V_25.js";
|
|
5
|
+
import r from "lodash/isUndefined.js";
|
|
6
|
+
function E(n, i) {
|
|
7
|
+
const { defaultValue: t, value: e } = i || {}, u = a(!0), m = c(e), [f, o] = p(
|
|
8
|
+
r(e) ? r(t) ? n : t : e
|
|
9
|
+
);
|
|
10
|
+
return s(() => {
|
|
11
|
+
if (u.current) {
|
|
12
|
+
u.current = !1;
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
e === void 0 && m !== e && o(e);
|
|
16
|
+
}, [e]), [r(e) ? f : e, o, f];
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
E as R
|
|
20
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useRef as i } from "react";
|
|
2
|
+
import { isServerRendering as s } from "../utils/dom.js";
|
|
3
|
+
import "./CkNSv2U7.js";
|
|
4
|
+
import "./CSC_V_25.js";
|
|
5
|
+
import u from "lodash/isUndefined.js";
|
|
6
|
+
const f = !s && !u(window == null ? void 0 : window.IntersectionObserver);
|
|
7
|
+
function b(t, o = {}) {
|
|
8
|
+
const r = i(), e = () => {
|
|
9
|
+
r.current && (r.current.disconnect(), r.current = null);
|
|
10
|
+
}, c = (n) => {
|
|
11
|
+
n && (e(), f && (r.current = new IntersectionObserver(
|
|
12
|
+
t,
|
|
13
|
+
o
|
|
14
|
+
), r.current.observe(n)));
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
observer: r.current,
|
|
18
|
+
cor: c,
|
|
19
|
+
dor: e
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
b as O,
|
|
24
|
+
f
|
|
25
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import l from "lodash/isPlainObject.js";
|
|
2
|
+
import n from "lodash/uniq.js";
|
|
3
|
+
function c(...e) {
|
|
4
|
+
const i = " ", r = e.map((o, f, a) => l(o) ? Object.keys(o).filter((t) => o[t]) : o).flat(1 / 0).filter(Boolean).join(i).split(i).filter(Boolean);
|
|
5
|
+
return n(r).join(i);
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
c as m
|
|
9
|
+
};
|
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import Pe from "@unicom-cloud/icons/IconUiImageClose";
|
|
3
|
+
import Ie from "@unicom-cloud/icons/IconUiLoading";
|
|
4
|
+
import B from "lodash/isNumber";
|
|
5
5
|
import ee from "lodash/isPlainObject";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { T as
|
|
6
|
+
import xe from "lodash/isUndefined";
|
|
7
|
+
import Le, { useContext as re, useMemo as R, useRef as oe, useEffect as G } from "react";
|
|
8
|
+
import { a as Ve } from "./BJQ5UNa-.js";
|
|
9
|
+
import { E as ye } from "./C_agcwLN.js";
|
|
10
|
+
import { h as Ee } from "./D2KPqPhV.js";
|
|
11
|
+
import { c as Fe } from "./B5gK1Idp.js";
|
|
12
|
+
import { R as Re } from "./HDUQku8d.js";
|
|
13
|
+
import { m as g } from "./JPPo5nY_.js";
|
|
14
|
+
import { c as Ge } from "./BdUcgWdu.js";
|
|
15
|
+
import Ue from "@unicom-cloud/icons/IconUiMore";
|
|
16
|
+
import { T as je, P as ie, a as Se, b as Te, u as ke } from "./fkclKOAL.js";
|
|
17
17
|
function te(v) {
|
|
18
18
|
const { title: w, description: $, actions: t } = v, a = w || $, l = t && t.length;
|
|
19
19
|
return [a || l, a, l];
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
const { style: w, className: $, title: t, description: a, actions: l, prefixCls: o, simple: x } = v, [s,
|
|
21
|
+
const Ae = (v) => {
|
|
22
|
+
const { style: w, className: $, title: t, description: a, actions: l, prefixCls: o, simple: x } = v, [s, L, b] = te({
|
|
23
23
|
title: t,
|
|
24
24
|
description: a,
|
|
25
25
|
actions: l
|
|
26
26
|
});
|
|
27
|
-
if (!s)
|
|
28
|
-
|
|
27
|
+
if (!s)
|
|
28
|
+
return null;
|
|
29
|
+
const c = `${o}-footer`, V = g(c, $, {
|
|
29
30
|
[`${c}-with-actions`]: b
|
|
30
31
|
}), y = () => {
|
|
31
32
|
const N = /* @__PURE__ */ e("div", { className: `${o}-actions-list`, children: l.map((E, C) => /* @__PURE__ */ e("div", { className: `${o}-actions-item`, children: E }, `${C}`)) });
|
|
32
|
-
return x ? /* @__PURE__ */ e("div", { className: `${o}-actions-list`, children: /* @__PURE__ */ e(
|
|
33
|
+
return x ? /* @__PURE__ */ e("div", { className: `${o}-actions-list`, children: /* @__PURE__ */ e(je, { prefixCls: o, popup: () => N, children: /* @__PURE__ */ e(
|
|
33
34
|
"div",
|
|
34
35
|
{
|
|
35
|
-
className:
|
|
36
|
+
className: g(
|
|
36
37
|
`${o}-actions-item`,
|
|
37
38
|
`${o}-actions-item-trigger`
|
|
38
39
|
),
|
|
39
|
-
children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
|
|
40
|
+
children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(Ue, {}) })
|
|
40
41
|
}
|
|
41
42
|
) }) }) : N;
|
|
42
43
|
};
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
|
|
44
|
+
return /* @__PURE__ */ h("div", { className: V, style: w, children: [
|
|
45
|
+
L && /* @__PURE__ */ h("div", { className: g(`${c}-block`, `${o}-caption`), children: [
|
|
45
46
|
t && /* @__PURE__ */ e("div", { className: `${o}-caption-title`, title: t, children: t }),
|
|
46
47
|
a && !x && /* @__PURE__ */ e(
|
|
47
48
|
"div",
|
|
@@ -52,118 +53,122 @@ const ke = (v) => {
|
|
|
52
53
|
}
|
|
53
54
|
)
|
|
54
55
|
] }),
|
|
55
|
-
b && /* @__PURE__ */ e("div", { className:
|
|
56
|
+
b && /* @__PURE__ */ e("div", { className: g(`${c}-block`, `${o}-actions`), children: y() })
|
|
56
57
|
] });
|
|
57
58
|
};
|
|
58
|
-
let
|
|
59
|
-
const
|
|
59
|
+
let K = 0;
|
|
60
|
+
const Oe = {
|
|
60
61
|
footerPosition: "inner",
|
|
61
62
|
preview: !0
|
|
62
63
|
};
|
|
63
|
-
function
|
|
64
|
-
const { getPrefixCls: $, componentConfig: t, rtl: a } = re(Ve), l =
|
|
64
|
+
function ze(v, w) {
|
|
65
|
+
const { getPrefixCls: $, componentConfig: t, rtl: a } = re(Ve), l = Fe(
|
|
65
66
|
v,
|
|
66
|
-
|
|
67
|
+
Oe,
|
|
67
68
|
t == null ? void 0 : t.Image
|
|
68
69
|
), {
|
|
69
70
|
style: o,
|
|
70
71
|
className: x,
|
|
71
72
|
src: s,
|
|
72
|
-
width:
|
|
73
|
+
width: L,
|
|
73
74
|
height: b,
|
|
74
75
|
title: c,
|
|
75
|
-
description:
|
|
76
|
+
description: V,
|
|
76
77
|
actions: y,
|
|
77
78
|
footerPosition: N,
|
|
78
79
|
simple: E,
|
|
79
80
|
loader: C,
|
|
80
81
|
loaderClassName: se,
|
|
81
|
-
|
|
82
|
+
loaderTip: ne,
|
|
83
|
+
error: ae,
|
|
82
84
|
preview: u,
|
|
83
85
|
previewProps: U,
|
|
84
86
|
alt: j,
|
|
85
|
-
onClick:
|
|
86
|
-
index:
|
|
87
|
+
onClick: S,
|
|
88
|
+
index: T,
|
|
87
89
|
_index: D,
|
|
88
90
|
onError: k,
|
|
89
91
|
onLoad: A,
|
|
90
92
|
lazyload: f,
|
|
91
|
-
...
|
|
92
|
-
} = l,
|
|
93
|
+
...ce
|
|
94
|
+
} = l, le = Ee(), {
|
|
93
95
|
previewGroup: P,
|
|
94
|
-
handleVisibleChange:
|
|
95
|
-
registerPreviewUrl:
|
|
96
|
-
registerPreviewProps:
|
|
97
|
-
setCurrentIndex:
|
|
98
|
-
} = re(
|
|
96
|
+
handleVisibleChange: de,
|
|
97
|
+
registerPreviewUrl: me,
|
|
98
|
+
registerPreviewProps: ue,
|
|
99
|
+
setCurrentIndex: fe
|
|
100
|
+
} = re(Te), n = R(() => ee(U) ? U : {}, [U]), pe = R(() => ee(f) ? f : {}, [f]), d = R(() => B(T) || B(D) ? (K = B(T) ? T : D, K) : K++, []), O = n.src || s, [z] = te({ title: c, description: V, actions: y }), { isLoading: H, isError: M, isLoaded: p, isBeforeLoad: he, setStatus: I } = ke("beforeLoad"), F = oe(!1), [J, ge] = Re(!1, {
|
|
99
101
|
defaultValue: n.defaultVisible,
|
|
100
102
|
value: n.visible
|
|
101
|
-
}),
|
|
103
|
+
}), _ = R(() => Ge(n, [
|
|
102
104
|
"visible",
|
|
103
105
|
"defaultVisible",
|
|
104
106
|
"src",
|
|
105
107
|
"onVisibleChange"
|
|
106
|
-
]), [n]), r = $("image"),
|
|
108
|
+
]), [n]), r = $("image"), ve = !xe(n.visible), we = g(
|
|
107
109
|
r,
|
|
108
110
|
{
|
|
109
111
|
[`${r}-rtl`]: a,
|
|
110
112
|
[`${r}-simple`]: E,
|
|
111
|
-
[`${r}-before-load`]:
|
|
113
|
+
[`${r}-before-load`]: he,
|
|
112
114
|
[`${r}-loading`]: H,
|
|
113
|
-
[`${r}-loading-error`]:
|
|
114
|
-
[`${r}-with-footer-inner`]: p &&
|
|
115
|
-
[`${r}-with-footer-outer`]: p &&
|
|
116
|
-
[`${r}-with-preview`]: p && u && !
|
|
115
|
+
[`${r}-loading-error`]: M,
|
|
116
|
+
[`${r}-with-footer-inner`]: p && z && N === "inner",
|
|
117
|
+
[`${r}-with-footer-outer`]: p && z && N === "outer",
|
|
118
|
+
[`${r}-with-preview`]: p && u && !M && !ve
|
|
117
119
|
},
|
|
118
120
|
x
|
|
119
121
|
), m = oe();
|
|
120
|
-
function
|
|
122
|
+
function $e(i) {
|
|
121
123
|
F.current = !0, I("loaded"), A == null || A(i);
|
|
122
124
|
}
|
|
123
|
-
function
|
|
125
|
+
function be(i) {
|
|
124
126
|
F.current = !0, I("error"), k == null || k(i);
|
|
125
127
|
}
|
|
126
128
|
function Q(i) {
|
|
127
|
-
u && P ? (
|
|
129
|
+
u && P ? (fe(d), de(!0)) : u && W(!0), S == null || S(i);
|
|
128
130
|
}
|
|
129
131
|
function W(i) {
|
|
130
132
|
var Z;
|
|
131
133
|
(Z = n == null ? void 0 : n.onVisibleChange) == null || Z.call(n, i, J), ge(i);
|
|
132
134
|
}
|
|
133
|
-
const { inView: X } =
|
|
135
|
+
const { inView: X } = ye({
|
|
134
136
|
target: m.current,
|
|
135
137
|
defaultInView: !f,
|
|
136
|
-
...
|
|
138
|
+
...pe
|
|
137
139
|
});
|
|
138
140
|
G(() => {
|
|
139
141
|
F.current = !1, s || I("error");
|
|
140
142
|
}, [s]), G(() => {
|
|
141
143
|
m.current && (X ? ((m.current.src || s) && m.current.src !== s && (m.current.src = s), !F.current && !m.current.complete && I("loading")) : I("lazyload"));
|
|
142
144
|
}, [s, X]), G(() => {
|
|
143
|
-
if (!P)
|
|
144
|
-
|
|
145
|
+
if (!P)
|
|
146
|
+
return;
|
|
147
|
+
const i = ue(d, _);
|
|
145
148
|
return () => i(d);
|
|
146
|
-
}, [d, P,
|
|
147
|
-
if (!P)
|
|
148
|
-
|
|
149
|
+
}, [d, P, _]), G(() => {
|
|
150
|
+
if (!P)
|
|
151
|
+
return;
|
|
152
|
+
const i = me(d, O, u);
|
|
149
153
|
return () => i(d);
|
|
150
154
|
}, [d, P, O, u]);
|
|
151
|
-
const
|
|
152
|
-
/* @__PURE__ */ e("div", { className: `${r}-error-icon`, children: /* @__PURE__ */ e(
|
|
155
|
+
const Ne = /* @__PURE__ */ h("div", { className: `${r}-error`, children: [
|
|
156
|
+
/* @__PURE__ */ e("div", { className: `${r}-error-icon`, children: /* @__PURE__ */ e(Pe, {}) }),
|
|
153
157
|
j && /* @__PURE__ */ e("div", { className: `${r}-error-alt`, children: j })
|
|
154
|
-
] }), Y = /* @__PURE__ */ e("div", { className:
|
|
155
|
-
/* @__PURE__ */ e(
|
|
156
|
-
/* @__PURE__ */ e("div", { className: `${r}-loader-spin-text`, children: "Loading" })
|
|
157
|
-
] }) }),
|
|
158
|
-
if (C === !0)
|
|
158
|
+
] }), Y = /* @__PURE__ */ e("div", { className: g(`${r}-loader`, se), children: /* @__PURE__ */ h("div", { className: `${r}-loader-spin`, children: [
|
|
159
|
+
/* @__PURE__ */ e(Ie, {}),
|
|
160
|
+
/* @__PURE__ */ e("div", { className: `${r}-loader-spin-text`, children: ne ?? "Loading" })
|
|
161
|
+
] }) }), Ce = () => {
|
|
162
|
+
if (C === !0)
|
|
163
|
+
return Y;
|
|
159
164
|
const i = C || Y;
|
|
160
165
|
return f || C ? i : null;
|
|
161
166
|
};
|
|
162
|
-
return /* @__PURE__ */
|
|
167
|
+
return /* @__PURE__ */ h(
|
|
163
168
|
"div",
|
|
164
169
|
{
|
|
165
|
-
className:
|
|
166
|
-
style: Object.assign({ width:
|
|
170
|
+
className: we,
|
|
171
|
+
style: Object.assign({ width: L, height: b }, o),
|
|
167
172
|
ref: w,
|
|
168
173
|
children: [
|
|
169
174
|
/* @__PURE__ */ e(
|
|
@@ -172,29 +177,29 @@ function Oe(v, w) {
|
|
|
172
177
|
ref: m,
|
|
173
178
|
className: `${r}-img`,
|
|
174
179
|
tabIndex: 0,
|
|
175
|
-
...
|
|
180
|
+
...le({
|
|
176
181
|
onPressEnter: Q
|
|
177
182
|
}),
|
|
178
|
-
...
|
|
183
|
+
...ce,
|
|
179
184
|
...f || s === void 0 ? {} : { src: s },
|
|
180
185
|
title: c,
|
|
181
|
-
width:
|
|
186
|
+
width: L,
|
|
182
187
|
height: b,
|
|
183
|
-
onLoad:
|
|
184
|
-
onError:
|
|
188
|
+
onLoad: $e,
|
|
189
|
+
onError: be,
|
|
185
190
|
onClick: Q,
|
|
186
191
|
alt: j
|
|
187
192
|
}
|
|
188
193
|
),
|
|
189
|
-
!p && /* @__PURE__ */
|
|
190
|
-
|
|
191
|
-
H &&
|
|
194
|
+
!p && /* @__PURE__ */ h("div", { className: `${r}-overlay`, children: [
|
|
195
|
+
M && (ae || Ne),
|
|
196
|
+
H && Ce()
|
|
192
197
|
] }),
|
|
193
|
-
p &&
|
|
194
|
-
|
|
198
|
+
p && z && /* @__PURE__ */ e(
|
|
199
|
+
Ae,
|
|
195
200
|
{
|
|
196
201
|
title: c,
|
|
197
|
-
description:
|
|
202
|
+
description: V,
|
|
198
203
|
actions: y,
|
|
199
204
|
prefixCls: r,
|
|
200
205
|
simple: E
|
|
@@ -205,7 +210,7 @@ function Oe(v, w) {
|
|
|
205
210
|
{
|
|
206
211
|
visible: J,
|
|
207
212
|
src: O,
|
|
208
|
-
...
|
|
213
|
+
..._,
|
|
209
214
|
onVisibleChange: W
|
|
210
215
|
}
|
|
211
216
|
)
|
|
@@ -213,11 +218,11 @@ function Oe(v, w) {
|
|
|
213
218
|
}
|
|
214
219
|
);
|
|
215
220
|
}
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
), q =
|
|
221
|
+
const Me = Le.forwardRef(
|
|
222
|
+
ze
|
|
223
|
+
), q = Me;
|
|
219
224
|
q.Preview = ie;
|
|
220
|
-
q.PreviewGroup =
|
|
225
|
+
q.PreviewGroup = Se;
|
|
221
226
|
q.displayName = "Image";
|
|
222
227
|
export {
|
|
223
228
|
q as I
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { jsxs as q, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import fe from "@unicom-cloud/icons/IconUiClose";
|
|
3
|
+
import U from "lodash/isArray";
|
|
4
|
+
import { forwardRef as oe, useContext as ne, useRef as b, useState as te, useImperativeHandle as se } from "react";
|
|
5
|
+
import { a as re, I as me } from "./BJQ5UNa-.js";
|
|
6
|
+
import { m as G } from "./JPPo5nY_.js";
|
|
7
|
+
import { e as ie, c as ue } from "./BrOW642m.js";
|
|
8
|
+
import { c as $e } from "./BdUcgWdu.js";
|
|
9
|
+
function Ne({
|
|
10
|
+
style: J,
|
|
11
|
+
className: Q,
|
|
12
|
+
prefixCls: V,
|
|
13
|
+
allowClear: X,
|
|
14
|
+
status: Y,
|
|
15
|
+
error: $,
|
|
16
|
+
disabled: k,
|
|
17
|
+
placeholder: g,
|
|
18
|
+
format: F,
|
|
19
|
+
size: z,
|
|
20
|
+
onClear: Z,
|
|
21
|
+
editable: _,
|
|
22
|
+
value: u,
|
|
23
|
+
inputValue: D,
|
|
24
|
+
onPressEnter: d,
|
|
25
|
+
suffixIcon: v,
|
|
26
|
+
prefix: y,
|
|
27
|
+
onChange: w,
|
|
28
|
+
popupVisible: x,
|
|
29
|
+
isPlaceholder: B,
|
|
30
|
+
inputProps: c,
|
|
31
|
+
...I
|
|
32
|
+
}, R) {
|
|
33
|
+
const {
|
|
34
|
+
getPrefixCls: n,
|
|
35
|
+
size: K,
|
|
36
|
+
locale: T,
|
|
37
|
+
rtl: E
|
|
38
|
+
} = ne(re), O = b(null), [P, H] = te(!1), p = z || K, N = b(null);
|
|
39
|
+
se(R, () => ({
|
|
40
|
+
focus() {
|
|
41
|
+
var o, s;
|
|
42
|
+
(s = (o = O.current) == null ? void 0 : o.focus) == null || s.call(o);
|
|
43
|
+
},
|
|
44
|
+
blur() {
|
|
45
|
+
var o, s;
|
|
46
|
+
(s = (o = O.current) == null ? void 0 : o.blur) == null || s.call(o);
|
|
47
|
+
},
|
|
48
|
+
getRootDOMNode: () => N.current
|
|
49
|
+
}));
|
|
50
|
+
function S(o) {
|
|
51
|
+
var j;
|
|
52
|
+
(j = c == null ? void 0 : c.onKeyDown) == null || j.call(c, o), o.key === ie.key && (d == null || d());
|
|
53
|
+
}
|
|
54
|
+
function L(o) {
|
|
55
|
+
var s;
|
|
56
|
+
(s = c == null ? void 0 : c.onChange) == null || s.call(c, o), w == null || w(o);
|
|
57
|
+
}
|
|
58
|
+
let h = "";
|
|
59
|
+
D !== void 0 ? h = D : u && !U(u) && (h = typeof F == "function" ? F(u) : u.locale(T.dayjsLocale).format(F));
|
|
60
|
+
const M = _ ? {} : { readOnly: !0 }, t = V || n("picker"), C = Y || ($ ? "error" : void 0), W = P || x, A = G(
|
|
61
|
+
t,
|
|
62
|
+
`${t}-size-${p}`,
|
|
63
|
+
{
|
|
64
|
+
[`${t}-focused`]: W,
|
|
65
|
+
[`${t}-disabled`]: k,
|
|
66
|
+
[`${t}-has-prefix`]: y,
|
|
67
|
+
[`${t}-${C}`]: C,
|
|
68
|
+
[`${t}-rtl`]: E
|
|
69
|
+
},
|
|
70
|
+
Q
|
|
71
|
+
);
|
|
72
|
+
return /* @__PURE__ */ q(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
style: J,
|
|
76
|
+
className: A,
|
|
77
|
+
ref: N,
|
|
78
|
+
...$e(I, ["onChange", "onPressEnter"]),
|
|
79
|
+
children: [
|
|
80
|
+
y && /* @__PURE__ */ m("div", { className: `${t}-prefix`, children: y }),
|
|
81
|
+
/* @__PURE__ */ m(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
className: G(`${t}-input`, {
|
|
85
|
+
[`${t}-input-placeholder`]: B
|
|
86
|
+
}),
|
|
87
|
+
children: /* @__PURE__ */ m(
|
|
88
|
+
"input",
|
|
89
|
+
{
|
|
90
|
+
ref: O,
|
|
91
|
+
...c,
|
|
92
|
+
disabled: k,
|
|
93
|
+
placeholder: g,
|
|
94
|
+
className: `${t}-start-time`,
|
|
95
|
+
value: h,
|
|
96
|
+
onKeyDown: S,
|
|
97
|
+
onChange: L,
|
|
98
|
+
...M,
|
|
99
|
+
onFocus: (o) => {
|
|
100
|
+
var s;
|
|
101
|
+
H(!0), (s = c == null ? void 0 : c.onFocus) == null || s.call(c, o);
|
|
102
|
+
},
|
|
103
|
+
onBlur: (o) => {
|
|
104
|
+
var s;
|
|
105
|
+
H(!1), (s = c == null ? void 0 : c.onBlur) == null || s.call(c, o);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
/* @__PURE__ */ q("div", { className: `${t}-suffix`, children: [
|
|
112
|
+
X && h && /* @__PURE__ */ m(
|
|
113
|
+
me,
|
|
114
|
+
{
|
|
115
|
+
prefix: t,
|
|
116
|
+
onClick: Z,
|
|
117
|
+
className: `${t}-clear-icon`,
|
|
118
|
+
children: /* @__PURE__ */ m(fe, {})
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
/* @__PURE__ */ m("span", { className: `${t}-suffix-icon`, children: v })
|
|
122
|
+
] })
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
const Ke = oe(Ne);
|
|
128
|
+
function Ce({
|
|
129
|
+
allowClear: J,
|
|
130
|
+
error: Q,
|
|
131
|
+
status: V,
|
|
132
|
+
style: X,
|
|
133
|
+
className: Y,
|
|
134
|
+
disabled: $,
|
|
135
|
+
placeholder: k = [],
|
|
136
|
+
value: g = [],
|
|
137
|
+
popupVisible: F,
|
|
138
|
+
format: z,
|
|
139
|
+
size: Z,
|
|
140
|
+
onClear: _,
|
|
141
|
+
editable: u,
|
|
142
|
+
inputValue: D,
|
|
143
|
+
onPressEnter: d,
|
|
144
|
+
onPressTab: v,
|
|
145
|
+
onChange: y,
|
|
146
|
+
separator: w,
|
|
147
|
+
suffixIcon: x,
|
|
148
|
+
changeFocusedInputIndex: B,
|
|
149
|
+
focusedInputIndex: c,
|
|
150
|
+
isPlaceholder: I,
|
|
151
|
+
prefix: R,
|
|
152
|
+
inputProps: n = [],
|
|
153
|
+
onBlur: K,
|
|
154
|
+
...T
|
|
155
|
+
}, E) {
|
|
156
|
+
const {
|
|
157
|
+
getPrefixCls: O,
|
|
158
|
+
size: P,
|
|
159
|
+
locale: H,
|
|
160
|
+
rtl: p
|
|
161
|
+
} = ne(re), N = b(null), S = b(null), L = b(null), [h, M] = te([!1, !1]), t = U($) ? $[0] : $, C = U($) ? $[1] : $;
|
|
162
|
+
se(E, () => ({
|
|
163
|
+
focus(e) {
|
|
164
|
+
var f, i;
|
|
165
|
+
(c === 0 && !t || c === 1 && !C) && ((i = (f = ((typeof e == "number" ? e : c) === 0 ? N : S).current) == null ? void 0 : f.focus) == null || i.call(f));
|
|
166
|
+
},
|
|
167
|
+
blur() {
|
|
168
|
+
var e, a, l, f;
|
|
169
|
+
c === 0 && ((a = (e = N.current) == null ? void 0 : e.blur) == null || a.call(e)), c === 1 && ((f = (l = S.current) == null ? void 0 : l.blur) == null || f.call(l));
|
|
170
|
+
},
|
|
171
|
+
getRootDOMNode: () => L.current
|
|
172
|
+
}));
|
|
173
|
+
function W(e, a) {
|
|
174
|
+
var l, f;
|
|
175
|
+
(f = (l = n == null ? void 0 : n[a]) == null ? void 0 : l.onClick) == null || f.call(l, e), c !== a && B(a);
|
|
176
|
+
}
|
|
177
|
+
function A(e, a) {
|
|
178
|
+
var f, i;
|
|
179
|
+
const l = e.key;
|
|
180
|
+
(i = (f = n == null ? void 0 : n[a]) == null ? void 0 : f.onKeyDown) == null || i.call(f, e), l === ie.key && (d == null || d()), l === ue.key && (v == null || v(e));
|
|
181
|
+
}
|
|
182
|
+
function o(e, a) {
|
|
183
|
+
var l, f;
|
|
184
|
+
e.stopPropagation(), (f = (l = n == null ? void 0 : n[a]) == null ? void 0 : l.onChange) == null || f.call(l, e), y == null || y(e);
|
|
185
|
+
}
|
|
186
|
+
function s(e, a) {
|
|
187
|
+
var l, f;
|
|
188
|
+
M((i) => (i[a] = !1, [...i])), (f = (l = n == null ? void 0 : n[a]) == null ? void 0 : l.onBlur) == null || f.call(l, e), K == null || K(e);
|
|
189
|
+
}
|
|
190
|
+
function j(e, a) {
|
|
191
|
+
var l, f;
|
|
192
|
+
(a === 0 || a === 1) && (M((i) => (i[a] = !0, [...i])), c !== a && B(a, !0)), (f = (l = n == null ? void 0 : n[a]) == null ? void 0 : l.onFocus) == null || f.call(l, e);
|
|
193
|
+
}
|
|
194
|
+
const r = O("picker"), de = Z || P, ye = h[0] || h[1] || !!F, ee = V || (Q ? "error" : void 0), he = G(
|
|
195
|
+
r,
|
|
196
|
+
`${r}-range`,
|
|
197
|
+
`${r}-size-${de}`,
|
|
198
|
+
{
|
|
199
|
+
[`${r}-focused`]: ye,
|
|
200
|
+
[`${r}-disabled`]: t && C,
|
|
201
|
+
[`${r}-${ee}`]: ee,
|
|
202
|
+
[`${r}-rtl`]: p,
|
|
203
|
+
[`${r}-has-prefix`]: R
|
|
204
|
+
},
|
|
205
|
+
Y
|
|
206
|
+
), ce = (e) => {
|
|
207
|
+
const a = g[e] ? g[e].locale(H.dayjsLocale).format(U(z) ? z[e] : z) : "";
|
|
208
|
+
return D && e === c ? D : a;
|
|
209
|
+
}, le = u ? {} : { readOnly: !0 };
|
|
210
|
+
function ae(e) {
|
|
211
|
+
return G(`${r}-input`, {
|
|
212
|
+
[`${r}-input-active`]: c === e,
|
|
213
|
+
[`${r}-input-placeholder`]: I && c === e
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
return /* @__PURE__ */ q(
|
|
217
|
+
"div",
|
|
218
|
+
{
|
|
219
|
+
style: X,
|
|
220
|
+
ref: L,
|
|
221
|
+
className: he,
|
|
222
|
+
...$e(T, ["onChange", "onPressEnter"]),
|
|
223
|
+
children: [
|
|
224
|
+
R && /* @__PURE__ */ m("div", { className: `${r}-prefix`, children: R }),
|
|
225
|
+
/* @__PURE__ */ m("div", { className: ae(0), children: /* @__PURE__ */ m(
|
|
226
|
+
"input",
|
|
227
|
+
{
|
|
228
|
+
ref: N,
|
|
229
|
+
...n[0],
|
|
230
|
+
disabled: t,
|
|
231
|
+
placeholder: k[0],
|
|
232
|
+
value: ce(0),
|
|
233
|
+
onChange: (e) => o(e, 0),
|
|
234
|
+
onKeyDown: (e) => A(e, 0),
|
|
235
|
+
onClick: (e) => W(e, 0),
|
|
236
|
+
onBlur: (e) => s(e, 0),
|
|
237
|
+
onFocus: (e) => j(e, 0),
|
|
238
|
+
...le
|
|
239
|
+
}
|
|
240
|
+
) }),
|
|
241
|
+
/* @__PURE__ */ m("span", { className: `${r}-separator`, children: w || "-" }),
|
|
242
|
+
/* @__PURE__ */ m("div", { className: ae(1), children: /* @__PURE__ */ m(
|
|
243
|
+
"input",
|
|
244
|
+
{
|
|
245
|
+
ref: S,
|
|
246
|
+
...n[1],
|
|
247
|
+
disabled: C,
|
|
248
|
+
placeholder: k[1],
|
|
249
|
+
value: ce(1),
|
|
250
|
+
onChange: (e) => o(e, 1),
|
|
251
|
+
onKeyDown: (e) => A(e, 1),
|
|
252
|
+
onClick: (e) => W(e, 1),
|
|
253
|
+
onBlur: (e) => s(e, 1),
|
|
254
|
+
onFocus: (e) => j(e, 1),
|
|
255
|
+
...le
|
|
256
|
+
}
|
|
257
|
+
) }),
|
|
258
|
+
/* @__PURE__ */ q("div", { className: `${r}-suffix`, children: [
|
|
259
|
+
J && g.length === 2 && /* @__PURE__ */ m(
|
|
260
|
+
me,
|
|
261
|
+
{
|
|
262
|
+
prefix: r,
|
|
263
|
+
onClick: _,
|
|
264
|
+
className: `${r}-clear-icon`,
|
|
265
|
+
children: /* @__PURE__ */ m(fe, {})
|
|
266
|
+
}
|
|
267
|
+
),
|
|
268
|
+
/* @__PURE__ */ m("span", { className: `${r}-suffix-icon`, children: x })
|
|
269
|
+
] })
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
const Oe = oe(Ce);
|
|
275
|
+
export {
|
|
276
|
+
Ke as I,
|
|
277
|
+
Oe as a
|
|
278
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useRef as u } from "react";
|
|
2
|
+
function s(c) {
|
|
3
|
+
const r = u(), e = () => {
|
|
4
|
+
r.current && (r.current.disconnect(), r.current = null);
|
|
5
|
+
}, t = (n) => {
|
|
6
|
+
n && (r.current && e(), r.current = new ResizeObserver(c), r.current.observe(n));
|
|
7
|
+
};
|
|
8
|
+
return {
|
|
9
|
+
currentOr: r.current,
|
|
10
|
+
cor: t,
|
|
11
|
+
dor: e
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
s as o
|
|
16
|
+
};
|