@unicom-cloud/ui 0.8.43 → 0.8.45
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 +54 -51
- package/Alert.js +46 -43
- package/Anchor.js +5 -4
- package/AutoComplete.js +60 -55
- package/Avatar.js +10 -155
- package/BackTop.js +41 -38
- package/Badge.js +63 -93
- package/Breadcrumb.js +63 -118
- package/Button.js +105 -109
- package/Calendar.js +139 -536
- package/Card.js +65 -101
- package/Carousel.js +169 -270
- package/Cascader.js +9 -8
- package/Checkbox.js +4 -3
- package/Collapse.js +4 -3
- package/ColorPicker.js +95 -546
- package/Comment.js +14 -12
- package/ConfigProvider.js +6 -5
- package/Copy.js +33 -31
- package/DatePicker.js +35 -1993
- package/Descriptions.js +30 -28
- package/Divider.js +8 -6
- package/Draggable.js +28 -85
- package/Drawer.js +5 -4
- package/Dropdown.js +107 -167
- package/Empty.js +28 -8
- package/Form.js +30 -1418
- package/Grid.js +13 -248
- package/Icon.js +19 -45
- package/IconHover.js +39 -6
- package/Image.js +3 -3
- package/Input.js +4 -4
- package/InputNumber.js +213 -17
- package/InputTag.js +5 -4
- package/Layout.js +35 -48
- package/Link.js +16 -14
- package/List.js +191 -228
- package/Loading.js +18 -17
- package/Mentions.js +99 -115
- package/Menu.js +8 -7
- package/Message.js +147 -10
- package/Modal.js +5 -4
- package/Notice.js +196 -13
- package/Notification.js +136 -11
- package/NotificationBase.js +5 -4
- package/OverflowEllipsis.js +48 -71
- package/PageHeader.js +52 -52
- package/Pagination.js +12 -11
- package/Picker.js +6 -4
- package/Popconfirm.js +47 -44
- package/Popover.js +25 -23
- package/Portal.js +12 -32
- package/Progress.js +65 -328
- package/Radio.js +6 -5
- package/Rate.js +48 -45
- package/ResizeBox.js +127 -505
- package/Result.js +60 -1417
- package/Select.js +9 -8
- package/SelectView.js +49 -328
- package/Skeleton.js +41 -78
- package/Slider.js +228 -702
- package/Space.js +53 -57
- package/Spin.js +57 -72
- package/Statistic.js +84 -153
- package/Steps.js +64 -123
- package/SuspenseFallbackTest.js +4 -3
- package/Switch.js +41 -38
- package/Table.js +20 -1999
- package/Tabs.js +9 -8
- package/Tag.js +24 -21
- package/TimePicker.js +19 -272
- package/Timeline.js +4 -3
- package/Tooltip.js +79 -72
- package/Transfer.js +138 -402
- package/Tree.js +5 -4
- package/TreeSelect.js +8 -7
- package/Trigger.js +407 -571
- package/Typography.js +11 -721
- package/Upload.js +9 -8
- package/VerificationCode.js +6 -5
- package/Version.js +1 -1
- package/VirtualList.js +4 -3
- package/Watermark.js +3 -2
- package/anchor/Anchor.js +193 -0
- package/anchor/Link.js +54 -0
- package/anchor/context.js +14 -0
- package/anchor/util.js +41 -0
- package/avatar/Avatar.js +85 -0
- package/avatar/Group.js +84 -0
- package/avatar/context.js +5 -0
- package/badge/Count.js +35 -0
- package/breadcrumb/Item.js +67 -0
- package/button/Group.js +15 -0
- package/calendar/Month.js +142 -0
- package/calendar/WeekList.js +24 -0
- package/calendar/Year.js +75 -0
- package/calendar/header/Panel.js +57 -0
- package/calendar/header/index.js +118 -0
- package/calendar/hook/useCellClassName.js +41 -0
- package/card/Grid.js +27 -0
- package/card/Meta.js +32 -0
- package/carousel/Arrow.js +57 -0
- package/carousel/Indicator.js +68 -0
- package/cascader/Cascader.js +300 -0
- package/cascader/base/node.js +142 -0
- package/cascader/base/store.js +93 -0
- package/cascader/hook/useRefCurrent.js +12 -0
- package/cascader/panel/List.js +275 -0
- package/cascader/panel/Option.js +35 -0
- package/cascader/panel/Search.js +171 -0
- package/cascader/util.js +66 -0
- package/checkbox/Checkbox.js +111 -0
- package/checkbox/Group.js +97 -0
- package/checkbox/useCheckbox.js +45 -0
- package/collapse/Collapse.js +90 -0
- package/collapse/Item.js +165 -0
- package/color-picker/ControlBar.js +64 -0
- package/color-picker/InputAlpha.js +24 -0
- package/color-picker/InputHex.js +59 -0
- package/color-picker/InputRgb.js +66 -0
- package/color-picker/Palette.js +36 -0
- package/color-picker/Panel.js +165 -0
- package/color-picker/colors.js +37 -0
- package/color-picker/hooks/useColorPicker.js +63 -0
- package/color-picker/hooks/useControlBlock.js +40 -0
- package/config-provider/ConfigProvider.js +94 -0
- package/config-provider/context.js +24 -0
- package/date-picker/Picker.js +399 -0
- package/date-picker/PickerRange.js +568 -0
- package/date-picker/context.js +5 -0
- package/date-picker/hook/useCellClassName.js +58 -0
- package/date-picker/panel/Body.js +78 -0
- package/date-picker/panel/Footer.js +71 -0
- package/date-picker/panel/Header.js +74 -0
- package/date-picker/panel/Shortcut.js +45 -0
- package/date-picker/panel/WeekList.js +19 -0
- package/date-picker/panel/date/index.js +194 -0
- package/date-picker/panel/month/index.js +113 -0
- package/date-picker/panel/quarter/index.js +93 -0
- package/date-picker/panel/range/index.js +251 -0
- package/date-picker/panel/week/index.js +35 -0
- package/date-picker/panel/year/index.js +74 -0
- package/date-picker/util.js +69 -0
- package/draggable/Item.js +66 -0
- package/drawer/Drawer.js +226 -0
- package/dropdown/Button.js +91 -0
- package/form/Control.js +264 -0
- package/form/Form.js +156 -0
- package/form/FormItem.js +241 -0
- package/form/FormLabel.js +54 -0
- package/form/FormList.js +96 -0
- package/form/FormProvider.js +48 -0
- package/form/IconSymbol.js +20 -0
- package/form/context.js +43 -0
- package/form/hook/useContext.js +32 -0
- package/form/hook/useState.js +31 -0
- package/form/hook/useWatch.js +36 -0
- package/form/interface.js +11 -0
- package/form/promisify.js +23 -0
- package/form/store.js +354 -0
- package/form/useForm.js +53 -0
- package/form/util.js +72 -0
- package/grid/Col.js +87 -0
- package/grid/Row.js +88 -0
- package/grid/context.js +9 -0
- package/grid/grid-item.js +77 -0
- package/grid/grid.js +104 -0
- package/grid/hook/useResponsiveState.js +38 -0
- package/grid/util.js +51 -0
- package/{chunk/I4RV9SKZ.js → hooks/factory/createHTMLMediaHook.js} +35 -43
- package/hooks/index.js +246 -4
- package/{chunk/BdYAMaw9.js → hooks/misc/hookState.js} +1 -1
- package/hooks/misc/parseTimeRanges.js +12 -0
- package/{chunk/TXCrI0jN.js → hooks/misc/util.js} +6 -6
- package/hooks/use-watermark/utils.js +8 -0
- package/hooks/use-watermark.js +71 -76
- package/hooks/useAudio.js +3 -3
- package/hooks/useBeforeUnload.js +2 -2
- package/hooks/useClickAway.js +10 -10
- package/hooks/useCounter.js +1 -1
- package/hooks/useCreation.js +2 -4
- package/hooks/useDrop.js +12 -12
- package/hooks/useDropArea.js +5 -5
- package/hooks/useEvent.js +6 -6
- package/hooks/useEventListener.js +2 -4
- package/hooks/useFavicon.js +1 -2
- package/hooks/useFullscreen.js +11 -13
- package/hooks/useGetSet.js +5 -5
- package/hooks/useHash.js +6 -6
- package/hooks/useHover.js +6 -6
- package/hooks/useHoverDirty.js +7 -7
- package/hooks/useIdle.js +17 -17
- package/hooks/useIsomorphicLayoutEffect2.js +3 -3
- package/hooks/useKey.js +5 -5
- package/hooks/useList.js +1 -1
- package/hooks/useLocalStorage.js +2 -3
- package/hooks/useLocation.js +1 -1
- package/hooks/useLockBodyScroll.js +13 -14
- package/hooks/useLongPress.js +7 -7
- package/hooks/useMeasure.js +3 -3
- package/hooks/useMedia.js +4 -4
- package/hooks/useMediaDevices.js +10 -10
- package/hooks/useMotion.js +11 -11
- package/hooks/useMouse.js +9 -9
- package/hooks/useMouseWheel.js +7 -7
- package/hooks/useNetworkState.js +7 -7
- package/hooks/useOrientation.js +10 -11
- package/hooks/useOverrideRef.js +14 -0
- package/hooks/usePageLeave.js +4 -4
- package/hooks/usePermission.js +9 -9
- package/hooks/usePersistCallback.js +15 -0
- package/hooks/useScroll.js +6 -6
- package/hooks/useScrolling.js +7 -7
- package/hooks/useSearchParam.js +5 -5
- package/hooks/useSessionStorage.js +9 -9
- package/hooks/useSize.js +1 -1
- package/hooks/useSlider.js +6 -6
- package/hooks/useStartTyping.js +4 -4
- package/hooks/useStateList.js +4 -5
- package/hooks/useStateWithHistory.js +1 -1
- package/hooks/useTimeout.js +1 -2
- package/hooks/useVibrate.js +5 -5
- package/hooks/useVideo.js +3 -3
- package/hooks/useWindowScroll.js +13 -13
- package/hooks/useWindowSize.js +6 -6
- package/icon/addFromIconFontCn.js +33 -0
- package/image/Image.js +189 -0
- package/image/ImageFooter.js +45 -0
- package/image/ImagePreview.js +473 -0
- package/image/ImagePreviewArrow.js +40 -0
- package/image/ImagePreviewGroup.js +125 -0
- package/image/ImagePreviewToolbar.js +98 -0
- package/image/TriggerForToolbar.js +10 -0
- package/image/previewGroupContext.js +17 -0
- package/image/util/getFixTranslate.js +7 -0
- package/image/util/getScale.js +72 -0
- package/image/util/hook/useImageStatus.js +16 -0
- package/image/util/hook/useShowFooter.js +7 -0
- package/index.js +440 -395
- package/input/Group.js +20 -0
- package/input/Input.js +185 -0
- package/input/InputElement.js +233 -0
- package/input/Number.js +4 -0
- package/input/Password.js +72 -0
- package/input/Search.js +80 -0
- package/input/Tag.js +7 -0
- package/input/Textarea.js +168 -0
- package/input/autoSizeTextAreaHeight.js +65 -0
- package/input/useComposition.js +39 -0
- package/input-number/decimal.js +154 -0
- package/input-number/useSelectionRange.js +26 -0
- package/input-number/util.js +57 -0
- package/input-tag/InputTag.js +381 -0
- package/layout/Content.js +15 -0
- package/layout/Footer.js +15 -0
- package/layout/Header.js +15 -0
- package/{chunk/B9asjXwm.js → layout/Sider.js} +23 -22
- package/list/Item.js +46 -0
- package/list/Meta.js +21 -0
- package/loading/style/index.module.less.js +4 -0
- package/locale/de-DE.js +1 -1
- package/mentions/util.js +26 -0
- package/menu/Indent.js +17 -0
- package/menu/Item.js +125 -0
- package/menu/ItemGroup.js +39 -0
- package/menu/Menu.js +181 -0
- package/menu/OverflowWrap.js +85 -0
- package/menu/context.js +5 -0
- package/menu/sub-menu/Inline.js +111 -0
- package/menu/sub-menu/Pop.js +126 -0
- package/menu/sub-menu/index.js +17 -0
- package/menu/util.js +80 -0
- package/message/useMessage.js +53 -0
- package/modal/Confirm.js +98 -0
- package/modal/Modal.js +419 -0
- package/modal/config.js +25 -0
- package/modal/use-modal/Hook.js +55 -0
- package/modal/use-modal/index.js +68 -0
- package/notification/useNotification.js +55 -0
- package/overflow-ellipsis/OverflowItem.js +34 -0
- package/package.json +27 -1
- package/pagination/PageItem.js +121 -0
- package/pagination/PageJumper.js +64 -0
- package/pagination/PageOption.js +55 -0
- package/pagination/Pagination.js +245 -0
- package/picker/Input.js +124 -0
- package/picker/InputRange.js +155 -0
- package/portal/Portal.js +25 -0
- package/progress/CircleProgress.js +117 -0
- package/progress/LineProgess.js +103 -0
- package/progress/StepProgress.js +74 -0
- package/radio/Group.js +91 -0
- package/radio/Radio.js +90 -0
- package/resize-box/ResizeTrigger.js +78 -0
- package/resize-box/Split.js +132 -0
- package/resize-box/SplitGroup.js +204 -0
- package/result/403.js +695 -0
- package/result/404.js +513 -0
- package/result/500.js +166 -0
- package/select/OptGroup.js +20 -0
- package/select/Option.js +97 -0
- package/select/Select.js +544 -0
- package/select/util.js +140 -0
- package/select-view/Core.js +309 -0
- package/skeleton/Image.js +24 -0
- package/skeleton/Text.js +27 -0
- package/slider/Button.js +159 -0
- package/slider/Dot.js +43 -0
- package/slider/Input.js +75 -0
- package/slider/Mark.js +28 -0
- package/slider/Tick.js +44 -0
- package/slider/hook/useInterval.js +73 -0
- package/slider/hook/useLegalValue.js +70 -0
- package/slider/util.js +63 -0
- package/space/toArray.js +11 -0
- package/spin/DotLoading.js +26 -0
- package/statistic/Countdown.js +57 -0
- package/statistic/util.js +33 -0
- package/steps/Step.js +68 -0
- package/style.css +1 -1
- package/table/ColGroup.js +59 -0
- package/table/Table.js +634 -0
- package/table/constant.js +5 -0
- package/table/hook/useColumns.js +141 -0
- package/table/hook/useComponent.js +64 -0
- package/table/hook/useExpand.js +36 -0
- package/table/hook/useRowSelection.js +92 -0
- package/table/hook/useSorter.js +54 -0
- package/table/hook/useStickyClassNames.js +30 -0
- package/table/hook/useStickyOffsets.js +30 -0
- package/table/summary/Cell.js +10 -0
- package/table/summary/Row.js +26 -0
- package/table/summary/context.js +5 -0
- package/table/summary/index.js +10 -0
- package/table/tbody/Td.js +160 -0
- package/table/tbody/Tr.js +168 -0
- package/table/tbody/index.js +156 -0
- package/table/tfoot/index.js +16 -0
- package/table/thead/Column.js +250 -0
- package/table/thead/index.js +131 -0
- package/table/util.js +121 -0
- package/tabs/Tab.js +170 -0
- package/tabs/TabContent.js +54 -0
- package/tabs/TabPane.js +26 -0
- package/tabs/hook/useDomSize.js +17 -0
- package/tabs/hook/useHeaderScroll.js +64 -0
- package/tabs/tab-header/DropdownIcon.js +71 -0
- package/tabs/tab-header/TabInk.js +65 -0
- package/tabs/tab-header/TabNavIcon.js +65 -0
- package/tabs/tab-header/TabTitle.js +78 -0
- package/tabs/tab-header/index.js +335 -0
- package/tabs/util.js +22 -0
- package/time-picker/Picker.js +221 -0
- package/time-picker/RangePicker.js +56 -0
- package/time-picker/TimeColumn.js +65 -0
- package/time-picker/TimePicker.js +242 -0
- package/time-picker/context.js +5 -0
- package/time-picker/util.js +43 -0
- package/timeline/Item.js +94 -0
- package/timeline/Timeline.js +80 -0
- package/transfer/Item.js +107 -0
- package/transfer/List.js +192 -0
- package/tree/Animation.js +104 -0
- package/tree/Context.js +5 -0
- package/tree/Node.js +215 -0
- package/tree/NodeList.js +84 -0
- package/tree/Tree.js +549 -0
- package/tree/util.js +76 -0
- package/tree-select/List.js +127 -0
- package/tree-select/Select.js +260 -0
- package/tree-select/hook/useKeyCache.js +56 -0
- package/tree-select/hook/useStateValue.js +98 -0
- package/tree-select/hook/useTreeData.js +13 -0
- package/tree-select/interface.js +13 -0
- package/tree-select/util.js +9 -0
- package/trigger/Portal.js +14 -0
- package/trigger/getPopupStyle.js +190 -0
- package/types/badge/Count.d.ts +2 -1
- package/types/badge/index.d.ts +2 -2
- package/types/button/index.d.ts +2 -2
- package/types/carousel/index.d.ts +1 -1
- package/types/color-picker/colors.d.ts +1 -1
- package/types/color-picker/style/index.d.ts +1 -1
- package/types/drawer/Drawer.d.ts +1 -1
- package/types/dropdown/interface.d.ts +1 -0
- package/types/grid/index.d.ts +1 -0
- package/types/hooks/index.d.ts +122 -0
- package/types/hooks/use-verification-code/interface.d.ts +1 -1
- package/types/hooks/useAsync.d.ts +1 -1
- package/types/hooks/useDropArea.d.ts +1 -0
- package/types/hooks/useOverrideRef.d.ts +5 -0
- package/types/hooks/usePersistCallback.d.ts +1 -0
- package/types/hooks/useUpsert.d.ts +1 -1
- package/types/icon-hover/index.d.ts +5 -3
- package/types/index.d.ts +4 -120
- package/types/input-tag/InputTag.d.ts +1 -1
- package/types/input-tag/interface.d.ts +1 -1
- package/types/link/interface.d.ts +1 -1
- package/types/list/index.d.ts +1 -1
- package/types/modal/interface.d.ts +1 -0
- package/types/notice/index.d.ts +3 -0
- package/types/notification/index.d.ts +1 -1
- package/types/page-header/index.d.ts +1 -1
- package/types/select/Select.d.ts +1 -1
- package/types/select-view/Core.d.ts +3 -2
- package/types/select-view/index.d.ts +1 -0
- package/types/statistic/index.d.ts +1 -1
- package/types/switch/index.d.ts +1 -1
- package/types/switch/interface.d.ts +1 -1
- package/types/table/interface.d.ts +2 -1
- package/types/tooltip/index.d.ts +1 -1
- package/types/trigger/index.d.ts +12 -8
- package/types/trigger/interface.d.ts +1 -0
- package/types/typography/Base.d.ts +8 -7
- package/types/typography/EditContent.d.ts +3 -2
- package/types/typography/Paragraph.d.ts +2 -5
- package/types/typography/Text.d.ts +1 -5
- package/types/typography/Title.d.ts +2 -5
- package/types/upload/TriggerNode.d.ts +5 -3
- package/types/upload/list/PictureItem.d.ts +3 -3
- package/types/upload/list/TextItem.d.ts +3 -3
- package/types/utils/CSSTransition.d.ts +2 -0
- package/types/utils/constant.d.ts +1 -1
- package/types/utils/is.d.ts +4 -0
- package/types/utils/reactDOM.d.ts +3 -1
- package/types/utils/warning.d.ts +1 -1
- package/types/version/index.d.ts +1 -1
- package/typography/Base.js +184 -0
- package/typography/EditContent.js +49 -0
- package/typography/Ellipsis.js +293 -0
- package/typography/Operations.js +78 -0
- package/typography/Paragraph.js +26 -0
- package/typography/Text.js +11 -0
- package/typography/Title.js +12 -0
- package/typography/Typography.js +15 -0
- package/typography/useCssEllipsis.js +37 -0
- package/typography/useEllipsis.js +150 -0
- package/upload/TriggerNode.js +118 -0
- package/upload/Upload.js +205 -0
- package/upload/Uploader.js +205 -0
- package/upload/interface.js +9 -0
- package/upload/list/PictureItem.js +91 -0
- package/upload/list/TextItem.js +99 -0
- package/upload/list/UploadProgress.js +97 -0
- package/upload/list/index.js +120 -0
- package/upload/request.js +51 -0
- package/upload/util.js +61 -0
- package/utils/CSSTransition.js +27 -0
- package/utils/contextHolder.js +29 -4
- package/utils/getHighlightText.js +1 -2
- package/utils/is.js +81 -68
- package/utils/reactDOM.js +33 -22
- package/utils/style.js +1 -2
- package/utils/warning.js +7 -3
- package/verification-code/VerificationCode.js +83 -0
- package/virtual-list/Filler.js +31 -0
- package/virtual-list/VirtualList.js +378 -0
- package/virtual-list/util/algorithm.js +32 -0
- package/virtual-list/util/item.js +99 -0
- package/{chunk/BCEX3Acw.js → watermark/Watermark.js} +13 -11
- package/chunk/B1P8u7kB.js +0 -798
- package/chunk/B2ufZjjd.js +0 -1000
- package/chunk/B7QOJqps.js +0 -162
- package/chunk/BBz3S3zo.js +0 -966
- package/chunk/BGzBxiWE.js +0 -517
- package/chunk/BNRfcEHj.js +0 -984
- package/chunk/BSs6uXmc.js +0 -946
- package/chunk/BTjUAV8T.js +0 -277
- package/chunk/BYQeEcKe.js +0 -375
- package/chunk/Ba4UXIST.js +0 -605
- package/chunk/BfaXVcik.js +0 -271
- package/chunk/Bs11tCU6.js +0 -240
- package/chunk/C7FC7dzS.js +0 -516
- package/chunk/CLzbve11.js +0 -694
- package/chunk/CN4zXU4b.js +0 -877
- package/chunk/CYTPZUHD.js +0 -769
- package/chunk/CcCo_dK0.js +0 -335
- package/chunk/CoCXcpQd.js +0 -261
- package/chunk/D4yH4UKK.js +0 -80
- package/chunk/DiSLYN2-.js +0 -167
- package/chunk/Dr0iXIXO.js +0 -736
- package/chunk/G3-2uJao.js +0 -229
- package/chunk/RnTpOC5-.js +0 -1
- package/chunk/Z-mtdHUQ.js +0 -226
- package/chunk/ZISxNnaR.js +0 -165
- package/chunk/aPJXnDSb.js +0 -450
- package/chunk/i605JRmI.js +0 -232
- package/chunk/l0sNRNKZ.js +0 -1
- package/types/form/FormItemTip.d.ts +0 -8
- /package/{chunk/C6Kfwj0f.js → loading/style/index.less.js} +0 -0
- /package/{chunk/DP2rzg_V.js → suspense-fallback-test/style/index.less.js} +0 -0
- /package/types/{Popover → popover}/index.d.ts +0 -0
- /package/types/{Popover → popover}/interface.d.ts +0 -0
- /package/types/{Popover → popover}/style/index.d.ts +0 -0
- /package/{chunk/K6Dvbx-E.js → virtual-list/style/index.less.js} +0 -0
package/Slider.js
CHANGED
|
@@ -1,667 +1,193 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
top: 12,
|
|
32
|
-
bottom: 12
|
|
33
|
-
}, we = function(t) {
|
|
34
|
-
const {
|
|
35
|
-
style: o,
|
|
36
|
-
disabled: n,
|
|
37
|
-
prefixCls: r,
|
|
38
|
-
value: s,
|
|
39
|
-
vertical: d,
|
|
40
|
-
tooltipVisible: k,
|
|
41
|
-
tooltipPosition: m,
|
|
42
|
-
formatTooltip: b,
|
|
43
|
-
getTooltipContainer: c,
|
|
44
|
-
onMoving: V,
|
|
45
|
-
onMoveEnd: h,
|
|
46
|
-
onMoveBegin: f
|
|
47
|
-
} = t, e = me(), [g, w] = St(!1), [v, i] = Ft(!1, {
|
|
48
|
-
value: k
|
|
49
|
-
}), { getPrefixCls: u } = Et(Bt), M = Z(
|
|
50
|
-
() => m || (d ? "right" : "top"),
|
|
51
|
-
[m, d]
|
|
52
|
-
), T = S(null), K = S(!1), z = S(!1), P = S(null);
|
|
53
|
-
function at(C) {
|
|
54
|
-
C.stopPropagation(), !n && (it(C), w(!0), U(window, "mousemove", E), U(window, "touchmove", E), U(window, "mouseup", R), U(window, "touchend", R), U(window, "contextmenu", R));
|
|
55
|
-
}
|
|
56
|
-
function O() {
|
|
57
|
-
K.current = !0, J(), v || (T.current = setTimeout(() => {
|
|
58
|
-
j(!0);
|
|
59
|
-
}, 50));
|
|
60
|
-
}
|
|
61
|
-
function D() {
|
|
62
|
-
K.current = !1, z.current || (J(), T.current = setTimeout(() => {
|
|
63
|
-
j(!1);
|
|
64
|
-
}, 200));
|
|
65
|
-
}
|
|
66
|
-
function it(C) {
|
|
67
|
-
var B;
|
|
68
|
-
C.preventDefault();
|
|
69
|
-
const N = document.activeElement;
|
|
70
|
-
(B = N == null ? void 0 : N.blur) == null || B.call(N), L(f) && f();
|
|
71
|
-
}
|
|
72
|
-
function E(C) {
|
|
73
|
-
z.current = !0, C.type === "touchstart" && (C.clientY = C.touches[0].clientY, C.clientX = C.touches[0].clientX), L(V) && V(C.clientX, C.clientY);
|
|
74
|
-
}
|
|
75
|
-
function R() {
|
|
76
|
-
z.current = !1, w(!1), ut(), j(K.current), L(h) && h();
|
|
77
|
-
}
|
|
78
|
-
function ut() {
|
|
79
|
-
J(), W(window, "mousemove", E), W(window, "touchmove", E), W(window, "mouseup", R), W(window, "touchend", R), W(window, "contextmenu", R);
|
|
80
|
-
}
|
|
81
|
-
function J() {
|
|
82
|
-
T.current && (clearTimeout(T.current), T.current = null);
|
|
83
|
-
}
|
|
84
|
-
function j(C) {
|
|
85
|
-
if (z.current)
|
|
86
|
-
return;
|
|
87
|
-
const N = "tooltipVisible" in t ? k : C;
|
|
88
|
-
i(N);
|
|
89
|
-
}
|
|
90
|
-
function lt() {
|
|
91
|
-
K.current = !0, J();
|
|
92
|
-
}
|
|
93
|
-
const x = Z(() => L(b) ? b(s) : s, [b, s]);
|
|
94
|
-
function tt(C) {
|
|
95
|
-
const N = u("tooltip");
|
|
96
|
-
return /* @__PURE__ */ I(
|
|
97
|
-
"div",
|
|
98
|
-
{
|
|
99
|
-
className: Y(
|
|
100
|
-
`${N}-content`,
|
|
101
|
-
`${N}-content-${C}`
|
|
102
|
-
),
|
|
103
|
-
onMouseLeave: D,
|
|
104
|
-
onMouseEnter: lt,
|
|
105
|
-
onClick: (B) => {
|
|
106
|
-
B.stopPropagation();
|
|
107
|
-
},
|
|
108
|
-
children: /* @__PURE__ */ I("div", { className: `${N}-content-inner`, children: x })
|
|
109
|
-
}
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
return Lt(() => {
|
|
113
|
-
P && P.current && P.current.updatePopupPosition();
|
|
114
|
-
}, [s]), /* @__PURE__ */ I(
|
|
115
|
-
se,
|
|
116
|
-
{
|
|
117
|
-
style: pe,
|
|
118
|
-
classNames: "zoomInFadeOut",
|
|
119
|
-
duration: he,
|
|
120
|
-
showArrow: !0,
|
|
121
|
-
popupAlign: ve,
|
|
122
|
-
ref: P,
|
|
123
|
-
popup: () => tt(M),
|
|
124
|
-
popupVisible: v,
|
|
125
|
-
disabled: k === !1,
|
|
126
|
-
getPopupContainer: c,
|
|
127
|
-
position: M,
|
|
128
|
-
childrenPrefix: u("tooltip"),
|
|
129
|
-
children: /* @__PURE__ */ I(
|
|
130
|
-
"div",
|
|
131
|
-
{
|
|
132
|
-
className: Y(`${r}-button`, {
|
|
133
|
-
[`${r}-button-active`]: g
|
|
134
|
-
}),
|
|
135
|
-
onMouseDown: at,
|
|
136
|
-
onMouseEnter: O,
|
|
137
|
-
onMouseLeave: D,
|
|
138
|
-
style: o,
|
|
139
|
-
role: "slider",
|
|
140
|
-
"aria-valuemax": t.maxValue,
|
|
141
|
-
"aria-valuemin": t.minValue,
|
|
142
|
-
"aria-valuenow": s,
|
|
143
|
-
"aria-disabled": !!n,
|
|
144
|
-
tabIndex: n ? -1 : 0,
|
|
145
|
-
"aria-valuetext": fe(x) || nt(x) ? String(x) : void 0,
|
|
146
|
-
...e({
|
|
147
|
-
onArrowRight: (C) => {
|
|
148
|
-
var N;
|
|
149
|
-
C.preventDefault(), (N = t.onArrowEvent) == null || N.call(t, "addition");
|
|
150
|
-
},
|
|
151
|
-
onArrowUp: (C) => {
|
|
152
|
-
var N;
|
|
153
|
-
C.preventDefault(), (N = t.onArrowEvent) == null || N.call(t, "addition");
|
|
154
|
-
},
|
|
155
|
-
onArrowLeft: (C) => {
|
|
156
|
-
var N;
|
|
157
|
-
C.preventDefault(), (N = t.onArrowEvent) == null || N.call(t, "subtraction");
|
|
158
|
-
},
|
|
159
|
-
onArrowDown: (C) => {
|
|
160
|
-
var N;
|
|
161
|
-
C.preventDefault(), (N = t.onArrowEvent) == null || N.call(t, "subtraction");
|
|
162
|
-
}
|
|
163
|
-
})
|
|
164
|
-
}
|
|
165
|
-
)
|
|
166
|
-
}
|
|
167
|
-
);
|
|
168
|
-
}, be = _.memo(we);
|
|
169
|
-
function Ve(t) {
|
|
170
|
-
const o = `${t}`.split(".")[1];
|
|
171
|
-
return o && o.length || 0;
|
|
172
|
-
}
|
|
173
|
-
function X(t) {
|
|
174
|
-
return `${t * 100}%`;
|
|
175
|
-
}
|
|
176
|
-
function Me(t, o) {
|
|
177
|
-
const n = Number(t);
|
|
178
|
-
if (o && !isNaN(n)) {
|
|
179
|
-
const [r, s] = o;
|
|
180
|
-
return Rt(pt(n, r), pt(s, r));
|
|
181
|
-
}
|
|
182
|
-
return 0;
|
|
183
|
-
}
|
|
184
|
-
function jt(t, o) {
|
|
185
|
-
const n = Number(t);
|
|
186
|
-
return o.sort((r, s) => r - s), n >= o[0] && n <= o[1];
|
|
187
|
-
}
|
|
188
|
-
function dt(t) {
|
|
189
|
-
return t || t === 0;
|
|
190
|
-
}
|
|
191
|
-
function Ce(t) {
|
|
192
|
-
const o = parseFloat(t), n = o > 1 ? (o / 100).toFixed(2) : o, r = parseFloat(n);
|
|
193
|
-
if (!isNaN(r) && r >= 0 && r <= 1)
|
|
194
|
-
return r;
|
|
195
|
-
}
|
|
196
|
-
function Q(t, o) {
|
|
197
|
-
const n = o.find(
|
|
198
|
-
(r) => t >= r.begin && t <= r.end
|
|
199
|
-
);
|
|
200
|
-
if (n) {
|
|
201
|
-
const { beginOffset: r, begin: s, end: d, endOffset: k } = n, m = Me(t, [s, d]), b = pt(k, r), c = wt(m, b);
|
|
202
|
-
return ot(r, c);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
function vt(t) {
|
|
206
|
-
const o = t.slice(0);
|
|
207
|
-
return o.sort((n, r) => n - r), o;
|
|
208
|
-
}
|
|
209
|
-
function xe(t) {
|
|
210
|
-
return t.some((o, n) => o > t[n + 1]);
|
|
211
|
-
}
|
|
212
|
-
function Ne(t, o) {
|
|
213
|
-
let n = o.indexOf(t);
|
|
214
|
-
return n === -1 ? (n = vt(o.concat(t)).indexOf(t), [
|
|
215
|
-
Math.max(n - 1, 0),
|
|
216
|
-
Math.min(n, o.length - 1)
|
|
217
|
-
]) : [n, n + 1];
|
|
218
|
-
}
|
|
219
|
-
const ke = function(t) {
|
|
220
|
-
const {
|
|
221
|
-
data: o = [],
|
|
222
|
-
valueRange: n = [],
|
|
223
|
-
vertical: r,
|
|
224
|
-
prefixCls: s,
|
|
225
|
-
reverse: d,
|
|
226
|
-
intervalConfigs: k
|
|
227
|
-
} = t;
|
|
228
|
-
return o.length ? /* @__PURE__ */ I("div", { className: `${s}-dots`, children: o.map(({ key: m, content: b }) => {
|
|
229
|
-
const c = X(Q(+m, k));
|
|
230
|
-
return /* @__PURE__ */ I(
|
|
231
|
-
"div",
|
|
232
|
-
{
|
|
233
|
-
className: `${s}-dot-wrapper`,
|
|
234
|
-
style: {
|
|
235
|
-
...r ? { [d ? "top" : "bottom"]: c } : { [d ? "right" : "left"]: c }
|
|
236
|
-
},
|
|
237
|
-
onMouseDown: (V) => {
|
|
238
|
-
V.stopPropagation(), L(t.onMouseDown) && t.onMouseDown(parseFloat(m));
|
|
239
|
-
},
|
|
240
|
-
children: rt(b) && b.dot ? b.dot : /* @__PURE__ */ I(
|
|
241
|
-
"div",
|
|
242
|
-
{
|
|
243
|
-
className: Y(`${s}-dot`, {
|
|
244
|
-
[`${s}-dot-active`]: jt(m, n)
|
|
245
|
-
})
|
|
246
|
-
}
|
|
247
|
-
)
|
|
248
|
-
},
|
|
249
|
-
m
|
|
250
|
-
);
|
|
251
|
-
}) }) : null;
|
|
252
|
-
}, Ie = _.memo(ke), ye = function(t) {
|
|
253
|
-
const {
|
|
254
|
-
value: o,
|
|
255
|
-
range: n,
|
|
256
|
-
min: r,
|
|
257
|
-
max: s,
|
|
258
|
-
step: d,
|
|
259
|
-
disabled: k,
|
|
260
|
-
prefixCls: m,
|
|
261
|
-
onChange: b,
|
|
262
|
-
extra: c = []
|
|
263
|
-
} = t, V = {
|
|
264
|
-
min: r,
|
|
265
|
-
max: s,
|
|
266
|
-
step: d,
|
|
267
|
-
disabled: k
|
|
268
|
-
}, [h, f] = St(o), e = c[0], g = n ? c[1] : c[0];
|
|
269
|
-
Lt(() => {
|
|
270
|
-
f(o);
|
|
271
|
-
}, [o]);
|
|
272
|
-
const w = (i) => {
|
|
273
|
-
b == null || b(i);
|
|
274
|
-
}, v = () => {
|
|
275
|
-
f([...o].sort((i, u) => i - u));
|
|
276
|
-
};
|
|
277
|
-
return /* @__PURE__ */ gt(
|
|
278
|
-
"div",
|
|
279
|
-
{
|
|
280
|
-
className: Y(`${m}-input`, {
|
|
281
|
-
[`${m}-input-group`]: n
|
|
282
|
-
}),
|
|
283
|
-
onBlur: v,
|
|
284
|
-
children: [
|
|
285
|
-
n && [
|
|
286
|
-
/* @__PURE__ */ Tt(
|
|
287
|
-
Dt,
|
|
288
|
-
{
|
|
289
|
-
hideControl: !0,
|
|
290
|
-
...e,
|
|
291
|
-
...V,
|
|
292
|
-
value: h[0],
|
|
293
|
-
key: 0,
|
|
294
|
-
onChange: (i, u) => {
|
|
295
|
-
var M;
|
|
296
|
-
isNaN(i) && i !== i || (w([i, h[1]]), (M = e == null ? void 0 : e.onChange) == null || M.call(e, i, u));
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
),
|
|
300
|
-
/* @__PURE__ */ I("div", { className: `${m}-input-range`, children: /* @__PURE__ */ I("span", { className: `${m}-input-range-content` }) }, 1)
|
|
301
|
-
],
|
|
302
|
-
/* @__PURE__ */ Tt(
|
|
303
|
-
Dt,
|
|
304
|
-
{
|
|
305
|
-
hideControl: !0,
|
|
306
|
-
...g,
|
|
307
|
-
...V,
|
|
308
|
-
key: 2,
|
|
309
|
-
value: h[1],
|
|
310
|
-
onChange: (i, u) => {
|
|
311
|
-
var M;
|
|
312
|
-
isNaN(i) && i !== i || (w([h[0], i]), (M = g == null ? void 0 : g.onChange) == null || M.call(g, i, u));
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
)
|
|
316
|
-
]
|
|
317
|
-
}
|
|
318
|
-
);
|
|
319
|
-
}, $e = _.memo(ye), Oe = function(t) {
|
|
320
|
-
const { data: o = [], vertical: n, prefixCls: r, reverse: s, intervalConfigs: d } = t;
|
|
321
|
-
return o.length ? /* @__PURE__ */ I("div", { className: `${r}-marks`, children: o.map(({ key: k, content: m }) => {
|
|
322
|
-
const b = X(Q(+k, d));
|
|
323
|
-
let c = null;
|
|
324
|
-
return rt(m) && dt(m.text) ? c = m.text : dt(m) && (c = m), dt(c) && /* @__PURE__ */ I(
|
|
325
|
-
"div",
|
|
326
|
-
{
|
|
327
|
-
className: `${r}-marks-text`,
|
|
328
|
-
"aria-hidden": !0,
|
|
329
|
-
style: n ? { [s ? "top" : "bottom"]: b } : { [s ? "right" : "left"]: b },
|
|
330
|
-
onMouseDown: (V) => {
|
|
331
|
-
V.stopPropagation(), L(t.onMouseDown) && t.onMouseDown(parseFloat(k));
|
|
332
|
-
},
|
|
333
|
-
children: c
|
|
334
|
-
},
|
|
335
|
-
k
|
|
336
|
-
);
|
|
337
|
-
}) }) : null;
|
|
338
|
-
}, Pe = _.memo(Oe);
|
|
339
|
-
function Ae(t) {
|
|
340
|
-
const {
|
|
341
|
-
min: o,
|
|
342
|
-
max: n,
|
|
343
|
-
valueRange: r,
|
|
344
|
-
prefixCls: s,
|
|
345
|
-
vertical: d,
|
|
346
|
-
reverse: k,
|
|
347
|
-
intervalConfigs: m
|
|
348
|
-
} = t, b = /* @__PURE__ */ new Map(), c = (h) => {
|
|
349
|
-
const { step: f, begin: e, end: g } = h, w = Math.floor((g - e) / f);
|
|
350
|
-
for (let v = 0; v <= w; v++) {
|
|
351
|
-
const i = ot(v * f, e);
|
|
352
|
-
if (i <= o || i >= n)
|
|
353
|
-
continue;
|
|
354
|
-
const u = X(Q(i, m));
|
|
355
|
-
b.set(u, {
|
|
356
|
-
offset: u,
|
|
357
|
-
isActive: jt(i, r)
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
}, V = Z(() => {
|
|
361
|
-
var h;
|
|
362
|
-
return b.clear(), (h = m == null ? void 0 : m.forEach) == null || h.call(m, (f) => c(f)), Array.from(b.values());
|
|
363
|
-
}, [m]);
|
|
364
|
-
return /* @__PURE__ */ I("div", { className: `${s}-ticks`, children: V.map((h, f) => /* @__PURE__ */ I(
|
|
365
|
-
"div",
|
|
366
|
-
{
|
|
367
|
-
className: Y(`${s}-tick`, {
|
|
368
|
-
[`${s}-tick-active`]: h.isActive
|
|
369
|
-
}),
|
|
370
|
-
style: d ? { [k ? "top" : "bottom"]: h.offset } : { [k ? "right" : "left"]: h.offset }
|
|
371
|
-
},
|
|
372
|
-
f
|
|
373
|
-
)) });
|
|
374
|
-
}
|
|
375
|
-
const De = _.memo(Ae);
|
|
376
|
-
function Te(t) {
|
|
377
|
-
if (t.length < 2)
|
|
378
|
-
return [];
|
|
379
|
-
const o = [];
|
|
380
|
-
for (let n = 1; n < t.length; n++) {
|
|
381
|
-
const r = t[n - 1], s = t[n];
|
|
382
|
-
o.push([r, s]);
|
|
383
|
-
}
|
|
384
|
-
return o;
|
|
385
|
-
}
|
|
386
|
-
function Re(t) {
|
|
387
|
-
const { marks: o = {}, getIntervalConfig: n, max: r, min: s } = t, { markIntervals: d, markList: k } = Z(() => {
|
|
388
|
-
const b = Object.keys(o).filter((f) => nt(+f) && +f >= s && +f <= r).sort((f, e) => +f > +e ? 1 : -1), c = b.map((f) => ({ key: f, content: o[f] }));
|
|
389
|
-
let V = b.map((f) => +f);
|
|
390
|
-
return V.length === 0 ? V = [s, r] : (V[0] > s && (V.unshift(s), c.unshift({ key: `${s}`, content: "" })), V.slice(-1)[0] < r && (V.push(r), c.push({ key: `${r}`, content: "" }))), { markIntervals: Te(V), markList: c };
|
|
391
|
-
}, [o, s, r]);
|
|
392
|
-
return {
|
|
393
|
-
intervalConfigs: Z(() => {
|
|
394
|
-
if (!L(n))
|
|
395
|
-
return [
|
|
396
|
-
{
|
|
397
|
-
begin: s,
|
|
398
|
-
end: r,
|
|
399
|
-
step: t.step,
|
|
400
|
-
beginOffset: 0,
|
|
401
|
-
endOffset: 1,
|
|
402
|
-
width: 1
|
|
403
|
-
}
|
|
404
|
-
];
|
|
405
|
-
const b = ([e, g], w) => {
|
|
406
|
-
const v = { step: t.step, width: 0 }, i = n([e, g], w) || {}, u = i.step, M = Ce(i.width);
|
|
407
|
-
return nt(u) && u && (v.step = u), nt(M) && M && (v.width = M), v;
|
|
408
|
-
};
|
|
409
|
-
let c = 1, V = r - s;
|
|
410
|
-
const h = d.map(([e, g], w) => {
|
|
411
|
-
const v = b([e, g], w);
|
|
412
|
-
let i = v.width;
|
|
413
|
-
if (i) {
|
|
414
|
-
i = Math.min(c, i);
|
|
415
|
-
const u = g - e;
|
|
416
|
-
V -= u, c -= i;
|
|
417
|
-
}
|
|
418
|
-
return { width: i, step: v.step };
|
|
419
|
-
});
|
|
420
|
-
if (h.every(({ width: e }) => e) && c) {
|
|
421
|
-
const e = h[d.length - 1];
|
|
422
|
-
e.width += c;
|
|
423
|
-
}
|
|
424
|
-
const f = [];
|
|
425
|
-
return d.forEach(([e, g], w) => {
|
|
426
|
-
const { step: v, width: i } = h[w], u = {
|
|
427
|
-
begin: e,
|
|
428
|
-
end: g,
|
|
429
|
-
step: v,
|
|
430
|
-
beginOffset: 0,
|
|
431
|
-
endOffset: 0,
|
|
432
|
-
width: i
|
|
433
|
-
};
|
|
434
|
-
u.width || (u.width = c * ((g - e) / V));
|
|
435
|
-
const M = f.length - 1;
|
|
436
|
-
f[M] && (u.beginOffset = f[M].endOffset), u.endOffset = Math.min(1, u.beginOffset + u.width), f.push(u);
|
|
437
|
-
}), f;
|
|
438
|
-
}, [n, d, r, s, t.step]),
|
|
439
|
-
markList: k
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
function Se(t) {
|
|
443
|
-
const { isRange: o, min: n, max: r, onlyMarkValue: s, intervalConfigs: d, marks: k } = t, m = H(
|
|
444
|
-
(e) => {
|
|
445
|
-
const g = d.find((w) => e >= w.begin && e <= w.end);
|
|
446
|
-
if (g) {
|
|
447
|
-
const { begin: w, step: v } = g, i = e - w, u = Math.round(i / v), M = Ve(v), T = parseFloat(
|
|
448
|
-
wt(v, u).toFixed(M)
|
|
449
|
-
);
|
|
450
|
-
return ot(w, T);
|
|
451
|
-
}
|
|
452
|
-
return e;
|
|
453
|
-
},
|
|
454
|
-
[d]
|
|
455
|
-
), b = H(
|
|
456
|
-
(e) => {
|
|
457
|
-
if (!rt(k) || de(k))
|
|
458
|
-
return console.warn("marks must be an object when onlyMarkValue is true"), n;
|
|
459
|
-
if (k[e])
|
|
460
|
-
return e;
|
|
461
|
-
const g = Object.keys(k), w = g.map((i) => Math.abs(e - parseFloat(i))), v = w.indexOf(Math.min.apply(null, w));
|
|
462
|
-
return parseFloat(g[v]);
|
|
463
|
-
},
|
|
464
|
-
[k, n]
|
|
465
|
-
), c = H(
|
|
466
|
-
(e) => ge(e) || e <= n ? n : e >= r ? r : s ? b(e) : m(e),
|
|
467
|
-
[b, m, r, n, s]
|
|
468
|
-
), V = H(
|
|
469
|
-
(e) => c(e) === e,
|
|
470
|
-
[c]
|
|
471
|
-
), h = H(
|
|
472
|
-
(e) => {
|
|
473
|
-
let [g, w] = [n, n];
|
|
474
|
-
if (o) {
|
|
475
|
-
if (ht(e))
|
|
476
|
-
return g = c(e[0]), e.map((v) => c(v));
|
|
477
|
-
console.error("value must be an array when range is true");
|
|
478
|
-
} else
|
|
479
|
-
nt(e) ? w = c(e) : console.error("value must be a number when range is false");
|
|
480
|
-
return [g, w];
|
|
481
|
-
},
|
|
482
|
-
[c, o, n]
|
|
483
|
-
), f = H(
|
|
484
|
-
(e, g) => {
|
|
485
|
-
const w = g === "subtraction" ? -1 : 1;
|
|
486
|
-
let v = ot(e, w * t.step);
|
|
487
|
-
if (t.onlyMarkValue) {
|
|
488
|
-
const i = Object.keys(t.marks), u = i.findIndex((M) => Number(M) === e);
|
|
489
|
-
v = i[u + w] !== void 0 ? Number(i[u + w]) : e;
|
|
490
|
-
}
|
|
491
|
-
return v;
|
|
492
|
-
},
|
|
493
|
-
[t.marks, t.onlyMarkValue, t.step]
|
|
494
|
-
);
|
|
495
|
-
return {
|
|
496
|
-
getLegalRangeValue: h,
|
|
497
|
-
getLegalValue: c,
|
|
498
|
-
isLegalValue: V,
|
|
499
|
-
getNextMarkValue: f
|
|
500
|
-
};
|
|
501
|
-
}
|
|
502
|
-
const Ee = {
|
|
1
|
+
import { jsx as d, jsxs as oe } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
|
+
/* empty css */
|
|
8
|
+
/* empty css */
|
|
9
|
+
import { divide as Fe, plus as Je, times as qe } from "@unicom-cloud/utils/math";
|
|
10
|
+
import ne from "lodash/isArray";
|
|
11
|
+
import re from "lodash/isFunction";
|
|
12
|
+
import ie from "lodash/isPlainObject";
|
|
13
|
+
import ze, { forwardRef as Ge, useContext as He, useRef as V, useMemo as Ke } from "react";
|
|
14
|
+
import "./config-provider/ConfigProvider.js";
|
|
15
|
+
import Qe from "./hooks/useMergeProps.js";
|
|
16
|
+
import We from "./hooks/useMergeValue.js";
|
|
17
|
+
import Ze from "./hooks/useUpdateEffect.js";
|
|
18
|
+
import ae from "@unicom-cloud/utils/class-name";
|
|
19
|
+
import { on as se, off as le } from "./utils/dom.js";
|
|
20
|
+
import _e from "./utils/omit.js";
|
|
21
|
+
import et from "./slider/Button.js";
|
|
22
|
+
import tt from "./slider/Dot.js";
|
|
23
|
+
import ot from "./slider/Input.js";
|
|
24
|
+
import nt from "./slider/Mark.js";
|
|
25
|
+
import rt from "./slider/Tick.js";
|
|
26
|
+
import it from "./slider/hook/useInterval.js";
|
|
27
|
+
import at from "./slider/hook/useLegalValue.js";
|
|
28
|
+
import { needSort as st, sortNumberArray as ue, getIntervalOffset as j, formatPercent as y, findNearestIndex as lt } from "./slider/util.js";
|
|
29
|
+
import { ConfigContext as ut } from "./config-provider/context.js";
|
|
30
|
+
const ct = {
|
|
503
31
|
max: 100,
|
|
504
32
|
min: 0,
|
|
505
33
|
step: 1
|
|
506
34
|
};
|
|
507
|
-
function
|
|
508
|
-
const { getPrefixCls:
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
35
|
+
function ft(fe, me) {
|
|
36
|
+
const { getPrefixCls: pe, componentConfig: I, rtl: U } = He(ut), l = Qe(
|
|
37
|
+
fe,
|
|
38
|
+
ct,
|
|
39
|
+
I == null ? void 0 : I.Slider
|
|
512
40
|
), {
|
|
513
|
-
className:
|
|
514
|
-
style:
|
|
515
|
-
tooltipVisible:
|
|
516
|
-
tooltipPosition:
|
|
517
|
-
disabled:
|
|
518
|
-
min:
|
|
519
|
-
max:
|
|
520
|
-
range:
|
|
521
|
-
step:
|
|
522
|
-
showTicks:
|
|
523
|
-
marks:
|
|
524
|
-
onlyMarkValue:
|
|
41
|
+
className: ge,
|
|
42
|
+
style: de,
|
|
43
|
+
tooltipVisible: ve,
|
|
44
|
+
tooltipPosition: he,
|
|
45
|
+
disabled: C,
|
|
46
|
+
min: c,
|
|
47
|
+
max: w,
|
|
48
|
+
range: P,
|
|
49
|
+
step: R,
|
|
50
|
+
showTicks: Ve,
|
|
51
|
+
marks: N,
|
|
52
|
+
onlyMarkValue: k,
|
|
525
53
|
vertical: u,
|
|
526
|
-
showInput:
|
|
527
|
-
reverse:
|
|
528
|
-
getIntervalConfig:
|
|
529
|
-
...
|
|
530
|
-
} =
|
|
531
|
-
min:
|
|
532
|
-
max:
|
|
533
|
-
onlyMarkValue:
|
|
534
|
-
step:
|
|
535
|
-
marks:
|
|
536
|
-
getIntervalConfig:
|
|
537
|
-
}), { getLegalValue:
|
|
538
|
-
isRange:
|
|
539
|
-
min:
|
|
540
|
-
max:
|
|
541
|
-
onlyMarkValue:
|
|
542
|
-
step:
|
|
543
|
-
intervalConfigs:
|
|
544
|
-
marks:
|
|
545
|
-
}), [
|
|
546
|
-
|
|
54
|
+
showInput: f,
|
|
55
|
+
reverse: X,
|
|
56
|
+
getIntervalConfig: Ce,
|
|
57
|
+
...we
|
|
58
|
+
} = l, m = !!P, Me = ie(P) ? { ...P } : { draggableBar: !1 }, s = U ? !X : X, { intervalConfigs: p, markList: Y } = it({
|
|
59
|
+
min: c,
|
|
60
|
+
max: w,
|
|
61
|
+
onlyMarkValue: k,
|
|
62
|
+
step: R,
|
|
63
|
+
marks: N,
|
|
64
|
+
getIntervalConfig: Ce
|
|
65
|
+
}), { getLegalValue: b, getLegalRangeValue: B, isLegalValue: be, getNextMarkValue: xe } = at({
|
|
66
|
+
isRange: m,
|
|
67
|
+
min: c,
|
|
68
|
+
max: w,
|
|
69
|
+
onlyMarkValue: k,
|
|
70
|
+
step: R,
|
|
71
|
+
intervalConfigs: p,
|
|
72
|
+
marks: N
|
|
73
|
+
}), [O, ye] = We(
|
|
74
|
+
m ? [c, c] : c,
|
|
547
75
|
{
|
|
548
|
-
defaultValue:
|
|
549
|
-
value:
|
|
76
|
+
defaultValue: l.defaultValue,
|
|
77
|
+
value: l.value
|
|
550
78
|
}
|
|
551
79
|
);
|
|
552
|
-
let
|
|
553
|
-
const
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
}, [
|
|
557
|
-
const
|
|
80
|
+
let n = B(O);
|
|
81
|
+
const S = V(n), T = V(st(n));
|
|
82
|
+
Ze(() => {
|
|
83
|
+
S.current = B(O);
|
|
84
|
+
}, [O, B]), T.current && (n = ue(n));
|
|
85
|
+
const $ = n[n.length - 1], A = n[0], D = f && !k && (!m || n.length < 3), Ie = Ke(() => D && (ne(f) || ie(f)) ? ne(f) ? [...f] : [{ ...f }, { ...f }] : [], [D, f]), i = pe("slider"), F = V(null), J = V({
|
|
558
86
|
left: 0,
|
|
559
87
|
height: 0,
|
|
560
88
|
top: 0,
|
|
561
89
|
width: 0
|
|
562
|
-
}),
|
|
563
|
-
function
|
|
564
|
-
const
|
|
565
|
-
return
|
|
566
|
-
}
|
|
567
|
-
function
|
|
568
|
-
const
|
|
569
|
-
return
|
|
570
|
-
}
|
|
571
|
-
function
|
|
572
|
-
const
|
|
573
|
-
|
|
574
|
-
}
|
|
575
|
-
function
|
|
576
|
-
if (
|
|
577
|
-
const
|
|
578
|
-
|
|
90
|
+
}), q = V(!1), z = V(0);
|
|
91
|
+
function G(t) {
|
|
92
|
+
const e = ue(t);
|
|
93
|
+
return m ? e : e[e.length - 1];
|
|
94
|
+
}
|
|
95
|
+
function Pe(t) {
|
|
96
|
+
const e = t.map((o) => b(o));
|
|
97
|
+
return S.current = e, e;
|
|
98
|
+
}
|
|
99
|
+
function v(t, e) {
|
|
100
|
+
const o = Pe(t), r = G(o);
|
|
101
|
+
ye(r), e === "inputValueChange" ? T.current = o.some((a, h) => a > o[h]) : T.current = !1, re(l.onChange) && l.onChange(r);
|
|
102
|
+
}
|
|
103
|
+
function x() {
|
|
104
|
+
if (re(l.onAfterChange)) {
|
|
105
|
+
const t = G(S.current);
|
|
106
|
+
l.onAfterChange(t);
|
|
579
107
|
}
|
|
580
108
|
}
|
|
581
|
-
function
|
|
582
|
-
let [
|
|
583
|
-
return
|
|
109
|
+
function Re(t) {
|
|
110
|
+
let [e, o] = [n[0], n[n.length - 1]];
|
|
111
|
+
return e > o && ([e, o] = [o, e]), m ? t >= e && t <= o : t <= o;
|
|
584
112
|
}
|
|
585
|
-
function
|
|
586
|
-
const { left:
|
|
587
|
-
let
|
|
588
|
-
if (u && (
|
|
113
|
+
function E(t, e) {
|
|
114
|
+
const { left: o, top: r, width: a, height: h } = J.current;
|
|
115
|
+
let g = a, W = s ? o + a - t : t - o;
|
|
116
|
+
if (u && (g = h, W = s ? e - r : r + h - e), g <= 0)
|
|
589
117
|
return 0;
|
|
590
|
-
let
|
|
591
|
-
|
|
592
|
-
const
|
|
593
|
-
begin:
|
|
594
|
-
beginOffset:
|
|
595
|
-
step:
|
|
596
|
-
endOffset:
|
|
597
|
-
end:
|
|
598
|
-
} =
|
|
599
|
-
return
|
|
600
|
-
}
|
|
601
|
-
function
|
|
602
|
-
let [
|
|
603
|
-
|
|
604
|
-
const
|
|
118
|
+
let M = Math.max(Fe(W, g), 0);
|
|
119
|
+
M = Math.min(1, M);
|
|
120
|
+
const De = p.find((te) => M >= te.beginOffset && M <= te.endOffset), {
|
|
121
|
+
begin: Z,
|
|
122
|
+
beginOffset: _,
|
|
123
|
+
step: ee,
|
|
124
|
+
endOffset: Ee,
|
|
125
|
+
end: Le
|
|
126
|
+
} = De, je = M - _, Ue = Ee - _, Xe = je / Ue * (Le - Z), Ye = Math.round(Xe / ee);
|
|
127
|
+
return Je(Z, qe(Ye, ee));
|
|
128
|
+
}
|
|
129
|
+
function Ne(t) {
|
|
130
|
+
let [e, o] = t;
|
|
131
|
+
e > o && ([e, o] = [o, e]);
|
|
132
|
+
const r = y(e), a = y(1 - o);
|
|
605
133
|
return u ? {
|
|
606
|
-
[
|
|
607
|
-
[
|
|
134
|
+
[s ? "top" : "bottom"]: r,
|
|
135
|
+
[s ? "bottom" : "top"]: a
|
|
608
136
|
} : {
|
|
609
|
-
[
|
|
610
|
-
[
|
|
137
|
+
[s ? "right" : "left"]: r,
|
|
138
|
+
[s ? "left" : "right"]: a
|
|
611
139
|
};
|
|
612
140
|
}
|
|
613
|
-
function
|
|
614
|
-
return u ? { [
|
|
141
|
+
function ke(t) {
|
|
142
|
+
return u ? { [s ? "top" : "bottom"]: y(t) } : { [s ? "right" : "left"]: y(t) };
|
|
615
143
|
}
|
|
616
|
-
function
|
|
617
|
-
const
|
|
618
|
-
getTooltipContainer:
|
|
619
|
-
formatTooltip:
|
|
144
|
+
function Be() {
|
|
145
|
+
const t = {
|
|
146
|
+
getTooltipContainer: l.getTooltipContainer,
|
|
147
|
+
formatTooltip: l.formatTooltip
|
|
620
148
|
};
|
|
621
|
-
return "tooltipPosition" in
|
|
149
|
+
return "tooltipPosition" in l && (t.tooltipPosition = he), "tooltipVisible" in l && (t.tooltipVisible = ve), t;
|
|
622
150
|
}
|
|
623
|
-
function
|
|
624
|
-
|
|
151
|
+
function H() {
|
|
152
|
+
J.current = F.current.getBoundingClientRect();
|
|
625
153
|
}
|
|
626
|
-
function
|
|
627
|
-
|
|
628
|
-
const
|
|
629
|
-
|
|
154
|
+
function Oe(t) {
|
|
155
|
+
H();
|
|
156
|
+
const e = E(t.clientX, t.clientY);
|
|
157
|
+
Me.draggableBar && Re(e) ? (z.current = b(e), se(window, "mousemove", K), se(window, "mouseup", Q)) : L(e);
|
|
630
158
|
}
|
|
631
|
-
function
|
|
632
|
-
if (
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
P && G - a > a - A ? (F[p] = a, q(F, "jumpToClick")) : (F[y] = a, q(F, "jumpToClick")), st();
|
|
159
|
+
function L(t) {
|
|
160
|
+
if (C) return;
|
|
161
|
+
const e = b(t), [o, r] = lt(e, n), a = n[o], h = n[r], g = n.slice(0);
|
|
162
|
+
m && h - e > e - a ? (g[o] = e, v(g, "jumpToClick")) : (g[r] = e, v(g, "jumpToClick")), x();
|
|
636
163
|
}
|
|
637
|
-
function
|
|
638
|
-
|
|
164
|
+
function Se(t) {
|
|
165
|
+
v(t, "inputValueChange"), x();
|
|
639
166
|
}
|
|
640
|
-
function
|
|
641
|
-
|
|
642
|
-
const
|
|
643
|
-
|
|
167
|
+
function Te(t, e, o) {
|
|
168
|
+
q.current = !0;
|
|
169
|
+
const r = n.slice(0);
|
|
170
|
+
r[o] = E(t, e), v(r, "mousemove");
|
|
644
171
|
}
|
|
645
|
-
function
|
|
646
|
-
|
|
172
|
+
function $e() {
|
|
173
|
+
q.current = !1, x();
|
|
647
174
|
}
|
|
648
|
-
function
|
|
649
|
-
if (
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
p[a] = J(x[a], l), q(p);
|
|
175
|
+
function Ae(t, e) {
|
|
176
|
+
if (C) return;
|
|
177
|
+
const o = n.slice(0);
|
|
178
|
+
o[e] = xe(n[e], t), v(o);
|
|
653
179
|
}
|
|
654
|
-
function
|
|
655
|
-
const
|
|
656
|
-
|
|
180
|
+
function K(t) {
|
|
181
|
+
const o = b(E(t.clientX, t.clientY)) - z.current, r = n.map((a) => a + o);
|
|
182
|
+
r.every((a) => be(a)) && v(r, "mousemove");
|
|
657
183
|
}
|
|
658
|
-
function
|
|
659
|
-
|
|
184
|
+
function Q() {
|
|
185
|
+
le(window, "mousemove", K), le(window, "mouseup", Q), x();
|
|
660
186
|
}
|
|
661
|
-
return /* @__PURE__ */
|
|
187
|
+
return /* @__PURE__ */ d(
|
|
662
188
|
"div",
|
|
663
189
|
{
|
|
664
|
-
...
|
|
190
|
+
..._e(we, [
|
|
665
191
|
"defaultValue",
|
|
666
192
|
"value",
|
|
667
193
|
"onChange",
|
|
@@ -669,116 +195,116 @@ function Le(t, o) {
|
|
|
669
195
|
"formatTooltip",
|
|
670
196
|
"onAfterChange"
|
|
671
197
|
]),
|
|
672
|
-
className:
|
|
673
|
-
|
|
198
|
+
className: ae(
|
|
199
|
+
i,
|
|
674
200
|
{
|
|
675
|
-
[`${
|
|
676
|
-
[`${
|
|
677
|
-
[`${
|
|
678
|
-
[`${
|
|
201
|
+
[`${i}-vertical`]: u,
|
|
202
|
+
[`${i}-with-marks`]: N,
|
|
203
|
+
[`${i}-reverse`]: s,
|
|
204
|
+
[`${i}-rtl`]: U
|
|
679
205
|
},
|
|
680
|
-
|
|
206
|
+
ge
|
|
681
207
|
),
|
|
682
|
-
style:
|
|
683
|
-
ref:
|
|
684
|
-
children: /* @__PURE__ */
|
|
685
|
-
/* @__PURE__ */
|
|
208
|
+
style: de,
|
|
209
|
+
ref: me,
|
|
210
|
+
children: /* @__PURE__ */ oe("div", { className: `${i}-wrapper`, children: [
|
|
211
|
+
/* @__PURE__ */ oe(
|
|
686
212
|
"div",
|
|
687
213
|
{
|
|
688
|
-
ref:
|
|
689
|
-
className:
|
|
690
|
-
[`${
|
|
691
|
-
[`${
|
|
214
|
+
ref: F,
|
|
215
|
+
className: ae(`${i}-road`, {
|
|
216
|
+
[`${i}-road-disabled`]: C,
|
|
217
|
+
[`${i}-road-vertical`]: u
|
|
692
218
|
}),
|
|
693
|
-
onMouseDown:
|
|
219
|
+
onMouseDown: Oe,
|
|
694
220
|
children: [
|
|
695
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ d(
|
|
696
222
|
"div",
|
|
697
223
|
{
|
|
698
|
-
className: `${
|
|
699
|
-
style:
|
|
700
|
-
|
|
701
|
-
|
|
224
|
+
className: `${i}-bar`,
|
|
225
|
+
style: Ne([
|
|
226
|
+
j(A, p),
|
|
227
|
+
j($, p)
|
|
702
228
|
])
|
|
703
229
|
}
|
|
704
230
|
),
|
|
705
|
-
|
|
706
|
-
|
|
231
|
+
Ve && /* @__PURE__ */ d(
|
|
232
|
+
rt,
|
|
707
233
|
{
|
|
708
|
-
intervalConfigs:
|
|
709
|
-
min:
|
|
710
|
-
max:
|
|
711
|
-
valueRange: [
|
|
712
|
-
prefixCls:
|
|
234
|
+
intervalConfigs: p,
|
|
235
|
+
min: c,
|
|
236
|
+
max: w,
|
|
237
|
+
valueRange: [A, $],
|
|
238
|
+
prefixCls: i,
|
|
713
239
|
vertical: u,
|
|
714
|
-
reverse:
|
|
240
|
+
reverse: s
|
|
715
241
|
}
|
|
716
242
|
),
|
|
717
|
-
/* @__PURE__ */
|
|
718
|
-
|
|
243
|
+
/* @__PURE__ */ d(
|
|
244
|
+
tt,
|
|
719
245
|
{
|
|
720
|
-
data:
|
|
721
|
-
intervalConfigs:
|
|
722
|
-
valueRange: [
|
|
246
|
+
data: Y,
|
|
247
|
+
intervalConfigs: p,
|
|
248
|
+
valueRange: [A, $],
|
|
723
249
|
vertical: u,
|
|
724
|
-
prefixCls:
|
|
725
|
-
reverse:
|
|
726
|
-
onMouseDown:
|
|
250
|
+
prefixCls: i,
|
|
251
|
+
reverse: s,
|
|
252
|
+
onMouseDown: L
|
|
727
253
|
}
|
|
728
254
|
),
|
|
729
|
-
/* @__PURE__ */
|
|
730
|
-
|
|
255
|
+
/* @__PURE__ */ d(
|
|
256
|
+
nt,
|
|
731
257
|
{
|
|
732
|
-
data:
|
|
733
|
-
intervalConfigs:
|
|
258
|
+
data: Y,
|
|
259
|
+
intervalConfigs: p,
|
|
734
260
|
vertical: u,
|
|
735
|
-
prefixCls:
|
|
736
|
-
reverse:
|
|
737
|
-
onMouseDown:
|
|
261
|
+
prefixCls: i,
|
|
262
|
+
reverse: s,
|
|
263
|
+
onMouseDown: L
|
|
738
264
|
}
|
|
739
265
|
),
|
|
740
|
-
|
|
741
|
-
|
|
266
|
+
n.map((t, e) => !m && e !== n.length - 1 ? null : /* @__PURE__ */ d(
|
|
267
|
+
et,
|
|
742
268
|
{
|
|
743
|
-
style:
|
|
744
|
-
disabled:
|
|
745
|
-
prefixCls:
|
|
746
|
-
value:
|
|
747
|
-
maxValue:
|
|
748
|
-
minValue:
|
|
269
|
+
style: ke(j(t, p)),
|
|
270
|
+
disabled: C,
|
|
271
|
+
prefixCls: i,
|
|
272
|
+
value: t,
|
|
273
|
+
maxValue: w,
|
|
274
|
+
minValue: c,
|
|
749
275
|
vertical: u,
|
|
750
|
-
...
|
|
751
|
-
onMoveBegin:
|
|
752
|
-
onMoving: (
|
|
753
|
-
onMoveEnd:
|
|
754
|
-
onArrowEvent: (
|
|
276
|
+
...Be(),
|
|
277
|
+
onMoveBegin: H,
|
|
278
|
+
onMoving: (o, r) => Te(o, r, e),
|
|
279
|
+
onMoveEnd: $e,
|
|
280
|
+
onArrowEvent: (o) => Ae(o, e)
|
|
755
281
|
},
|
|
756
|
-
|
|
282
|
+
e
|
|
757
283
|
))
|
|
758
284
|
]
|
|
759
285
|
}
|
|
760
286
|
),
|
|
761
|
-
|
|
762
|
-
|
|
287
|
+
D && /* @__PURE__ */ d(
|
|
288
|
+
ot,
|
|
763
289
|
{
|
|
764
|
-
min:
|
|
765
|
-
max:
|
|
766
|
-
step:
|
|
767
|
-
value:
|
|
768
|
-
range:
|
|
769
|
-
disabled:
|
|
770
|
-
prefixCls:
|
|
771
|
-
onChange:
|
|
772
|
-
extra:
|
|
290
|
+
min: c,
|
|
291
|
+
max: w,
|
|
292
|
+
step: R,
|
|
293
|
+
value: n,
|
|
294
|
+
range: m,
|
|
295
|
+
disabled: C,
|
|
296
|
+
prefixCls: i,
|
|
297
|
+
onChange: Se,
|
|
298
|
+
extra: Ie
|
|
773
299
|
}
|
|
774
300
|
)
|
|
775
301
|
] })
|
|
776
302
|
}
|
|
777
303
|
);
|
|
778
304
|
}
|
|
779
|
-
const
|
|
780
|
-
|
|
781
|
-
const
|
|
305
|
+
const ce = Ge(ft);
|
|
306
|
+
ce.displayName = "Slider";
|
|
307
|
+
const Xt = ze.memo(ce);
|
|
782
308
|
export {
|
|
783
|
-
|
|
309
|
+
Xt as default
|
|
784
310
|
};
|