@unicom-cloud/ui 0.8.90 → 0.8.91
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 +10 -9
- package/Alert.js +6 -5
- package/AutoComplete.js +11 -8
- package/BackTop.js +12 -10
- package/Badge.js +10 -9
- package/Breadcrumb.js +10 -9
- package/Button.js +9 -8
- package/Calendar.js +13 -10
- package/Card.js +9 -8
- package/Carousel.js +9 -8
- package/Cascader.js +2 -2
- package/Checkbox.js +8 -6
- package/Collapse.js +3 -2
- package/ColorPicker.js +16 -13
- package/Comment.js +6 -5
- package/ConfigProvider.js +6 -5
- package/Copy.js +6 -5
- package/DatePicker.js +13 -8
- package/Descriptions.js +5 -4
- package/Details.js +15 -0
- package/Development.js +5 -3
- package/Divider.js +5 -4
- package/Draggable.js +4 -3
- package/Dropdown.js +12 -10
- package/Empty.js +6 -3
- package/Form.js +17 -13
- package/Icon.js +7 -6
- package/IconHover.js +4 -2
- package/Image.js +5 -5
- package/Input.js +17 -12
- package/InputNumber.js +7 -5
- package/Layout.js +13 -12
- package/Link.js +6 -5
- package/List.js +9 -7
- package/Loading.js +3 -2
- package/Mentions.js +7 -5
- package/Menu.js +7 -6
- package/Message.js +13 -6
- package/Modal.js +2 -2
- package/Notice.js +10 -7
- package/Notification.js +13 -7
- package/OverflowEllipsis.js +5 -4
- package/PageHeader.js +9 -7
- package/Pagination.js +2 -2
- package/Popconfirm.js +6 -5
- package/Popover.js +6 -5
- package/Progress.js +6 -5
- package/Radio.js +8 -6
- package/Rate.js +6 -5
- package/ResizeBox.js +12 -11
- package/Result.js +5 -4
- package/Select.js +6 -5
- package/SelectView.js +2 -2
- package/Skeleton.js +6 -5
- package/Slider.js +11 -8
- package/Space.js +6 -5
- package/SpeechSynthesis.js +4 -2
- package/Spin.js +6 -5
- package/Statistic.js +10 -8
- package/Steps.js +9 -8
- package/SuspenseFallbackTest.js +3 -2
- package/Switch.js +13 -8
- package/Table.js +27 -15
- package/Tabs.js +5 -5
- package/Tag.js +8 -6
- package/Tooltip.js +9 -7
- package/Transfer.js +8 -6
- package/Tree.js +3 -2
- package/TreeSelect.js +3 -3
- package/Trigger.js +17 -12
- package/Typography.js +7 -6
- package/Upload.js +6 -5
- package/affix/index.js +32 -31
- package/alert/index.js +60 -70
- package/anchor/Anchor.js +46 -45
- package/anchor/Link.js +9 -8
- package/anchor/util.js +15 -14
- package/auto-complete/index.js +154 -15
- package/avatar/Avatar.js +6 -5
- package/avatar/Group.js +17 -16
- package/back-top/index.js +38 -36
- package/badge/Count.js +11 -11
- package/badge/index.js +35 -34
- package/breadcrumb/Item.js +7 -7
- package/breadcrumb/index.js +29 -28
- package/button/Group.js +8 -7
- package/button/index.js +13 -12
- package/calendar/Month.js +140 -10
- package/calendar/Year.js +21 -20
- package/calendar/header/Panel.js +57 -0
- package/calendar/header/index.js +110 -0
- package/calendar/hook/useCellClassName.js +41 -0
- package/calendar/index.js +171 -14
- package/card/Grid.js +12 -11
- package/card/Meta.js +14 -13
- package/card/index.js +11 -10
- package/carousel/Arrow.js +16 -15
- package/carousel/Indicator.js +19 -18
- package/carousel/index.js +16 -15
- package/cascader/Cascader.js +299 -24
- package/cascader/base/node.js +142 -0
- package/cascader/base/store.js +93 -0
- package/cascader/hook/useRefCurrent.js +12 -0
- package/cascader/index.js +2 -2
- package/cascader/panel/List.js +278 -0
- package/cascader/panel/Option.js +33 -0
- package/cascader/panel/Search.js +169 -0
- package/cascader/util.js +64 -12
- package/checkbox/Checkbox.js +125 -17
- package/checkbox/Group.js +97 -12
- package/checkbox/GroupBlock.js +62 -6
- package/checkbox/index.js +7 -6
- package/collapse/Collapse.js +67 -234
- package/collapse/Item.js +181 -9
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +21 -20
- package/color-picker/InputAlpha.js +10 -9
- package/color-picker/InputHex.js +27 -25
- package/color-picker/InputRgb.js +27 -24
- package/color-picker/Palette.js +16 -14
- package/color-picker/Panel.js +269 -15
- package/color-picker/colors.js +8 -7
- package/color-picker/hooks/useColorPicker.js +128 -0
- package/{chunk/k-OUstoD.js → color-picker/hooks/useControlBlock.js} +1 -1
- package/color-picker/index.js +160 -24
- package/color-picker/utils.js +18 -17
- package/comment/index.js +23 -22
- package/components/common/development/index.js +32 -0
- package/components/common/empty/index.js +17 -0
- package/components/common/higher-order/with-speech-synthesis/index.js +61 -0
- package/{chunk/DxVvggX2.js → components/common/hooks/useComputedState.js} +2 -2
- package/components/common/hooks/useCreate.js +8 -0
- package/components/common/hooks/useForceUpdate.js +8 -0
- package/{chunk/B4YRLi8r.js → components/common/hooks/useId.js} +5 -5
- package/components/common/hooks/useInView.js +31 -0
- package/{chunk/B4WG1mhs.js → components/common/hooks/useIntersectionObserver.js} +9 -9
- package/components/common/hooks/useInterval.js +18 -0
- package/{chunk/oopARUrq.js → components/common/hooks/useIsFirstRender.js} +1 -1
- package/components/common/hooks/useIsomorphicLayoutEffect.js +6 -0
- package/components/common/hooks/useKeyboardEvent.js +17 -0
- package/{chunk/BL9DMeor.js → components/common/hooks/useListenResize.js} +1 -1
- package/{chunk/BXAeh0_V.js → components/common/hooks/useMedia.js} +1 -1
- package/{chunk/BFTV6myl.js → components/common/hooks/useMergeProps.js} +3 -3
- package/{chunk/D5wldVRB.js → components/common/hooks/useMergeValue.js} +8 -8
- package/{chunk/zmmqLCF4.js → components/common/hooks/useOnlineStatus.js} +1 -1
- package/{chunk/DU1RCDfh.js → components/common/hooks/useOverflowHidden.js} +1 -1
- package/components/common/hooks/useOverrideRef.js +14 -0
- package/{chunk/BsY85n3_.js → components/common/hooks/usePersistCallback.js} +2 -2
- package/{chunk/rT6qmv-Y.js → components/common/hooks/usePrefersColorSchemeDark.js} +5 -5
- package/components/common/hooks/usePrevious.js +10 -0
- package/components/common/hooks/useRefs.js +10 -0
- package/{chunk/CmZzBtA4.js → components/common/hooks/useResizeObserver.js} +4 -4
- package/{chunk/hEWZQ8Zi.js → components/common/hooks/useStateCallback.js} +5 -5
- package/{chunk/Duezix3m.js → components/common/hooks/useStateWithPromise.js} +6 -6
- package/components/common/hooks/useUpdateEffect.js +12 -0
- package/components/common/hooks/useWatch.js +11 -0
- package/{chunk/CB4jGw4K.js → components/common/hooks/useWindowSize.js} +6 -6
- package/components/common/icons/file/index.js +56 -0
- package/components/common/space/index.js +110 -0
- package/components/common/utils/PqbCSSTransition.js +32 -0
- package/{chunk/B6r8jPCd.js → components/common/utils/constant.js} +2 -2
- package/components/common/utils/copy.js +7 -0
- package/{chunk/B3LeSidy.js → components/common/utils/dayjs.js} +25 -24
- package/components/common/utils/dom.js +51 -0
- package/components/common/utils/fillNBSP.js +7 -0
- package/{chunk/B7M-FGia.js → components/common/utils/getHighlightText.js} +11 -10
- package/{chunk/Dh7Osrvr.js → components/common/utils/getHotkeyHandler.js} +6 -5
- package/{chunk/DKHXj8Kf.js → components/common/utils/getStringLength.js} +3 -2
- package/components/common/utils/include.js +10 -0
- package/components/common/utils/is.js +126 -0
- package/{chunk/DH7HTOV_.js → components/common/utils/mergeProps.js} +3 -2
- package/components/common/utils/mergedToString.js +16 -0
- package/components/common/utils/omit.js +12 -0
- package/components/common/utils/pad.js +18 -0
- package/components/common/utils/pick.js +18 -0
- package/components/common/utils/react19Adapter.js +3 -0
- package/{chunk/BZ3igxQN.js → components/common/utils/reactDOM.js} +13 -13
- package/components/common/utils/resizeObserverEffect.js +23 -0
- package/components/common/utils/scrollIntoView.js +25 -0
- package/components/common/utils/setDarkTheme.js +27 -0
- package/components/common/utils/setPrimaryColor.js +30 -0
- package/{chunk/DzekwbB4.js → components/common/utils/setTheme.js} +16 -14
- package/components/common/utils/style.js +39 -0
- package/components/common/utils/throttleByRaf.js +16 -0
- package/components/common/utils/warning.js +11 -0
- package/config-provider/ConfigProvider.js +56 -13
- package/config-provider/context.js +24 -7
- package/config-provider/index.js +6 -5
- package/copy/index.js +15 -14
- package/date-picker/Picker.js +75 -73
- package/date-picker/RangePicker.js +585 -22
- package/date-picker/hook/useCellClassName.js +60 -0
- package/date-picker/index.js +32 -27
- package/date-picker/panel/Body.js +88 -0
- package/date-picker/panel/Footer.js +71 -0
- package/date-picker/panel/Header.js +69 -0
- package/date-picker/panel/Shortcut.js +45 -0
- package/date-picker/panel/WeekList.js +19 -0
- package/date-picker/panel/date/index.js +193 -0
- package/date-picker/panel/month/index.js +112 -0
- package/date-picker/panel/quarter/index.js +97 -0
- package/date-picker/panel/range/index.js +250 -0
- package/date-picker/panel/week/index.js +35 -0
- package/date-picker/panel/year/index.js +73 -0
- package/date-picker/util.js +8 -8
- package/descriptions/index.js +24 -23
- package/details/index.js +82 -0
- package/details/interface.js +1 -0
- package/development/index.js +17 -36
- package/dist/compute-scroll-into-view/src/index.js +126 -0
- package/dist/dom-helpers/addClass.js +10 -0
- package/dist/dom-helpers/hasClass.js +8 -0
- package/dist/dom-helpers/removeClass.js +18 -0
- package/dist/react-transition-group/chunk/CPfP7aNL.js +381 -0
- package/dist/react-transition-group/chunk/F6QOOr2H.js +500 -0
- package/dist/react-transition-group/src/CSSTransition.js +202 -0
- package/dist/react-transition-group/src/ReplaceTransition.js +43 -0
- package/dist/react-transition-group/src/SwitchTransition.js +117 -0
- package/dist/react-transition-group/src/TransitionGroup.js +160 -0
- package/dist/react-transition-group/src/TransitionGroupContext.js +5 -0
- package/dist/react-transition-group/src/config.js +6 -0
- package/{chunk/Coz3rCng.js → dist/scroll-into-view-if-needed/src/index.js} +5 -5
- package/dist/tinycolor/chunk/DGZSWe7E.js +182 -0
- package/dist/tinycolor/customize/index.js +12 -0
- package/dist/tinycolor/src/conversion.js +143 -0
- package/dist/tinycolor/src/css-color-names.js +153 -0
- package/dist/tinycolor/src/format-input.js +77 -0
- package/dist/tinycolor/src/index.js +388 -0
- package/dist/tinycolor/src/util.js +32 -0
- package/dist/tween/src/easing.js +43 -0
- package/dist/tween/src/tween.js +70 -0
- package/dist/validate/chunk/BXTR2LmP.js +49 -0
- package/{chunk/DEuVgCzp.js → dist/validate/src/index.js} +91 -151
- package/dist/validate/src/util.js +22 -0
- package/divider/index.js +15 -14
- package/draggable/index.js +17 -16
- package/drawer/Drawer.js +41 -39
- package/dropdown/Button.js +88 -9
- package/dropdown/index.js +85 -163
- package/empty/index.js +21 -5
- package/form/Control.js +1 -1
- package/form/Form.js +159 -14
- package/form/FormItem.js +30 -29
- package/form/FormList.js +1 -1
- package/form/context.js +1 -1
- package/form/hook/useContext.js +32 -0
- package/form/hook/useForm.js +58 -0
- package/form/hook/useState.js +31 -0
- package/form/hook/useWatch.js +36 -0
- package/form/index.js +29 -106
- package/form/promisify.js +1 -1
- package/form/store.js +1 -1
- package/form/util.js +5 -5
- package/grid/Col.js +14 -13
- package/grid/Grid.js +23 -22
- package/grid/GridItem.js +23 -22
- package/grid/Row.js +19 -18
- package/{chunk/xAb6ZgqS.js → grid/hook/useResponsiveState.js} +2 -2
- package/hooks/index.js +38 -38
- package/hooks/use-watermark/utils.js +9 -0
- package/hooks/useComputedState.js +2 -2
- package/hooks/useCreate.js +2 -2
- package/hooks/useForceUpdate.js +2 -2
- package/hooks/useId.js +2 -2
- package/hooks/useInView.js +2 -2
- package/hooks/useIntersectionObserver.js +2 -2
- package/hooks/useInterval.js +2 -2
- package/hooks/useIsFirstRender.js +2 -2
- package/hooks/useIsomorphicLayoutEffect.js +2 -2
- package/hooks/useKeyboardEvent.js +2 -2
- package/hooks/useListenResize.js +2 -2
- package/hooks/useMedia.js +2 -2
- package/hooks/useMergeProps.js +2 -2
- package/hooks/useMergeValue.js +2 -2
- package/hooks/useOnlineStatus.js +2 -2
- package/hooks/useOverflowHidden.js +2 -2
- package/hooks/useOverrideRef.js +2 -2
- package/hooks/usePersistCallback.js +2 -2
- package/hooks/usePrefersColorSchemeDark.js +2 -2
- package/hooks/usePrevious.js +2 -2
- package/hooks/useRefs.js +2 -2
- package/hooks/useResizeObserver.js +2 -2
- package/hooks/useStateCallback.js +2 -2
- package/hooks/useStateWithPromise.js +2 -2
- package/hooks/useUpdateEffect.js +2 -2
- package/hooks/useVerificationCode.js +21 -21
- package/hooks/useWatch.js +2 -2
- package/hooks/useWatermark.js +72 -77
- package/hooks/useWindowSize.js +2 -2
- package/icon/addFromIconFontCn.js +31 -5
- package/icon/index.js +22 -48
- package/icon-hover/index.js +37 -5
- package/icons/file.js +15 -63
- package/image/Image.js +35 -32
- package/image/ImageFooter.js +44 -6
- package/image/ImagePreview.js +480 -34
- package/image/ImagePreviewArrow.js +8 -7
- package/image/ImagePreviewGroup.js +9 -9
- package/image/index.js +3 -3
- package/image/util/getFixTranslate.js +7 -0
- package/image/util/getScale.js +74 -0
- package/image/util/hook/useImageStatus.js +16 -0
- package/image/util/hook/useShowFooter.js +7 -0
- package/index.js +681 -614
- package/input/Button.js +67 -9
- package/input/Group.js +9 -8
- package/input/Input.js +158 -684
- package/input/InputElement.js +33 -33
- package/input/Number.js +2 -2
- package/input/Password.js +69 -11
- package/input/Search.js +68 -11
- package/input/Textarea.js +166 -14
- package/input/index.js +17 -13
- package/input-number/index.js +209 -16
- package/input-number/useSelectionRange.js +3 -3
- package/input-tag/InputTag.js +78 -72
- package/layout/Content.js +7 -6
- package/layout/Footer.js +7 -6
- package/layout/Header.js +5 -4
- package/layout/Sider.js +19 -18
- package/layout/index.js +21 -20
- package/link/index.js +15 -14
- package/list/Item.js +12 -11
- package/list/Meta.js +7 -6
- package/list/index.js +268 -17
- package/loading/index.js +13 -13
- package/loading/style/index.module.less.js +4 -0
- package/locale/en-US.js +4 -3
- package/locale/tr-TR.js +4 -3
- package/mentions/index.js +145 -11
- package/menu/Item.js +3 -3
- package/menu/Menu.js +182 -24
- package/menu/OverflowWrap.js +88 -8
- package/menu/index.js +9 -9
- package/menu/sub-menu/Inline.js +111 -0
- package/menu/sub-menu/Pop.js +120 -0
- package/menu/sub-menu/index.js +17 -0
- package/message/index.js +147 -13
- package/message/useMessage.js +57 -5
- package/modal/Confirm.js +110 -11
- package/modal/Modal.js +440 -20
- package/modal/index.js +1 -1
- package/modal/use-modal/Hook.js +52 -0
- package/modal/use-modal/index.js +68 -0
- package/notice/index.js +176 -17
- package/notification/index.js +149 -15
- package/notification/useNotification.js +52 -4
- package/overflow-ellipsis/OverflowItem.js +17 -16
- package/overflow-ellipsis/index.js +30 -29
- package/package.json +1 -1
- package/page-header/index.js +30 -28
- package/pagination/PageItem.js +16 -15
- package/pagination/PageJumper.js +13 -12
- package/pagination/PageOption.js +45 -5
- package/pagination/Pagination.js +244 -11
- package/pagination/index.js +2 -2
- package/picker/Input.js +47 -45
- package/picker/InputRange.js +53 -51
- package/popconfirm/index.js +10 -9
- package/popover/index.js +12 -11
- package/portal/Portal.js +7 -7
- package/progress/CircleProgress.js +1 -1
- package/progress/index.js +32 -31
- package/radio/Group.js +94 -14
- package/radio/GroupBlock.js +68 -7
- package/radio/Radio.js +92 -14
- package/radio/index.js +7 -6
- package/rate/index.js +31 -30
- package/resize-box/ResizeTrigger.js +10 -9
- package/resize-box/Split.js +66 -65
- package/resize-box/SplitGroup.js +10 -9
- package/resize-box/index.js +18 -17
- package/result/index.js +33 -32
- package/select/OptGroup.js +10 -10
- package/select/Option.js +93 -6
- package/select/Select.js +548 -24
- package/select/index.js +3 -3
- package/select/util.js +139 -18
- package/select-view/Core.js +23 -21
- package/select-view/index.js +7 -7
- package/skeleton/index.js +12 -11
- package/slider/Button.js +24 -23
- package/slider/Input.js +11 -11
- package/slider/hook/useInterval.js +73 -0
- package/slider/hook/useLegalValue.js +70 -0
- package/slider/index.js +220 -345
- package/space/index.js +38 -127
- package/space-/index.js +17 -16
- package/speech-synthesis/index.js +9 -63
- package/speech-synthesis/style/index.less.js +1 -0
- package/spin/DotLoading.js +10 -9
- package/spin/index.js +21 -20
- package/statistic/Countdown.js +16 -15
- package/statistic/index.js +45 -43
- package/statistic/util.js +1 -1
- package/steps/index.js +14 -13
- package/style.css +1 -1
- package/suspense-fallback-test/index.js +6 -5
- package/suspense-fallback-test/style/index.less.js +1 -0
- package/switch/index.js +43 -38
- package/table/Table.js +627 -21
- package/table/hook/useColumns.js +141 -0
- package/table/hook/useComponent.js +28 -0
- package/table/hook/useExpand.js +36 -0
- package/table/hook/useRowSelection.js +94 -0
- package/table/hook/useSorter.js +54 -0
- package/table/hook/useStickyClassNames.js +30 -0
- package/table/hook/useStickyOffsets.js +28 -0
- package/table/hook/useThResizable.js +39 -0
- package/table/index.js +28 -15
- package/table/summary/Cell.js +10 -0
- package/table/summary/Row.js +25 -0
- package/table/summary/context.js +5 -0
- package/table/summary/index.js +12 -0
- package/table/tbody/Td.js +180 -0
- package/table/tbody/Tr.js +165 -0
- package/table/tbody/index.js +154 -0
- package/table/tfoot/index.js +16 -0
- package/table/th-resizable/index.js +46 -0
- package/table/thead/Column.js +251 -0
- package/table/thead/index.js +129 -0
- package/tabs/Tab.js +169 -16
- package/tabs/TabContent.js +51 -6
- package/tabs/TabPane.js +13 -12
- package/tabs/hook/useDomSize.js +17 -0
- package/tabs/hook/useHeaderScroll.js +67 -0
- package/tabs/index.js +6 -6
- package/tabs/tab-header/DropdownIcon.js +66 -0
- package/tabs/tab-header/TabInk.js +66 -0
- package/tabs/tab-header/TabNavIcon.js +66 -0
- package/tabs/tab-header/TabTitle.js +78 -0
- package/tabs/tab-header/index.js +331 -0
- package/tag/index.js +32 -30
- package/time-picker/Picker.js +56 -55
- package/time-picker/RangePicker.js +14 -14
- package/time-picker/TimeColumn.js +1 -1
- package/time-picker/TimePicker.js +42 -41
- package/time-picker/util.js +23 -22
- package/timeline/Item.js +4 -3
- package/timeline/Timeline.js +12 -11
- package/tooltip/index.js +35 -33
- package/transfer/Item.js +104 -9
- package/transfer/List.js +186 -13
- package/transfer/index.js +181 -13
- package/tree/Animation.js +100 -9
- package/tree/Node.js +212 -13
- package/tree/NodeList.js +80 -6
- package/tree/Tree.js +591 -17
- package/tree/index.js +3 -2
- package/tree-select/List.js +122 -6
- package/tree-select/Select.js +258 -22
- package/tree-select/hook/useKeyCache.js +55 -0
- package/tree-select/hook/useStateValue.js +95 -0
- package/tree-select/hook/useTreeData.js +13 -0
- package/tree-select/index.js +3 -3
- package/trigger/getPopupStyle.js +2 -2
- package/trigger/index.js +27 -22
- package/types/common/utils/is.d.ts +2 -1
- package/types/pc/details/index.d.ts +4 -0
- package/types/pc/details/interface.d.ts +33 -0
- package/types/pc/index.d.ts +1 -0
- package/types/pc/select/interface.d.ts +3 -3
- package/types/pc/tree/Context.d.ts +1 -1
- package/types/pc/tree/interface.d.ts +2 -2
- package/types/pc/utils/names.d.ts +140 -134
- package/typography/Base.js +43 -42
- package/typography/EditContent.js +7 -7
- package/typography/Ellipsis.js +193 -23
- package/typography/Operations.js +4 -4
- package/typography/Paragraph.js +12 -11
- package/typography/Typography.js +8 -7
- package/typography/index.js +15 -10
- package/typography/useEllipsis.js +21 -21
- package/upload/TriggerNode.js +9 -8
- package/upload/Upload.js +126 -548
- package/upload/Uploader.js +11 -11
- package/upload/index.js +2 -2
- package/upload/list/PictureItem.js +119 -0
- package/upload/list/TextItem.js +123 -0
- package/upload/list/UploadProgress.js +96 -0
- package/upload/list/index.js +140 -0
- package/upload/request.js +3 -3
- package/upload/request_.js +5 -5
- package/utils/PqbCSSTransition.js +3 -3
- package/utils/color.js +1 -1
- package/utils/computeScrollIntoView.js +4 -126
- package/utils/constant.js +6 -6
- package/utils/contextHolder.js +29 -4
- package/utils/dayjs.js +11 -11
- package/utils/dom.js +7 -49
- package/utils/fillNBSP.js +3 -3
- package/utils/getHighlightText.js +1 -1
- package/utils/getHotkeyHandler.js +1 -1
- package/utils/getStringLength.js +1 -1
- package/utils/include.js +3 -3
- package/utils/index.js +280 -270
- package/utils/is.js +39 -39
- package/utils/mergeProps.js +1 -1
- package/utils/mergedToString.js +1 -1
- package/utils/names.js +4 -0
- package/utils/omit.js +1 -1
- package/utils/pad.js +3 -16
- package/utils/pick.js +5 -5
- package/utils/react19Adapter.js +1 -3
- package/utils/reactDOM.js +3 -3
- package/utils/reactTransitionGroup.js +12 -8
- package/utils/resizeObserverEffect.js +1 -1
- package/utils/scrollIntoView.js +1 -1
- package/utils/setDarkTheme.js +10 -30
- package/utils/setPrimaryColor.js +6 -29
- package/utils/setTheme.js +3 -3
- package/utils/style.js +4 -37
- package/utils/throttleByRaf.js +3 -14
- package/utils/throttleByRaf2.js +1 -1
- package/utils/tinycolor.js +26 -27
- package/utils/tween.js +4 -3
- package/utils/validate.js +5 -4
- package/utils/warning.js +3 -9
- package/verification-code/VerificationCode.js +25 -24
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +278 -391
- package/virtual-list/util/algorithm.js +32 -0
- package/virtual-list/util/item.js +99 -0
- package/watermark/Watermark.js +17 -16
- package/chunk/5_U1CBIu.js +0 -8
- package/chunk/9TSjT7x_.js +0 -927
- package/chunk/B2yFlXke.js +0 -6
- package/chunk/B44Hj5ad.js +0 -697
- package/chunk/B5RFT17G.js +0 -15
- package/chunk/BJ9_azwQ.js +0 -1391
- package/chunk/BKKEev13.js +0 -11
- package/chunk/BKT9BFf4.js +0 -11
- package/chunk/BL8tIaO8.js +0 -649
- package/chunk/BNevupAU.js +0 -72
- package/chunk/BYdIoY50.js +0 -17
- package/chunk/BbQEqpOn.js +0 -7835
- package/chunk/BcCuJQY8.js +0 -214
- package/chunk/Bg3uJGPu.js +0 -10
- package/chunk/BsUZRQDT.js +0 -23
- package/chunk/C4OrxKE6.js +0 -18
- package/chunk/C8Kcc_9d.js +0 -1479
- package/chunk/CC---6jO.js +0 -110
- package/chunk/CCKr5jj1.js +0 -31
- package/chunk/CIRG541s.js +0 -22
- package/chunk/CPCJg6bv.js +0 -570
- package/chunk/CQ_WOOmf.js +0 -8
- package/chunk/CYhxqVkn.js +0 -9
- package/chunk/CftuXmo_.js +0 -6
- package/chunk/CkEaf5V0.js +0 -473
- package/chunk/ClM74To2.js +0 -58
- package/chunk/ClqoGc3r.js +0 -17
- package/chunk/D-Hw4x_H.js +0 -88
- package/chunk/D-ap9qEk.js +0 -14
- package/chunk/DWvmq7az.js +0 -843
- package/chunk/Dc-uXGtN.js +0 -178
- package/chunk/DxYoPlum.js +0 -50
- package/chunk/NPajzdOv.js +0 -27
- package/chunk/VSe_Wq1g.js +0 -10
- package/chunk/a3hR6zLw.js +0 -12
- package/types/common/assets/hourglass.d.ts +0 -2
package/chunk/DWvmq7az.js
DELETED
|
@@ -1,843 +0,0 @@
|
|
|
1
|
-
import { jsx as u, jsxs as ee } from "react/jsx-runtime";
|
|
2
|
-
import fe from "lodash/isFunction";
|
|
3
|
-
import ke from "lodash/isPlainObject";
|
|
4
|
-
import te, { useContext as ie, useRef as V, useState as we, useEffect as L, useMemo as ae, useCallback as at, useImperativeHandle as ct } from "react";
|
|
5
|
-
import { a as Oe, I as me } from "./B44Hj5ad.js";
|
|
6
|
-
import { u as st } from "./B4YRLi8r.js";
|
|
7
|
-
import { u as lt } from "./BFTV6myl.js";
|
|
8
|
-
import { u as dt } from "./D5wldVRB.js";
|
|
9
|
-
import X from "@unicom-cloud/utils/class-name";
|
|
10
|
-
import { o as ye } from "./BKKEev13.js";
|
|
11
|
-
import ft from "../tabs/TabPane.js";
|
|
12
|
-
import ut from "@unicom-cloud/icons/IconUiPlus";
|
|
13
|
-
import Te from "lodash/isNumber";
|
|
14
|
-
import ht from "lodash/throttle";
|
|
15
|
-
import { on as le, off as We } from "../utils/dom.js";
|
|
16
|
-
import { getRectDiff as Ce, getKeyDownEvent as Xe, updateScrollOffset as mt } from "../tabs/util.js";
|
|
17
|
-
import { r as de } from "./CIRG541s.js";
|
|
18
|
-
import { setTransformStyle as pt } from "../utils/style.js";
|
|
19
|
-
import Ye from "@unicom-cloud/icons/IconUiDown";
|
|
20
|
-
import je from "lodash/isNull";
|
|
21
|
-
import bt from "../dropdown/index.js";
|
|
22
|
-
import { M as Ae } from "./CkEaf5V0.js";
|
|
23
|
-
import gt from "lodash/isEqualWith";
|
|
24
|
-
import vt from "../utils/throttleByRaf.js";
|
|
25
|
-
import Me from "@unicom-cloud/icons/IconUiLeft";
|
|
26
|
-
import Ee from "@unicom-cloud/icons/IconUiRight";
|
|
27
|
-
import $t from "@unicom-cloud/icons/IconUiUp";
|
|
28
|
-
import yt from "@unicom-cloud/icons/IconUiClose";
|
|
29
|
-
import { Enter as Tt } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
30
|
-
function wt(e) {
|
|
31
|
-
const {
|
|
32
|
-
animation: s,
|
|
33
|
-
activeTab: o,
|
|
34
|
-
prefixCls: n,
|
|
35
|
-
paneChildren: i,
|
|
36
|
-
direction: b,
|
|
37
|
-
lazyload: t,
|
|
38
|
-
destroyOnHide: v
|
|
39
|
-
} = e, g = i.findIndex((c) => c.key === o), m = ie(Ne), { rtl: w } = ie(Oe);
|
|
40
|
-
if (i.every((c) => (c == null ? void 0 : c.props) && (!("children" in c.props) || c.props.children === null)))
|
|
41
|
-
return null;
|
|
42
|
-
const l = X(`${n}-content-inner`, {
|
|
43
|
-
[`${n}-animation`]: s
|
|
44
|
-
});
|
|
45
|
-
return /* @__PURE__ */ u("div", { className: `${n}-content ${n}-content-${b}`, children: /* @__PURE__ */ u(
|
|
46
|
-
"div",
|
|
47
|
-
{
|
|
48
|
-
className: l,
|
|
49
|
-
style: w ? { marginRight: `-${g * 100}%` } : { marginLeft: `-${g * 100}%` },
|
|
50
|
-
children: i.map((c, x) => {
|
|
51
|
-
const { tabpane: h, tab: p } = m.getIdPrefix(x), d = "destroyOnHide" in c.props ? c.props.destroyOnHide : v, a = c.key === o;
|
|
52
|
-
return /* @__PURE__ */ u(
|
|
53
|
-
"div",
|
|
54
|
-
{
|
|
55
|
-
className: X(`${n}-content-item`, {
|
|
56
|
-
[`${n}-content-item-active`]: a
|
|
57
|
-
}),
|
|
58
|
-
role: "tabpanel",
|
|
59
|
-
id: h,
|
|
60
|
-
"aria-hidden": a ? void 0 : !0,
|
|
61
|
-
tabIndex: a ? 0 : -1,
|
|
62
|
-
"aria-labelledby": p,
|
|
63
|
-
children: g !== x && d ? null : te.cloneElement(c, {
|
|
64
|
-
lazyload: t,
|
|
65
|
-
isActive: a
|
|
66
|
-
})
|
|
67
|
-
},
|
|
68
|
-
c.key
|
|
69
|
-
);
|
|
70
|
-
})
|
|
71
|
-
}
|
|
72
|
-
) });
|
|
73
|
-
}
|
|
74
|
-
function oe() {
|
|
75
|
-
const e = V(), [s, o] = we({
|
|
76
|
-
height: 0,
|
|
77
|
-
width: 0
|
|
78
|
-
});
|
|
79
|
-
return L(() => {
|
|
80
|
-
e.current && o({
|
|
81
|
-
height: e.current.offsetHeight,
|
|
82
|
-
width: e.current.offsetWidth,
|
|
83
|
-
domRect: e.current.getBoundingClientRect()
|
|
84
|
-
});
|
|
85
|
-
}, []), [e, s, o];
|
|
86
|
-
}
|
|
87
|
-
function xt(e) {
|
|
88
|
-
const {
|
|
89
|
-
headerWrapperRef: s,
|
|
90
|
-
headerOffset: o,
|
|
91
|
-
align: n,
|
|
92
|
-
isScrollable: i,
|
|
93
|
-
direction: b,
|
|
94
|
-
onScroll: t
|
|
95
|
-
} = e;
|
|
96
|
-
function v(d, a) {
|
|
97
|
-
let $ = 0;
|
|
98
|
-
b === "vertical" ? $ = o + a : $ = n === "left" ? o + d : o - d, t == null || t($);
|
|
99
|
-
}
|
|
100
|
-
const g = V("x");
|
|
101
|
-
function m(d) {
|
|
102
|
-
if (!i)
|
|
103
|
-
return;
|
|
104
|
-
d.preventDefault();
|
|
105
|
-
const { deltaX: a, deltaY: $ } = d;
|
|
106
|
-
let P = 0;
|
|
107
|
-
const I = Math.abs(a), S = Math.abs($);
|
|
108
|
-
I === S ? P = g.current === "x" ? a : $ : I > S ? (P = a, g.current = "x") : (P = $, g.current = "y"), v(P, P);
|
|
109
|
-
}
|
|
110
|
-
const w = V({
|
|
111
|
-
clientX: 0,
|
|
112
|
-
clientY: 0
|
|
113
|
-
}), l = (d) => d && d.touches && d.touches.length && d.touches[0], c = (d) => {
|
|
114
|
-
d.cancelable && d.preventDefault();
|
|
115
|
-
const a = l(d);
|
|
116
|
-
if (!a)
|
|
117
|
-
return;
|
|
118
|
-
const { clientX: $, clientY: P } = w.current, I = a.clientX - $, S = a.clientY - P;
|
|
119
|
-
v(-I, -S);
|
|
120
|
-
}, x = () => {
|
|
121
|
-
We(document.documentElement, "touchmove", c), We(document.documentElement, "touchend", x);
|
|
122
|
-
}, h = (d) => {
|
|
123
|
-
if (!i)
|
|
124
|
-
return;
|
|
125
|
-
const a = l(d);
|
|
126
|
-
a && (w.current = {
|
|
127
|
-
clientX: a.clientX,
|
|
128
|
-
clientY: a.clientY
|
|
129
|
-
}, le(document.documentElement, "touchmove", c, { passive: !1 }), le(window, "touchend", x, { passive: !1 }));
|
|
130
|
-
}, p = V(null);
|
|
131
|
-
p.current = { onWheel: m, onTouchStart: h }, L(() => {
|
|
132
|
-
le(
|
|
133
|
-
s.current,
|
|
134
|
-
"wheel",
|
|
135
|
-
(d) => {
|
|
136
|
-
p.current.onWheel(d);
|
|
137
|
-
},
|
|
138
|
-
{ passive: !1 }
|
|
139
|
-
), le(
|
|
140
|
-
s.current,
|
|
141
|
-
"touchstart",
|
|
142
|
-
(d) => {
|
|
143
|
-
p.current.onTouchStart(d);
|
|
144
|
-
},
|
|
145
|
-
{ passive: !0 }
|
|
146
|
-
);
|
|
147
|
-
}, [s.current]);
|
|
148
|
-
}
|
|
149
|
-
function kt(e) {
|
|
150
|
-
const {
|
|
151
|
-
prefixCls: s,
|
|
152
|
-
currentOffset: o,
|
|
153
|
-
headerSize: n,
|
|
154
|
-
headerWrapperSize: i,
|
|
155
|
-
getTitleRef: b,
|
|
156
|
-
paneChildren: t,
|
|
157
|
-
direction: v,
|
|
158
|
-
icon: g
|
|
159
|
-
} = e, m = t.map((h) => h.key), w = v === "vertical" ? n.height : n.width, l = v === "vertical" ? i.height : i.width, c = ae(() => {
|
|
160
|
-
const h = {}, p = i.domRect;
|
|
161
|
-
return m.map((d) => {
|
|
162
|
-
const a = b(d);
|
|
163
|
-
if (!a)
|
|
164
|
-
return;
|
|
165
|
-
const $ = a.getBoundingClientRect();
|
|
166
|
-
h[d] = {
|
|
167
|
-
left: $.left - p.left,
|
|
168
|
-
right: $.left - p.left + $.width,
|
|
169
|
-
top: $.top - p.top,
|
|
170
|
-
bottom: $.top - p.top + $.height
|
|
171
|
-
};
|
|
172
|
-
}), h;
|
|
173
|
-
}, [m.join(","), w, l]), x = ae(() => {
|
|
174
|
-
let h = -1, p = -1;
|
|
175
|
-
for (const d in c) {
|
|
176
|
-
const { left: a, right: $ } = c[d];
|
|
177
|
-
if (a >= o && $ - o <= l && h === -1 && (h = m.indexOf(d), p = h), a >= o && $ - o > l) {
|
|
178
|
-
p = m.indexOf(d);
|
|
179
|
-
break;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
return [h, p];
|
|
183
|
-
}, [c, m.join(","), o]);
|
|
184
|
-
return je(g) ? null : /* @__PURE__ */ u(
|
|
185
|
-
bt,
|
|
186
|
-
{
|
|
187
|
-
trigger: "click",
|
|
188
|
-
droplist: /* @__PURE__ */ u(Ae, { onClickMenuItem: e.onClickTab, children: t.map((h, p) => {
|
|
189
|
-
if (p < x[0] || p >= x[1])
|
|
190
|
-
return /* @__PURE__ */ u(Ae.Item, { disabled: h.disabled, children: h.props.title }, h.key);
|
|
191
|
-
}) }),
|
|
192
|
-
children: /* @__PURE__ */ u(
|
|
193
|
-
me,
|
|
194
|
-
{
|
|
195
|
-
role: "button",
|
|
196
|
-
"aria-label": "expand tabs",
|
|
197
|
-
prefix: `${s}-dropdown`,
|
|
198
|
-
className: `${s}-dropdown-icon`,
|
|
199
|
-
children: g || /* @__PURE__ */ u(Ye, {})
|
|
200
|
-
}
|
|
201
|
-
)
|
|
202
|
-
}
|
|
203
|
-
);
|
|
204
|
-
}
|
|
205
|
-
const Ot = (e, s, o) => {
|
|
206
|
-
let n = { left: "", width: "", top: "", height: "" };
|
|
207
|
-
if (s) {
|
|
208
|
-
const i = Ce(s, o);
|
|
209
|
-
e === "vertical" ? n = {
|
|
210
|
-
top: `${i.top}px`,
|
|
211
|
-
height: `${s.offsetHeight}px`,
|
|
212
|
-
left: "",
|
|
213
|
-
width: ""
|
|
214
|
-
} : n = {
|
|
215
|
-
left: `${i.left}px`,
|
|
216
|
-
width: `${s.offsetWidth}px`,
|
|
217
|
-
top: "",
|
|
218
|
-
height: ""
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
return n;
|
|
222
|
-
}, Ct = ({
|
|
223
|
-
prefixCls: e,
|
|
224
|
-
animation: s,
|
|
225
|
-
disabled: o,
|
|
226
|
-
direction: n,
|
|
227
|
-
getTitleRef: i,
|
|
228
|
-
activeTab: b,
|
|
229
|
-
getHeaderRef: t,
|
|
230
|
-
inkBarSize: v
|
|
231
|
-
}) => {
|
|
232
|
-
const g = V(), m = V();
|
|
233
|
-
return L(() => {
|
|
234
|
-
const w = vt(() => {
|
|
235
|
-
var x;
|
|
236
|
-
const l = i(b), c = Ot(
|
|
237
|
-
n,
|
|
238
|
-
l,
|
|
239
|
-
t("headerRef").current
|
|
240
|
-
);
|
|
241
|
-
c && !gt(m.current, c) && (m.current = c, (x = g.current) != null && x.style && Object.keys(c).forEach((h) => {
|
|
242
|
-
g.current.style[h] = c[h];
|
|
243
|
-
}));
|
|
244
|
-
});
|
|
245
|
-
return w(), () => {
|
|
246
|
-
var l;
|
|
247
|
-
(l = w.cancel) == null || l.call(w);
|
|
248
|
-
};
|
|
249
|
-
}), /* @__PURE__ */ u(
|
|
250
|
-
"div",
|
|
251
|
-
{
|
|
252
|
-
className: X(`${e}-header-ink`, {
|
|
253
|
-
[`${e}-header-ink-no-animation`]: !s,
|
|
254
|
-
[`${e}-header-ink-disabled`]: o,
|
|
255
|
-
[`${e}-header-ink-custom`]: v
|
|
256
|
-
}),
|
|
257
|
-
ref: g,
|
|
258
|
-
children: v && /* @__PURE__ */ u("div", { style: v, className: `${e}-header-ink-inner` })
|
|
259
|
-
}
|
|
260
|
-
);
|
|
261
|
-
}, St = {
|
|
262
|
-
prev: "left",
|
|
263
|
-
next: "right"
|
|
264
|
-
}, Nt = {
|
|
265
|
-
prev: "up",
|
|
266
|
-
next: "down"
|
|
267
|
-
}, Be = (e) => {
|
|
268
|
-
const {
|
|
269
|
-
direction: s,
|
|
270
|
-
headerSize: o,
|
|
271
|
-
headerWrapperSize: n,
|
|
272
|
-
prefixCls: i,
|
|
273
|
-
iconPos: b,
|
|
274
|
-
currentOffset: t,
|
|
275
|
-
align: v,
|
|
276
|
-
rtl: g,
|
|
277
|
-
icon: m
|
|
278
|
-
} = e, { height: w, width: l } = n, { height: c, width: x } = o, h = c - w, p = x - l, d = {
|
|
279
|
-
up: /* @__PURE__ */ u($t, {}),
|
|
280
|
-
down: /* @__PURE__ */ u(Ye, {}),
|
|
281
|
-
left: g ? /* @__PURE__ */ u(Ee, {}) : /* @__PURE__ */ u(Me, {}),
|
|
282
|
-
right: g ? /* @__PURE__ */ u(Me, {}) : /* @__PURE__ */ u(Ee, {})
|
|
283
|
-
}, a = (z) => {
|
|
284
|
-
var f;
|
|
285
|
-
z !== e.currentOffset && ((f = e == null ? void 0 : e.onChange) == null || f.call(e, z));
|
|
286
|
-
}, $ = (z, f) => {
|
|
287
|
-
z.preventDefault();
|
|
288
|
-
let O;
|
|
289
|
-
v === "left" ? O = f === "left" ? t - l : t + l : O = f === "left" ? t + l : t - l, a(O);
|
|
290
|
-
}, P = (z, f) => {
|
|
291
|
-
z.preventDefault();
|
|
292
|
-
let O;
|
|
293
|
-
if (f === "up")
|
|
294
|
-
O = t - w;
|
|
295
|
-
else if (O = t + w, O >= c)
|
|
296
|
-
return;
|
|
297
|
-
a(O);
|
|
298
|
-
}, I = ae(() => v === "left" ? t <= 0 : s === "vertical" ? t >= h : t >= p, [v, s, t, p, t]), S = ae(() => v === "left" ? s === "vertical" ? t >= h : t >= p : t <= 0, [v, s, h, p, t]);
|
|
299
|
-
if (je(m))
|
|
300
|
-
return null;
|
|
301
|
-
const A = s === "horizontal" ? St[b] : Nt[b], _ = b === "prev" ? I : S, F = X(`${i}-${A}-icon`, {
|
|
302
|
-
[`${i}-nav-icon-disabled`]: _
|
|
303
|
-
}), Y = s === "vertical" ? P : $;
|
|
304
|
-
return /* @__PURE__ */ u(
|
|
305
|
-
me,
|
|
306
|
-
{
|
|
307
|
-
disabled: _,
|
|
308
|
-
className: F,
|
|
309
|
-
prefix: i,
|
|
310
|
-
onClick: (z) => Y(z, A),
|
|
311
|
-
children: m || d[A]
|
|
312
|
-
}
|
|
313
|
-
);
|
|
314
|
-
}, Pt = ({
|
|
315
|
-
prefixCls: e,
|
|
316
|
-
onDeleteTab: s,
|
|
317
|
-
tabKey: o,
|
|
318
|
-
isActive: n,
|
|
319
|
-
onClickTab: i,
|
|
320
|
-
disabled: b = !1,
|
|
321
|
-
title: t,
|
|
322
|
-
editable: v,
|
|
323
|
-
renderTitle: g,
|
|
324
|
-
deleteIcon: m,
|
|
325
|
-
deleteButton: w,
|
|
326
|
-
getIdPrefix: l,
|
|
327
|
-
index: c
|
|
328
|
-
}, x) => {
|
|
329
|
-
const h = fe(g) ? g : (a) => a, p = (a) => {
|
|
330
|
-
a.stopPropagation(), !b && s();
|
|
331
|
-
}, d = (a) => {
|
|
332
|
-
b || i(a);
|
|
333
|
-
};
|
|
334
|
-
return h(
|
|
335
|
-
/* @__PURE__ */ ee(
|
|
336
|
-
"div",
|
|
337
|
-
{
|
|
338
|
-
ref: x,
|
|
339
|
-
className: X(`${e}-header-title`, {
|
|
340
|
-
[`${e}-header-title-active`]: n,
|
|
341
|
-
[`${e}-header-title-editable`]: v,
|
|
342
|
-
[`${e}-header-title-disabled`]: b
|
|
343
|
-
}),
|
|
344
|
-
role: "tab",
|
|
345
|
-
"aria-selected": n,
|
|
346
|
-
tabIndex: b ? -1 : 0,
|
|
347
|
-
"aria-disabled": b || void 0,
|
|
348
|
-
id: l(c).tab,
|
|
349
|
-
"aria-controls": l(c).tabpane,
|
|
350
|
-
onClick: d,
|
|
351
|
-
onKeyDown: (a) => {
|
|
352
|
-
a.key === Tt.key && d(a);
|
|
353
|
-
},
|
|
354
|
-
children: [
|
|
355
|
-
/* @__PURE__ */ u("span", { className: `${e}-header-title-text`, children: t }),
|
|
356
|
-
v && /* @__PURE__ */ u(
|
|
357
|
-
"span",
|
|
358
|
-
{
|
|
359
|
-
role: "button",
|
|
360
|
-
"aria-label": "remove tab",
|
|
361
|
-
"aria-disabled": b || void 0,
|
|
362
|
-
tabIndex: b ? -1 : 0,
|
|
363
|
-
className: `${e}-close-icon`,
|
|
364
|
-
...Xe({ onPressEnter: p }),
|
|
365
|
-
onClick: p,
|
|
366
|
-
children: w || /* @__PURE__ */ u(me, { prefix: e, children: m || /* @__PURE__ */ u(yt, {}) })
|
|
367
|
-
}
|
|
368
|
-
)
|
|
369
|
-
]
|
|
370
|
-
},
|
|
371
|
-
o
|
|
372
|
-
),
|
|
373
|
-
{
|
|
374
|
-
key: o,
|
|
375
|
-
isActive: n,
|
|
376
|
-
disabled: b,
|
|
377
|
-
editable: v
|
|
378
|
-
}
|
|
379
|
-
);
|
|
380
|
-
}, It = te.forwardRef(Pt), Se = "vertical", ue = "right", he = "left", Le = {
|
|
381
|
-
delete: !0,
|
|
382
|
-
add: !0
|
|
383
|
-
}, zt = ({
|
|
384
|
-
direction: e,
|
|
385
|
-
align: s = he,
|
|
386
|
-
headerOffset: o
|
|
387
|
-
}) => {
|
|
388
|
-
let n = `translateX(${-o}px)`;
|
|
389
|
-
return s === ue && (n = `translateX(${o}px)`), e === Se && (n = `translateY(${-o}px)`), pt(n);
|
|
390
|
-
}, Ht = ({
|
|
391
|
-
direction: e,
|
|
392
|
-
align: s = he,
|
|
393
|
-
headerDom: o,
|
|
394
|
-
headerWrapperDom: n
|
|
395
|
-
}) => {
|
|
396
|
-
const i = Ce(o, n);
|
|
397
|
-
return e === Se ? -i.top : s === ue ? i.right : -i.left;
|
|
398
|
-
}, xe = te.forwardRef((e, s) => {
|
|
399
|
-
const o = ie(Ne), { rtl: n } = ie(Oe), i = { ...e, ...o }, [b, t, v] = oe(), [g, m, w] = oe(), [l, c, x] = oe(), [h, p, d] = oe(), [a, $, P] = oe(), I = V({}), [S, A] = we(0), [_, F] = we(!0), {
|
|
400
|
-
paneChildren: Y,
|
|
401
|
-
editable: z,
|
|
402
|
-
prefixCls: f,
|
|
403
|
-
onAddTab: O,
|
|
404
|
-
direction: C,
|
|
405
|
-
type: H = "line",
|
|
406
|
-
overflow: R = "scroll",
|
|
407
|
-
activeTab: ne,
|
|
408
|
-
showAddButton: Ve,
|
|
409
|
-
size: _e = "default",
|
|
410
|
-
style: Fe,
|
|
411
|
-
tabPosition: Ge,
|
|
412
|
-
className: Ke,
|
|
413
|
-
extra: Pe,
|
|
414
|
-
animation: qe,
|
|
415
|
-
icons: N,
|
|
416
|
-
deleteButton: Je,
|
|
417
|
-
addButton: Qe,
|
|
418
|
-
renderTabTitle: Ze,
|
|
419
|
-
scrollAfterEdit: Ie,
|
|
420
|
-
scrollPosition: M = "auto",
|
|
421
|
-
inkBarSize: et
|
|
422
|
-
} = i, ze = ke(Ie) ? { ...Le, ...Ie } : Le, [tt, nt] = n ? [ue, he] : [he, ue], G = H === "capsule" ? nt : tt, j = ae(() => {
|
|
423
|
-
const r = c.height - p.height - $.height, y = c.width - p.width - $.width;
|
|
424
|
-
return i.direction === "vertical" ? r < m.height : y < m.width;
|
|
425
|
-
}, [
|
|
426
|
-
i.direction,
|
|
427
|
-
c,
|
|
428
|
-
p,
|
|
429
|
-
m,
|
|
430
|
-
$
|
|
431
|
-
]), rt = () => {
|
|
432
|
-
if (l.current) {
|
|
433
|
-
const r = l.current;
|
|
434
|
-
x({
|
|
435
|
-
height: r.offsetHeight,
|
|
436
|
-
width: r.offsetWidth
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
}, ce = (r) => ht((y) => {
|
|
440
|
-
rt();
|
|
441
|
-
const T = y[0] && y[0].target;
|
|
442
|
-
T && r({
|
|
443
|
-
height: T.offsetHeight,
|
|
444
|
-
width: T.offsetWidth,
|
|
445
|
-
domRect: T.getBoundingClientRect()
|
|
446
|
-
});
|
|
447
|
-
}, 200), K = ce(v), q = ce(w), J = ce(d), Q = ce(P), pe = at(
|
|
448
|
-
(r) => {
|
|
449
|
-
const y = C === Se ? m.height - t.height : m.width - t.width;
|
|
450
|
-
let T = r;
|
|
451
|
-
return T = Math.min(y, T), T = Math.max(T, 0), T;
|
|
452
|
-
},
|
|
453
|
-
[C, m, t]
|
|
454
|
-
), be = (r) => {
|
|
455
|
-
const y = pe(r);
|
|
456
|
-
y !== S && A(y);
|
|
457
|
-
};
|
|
458
|
-
L(() => () => {
|
|
459
|
-
var r, y, T, k;
|
|
460
|
-
(r = q == null ? void 0 : q.cancel) == null || r.call(q), (y = K == null ? void 0 : K.cancel) == null || y.call(K), (T = J == null ? void 0 : J.cancel) == null || T.call(J), (k = Q == null ? void 0 : Q.cancel) == null || k.call(Q);
|
|
461
|
-
}, []), L(() => {
|
|
462
|
-
if (!_) {
|
|
463
|
-
F(!0);
|
|
464
|
-
return;
|
|
465
|
-
}
|
|
466
|
-
const r = () => {
|
|
467
|
-
const T = I.current[ne];
|
|
468
|
-
if (!T || !j)
|
|
469
|
-
return 0;
|
|
470
|
-
const k = Ce(T, b.current), E = Ht({
|
|
471
|
-
direction: C,
|
|
472
|
-
align: G,
|
|
473
|
-
headerDom: g.current,
|
|
474
|
-
headerWrapperDom: b.current
|
|
475
|
-
});
|
|
476
|
-
if (C === "vertical") {
|
|
477
|
-
let B = E, D = M;
|
|
478
|
-
const W = E + k.top, U = E + k.bottom;
|
|
479
|
-
return D === "auto" && (D = k.top < 0 ? "start" : k.bottom > 0 ? "end" : M), D === "start" ? B = W : D === "end" ? B = U : D === "center" ? B = W - (k.top - k.bottom) / 2 : Te(D) && (B = Math.max(W - D, U)), B;
|
|
480
|
-
}
|
|
481
|
-
if (G === "right") {
|
|
482
|
-
const B = E - k.left, D = E - k.right;
|
|
483
|
-
let W = M, U = E;
|
|
484
|
-
return M === "auto" && (W = k.left < 0 ? "start" : k.right > 0 ? "end" : M), W === "start" ? U = B : W === "end" ? U = D : W === "center" ? U = B + (k.left - k.right) / 2 : Te(W) && (U = Math.min(B + W, D)), U;
|
|
485
|
-
}
|
|
486
|
-
let re = E, Z = M;
|
|
487
|
-
const $e = E + k.left, De = E + k.right;
|
|
488
|
-
return M === "auto" && (Z = k.left < 0 ? "start" : k.right > 0 ? "end" : M), Z === "start" ? re = $e : Z === "end" ? re = De : Z === "center" ? re = $e - (k.left - k.right) / 2 : Te(Z) && (re = Math.max($e - Z, De)), re;
|
|
489
|
-
};
|
|
490
|
-
mt(b.current, C);
|
|
491
|
-
let y = r();
|
|
492
|
-
y = pe(y), A(y);
|
|
493
|
-
}, [
|
|
494
|
-
ne,
|
|
495
|
-
C,
|
|
496
|
-
R,
|
|
497
|
-
j,
|
|
498
|
-
H,
|
|
499
|
-
pe,
|
|
500
|
-
M
|
|
501
|
-
]);
|
|
502
|
-
const ot = zt({
|
|
503
|
-
direction: C,
|
|
504
|
-
align: G,
|
|
505
|
-
headerOffset: S
|
|
506
|
-
}), ge = j && R === "dropdown" && C !== "vertical", ve = j && !ge, se = z && (H === "card" || H === "card-gutter" || H === "line"), it = (r) => {
|
|
507
|
-
var y;
|
|
508
|
-
(y = i.onDeleteTab) == null || y.call(i, r.key), F(ze.delete);
|
|
509
|
-
}, He = () => {
|
|
510
|
-
O == null || O(), F(ze.add);
|
|
511
|
-
};
|
|
512
|
-
L(() => {
|
|
513
|
-
const r = de([a.current], Q);
|
|
514
|
-
return () => {
|
|
515
|
-
r();
|
|
516
|
-
};
|
|
517
|
-
}, [a.current]), L(() => {
|
|
518
|
-
const r = de([b.current], K);
|
|
519
|
-
return () => {
|
|
520
|
-
r();
|
|
521
|
-
};
|
|
522
|
-
}, [b.current]), L(() => {
|
|
523
|
-
const r = de([g.current], q);
|
|
524
|
-
return () => {
|
|
525
|
-
r();
|
|
526
|
-
};
|
|
527
|
-
}, [g.current]), L(() => {
|
|
528
|
-
const r = de([h.current], J);
|
|
529
|
-
return () => {
|
|
530
|
-
r();
|
|
531
|
-
};
|
|
532
|
-
}, [h.current]);
|
|
533
|
-
const Re = (r) => r && Ve && /* @__PURE__ */ u(
|
|
534
|
-
"div",
|
|
535
|
-
{
|
|
536
|
-
className: `${f}-add-icon`,
|
|
537
|
-
"aria-label": "add tab",
|
|
538
|
-
tabIndex: 0,
|
|
539
|
-
role: "button",
|
|
540
|
-
ref: a,
|
|
541
|
-
onClick: He,
|
|
542
|
-
...Xe({ onPressEnter: He }),
|
|
543
|
-
children: Qe || /* @__PURE__ */ u(me, { prefix: `${f}-add`, children: /* @__PURE__ */ u("span", { className: `${f}-add`, children: (N == null ? void 0 : N.add) || /* @__PURE__ */ u(ut, {}) }) })
|
|
544
|
-
}
|
|
545
|
-
);
|
|
546
|
-
return xt({
|
|
547
|
-
headerWrapperRef: b,
|
|
548
|
-
headerOffset: S,
|
|
549
|
-
align: G,
|
|
550
|
-
direction: C,
|
|
551
|
-
isScrollable: j,
|
|
552
|
-
onScroll(r) {
|
|
553
|
-
be(r);
|
|
554
|
-
}
|
|
555
|
-
}), /* @__PURE__ */ u(
|
|
556
|
-
"div",
|
|
557
|
-
{
|
|
558
|
-
className: X(
|
|
559
|
-
`${f}-header-nav`,
|
|
560
|
-
`${f}-header-nav-${C}`,
|
|
561
|
-
`${f}-header-nav-${Ge}`,
|
|
562
|
-
`${f}-header-size-${_e}`,
|
|
563
|
-
`${f}-header-nav-${H}`,
|
|
564
|
-
{ [`${f}-header-nav-sticky`]: i.headerSticky },
|
|
565
|
-
// 潘启宝添加
|
|
566
|
-
Ke
|
|
567
|
-
),
|
|
568
|
-
style: { ...Fe, ...i.headerSticky },
|
|
569
|
-
ref: s,
|
|
570
|
-
children: /* @__PURE__ */ ee(
|
|
571
|
-
"div",
|
|
572
|
-
{
|
|
573
|
-
className: X(`${f}-header-scroll`, {
|
|
574
|
-
[`${f}-header-overflow-scroll`]: ve,
|
|
575
|
-
[`${f}-header-overflow-dropdown`]: ge
|
|
576
|
-
}),
|
|
577
|
-
ref: l,
|
|
578
|
-
children: [
|
|
579
|
-
ve && /* @__PURE__ */ u(
|
|
580
|
-
Be,
|
|
581
|
-
{
|
|
582
|
-
iconPos: "prev",
|
|
583
|
-
rtl: n,
|
|
584
|
-
icon: N == null ? void 0 : N.prev,
|
|
585
|
-
prefixCls: f,
|
|
586
|
-
currentOffset: S,
|
|
587
|
-
headerSize: m,
|
|
588
|
-
headerWrapperSize: t,
|
|
589
|
-
direction: C,
|
|
590
|
-
align: G,
|
|
591
|
-
onChange: be
|
|
592
|
-
}
|
|
593
|
-
),
|
|
594
|
-
/* @__PURE__ */ ee("div", { className: `${f}-header-wrapper`, ref: b, children: [
|
|
595
|
-
/* @__PURE__ */ ee(
|
|
596
|
-
"div",
|
|
597
|
-
{
|
|
598
|
-
className: X(`${f}-header`, {
|
|
599
|
-
[`${f}-header-no-padding`]: !e.headerPadding && C === "horizontal" && ["line", "text"].indexOf(H) > -1
|
|
600
|
-
}),
|
|
601
|
-
ref: g,
|
|
602
|
-
style: ot,
|
|
603
|
-
children: [
|
|
604
|
-
Y.map((r, y) => /* @__PURE__ */ u(
|
|
605
|
-
It,
|
|
606
|
-
{
|
|
607
|
-
ref: (T) => {
|
|
608
|
-
I.current[r.key] = T;
|
|
609
|
-
},
|
|
610
|
-
tabKey: r.key,
|
|
611
|
-
...r.props,
|
|
612
|
-
prefixCls: f,
|
|
613
|
-
onDeleteTab: () => it(r),
|
|
614
|
-
renderTitle: e.children || Ze,
|
|
615
|
-
onClickTab: () => {
|
|
616
|
-
var T;
|
|
617
|
-
(T = i.onClickTab) == null || T.call(i, r.key);
|
|
618
|
-
},
|
|
619
|
-
isActive: ne === r.key,
|
|
620
|
-
editable: se && r.props.closable !== !1,
|
|
621
|
-
deleteIcon: N == null ? void 0 : N.delete,
|
|
622
|
-
deleteButton: Je,
|
|
623
|
-
getIdPrefix: o.getIdPrefix,
|
|
624
|
-
index: y
|
|
625
|
-
},
|
|
626
|
-
y
|
|
627
|
-
)),
|
|
628
|
-
H === "line" && /* @__PURE__ */ u(
|
|
629
|
-
Ct,
|
|
630
|
-
{
|
|
631
|
-
disabled: !!Y.find(
|
|
632
|
-
(r) => r && r.props && r.props.disabled && r.key === ne
|
|
633
|
-
),
|
|
634
|
-
prefixCls: f,
|
|
635
|
-
animation: qe,
|
|
636
|
-
direction: C,
|
|
637
|
-
getTitleRef: (r) => I.current[r],
|
|
638
|
-
activeTab: ne,
|
|
639
|
-
getHeaderRef: () => g,
|
|
640
|
-
inkBarSize: et
|
|
641
|
-
}
|
|
642
|
-
)
|
|
643
|
-
]
|
|
644
|
-
}
|
|
645
|
-
),
|
|
646
|
-
!j && Re(se)
|
|
647
|
-
] }),
|
|
648
|
-
ve && /* @__PURE__ */ u(
|
|
649
|
-
Be,
|
|
650
|
-
{
|
|
651
|
-
prefixCls: f,
|
|
652
|
-
rtl: n,
|
|
653
|
-
iconPos: "next",
|
|
654
|
-
icon: N == null ? void 0 : N.next,
|
|
655
|
-
currentOffset: S,
|
|
656
|
-
headerSize: m,
|
|
657
|
-
headerWrapperSize: t,
|
|
658
|
-
direction: C,
|
|
659
|
-
align: G,
|
|
660
|
-
onChange: be
|
|
661
|
-
}
|
|
662
|
-
),
|
|
663
|
-
ge && /* @__PURE__ */ u(
|
|
664
|
-
kt,
|
|
665
|
-
{
|
|
666
|
-
onClickTab: i.onClickTab,
|
|
667
|
-
paneChildren: Y,
|
|
668
|
-
prefixCls: f,
|
|
669
|
-
currentOffset: S,
|
|
670
|
-
headerSize: m,
|
|
671
|
-
icon: N == null ? void 0 : N.dropdown,
|
|
672
|
-
headerWrapperSize: t,
|
|
673
|
-
getTitleRef: (r) => I.current[r],
|
|
674
|
-
direction: C
|
|
675
|
-
}
|
|
676
|
-
),
|
|
677
|
-
(se && j || Pe) && /* @__PURE__ */ ee("div", { className: `${f}-header-extra`, ref: h, children: [
|
|
678
|
-
j && Re(se),
|
|
679
|
-
Pe
|
|
680
|
-
] })
|
|
681
|
-
]
|
|
682
|
-
}
|
|
683
|
-
)
|
|
684
|
-
}
|
|
685
|
-
);
|
|
686
|
-
});
|
|
687
|
-
xe.displayName = "TabHeader";
|
|
688
|
-
const Rt = ["mini", "small", "default", "large"], Dt = (e) => {
|
|
689
|
-
const { children: s } = e, o = [];
|
|
690
|
-
return te.Children.forEach(s, (n) => {
|
|
691
|
-
n && n.type && n.type.isTabPane && o.push(n);
|
|
692
|
-
}), o;
|
|
693
|
-
}, Wt = (e) => {
|
|
694
|
-
const { direction: s, tabPosition: o, animation: n } = e;
|
|
695
|
-
return s === "vertical" || o === "left" || o === "right" ? !1 : ke(n) ? "tabPane" in n ? n.tabPane : !1 : n;
|
|
696
|
-
}, At = {
|
|
697
|
-
tabPosition: "top",
|
|
698
|
-
type: "line",
|
|
699
|
-
overflow: "scroll",
|
|
700
|
-
showAddButton: !0,
|
|
701
|
-
lazyload: !0,
|
|
702
|
-
headerPadding: !0,
|
|
703
|
-
scrollPosition: "auto"
|
|
704
|
-
}, Ne = te.createContext({});
|
|
705
|
-
function Mt(e, s) {
|
|
706
|
-
const {
|
|
707
|
-
getPrefixCls: o,
|
|
708
|
-
size: n,
|
|
709
|
-
componentConfig: i,
|
|
710
|
-
rtl: b
|
|
711
|
-
} = ie(Oe), t = lt(
|
|
712
|
-
e,
|
|
713
|
-
At,
|
|
714
|
-
i == null ? void 0 : i.Tabs
|
|
715
|
-
), v = Dt(t), g = V(null), [m, w] = dt(
|
|
716
|
-
v[0] && v[0].key,
|
|
717
|
-
{
|
|
718
|
-
defaultValue: "defaultActiveTab" in t ? t.defaultActiveTab : void 0,
|
|
719
|
-
value: "activeTab" in t ? t.activeTab : void 0
|
|
720
|
-
}
|
|
721
|
-
), l = o == null ? void 0 : o("tabs"), c = t.size || (Rt.indexOf(n) > -1 ? n : "default"), {
|
|
722
|
-
animation: x,
|
|
723
|
-
className: h,
|
|
724
|
-
direction: p,
|
|
725
|
-
style: d,
|
|
726
|
-
type: a,
|
|
727
|
-
justify: $,
|
|
728
|
-
destroyOnHide: P,
|
|
729
|
-
lazyload: I,
|
|
730
|
-
headerSticky: S,
|
|
731
|
-
// 潘启宝添加
|
|
732
|
-
onChange: A,
|
|
733
|
-
onClickTab: _,
|
|
734
|
-
onDeleteTab: F,
|
|
735
|
-
renderTabHeader: Y,
|
|
736
|
-
...z
|
|
737
|
-
} = t, f = st(`${l}-`), O = p === "vertical" ? "left" : t.tabPosition, C = {
|
|
738
|
-
animation: ke(x) && "inkBar" in x ? x.inkBar : !0,
|
|
739
|
-
activeTab: m,
|
|
740
|
-
tabPosition: O,
|
|
741
|
-
direction: ["left", "right"].indexOf(O) > -1 ? "vertical" : "horizontal",
|
|
742
|
-
paneChildren: v,
|
|
743
|
-
onClickTab: (R) => {
|
|
744
|
-
fe(_) && _(R), R !== m && ("activeTab" in t || w(R), fe(A) && A(R));
|
|
745
|
-
},
|
|
746
|
-
onDeleteTab: F,
|
|
747
|
-
prefixCls: l
|
|
748
|
-
};
|
|
749
|
-
ct(s, () => g, []);
|
|
750
|
-
const H = /* @__PURE__ */ u(
|
|
751
|
-
wt,
|
|
752
|
-
{
|
|
753
|
-
direction: ["left", "right"].indexOf(O) > -1 ? "vertical" : "horizontal",
|
|
754
|
-
animation: Wt(t),
|
|
755
|
-
activeTab: m,
|
|
756
|
-
paneChildren: v,
|
|
757
|
-
prefixCls: l,
|
|
758
|
-
destroyOnHide: P,
|
|
759
|
-
lazyload: I
|
|
760
|
-
}
|
|
761
|
-
);
|
|
762
|
-
return /* @__PURE__ */ u(
|
|
763
|
-
"div",
|
|
764
|
-
{
|
|
765
|
-
...ye(z, [
|
|
766
|
-
"headerPadding",
|
|
767
|
-
"tabPosition",
|
|
768
|
-
"defaultActiveTab",
|
|
769
|
-
"showAddButton",
|
|
770
|
-
"extra",
|
|
771
|
-
"onAddTab",
|
|
772
|
-
"activeTab",
|
|
773
|
-
"overflow",
|
|
774
|
-
"editable",
|
|
775
|
-
"renderTabTitle",
|
|
776
|
-
"addButton",
|
|
777
|
-
"deleteButton",
|
|
778
|
-
"icons",
|
|
779
|
-
"children",
|
|
780
|
-
"size",
|
|
781
|
-
"type",
|
|
782
|
-
"scrollPosition",
|
|
783
|
-
"offsetAlign"
|
|
784
|
-
]),
|
|
785
|
-
style: d,
|
|
786
|
-
className: X(
|
|
787
|
-
l,
|
|
788
|
-
`${l}-${["left", "right"].indexOf(O) > -1 ? "vertical" : "horizontal"}`,
|
|
789
|
-
`${l}-${a}`,
|
|
790
|
-
!!S && `${l}-sticky`,
|
|
791
|
-
// 潘启宝添加
|
|
792
|
-
`${l}-${O}`,
|
|
793
|
-
`${l}-size-${c}`,
|
|
794
|
-
{
|
|
795
|
-
[`${l}-justify`]: $,
|
|
796
|
-
[`${l}-rtl`]: b
|
|
797
|
-
},
|
|
798
|
-
h
|
|
799
|
-
),
|
|
800
|
-
ref: g,
|
|
801
|
-
children: /* @__PURE__ */ ee(
|
|
802
|
-
Ne.Provider,
|
|
803
|
-
{
|
|
804
|
-
value: {
|
|
805
|
-
...C,
|
|
806
|
-
getIdPrefix: (R) => ({
|
|
807
|
-
tab: f && `${f}-tab-${R}`,
|
|
808
|
-
tabpane: f && `${f}-panel-${R}`
|
|
809
|
-
})
|
|
810
|
-
},
|
|
811
|
-
children: [
|
|
812
|
-
O === "bottom" && H,
|
|
813
|
-
fe(Y) ? Y(
|
|
814
|
-
{
|
|
815
|
-
...ye(t, ["children", "style", "className"]),
|
|
816
|
-
size: c,
|
|
817
|
-
...C
|
|
818
|
-
},
|
|
819
|
-
xe
|
|
820
|
-
) : /* @__PURE__ */ u(
|
|
821
|
-
xe,
|
|
822
|
-
{
|
|
823
|
-
...ye(t, ["children", "style", "className"]),
|
|
824
|
-
size: c
|
|
825
|
-
}
|
|
826
|
-
),
|
|
827
|
-
O !== "bottom" && H
|
|
828
|
-
]
|
|
829
|
-
}
|
|
830
|
-
)
|
|
831
|
-
}
|
|
832
|
-
);
|
|
833
|
-
}
|
|
834
|
-
const Et = te.forwardRef(
|
|
835
|
-
Mt
|
|
836
|
-
), Ue = Et;
|
|
837
|
-
Ue.displayName = "Tabs";
|
|
838
|
-
Ue.TabPane = ft;
|
|
839
|
-
export {
|
|
840
|
-
Ue as T,
|
|
841
|
-
Ne as a,
|
|
842
|
-
wt as b
|
|
843
|
-
};
|