@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/Slider.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as I, jsxs as ge } from "react/jsx-runtime";
|
|
2
|
-
import { i as pe, o as we, u as oe, d as Re } from "./chunk/
|
|
2
|
+
import { i as pe, o as we, u as oe, d as Re } from "./chunk/BoMCZV6K.js";
|
|
3
3
|
import he from "lodash/isArray";
|
|
4
|
-
import
|
|
4
|
+
import B from "lodash/isFunction";
|
|
5
5
|
import re from "lodash/isPlainObject";
|
|
6
|
-
import _, { useState as Se, useContext as Le, useMemo as Z, useRef as S, useEffect as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { on as
|
|
13
|
-
import
|
|
6
|
+
import _, { useState as Se, useContext as Le, useMemo as Z, useRef as S, useEffect as Be, createElement as De, useCallback as H, forwardRef as st } from "react";
|
|
7
|
+
import { a as Ee } from "./chunk/BJQ5UNa-.js";
|
|
8
|
+
import { c as at } from "./chunk/B5gK1Idp.js";
|
|
9
|
+
import { R as Fe } from "./chunk/HDUQku8d.js";
|
|
10
|
+
import { c as ut } from "./chunk/BbEYToV1.js";
|
|
11
|
+
import { m as U } from "./chunk/JPPo5nY_.js";
|
|
12
|
+
import { on as W, off as X } from "./utils/dom.js";
|
|
13
|
+
import { c as ct } from "./chunk/BdUcgWdu.js";
|
|
14
14
|
import ne from "lodash/isNumber";
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
15
|
+
import lt from "lodash/isString";
|
|
16
|
+
import { h as ft } from "./chunk/D2KPqPhV.js";
|
|
17
17
|
import mt from "./Trigger.js";
|
|
18
|
-
import { a as Te } from "./chunk/
|
|
18
|
+
import { a as Te } from "./chunk/C42LIMP9.js";
|
|
19
19
|
import { G as dt } from "./chunk/CSC_V_25.js";
|
|
20
20
|
import gt from "lodash/isUndefined";
|
|
21
21
|
const pt = { maxWidth: 350 }, ht = {
|
|
@@ -35,22 +35,22 @@ const pt = { maxWidth: 350 }, ht = {
|
|
|
35
35
|
vertical: d,
|
|
36
36
|
tooltipVisible: N,
|
|
37
37
|
tooltipPosition: m,
|
|
38
|
-
formatTooltip:
|
|
39
|
-
getTooltipContainer:
|
|
40
|
-
onMoving:
|
|
41
|
-
onMoveEnd:
|
|
38
|
+
formatTooltip: V,
|
|
39
|
+
getTooltipContainer: l,
|
|
40
|
+
onMoving: M,
|
|
41
|
+
onMoveEnd: v,
|
|
42
42
|
onMoveBegin: f
|
|
43
|
-
} = e, t = ft(), [g,
|
|
43
|
+
} = e, t = ft(), [g, b] = Se(!1), [w, i] = Fe(!1, {
|
|
44
44
|
value: N
|
|
45
|
-
}), { getPrefixCls: u } = Le(
|
|
45
|
+
}), { getPrefixCls: u } = Le(Ee), x = Z(
|
|
46
46
|
() => m || (d ? "right" : "top"),
|
|
47
47
|
[m, d]
|
|
48
48
|
), T = S(null), K = S(!1), z = S(!1), P = S(null);
|
|
49
|
-
function ae(
|
|
50
|
-
|
|
49
|
+
function ae(p) {
|
|
50
|
+
p.stopPropagation(), !n && (ie(p), b(!0), W(window, "mousemove", L), W(window, "touchmove", L), W(window, "mouseup", R), W(window, "touchend", R), W(window, "contextmenu", R));
|
|
51
51
|
}
|
|
52
52
|
function O() {
|
|
53
|
-
K.current = !0, G(),
|
|
53
|
+
K.current = !0, G(), w || (T.current = setTimeout(() => {
|
|
54
54
|
j(!0);
|
|
55
55
|
}, 50));
|
|
56
56
|
}
|
|
@@ -59,53 +59,55 @@ const pt = { maxWidth: 350 }, ht = {
|
|
|
59
59
|
j(!1);
|
|
60
60
|
}, 200));
|
|
61
61
|
}
|
|
62
|
-
function ie(
|
|
63
|
-
var
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
(
|
|
62
|
+
function ie(p) {
|
|
63
|
+
var E;
|
|
64
|
+
p.preventDefault();
|
|
65
|
+
const C = document.activeElement;
|
|
66
|
+
(E = C == null ? void 0 : C.blur) == null || E.call(C), B(f) && f();
|
|
67
67
|
}
|
|
68
|
-
function L(
|
|
69
|
-
z.current = !0,
|
|
68
|
+
function L(p) {
|
|
69
|
+
z.current = !0, p.type === "touchstart" && (p.clientY = p.touches[0].clientY, p.clientX = p.touches[0].clientX), B(M) && M(p.clientX, p.clientY);
|
|
70
70
|
}
|
|
71
71
|
function R() {
|
|
72
|
-
z.current = !1,
|
|
72
|
+
z.current = !1, b(!1), ue(), j(K.current), B(v) && v();
|
|
73
73
|
}
|
|
74
74
|
function ue() {
|
|
75
|
-
G(),
|
|
75
|
+
G(), X(window, "mousemove", L), X(window, "touchmove", L), X(window, "mouseup", R), X(window, "touchend", R), X(window, "contextmenu", R);
|
|
76
76
|
}
|
|
77
77
|
function G() {
|
|
78
78
|
T.current && (clearTimeout(T.current), T.current = null);
|
|
79
79
|
}
|
|
80
|
-
function j(
|
|
81
|
-
if (z.current)
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
function j(p) {
|
|
81
|
+
if (z.current)
|
|
82
|
+
return;
|
|
83
|
+
const C = "tooltipVisible" in e ? N : p;
|
|
84
|
+
i(C);
|
|
84
85
|
}
|
|
85
|
-
function
|
|
86
|
+
function ce() {
|
|
86
87
|
K.current = !0, G();
|
|
87
88
|
}
|
|
88
|
-
const
|
|
89
|
-
function ee(
|
|
90
|
-
const
|
|
89
|
+
const k = Z(() => B(V) ? V(s) : s, [V, s]);
|
|
90
|
+
function ee(p) {
|
|
91
|
+
const C = u("tooltip");
|
|
91
92
|
return /* @__PURE__ */ I(
|
|
92
93
|
"div",
|
|
93
94
|
{
|
|
94
|
-
className:
|
|
95
|
-
`${
|
|
96
|
-
`${
|
|
95
|
+
className: U(
|
|
96
|
+
`${C}-content`,
|
|
97
|
+
`${C}-content-${p}`
|
|
97
98
|
),
|
|
98
99
|
onMouseLeave: D,
|
|
99
|
-
onMouseEnter:
|
|
100
|
-
onClick: (
|
|
101
|
-
|
|
100
|
+
onMouseEnter: ce,
|
|
101
|
+
onClick: (E) => {
|
|
102
|
+
E.stopPropagation();
|
|
102
103
|
},
|
|
103
|
-
children: /* @__PURE__ */ I("div", { className: `${
|
|
104
|
+
children: /* @__PURE__ */ I("div", { className: `${C}-content-inner`, children: k })
|
|
104
105
|
}
|
|
105
106
|
);
|
|
106
107
|
}
|
|
107
|
-
return
|
|
108
|
-
|
|
108
|
+
return Be(() => {
|
|
109
|
+
var p, C;
|
|
110
|
+
(C = (p = P.current) == null ? void 0 : p.update) == null || C.call(p);
|
|
109
111
|
}, [s]), /* @__PURE__ */ I(
|
|
110
112
|
mt,
|
|
111
113
|
{
|
|
@@ -115,16 +117,16 @@ const pt = { maxWidth: 350 }, ht = {
|
|
|
115
117
|
showArrow: !0,
|
|
116
118
|
popupAlign: vt,
|
|
117
119
|
ref: P,
|
|
118
|
-
popup: () => ee(
|
|
119
|
-
popupVisible:
|
|
120
|
+
popup: () => ee(x),
|
|
121
|
+
popupVisible: w,
|
|
120
122
|
disabled: N === !1,
|
|
121
|
-
getPopupContainer:
|
|
122
|
-
position:
|
|
123
|
+
getPopupContainer: l,
|
|
124
|
+
position: x,
|
|
123
125
|
childrenPrefix: u("tooltip"),
|
|
124
126
|
children: /* @__PURE__ */ I(
|
|
125
127
|
"div",
|
|
126
128
|
{
|
|
127
|
-
className:
|
|
129
|
+
className: U(`${r}-button`, {
|
|
128
130
|
[`${r}-button-active`]: g
|
|
129
131
|
}),
|
|
130
132
|
onMouseDown: ae,
|
|
@@ -137,23 +139,23 @@ const pt = { maxWidth: 350 }, ht = {
|
|
|
137
139
|
"aria-valuenow": s,
|
|
138
140
|
"aria-disabled": !!n,
|
|
139
141
|
tabIndex: n ? -1 : 0,
|
|
140
|
-
"aria-valuetext":
|
|
142
|
+
"aria-valuetext": lt(k) || ne(k) ? String(k) : void 0,
|
|
141
143
|
...t({
|
|
142
|
-
onArrowRight: (
|
|
143
|
-
var
|
|
144
|
-
|
|
144
|
+
onArrowRight: (p) => {
|
|
145
|
+
var C;
|
|
146
|
+
p.preventDefault(), (C = e.onArrowEvent) == null || C.call(e, "addition");
|
|
145
147
|
},
|
|
146
|
-
onArrowUp: (
|
|
147
|
-
var
|
|
148
|
-
|
|
148
|
+
onArrowUp: (p) => {
|
|
149
|
+
var C;
|
|
150
|
+
p.preventDefault(), (C = e.onArrowEvent) == null || C.call(e, "addition");
|
|
149
151
|
},
|
|
150
|
-
onArrowLeft: (
|
|
151
|
-
var
|
|
152
|
-
|
|
152
|
+
onArrowLeft: (p) => {
|
|
153
|
+
var C;
|
|
154
|
+
p.preventDefault(), (C = e.onArrowEvent) == null || C.call(e, "subtraction");
|
|
153
155
|
},
|
|
154
|
-
onArrowDown: (
|
|
155
|
-
var
|
|
156
|
-
|
|
156
|
+
onArrowDown: (p) => {
|
|
157
|
+
var C;
|
|
158
|
+
p.preventDefault(), (C = e.onArrowEvent) == null || C.call(e, "subtraction");
|
|
157
159
|
}
|
|
158
160
|
})
|
|
159
161
|
}
|
|
@@ -165,12 +167,12 @@ function Vt(e) {
|
|
|
165
167
|
const o = `${e}`.split(".")[1];
|
|
166
168
|
return o && o.length || 0;
|
|
167
169
|
}
|
|
168
|
-
function
|
|
170
|
+
function Y(e) {
|
|
169
171
|
return `${e * 100}%`;
|
|
170
172
|
}
|
|
171
173
|
function Mt(e, o) {
|
|
172
174
|
const n = Number(e);
|
|
173
|
-
if (!isNaN(n)) {
|
|
175
|
+
if (o && !isNaN(n)) {
|
|
174
176
|
const [r, s] = o;
|
|
175
177
|
return Re(pe(n, r), pe(s, r));
|
|
176
178
|
}
|
|
@@ -193,8 +195,8 @@ function Q(e, o) {
|
|
|
193
195
|
(r) => e >= r.begin && e <= r.end
|
|
194
196
|
);
|
|
195
197
|
if (n) {
|
|
196
|
-
const { beginOffset: r, begin: s, end: d, endOffset: N } = n, m = Mt(e, [s, d]),
|
|
197
|
-
return oe(r,
|
|
198
|
+
const { beginOffset: r, begin: s, end: d, endOffset: N } = n, m = Mt(e, [s, d]), V = pe(N, r), l = we(m, V);
|
|
199
|
+
return oe(r, l);
|
|
198
200
|
}
|
|
199
201
|
}
|
|
200
202
|
function ve(e) {
|
|
@@ -220,22 +222,22 @@ const Nt = function(e) {
|
|
|
220
222
|
reverse: d,
|
|
221
223
|
intervalConfigs: N
|
|
222
224
|
} = e;
|
|
223
|
-
return o.length ? /* @__PURE__ */ I("div", { className: `${s}-dots`, children: o.map(({ key: m, content:
|
|
224
|
-
const
|
|
225
|
+
return o.length ? /* @__PURE__ */ I("div", { className: `${s}-dots`, children: o.map(({ key: m, content: V }) => {
|
|
226
|
+
const l = Y(Q(+m, N));
|
|
225
227
|
return /* @__PURE__ */ I(
|
|
226
228
|
"div",
|
|
227
229
|
{
|
|
228
230
|
className: `${s}-dot-wrapper`,
|
|
229
231
|
style: {
|
|
230
|
-
...r ? { [d ? "top" : "bottom"]:
|
|
232
|
+
...r ? { [d ? "top" : "bottom"]: l } : { [d ? "right" : "left"]: l }
|
|
231
233
|
},
|
|
232
|
-
onMouseDown: (
|
|
233
|
-
|
|
234
|
+
onMouseDown: (M) => {
|
|
235
|
+
M.stopPropagation(), B(e.onMouseDown) && e.onMouseDown(parseFloat(m));
|
|
234
236
|
},
|
|
235
|
-
children: re(
|
|
237
|
+
children: re(V) && V.dot ? V.dot : /* @__PURE__ */ I(
|
|
236
238
|
"div",
|
|
237
239
|
{
|
|
238
|
-
className:
|
|
240
|
+
className: U(`${s}-dot`, {
|
|
239
241
|
[`${s}-dot-active`]: je(m, n)
|
|
240
242
|
})
|
|
241
243
|
}
|
|
@@ -244,7 +246,7 @@ const Nt = function(e) {
|
|
|
244
246
|
m
|
|
245
247
|
);
|
|
246
248
|
}) }) : null;
|
|
247
|
-
}, It = _.memo(Nt),
|
|
249
|
+
}, It = _.memo(Nt), $t = function(e) {
|
|
248
250
|
const {
|
|
249
251
|
value: o,
|
|
250
252
|
range: n,
|
|
@@ -253,29 +255,29 @@ const Nt = function(e) {
|
|
|
253
255
|
step: d,
|
|
254
256
|
disabled: N,
|
|
255
257
|
prefixCls: m,
|
|
256
|
-
onChange:
|
|
257
|
-
extra:
|
|
258
|
-
} = e,
|
|
258
|
+
onChange: V,
|
|
259
|
+
extra: l = []
|
|
260
|
+
} = e, M = {
|
|
259
261
|
min: r,
|
|
260
262
|
max: s,
|
|
261
263
|
step: d,
|
|
262
264
|
disabled: N
|
|
263
|
-
}, [
|
|
264
|
-
|
|
265
|
+
}, [v, f] = Se(o), t = l[0], g = n ? l[1] : l[0];
|
|
266
|
+
Be(() => {
|
|
265
267
|
f(o);
|
|
266
268
|
}, [o]);
|
|
267
|
-
const
|
|
268
|
-
|
|
269
|
-
},
|
|
269
|
+
const b = (i) => {
|
|
270
|
+
V == null || V(i);
|
|
271
|
+
}, w = () => {
|
|
270
272
|
f([...o].sort((i, u) => i - u));
|
|
271
273
|
};
|
|
272
274
|
return /* @__PURE__ */ ge(
|
|
273
275
|
"div",
|
|
274
276
|
{
|
|
275
|
-
className:
|
|
277
|
+
className: U(`${m}-input`, {
|
|
276
278
|
[`${m}-input-group`]: n
|
|
277
279
|
}),
|
|
278
|
-
onBlur:
|
|
280
|
+
onBlur: w,
|
|
279
281
|
children: [
|
|
280
282
|
n && [
|
|
281
283
|
/* @__PURE__ */ De(
|
|
@@ -283,12 +285,12 @@ const Nt = function(e) {
|
|
|
283
285
|
{
|
|
284
286
|
hideControl: !0,
|
|
285
287
|
...t,
|
|
286
|
-
...
|
|
287
|
-
value:
|
|
288
|
+
...M,
|
|
289
|
+
value: v[0],
|
|
288
290
|
key: 0,
|
|
289
291
|
onChange: (i, u) => {
|
|
290
|
-
var
|
|
291
|
-
isNaN(i) && i !== i || (
|
|
292
|
+
var x;
|
|
293
|
+
isNaN(i) && i !== i || (b([i, v[1]]), (x = t == null ? void 0 : t.onChange) == null || x.call(t, i, u));
|
|
292
294
|
}
|
|
293
295
|
}
|
|
294
296
|
),
|
|
@@ -299,39 +301,39 @@ const Nt = function(e) {
|
|
|
299
301
|
{
|
|
300
302
|
hideControl: !0,
|
|
301
303
|
...g,
|
|
302
|
-
...
|
|
304
|
+
...M,
|
|
303
305
|
key: 2,
|
|
304
|
-
value:
|
|
306
|
+
value: v[1],
|
|
305
307
|
onChange: (i, u) => {
|
|
306
|
-
var
|
|
307
|
-
isNaN(i) && i !== i || (
|
|
308
|
+
var x;
|
|
309
|
+
isNaN(i) && i !== i || (b([v[0], i]), (x = g == null ? void 0 : g.onChange) == null || x.call(g, i, u));
|
|
308
310
|
}
|
|
309
311
|
}
|
|
310
312
|
)
|
|
311
313
|
]
|
|
312
314
|
}
|
|
313
315
|
);
|
|
314
|
-
},
|
|
316
|
+
}, yt = _.memo($t), Ot = function(e) {
|
|
315
317
|
const { data: o = [], vertical: n, prefixCls: r, reverse: s, intervalConfigs: d } = e;
|
|
316
318
|
return o.length ? /* @__PURE__ */ I("div", { className: `${r}-marks`, children: o.map(({ key: N, content: m }) => {
|
|
317
|
-
const
|
|
318
|
-
let
|
|
319
|
-
return re(m) && de(m.text) ?
|
|
319
|
+
const V = Y(Q(+N, d));
|
|
320
|
+
let l = null;
|
|
321
|
+
return re(m) && de(m.text) ? l = m.text : de(m) && (l = m), de(l) && /* @__PURE__ */ I(
|
|
320
322
|
"div",
|
|
321
323
|
{
|
|
322
324
|
className: `${r}-marks-text`,
|
|
323
325
|
"aria-hidden": !0,
|
|
324
|
-
style: n ? { [s ? "top" : "bottom"]:
|
|
325
|
-
onMouseDown: (
|
|
326
|
-
|
|
326
|
+
style: n ? { [s ? "top" : "bottom"]: V } : { [s ? "right" : "left"]: V },
|
|
327
|
+
onMouseDown: (M) => {
|
|
328
|
+
M.stopPropagation(), B(e.onMouseDown) && e.onMouseDown(parseFloat(N));
|
|
327
329
|
},
|
|
328
|
-
children:
|
|
330
|
+
children: l
|
|
329
331
|
},
|
|
330
332
|
N
|
|
331
333
|
);
|
|
332
334
|
}) }) : null;
|
|
333
|
-
},
|
|
334
|
-
function
|
|
335
|
+
}, At = _.memo(Ot);
|
|
336
|
+
function Pt(e) {
|
|
335
337
|
const {
|
|
336
338
|
min: o,
|
|
337
339
|
max: n,
|
|
@@ -340,33 +342,33 @@ function At(e) {
|
|
|
340
342
|
vertical: d,
|
|
341
343
|
reverse: N,
|
|
342
344
|
intervalConfigs: m
|
|
343
|
-
} = e,
|
|
344
|
-
const { step: f, begin: t, end: g } =
|
|
345
|
-
for (let
|
|
346
|
-
const i = oe(
|
|
345
|
+
} = e, V = /* @__PURE__ */ new Map(), l = (v) => {
|
|
346
|
+
const { step: f, begin: t, end: g } = v, b = Math.floor((g - t) / f);
|
|
347
|
+
for (let w = 0; w <= b; w++) {
|
|
348
|
+
const i = oe(w * f, t);
|
|
347
349
|
if (i <= o || i >= n) continue;
|
|
348
|
-
const u =
|
|
349
|
-
|
|
350
|
+
const u = Y(Q(i, m));
|
|
351
|
+
V.set(u, {
|
|
350
352
|
offset: u,
|
|
351
353
|
isActive: je(i, r)
|
|
352
354
|
});
|
|
353
355
|
}
|
|
354
|
-
},
|
|
355
|
-
var
|
|
356
|
-
return
|
|
356
|
+
}, M = Z(() => {
|
|
357
|
+
var v;
|
|
358
|
+
return V.clear(), (v = m == null ? void 0 : m.forEach) == null || v.call(m, (f) => l(f)), Array.from(V.values());
|
|
357
359
|
}, [m]);
|
|
358
|
-
return /* @__PURE__ */ I("div", { className: `${s}-ticks`, children:
|
|
360
|
+
return /* @__PURE__ */ I("div", { className: `${s}-ticks`, children: M.map((v, f) => /* @__PURE__ */ I(
|
|
359
361
|
"div",
|
|
360
362
|
{
|
|
361
|
-
className:
|
|
362
|
-
[`${s}-tick-active`]:
|
|
363
|
+
className: U(`${s}-tick`, {
|
|
364
|
+
[`${s}-tick-active`]: v.isActive
|
|
363
365
|
}),
|
|
364
|
-
style: d ? { [N ? "top" : "bottom"]:
|
|
366
|
+
style: d ? { [N ? "top" : "bottom"]: v.offset } : { [N ? "right" : "left"]: v.offset }
|
|
365
367
|
},
|
|
366
368
|
f
|
|
367
369
|
)) });
|
|
368
370
|
}
|
|
369
|
-
const Dt = _.memo(
|
|
371
|
+
const Dt = _.memo(Pt);
|
|
370
372
|
function Tt(e) {
|
|
371
373
|
if (e.length < 2)
|
|
372
374
|
return [];
|
|
@@ -379,13 +381,13 @@ function Tt(e) {
|
|
|
379
381
|
}
|
|
380
382
|
function Rt(e) {
|
|
381
383
|
const { marks: o = {}, getIntervalConfig: n, max: r, min: s } = e, { markIntervals: d, markList: N } = Z(() => {
|
|
382
|
-
const
|
|
383
|
-
let
|
|
384
|
-
return
|
|
384
|
+
const V = Object.keys(o).filter((f) => ne(+f) && +f >= s && +f <= r).sort((f, t) => +f > +t ? 1 : -1), l = V.map((f) => ({ key: f, content: o[f] }));
|
|
385
|
+
let M = V.map((f) => +f);
|
|
386
|
+
return M.length === 0 ? M = [s, r] : (M[0] > s && (M.unshift(s), l.unshift({ key: `${s}`, content: "" })), M.slice(-1)[0] < r && (M.push(r), l.push({ key: `${r}`, content: "" }))), { markIntervals: Tt(M), markList: l };
|
|
385
387
|
}, [o, s, r]);
|
|
386
388
|
return {
|
|
387
389
|
intervalConfigs: Z(() => {
|
|
388
|
-
if (!
|
|
390
|
+
if (!B(n))
|
|
389
391
|
return [
|
|
390
392
|
{
|
|
391
393
|
begin: s,
|
|
@@ -396,38 +398,38 @@ function Rt(e) {
|
|
|
396
398
|
width: 1
|
|
397
399
|
}
|
|
398
400
|
];
|
|
399
|
-
const
|
|
400
|
-
const
|
|
401
|
-
return ne(u) && u && (
|
|
401
|
+
const V = ([t, g], b) => {
|
|
402
|
+
const w = { step: e.step, width: 0 }, i = n([t, g], b) || {}, u = i.step, x = Ct(i.width);
|
|
403
|
+
return ne(u) && u && (w.step = u), ne(x) && x && (w.width = x), w;
|
|
402
404
|
};
|
|
403
|
-
let
|
|
404
|
-
const
|
|
405
|
-
const
|
|
406
|
-
let i =
|
|
405
|
+
let l = 1, M = r - s;
|
|
406
|
+
const v = d.map(([t, g], b) => {
|
|
407
|
+
const w = V([t, g], b);
|
|
408
|
+
let i = w.width;
|
|
407
409
|
if (i) {
|
|
408
|
-
i = Math.min(
|
|
410
|
+
i = Math.min(l, i);
|
|
409
411
|
const u = g - t;
|
|
410
|
-
|
|
412
|
+
M -= u, l -= i;
|
|
411
413
|
}
|
|
412
|
-
return { width: i, step:
|
|
414
|
+
return { width: i, step: w.step };
|
|
413
415
|
});
|
|
414
|
-
if (
|
|
415
|
-
const t =
|
|
416
|
-
t.width +=
|
|
416
|
+
if (v.every(({ width: t }) => t) && l) {
|
|
417
|
+
const t = v[d.length - 1];
|
|
418
|
+
t.width += l;
|
|
417
419
|
}
|
|
418
420
|
const f = [];
|
|
419
|
-
return d.forEach(([t, g],
|
|
420
|
-
const { step:
|
|
421
|
+
return d.forEach(([t, g], b) => {
|
|
422
|
+
const { step: w, width: i } = v[b], u = {
|
|
421
423
|
begin: t,
|
|
422
424
|
end: g,
|
|
423
|
-
step:
|
|
425
|
+
step: w,
|
|
424
426
|
beginOffset: 0,
|
|
425
427
|
endOffset: 0,
|
|
426
428
|
width: i
|
|
427
429
|
};
|
|
428
|
-
u.width || (u.width =
|
|
429
|
-
const
|
|
430
|
-
f[
|
|
430
|
+
u.width || (u.width = l * ((g - t) / M));
|
|
431
|
+
const x = f.length - 1;
|
|
432
|
+
f[x] && (u.beginOffset = f[x].endOffset), u.endOffset = Math.min(1, u.beginOffset + u.width), f.push(u);
|
|
431
433
|
}), f;
|
|
432
434
|
}, [n, d, r, s, e.step]),
|
|
433
435
|
markList: N
|
|
@@ -436,59 +438,59 @@ function Rt(e) {
|
|
|
436
438
|
function St(e) {
|
|
437
439
|
const { isRange: o, min: n, max: r, onlyMarkValue: s, intervalConfigs: d, marks: N } = e, m = H(
|
|
438
440
|
(t) => {
|
|
439
|
-
const g = d.find((
|
|
441
|
+
const g = d.find((b) => t >= b.begin && t <= b.end);
|
|
440
442
|
if (g) {
|
|
441
|
-
const { begin:
|
|
442
|
-
we(
|
|
443
|
+
const { begin: b, step: w } = g, i = t - b, u = Math.round(i / w), x = Vt(w), T = parseFloat(
|
|
444
|
+
we(w, u).toFixed(x)
|
|
443
445
|
);
|
|
444
|
-
return oe(
|
|
446
|
+
return oe(b, T);
|
|
445
447
|
}
|
|
446
448
|
return t;
|
|
447
449
|
},
|
|
448
450
|
[d]
|
|
449
|
-
),
|
|
451
|
+
), V = H(
|
|
450
452
|
(t) => {
|
|
451
453
|
if (!re(N) || dt(N))
|
|
452
454
|
return console.warn("marks must be an object when onlyMarkValue is true"), n;
|
|
453
455
|
if (N[t])
|
|
454
456
|
return t;
|
|
455
|
-
const g = Object.keys(N),
|
|
456
|
-
return parseFloat(g[
|
|
457
|
+
const g = Object.keys(N), b = g.map((i) => Math.abs(t - parseFloat(i))), w = b.indexOf(Math.min.apply(null, b));
|
|
458
|
+
return parseFloat(g[w]);
|
|
457
459
|
},
|
|
458
460
|
[N, n]
|
|
459
|
-
),
|
|
460
|
-
(t) => gt(t) || t <= n ? n : t >= r ? r : s ?
|
|
461
|
-
[
|
|
462
|
-
),
|
|
463
|
-
(t) =>
|
|
464
|
-
[
|
|
465
|
-
),
|
|
461
|
+
), l = H(
|
|
462
|
+
(t) => gt(t) || t <= n ? n : t >= r ? r : s ? V(t) : m(t),
|
|
463
|
+
[V, m, r, n, s]
|
|
464
|
+
), M = H(
|
|
465
|
+
(t) => l(t) === t,
|
|
466
|
+
[l]
|
|
467
|
+
), v = H(
|
|
466
468
|
(t) => {
|
|
467
|
-
let [g,
|
|
469
|
+
let [g, b] = [n, n];
|
|
468
470
|
if (o) {
|
|
469
471
|
if (he(t))
|
|
470
|
-
return g =
|
|
472
|
+
return g = l(t[0]), t.map((w) => l(w));
|
|
471
473
|
console.error("value must be an array when range is true");
|
|
472
|
-
} else ne(t) ?
|
|
473
|
-
return [g,
|
|
474
|
+
} else ne(t) ? b = l(t) : console.error("value must be a number when range is false");
|
|
475
|
+
return [g, b];
|
|
474
476
|
},
|
|
475
|
-
[
|
|
477
|
+
[l, o, n]
|
|
476
478
|
), f = H(
|
|
477
479
|
(t, g) => {
|
|
478
|
-
const
|
|
479
|
-
let
|
|
480
|
+
const b = g === "subtraction" ? -1 : 1;
|
|
481
|
+
let w = oe(t, b * e.step);
|
|
480
482
|
if (e.onlyMarkValue) {
|
|
481
|
-
const i = Object.keys(e.marks), u = i.findIndex((
|
|
482
|
-
|
|
483
|
+
const i = Object.keys(e.marks), u = i.findIndex((x) => Number(x) === t);
|
|
484
|
+
w = i[u + b] !== void 0 ? Number(i[u + b]) : t;
|
|
483
485
|
}
|
|
484
|
-
return
|
|
486
|
+
return w;
|
|
485
487
|
},
|
|
486
488
|
[e.marks, e.onlyMarkValue, e.step]
|
|
487
489
|
);
|
|
488
490
|
return {
|
|
489
|
-
getLegalRangeValue:
|
|
490
|
-
getLegalValue:
|
|
491
|
-
isLegalValue:
|
|
491
|
+
getLegalRangeValue: v,
|
|
492
|
+
getLegalValue: l,
|
|
493
|
+
isLegalValue: M,
|
|
492
494
|
getNextMarkValue: f
|
|
493
495
|
};
|
|
494
496
|
}
|
|
@@ -497,162 +499,163 @@ const Lt = {
|
|
|
497
499
|
min: 0,
|
|
498
500
|
step: 1
|
|
499
501
|
};
|
|
500
|
-
function
|
|
501
|
-
const { getPrefixCls: n, componentConfig: r, rtl: s } = Le(
|
|
502
|
+
function Bt(e, o) {
|
|
503
|
+
const { getPrefixCls: n, componentConfig: r, rtl: s } = Le(Ee), d = at(
|
|
502
504
|
e,
|
|
503
505
|
Lt,
|
|
504
506
|
r == null ? void 0 : r.Slider
|
|
505
507
|
), {
|
|
506
508
|
className: N,
|
|
507
509
|
style: m,
|
|
508
|
-
tooltipVisible:
|
|
509
|
-
tooltipPosition:
|
|
510
|
-
disabled:
|
|
511
|
-
min:
|
|
510
|
+
tooltipVisible: V,
|
|
511
|
+
tooltipPosition: l,
|
|
512
|
+
disabled: M,
|
|
513
|
+
min: v,
|
|
512
514
|
max: f,
|
|
513
515
|
range: t,
|
|
514
516
|
step: g,
|
|
515
|
-
showTicks:
|
|
516
|
-
marks:
|
|
517
|
+
showTicks: b,
|
|
518
|
+
marks: w,
|
|
517
519
|
onlyMarkValue: i,
|
|
518
520
|
vertical: u,
|
|
519
|
-
showInput:
|
|
521
|
+
showInput: x,
|
|
520
522
|
reverse: T,
|
|
521
523
|
getIntervalConfig: K,
|
|
522
524
|
...z
|
|
523
525
|
} = d, P = !!t, ae = re(t) ? { ...t } : { draggableBar: !1 }, O = s ? !T : T, { intervalConfigs: D, markList: ie } = Rt({
|
|
524
|
-
min:
|
|
526
|
+
min: v,
|
|
525
527
|
max: f,
|
|
526
|
-
onlyMarkValue: i,
|
|
527
528
|
step: g,
|
|
528
|
-
marks:
|
|
529
|
+
marks: w,
|
|
529
530
|
getIntervalConfig: K
|
|
530
531
|
}), { getLegalValue: L, getLegalRangeValue: R, isLegalValue: ue, getNextMarkValue: G } = St({
|
|
531
532
|
isRange: P,
|
|
532
|
-
min:
|
|
533
|
+
min: v,
|
|
533
534
|
max: f,
|
|
534
535
|
onlyMarkValue: i,
|
|
535
536
|
step: g,
|
|
536
537
|
intervalConfigs: D,
|
|
537
|
-
marks:
|
|
538
|
-
}), [j,
|
|
539
|
-
P ? [
|
|
538
|
+
marks: w
|
|
539
|
+
}), [j, ce] = Fe(
|
|
540
|
+
P ? [v, v] : v,
|
|
540
541
|
{
|
|
541
542
|
defaultValue: d.defaultValue,
|
|
542
543
|
value: d.value
|
|
543
544
|
}
|
|
544
545
|
);
|
|
545
|
-
let
|
|
546
|
-
const ee = S(
|
|
546
|
+
let k = R(j);
|
|
547
|
+
const ee = S(k), p = S(xt(k));
|
|
547
548
|
ut(() => {
|
|
548
549
|
ee.current = R(j);
|
|
549
|
-
}, [j, R]),
|
|
550
|
-
const
|
|
550
|
+
}, [j, R]), p.current && (k = ve(k));
|
|
551
|
+
const C = k[k.length - 1], E = k[0], le = x && !i && (!P || k.length < 3), Xe = Z(() => le && (he(x) || re(x)) ? he(x) ? [...x] : [{ ...x }, { ...x }] : [], [le, x]), y = n("slider"), be = S(null), Ve = S({
|
|
551
552
|
left: 0,
|
|
552
553
|
height: 0,
|
|
553
554
|
top: 0,
|
|
554
555
|
width: 0
|
|
555
556
|
}), Me = S(!1), Ce = S(0);
|
|
556
|
-
function xe(
|
|
557
|
-
const a = ve(
|
|
557
|
+
function xe(c) {
|
|
558
|
+
const a = ve(c);
|
|
558
559
|
return P ? a : a[a.length - 1];
|
|
559
560
|
}
|
|
560
|
-
function
|
|
561
|
-
const a =
|
|
561
|
+
function Ye(c) {
|
|
562
|
+
const a = c.map((h) => L(h));
|
|
562
563
|
return ee.current = a, a;
|
|
563
564
|
}
|
|
564
|
-
function J(
|
|
565
|
-
const
|
|
566
|
-
|
|
565
|
+
function J(c, a) {
|
|
566
|
+
const h = Ye(c), $ = xe(h);
|
|
567
|
+
ce($), a === "inputValueChange" ? p.current = h.some((A, q) => A > h[q]) : p.current = !1, B(d.onChange) && d.onChange($);
|
|
567
568
|
}
|
|
568
569
|
function se() {
|
|
569
|
-
if (
|
|
570
|
-
const
|
|
571
|
-
d.onAfterChange(
|
|
570
|
+
if (B(d.onAfterChange)) {
|
|
571
|
+
const c = xe(ee.current);
|
|
572
|
+
d.onAfterChange(c);
|
|
572
573
|
}
|
|
573
574
|
}
|
|
574
|
-
function
|
|
575
|
-
let [a,
|
|
576
|
-
return a >
|
|
575
|
+
function Ue(c) {
|
|
576
|
+
let [a, h] = [k[0], k[k.length - 1]];
|
|
577
|
+
return a > h && ([a, h] = [h, a]), P ? c >= a && c <= h : c <= h;
|
|
577
578
|
}
|
|
578
|
-
function fe(
|
|
579
|
-
const { left:
|
|
580
|
-
let F = A,
|
|
581
|
-
if (u && (F = q,
|
|
579
|
+
function fe(c, a) {
|
|
580
|
+
const { left: h, top: $, width: A, height: q } = Ve.current;
|
|
581
|
+
let F = A, $e = O ? h + A - c : c - h;
|
|
582
|
+
if (u && (F = q, $e = O ? a - $ : $ + q - a), F <= 0)
|
|
582
583
|
return 0;
|
|
583
|
-
let te = Math.max(Re(
|
|
584
|
+
let te = Math.max(Re($e, F), 0);
|
|
584
585
|
te = Math.min(1, te);
|
|
585
|
-
const _e = D.find((
|
|
586
|
-
begin:
|
|
586
|
+
const _e = D.find((Pe) => te >= Pe.beginOffset && te <= Pe.endOffset), {
|
|
587
|
+
begin: ye,
|
|
587
588
|
beginOffset: Oe,
|
|
588
|
-
step:
|
|
589
|
+
step: Ae,
|
|
589
590
|
endOffset: et,
|
|
590
591
|
end: tt
|
|
591
|
-
} = _e, nt = te - Oe, ot = et - Oe, rt = nt / ot * (tt -
|
|
592
|
-
return oe(
|
|
592
|
+
} = _e, nt = te - Oe, ot = et - Oe, rt = nt / ot * (tt - ye), it = Math.round(rt / Ae);
|
|
593
|
+
return oe(ye, we(it, Ae));
|
|
593
594
|
}
|
|
594
|
-
function Ke(
|
|
595
|
-
let [a,
|
|
596
|
-
a >
|
|
597
|
-
const
|
|
595
|
+
function Ke(c) {
|
|
596
|
+
let [a, h] = c;
|
|
597
|
+
a > h && ([a, h] = [h, a]);
|
|
598
|
+
const $ = Y(a), A = Y(1 - h);
|
|
598
599
|
return u ? {
|
|
599
|
-
[O ? "top" : "bottom"]:
|
|
600
|
+
[O ? "top" : "bottom"]: $,
|
|
600
601
|
[O ? "bottom" : "top"]: A
|
|
601
602
|
} : {
|
|
602
|
-
[O ? "right" : "left"]:
|
|
603
|
+
[O ? "right" : "left"]: $,
|
|
603
604
|
[O ? "left" : "right"]: A
|
|
604
605
|
};
|
|
605
606
|
}
|
|
606
|
-
function ze(
|
|
607
|
-
return u ? { [O ? "top" : "bottom"]:
|
|
607
|
+
function ze(c) {
|
|
608
|
+
return u ? { [O ? "top" : "bottom"]: Y(c) } : { [O ? "right" : "left"]: Y(c) };
|
|
608
609
|
}
|
|
609
610
|
function Ge() {
|
|
610
|
-
const
|
|
611
|
+
const c = {
|
|
611
612
|
getTooltipContainer: d.getTooltipContainer,
|
|
612
613
|
formatTooltip: d.formatTooltip
|
|
613
614
|
};
|
|
614
|
-
return "tooltipPosition" in d && (
|
|
615
|
+
return "tooltipPosition" in d && (c.tooltipPosition = l), "tooltipVisible" in d && (c.tooltipVisible = V), c;
|
|
615
616
|
}
|
|
616
617
|
function ke() {
|
|
617
618
|
Ve.current = be.current.getBoundingClientRect();
|
|
618
619
|
}
|
|
619
|
-
function Je(
|
|
620
|
+
function Je(c) {
|
|
620
621
|
ke();
|
|
621
|
-
const a = fe(
|
|
622
|
-
ae.draggableBar &&
|
|
622
|
+
const a = fe(c.clientX, c.clientY);
|
|
623
|
+
ae.draggableBar && Ue(a) ? (Ce.current = L(a), W(window, "mousemove", Ne), W(window, "mouseup", Ie)) : me(a);
|
|
623
624
|
}
|
|
624
|
-
function me(
|
|
625
|
-
if (
|
|
626
|
-
|
|
627
|
-
|
|
625
|
+
function me(c) {
|
|
626
|
+
if (M)
|
|
627
|
+
return;
|
|
628
|
+
const a = L(c), [h, $] = kt(a, k), A = k[h], q = k[$], F = k.slice(0);
|
|
629
|
+
P && q - a > a - A ? (F[h] = a, J(F, "jumpToClick")) : (F[$] = a, J(F, "jumpToClick")), se();
|
|
628
630
|
}
|
|
629
|
-
function qe(
|
|
630
|
-
J(
|
|
631
|
+
function qe(c) {
|
|
632
|
+
J(c, "inputValueChange"), se();
|
|
631
633
|
}
|
|
632
|
-
function He(
|
|
634
|
+
function He(c, a, h) {
|
|
633
635
|
Me.current = !0;
|
|
634
|
-
const
|
|
635
|
-
|
|
636
|
+
const $ = k.slice(0);
|
|
637
|
+
$[h] = fe(c, a), J($, "mousemove");
|
|
636
638
|
}
|
|
637
639
|
function Qe() {
|
|
638
640
|
Me.current = !1, se();
|
|
639
641
|
}
|
|
640
|
-
function Ze(
|
|
641
|
-
if (
|
|
642
|
-
|
|
643
|
-
|
|
642
|
+
function Ze(c, a) {
|
|
643
|
+
if (M)
|
|
644
|
+
return;
|
|
645
|
+
const h = k.slice(0);
|
|
646
|
+
h[a] = G(k[a], c), J(h);
|
|
644
647
|
}
|
|
645
|
-
function Ne(
|
|
646
|
-
const
|
|
647
|
-
|
|
648
|
+
function Ne(c) {
|
|
649
|
+
const h = L(fe(c.clientX, c.clientY)) - Ce.current, $ = k.map((A) => A + h);
|
|
650
|
+
$.every((A) => ue(A)) && J($, "mousemove");
|
|
648
651
|
}
|
|
649
652
|
function Ie() {
|
|
650
|
-
|
|
653
|
+
X(window, "mousemove", Ne), X(window, "mouseup", Ie), se();
|
|
651
654
|
}
|
|
652
655
|
return /* @__PURE__ */ I(
|
|
653
656
|
"div",
|
|
654
657
|
{
|
|
655
|
-
...
|
|
658
|
+
...ct(z, [
|
|
656
659
|
"defaultValue",
|
|
657
660
|
"value",
|
|
658
661
|
"onChange",
|
|
@@ -660,47 +663,47 @@ function Et(e, o) {
|
|
|
660
663
|
"formatTooltip",
|
|
661
664
|
"onAfterChange"
|
|
662
665
|
]),
|
|
663
|
-
className:
|
|
664
|
-
|
|
666
|
+
className: U(
|
|
667
|
+
y,
|
|
665
668
|
{
|
|
666
|
-
[`${
|
|
667
|
-
[`${
|
|
668
|
-
[`${
|
|
669
|
-
[`${
|
|
669
|
+
[`${y}-vertical`]: u,
|
|
670
|
+
[`${y}-with-marks`]: w,
|
|
671
|
+
[`${y}-reverse`]: O,
|
|
672
|
+
[`${y}-rtl`]: s
|
|
670
673
|
},
|
|
671
674
|
N
|
|
672
675
|
),
|
|
673
676
|
style: m,
|
|
674
677
|
ref: o,
|
|
675
|
-
children: /* @__PURE__ */ ge("div", { className: `${
|
|
678
|
+
children: /* @__PURE__ */ ge("div", { className: `${y}-wrapper`, children: [
|
|
676
679
|
/* @__PURE__ */ ge(
|
|
677
680
|
"div",
|
|
678
681
|
{
|
|
679
682
|
ref: be,
|
|
680
|
-
className:
|
|
681
|
-
[`${
|
|
682
|
-
[`${
|
|
683
|
+
className: U(`${y}-road`, {
|
|
684
|
+
[`${y}-road-disabled`]: M,
|
|
685
|
+
[`${y}-road-vertical`]: u
|
|
683
686
|
}),
|
|
684
687
|
onMouseDown: Je,
|
|
685
688
|
children: [
|
|
686
689
|
/* @__PURE__ */ I(
|
|
687
690
|
"div",
|
|
688
691
|
{
|
|
689
|
-
className: `${
|
|
692
|
+
className: `${y}-bar`,
|
|
690
693
|
style: Ke([
|
|
691
|
-
Q(
|
|
692
|
-
Q(
|
|
694
|
+
Q(E, D),
|
|
695
|
+
Q(C, D)
|
|
693
696
|
])
|
|
694
697
|
}
|
|
695
698
|
),
|
|
696
|
-
|
|
699
|
+
b && /* @__PURE__ */ I(
|
|
697
700
|
Dt,
|
|
698
701
|
{
|
|
699
702
|
intervalConfigs: D,
|
|
700
|
-
min:
|
|
703
|
+
min: v,
|
|
701
704
|
max: f,
|
|
702
|
-
valueRange: [
|
|
703
|
-
prefixCls:
|
|
705
|
+
valueRange: [E, C],
|
|
706
|
+
prefixCls: y,
|
|
704
707
|
vertical: u,
|
|
705
708
|
reverse: O
|
|
706
709
|
}
|
|
@@ -710,66 +713,66 @@ function Et(e, o) {
|
|
|
710
713
|
{
|
|
711
714
|
data: ie,
|
|
712
715
|
intervalConfigs: D,
|
|
713
|
-
valueRange: [
|
|
716
|
+
valueRange: [E, C],
|
|
714
717
|
vertical: u,
|
|
715
|
-
prefixCls:
|
|
718
|
+
prefixCls: y,
|
|
716
719
|
reverse: O,
|
|
717
720
|
onMouseDown: me
|
|
718
721
|
}
|
|
719
722
|
),
|
|
720
723
|
/* @__PURE__ */ I(
|
|
721
|
-
|
|
724
|
+
At,
|
|
722
725
|
{
|
|
723
726
|
data: ie,
|
|
724
727
|
intervalConfigs: D,
|
|
725
728
|
vertical: u,
|
|
726
|
-
prefixCls:
|
|
729
|
+
prefixCls: y,
|
|
727
730
|
reverse: O,
|
|
728
731
|
onMouseDown: me
|
|
729
732
|
}
|
|
730
733
|
),
|
|
731
|
-
|
|
734
|
+
k.map((c, a) => !P && a !== k.length - 1 ? null : /* @__PURE__ */ I(
|
|
732
735
|
bt,
|
|
733
736
|
{
|
|
734
|
-
style: ze(Q(
|
|
735
|
-
disabled:
|
|
736
|
-
prefixCls:
|
|
737
|
-
value:
|
|
737
|
+
style: ze(Q(c, D)),
|
|
738
|
+
disabled: M,
|
|
739
|
+
prefixCls: y,
|
|
740
|
+
value: c,
|
|
738
741
|
maxValue: f,
|
|
739
|
-
minValue:
|
|
742
|
+
minValue: v,
|
|
740
743
|
vertical: u,
|
|
741
744
|
...Ge(),
|
|
742
745
|
onMoveBegin: ke,
|
|
743
|
-
onMoving: (
|
|
746
|
+
onMoving: (h, $) => He(h, $, a),
|
|
744
747
|
onMoveEnd: Qe,
|
|
745
|
-
onArrowEvent: (
|
|
748
|
+
onArrowEvent: (h) => Ze(h, a)
|
|
746
749
|
},
|
|
747
750
|
a
|
|
748
751
|
))
|
|
749
752
|
]
|
|
750
753
|
}
|
|
751
754
|
),
|
|
752
|
-
|
|
753
|
-
|
|
755
|
+
le && /* @__PURE__ */ I(
|
|
756
|
+
yt,
|
|
754
757
|
{
|
|
755
|
-
min:
|
|
758
|
+
min: v,
|
|
756
759
|
max: f,
|
|
757
760
|
step: g,
|
|
758
|
-
value:
|
|
761
|
+
value: k,
|
|
759
762
|
range: P,
|
|
760
|
-
disabled:
|
|
761
|
-
prefixCls:
|
|
763
|
+
disabled: M,
|
|
764
|
+
prefixCls: y,
|
|
762
765
|
onChange: qe,
|
|
763
|
-
extra:
|
|
766
|
+
extra: Xe
|
|
764
767
|
}
|
|
765
768
|
)
|
|
766
769
|
] })
|
|
767
770
|
}
|
|
768
771
|
);
|
|
769
772
|
}
|
|
770
|
-
const
|
|
771
|
-
|
|
772
|
-
const rn = _.memo(
|
|
773
|
+
const We = st(Bt);
|
|
774
|
+
We.displayName = "Slider";
|
|
775
|
+
const rn = _.memo(We);
|
|
773
776
|
export {
|
|
774
777
|
rn as default
|
|
775
778
|
};
|