@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
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d, useState as s, useImperativeHandle as k } from "react";
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
|
+
import x from "../Modal.js";
|
|
7
|
+
function C(a, l) {
|
|
8
|
+
const [f, t] = s(!0), [e, n] = s(a);
|
|
9
|
+
k(l, () => ({
|
|
10
|
+
update: (o) => {
|
|
11
|
+
n(o);
|
|
12
|
+
},
|
|
13
|
+
close: () => {
|
|
14
|
+
t(!1);
|
|
15
|
+
}
|
|
16
|
+
}));
|
|
17
|
+
function m() {
|
|
18
|
+
var i;
|
|
19
|
+
const o = (i = e.onOk) == null ? void 0 : i.call(e);
|
|
20
|
+
o && o.then && (n((r) => ({
|
|
21
|
+
...r,
|
|
22
|
+
confirmLoading: !0
|
|
23
|
+
})), o.then(
|
|
24
|
+
() => {
|
|
25
|
+
t(!1);
|
|
26
|
+
},
|
|
27
|
+
(r) => {
|
|
28
|
+
console.error(r), n((c) => ({
|
|
29
|
+
...c,
|
|
30
|
+
confirmLoading: !1
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
)), o || t(!1);
|
|
34
|
+
}
|
|
35
|
+
function u() {
|
|
36
|
+
var o;
|
|
37
|
+
(o = e.onCancel) == null || o.call(e), t(!1);
|
|
38
|
+
}
|
|
39
|
+
return /* @__PURE__ */ p(
|
|
40
|
+
x,
|
|
41
|
+
{
|
|
42
|
+
unmountOnExit: !0,
|
|
43
|
+
simple: !0,
|
|
44
|
+
...e,
|
|
45
|
+
visible: f,
|
|
46
|
+
onOk: m,
|
|
47
|
+
onCancel: u,
|
|
48
|
+
children: e.content
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
const E = d(C);
|
|
53
|
+
export {
|
|
54
|
+
E as default
|
|
55
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as M } from "react";
|
|
3
|
+
import { normalizeConfig as d } from "../Confirm.js";
|
|
4
|
+
import { destroyList as w } from "../config.js";
|
|
5
|
+
import E from "../../utils/contextHolder.js";
|
|
6
|
+
import H from "./Hook.js";
|
|
7
|
+
function z() {
|
|
8
|
+
const t = M(), p = /* @__PURE__ */ m(E, { ref: t });
|
|
9
|
+
let u = 0;
|
|
10
|
+
function s(e) {
|
|
11
|
+
var f;
|
|
12
|
+
u += 1;
|
|
13
|
+
let o, n = { ...e };
|
|
14
|
+
function C() {
|
|
15
|
+
var r;
|
|
16
|
+
(r = e.afterClose) == null || r.call(e), h();
|
|
17
|
+
}
|
|
18
|
+
const a = /* @__PURE__ */ m(
|
|
19
|
+
H,
|
|
20
|
+
{
|
|
21
|
+
ref: (r) => {
|
|
22
|
+
o = r;
|
|
23
|
+
},
|
|
24
|
+
...d({ ...e }),
|
|
25
|
+
afterClose: C
|
|
26
|
+
},
|
|
27
|
+
u
|
|
28
|
+
);
|
|
29
|
+
(f = t.current) == null || f.addInstance(a);
|
|
30
|
+
function h() {
|
|
31
|
+
var r;
|
|
32
|
+
(r = t.current) == null || r.removeInstance(a);
|
|
33
|
+
}
|
|
34
|
+
function l() {
|
|
35
|
+
o == null || o.close();
|
|
36
|
+
}
|
|
37
|
+
function x(r) {
|
|
38
|
+
n = {
|
|
39
|
+
...n,
|
|
40
|
+
...r
|
|
41
|
+
}, o == null || o.update(d({ ...n }));
|
|
42
|
+
}
|
|
43
|
+
return w.push(l), {
|
|
44
|
+
close: l,
|
|
45
|
+
update: x
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function c(e) {
|
|
49
|
+
return s({
|
|
50
|
+
...e
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
const i = {
|
|
54
|
+
confirm: c,
|
|
55
|
+
show: c
|
|
56
|
+
// 潘启宝添加于 2023年10月18日 星期三 10时31分58秒 CST
|
|
57
|
+
};
|
|
58
|
+
return ["info", "success", "warning", "error"].forEach((e) => {
|
|
59
|
+
i[e] = (o) => s({
|
|
60
|
+
...o,
|
|
61
|
+
isNotice: !0,
|
|
62
|
+
noticeType: e
|
|
63
|
+
});
|
|
64
|
+
}), [i, p];
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
z as default
|
|
68
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import N from "lodash/isUndefined";
|
|
3
|
+
import { useRef as R } from "react";
|
|
4
|
+
import H from "../Notification.js";
|
|
5
|
+
import I from "../utils/contextHolder.js";
|
|
6
|
+
function b(u = {}) {
|
|
7
|
+
const {
|
|
8
|
+
maxCount: p,
|
|
9
|
+
duration: m = 3e3,
|
|
10
|
+
prefixCls: x,
|
|
11
|
+
getContainer: C
|
|
12
|
+
} = u, i = R(), g = /* @__PURE__ */ l(I, { ref: i }), e = {};
|
|
13
|
+
let d;
|
|
14
|
+
function h(n) {
|
|
15
|
+
let r, f;
|
|
16
|
+
if (i.current) {
|
|
17
|
+
const o = i.current.getContextConfig();
|
|
18
|
+
f = o.rtl, r = o.prefixCls;
|
|
19
|
+
}
|
|
20
|
+
const E = x || r;
|
|
21
|
+
let t = n.position;
|
|
22
|
+
N(n.position) && (t = f ? "topLeft" : "topRight");
|
|
23
|
+
const c = {
|
|
24
|
+
duration: m,
|
|
25
|
+
...n
|
|
26
|
+
};
|
|
27
|
+
let s;
|
|
28
|
+
if (e[t]) {
|
|
29
|
+
const o = e[t].state.notices;
|
|
30
|
+
o.length >= p ? (s = o[0].id, o.shift(), e[t].add({ ...c, id: s })) : s = e[t].add(c);
|
|
31
|
+
} else
|
|
32
|
+
d = /* @__PURE__ */ l(
|
|
33
|
+
H,
|
|
34
|
+
{
|
|
35
|
+
ref: (o) => {
|
|
36
|
+
e[t] = o, e[t] && (s = e[t].add(c));
|
|
37
|
+
},
|
|
38
|
+
prefixCls: E,
|
|
39
|
+
rtl: f,
|
|
40
|
+
getContainer: C
|
|
41
|
+
}
|
|
42
|
+
), i.current.addInstance(d);
|
|
43
|
+
return e[t];
|
|
44
|
+
}
|
|
45
|
+
const a = {};
|
|
46
|
+
return ["info", "success", "warning", "error", "normal"].forEach((n) => {
|
|
47
|
+
a[n] = (r) => h({
|
|
48
|
+
...r,
|
|
49
|
+
type: n
|
|
50
|
+
});
|
|
51
|
+
}), [a, g];
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
b as default
|
|
55
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as l, useRef as d, useEffect as u } from "react";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import "../config-provider/ConfigProvider.js";
|
|
5
|
+
import a from "@unicom-cloud/utils/class-name";
|
|
6
|
+
import { ConfigContext as x } from "../config-provider/context.js";
|
|
7
|
+
function s(o) {
|
|
8
|
+
const { getPrefixCls: m } = l(x), e = m("overflow-item"), n = d();
|
|
9
|
+
u(() => {
|
|
10
|
+
let t;
|
|
11
|
+
return n.current && (t = new ResizeObserver((c) => {
|
|
12
|
+
o.onResize(c == null ? void 0 : c[0].target);
|
|
13
|
+
}), t.observe(n.current)), () => {
|
|
14
|
+
var c, f;
|
|
15
|
+
n.current && ((c = t == null ? void 0 : t.unobserve) == null || c.call(t, n.current)), (f = t == null ? void 0 : t.disconnect) == null || f.call(t), t = null;
|
|
16
|
+
};
|
|
17
|
+
}, [n.current]), u(() => (o.onResize(n.current), () => {
|
|
18
|
+
o.unregister(n.current);
|
|
19
|
+
}), []);
|
|
20
|
+
const r = o.hidden;
|
|
21
|
+
return /* @__PURE__ */ i(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
ref: n,
|
|
25
|
+
className: a(e, o.className, {
|
|
26
|
+
[`${e}-hidden`]: r
|
|
27
|
+
}),
|
|
28
|
+
children: o.children
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
s as default
|
|
34
|
+
};
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@unicom-cloud/ui","version":"0.8.
|
|
1
|
+
{"name":"@unicom-cloud/ui","version":"0.8.46","dependencies":{"@unicom-cloud/icons":"latest","@unicom-cloud/utils":"latest","@unicom-cloud/scroll-into-view-if-needed":"latest","@unicom-cloud/react-easy-crop":"latest","@unicom-cloud/compute-scroll-into-view":"latest","@unicom-cloud/react-transition-group":"latest"},"peerDependencies":{"dayjs":"^1.11.10","lodash":"^4.17.21","react":"^18.3.1","react-dom":"^18.3.1"},"peerDependenciesMeta":{},"main":"index.js","module":"index.js","type":"module","types":"types/index.d.ts","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { jsx as I } from "react/jsx-runtime";
|
|
2
|
+
import S from "@unicom-cloud/icons/IconUiLeft";
|
|
3
|
+
import j from "@unicom-cloud/icons/IconUiMore";
|
|
4
|
+
import K from "@unicom-cloud/icons/IconUiRight";
|
|
5
|
+
import U, { useContext as N } from "react";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import "../config-provider/ConfigProvider.js";
|
|
8
|
+
import R from "../hooks/useKeyboardEvent.js";
|
|
9
|
+
import E from "@unicom-cloud/utils/class-name";
|
|
10
|
+
import { ConfigContext as k } from "../config-provider/context.js";
|
|
11
|
+
var _ = /* @__PURE__ */ ((t) => (t[t.previous = 0] = "previous", t[t.next = 1] = "next", t))(_ || {});
|
|
12
|
+
function L(t) {
|
|
13
|
+
var m, n, s;
|
|
14
|
+
const { locale: e } = N(k), v = R(), {
|
|
15
|
+
pageNum: i,
|
|
16
|
+
current: b,
|
|
17
|
+
rootPrefixCls: a,
|
|
18
|
+
pageItemStyle: d,
|
|
19
|
+
activePageItemStyle: l,
|
|
20
|
+
itemRender: f
|
|
21
|
+
} = t, x = `${a}-item`, P = b === i, p = E(x, P ? `${x}-active` : "");
|
|
22
|
+
let o = d;
|
|
23
|
+
P && (o = { ...o, ...l });
|
|
24
|
+
const h = P ? { "aria-current": !0 } : {}, C = (r) => {
|
|
25
|
+
const { pageNum: u, onClick: g, disabled: c } = t;
|
|
26
|
+
r.currentTarget.dataset.active !== "true" && (r.stopPropagation(), c || g == null || g(u));
|
|
27
|
+
};
|
|
28
|
+
return /* @__PURE__ */ I(
|
|
29
|
+
"li",
|
|
30
|
+
{
|
|
31
|
+
style: o,
|
|
32
|
+
className: p,
|
|
33
|
+
onClick: C,
|
|
34
|
+
tabIndex: t.disabled ? -1 : 0,
|
|
35
|
+
"aria-label": (s = (n = (m = e == null ? void 0 : e.Pagination) == null ? void 0 : m.currentPage) == null ? void 0 : n.replace) == null ? void 0 : s.call(n, "{0}", i),
|
|
36
|
+
...v({ onPressEnter: C }),
|
|
37
|
+
...h,
|
|
38
|
+
children: f ? f(i, "page", i) : i
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
function $(t, e) {
|
|
43
|
+
switch (t) {
|
|
44
|
+
case "prev":
|
|
45
|
+
return e && e.prev ? e.prev : /* @__PURE__ */ I(S, {});
|
|
46
|
+
case "next":
|
|
47
|
+
return e && e.next ? e.next : /* @__PURE__ */ I(K, {});
|
|
48
|
+
case "more":
|
|
49
|
+
return e && e.more ? e.more : /* @__PURE__ */ I(j, {});
|
|
50
|
+
default:
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const O = (t) => {
|
|
55
|
+
var s, r, u, g, c, y;
|
|
56
|
+
const { locale: e } = N(k), {
|
|
57
|
+
rootPrefixCls: v,
|
|
58
|
+
current: i,
|
|
59
|
+
allPages: b,
|
|
60
|
+
jumpPage: a,
|
|
61
|
+
icons: d,
|
|
62
|
+
disabled: l,
|
|
63
|
+
pageItemStyle: f,
|
|
64
|
+
itemRender: x
|
|
65
|
+
} = t, P = b > 0 ? 1 : 0, p = Math.min(b, Math.max(P, i + a)), o = `${v}-item ${v}-item-jumper`, h = E(o), C = () => {
|
|
66
|
+
var M;
|
|
67
|
+
!l && ((M = t.onClick) == null || M.call(t, p));
|
|
68
|
+
}, m = $("more", d), n = a > 0 ? (u = (r = (s = e == null ? void 0 : e.Pagination) == null ? void 0 : s.nextSomePages) == null ? void 0 : r.replace) == null ? void 0 : u.call(r, "{0}", a) : (y = (c = (g = e == null ? void 0 : e.Pagination) == null ? void 0 : g.prevSomePages) == null ? void 0 : c.replace) == null ? void 0 : y.call(c, "{0}", -a);
|
|
69
|
+
return /* @__PURE__ */ I(
|
|
70
|
+
"li",
|
|
71
|
+
{
|
|
72
|
+
style: f,
|
|
73
|
+
className: h,
|
|
74
|
+
onClick: C,
|
|
75
|
+
"aria-label": n,
|
|
76
|
+
children: x ? x(void 0, "more", m) : m
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}, Q = (t) => {
|
|
80
|
+
const { locale: e, rtl: v } = N(k), i = R(), {
|
|
81
|
+
rootPrefixCls: b,
|
|
82
|
+
current: a,
|
|
83
|
+
allPages: d,
|
|
84
|
+
type: l,
|
|
85
|
+
icons: f,
|
|
86
|
+
disabled: x,
|
|
87
|
+
pageItemStyle: P,
|
|
88
|
+
itemRender: p
|
|
89
|
+
} = t, o = `${b}-item`, [h, C] = v ? ["next", "prev"] : ["prev", "next"], m = $(l === 0 ? h : C, f);
|
|
90
|
+
let n = !1;
|
|
91
|
+
d === 0 ? n = !0 : l === 0 ? n = a <= 1 : n = a === d;
|
|
92
|
+
const s = x || n;
|
|
93
|
+
let r = a + (l === 0 ? -1 : 1);
|
|
94
|
+
r = Math.max(0, Math.min(d, r));
|
|
95
|
+
const u = l === 0 ? "prev" : "next", g = E(o, `${o}-${u}`, {
|
|
96
|
+
[`${o}-disabled`]: s
|
|
97
|
+
}), c = () => {
|
|
98
|
+
var y;
|
|
99
|
+
s || (y = t.onClick) == null || y.call(t, r);
|
|
100
|
+
};
|
|
101
|
+
return /* @__PURE__ */ I(
|
|
102
|
+
"li",
|
|
103
|
+
{
|
|
104
|
+
style: P,
|
|
105
|
+
className: g,
|
|
106
|
+
onClick: c,
|
|
107
|
+
tabIndex: s ? -1 : 0,
|
|
108
|
+
"aria-label": e.Pagination[u],
|
|
109
|
+
...i({
|
|
110
|
+
onPressEnter: c
|
|
111
|
+
}),
|
|
112
|
+
children: p ? p(void 0, u, m) : m
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}, V = U.memo(L);
|
|
116
|
+
export {
|
|
117
|
+
O as JumpPager,
|
|
118
|
+
Q as StepPager,
|
|
119
|
+
_ as StepType,
|
|
120
|
+
V as default
|
|
121
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsxs as x, jsx as r, Fragment as F } from "react/jsx-runtime";
|
|
2
|
+
import I from "lodash/isFunction";
|
|
3
|
+
import J from "lodash/isPlainObject";
|
|
4
|
+
import N from "lodash/isUndefined";
|
|
5
|
+
import { useContext as R, useState as T, useRef as w, useEffect as E } from "react";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import "../config-provider/ConfigProvider.js";
|
|
8
|
+
/* empty css */
|
|
9
|
+
/* empty css */
|
|
10
|
+
import z from "../input/Input.js";
|
|
11
|
+
import { ConfigContext as B } from "../config-provider/context.js";
|
|
12
|
+
function L(n) {
|
|
13
|
+
var p, d;
|
|
14
|
+
const P = n.simple ? n.current : void 0, { locale: i } = R(B), [e, u] = T(P), c = w();
|
|
15
|
+
E(() => {
|
|
16
|
+
n.simple && u(n.current);
|
|
17
|
+
}, [n.simple, n.current]);
|
|
18
|
+
const C = (t) => {
|
|
19
|
+
const m = parseInt(t, 10);
|
|
20
|
+
u(isNaN(m) ? void 0 : m);
|
|
21
|
+
}, l = () => {
|
|
22
|
+
const { onPageChange: t, totalPages: m, current: g, simple: h } = n;
|
|
23
|
+
if (N(e))
|
|
24
|
+
return;
|
|
25
|
+
if (e === g) {
|
|
26
|
+
h || u(void 0);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
let o = isNaN(Number(e)) ? g : Number(e);
|
|
30
|
+
o < 1 ? o = 1 : o > m && (o = m), u(h ? o : void 0), I(t) && t(o);
|
|
31
|
+
}, v = () => {
|
|
32
|
+
const t = c.current.dom;
|
|
33
|
+
String(e) && t && t.setSelectionRange(0, String(e).length);
|
|
34
|
+
}, { rootPrefixCls: b, totalPages: f, simple: s, size: $, disabled: S } = n, a = `${b}-jumper`, j = {
|
|
35
|
+
showJumper: !0,
|
|
36
|
+
...J(s) ? s : {}
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ x("div", { className: `${a}`, children: [
|
|
39
|
+
!s && /* @__PURE__ */ r("span", { className: `${a}-text-goto`, children: (p = i == null ? void 0 : i.Pagination) == null ? void 0 : p.goto }),
|
|
40
|
+
j.showJumper ? /* @__PURE__ */ r(
|
|
41
|
+
z,
|
|
42
|
+
{
|
|
43
|
+
_ignorePropsFromGlobal: !0,
|
|
44
|
+
ref: (t) => c.current = t,
|
|
45
|
+
className: `${a}-input`,
|
|
46
|
+
value: N(e) ? void 0 : e.toString(),
|
|
47
|
+
size: $,
|
|
48
|
+
disabled: S || !f,
|
|
49
|
+
onChange: C,
|
|
50
|
+
onPressEnter: l,
|
|
51
|
+
onFocus: v,
|
|
52
|
+
onBlur: l
|
|
53
|
+
}
|
|
54
|
+
) : /* @__PURE__ */ r("span", { children: e }),
|
|
55
|
+
!s && /* @__PURE__ */ r("span", { className: `${a}-text-goto-suffix`, children: (d = i == null ? void 0 : i.Pagination) == null ? void 0 : d.page }),
|
|
56
|
+
s && /* @__PURE__ */ x(F, { children: [
|
|
57
|
+
/* @__PURE__ */ r("span", { className: `${a}-separator`, children: "/" }),
|
|
58
|
+
/* @__PURE__ */ r("span", { children: f })
|
|
59
|
+
] })
|
|
60
|
+
] });
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
L as default
|
|
64
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import P, { useRef as d, useContext as C } from "react";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import "../config-provider/ConfigProvider.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
|
+
/* empty css */
|
|
8
|
+
/* empty css */
|
|
9
|
+
/* empty css */
|
|
10
|
+
/* empty css */
|
|
11
|
+
import s from "../select/Select.js";
|
|
12
|
+
import { ConfigContext as O } from "../config-provider/context.js";
|
|
13
|
+
const x = () => {
|
|
14
|
+
}, z = s.Option, h = [10, 20, 30, 40, 50];
|
|
15
|
+
function S(m) {
|
|
16
|
+
var p;
|
|
17
|
+
const n = d(null), { locale: o } = C(O), {
|
|
18
|
+
onPageSizeChange: c = x,
|
|
19
|
+
rootPrefixCls: f,
|
|
20
|
+
sizeOptions: e = h,
|
|
21
|
+
pageSize: r = 10,
|
|
22
|
+
size: g,
|
|
23
|
+
selectProps: l,
|
|
24
|
+
disabled: u
|
|
25
|
+
} = m;
|
|
26
|
+
return /* @__PURE__ */ i(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
ref: n,
|
|
30
|
+
className: `${f}-option`,
|
|
31
|
+
"aria-label": (p = o == null ? void 0 : o.Pagination) == null ? void 0 : p.pageSize,
|
|
32
|
+
children: /* @__PURE__ */ i(
|
|
33
|
+
s,
|
|
34
|
+
{
|
|
35
|
+
value: e.indexOf(r) !== -1 ? r : e[0],
|
|
36
|
+
onChange: (t) => {
|
|
37
|
+
c(t);
|
|
38
|
+
},
|
|
39
|
+
size: g,
|
|
40
|
+
getPopupContainer: () => n.current,
|
|
41
|
+
disabled: u,
|
|
42
|
+
...l,
|
|
43
|
+
children: e.map((t) => {
|
|
44
|
+
var a;
|
|
45
|
+
return /* @__PURE__ */ i(z, { value: t, children: `${t} ${(a = o == null ? void 0 : o.Pagination) == null ? void 0 : a.countPerPage}` }, t);
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
const B = P.memo(S);
|
|
53
|
+
export {
|
|
54
|
+
B as default
|
|
55
|
+
};
|