@aloudata/aloudata-design 0.1.0-beta1 → 0.2.0-beta.3
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 -13
- package/es/Button/demo/Icon/index.d.ts +3 -0
- package/es/Button/demo/Icon/index.js +67 -0
- package/{src → es}/Button/demo/Icon/index.less +0 -0
- package/es/Button/demo/basic/index.d.ts +4 -0
- package/es/Button/demo/basic/index.js +57 -0
- package/{src → es}/Button/demo/basic/index.less +0 -1
- package/es/Button/demo/disable/index.d.ts +3 -0
- package/es/Button/demo/disable/index.js +23 -0
- package/{src → es}/Button/demo/disable/index.less +0 -0
- package/es/Button/demo/href/index.d.ts +2 -0
- package/es/Button/demo/href/index.js +17 -0
- package/es/Button/demo/loading/index.d.ts +3 -0
- package/es/Button/demo/loading/index.js +37 -0
- package/{src → es}/Button/demo/loading/index.less +0 -0
- package/es/Button/index.d.ts +50 -0
- package/es/Button/index.js +108 -0
- package/es/Button/style/index.d.ts +2 -0
- package/es/Button/style/index.js +2 -0
- package/{src → es}/Button/style/index.less +5 -5
- package/es/Dropdown/Button.d.ts +69 -0
- package/es/Dropdown/Button.js +39 -0
- package/es/Dropdown/demo/basic/index.d.ts +4 -0
- package/es/Dropdown/demo/basic/index.js +18 -0
- package/es/Dropdown/demo/button/index.d.ts +3 -0
- package/es/Dropdown/demo/button/index.js +159 -0
- package/{src → es}/Dropdown/demo/button/index.less +0 -0
- package/es/Dropdown/demo/placement/index.d.ts +2 -0
- package/es/Dropdown/demo/placement/index.js +40 -0
- package/es/Dropdown/demo/subMenu/index.d.ts +2 -0
- package/es/Dropdown/demo/subMenu/index.js +42 -0
- package/es/Dropdown/demo/trigger/index.d.ts +2 -0
- package/es/Dropdown/demo/trigger/index.js +17 -0
- package/es/Dropdown/index.d.ts +59 -0
- package/es/Dropdown/index.js +33 -0
- package/es/Dropdown/style/index.d.ts +2 -0
- package/es/Dropdown/style/index.js +2 -0
- package/{src → es}/Dropdown/style/index.less +0 -0
- package/es/Empty/index.d.ts +8 -0
- package/es/Empty/index.js +57 -0
- package/es/Empty/style/index.d.ts +1 -0
- package/es/Empty/style/index.js +1 -0
- package/es/Empty/style/index.less +23 -0
- package/{src → es}/Icon/iconfont/demo.css +0 -0
- package/{src → es}/Icon/iconfont/demo_index.html +95 -3
- package/es/Icon/iconfont/iconfont.css +109 -0
- package/es/Icon/iconfont/iconfont.js +46 -0
- package/{src → es}/Icon/iconfont/iconfont.json +28 -0
- package/es/Icon/iconfont/iconfont.ttf +0 -0
- package/es/Icon/iconfont/iconfont.woff +0 -0
- package/es/Icon/iconfont/iconfont.woff2 +0 -0
- package/es/Icon/index.d.ts +11 -0
- package/es/Icon/index.js +42 -0
- package/{src → es}/Icon/index.less +3 -3
- package/es/Input/components/Group/index.d.ts +14 -0
- package/es/Input/components/Group/index.js +12 -0
- package/es/Input/components/Password/index.d.ts +10 -0
- package/es/Input/components/Password/index.js +20 -0
- package/es/Input/components/TextArea/index.d.ts +52 -0
- package/es/Input/components/TextArea/index.js +14 -0
- package/es/Input/demo/allowClear/index.d.ts +3 -0
- package/es/Input/demo/allowClear/index.js +11 -0
- package/{src → es}/Input/demo/allowClear/index.less +0 -0
- package/es/Input/demo/basic/index.d.ts +4 -0
- package/es/Input/demo/basic/index.js +65 -0
- package/es/Input/demo/basic/index.less +14 -0
- package/es/Input/demo/gourp/index.d.ts +2 -0
- package/es/Input/demo/gourp/index.js +67 -0
- package/es/Input/demo/password/index.d.ts +3 -0
- package/es/Input/demo/password/index.js +21 -0
- package/{src → es}/Input/demo/password/index.less +0 -0
- package/es/Input/demo/prefix/index.d.ts +3 -0
- package/es/Input/demo/prefix/index.js +17 -0
- package/{src → es}/Input/demo/prefix/index.less +0 -0
- package/es/Input/demo/showCount/index.d.ts +3 -0
- package/es/Input/demo/showCount/index.js +17 -0
- package/{src → es}/Input/demo/showCount/index.less +0 -0
- package/es/Input/demo/textArea/autoSize.d.ts +2 -0
- package/es/Input/demo/textArea/autoSize.js +50 -0
- package/es/Input/index.d.ts +65 -0
- package/es/Input/index.js +46 -0
- package/es/Input/style/index.d.ts +2 -0
- package/es/Input/style/index.js +2 -0
- package/{src → es}/Input/style/index.less +4 -1
- package/es/Menu/Divider.d.ts +4 -0
- package/es/Menu/Divider.js +15 -0
- package/es/Menu/MenuItem.d.ts +17 -0
- package/es/Menu/MenuItem.js +15 -0
- package/es/Menu/SubMenu.d.ts +26 -0
- package/es/Menu/SubMenu.js +29 -0
- package/es/Menu/index.d.ts +20 -0
- package/es/Menu/index.js +31 -0
- package/es/Menu/style/index.d.ts +2 -0
- package/es/Menu/style/index.js +2 -0
- package/{src → es}/Menu/style/index.less +4 -0
- package/es/Navigator/components/Menu/index.d.ts +19 -0
- package/es/Navigator/components/Menu/index.js +187 -0
- package/es/Navigator/demo/basic/index.d.ts +4 -0
- package/es/Navigator/demo/basic/index.js +45 -0
- package/es/Navigator/demo/basic/index.less +3 -0
- package/es/Navigator/demo/example/index.d.ts +4 -0
- package/es/Navigator/demo/example/index.js +153 -0
- package/es/Navigator/demo/example/index.less +10 -0
- package/es/Navigator/demo/logo.png +0 -0
- package/es/Navigator/demo/menuWithFooter/index.d.ts +4 -0
- package/es/Navigator/demo/menuWithFooter/index.js +73 -0
- package/es/Navigator/demo/menuWithFooter/index.less +3 -0
- package/es/Navigator/demo/subMenu/index.d.ts +4 -0
- package/es/Navigator/demo/subMenu/index.js +71 -0
- package/es/Navigator/demo/subMenu/index.less +3 -0
- package/es/Navigator/index.d.ts +41 -0
- package/es/Navigator/index.js +45 -0
- package/es/Navigator/style/index.d.ts +2 -0
- package/es/Navigator/style/index.js +2 -0
- package/es/Navigator/style/index.less +228 -0
- package/es/Select/BaseSelect.d.ts +5 -0
- package/es/Select/BaseSelect.js +400 -0
- package/{src/Select/OptionsList/OptGroup.tsx → es/Select/OptionsList/OptGroup.d.ts} +2 -4
- package/es/Select/OptionsList/OptGroup.js +6 -0
- package/es/Select/OptionsList/OptionItem/RenderGroup.d.ts +9 -0
- package/es/Select/OptionsList/OptionItem/RenderGroup.js +16 -0
- package/es/Select/OptionsList/OptionItem/RenderLabelIcon.d.ts +8 -0
- package/es/Select/OptionsList/OptionItem/RenderLabelIcon.js +44 -0
- package/es/Select/OptionsList/OptionItem/RenderOption.d.ts +16 -0
- package/es/Select/OptionsList/OptionItem/RenderOption.js +79 -0
- package/es/Select/OptionsList/OptionItem/RenderTooltip.d.ts +8 -0
- package/es/Select/OptionsList/OptionItem/RenderTooltip.js +25 -0
- package/es/Select/OptionsList/OptionItem.d.ts +4 -0
- package/es/Select/OptionsList/OptionItem.js +4 -0
- package/es/Select/OptionsList/Options.d.ts +7 -0
- package/es/Select/OptionsList/Options.js +6 -0
- package/es/Select/OptionsList/index.d.ts +4 -0
- package/es/Select/OptionsList/index.js +187 -0
- package/es/Select/Selector/index.d.ts +4 -0
- package/es/Select/Selector/index.js +252 -0
- package/es/Select/VirtualList.d.ts +5 -0
- package/es/Select/VirtualList.js +29 -0
- package/es/Select/demo/disabled/index.d.ts +2 -0
- package/es/Select/demo/disabled/index.js +50 -0
- package/es/Select/demo/multiple/index.d.ts +2 -0
- package/es/Select/demo/multiple/index.js +140 -0
- package/es/Select/demo/options/index.d.ts +2 -0
- package/es/Select/demo/options/index.js +55 -0
- package/es/Select/demo/single/index.d.ts +3 -0
- package/es/Select/demo/single/index.js +89 -0
- package/es/Select/demo/single/index.less +5 -0
- package/es/Select/hooks/useCacheOption.d.ts +9 -0
- package/es/Select/hooks/useCacheOption.js +107 -0
- package/es/Select/index.d.ts +12 -0
- package/es/Select/index.js +9 -0
- package/es/Select/interface.d.ts +227 -0
- package/es/Select/interface.js +1 -0
- package/es/Select/style/index.d.ts +2 -0
- package/es/Select/style/index.js +2 -0
- package/{src → es}/Select/style/index.less +3 -10
- package/es/Select/utils.d.ts +21 -0
- package/es/Select/utils.js +193 -0
- package/es/Table/demo/basic/createData.d.ts +10 -0
- package/es/Table/demo/basic/createData.js +18 -0
- package/es/Table/demo/basic/index.d.ts +2 -0
- package/es/Table/demo/basic/index.js +64 -0
- package/es/Table/demo/editCell/index.d.ts +2 -0
- package/es/Table/demo/editCell/index.js +39 -0
- package/es/Table/demo/renderHeaderRight/index.d.ts +2 -0
- package/es/Table/demo/renderHeaderRight/index.js +37 -0
- package/es/Table/demo/resizeColumn/index.d.ts +2 -0
- package/es/Table/demo/resizeColumn/index.js +32 -0
- package/es/Table/demo/rowSelect/index.d.ts +2 -0
- package/es/Table/demo/rowSelect/index.js +35 -0
- package/es/Table/demo/sort/index.d.ts +2 -0
- package/es/Table/demo/sort/index.js +43 -0
- package/es/Table/demo/virtualList/index.d.ts +2 -0
- package/es/Table/demo/virtualList/index.js +88 -0
- package/es/Table/index.d.ts +5 -0
- package/es/Table/index.js +336 -0
- package/es/Table/interface.d.ts +34 -0
- package/es/Table/interface.js +1 -0
- package/es/Table/react-table-config.d.ts +122 -0
- package/es/Table/style/index.d.ts +2 -0
- package/es/Table/style/index.js +2 -0
- package/es/Table/style/index.less +141 -0
- package/es/Tabs/TabPane.d.ts +21 -0
- package/es/Tabs/TabPane.js +12 -0
- package/es/Tabs/demo/adaptHeight/index.d.ts +3 -0
- package/es/Tabs/demo/adaptHeight/index.js +19 -0
- package/{src → es}/Tabs/demo/adaptHeight/index.less +0 -0
- package/es/Tabs/demo/basic/index.d.ts +4 -0
- package/es/Tabs/demo/basic/index.js +44 -0
- package/{src → es}/Tabs/demo/basic/index.less +0 -0
- package/es/Tabs/demo/horizontalScroll/index.d.ts +3 -0
- package/es/Tabs/demo/horizontalScroll/index.js +30 -0
- package/{src → es}/Tabs/demo/horizontalScroll/index.less +0 -0
- package/es/Tabs/index.d.ts +41 -0
- package/es/Tabs/index.js +42 -0
- package/es/Tabs/style/index.d.ts +2 -0
- package/es/Tabs/style/index.js +2 -0
- package/{src → es}/Tabs/style/index.less +0 -0
- package/es/Tooltip/demo/basic/index.d.ts +2 -0
- package/es/Tooltip/demo/basic/index.js +7 -0
- package/es/Tooltip/demo/overflow/index.d.ts +2 -0
- package/es/Tooltip/demo/overflow/index.js +7 -0
- package/es/Tooltip/demo/placement/index.d.ts +6 -0
- package/es/Tooltip/demo/placement/index.js +70 -0
- package/{src → es}/Tooltip/demo/placement/index.less +0 -0
- package/es/Tooltip/demo/trigger/index.d.ts +3 -0
- package/es/Tooltip/demo/trigger/index.js +20 -0
- package/{src → es}/Tooltip/demo/trigger/index.less +0 -0
- package/es/Tooltip/index.d.ts +64 -0
- package/es/Tooltip/index.js +33 -0
- package/es/Tooltip/style/index.d.ts +2 -0
- package/es/Tooltip/style/index.js +2 -0
- package/{src → es}/Tooltip/style/index.less +0 -0
- package/es/_utils/hooks/useControlledState.d.ts +2 -0
- package/es/_utils/hooks/useControlledState.js +54 -0
- package/es/_utils/hooks/usePrefixCls.d.ts +2 -0
- package/es/_utils/hooks/usePrefixCls.js +14 -0
- package/es/index.d.ts +11 -0
- package/{src/index.ts → es/index.js} +3 -1
- package/es/style/index.d.ts +2 -0
- package/{src/style/index.ts → es/style/index.js} +0 -0
- package/{src → es}/style/index.less +0 -0
- package/{src → es}/style/mixins/index.less +0 -0
- package/{src → es}/style/themes/default/index.less +1 -1
- package/{lib/style/themes/default/themeColor.less → es/style/themes/default/themeColor.module.less} +0 -0
- package/es/style/themes/default/themeColor.module.less.d.ts +108 -0
- package/lib/Button/demo/basic/index.less +0 -1
- package/lib/Button/index.js +2 -2
- package/lib/Button/style/index.less +5 -5
- package/lib/Dropdown/demo/button/index.js +1 -1
- package/lib/Empty/index.d.ts +8 -0
- package/lib/Empty/index.js +71 -0
- package/lib/Empty/style/index.d.ts +1 -0
- package/lib/Empty/style/index.js +3 -0
- package/lib/Empty/style/index.less +23 -0
- package/lib/Icon/iconfont/demo_index.html +95 -3
- package/lib/Icon/iconfont/iconfont.css +19 -3
- package/lib/Icon/iconfont/iconfont.js +5 -5
- package/lib/Icon/iconfont/iconfont.json +28 -0
- package/lib/Icon/iconfont/iconfont.ttf +0 -0
- package/lib/Icon/iconfont/iconfont.woff +0 -0
- package/lib/Icon/iconfont/iconfont.woff2 +0 -0
- package/lib/Icon/index.less +3 -3
- package/lib/Input/components/Group/index.d.ts +0 -1
- package/lib/Input/components/Password/index.d.ts +3 -3
- package/lib/Input/components/Password/index.js +2 -2
- package/lib/Input/demo/basic/index.less +9 -1
- package/lib/Input/style/index.less +4 -1
- package/lib/Menu/Divider.d.ts +0 -1
- package/lib/Menu/style/index.less +4 -0
- package/lib/Navigator/components/Menu/index.d.ts +19 -0
- package/lib/Navigator/components/Menu/index.js +205 -0
- package/lib/Navigator/demo/basic/index.d.ts +4 -0
- package/lib/Navigator/demo/basic/index.js +62 -0
- package/lib/Navigator/demo/basic/index.less +3 -0
- package/lib/Navigator/demo/example/index.d.ts +4 -0
- package/lib/Navigator/demo/example/index.js +179 -0
- package/lib/Navigator/demo/example/index.less +10 -0
- package/lib/Navigator/demo/logo.png +0 -0
- package/lib/Navigator/demo/menuWithFooter/index.d.ts +4 -0
- package/lib/Navigator/demo/menuWithFooter/index.js +92 -0
- package/lib/Navigator/demo/menuWithFooter/index.less +3 -0
- package/lib/Navigator/demo/subMenu/index.d.ts +4 -0
- package/lib/Navigator/demo/subMenu/index.js +88 -0
- package/lib/Navigator/demo/subMenu/index.less +3 -0
- package/lib/Navigator/index.d.ts +41 -0
- package/lib/Navigator/index.js +64 -0
- package/lib/Navigator/style/index.d.ts +2 -0
- package/lib/Navigator/style/index.js +5 -0
- package/lib/Navigator/style/index.less +228 -0
- package/lib/Select/OptionsList/OptionItem/RenderGroup.d.ts +9 -0
- package/lib/Select/OptionsList/OptionItem/RenderGroup.js +27 -0
- package/lib/Select/OptionsList/OptionItem/RenderLabelIcon.d.ts +8 -0
- package/lib/Select/OptionsList/OptionItem/RenderLabelIcon.js +58 -0
- package/lib/Select/OptionsList/OptionItem/RenderOption.d.ts +16 -0
- package/lib/Select/OptionsList/OptionItem/RenderOption.js +94 -0
- package/lib/Select/OptionsList/OptionItem/RenderTooltip.d.ts +8 -0
- package/lib/Select/OptionsList/OptionItem/RenderTooltip.js +37 -0
- package/lib/Select/OptionsList/OptionItem.d.ts +4 -35
- package/lib/Select/OptionsList/OptionItem.js +26 -172
- package/lib/Select/OptionsList/Options.d.ts +2 -2
- package/lib/Select/OptionsList/index.js +1 -1
- package/lib/Select/Selector/index.d.ts +2 -2
- package/lib/Select/Selector/index.js +13 -10
- package/lib/Select/demo/single/index.d.ts +1 -0
- package/lib/Select/demo/single/index.js +5 -1
- package/lib/Select/demo/single/index.less +5 -0
- package/lib/Select/interface.d.ts +8 -2
- package/lib/Select/style/index.less +3 -10
- package/lib/Table/demo/basic/createData.d.ts +10 -0
- package/lib/Table/demo/basic/createData.js +23 -0
- package/lib/Table/demo/basic/index.d.ts +2 -0
- package/lib/Table/demo/basic/index.js +80 -0
- package/lib/Table/demo/editCell/index.d.ts +2 -0
- package/lib/Table/demo/editCell/index.js +54 -0
- package/lib/Table/demo/renderHeaderRight/index.d.ts +2 -0
- package/lib/Table/demo/renderHeaderRight/index.js +52 -0
- package/lib/Table/demo/resizeColumn/index.d.ts +2 -0
- package/lib/Table/demo/resizeColumn/index.js +47 -0
- package/lib/Table/demo/rowSelect/index.d.ts +2 -0
- package/lib/Table/demo/rowSelect/index.js +50 -0
- package/lib/Table/demo/sort/index.d.ts +2 -0
- package/lib/Table/demo/sort/index.js +58 -0
- package/lib/Table/demo/virtualList/index.d.ts +2 -0
- package/lib/Table/demo/virtualList/index.js +103 -0
- package/lib/Table/index.d.ts +5 -0
- package/lib/Table/index.js +362 -0
- package/lib/Table/interface.d.ts +34 -0
- package/lib/Table/interface.js +5 -0
- package/lib/Table/react-table-config.d.ts +122 -0
- package/lib/Table/style/index.d.ts +2 -0
- package/lib/Table/style/index.js +5 -0
- package/lib/Table/style/index.less +141 -0
- package/lib/Tooltip/index.d.ts +1 -0
- package/lib/Tooltip/index.js +3 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +16 -0
- package/lib/style/themes/default/index.less +1 -1
- package/{src/style/themes/default/themeColor.less → lib/style/themes/default/themeColor.module.less} +0 -0
- package/lib/style/themes/default/themeColor.module.less.d.ts +108 -0
- package/package.json +24 -8
- package/.editorconfig +0 -16
- package/.eslintrc.js +0 -43
- package/.fatherrc.ts +0 -16
- package/.prettierignore +0 -7
- package/.prettierrc.js +0 -1
- package/.stylelintrc.json +0 -36
- package/.umirc.ts +0 -15
- package/commitlint.config.js +0 -21
- package/docs/index.md +0 -21
- package/jest/setupTests.js +0 -1
- package/public/favicon.ico +0 -0
- package/src/Button/demo/Icon/index.tsx +0 -41
- package/src/Button/demo/basic/index.tsx +0 -26
- package/src/Button/demo/disable/index.tsx +0 -16
- package/src/Button/demo/href/index.tsx +0 -14
- package/src/Button/demo/loading/index.tsx +0 -21
- package/src/Button/index.md +0 -25
- package/src/Button/index.test.tsx +0 -58
- package/src/Button/index.tsx +0 -136
- package/src/Button/style/index.ts +0 -2
- package/src/Dropdown/Button.tsx +0 -93
- package/src/Dropdown/demo/basic/index.tsx +0 -20
- package/src/Dropdown/demo/button/index.tsx +0 -98
- package/src/Dropdown/demo/placement/index.tsx +0 -47
- package/src/Dropdown/demo/subMenu/index.tsx +0 -35
- package/src/Dropdown/demo/trigger/index.tsx +0 -19
- package/src/Dropdown/index.md +0 -35
- package/src/Dropdown/index.test.tsx +0 -185
- package/src/Dropdown/index.tsx +0 -71
- package/src/Dropdown/style/index.ts +0 -2
- package/src/Icon/iconfont/iconfont.css +0 -93
- package/src/Icon/iconfont/iconfont.js +0 -1
- package/src/Icon/iconfont/iconfont.ttf +0 -0
- package/src/Icon/iconfont/iconfont.woff +0 -0
- package/src/Icon/iconfont/iconfont.woff2 +0 -0
- package/src/Icon/index.tsx +0 -38
- package/src/Input/components/Group/index.tsx +0 -21
- package/src/Input/components/Password/index.tsx +0 -23
- package/src/Input/components/TextArea/index.tsx +0 -57
- package/src/Input/demo/allowClear/index.tsx +0 -10
- package/src/Input/demo/basic/index.less +0 -6
- package/src/Input/demo/basic/index.tsx +0 -25
- package/src/Input/demo/gourp/index.tsx +0 -30
- package/src/Input/demo/password/index.tsx +0 -11
- package/src/Input/demo/prefix/index.tsx +0 -13
- package/src/Input/demo/showCount/index.tsx +0 -16
- package/src/Input/demo/textArea/autoSize.tsx +0 -21
- package/src/Input/index.md +0 -37
- package/src/Input/index.test.tsx +0 -78
- package/src/Input/index.tsx +0 -91
- package/src/Input/style/index.ts +0 -2
- package/src/Menu/Divider.tsx +0 -12
- package/src/Menu/MenuItem.tsx +0 -24
- package/src/Menu/SubMenu.tsx +0 -37
- package/src/Menu/index.md +0 -36
- package/src/Menu/index.test.tsx +0 -144
- package/src/Menu/index.tsx +0 -27
- package/src/Menu/style/index.ts +0 -2
- package/src/Select/BaseSelect.tsx +0 -321
- package/src/Select/OptionsList/OptionItem.tsx +0 -151
- package/src/Select/OptionsList/Options.tsx +0 -11
- package/src/Select/OptionsList/index.tsx +0 -169
- package/src/Select/Selector/index.tsx +0 -211
- package/src/Select/VirtualList.tsx +0 -36
- package/src/Select/demo/disabled/index.tsx +0 -44
- package/src/Select/demo/multiple/index.tsx +0 -77
- package/src/Select/demo/options/index.tsx +0 -63
- package/src/Select/demo/single/index.tsx +0 -50
- package/src/Select/hooks/useCacheOption.ts +0 -67
- package/src/Select/index.md +0 -72
- package/src/Select/index.tsx +0 -23
- package/src/Select/interface.ts +0 -231
- package/src/Select/style/index.ts +0 -2
- package/src/Select/utils.tsx +0 -133
- package/src/Tabs/TabPane.tsx +0 -28
- package/src/Tabs/demo/adaptHeight/index.tsx +0 -33
- package/src/Tabs/demo/basic/index.tsx +0 -30
- package/src/Tabs/demo/horizontalScroll/index.tsx +0 -36
- package/src/Tabs/index.md +0 -30
- package/src/Tabs/index.test.tsx +0 -100
- package/src/Tabs/index.tsx +0 -64
- package/src/Tabs/style/index.ts +0 -2
- package/src/Tooltip/demo/basic/index.tsx +0 -10
- package/src/Tooltip/demo/overflow/index.tsx +0 -10
- package/src/Tooltip/demo/placement/index.tsx +0 -60
- package/src/Tooltip/demo/trigger/index.tsx +0 -22
- package/src/Tooltip/index.md +0 -28
- package/src/Tooltip/index.test.tsx +0 -152
- package/src/Tooltip/index.tsx +0 -113
- package/src/Tooltip/style/index.ts +0 -2
- package/src/_utils/hooks/useControlledState.ts +0 -39
- package/src/_utils/hooks/usePrefixCls.ts +0 -11
- package/tsconfig.json +0 -13
- package/typings.d.ts +0 -3
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
|
+
import {
|
|
3
|
+
UseColumnOrderInstanceProps,
|
|
4
|
+
UseColumnOrderState,
|
|
5
|
+
UseExpandedHooks,
|
|
6
|
+
UseExpandedInstanceProps,
|
|
7
|
+
UseExpandedOptions,
|
|
8
|
+
UseExpandedRowProps,
|
|
9
|
+
UseExpandedState,
|
|
10
|
+
UseFiltersColumnOptions,
|
|
11
|
+
UseFiltersColumnProps,
|
|
12
|
+
UseFiltersInstanceProps,
|
|
13
|
+
UseFiltersOptions,
|
|
14
|
+
UseFiltersState,
|
|
15
|
+
UseGlobalFiltersColumnOptions,
|
|
16
|
+
UseGlobalFiltersInstanceProps,
|
|
17
|
+
UseGlobalFiltersOptions,
|
|
18
|
+
UseGlobalFiltersState,
|
|
19
|
+
UseGroupByCellProps,
|
|
20
|
+
UseGroupByColumnOptions,
|
|
21
|
+
UseGroupByColumnProps,
|
|
22
|
+
UseGroupByHooks,
|
|
23
|
+
UseGroupByInstanceProps,
|
|
24
|
+
UseGroupByOptions,
|
|
25
|
+
UseGroupByRowProps,
|
|
26
|
+
UseGroupByState,
|
|
27
|
+
UsePaginationInstanceProps,
|
|
28
|
+
UsePaginationOptions,
|
|
29
|
+
UsePaginationState,
|
|
30
|
+
UseResizeColumnsColumnOptions,
|
|
31
|
+
UseResizeColumnsColumnProps,
|
|
32
|
+
UseResizeColumnsOptions,
|
|
33
|
+
UseResizeColumnsState,
|
|
34
|
+
UseRowSelectHooks,
|
|
35
|
+
UseRowSelectInstanceProps,
|
|
36
|
+
UseRowSelectOptions,
|
|
37
|
+
UseRowSelectRowProps,
|
|
38
|
+
UseRowSelectState,
|
|
39
|
+
UseRowStateCellProps,
|
|
40
|
+
UseRowStateInstanceProps,
|
|
41
|
+
UseRowStateOptions,
|
|
42
|
+
UseRowStateRowProps,
|
|
43
|
+
UseRowStateState,
|
|
44
|
+
UseSortByColumnOptions,
|
|
45
|
+
UseSortByColumnProps,
|
|
46
|
+
UseSortByHooks,
|
|
47
|
+
UseSortByInstanceProps,
|
|
48
|
+
UseSortByOptions,
|
|
49
|
+
UseSortByState
|
|
50
|
+
} from 'react-table';
|
|
51
|
+
|
|
52
|
+
declare module 'react-table' {
|
|
53
|
+
// take this file as-is, or comment out the sections that don't apply to your plugin configuration
|
|
54
|
+
|
|
55
|
+
export interface TableOptions<D extends Record<string, unknown>>
|
|
56
|
+
extends UseExpandedOptions<D>,
|
|
57
|
+
UseFiltersOptions<D>,
|
|
58
|
+
UseGlobalFiltersOptions<D>,
|
|
59
|
+
UseGroupByOptions<D>,
|
|
60
|
+
UsePaginationOptions<D>,
|
|
61
|
+
UseResizeColumnsOptions<D>,
|
|
62
|
+
UseRowSelectOptions<D>,
|
|
63
|
+
UseRowStateOptions<D>,
|
|
64
|
+
UseSortByOptions<D>,
|
|
65
|
+
// note that having Record here allows you to add anything to the options, this matches the spirit of the
|
|
66
|
+
// underlying js library, but might be cleaner if it's replaced by a more specific type that matches your
|
|
67
|
+
// feature set, this is a safe default.
|
|
68
|
+
Record<string, unknown> {}
|
|
69
|
+
|
|
70
|
+
export interface Hooks<D extends Record<string, unknown> = Record<string, unknown>>
|
|
71
|
+
extends UseExpandedHooks<D>,
|
|
72
|
+
UseGroupByHooks<D>,
|
|
73
|
+
UseRowSelectHooks<D>,
|
|
74
|
+
UseSortByHooks<D> {}
|
|
75
|
+
|
|
76
|
+
export interface TableInstance<D extends Record<string, unknown> = Record<string, unknown>>
|
|
77
|
+
extends UseColumnOrderInstanceProps<D>,
|
|
78
|
+
UseExpandedInstanceProps<D>,
|
|
79
|
+
UseFiltersInstanceProps<D>,
|
|
80
|
+
UseGlobalFiltersInstanceProps<D>,
|
|
81
|
+
UseGroupByInstanceProps<D>,
|
|
82
|
+
UsePaginationInstanceProps<D>,
|
|
83
|
+
UseRowSelectInstanceProps<D>,
|
|
84
|
+
UseRowStateInstanceProps<D>,
|
|
85
|
+
UseSortByInstanceProps<D> {}
|
|
86
|
+
|
|
87
|
+
export interface TableState<D extends Record<string, unknown> = Record<string, unknown>>
|
|
88
|
+
extends UseColumnOrderState<D>,
|
|
89
|
+
UseExpandedState<D>,
|
|
90
|
+
UseFiltersState<D>,
|
|
91
|
+
UseGlobalFiltersState<D>,
|
|
92
|
+
UseGroupByState<D>,
|
|
93
|
+
UsePaginationState<D>,
|
|
94
|
+
UseResizeColumnsState<D>,
|
|
95
|
+
UseRowSelectState<D>,
|
|
96
|
+
UseRowStateState<D>,
|
|
97
|
+
UseSortByState<D> {}
|
|
98
|
+
|
|
99
|
+
export interface ColumnInterface<D extends Record<string, unknown> = Record<string, unknown>>
|
|
100
|
+
extends UseFiltersColumnOptions<D>,
|
|
101
|
+
UseGlobalFiltersColumnOptions<D>,
|
|
102
|
+
UseGroupByColumnOptions<D>,
|
|
103
|
+
UseResizeColumnsColumnOptions<D>,
|
|
104
|
+
UseSortByColumnOptions<D> {}
|
|
105
|
+
|
|
106
|
+
export interface ColumnInstance<D extends Record<string, unknown> = Record<string, unknown>>
|
|
107
|
+
extends UseFiltersColumnProps<D>,
|
|
108
|
+
UseGroupByColumnProps<D>,
|
|
109
|
+
UseResizeColumnsColumnProps<D>,
|
|
110
|
+
UseSortByColumnProps<D> {}
|
|
111
|
+
|
|
112
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
113
|
+
export interface Cell<D extends Record<string, unknown> = Record<string, unknown>, V = unknown>
|
|
114
|
+
extends UseGroupByCellProps<D>,
|
|
115
|
+
UseRowStateCellProps<D> {}
|
|
116
|
+
|
|
117
|
+
export interface Row<D extends Record<string, unknown> = Record<string, unknown>>
|
|
118
|
+
extends UseExpandedRowProps<D>,
|
|
119
|
+
UseGroupByRowProps<D>,
|
|
120
|
+
UseRowSelectRowProps<D>,
|
|
121
|
+
UseRowStateRowProps<D> {}
|
|
122
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
@import '../../style/index.less';
|
|
2
|
+
|
|
3
|
+
@ald-prefix:ant;
|
|
4
|
+
@ald-iconfont-css-prefix:anticon;
|
|
5
|
+
@table-row-height:40px;
|
|
6
|
+
.@{ald-prefix}-block-table {
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
|
|
9
|
+
&-thead {
|
|
10
|
+
.@{ald-prefix}-block-table-cell {
|
|
11
|
+
position: relative;
|
|
12
|
+
color: @NL50;
|
|
13
|
+
|
|
14
|
+
&-sorting {
|
|
15
|
+
color: @B40;
|
|
16
|
+
}
|
|
17
|
+
// border: 1px solid red;
|
|
18
|
+
|
|
19
|
+
.@{ald-prefix}-block-table-bar {
|
|
20
|
+
display: inline-block;
|
|
21
|
+
background: blue;
|
|
22
|
+
width: 1px;
|
|
23
|
+
height: 12px;
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 50%;
|
|
26
|
+
right: 0;
|
|
27
|
+
transform: translateY(-50%);
|
|
28
|
+
z-index: 1;
|
|
29
|
+
touch-action: none;
|
|
30
|
+
background-color: @NL95;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:last-child {
|
|
34
|
+
.@{ald-prefix}-block-table-bar {
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&-tbody {
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
|
|
44
|
+
&-scroll {
|
|
45
|
+
overflow-y: scroll;
|
|
46
|
+
overflow-y: overlay;
|
|
47
|
+
}
|
|
48
|
+
.@{ald-prefix}-block-table-row {
|
|
49
|
+
&:hover {
|
|
50
|
+
background-color: @NL97;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&-selected {
|
|
54
|
+
background-color: @BBG97;
|
|
55
|
+
|
|
56
|
+
&:hover {
|
|
57
|
+
background-color: @BBG97;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&:last-of-type {
|
|
62
|
+
.@{ald-prefix}-block-table-cell {
|
|
63
|
+
border-bottom: 1px solid transparent;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&-row {
|
|
70
|
+
max-width: 100%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&-cell {
|
|
74
|
+
padding: 0 12px;
|
|
75
|
+
height: @table-row-height;
|
|
76
|
+
line-height: @table-row-height;
|
|
77
|
+
border-bottom: 1px solid @NL95;
|
|
78
|
+
text-align: left;
|
|
79
|
+
color: @NL0;
|
|
80
|
+
overflow: hidden;
|
|
81
|
+
white-space: nowrap;
|
|
82
|
+
text-overflow: ellipsis;
|
|
83
|
+
flex-grow: 1;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&-loading {
|
|
87
|
+
text-align: center;
|
|
88
|
+
line-height: @table-row-height;
|
|
89
|
+
color: @NL80;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&-header {
|
|
93
|
+
display: flex;
|
|
94
|
+
justify-content: space-between;
|
|
95
|
+
padding: 0 10px;
|
|
96
|
+
align-items: center;
|
|
97
|
+
margin-bottom: 24px;
|
|
98
|
+
|
|
99
|
+
&-left {
|
|
100
|
+
font-weight: 500;
|
|
101
|
+
font-size: 14px;
|
|
102
|
+
color: @NL0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&-right {
|
|
106
|
+
display: flex;
|
|
107
|
+
height: 28px;
|
|
108
|
+
align-items: center;
|
|
109
|
+
font-size: 14px;
|
|
110
|
+
color: @NL0;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&-list {
|
|
115
|
+
overflow: overlay !important;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&-sortIcon {
|
|
119
|
+
margin-left: 4px;
|
|
120
|
+
margin-top: -2px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&-column-resizable {
|
|
124
|
+
overflow: overlay;
|
|
125
|
+
.@{ald-prefix}-block-table {
|
|
126
|
+
&-cell {
|
|
127
|
+
flex: none;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&-thead {
|
|
131
|
+
&::-webkit-scrollbar {
|
|
132
|
+
display: none;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&-tbody {
|
|
137
|
+
overflow: initial;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ITabPaneProps {
|
|
3
|
+
/**
|
|
4
|
+
* @description 被隐藏时是否渲染 DOM 结构
|
|
5
|
+
* @default false
|
|
6
|
+
*/
|
|
7
|
+
forceRender?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* @description 对应 activeKey
|
|
10
|
+
* @default -
|
|
11
|
+
*/
|
|
12
|
+
key?: string;
|
|
13
|
+
/**
|
|
14
|
+
* @description 选项卡头显示的内容
|
|
15
|
+
* @default -
|
|
16
|
+
*/
|
|
17
|
+
tab: ReactNode;
|
|
18
|
+
className?: string;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export default function TabPane(props: ITabPaneProps): JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
|
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import AntdTabs from 'antd/lib/tabs';
|
|
9
|
+
var AntdTabPane = AntdTabs.TabPane;
|
|
10
|
+
export default function TabPane(props) {
|
|
11
|
+
return /*#__PURE__*/React.createElement(AntdTabPane, _objectSpread({}, props));
|
|
12
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
import { Tabs } from '@aloudata/aloudata-design';
|
|
4
|
+
var TabPane = Tabs.TabPane;
|
|
5
|
+
export default (function () {
|
|
6
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7
|
+
className: "demo-adapt-height"
|
|
8
|
+
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
9
|
+
adaptHeight: true
|
|
10
|
+
}, /*#__PURE__*/React.createElement(TabPane, {
|
|
11
|
+
tab: "Tab 1",
|
|
12
|
+
key: "1",
|
|
13
|
+
className: "demo-tabpane"
|
|
14
|
+
}, "Content of Tab Pane 1"), /*#__PURE__*/React.createElement(TabPane, {
|
|
15
|
+
tab: "Tab 2",
|
|
16
|
+
key: "2",
|
|
17
|
+
className: "demo-tabpane"
|
|
18
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement("div", null, "Content of Tab Pane 2")))));
|
|
19
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
|
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
+
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
13
|
+
import React, { useState } from 'react';
|
|
14
|
+
import Switch from 'antd/lib/switch';
|
|
15
|
+
import 'antd/lib//switch/style/index.less';
|
|
16
|
+
import './index.less';
|
|
17
|
+
import { Tabs } from '@aloudata/aloudata-design';
|
|
18
|
+
var TabPane = Tabs.TabPane;
|
|
19
|
+
export default (function () {
|
|
20
|
+
var _useState = useState('default'),
|
|
21
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
+
size = _useState2[0],
|
|
23
|
+
setSize = _useState2[1];
|
|
24
|
+
|
|
25
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
className: "demo-basic"
|
|
27
|
+
}, /*#__PURE__*/React.createElement("div", null, "large size: ", /*#__PURE__*/React.createElement(Switch, {
|
|
28
|
+
checked: size === 'large',
|
|
29
|
+
onChange: function onChange(checked) {
|
|
30
|
+
return setSize(checked ? 'large' : 'default');
|
|
31
|
+
}
|
|
32
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
33
|
+
className: "tabs-container"
|
|
34
|
+
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
35
|
+
size: size,
|
|
36
|
+
destroyInactiveTabPane: true
|
|
37
|
+
}, /*#__PURE__*/React.createElement(TabPane, {
|
|
38
|
+
tab: "Tab 1",
|
|
39
|
+
key: "1"
|
|
40
|
+
}, "Content of Tab Pane 1"), /*#__PURE__*/React.createElement(TabPane, {
|
|
41
|
+
tab: "Tab 2",
|
|
42
|
+
key: "2"
|
|
43
|
+
}, "Content of Tab Pane 2"))));
|
|
44
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
import { Tabs } from '@aloudata/aloudata-design';
|
|
4
|
+
var TabPane = Tabs.TabPane;
|
|
5
|
+
export default (function () {
|
|
6
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7
|
+
className: "demo-horizontal-scroll"
|
|
8
|
+
}, /*#__PURE__*/React.createElement(Tabs, null, /*#__PURE__*/React.createElement(TabPane, {
|
|
9
|
+
tab: "Tab 1",
|
|
10
|
+
key: "1"
|
|
11
|
+
}, "Content of Tab Pane 1"), /*#__PURE__*/React.createElement(TabPane, {
|
|
12
|
+
tab: "Tab 2",
|
|
13
|
+
key: "2"
|
|
14
|
+
}, "Content of Tab Pane 2"), /*#__PURE__*/React.createElement(TabPane, {
|
|
15
|
+
tab: "Tab 3",
|
|
16
|
+
key: "3"
|
|
17
|
+
}, "Content of Tab Pane 3"), /*#__PURE__*/React.createElement(TabPane, {
|
|
18
|
+
tab: "Tab 4",
|
|
19
|
+
key: "4"
|
|
20
|
+
}, "Content of Tab Pane 4"), /*#__PURE__*/React.createElement(TabPane, {
|
|
21
|
+
tab: "Tab 5",
|
|
22
|
+
key: "5"
|
|
23
|
+
}, "Content of Tab Pane 5"), /*#__PURE__*/React.createElement(TabPane, {
|
|
24
|
+
tab: "Tab 6",
|
|
25
|
+
key: "6"
|
|
26
|
+
}, "Content of Tab Pane 6"), /*#__PURE__*/React.createElement(TabPane, {
|
|
27
|
+
tab: "Tab 7",
|
|
28
|
+
key: "7"
|
|
29
|
+
}, "Content of Tab Pane 7")));
|
|
30
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style';
|
|
3
|
+
export interface ITabsProps {
|
|
4
|
+
/**
|
|
5
|
+
* @description 大小
|
|
6
|
+
* @default default
|
|
7
|
+
*/
|
|
8
|
+
size?: 'large' | 'default';
|
|
9
|
+
/**
|
|
10
|
+
* @description 当前激活 tab 面板的 key
|
|
11
|
+
* @default -
|
|
12
|
+
*/
|
|
13
|
+
activeKey?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @description 初始化选中面板的 key,如果没有设置 activeKey
|
|
16
|
+
* @default 第一个面板的 key
|
|
17
|
+
*/
|
|
18
|
+
defaultActiveKey?: string;
|
|
19
|
+
/**
|
|
20
|
+
* @description 切换面板的回调
|
|
21
|
+
* @default -
|
|
22
|
+
*/
|
|
23
|
+
onChange?: (activeKey: string) => void;
|
|
24
|
+
/**
|
|
25
|
+
* @description 被隐藏时是否销毁 DOM 结构
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
destroyInactiveTabPane?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* @description 撑满容器的高度
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
adaptHeight?: boolean;
|
|
34
|
+
className?: string;
|
|
35
|
+
children?: React.ReactNode;
|
|
36
|
+
}
|
|
37
|
+
declare function Tabs(props: ITabsProps): JSX.Element;
|
|
38
|
+
declare namespace Tabs {
|
|
39
|
+
var TabPane: typeof import("./TabPane").default;
|
|
40
|
+
}
|
|
41
|
+
export default Tabs;
|
package/es/Tabs/index.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var _excluded = ["size", "className", "adaptHeight"];
|
|
2
|
+
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
+
|
|
7
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
|
|
9
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
+
|
|
11
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
+
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import AntdTabs from 'antd/lib/tabs';
|
|
15
|
+
import Icon from '../Icon';
|
|
16
|
+
import TabPane from './TabPane';
|
|
17
|
+
import classNames from 'classnames';
|
|
18
|
+
import './style';
|
|
19
|
+
export default function Tabs(props) {
|
|
20
|
+
var size = props.size,
|
|
21
|
+
className = props.className,
|
|
22
|
+
adaptHeight = props.adaptHeight,
|
|
23
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
24
|
+
|
|
25
|
+
var tabsProps = _objectSpread({}, otherProps);
|
|
26
|
+
|
|
27
|
+
if (size === 'large') {
|
|
28
|
+
tabsProps.size = size;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return /*#__PURE__*/React.createElement(AntdTabs, _objectSpread({
|
|
32
|
+
moreIcon: /*#__PURE__*/React.createElement(Icon, {
|
|
33
|
+
type: "more_vert",
|
|
34
|
+
size: 18
|
|
35
|
+
}),
|
|
36
|
+
tabBarGutter: 24,
|
|
37
|
+
className: classNames('ald-tabs', className, {
|
|
38
|
+
'ald-adapt-height': adaptHeight
|
|
39
|
+
})
|
|
40
|
+
}, tabsProps));
|
|
41
|
+
}
|
|
42
|
+
Tabs.TabPane = TabPane;
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tooltip } from '@aloudata/aloudata-design';
|
|
3
|
+
export default (function () {
|
|
4
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
5
|
+
title: "Tooltip"
|
|
6
|
+
}, /*#__PURE__*/React.createElement("span", null, "Tooltip will show on mouse enter")));
|
|
7
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tooltip } from '@aloudata/aloudata-design';
|
|
3
|
+
export default (function () {
|
|
4
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
5
|
+
title: "longMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsglongMsg"
|
|
6
|
+
}, /*#__PURE__*/React.createElement("span", null, "Tooltip will show on mouse enter")));
|
|
7
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* title: 调整位置
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { Tooltip, Button } from '@aloudata/aloudata-design';
|
|
6
|
+
import './index.less';
|
|
7
|
+
var text = /*#__PURE__*/React.createElement("span", null, "prompt text");
|
|
8
|
+
var buttonWidth = 70;
|
|
9
|
+
export default (function () {
|
|
10
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11
|
+
className: "demo-placement"
|
|
12
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
style: {
|
|
14
|
+
marginLeft: buttonWidth,
|
|
15
|
+
whiteSpace: 'nowrap'
|
|
16
|
+
}
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
18
|
+
placement: "topLeft",
|
|
19
|
+
title: text
|
|
20
|
+
}, /*#__PURE__*/React.createElement(Button, null, "TL")), /*#__PURE__*/React.createElement(Tooltip, {
|
|
21
|
+
placement: "top",
|
|
22
|
+
title: text
|
|
23
|
+
}, /*#__PURE__*/React.createElement(Button, null, "Top")), /*#__PURE__*/React.createElement(Tooltip, {
|
|
24
|
+
placement: "topRight",
|
|
25
|
+
title: text
|
|
26
|
+
}, /*#__PURE__*/React.createElement(Button, null, "TR"))), /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
style: {
|
|
28
|
+
width: buttonWidth,
|
|
29
|
+
float: 'left'
|
|
30
|
+
}
|
|
31
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
32
|
+
placement: "leftTop",
|
|
33
|
+
title: text
|
|
34
|
+
}, /*#__PURE__*/React.createElement(Button, null, "LT")), /*#__PURE__*/React.createElement(Tooltip, {
|
|
35
|
+
placement: "left",
|
|
36
|
+
title: text
|
|
37
|
+
}, /*#__PURE__*/React.createElement(Button, null, "Left")), /*#__PURE__*/React.createElement(Tooltip, {
|
|
38
|
+
placement: "leftBottom",
|
|
39
|
+
title: text
|
|
40
|
+
}, /*#__PURE__*/React.createElement(Button, null, "LB"))), /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
style: {
|
|
42
|
+
width: buttonWidth,
|
|
43
|
+
marginLeft: buttonWidth * 4 + 24
|
|
44
|
+
}
|
|
45
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
46
|
+
placement: "rightTop",
|
|
47
|
+
title: text
|
|
48
|
+
}, /*#__PURE__*/React.createElement(Button, null, "RT")), /*#__PURE__*/React.createElement(Tooltip, {
|
|
49
|
+
placement: "right",
|
|
50
|
+
title: text
|
|
51
|
+
}, /*#__PURE__*/React.createElement(Button, null, "Right")), /*#__PURE__*/React.createElement(Tooltip, {
|
|
52
|
+
placement: "rightBottom",
|
|
53
|
+
title: text
|
|
54
|
+
}, /*#__PURE__*/React.createElement(Button, null, "RB"))), /*#__PURE__*/React.createElement("div", {
|
|
55
|
+
style: {
|
|
56
|
+
marginLeft: buttonWidth,
|
|
57
|
+
clear: 'both',
|
|
58
|
+
whiteSpace: 'nowrap'
|
|
59
|
+
}
|
|
60
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
61
|
+
placement: "bottomLeft",
|
|
62
|
+
title: text
|
|
63
|
+
}, /*#__PURE__*/React.createElement(Button, null, "BL")), /*#__PURE__*/React.createElement(Tooltip, {
|
|
64
|
+
placement: "bottom",
|
|
65
|
+
title: text
|
|
66
|
+
}, /*#__PURE__*/React.createElement(Button, null, "Bottom")), /*#__PURE__*/React.createElement(Tooltip, {
|
|
67
|
+
placement: "bottomRight",
|
|
68
|
+
title: text
|
|
69
|
+
}, /*#__PURE__*/React.createElement(Button, null, "BR"))));
|
|
70
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tooltip, Button } from '@aloudata/aloudata-design';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export default (function () {
|
|
5
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
6
|
+
className: "demo-trigger"
|
|
7
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
8
|
+
title: "Tooltip",
|
|
9
|
+
trigger: "hover"
|
|
10
|
+
}, /*#__PURE__*/React.createElement(Button, null, "hover")), /*#__PURE__*/React.createElement(Tooltip, {
|
|
11
|
+
title: "Tooltip",
|
|
12
|
+
trigger: "click"
|
|
13
|
+
}, /*#__PURE__*/React.createElement(Button, null, "click")), /*#__PURE__*/React.createElement(Tooltip, {
|
|
14
|
+
title: "Tooltip",
|
|
15
|
+
trigger: "contextMenu"
|
|
16
|
+
}, /*#__PURE__*/React.createElement(Button, null, "contextMenu")), /*#__PURE__*/React.createElement(Tooltip, {
|
|
17
|
+
title: "Tooltip",
|
|
18
|
+
trigger: "focus"
|
|
19
|
+
}, /*#__PURE__*/React.createElement(Button, null, "focus"))));
|
|
20
|
+
});
|
|
File without changes
|