@unicom-cloud/ui 0.8.44 → 0.8.46
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 -250
- 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 -722
- 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 -398
- 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/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 +1 -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 +168 -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/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 +2 -120
- package/types/input-tag/InputTag.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/{chunk/K6Dvbx-E.js → virtual-list/style/index.less.js} +0 -0
package/Carousel.js
CHANGED
|
@@ -1,119 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import Ie from "./hooks/
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import Pe from "./utils/
|
|
10
|
-
import
|
|
11
|
-
import Te from "
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
function Ee(A, P) {
|
|
16
|
-
const {
|
|
17
|
-
className: E,
|
|
18
|
-
direction: c = "horizontal",
|
|
19
|
-
showArrow: g = "always",
|
|
20
|
-
prev: l,
|
|
21
|
-
next: p,
|
|
22
|
-
icons: u
|
|
23
|
-
} = A, b = Ae(), { getPrefixCls: m } = J(O), r = m("carousel"), $ = y(
|
|
24
|
-
`${r}-arrow`,
|
|
25
|
-
{
|
|
26
|
-
[`${r}-arrow-hover`]: g === "hover"
|
|
27
|
-
},
|
|
28
|
-
E
|
|
29
|
-
), N = u && Object.prototype.hasOwnProperty.call(u, "prev") ? u.prev : c === "horizontal" ? /* @__PURE__ */ s(Te, {}) : /* @__PURE__ */ s(We, {}), n = u && Object.prototype.hasOwnProperty.call(u, "next") ? u.next : c === "horizontal" ? /* @__PURE__ */ s(Se, {}) : /* @__PURE__ */ s(be, {});
|
|
30
|
-
return /* @__PURE__ */ oe("div", { ref: P, className: $, children: [
|
|
31
|
-
/* @__PURE__ */ s(
|
|
32
|
-
"div",
|
|
33
|
-
{
|
|
34
|
-
className: `${r}-arrow-${c === "vertical" ? "top" : "left"}`,
|
|
35
|
-
onClick: l,
|
|
36
|
-
role: "button",
|
|
37
|
-
tabIndex: 0,
|
|
38
|
-
...b({ onPressEnter: l }),
|
|
39
|
-
children: N
|
|
40
|
-
}
|
|
41
|
-
),
|
|
42
|
-
/* @__PURE__ */ s(
|
|
43
|
-
"div",
|
|
44
|
-
{
|
|
45
|
-
className: `${r}-arrow-${c === "vertical" ? "bottom" : "right"}`,
|
|
46
|
-
onClick: p,
|
|
47
|
-
role: "button",
|
|
48
|
-
tabIndex: 0,
|
|
49
|
-
...b({ onPressEnter: p }),
|
|
50
|
-
children: n
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
] });
|
|
54
|
-
}
|
|
55
|
-
const Re = W.forwardRef(
|
|
56
|
-
Ee
|
|
57
|
-
);
|
|
58
|
-
function je(A, P) {
|
|
59
|
-
const { getPrefixCls: E } = J(O), {
|
|
60
|
-
className: c,
|
|
61
|
-
type: g = "line",
|
|
62
|
-
count: l = 2,
|
|
63
|
-
activeIndex: p = 0,
|
|
64
|
-
position: u = "bottom",
|
|
65
|
-
trigger: b = "click",
|
|
66
|
-
onSelectIndex: m
|
|
67
|
-
} = A, r = E("carousel-indicator"), $ = [];
|
|
68
|
-
if (g === "slider") {
|
|
69
|
-
const n = 100 / l;
|
|
70
|
-
$.push(
|
|
71
|
-
/* @__PURE__ */ s(
|
|
72
|
-
"span",
|
|
73
|
-
{
|
|
74
|
-
style: { width: `${n}%`, left: `${p * n}%` },
|
|
75
|
-
className: y(`${r}-item`, `${r}-item-active`)
|
|
76
|
-
},
|
|
77
|
-
0
|
|
78
|
-
)
|
|
79
|
-
);
|
|
80
|
-
} else
|
|
81
|
-
for (let n = 0; n < l; n++)
|
|
82
|
-
$.push(
|
|
83
|
-
/* @__PURE__ */ s(
|
|
84
|
-
"span",
|
|
85
|
-
{
|
|
86
|
-
"data-index": n,
|
|
87
|
-
className: y(`${r}-item`, {
|
|
88
|
-
[`${r}-item-active`]: n === p
|
|
89
|
-
})
|
|
90
|
-
},
|
|
91
|
-
n
|
|
92
|
-
)
|
|
93
|
-
);
|
|
94
|
-
const N = {
|
|
95
|
-
ref: P,
|
|
96
|
-
className: y(
|
|
97
|
-
r,
|
|
98
|
-
`${r}-${g}`,
|
|
99
|
-
`${r}-${u}`,
|
|
100
|
-
c
|
|
101
|
-
),
|
|
102
|
-
[b === "click" ? "onClick" : "onMouseMove"]: (n) => {
|
|
103
|
-
if (n.preventDefault(), g === "slider") {
|
|
104
|
-
if (n.target === n.currentTarget) {
|
|
105
|
-
const { x: h, width: D } = n.currentTarget.getBoundingClientRect(), L = ~~((n.nativeEvent.clientX - h) / D * l);
|
|
106
|
-
L !== p && m(L);
|
|
107
|
-
}
|
|
108
|
-
} else {
|
|
109
|
-
const h = n.target.getAttribute("data-index");
|
|
110
|
-
h && +h !== p && m(+h);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
return /* @__PURE__ */ s("div", { ...N, children: $ });
|
|
115
|
-
}
|
|
116
|
-
const Me = W.forwardRef(je), De = 3e3, ke = {
|
|
1
|
+
import { jsxs as ye, jsx as I } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
import P, { useContext as xe, useRef as F, useState as m, useEffect as V, useImperativeHandle as Ne } from "react";
|
|
5
|
+
import "./config-provider/ConfigProvider.js";
|
|
6
|
+
import { useInterval as Ie } from "./hooks/useInterval.js";
|
|
7
|
+
import Ce from "./hooks/useMergeProps.js";
|
|
8
|
+
import C from "@unicom-cloud/utils/class-name";
|
|
9
|
+
import Pe from "./utils/omit.js";
|
|
10
|
+
import $e from "./utils/warning.js";
|
|
11
|
+
import Te from "./carousel/Arrow.js";
|
|
12
|
+
import We from "./carousel/Indicator.js";
|
|
13
|
+
import { ConfigContext as we } from "./config-provider/context.js";
|
|
14
|
+
const Se = 3e3, Ae = {
|
|
117
15
|
animation: "slide",
|
|
118
16
|
indicatorType: "dot",
|
|
119
17
|
indicatorPosition: "bottom",
|
|
@@ -123,210 +21,211 @@ const Me = W.forwardRef(je), De = 3e3, ke = {
|
|
|
123
21
|
moveSpeed: 500,
|
|
124
22
|
timingFunc: "cubic-bezier(0.34, 0.69, 0.1, 1)"
|
|
125
23
|
};
|
|
126
|
-
function
|
|
127
|
-
const { getPrefixCls:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
24
|
+
function be(J, _) {
|
|
25
|
+
const { getPrefixCls: K, componentConfig: $, rtl: k } = xe(we), v = Ce(
|
|
26
|
+
J,
|
|
27
|
+
Ae,
|
|
28
|
+
$ == null ? void 0 : $.Carousel
|
|
131
29
|
), {
|
|
132
|
-
style:
|
|
133
|
-
className:
|
|
134
|
-
children:
|
|
135
|
-
currentIndex:
|
|
136
|
-
animation:
|
|
137
|
-
trigger:
|
|
138
|
-
direction:
|
|
139
|
-
moveSpeed:
|
|
140
|
-
timingFunc:
|
|
141
|
-
indicatorType:
|
|
142
|
-
indicatorPosition:
|
|
143
|
-
indicatorClassName:
|
|
144
|
-
showArrow:
|
|
145
|
-
miniRender:
|
|
146
|
-
arrowClassName:
|
|
147
|
-
carousel:
|
|
148
|
-
icons:
|
|
149
|
-
onChange:
|
|
150
|
-
...
|
|
151
|
-
} =
|
|
152
|
-
let
|
|
153
|
-
|
|
154
|
-
interval:
|
|
155
|
-
},
|
|
30
|
+
style: Q,
|
|
31
|
+
className: z,
|
|
32
|
+
children: O,
|
|
33
|
+
currentIndex: y,
|
|
34
|
+
animation: x,
|
|
35
|
+
trigger: ee,
|
|
36
|
+
direction: T,
|
|
37
|
+
moveSpeed: W,
|
|
38
|
+
timingFunc: U,
|
|
39
|
+
indicatorType: Y,
|
|
40
|
+
indicatorPosition: w,
|
|
41
|
+
indicatorClassName: te,
|
|
42
|
+
showArrow: Z,
|
|
43
|
+
miniRender: ne,
|
|
44
|
+
arrowClassName: re,
|
|
45
|
+
carousel: oe,
|
|
46
|
+
icons: ie,
|
|
47
|
+
onChange: S,
|
|
48
|
+
...se
|
|
49
|
+
} = v;
|
|
50
|
+
let i = v.autoPlay;
|
|
51
|
+
i && v.autoPlaySpeed && (i = {
|
|
52
|
+
interval: v.autoPlaySpeed
|
|
53
|
+
}, $e(
|
|
156
54
|
!0,
|
|
157
55
|
"[Pqb Carousel] The 'autoPlaySpeed' property will be removed in the next major version, please use 'autoPlay.interval' instead."
|
|
158
56
|
));
|
|
159
|
-
const
|
|
160
|
-
(e) =>
|
|
161
|
-
),
|
|
162
|
-
typeof
|
|
163
|
-
), [
|
|
57
|
+
const q = P.Children.toArray(O).filter(
|
|
58
|
+
(e) => P.isValidElement(e)
|
|
59
|
+
), p = q.length, a = F(null), f = F(null), N = F(null), [A, ae] = m(
|
|
60
|
+
typeof y == "number" ? g(y) : 0
|
|
61
|
+
), [le, ce] = m(A), [ue, X] = m(!1), [b, B] = m(!1), [R, de] = m(
|
|
164
62
|
null
|
|
165
|
-
), [
|
|
63
|
+
), [G, M] = m({
|
|
166
64
|
sliderWrapper: null,
|
|
167
65
|
indicatorWrapper: null
|
|
168
|
-
}),
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
targetIndex:
|
|
66
|
+
}), s = typeof y == "number" ? g(y) : A, j = g(s - 1), D = g(s + 1), pe = typeof i == "object" && i.interval ? i.interval : Se;
|
|
67
|
+
V(() => () => N.current && clearTimeout(N.current), []), V(() => {
|
|
68
|
+
u({
|
|
69
|
+
targetIndex: s
|
|
172
70
|
});
|
|
173
|
-
}, [
|
|
174
|
-
const
|
|
71
|
+
}, [s]);
|
|
72
|
+
const me = Ie(
|
|
175
73
|
() => {
|
|
176
|
-
|
|
177
|
-
targetIndex:
|
|
74
|
+
u({
|
|
75
|
+
targetIndex: D
|
|
178
76
|
});
|
|
179
77
|
},
|
|
180
|
-
|
|
78
|
+
i && !ue && p > 1 ? pe : null
|
|
181
79
|
);
|
|
182
|
-
Ne(
|
|
183
|
-
dom:
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
80
|
+
Ne(oe, () => ({
|
|
81
|
+
dom: a.current,
|
|
82
|
+
getRootDOMNode: () => a.current,
|
|
83
|
+
goto: ({ index: e, isNegative: t, isManual: n, resetAutoPlayInterval: o }) => {
|
|
84
|
+
u({
|
|
85
|
+
targetIndex: g(e),
|
|
187
86
|
isNegative: t,
|
|
188
|
-
isManual:
|
|
189
|
-
resetAutoPlayInterval:
|
|
87
|
+
isManual: n,
|
|
88
|
+
resetAutoPlayInterval: o
|
|
190
89
|
});
|
|
191
90
|
}
|
|
192
91
|
}));
|
|
193
|
-
function
|
|
92
|
+
function g(e) {
|
|
194
93
|
const t = +e;
|
|
195
|
-
return typeof t == "number" && !isNaN(t) ? (t +
|
|
94
|
+
return typeof t == "number" && !isNaN(t) ? (t + p) % p : e;
|
|
196
95
|
}
|
|
197
|
-
function
|
|
96
|
+
function u({
|
|
198
97
|
targetIndex: e,
|
|
199
98
|
isNegative: t = !1,
|
|
200
|
-
isManual:
|
|
201
|
-
resetAutoPlayInterval:
|
|
99
|
+
isManual: n = !1,
|
|
100
|
+
resetAutoPlayInterval: o = !1
|
|
202
101
|
}) {
|
|
203
|
-
!
|
|
204
|
-
|
|
205
|
-
},
|
|
102
|
+
!b && e !== s && (B(!0), ae(e), ce(A), de(t ? "negative" : "positive"), S == null || S(e, s, n), i && o && me(), N.current = setTimeout(() => {
|
|
103
|
+
B(!1), N.current = null;
|
|
104
|
+
}, W));
|
|
206
105
|
}
|
|
207
|
-
function
|
|
208
|
-
if (
|
|
209
|
-
if (
|
|
210
|
-
const e =
|
|
106
|
+
function fe() {
|
|
107
|
+
if (x === "card") {
|
|
108
|
+
if (f.current) {
|
|
109
|
+
const e = f.current.children[0];
|
|
211
110
|
if (!e)
|
|
212
111
|
return;
|
|
213
|
-
if (
|
|
214
|
-
const t =
|
|
215
|
-
|
|
112
|
+
if (T === "horizontal") {
|
|
113
|
+
const t = f.current.clientWidth, n = e.clientWidth, o = (t - n) / 2, l = 200, c = t / 2, d = n, h = c + 50 >= d ? l * 4 : l * c / (d - c);
|
|
114
|
+
M({
|
|
216
115
|
sliderWrapper: {
|
|
217
|
-
perspective:
|
|
116
|
+
perspective: h
|
|
218
117
|
},
|
|
219
118
|
indicatorWrapper: {
|
|
220
119
|
width: "auto",
|
|
221
|
-
left:
|
|
222
|
-
right:
|
|
120
|
+
left: o,
|
|
121
|
+
right: o
|
|
223
122
|
}
|
|
224
123
|
});
|
|
225
124
|
} else {
|
|
226
|
-
const t =
|
|
227
|
-
|
|
125
|
+
const t = f.current.clientHeight, n = e.clientHeight, o = (t - n) / 2, l = 200, c = t / 2, d = n, h = c + 50 >= d ? l * 4 : l * c / (d - c);
|
|
126
|
+
M({
|
|
228
127
|
sliderWrapper: {
|
|
229
|
-
perspective:
|
|
128
|
+
perspective: h
|
|
230
129
|
},
|
|
231
130
|
indicatorWrapper: {
|
|
232
131
|
height: "auto",
|
|
233
|
-
top:
|
|
234
|
-
bottom:
|
|
132
|
+
top: o,
|
|
133
|
+
bottom: o
|
|
235
134
|
}
|
|
236
135
|
});
|
|
237
136
|
}
|
|
238
137
|
}
|
|
239
138
|
} else
|
|
240
|
-
|
|
139
|
+
M({
|
|
241
140
|
sliderWrapper: null,
|
|
242
141
|
indicatorWrapper: null
|
|
243
142
|
});
|
|
244
143
|
}
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
`${
|
|
144
|
+
const r = K("carousel"), ge = C(
|
|
145
|
+
r,
|
|
146
|
+
`${r}-indicator-position-${w}`,
|
|
248
147
|
{
|
|
249
|
-
[`${
|
|
148
|
+
[`${r}-rtl`]: k
|
|
250
149
|
},
|
|
251
|
-
|
|
252
|
-
),
|
|
150
|
+
z
|
|
151
|
+
), he = Object.assign(
|
|
253
152
|
{},
|
|
254
|
-
|
|
255
|
-
onMouseEnter: () =>
|
|
256
|
-
onMouseLeave: () =>
|
|
153
|
+
i && (typeof i != "object" || i.hoverToPause !== !1) ? {
|
|
154
|
+
onMouseEnter: () => X(!0),
|
|
155
|
+
onMouseLeave: () => X(!1)
|
|
257
156
|
} : null
|
|
258
157
|
);
|
|
259
|
-
let [
|
|
260
|
-
() =>
|
|
261
|
-
targetIndex:
|
|
158
|
+
let [E, H] = [
|
|
159
|
+
() => u({
|
|
160
|
+
targetIndex: j,
|
|
262
161
|
isNegative: !0,
|
|
263
162
|
isManual: !0
|
|
264
163
|
}),
|
|
265
|
-
() =>
|
|
266
|
-
targetIndex:
|
|
164
|
+
() => u({
|
|
165
|
+
targetIndex: D,
|
|
267
166
|
isManual: !0
|
|
268
167
|
})
|
|
269
168
|
];
|
|
270
|
-
return
|
|
169
|
+
return k && ([E, H] = [H, E]), V(() => {
|
|
271
170
|
let e;
|
|
272
|
-
return
|
|
273
|
-
var t,
|
|
274
|
-
|
|
171
|
+
return a.current && (e = new ResizeObserver(fe), e.observe(a.current)), () => {
|
|
172
|
+
var t, n;
|
|
173
|
+
a.current && ((t = e == null ? void 0 : e.unobserve) == null || t.call(e, a.current)), (n = e == null ? void 0 : e.disconnect) == null || n.call(e), e = null;
|
|
275
174
|
};
|
|
276
|
-
}, [
|
|
175
|
+
}, [a.current]), /* @__PURE__ */ ye(
|
|
277
176
|
"div",
|
|
278
177
|
{
|
|
279
178
|
ref: (e) => {
|
|
280
|
-
|
|
179
|
+
_ = e, a.current = _;
|
|
281
180
|
},
|
|
282
|
-
className:
|
|
283
|
-
style:
|
|
284
|
-
...
|
|
285
|
-
...
|
|
181
|
+
className: ge,
|
|
182
|
+
style: Q,
|
|
183
|
+
...Pe(se, ["autoplay", "autoPlaySpeed"]),
|
|
184
|
+
...he,
|
|
286
185
|
children: [
|
|
287
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ I(
|
|
288
187
|
"div",
|
|
289
188
|
{
|
|
290
|
-
ref:
|
|
291
|
-
style:
|
|
292
|
-
className:
|
|
293
|
-
`${
|
|
294
|
-
`${
|
|
189
|
+
ref: f,
|
|
190
|
+
style: G.sliderWrapper,
|
|
191
|
+
className: C(
|
|
192
|
+
`${r}-${x}`,
|
|
193
|
+
`${r}-${T}`,
|
|
295
194
|
{
|
|
296
|
-
[`${
|
|
195
|
+
[`${r}-negative`]: R === "negative"
|
|
297
196
|
}
|
|
298
197
|
),
|
|
299
|
-
children:
|
|
300
|
-
const
|
|
301
|
-
if (!(!
|
|
198
|
+
children: q.map((e, t) => {
|
|
199
|
+
const n = t === s, o = t === j, l = t === D;
|
|
200
|
+
if (!(!ne || n || o || l))
|
|
302
201
|
return null;
|
|
303
202
|
const {
|
|
304
|
-
style:
|
|
305
|
-
className:
|
|
306
|
-
onClick:
|
|
203
|
+
style: d,
|
|
204
|
+
className: h,
|
|
205
|
+
onClick: L
|
|
307
206
|
} = e.props;
|
|
308
|
-
return
|
|
309
|
-
"aria-hidden": !
|
|
207
|
+
return P.cloneElement(e, {
|
|
208
|
+
"aria-hidden": !n,
|
|
310
209
|
style: Object.assign(
|
|
311
210
|
{
|
|
312
|
-
transitionTimingFunction:
|
|
313
|
-
transitionDuration: `${
|
|
314
|
-
animationTimingFunction:
|
|
315
|
-
animationDuration: `${
|
|
211
|
+
transitionTimingFunction: U,
|
|
212
|
+
transitionDuration: `${W}ms`,
|
|
213
|
+
animationTimingFunction: U,
|
|
214
|
+
animationDuration: `${W}ms`
|
|
316
215
|
},
|
|
317
|
-
|
|
216
|
+
d
|
|
318
217
|
),
|
|
319
|
-
className:
|
|
320
|
-
[`${
|
|
321
|
-
[`${
|
|
322
|
-
[`${
|
|
323
|
-
[`${
|
|
324
|
-
[`${
|
|
218
|
+
className: C(h, {
|
|
219
|
+
[`${r}-item-prev`]: o,
|
|
220
|
+
[`${r}-item-next`]: l,
|
|
221
|
+
[`${r}-item-current`]: n,
|
|
222
|
+
[`${r}-item-slide-in`]: x === "slide" && R && b && n,
|
|
223
|
+
[`${r}-item-slide-out`]: x === "slide" && R && b && t === le
|
|
325
224
|
}),
|
|
326
|
-
onClick: (
|
|
327
|
-
|
|
225
|
+
onClick: (ve) => {
|
|
226
|
+
L == null || L(ve), u({
|
|
328
227
|
targetIndex: t,
|
|
329
|
-
isNegative: t ===
|
|
228
|
+
isNegative: t === j,
|
|
330
229
|
isManual: !0
|
|
331
230
|
});
|
|
332
231
|
}
|
|
@@ -334,49 +233,49 @@ function Le(A, P) {
|
|
|
334
233
|
})
|
|
335
234
|
}
|
|
336
235
|
),
|
|
337
|
-
|
|
236
|
+
Y !== "never" && p > 1 && /* @__PURE__ */ I(
|
|
338
237
|
"div",
|
|
339
238
|
{
|
|
340
|
-
style:
|
|
341
|
-
className:
|
|
342
|
-
`${
|
|
343
|
-
`${
|
|
239
|
+
style: G.indicatorWrapper,
|
|
240
|
+
className: C(
|
|
241
|
+
`${r}-indicator-wrapper`,
|
|
242
|
+
`${r}-indicator-wrapper-${w}`
|
|
344
243
|
),
|
|
345
|
-
children: /* @__PURE__ */
|
|
346
|
-
|
|
244
|
+
children: /* @__PURE__ */ I(
|
|
245
|
+
We,
|
|
347
246
|
{
|
|
348
|
-
className:
|
|
349
|
-
type:
|
|
350
|
-
count:
|
|
351
|
-
activeIndex:
|
|
352
|
-
position:
|
|
353
|
-
trigger:
|
|
354
|
-
onSelectIndex: (e) =>
|
|
247
|
+
className: te,
|
|
248
|
+
type: Y,
|
|
249
|
+
count: p,
|
|
250
|
+
activeIndex: s,
|
|
251
|
+
position: w,
|
|
252
|
+
trigger: ee,
|
|
253
|
+
onSelectIndex: (e) => u({
|
|
355
254
|
targetIndex: e,
|
|
356
|
-
isNegative: e <
|
|
255
|
+
isNegative: e < s,
|
|
357
256
|
isManual: !0
|
|
358
257
|
})
|
|
359
258
|
}
|
|
360
259
|
)
|
|
361
260
|
}
|
|
362
261
|
),
|
|
363
|
-
|
|
364
|
-
|
|
262
|
+
Z !== "never" && p > 1 && /* @__PURE__ */ I(
|
|
263
|
+
Te,
|
|
365
264
|
{
|
|
366
|
-
className:
|
|
367
|
-
direction:
|
|
368
|
-
showArrow:
|
|
369
|
-
icons:
|
|
370
|
-
prev:
|
|
371
|
-
next:
|
|
265
|
+
className: re,
|
|
266
|
+
direction: T,
|
|
267
|
+
showArrow: Z,
|
|
268
|
+
icons: ie,
|
|
269
|
+
prev: E,
|
|
270
|
+
next: H
|
|
372
271
|
}
|
|
373
272
|
)
|
|
374
273
|
]
|
|
375
274
|
}
|
|
376
275
|
);
|
|
377
276
|
}
|
|
378
|
-
const
|
|
379
|
-
|
|
277
|
+
const Re = P.forwardRef(be);
|
|
278
|
+
Re.displayName = "Carousel";
|
|
380
279
|
export {
|
|
381
|
-
|
|
280
|
+
Re as default
|
|
382
281
|
};
|
package/Cascader.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
|
+
/* empty css */
|
|
8
|
+
import d from "./cascader/Cascader.js";
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
d as default
|
|
10
11
|
};
|
package/Checkbox.js
CHANGED
package/Collapse.js
CHANGED