@oceanbase/design 0.1.0
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/README.md +22 -0
- package/dist/design.min.css +1 -0
- package/dist/design.min.js +1 -0
- package/dist/static/iconfont.22caa259.woff +0 -0
- package/dist/static/iconfont.bf41d69a.woff2 +0 -0
- package/dist/static/iconfont.d8ca098f.ttf +0 -0
- package/es/Action/Group.d.ts +14 -0
- package/es/Action/Group.js +112 -0
- package/es/Action/Item.d.ts +31 -0
- package/es/Action/Item.js +136 -0
- package/es/Action/index.d.ts +8 -0
- package/es/Action/index.js +7 -0
- package/es/Alert/index.d.ts +12 -0
- package/es/Alert/index.js +36 -0
- package/es/Alert/style/index.d.ts +9 -0
- package/es/Alert/style/index.js +73 -0
- package/es/BackgroundTaskManager/RefreshMan.d.ts +11 -0
- package/es/BackgroundTaskManager/RefreshMan.js +66 -0
- package/es/BackgroundTaskManager/constants.d.ts +6 -0
- package/es/BackgroundTaskManager/constants.js +10 -0
- package/es/BackgroundTaskManager/index.d.ts +49 -0
- package/es/BackgroundTaskManager/index.js +154 -0
- package/es/BasicLayout/Header.d.ts +45 -0
- package/es/BasicLayout/Header.js +229 -0
- package/es/BasicLayout/Header.less +134 -0
- package/es/BasicLayout/index.d.ts +45 -0
- package/es/BasicLayout/index.js +312 -0
- package/es/BasicLayout/index.less +400 -0
- package/es/BasicLayout/locale/en-US.d.ts +12 -0
- package/es/BasicLayout/locale/en-US.js +11 -0
- package/es/BasicLayout/locale/zh-CN.d.ts +12 -0
- package/es/BasicLayout/locale/zh-CN.js +11 -0
- package/es/BasicLayout/locale/zh-TW.d.ts +12 -0
- package/es/BasicLayout/locale/zh-TW.js +11 -0
- package/es/BatchOperationBar/index.d.ts +33 -0
- package/es/BatchOperationBar/index.js +126 -0
- package/es/BatchOperationBar/index.less +46 -0
- package/es/BatchOperationBar/index.less.d.ts +15 -0
- package/es/BatchOperationBar/locale/en-US.d.ts +7 -0
- package/es/BatchOperationBar/locale/en-US.js +6 -0
- package/es/BatchOperationBar/locale/zh-CN.d.ts +7 -0
- package/es/BatchOperationBar/locale/zh-CN.js +6 -0
- package/es/BatchOperationBar/locale/zh-TW.d.ts +7 -0
- package/es/BatchOperationBar/locale/zh-TW.js +6 -0
- package/es/Boundary/Components/Code.d.ts +14 -0
- package/es/Boundary/Components/Code.js +32 -0
- package/es/Boundary/Components/Exception.d.ts +17 -0
- package/es/Boundary/Components/Exception.js +129 -0
- package/es/Boundary/Components/Function.d.ts +9 -0
- package/es/Boundary/Components/Function.js +21 -0
- package/es/Boundary/Components/index.d.ts +3 -0
- package/es/Boundary/Components/index.js +3 -0
- package/es/Boundary/IBoundary.d.ts +10 -0
- package/es/Boundary/IBoundary.js +1 -0
- package/es/Boundary/constant.d.ts +26 -0
- package/es/Boundary/constant.js +41 -0
- package/es/Boundary/index.d.ts +8 -0
- package/es/Boundary/index.js +7 -0
- package/es/Boundary/index.less +44 -0
- package/es/Boundary/locale/en-US.d.ts +11 -0
- package/es/Boundary/locale/en-US.js +10 -0
- package/es/Boundary/locale/zh-CN.d.ts +11 -0
- package/es/Boundary/locale/zh-CN.js +10 -0
- package/es/Boundary/locale/zh-TW.d.ts +11 -0
- package/es/Boundary/locale/zh-TW.js +10 -0
- package/es/Boundary/utils.d.ts +1 -0
- package/es/Boundary/utils.js +18 -0
- package/es/Button/index.d.ts +10 -0
- package/es/Button/index.js +30 -0
- package/es/Button/style/index.d.ts +9 -0
- package/es/Button/style/index.js +24 -0
- package/es/Card/index.d.ts +16 -0
- package/es/Card/index.js +89 -0
- package/es/Card/style/index.d.ts +12 -0
- package/es/Card/style/index.js +41 -0
- package/es/ConfigProvider/index.d.ts +14 -0
- package/es/ConfigProvider/index.js +23 -0
- package/es/ContentWithQuestion/index.d.ts +13 -0
- package/es/ContentWithQuestion/index.js +46 -0
- package/es/ContentWithQuestion/index.less +18 -0
- package/es/Descriptions/Item.d.ts +8 -0
- package/es/Descriptions/Item.js +2 -0
- package/es/Descriptions/index.d.ts +9 -0
- package/es/Descriptions/index.js +81 -0
- package/es/Descriptions/style/index.d.ts +12 -0
- package/es/Descriptions/style/index.js +28 -0
- package/es/Dialog/Anchor.d.ts +19 -0
- package/es/Dialog/Anchor.js +104 -0
- package/es/Dialog/Dock.d.ts +6 -0
- package/es/Dialog/Dock.js +84 -0
- package/es/Dialog/EventProxy.d.ts +3 -0
- package/es/Dialog/EventProxy.js +50 -0
- package/es/Dialog/index.d.ts +35 -0
- package/es/Dialog/index.js +614 -0
- package/es/Dialog/index.less +114 -0
- package/es/Dialog/locale/en-US.d.ts +5 -0
- package/es/Dialog/locale/en-US.js +4 -0
- package/es/Dialog/locale/zh-CN.d.ts +5 -0
- package/es/Dialog/locale/zh-CN.js +4 -0
- package/es/Dialog/locale/zh-TW.d.ts +5 -0
- package/es/Dialog/locale/zh-TW.js +4 -0
- package/es/DocDialog/index.d.ts +24 -0
- package/es/DocDialog/index.js +115 -0
- package/es/DocDialog/locale/en-US.d.ts +2 -0
- package/es/DocDialog/locale/en-US.js +1 -0
- package/es/DocDialog/locale/zh-CN.d.ts +2 -0
- package/es/DocDialog/locale/zh-CN.js +1 -0
- package/es/DocDialog/locale/zh-TW.d.ts +2 -0
- package/es/DocDialog/locale/zh-TW.js +1 -0
- package/es/Form/FormItem.d.ts +16 -0
- package/es/Form/FormItem.js +44 -0
- package/es/Form/index.d.ts +2 -0
- package/es/Form/index.js +4 -0
- package/es/FullscreenBox/index.d.ts +42 -0
- package/es/FullscreenBox/index.js +145 -0
- package/es/FullscreenBox/index.less +49 -0
- package/es/FullscreenBox/locale/en-US.d.ts +2 -0
- package/es/FullscreenBox/locale/en-US.js +1 -0
- package/es/FullscreenBox/locale/zh-CN.d.ts +2 -0
- package/es/FullscreenBox/locale/zh-CN.js +1 -0
- package/es/FullscreenBox/locale/zh-TW.d.ts +2 -0
- package/es/FullscreenBox/locale/zh-TW.js +1 -0
- package/es/GraphToolbar/index.d.ts +26 -0
- package/es/GraphToolbar/index.js +132 -0
- package/es/GraphToolbar/index.less +65 -0
- package/es/GraphToolbar/locale/en-US.d.ts +9 -0
- package/es/GraphToolbar/locale/en-US.js +8 -0
- package/es/GraphToolbar/locale/zh-CN.d.ts +9 -0
- package/es/GraphToolbar/locale/zh-CN.js +8 -0
- package/es/GraphToolbar/locale/zh-TW.d.ts +9 -0
- package/es/GraphToolbar/locale/zh-TW.js +8 -0
- package/es/Highlight/DiffView/DiffCells.d.ts +17 -0
- package/es/Highlight/DiffView/DiffCells.js +43 -0
- package/es/Highlight/DiffView/index.d.ts +44 -0
- package/es/Highlight/DiffView/index.js +317 -0
- package/es/Highlight/HighlightCell.d.ts +18 -0
- package/es/Highlight/HighlightCell.js +29 -0
- package/es/Highlight/JsonView.d.ts +8 -0
- package/es/Highlight/JsonView.js +44 -0
- package/es/Highlight/index.d.ts +103 -0
- package/es/Highlight/index.js +259 -0
- package/es/Highlight/index.less +381 -0
- package/es/Highlight/languages/bash.js +2 -0
- package/es/Highlight/languages/cpp.js +2 -0
- package/es/Highlight/languages/css.js +2 -0
- package/es/Highlight/languages/dockerfile.js +2 -0
- package/es/Highlight/languages/go.js +2 -0
- package/es/Highlight/languages/groovy.js +2 -0
- package/es/Highlight/languages/http.js +2 -0
- package/es/Highlight/languages/java.js +2 -0
- package/es/Highlight/languages/javascript.js +2 -0
- package/es/Highlight/languages/json.js +2 -0
- package/es/Highlight/languages/markdown.js +2 -0
- package/es/Highlight/languages/nginx.js +2 -0
- package/es/Highlight/languages/python.js +2 -0
- package/es/Highlight/languages/ruby.js +2 -0
- package/es/Highlight/languages/solidity.js +2 -0
- package/es/Highlight/languages/sql.js +2 -0
- package/es/Highlight/languages/typescript.js +2 -0
- package/es/Highlight/languages/xml.js +2 -0
- package/es/Highlight/languages/yaml.js +2 -0
- package/es/Highlight/locale/en-US.d.ts +2 -0
- package/es/Highlight/locale/en-US.js +1 -0
- package/es/Highlight/locale/zh-CN.d.ts +2 -0
- package/es/Highlight/locale/zh-CN.js +1 -0
- package/es/Highlight/locale/zh-TW.d.ts +2 -0
- package/es/Highlight/locale/zh-TW.js +1 -0
- package/es/Highlight/useKeyDownCopyEvent.d.ts +6 -0
- package/es/Highlight/useKeyDownCopyEvent.js +54 -0
- package/es/IconFont/font/iconfont.css +503 -0
- package/es/IconFont/font/iconfont.ttf +0 -0
- package/es/IconFont/font/iconfont.woff +0 -0
- package/es/IconFont/font/iconfont.woff2 +0 -0
- package/es/IconFont/index.d.ts +9 -0
- package/es/IconFont/index.js +26 -0
- package/es/LocaleDropdown/index.d.ts +9 -0
- package/es/LocaleDropdown/index.js +47 -0
- package/es/Login/ActivateForm.d.ts +19 -0
- package/es/Login/ActivateForm.js +98 -0
- package/es/Login/LoginForm.d.ts +20 -0
- package/es/Login/LoginForm.js +142 -0
- package/es/Login/RegisterForm.d.ts +23 -0
- package/es/Login/RegisterForm.js +155 -0
- package/es/Login/index.d.ts +66 -0
- package/es/Login/index.js +177 -0
- package/es/Login/index.less +325 -0
- package/es/Login/locale/en-US.d.ts +27 -0
- package/es/Login/locale/en-US.js +26 -0
- package/es/Login/locale/zh-CN.d.ts +28 -0
- package/es/Login/locale/zh-CN.js +27 -0
- package/es/Login/locale/zh-TW.d.ts +27 -0
- package/es/Login/locale/zh-TW.js +26 -0
- package/es/Lottie/index.d.ts +10 -0
- package/es/Lottie/index.js +37 -0
- package/es/Modal/index.d.ts +31 -0
- package/es/Modal/index.js +50 -0
- package/es/Modal/style/index.d.ts +9 -0
- package/es/Modal/style/index.js +21 -0
- package/es/NavMenu/index.d.ts +19 -0
- package/es/NavMenu/index.js +98 -0
- package/es/NavMenu/index.less +50 -0
- package/es/PageContainer/index.d.ts +17 -0
- package/es/PageContainer/index.js +55 -0
- package/es/PageContainer/index.less +72 -0
- package/es/PageContainer/locale/en-US.d.ts +4 -0
- package/es/PageContainer/locale/en-US.js +3 -0
- package/es/PageContainer/locale/zh-CN.d.ts +4 -0
- package/es/PageContainer/locale/zh-CN.js +3 -0
- package/es/PageContainer/locale/zh-TW.d.ts +4 -0
- package/es/PageContainer/locale/zh-TW.js +3 -0
- package/es/Password/Content.d.ts +14 -0
- package/es/Password/Content.js +92 -0
- package/es/Password/index.d.ts +25 -0
- package/es/Password/index.js +137 -0
- package/es/Password/locale/en-US.d.ts +13 -0
- package/es/Password/locale/en-US.js +12 -0
- package/es/Password/locale/zh-CN.d.ts +13 -0
- package/es/Password/locale/zh-CN.js +12 -0
- package/es/Password/locale/zh-TW.d.ts +13 -0
- package/es/Password/locale/zh-TW.js +12 -0
- package/es/Ranger/QuickPicker.d.ts +4 -0
- package/es/Ranger/QuickPicker.js +123 -0
- package/es/Ranger/Ranger.d.ts +11 -0
- package/es/Ranger/Ranger.js +140 -0
- package/es/Ranger/constant/index.d.ts +27 -0
- package/es/Ranger/constant/index.js +187 -0
- package/es/Ranger/index.d.ts +33 -0
- package/es/Ranger/index.js +32 -0
- package/es/Ranger/index.less +55 -0
- package/es/Ranger/locale/en-US.d.ts +28 -0
- package/es/Ranger/locale/en-US.js +29 -0
- package/es/Ranger/locale/zh-CN.d.ts +4 -0
- package/es/Ranger/locale/zh-CN.js +3 -0
- package/es/Ranger/locale/zh-TW.d.ts +4 -0
- package/es/Ranger/locale/zh-TW.js +3 -0
- package/es/Ranger/typing.d.ts +12 -0
- package/es/Ranger/typing.js +1 -0
- package/es/SideTip/Dragger.d.ts +45 -0
- package/es/SideTip/Dragger.js +293 -0
- package/es/SideTip/IconLoading.d.ts +3 -0
- package/es/SideTip/IconLoading.js +38 -0
- package/es/SideTip/index.d.ts +156 -0
- package/es/SideTip/index.js +177 -0
- package/es/SideTip/index.less +177 -0
- package/es/SideTip/locale/en-US.d.ts +2 -0
- package/es/SideTip/locale/en-US.js +1 -0
- package/es/SideTip/locale/zh-CN.d.ts +2 -0
- package/es/SideTip/locale/zh-CN.js +1 -0
- package/es/SideTip/locale/zh-TW.d.ts +2 -0
- package/es/SideTip/locale/zh-TW.js +1 -0
- package/es/SideTip/utils.d.ts +8 -0
- package/es/SideTip/utils.js +80 -0
- package/es/StaticFunction/index.d.ts +10 -0
- package/es/StaticFunction/index.js +37 -0
- package/es/Table/index.d.ts +16 -0
- package/es/Table/index.js +149 -0
- package/es/Table/locale/en-US.d.ts +8 -0
- package/es/Table/locale/en-US.js +7 -0
- package/es/Table/locale/zh-CN.d.ts +8 -0
- package/es/Table/locale/zh-CN.js +7 -0
- package/es/Table/locale/zh-TW.d.ts +8 -0
- package/es/Table/locale/zh-TW.js +7 -0
- package/es/Table/style/index.d.ts +9 -0
- package/es/Table/style/index.js +114 -0
- package/es/Tabs/TabPane.d.ts +7 -0
- package/es/Tabs/TabPane.js +2 -0
- package/es/Tabs/hooks/useInkBar.d.ts +12 -0
- package/es/Tabs/hooks/useInkBar.js +41 -0
- package/es/Tabs/hooks/useLegacyItems.d.ts +4 -0
- package/es/Tabs/hooks/useLegacyItems.js +50 -0
- package/es/Tabs/index.d.ts +17 -0
- package/es/Tabs/index.js +95 -0
- package/es/Tabs/style/index.d.ts +9 -0
- package/es/Tabs/style/index.js +35 -0
- package/es/TaskGraph/Graph.d.ts +24 -0
- package/es/TaskGraph/Graph.js +260 -0
- package/es/TaskGraph/graph.less +23 -0
- package/es/TaskGraph/index.d.ts +16 -0
- package/es/TaskGraph/index.js +165 -0
- package/es/TaskGraph/index.less +117 -0
- package/es/TaskGraph/locale/en-US.d.ts +13 -0
- package/es/TaskGraph/locale/en-US.js +12 -0
- package/es/TaskGraph/locale/zh-CN.d.ts +13 -0
- package/es/TaskGraph/locale/zh-CN.js +12 -0
- package/es/TaskGraph/locale/zh-TW.d.ts +13 -0
- package/es/TaskGraph/locale/zh-TW.js +12 -0
- package/es/TaskGraph/register.d.ts +7 -0
- package/es/TaskGraph/register.js +200 -0
- package/es/Tooltip/MouseTooltip.d.ts +9 -0
- package/es/Tooltip/MouseTooltip.js +98 -0
- package/es/Tooltip/index.d.ts +18 -0
- package/es/Tooltip/index.js +66 -0
- package/es/TreeSearch/index.d.ts +38 -0
- package/es/TreeSearch/index.js +168 -0
- package/es/TreeSearch/util.d.ts +21 -0
- package/es/TreeSearch/util.js +111 -0
- package/es/Welcome/index.d.ts +38 -0
- package/es/Welcome/index.js +140 -0
- package/es/Welcome/index.less +186 -0
- package/es/Welcome/locale/en-US.d.ts +5 -0
- package/es/Welcome/locale/en-US.js +4 -0
- package/es/Welcome/locale/zh-CN.d.ts +5 -0
- package/es/Welcome/locale/zh-CN.js +4 -0
- package/es/Welcome/locale/zh-TW.d.ts +5 -0
- package/es/Welcome/locale/zh-TW.js +4 -0
- package/es/Welcome/step.d.ts +18 -0
- package/es/Welcome/step.js +42 -0
- package/es/_util/genComponentStyleHook.d.ts +18 -0
- package/es/_util/genComponentStyleHook.js +27 -0
- package/es/_util/index.d.ts +18 -0
- package/es/_util/index.js +54 -0
- package/es/_util/itemRender.d.ts +2 -0
- package/es/_util/itemRender.js +12 -0
- package/es/assets/background_img.svg +30 -0
- package/es/assets/graph_fit_view_icon.svg +14 -0
- package/es/assets/graph_reset_icon.svg +14 -0
- package/es/assets/logo/oceanbase_logo.svg +29 -0
- package/es/assets/logo/oceanbase_watermark.svg +31 -0
- package/es/assets/monitor.svg +21 -0
- package/es/assets/user.svg +16 -0
- package/es/constant/index.d.ts +7 -0
- package/es/constant/index.js +18 -0
- package/es/index.d.ts +52 -0
- package/es/index.js +53 -0
- package/es/index.less +14 -0
- package/es/interface.d.ts +1 -0
- package/es/interface.js +1 -0
- package/es/locale/LocaleWrapper.d.ts +10 -0
- package/es/locale/LocaleWrapper.js +69 -0
- package/es/locale/en-US.d.ts +3 -0
- package/es/locale/en-US.js +41 -0
- package/es/locale/index.d.ts +4 -0
- package/es/locale/index.js +1 -0
- package/es/locale/zh-CN.d.ts +3 -0
- package/es/locale/zh-CN.js +43 -0
- package/es/locale/zh-TW.d.ts +3 -0
- package/es/locale/zh-TW.js +37 -0
- package/es/theme/index.d.ts +182 -0
- package/es/theme/index.js +107 -0
- package/es/theme/index.less +3 -0
- package/es/theme/style/compact.less +526 -0
- package/es/theme/style/dark.less +526 -0
- package/es/theme/style/default.less +526 -0
- package/es/variable.less +54 -0
- package/lib/Action/Group.d.ts +14 -0
- package/lib/Action/Group.js +126 -0
- package/lib/Action/Item.d.ts +31 -0
- package/lib/Action/Item.js +126 -0
- package/lib/Action/index.d.ts +8 -0
- package/lib/Action/index.js +39 -0
- package/lib/Alert/index.d.ts +12 -0
- package/lib/Alert/index.js +65 -0
- package/lib/Alert/style/index.d.ts +9 -0
- package/lib/Alert/style/index.js +120 -0
- package/lib/BackgroundTaskManager/RefreshMan.d.ts +11 -0
- package/lib/BackgroundTaskManager/RefreshMan.js +86 -0
- package/lib/BackgroundTaskManager/constants.d.ts +6 -0
- package/lib/BackgroundTaskManager/constants.js +38 -0
- package/lib/BackgroundTaskManager/index.d.ts +49 -0
- package/lib/BackgroundTaskManager/index.js +171 -0
- package/lib/BasicLayout/Header.d.ts +45 -0
- package/lib/BasicLayout/Header.js +180 -0
- package/lib/BasicLayout/Header.less +134 -0
- package/lib/BasicLayout/index.d.ts +45 -0
- package/lib/BasicLayout/index.js +348 -0
- package/lib/BasicLayout/index.less +400 -0
- package/lib/BasicLayout/locale/en-US.d.ts +12 -0
- package/lib/BasicLayout/locale/en-US.js +37 -0
- package/lib/BasicLayout/locale/zh-CN.d.ts +12 -0
- package/lib/BasicLayout/locale/zh-CN.js +37 -0
- package/lib/BasicLayout/locale/zh-TW.d.ts +12 -0
- package/lib/BasicLayout/locale/zh-TW.js +37 -0
- package/lib/BatchOperationBar/index.d.ts +33 -0
- package/lib/BatchOperationBar/index.js +167 -0
- package/lib/BatchOperationBar/index.less +46 -0
- package/lib/BatchOperationBar/index.less.d.ts +15 -0
- package/lib/BatchOperationBar/locale/en-US.d.ts +7 -0
- package/lib/BatchOperationBar/locale/en-US.js +32 -0
- package/lib/BatchOperationBar/locale/zh-CN.d.ts +7 -0
- package/lib/BatchOperationBar/locale/zh-CN.js +32 -0
- package/lib/BatchOperationBar/locale/zh-TW.d.ts +7 -0
- package/lib/BatchOperationBar/locale/zh-TW.js +32 -0
- package/lib/Boundary/Components/Code.d.ts +14 -0
- package/lib/Boundary/Components/Code.js +55 -0
- package/lib/Boundary/Components/Exception.d.ts +17 -0
- package/lib/Boundary/Components/Exception.js +114 -0
- package/lib/Boundary/Components/Function.d.ts +9 -0
- package/lib/Boundary/Components/Function.js +47 -0
- package/lib/Boundary/Components/index.d.ts +3 -0
- package/lib/Boundary/Components/index.js +21 -0
- package/lib/Boundary/IBoundary.d.ts +10 -0
- package/lib/Boundary/IBoundary.js +17 -0
- package/lib/Boundary/constant.d.ts +26 -0
- package/lib/Boundary/constant.js +71 -0
- package/lib/Boundary/index.d.ts +8 -0
- package/lib/Boundary/index.js +29 -0
- package/lib/Boundary/index.less +44 -0
- package/lib/Boundary/locale/en-US.d.ts +11 -0
- package/lib/Boundary/locale/en-US.js +36 -0
- package/lib/Boundary/locale/zh-CN.d.ts +11 -0
- package/lib/Boundary/locale/zh-CN.js +36 -0
- package/lib/Boundary/locale/zh-TW.d.ts +11 -0
- package/lib/Boundary/locale/zh-TW.js +36 -0
- package/lib/Boundary/utils.d.ts +1 -0
- package/lib/Boundary/utils.js +46 -0
- package/lib/Button/index.d.ts +10 -0
- package/lib/Button/index.js +53 -0
- package/lib/Button/style/index.d.ts +9 -0
- package/lib/Button/style/index.js +52 -0
- package/lib/Card/index.d.ts +16 -0
- package/lib/Card/index.js +112 -0
- package/lib/Card/style/index.d.ts +12 -0
- package/lib/Card/style/index.js +80 -0
- package/lib/ConfigProvider/index.d.ts +14 -0
- package/lib/ConfigProvider/index.js +54 -0
- package/lib/ContentWithQuestion/index.d.ts +13 -0
- package/lib/ContentWithQuestion/index.js +78 -0
- package/lib/ContentWithQuestion/index.less +18 -0
- package/lib/Descriptions/Item.d.ts +8 -0
- package/lib/Descriptions/Item.js +28 -0
- package/lib/Descriptions/index.d.ts +9 -0
- package/lib/Descriptions/index.js +114 -0
- package/lib/Descriptions/style/index.d.ts +12 -0
- package/lib/Descriptions/style/index.js +60 -0
- package/lib/Dialog/Anchor.d.ts +19 -0
- package/lib/Dialog/Anchor.js +107 -0
- package/lib/Dialog/Dock.d.ts +6 -0
- package/lib/Dialog/Dock.js +112 -0
- package/lib/Dialog/EventProxy.d.ts +3 -0
- package/lib/Dialog/EventProxy.js +69 -0
- package/lib/Dialog/index.d.ts +35 -0
- package/lib/Dialog/index.js +560 -0
- package/lib/Dialog/index.less +114 -0
- package/lib/Dialog/locale/en-US.d.ts +5 -0
- package/lib/Dialog/locale/en-US.js +30 -0
- package/lib/Dialog/locale/zh-CN.d.ts +5 -0
- package/lib/Dialog/locale/zh-CN.js +30 -0
- package/lib/Dialog/locale/zh-TW.d.ts +5 -0
- package/lib/Dialog/locale/zh-TW.js +30 -0
- package/lib/DocDialog/index.d.ts +24 -0
- package/lib/DocDialog/index.js +137 -0
- package/lib/DocDialog/locale/en-US.d.ts +2 -0
- package/lib/DocDialog/locale/en-US.js +27 -0
- package/lib/DocDialog/locale/zh-CN.d.ts +2 -0
- package/lib/DocDialog/locale/zh-CN.js +27 -0
- package/lib/DocDialog/locale/zh-TW.d.ts +2 -0
- package/lib/DocDialog/locale/zh-TW.js +27 -0
- package/lib/Form/FormItem.d.ts +16 -0
- package/lib/Form/FormItem.js +59 -0
- package/lib/Form/index.d.ts +2 -0
- package/lib/Form/index.js +40 -0
- package/lib/FullscreenBox/index.d.ts +42 -0
- package/lib/FullscreenBox/index.js +128 -0
- package/lib/FullscreenBox/index.less +49 -0
- package/lib/FullscreenBox/locale/en-US.d.ts +2 -0
- package/lib/FullscreenBox/locale/en-US.js +27 -0
- package/lib/FullscreenBox/locale/zh-CN.d.ts +2 -0
- package/lib/FullscreenBox/locale/zh-CN.js +27 -0
- package/lib/FullscreenBox/locale/zh-TW.d.ts +2 -0
- package/lib/FullscreenBox/locale/zh-TW.js +27 -0
- package/lib/GraphToolbar/index.d.ts +26 -0
- package/lib/GraphToolbar/index.js +154 -0
- package/lib/GraphToolbar/index.less +65 -0
- package/lib/GraphToolbar/locale/en-US.d.ts +9 -0
- package/lib/GraphToolbar/locale/en-US.js +34 -0
- package/lib/GraphToolbar/locale/zh-CN.d.ts +9 -0
- package/lib/GraphToolbar/locale/zh-CN.js +34 -0
- package/lib/GraphToolbar/locale/zh-TW.d.ts +9 -0
- package/lib/GraphToolbar/locale/zh-TW.js +34 -0
- package/lib/Highlight/DiffView/DiffCells.d.ts +17 -0
- package/lib/Highlight/DiffView/DiffCells.js +72 -0
- package/lib/Highlight/DiffView/index.d.ts +44 -0
- package/lib/Highlight/DiffView/index.js +299 -0
- package/lib/Highlight/HighlightCell.d.ts +18 -0
- package/lib/Highlight/HighlightCell.js +60 -0
- package/lib/Highlight/JsonView.d.ts +8 -0
- package/lib/Highlight/JsonView.js +85 -0
- package/lib/Highlight/index.d.ts +103 -0
- package/lib/Highlight/index.js +265 -0
- package/lib/Highlight/index.less +381 -0
- package/lib/Highlight/languages/bash.js +38 -0
- package/lib/Highlight/languages/cpp.js +38 -0
- package/lib/Highlight/languages/css.js +38 -0
- package/lib/Highlight/languages/dockerfile.js +38 -0
- package/lib/Highlight/languages/go.js +38 -0
- package/lib/Highlight/languages/groovy.js +38 -0
- package/lib/Highlight/languages/http.js +38 -0
- package/lib/Highlight/languages/java.js +38 -0
- package/lib/Highlight/languages/javascript.js +38 -0
- package/lib/Highlight/languages/json.js +38 -0
- package/lib/Highlight/languages/markdown.js +38 -0
- package/lib/Highlight/languages/nginx.js +38 -0
- package/lib/Highlight/languages/python.js +38 -0
- package/lib/Highlight/languages/ruby.js +38 -0
- package/lib/Highlight/languages/solidity.js +38 -0
- package/lib/Highlight/languages/sql.js +38 -0
- package/lib/Highlight/languages/typescript.js +38 -0
- package/lib/Highlight/languages/xml.js +38 -0
- package/lib/Highlight/languages/yaml.js +38 -0
- package/lib/Highlight/locale/en-US.d.ts +2 -0
- package/lib/Highlight/locale/en-US.js +27 -0
- package/lib/Highlight/locale/zh-CN.d.ts +2 -0
- package/lib/Highlight/locale/zh-CN.js +27 -0
- package/lib/Highlight/locale/zh-TW.d.ts +2 -0
- package/lib/Highlight/locale/zh-TW.js +27 -0
- package/lib/Highlight/useKeyDownCopyEvent.d.ts +6 -0
- package/lib/Highlight/useKeyDownCopyEvent.js +86 -0
- package/lib/IconFont/font/iconfont.css +503 -0
- package/lib/IconFont/font/iconfont.ttf +0 -0
- package/lib/IconFont/font/iconfont.woff +0 -0
- package/lib/IconFont/font/iconfont.woff2 +0 -0
- package/lib/IconFont/index.d.ts +9 -0
- package/lib/IconFont/index.js +84 -0
- package/lib/LocaleDropdown/index.d.ts +9 -0
- package/lib/LocaleDropdown/index.js +72 -0
- package/lib/Login/ActivateForm.d.ts +19 -0
- package/lib/Login/ActivateForm.js +134 -0
- package/lib/Login/LoginForm.d.ts +20 -0
- package/lib/Login/LoginForm.js +177 -0
- package/lib/Login/RegisterForm.d.ts +23 -0
- package/lib/Login/RegisterForm.js +177 -0
- package/lib/Login/index.d.ts +66 -0
- package/lib/Login/index.js +175 -0
- package/lib/Login/index.less +325 -0
- package/lib/Login/locale/en-US.d.ts +27 -0
- package/lib/Login/locale/en-US.js +52 -0
- package/lib/Login/locale/zh-CN.d.ts +28 -0
- package/lib/Login/locale/zh-CN.js +53 -0
- package/lib/Login/locale/zh-TW.d.ts +27 -0
- package/lib/Login/locale/zh-TW.js +52 -0
- package/lib/Lottie/index.d.ts +10 -0
- package/lib/Lottie/index.js +64 -0
- package/lib/Modal/index.d.ts +31 -0
- package/lib/Modal/index.js +60 -0
- package/lib/Modal/style/index.d.ts +9 -0
- package/lib/Modal/style/index.js +51 -0
- package/lib/NavMenu/index.d.ts +19 -0
- package/lib/NavMenu/index.js +105 -0
- package/lib/NavMenu/index.less +50 -0
- package/lib/PageContainer/index.d.ts +17 -0
- package/lib/PageContainer/index.js +71 -0
- package/lib/PageContainer/index.less +72 -0
- package/lib/PageContainer/locale/en-US.d.ts +4 -0
- package/lib/PageContainer/locale/en-US.js +29 -0
- package/lib/PageContainer/locale/zh-CN.d.ts +4 -0
- package/lib/PageContainer/locale/zh-CN.js +29 -0
- package/lib/PageContainer/locale/zh-TW.d.ts +4 -0
- package/lib/PageContainer/locale/zh-TW.js +29 -0
- package/lib/Password/Content.d.ts +14 -0
- package/lib/Password/Content.js +108 -0
- package/lib/Password/index.d.ts +25 -0
- package/lib/Password/index.js +164 -0
- package/lib/Password/locale/en-US.d.ts +13 -0
- package/lib/Password/locale/en-US.js +38 -0
- package/lib/Password/locale/zh-CN.d.ts +13 -0
- package/lib/Password/locale/zh-CN.js +38 -0
- package/lib/Password/locale/zh-TW.d.ts +13 -0
- package/lib/Password/locale/zh-TW.js +38 -0
- package/lib/Ranger/QuickPicker.d.ts +4 -0
- package/lib/Ranger/QuickPicker.js +108 -0
- package/lib/Ranger/Ranger.d.ts +11 -0
- package/lib/Ranger/Ranger.js +155 -0
- package/lib/Ranger/constant/index.d.ts +27 -0
- package/lib/Ranger/constant/index.js +268 -0
- package/lib/Ranger/index.d.ts +33 -0
- package/lib/Ranger/index.js +66 -0
- package/lib/Ranger/index.less +55 -0
- package/lib/Ranger/locale/en-US.d.ts +28 -0
- package/lib/Ranger/locale/en-US.js +55 -0
- package/lib/Ranger/locale/zh-CN.d.ts +4 -0
- package/lib/Ranger/locale/zh-CN.js +29 -0
- package/lib/Ranger/locale/zh-TW.d.ts +4 -0
- package/lib/Ranger/locale/zh-TW.js +29 -0
- package/lib/Ranger/typing.d.ts +12 -0
- package/lib/Ranger/typing.js +17 -0
- package/lib/SideTip/Dragger.d.ts +45 -0
- package/lib/SideTip/Dragger.js +261 -0
- package/lib/SideTip/IconLoading.d.ts +3 -0
- package/lib/SideTip/IconLoading.js +78 -0
- package/lib/SideTip/index.d.ts +156 -0
- package/lib/SideTip/index.js +184 -0
- package/lib/SideTip/index.less +177 -0
- package/lib/SideTip/locale/en-US.d.ts +2 -0
- package/lib/SideTip/locale/en-US.js +27 -0
- package/lib/SideTip/locale/zh-CN.d.ts +2 -0
- package/lib/SideTip/locale/zh-CN.js +27 -0
- package/lib/SideTip/locale/zh-TW.d.ts +2 -0
- package/lib/SideTip/locale/zh-TW.js +27 -0
- package/lib/SideTip/utils.d.ts +8 -0
- package/lib/SideTip/utils.js +112 -0
- package/lib/StaticFunction/index.d.ts +10 -0
- package/lib/StaticFunction/index.js +72 -0
- package/lib/Table/index.d.ts +16 -0
- package/lib/Table/index.js +172 -0
- package/lib/Table/locale/en-US.d.ts +8 -0
- package/lib/Table/locale/en-US.js +33 -0
- package/lib/Table/locale/zh-CN.d.ts +8 -0
- package/lib/Table/locale/zh-CN.js +33 -0
- package/lib/Table/locale/zh-TW.d.ts +8 -0
- package/lib/Table/locale/zh-TW.js +33 -0
- package/lib/Table/style/index.d.ts +9 -0
- package/lib/Table/style/index.js +220 -0
- package/lib/Tabs/TabPane.d.ts +7 -0
- package/lib/Tabs/TabPane.js +28 -0
- package/lib/Tabs/hooks/useInkBar.d.ts +12 -0
- package/lib/Tabs/hooks/useInkBar.js +64 -0
- package/lib/Tabs/hooks/useLegacyItems.d.ts +4 -0
- package/lib/Tabs/hooks/useLegacyItems.js +64 -0
- package/lib/Tabs/index.d.ts +17 -0
- package/lib/Tabs/index.js +111 -0
- package/lib/Tabs/style/index.d.ts +9 -0
- package/lib/Tabs/style/index.js +71 -0
- package/lib/TaskGraph/Graph.d.ts +24 -0
- package/lib/TaskGraph/Graph.js +261 -0
- package/lib/TaskGraph/graph.less +23 -0
- package/lib/TaskGraph/index.d.ts +16 -0
- package/lib/TaskGraph/index.js +165 -0
- package/lib/TaskGraph/index.less +117 -0
- package/lib/TaskGraph/locale/en-US.d.ts +13 -0
- package/lib/TaskGraph/locale/en-US.js +38 -0
- package/lib/TaskGraph/locale/zh-CN.d.ts +13 -0
- package/lib/TaskGraph/locale/zh-CN.js +38 -0
- package/lib/TaskGraph/locale/zh-TW.d.ts +13 -0
- package/lib/TaskGraph/locale/zh-TW.js +38 -0
- package/lib/TaskGraph/register.d.ts +7 -0
- package/lib/TaskGraph/register.js +207 -0
- package/lib/Tooltip/MouseTooltip.d.ts +9 -0
- package/lib/Tooltip/MouseTooltip.js +108 -0
- package/lib/Tooltip/index.d.ts +18 -0
- package/lib/Tooltip/index.js +109 -0
- package/lib/TreeSearch/index.d.ts +38 -0
- package/lib/TreeSearch/index.js +137 -0
- package/lib/TreeSearch/util.d.ts +21 -0
- package/lib/TreeSearch/util.js +110 -0
- package/lib/Welcome/index.d.ts +38 -0
- package/lib/Welcome/index.js +104 -0
- package/lib/Welcome/index.less +186 -0
- package/lib/Welcome/locale/en-US.d.ts +5 -0
- package/lib/Welcome/locale/en-US.js +30 -0
- package/lib/Welcome/locale/zh-CN.d.ts +5 -0
- package/lib/Welcome/locale/zh-CN.js +30 -0
- package/lib/Welcome/locale/zh-TW.d.ts +5 -0
- package/lib/Welcome/locale/zh-TW.js +30 -0
- package/lib/Welcome/step.d.ts +18 -0
- package/lib/Welcome/step.js +53 -0
- package/lib/_util/genComponentStyleHook.d.ts +18 -0
- package/lib/_util/genComponentStyleHook.js +58 -0
- package/lib/_util/index.d.ts +18 -0
- package/lib/_util/index.js +67 -0
- package/lib/_util/itemRender.d.ts +2 -0
- package/lib/_util/itemRender.js +44 -0
- package/lib/assets/background_img.svg +30 -0
- package/lib/assets/graph_fit_view_icon.svg +14 -0
- package/lib/assets/graph_reset_icon.svg +14 -0
- package/lib/assets/logo/oceanbase_logo.svg +29 -0
- package/lib/assets/logo/oceanbase_watermark.svg +31 -0
- package/lib/assets/monitor.svg +21 -0
- package/lib/assets/user.svg +16 -0
- package/lib/constant/index.d.ts +7 -0
- package/lib/constant/index.js +51 -0
- package/lib/index.d.ts +52 -0
- package/lib/index.js +160 -0
- package/lib/index.less +14 -0
- package/lib/interface.d.ts +1 -0
- package/lib/interface.js +17 -0
- package/lib/locale/LocaleWrapper.d.ts +10 -0
- package/lib/locale/LocaleWrapper.js +71 -0
- package/lib/locale/en-US.d.ts +3 -0
- package/lib/locale/en-US.js +75 -0
- package/lib/locale/index.d.ts +4 -0
- package/lib/locale/index.js +17 -0
- package/lib/locale/zh-CN.d.ts +3 -0
- package/lib/locale/zh-CN.js +77 -0
- package/lib/locale/zh-TW.d.ts +3 -0
- package/lib/locale/zh-TW.js +71 -0
- package/lib/theme/index.d.ts +182 -0
- package/lib/theme/index.js +130 -0
- package/lib/theme/index.less +3 -0
- package/lib/theme/style/compact.less +526 -0
- package/lib/theme/style/dark.less +526 -0
- package/lib/theme/style/default.less +526 -0
- package/lib/variable.less +54 -0
- package/package.json +109 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/Table/index.tsx
|
|
30
|
+
var Table_exports = {};
|
|
31
|
+
__export(Table_exports, {
|
|
32
|
+
default: () => Table_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Table_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_lodash = require("lodash");
|
|
39
|
+
var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
|
|
40
|
+
var import_zh_CN = __toESM(require("./locale/zh-CN"));
|
|
41
|
+
var import_style = __toESM(require("./style"));
|
|
42
|
+
function Table(props) {
|
|
43
|
+
const locale = props == null ? void 0 : props.locale;
|
|
44
|
+
const {
|
|
45
|
+
columns,
|
|
46
|
+
pagination,
|
|
47
|
+
rowSelection,
|
|
48
|
+
toolAlertRender,
|
|
49
|
+
toolOptionsRender,
|
|
50
|
+
toolSelectedContent,
|
|
51
|
+
locales,
|
|
52
|
+
expandable,
|
|
53
|
+
hiddenCancelBtn = false,
|
|
54
|
+
cancelText = locale == null ? void 0 : locale.cancel,
|
|
55
|
+
collapseText = locale == null ? void 0 : locale.collapse,
|
|
56
|
+
openText = locale == null ? void 0 : locale.open,
|
|
57
|
+
prefixCls: customizePrefixCls,
|
|
58
|
+
className
|
|
59
|
+
} = props;
|
|
60
|
+
const { getPrefixCls } = (0, import_react.useContext)(import_antd.ConfigProvider.ConfigContext);
|
|
61
|
+
const prefixCls = getPrefixCls("table", customizePrefixCls);
|
|
62
|
+
const { wrapSSR, hashId } = (0, import_style.default)(prefixCls);
|
|
63
|
+
const tableCls = (0, import_classnames.default)(
|
|
64
|
+
{
|
|
65
|
+
[`${prefixCls}-expandable`]: !(0, import_lodash.isEmpty)(expandable)
|
|
66
|
+
},
|
|
67
|
+
className,
|
|
68
|
+
hashId
|
|
69
|
+
);
|
|
70
|
+
const [openPopver, setOpenPopver] = (0, import_react.useState)(false);
|
|
71
|
+
const [currentSelectedRowKeys, setCurrentSelectedRowKeys] = (0, import_react.useState)();
|
|
72
|
+
const [currentSelectedRows, setCurrentSelectedRows] = (0, import_react.useState)([]);
|
|
73
|
+
const [currentSelectedInfo, setCurrentSelectedInfo] = (0, import_react.useState)({});
|
|
74
|
+
const newColumns = columns.map((item) => {
|
|
75
|
+
if (item.ellipsis) {
|
|
76
|
+
return {
|
|
77
|
+
...item,
|
|
78
|
+
ellipsis: item.ellipsis === true ? item.ellipsis : {
|
|
79
|
+
showTitle: false,
|
|
80
|
+
...item.ellipsis
|
|
81
|
+
},
|
|
82
|
+
render: (text, record, index) => {
|
|
83
|
+
const element = item.render ? item.render(text, record, index) : record[item.dataIndex];
|
|
84
|
+
const elementType = element == null ? void 0 : element.type;
|
|
85
|
+
return (elementType == null ? void 0 : elementType.__ANT_TOOLTIP) === true ? element : /* @__PURE__ */ import_react.default.createElement(
|
|
86
|
+
import_antd.Typography.Text,
|
|
87
|
+
{
|
|
88
|
+
ellipsis: {
|
|
89
|
+
tooltip: {
|
|
90
|
+
placement: "topLeft",
|
|
91
|
+
title: element
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, element)
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
return item;
|
|
101
|
+
});
|
|
102
|
+
const handleSelectedData = (selectedRowKeys, selectedRows, info) => {
|
|
103
|
+
setCurrentSelectedRowKeys(selectedRowKeys);
|
|
104
|
+
setCurrentSelectedRows(selectedRows);
|
|
105
|
+
setCurrentSelectedInfo(info);
|
|
106
|
+
};
|
|
107
|
+
const handleOptionsCancel = () => {
|
|
108
|
+
rowSelection == null ? void 0 : rowSelection.onChange([], [], currentSelectedInfo);
|
|
109
|
+
handleSelectedData([], [], currentSelectedInfo);
|
|
110
|
+
};
|
|
111
|
+
(0, import_react.useEffect)(() => {
|
|
112
|
+
if ((0, import_lodash.isEmpty)(currentSelectedRows) && toolSelectedContent)
|
|
113
|
+
setOpenPopver(false);
|
|
114
|
+
}, [currentSelectedRows]);
|
|
115
|
+
const renderOptionsBar = (total, range) => {
|
|
116
|
+
if ((0, import_lodash.isEmpty)(rowSelection) || (0, import_lodash.isEmpty)(currentSelectedRowKeys)) {
|
|
117
|
+
return /* @__PURE__ */ import_react.default.createElement("span", null, pagination && (pagination == null ? void 0 : pagination.showTotal) && (pagination == null ? void 0 : pagination.showTotal(total, range)));
|
|
118
|
+
}
|
|
119
|
+
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-batch-operation-bar` }, /* @__PURE__ */ import_react.default.createElement(
|
|
120
|
+
import_antd.Space,
|
|
121
|
+
{
|
|
122
|
+
size: 8,
|
|
123
|
+
style: {
|
|
124
|
+
marginRight: 24
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
toolAlertRender && toolAlertRender(currentSelectedRowKeys, currentSelectedRows),
|
|
128
|
+
!toolAlertRender && toolAlertRender !== false && /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-batch-operation-selection` }, /* @__PURE__ */ import_react.default.createElement("span", null, locale == null ? void 0 : locale.selected), /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-batch-operation-selection-count` }, (currentSelectedRowKeys == null ? void 0 : currentSelectedRowKeys.length) || 0), /* @__PURE__ */ import_react.default.createElement("span", null, locale == null ? void 0 : locale.object)),
|
|
129
|
+
!hiddenCancelBtn && /* @__PURE__ */ import_react.default.createElement("a", { onClick: handleOptionsCancel }, cancelText),
|
|
130
|
+
toolSelectedContent && /* @__PURE__ */ import_react.default.createElement(
|
|
131
|
+
import_antd.Popover,
|
|
132
|
+
{
|
|
133
|
+
placement: "top",
|
|
134
|
+
overlayClassName: `${prefixCls}-batch-operation-selection-popover`,
|
|
135
|
+
content: toolSelectedContent == null ? void 0 : toolSelectedContent(currentSelectedRowKeys, currentSelectedRows),
|
|
136
|
+
trigger: "click",
|
|
137
|
+
open: openPopver
|
|
138
|
+
},
|
|
139
|
+
/* @__PURE__ */ import_react.default.createElement("a", { onClick: () => setOpenPopver(!openPopver) }, openPopver ? collapseText : openText)
|
|
140
|
+
)
|
|
141
|
+
), toolOptionsRender && /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 8 }, toolOptionsRender == null ? void 0 : toolOptionsRender(currentSelectedRowKeys, currentSelectedRows))), /* @__PURE__ */ import_react.default.createElement("span", null, pagination && (pagination == null ? void 0 : pagination.showTotal) && (pagination == null ? void 0 : pagination.showTotal(total, range))));
|
|
142
|
+
};
|
|
143
|
+
return wrapSSR(
|
|
144
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
145
|
+
import_antd.Table,
|
|
146
|
+
{
|
|
147
|
+
...props,
|
|
148
|
+
prefixCls: customizePrefixCls,
|
|
149
|
+
className: tableCls,
|
|
150
|
+
locale: locales,
|
|
151
|
+
columns: newColumns,
|
|
152
|
+
rowSelection: rowSelection ? {
|
|
153
|
+
...rowSelection,
|
|
154
|
+
onChange: (selectedRowKeys, selectedRows, info) => {
|
|
155
|
+
handleSelectedData(selectedRowKeys, selectedRows, info);
|
|
156
|
+
rowSelection == null ? void 0 : rowSelection.onChange(selectedRowKeys, selectedRows, info);
|
|
157
|
+
}
|
|
158
|
+
} : void 0,
|
|
159
|
+
pagination: pagination === false ? false : {
|
|
160
|
+
...pagination,
|
|
161
|
+
showTotal: renderOptionsBar
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
var Table_default = (0, import_LocaleWrapper.default)({
|
|
168
|
+
componentName: "Table",
|
|
169
|
+
defaultLocale: import_zh_CN.default
|
|
170
|
+
})(Table);
|
|
171
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
172
|
+
0 && (module.exports = {});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/Table/locale/en-US.ts
|
|
20
|
+
var en_US_exports = {};
|
|
21
|
+
__export(en_US_exports, {
|
|
22
|
+
default: () => en_US_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(en_US_exports);
|
|
25
|
+
var en_US_default = {
|
|
26
|
+
selected: "Selected",
|
|
27
|
+
object: "Objects",
|
|
28
|
+
cancel: "Cancel",
|
|
29
|
+
collapse: "Collapse",
|
|
30
|
+
open: "Open"
|
|
31
|
+
};
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/Table/locale/zh-CN.ts
|
|
20
|
+
var zh_CN_exports = {};
|
|
21
|
+
__export(zh_CN_exports, {
|
|
22
|
+
default: () => zh_CN_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(zh_CN_exports);
|
|
25
|
+
var zh_CN_default = {
|
|
26
|
+
selected: "已选",
|
|
27
|
+
object: "个对象",
|
|
28
|
+
cancel: "取消",
|
|
29
|
+
collapse: "收起",
|
|
30
|
+
open: "展开"
|
|
31
|
+
};
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/Table/locale/zh-TW.ts
|
|
20
|
+
var zh_TW_exports = {};
|
|
21
|
+
__export(zh_TW_exports, {
|
|
22
|
+
default: () => zh_TW_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(zh_TW_exports);
|
|
25
|
+
var zh_TW_default = {
|
|
26
|
+
selected: "已選",
|
|
27
|
+
object: "個對象",
|
|
28
|
+
cancel: "取消",
|
|
29
|
+
collapse: "收起",
|
|
30
|
+
open: "展開"
|
|
31
|
+
};
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
|
|
3
|
+
export declare type TableToken = FullToken<'Table'>;
|
|
4
|
+
export declare const genTableStyle: GenerateStyle<TableToken>;
|
|
5
|
+
declare const _default: (prefixCls: string) => {
|
|
6
|
+
wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => JSX.Element;
|
|
7
|
+
hashId: string;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/Table/style/index.ts
|
|
20
|
+
var style_exports = {};
|
|
21
|
+
__export(style_exports, {
|
|
22
|
+
default: () => style_default,
|
|
23
|
+
genTableStyle: () => genTableStyle
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(style_exports);
|
|
26
|
+
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
|
+
var genTableStyle = (token) => {
|
|
28
|
+
const {
|
|
29
|
+
antCls,
|
|
30
|
+
componentCls,
|
|
31
|
+
colorTextBase,
|
|
32
|
+
colorBgBase,
|
|
33
|
+
colorTextSecondary,
|
|
34
|
+
colorTextTertiary,
|
|
35
|
+
colorFillQuaternary,
|
|
36
|
+
colorPrimaryBg,
|
|
37
|
+
colorPrimaryBgHover,
|
|
38
|
+
colorLink,
|
|
39
|
+
borderRadiusLG,
|
|
40
|
+
colorBorderSecondary,
|
|
41
|
+
paddingSM,
|
|
42
|
+
padding,
|
|
43
|
+
paddingLG,
|
|
44
|
+
marginLG,
|
|
45
|
+
marginXS,
|
|
46
|
+
marginSM
|
|
47
|
+
} = token;
|
|
48
|
+
const largeCellPadding = `${paddingSM}px ${padding}px`;
|
|
49
|
+
return {
|
|
50
|
+
// 表格通用样式
|
|
51
|
+
[`${componentCls}-wrapper ${componentCls}`]: {
|
|
52
|
+
color: colorTextBase,
|
|
53
|
+
backgroundColor: colorBgBase,
|
|
54
|
+
borderRadius: borderRadiusLG,
|
|
55
|
+
// head 样式
|
|
56
|
+
[`${componentCls}-thead > tr`]: {
|
|
57
|
+
["td, th"]: {
|
|
58
|
+
// 弱化列标题
|
|
59
|
+
color: colorTextTertiary,
|
|
60
|
+
fontWeight: "normal",
|
|
61
|
+
backgroundColor: colorBgBase
|
|
62
|
+
},
|
|
63
|
+
[`td${componentCls}-row-expand-icon-cell`]: {
|
|
64
|
+
backgroundColor: colorBgBase
|
|
65
|
+
},
|
|
66
|
+
// 去掉排序列表头的灰色背景
|
|
67
|
+
[`th${componentCls}-column-sort`]: {
|
|
68
|
+
backgroundColor: colorBgBase
|
|
69
|
+
},
|
|
70
|
+
[`${componentCls}-cell-scrollbar`]: {
|
|
71
|
+
boxShadow: `0 1px 0 1px ${colorBgBase}`
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
// body 样式
|
|
75
|
+
[`${componentCls}-tbody`]: {
|
|
76
|
+
// 斑马纹样式
|
|
77
|
+
[`tr:nth-child(2n + 1):not(${componentCls}-placeholder):not(${componentCls}-row-selected)`]: {
|
|
78
|
+
td: {
|
|
79
|
+
backgroundColor: colorBgBase
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
[`tr:nth-child(2n):not(${componentCls}-placeholder):not(${componentCls}-row-selected):not(${componentCls}-expanded-row)`]: {
|
|
83
|
+
td: {
|
|
84
|
+
backgroundColor: colorFillQuaternary
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
// hover 行样式
|
|
88
|
+
[`tr:not(${componentCls}-placeholder):not(${componentCls}-expanded-row):hover`]: {
|
|
89
|
+
td: {
|
|
90
|
+
backgroundColor: `${colorPrimaryBgHover} !important`
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
// 选中行样式
|
|
94
|
+
[`tr${componentCls}-row-selected > td`]: {
|
|
95
|
+
backgroundColor: colorPrimaryBg
|
|
96
|
+
},
|
|
97
|
+
// 展开行样式
|
|
98
|
+
[`${componentCls}-expanded-row > td`]: {
|
|
99
|
+
padding: `${paddingSM}px ${paddingLG}px ${paddingSM}px ${padding + paddingLG}px !important`,
|
|
100
|
+
backgroundColor: colorBgBase,
|
|
101
|
+
// 除内嵌子表格外,设置其他内嵌元素样式
|
|
102
|
+
[`& > *:not(${componentCls}-wrapper)`]: {
|
|
103
|
+
marginTop: -marginSM,
|
|
104
|
+
padding: largeCellPadding,
|
|
105
|
+
backgroundColor: colorFillQuaternary,
|
|
106
|
+
borderRadius: borderRadiusLG
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
// 嵌套子表格样式
|
|
110
|
+
[`tr > td > ${componentCls}-wrapper:only-child ${componentCls}`]: {
|
|
111
|
+
// 调整嵌套子表格的间距
|
|
112
|
+
marginBlock: "0 !important",
|
|
113
|
+
marginInline: "0 !important",
|
|
114
|
+
// 设置嵌套子表格的单元格背景色
|
|
115
|
+
[`${componentCls}-thead > tr > th`]: {
|
|
116
|
+
backgroundColor: `${colorFillQuaternary} !important`
|
|
117
|
+
},
|
|
118
|
+
[`${componentCls}-tbody ${componentCls}-row td`]: {
|
|
119
|
+
backgroundColor: `${colorFillQuaternary} !important`
|
|
120
|
+
},
|
|
121
|
+
// 设置最后一行左右两列的圆角
|
|
122
|
+
[`${componentCls}-tbody > tr:last-child`]: {
|
|
123
|
+
["td:first-child, td:last-child"]: {
|
|
124
|
+
borderRadius: borderRadiusLG
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
// large 表格样式
|
|
131
|
+
[`${componentCls}-wrapper`]: {
|
|
132
|
+
[`${componentCls}:not(${componentCls}-middle):not(${componentCls}-small)`]: {
|
|
133
|
+
[`${componentCls}-thead > tr`]: {
|
|
134
|
+
["td, th"]: {
|
|
135
|
+
padding: largeCellPadding
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
[`${componentCls}-tbody`]: {
|
|
140
|
+
[`tr:not(${componentCls}-measure-row) > td`]: {
|
|
141
|
+
padding: largeCellPadding
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
// 去掉非展开表格的边框
|
|
146
|
+
[`${componentCls}-wrapper:not(${componentCls}-expandable)`]: {
|
|
147
|
+
[`${componentCls}:not(${componentCls}-bordered)`]: {
|
|
148
|
+
[`${componentCls}-tbody`]: {
|
|
149
|
+
[`tr:not(${componentCls}-measure-row) > td`]: {
|
|
150
|
+
border: "none"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
// 可展开表格样式
|
|
156
|
+
[`${componentCls}-wrapper${componentCls}-expandable`]: {
|
|
157
|
+
[`${componentCls}`]: {
|
|
158
|
+
[`${componentCls}-tbody`]: {
|
|
159
|
+
// 去掉斑马纹
|
|
160
|
+
[`tr:nth-child(2n):not(${componentCls}-placeholder):not(${componentCls}-expanded-row)`]: {
|
|
161
|
+
td: {
|
|
162
|
+
backgroundColor: colorBgBase
|
|
163
|
+
},
|
|
164
|
+
["&:hover"]: {
|
|
165
|
+
td: {
|
|
166
|
+
backgroundColor: colorPrimaryBgHover
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
[`${componentCls}-pagination`]: {
|
|
173
|
+
[`&${antCls}-pagination`]: {
|
|
174
|
+
borderTop: "none"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
// 分页器样式
|
|
179
|
+
[`${componentCls}-wrapper`]: {
|
|
180
|
+
[`${componentCls}-pagination`]: {
|
|
181
|
+
[`&${antCls}-pagination`]: {
|
|
182
|
+
padding: `${padding}px 0`,
|
|
183
|
+
margin: "0 !important",
|
|
184
|
+
borderTop: `1px solid ${colorBorderSecondary}`
|
|
185
|
+
},
|
|
186
|
+
// 批量操作栏样式
|
|
187
|
+
[`${componentCls}-batch-operation-bar`]: {
|
|
188
|
+
position: "absolute",
|
|
189
|
+
left: 0,
|
|
190
|
+
display: "inline-block",
|
|
191
|
+
marginRight: marginLG,
|
|
192
|
+
[`${componentCls}-batch-operation-selection`]: {
|
|
193
|
+
color: colorTextSecondary,
|
|
194
|
+
fontWeight: 500,
|
|
195
|
+
[`${componentCls}-batch-operation-selection-count`]: {
|
|
196
|
+
margin: `0 ${marginXS}px`,
|
|
197
|
+
color: colorLink
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
// 批量操作栏中的弹出层样式
|
|
204
|
+
[`${antCls}-popover${componentCls}-batch-operation-selection-popover`]: {
|
|
205
|
+
[`${antCls}-popover-inner`]: {
|
|
206
|
+
padding: 0
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
var style_default = (prefixCls) => {
|
|
212
|
+
const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("Table", (token) => {
|
|
213
|
+
return [genTableStyle(token)];
|
|
214
|
+
});
|
|
215
|
+
return useStyle(prefixCls);
|
|
216
|
+
};
|
|
217
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
218
|
+
0 && (module.exports = {
|
|
219
|
+
genTableStyle
|
|
220
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { TabPaneProps as AntTabPaneProps } from 'antd/es/tabs/TabPane';
|
|
3
|
+
export interface TabPaneProps extends AntTabPaneProps {
|
|
4
|
+
tag?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: React.FC<AntTabPaneProps>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/Tabs/TabPane.tsx
|
|
20
|
+
var TabPane_exports = {};
|
|
21
|
+
__export(TabPane_exports, {
|
|
22
|
+
default: () => TabPane_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(TabPane_exports);
|
|
25
|
+
var import_antd = require("antd");
|
|
26
|
+
var TabPane_default = import_antd.Tabs.TabPane;
|
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
+
0 && (module.exports = {});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { MutableRefObject } from 'react';
|
|
2
|
+
import type { TabsPosition, TabsType } from 'antd/es/tabs';
|
|
3
|
+
import type { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
4
|
+
declare const _default: ({ prefixCls, activeKey, size, type, tabPosition, containerRef, }: {
|
|
5
|
+
prefixCls: string;
|
|
6
|
+
activeKey: string;
|
|
7
|
+
size: SizeType;
|
|
8
|
+
type: TabsType;
|
|
9
|
+
tabPosition: TabsPosition;
|
|
10
|
+
containerRef: MutableRefObject<HTMLDivElement>;
|
|
11
|
+
}) => void;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/Tabs/hooks/useInkBar.ts
|
|
20
|
+
var useInkBar_exports = {};
|
|
21
|
+
__export(useInkBar_exports, {
|
|
22
|
+
default: () => useInkBar_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(useInkBar_exports);
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
var useInkBar_default = ({
|
|
27
|
+
prefixCls,
|
|
28
|
+
activeKey,
|
|
29
|
+
size,
|
|
30
|
+
type,
|
|
31
|
+
tabPosition,
|
|
32
|
+
containerRef
|
|
33
|
+
}) => {
|
|
34
|
+
const isHorizontal = !tabPosition || tabPosition === "top" || tabPosition === "bottom";
|
|
35
|
+
const isVertical = tabPosition === "left" || tabPosition === "right";
|
|
36
|
+
(0, import_react.useEffect)(() => {
|
|
37
|
+
var _a;
|
|
38
|
+
const containerNode = containerRef.current;
|
|
39
|
+
const inkBarNode = (_a = containerNode == null ? void 0 : containerNode.getElementsByClassName(
|
|
40
|
+
`${prefixCls}-ink-bar`
|
|
41
|
+
)) == null ? void 0 : _a[0];
|
|
42
|
+
const activeTabNode = containerNode == null ? void 0 : containerNode.querySelector(`[data-node-key="${activeKey}"]`);
|
|
43
|
+
const activeTabBtnNode = containerNode == null ? void 0 : containerNode.querySelector(
|
|
44
|
+
`[data-node-key="${activeKey}"]>.${prefixCls}-tab-btn`
|
|
45
|
+
);
|
|
46
|
+
const horizontalOffset = 8;
|
|
47
|
+
setTimeout(() => {
|
|
48
|
+
if ((!type || type === "line") && inkBarNode) {
|
|
49
|
+
if (isHorizontal && (activeTabNode == null ? void 0 : activeTabNode.offsetWidth) > 32) {
|
|
50
|
+
inkBarNode.style.width = `${(activeTabNode == null ? void 0 : activeTabNode.offsetWidth) - horizontalOffset * 2}px`;
|
|
51
|
+
inkBarNode.style.marginLeft = `${horizontalOffset}px`;
|
|
52
|
+
inkBarNode.style.marginTop = "0px";
|
|
53
|
+
}
|
|
54
|
+
if (isVertical) {
|
|
55
|
+
inkBarNode.style.height = `${activeTabBtnNode == null ? void 0 : activeTabBtnNode.offsetHeight}px`;
|
|
56
|
+
inkBarNode.style.marginTop = `${((activeTabNode == null ? void 0 : activeTabNode.offsetHeight) - (activeTabBtnNode == null ? void 0 : activeTabBtnNode.offsetHeight)) / 2}px`;
|
|
57
|
+
inkBarNode.style.marginLeft = "0px";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}, 100);
|
|
61
|
+
}, [prefixCls, activeKey, size, type, isHorizontal, isVertical, containerRef]);
|
|
62
|
+
};
|
|
63
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
64
|
+
0 && (module.exports = {});
|