@zat-design/sisyphus-react 3.14.0-beta.2 → 4.0.0-beta.10
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 +77 -207
- package/babel.config.js +2 -2
- package/dist/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/FormsProvider/index.d.ts +4 -1
- package/es/ProAction/components/CheckModalContent/index.js +0 -9
- package/es/ProAction/index.js +3 -6
- package/es/ProAction/index.less +0 -2
- package/es/ProConfigProvider/index.d.ts +22 -5
- package/es/ProConfigProvider/index.js +58 -26
- package/es/ProDownload/index.js +2 -3
- package/es/ProDownload/style/index.less +0 -2
- package/es/ProDownload/utils.js +3 -4
- package/es/ProDrawerForm/components/ProDrawer/index.js +13 -17
- package/es/ProDrawerForm/components/ProModal/index.js +12 -20
- package/es/ProDrawerForm/index.d.ts +2 -1
- package/es/ProDrawerForm/index.js +35 -33
- package/es/ProDrawerForm/propsType.d.ts +7 -18
- package/es/ProDrawerForm/style/index.less +6 -14
- package/es/ProEditLabel/components/RenderProForm.js +2 -3
- package/es/ProEditLabel/index.js +10 -15
- package/es/ProEditLabel/propsType.d.ts +1 -6
- package/es/ProEditLabel/style/index.less +2 -3
- package/es/ProEditTable/components/ActionButton/index.js +5 -8
- package/es/ProEditTable/components/RcTable/BaseTable.js +70 -53
- package/es/ProEditTable/components/RcTable/DraggableTable.js +70 -49
- package/es/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/es/ProEditTable/components/RcTable/index.js +1 -3
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
- package/es/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/es/ProEditTable/components/RenderField/index.js +401 -241
- package/es/ProEditTable/components/RenderToolbar/index.js +5 -5
- package/es/ProEditTable/components/Summary/index.js +5 -8
- package/es/ProEditTable/components/Validator/index.js +3 -6
- package/es/ProEditTable/index.js +99 -103
- package/es/ProEditTable/propsType.d.ts +7 -7
- package/es/ProEditTable/style/index.less +12 -12
- package/es/ProEditTable/utils/config.js +6 -7
- package/es/ProEditTable/utils/index.js +21 -17
- package/es/ProEditTable/utils/useEditTableError.js +12 -4
- package/es/ProEditTable/utils/useShouldUpdateForTable.d.ts +15 -0
- package/es/ProEditTable/utils/useShouldUpdateForTable.js +132 -0
- package/es/ProEnum/hooks/useEnum.js +5 -0
- package/es/ProEnum/hooks/useEnumRequest.js +3 -3
- package/es/ProEnum/index.js +10 -17
- package/es/ProEnum/style/index.less +0 -2
- package/es/ProEnum/utils/index.d.ts +1 -0
- package/es/ProEnum/utils/index.js +3 -7
- package/es/ProForm/components/Container.d.ts +1 -0
- package/es/ProForm/components/Container.js +2 -3
- package/es/ProForm/components/FormFooter/index.js +18 -19
- package/es/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/es/ProForm/components/base/Checkbox/index.js +3 -4
- package/es/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/es/ProForm/components/base/DatePicker/index.js +7 -7
- package/es/ProForm/components/base/DatePicker/useDateLimit.d.ts +3 -0
- package/es/ProForm/components/base/DatePicker/useDateLimit.js +11 -0
- package/es/ProForm/components/base/Input/index.js +10 -8
- package/es/ProForm/components/base/InputNumber/index.js +3 -6
- package/es/ProForm/components/base/Radio/index.js +3 -4
- package/es/ProForm/components/base/RangePicker/index.js +7 -6
- package/es/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/es/ProForm/components/base/Select/index.js +2 -3
- package/es/ProForm/components/base/Switch/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/style/index.less +0 -2
- package/es/ProForm/components/base/TextArea/index.js +3 -4
- package/es/ProForm/components/base/TextArea/index.less +10 -2
- package/es/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/es/ProForm/components/base/TimePicker/index.js +6 -7
- package/es/ProForm/components/base/TimePicker/style/index.less +3 -3
- package/es/ProForm/components/combination/Container/style/index.less +0 -2
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +15 -13
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +5 -8
- package/es/ProForm/components/combination/FormList/components/Empty.js +2 -3
- package/es/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +5 -8
- package/es/ProForm/components/combination/FormList/index.js +2 -3
- package/es/ProForm/components/combination/FormList/style/index.less +36 -2
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/es/ProForm/components/combination/Group/component/ComRender.js +0 -1
- package/es/ProForm/components/combination/Group/index.js +3 -4
- package/es/ProForm/components/combination/Group/style/index.less +7 -87
- package/es/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/es/ProForm/components/combination/Group/utils.js +4 -5
- package/es/ProForm/components/combination/ProCascader/index.js +13 -15
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/style/index.less +0 -2
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +24 -39
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +11 -15
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/es/ProForm/components/combination/ProNumberRange/index.js +21 -21
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +3 -54
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/es/ProForm/components/combination/ProRangeLimit/index.js +42 -25
- package/es/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/es/ProForm/components/combination/ProTimeLimit/index.js +23 -20
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +64 -6
- package/es/ProForm/components/index.d.ts +2 -9
- package/es/ProForm/components/index.js +1 -11
- package/es/ProForm/components/render/ChangedWrapper.js +8 -9
- package/es/ProForm/components/render/ConfirmWrapper.js +7 -7
- package/es/ProForm/components/render/Render.js +29 -30
- package/es/ProForm/components/render/RenderFields.d.ts +1 -0
- package/es/ProForm/components/render/RenderFields.js +6 -3
- package/es/ProForm/components/render/propsType.d.ts +3 -6
- package/es/ProForm/index.d.ts +2 -2
- package/es/ProForm/index.js +14 -42
- package/es/ProForm/propsType.d.ts +3 -0
- package/es/ProForm/style/index.less +4 -16
- package/es/ProForm/utils/index.d.ts +15 -1
- package/es/ProForm/utils/index.js +66 -15
- package/es/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/es/ProForm/utils/useForm.js +27 -22
- package/es/ProForm/utils/useShouldUpdate.d.ts +1 -0
- package/es/ProForm/utils/useShouldUpdate.js +103 -17
- package/es/ProIcon/index.js +10 -13
- package/es/ProIcon/style/index.less +0 -2
- package/es/ProLayout/components/Layout/Header/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -6
- package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +40 -39
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -3
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +0 -3
- package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +7 -5
- package/es/ProLayout/components/Layout/Menu/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/style/index.less +0 -2
- package/es/ProLayout/components/Layout/Notice/style/index.less +0 -2
- package/es/ProLayout/components/ProCollapse/index.js +29 -44
- package/es/ProLayout/components/ProCollapse/style/index.less +5 -4
- package/es/ProLayout/components/ProFooter/index.js +2 -3
- package/es/ProLayout/components/ProFooter/style/index.less +0 -2
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +7 -9
- package/es/ProLayout/components/ProHeader/index.js +43 -45
- package/es/ProLayout/components/ProHeader/style/index.less +0 -2
- package/es/ProLayout/components/TabsManager/components/TabContextMenu.js +2 -3
- package/es/ProLayout/components/TabsManager/hooks/useTabsState.js +0 -2
- package/es/ProLayout/index.js +80 -41
- package/es/ProLayout/style/index.less +2 -3
- package/es/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/es/ProSelect/index.js +7 -15
- package/es/ProSelect/index.less +0 -2
- package/es/ProSelect/propsType.d.ts +1 -1
- package/es/ProStep/components/Anchor/index.js +2 -3
- package/es/ProStep/components/Item/index.js +1 -0
- package/es/ProStep/components/Step/index.js +1 -0
- package/es/ProStep/style/index.less +2 -4
- package/es/ProTable/components/FormatColumn/index.js +33 -31
- package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +17 -13
- package/es/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
- package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/es/ProTable/components/RenderColumn/index.js +15 -18
- package/es/ProTable/components/RenderSummary/index.js +4 -5
- package/es/ProTable/components/RenderTableHeader/index.js +3 -4
- package/es/ProTable/components/RenderTabs/index.js +3 -6
- package/es/ProTable/components/TableResizable/index.js +2 -1
- package/es/ProTable/components/TooltipTitle/index.js +2 -3
- package/es/ProTable/hooks/useAntdTable.js +4 -7
- package/es/ProTable/index.d.ts +0 -7
- package/es/ProTable/index.js +11 -14
- package/es/ProTable/propsType.d.ts +2 -3
- package/es/ProTable/style/index.less +4 -6
- package/es/ProTabs/components/Card/index.js +5 -10
- package/es/ProTabs/index.js +2 -3
- package/es/ProTabs/style/index.less +0 -2
- package/es/ProThemeTools/component/ProTools/index.js +18 -22
- package/es/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/es/ProThemeTools/context/ThemeContext.js +136 -0
- package/es/ProThemeTools/index.d.ts +4 -8
- package/es/ProThemeTools/index.js +80 -49
- package/es/ProThemeTools/style/index.less +1 -3
- package/es/ProThemeTools/utils/index.d.ts +16 -6
- package/es/ProThemeTools/utils/index.js +30 -24
- package/es/ProTooltip/index.js +14 -9
- package/es/ProTooltip/style/index.less +0 -2
- package/es/ProTree/components/AdaptiveTooltip.js +2 -3
- package/es/ProTree/components/List.js +3 -4
- package/es/ProTree/components/ProTree.js +5 -12
- package/es/ProTree/components/ProTreeSelect/index.js +28 -26
- package/es/ProTree/components/ProTreeSelect/style/index.less +0 -2
- package/es/ProTree/components/Tree.js +6 -13
- package/es/ProTree/index.js +0 -7
- package/es/ProTree/propsType.d.ts +1 -1
- package/es/ProTree/style/index.less +8 -6
- package/es/ProTreeModal/components/Cascader.js +3 -4
- package/es/ProTreeModal/components/List.js +11 -17
- package/es/ProTreeModal/components/SortableItem.js +2 -3
- package/es/ProTreeModal/components/Tree.js +3 -4
- package/es/ProTreeModal/components/Trigger.js +6 -11
- package/es/ProTreeModal/index.d.ts +0 -1
- package/es/ProTreeModal/index.js +10 -20
- package/es/ProTreeModal/style/index.less +12 -3
- package/es/ProUpload/components/ButtonRender.js +4 -7
- package/es/ProUpload/components/DragRender.js +2 -3
- package/es/ProUpload/components/FileItem.d.ts +0 -1
- package/es/ProUpload/components/FileItem.js +15 -21
- package/es/ProUpload/components/ImageRender.js +8 -17
- package/es/ProUpload/index.js +3 -4
- package/es/ProUpload/style/index.less +171 -12
- package/es/ProViewer/index.js +28 -35
- package/es/ProViewer/propsType.js +3 -0
- package/es/ProViewer/style/index.less +0 -2
- package/es/ProWaterMark/index.js +2 -3
- package/es/ProWaterMark/propsType.d.ts +5 -24
- package/es/global.less +2 -1
- package/es/index.d.ts +3 -3
- package/es/index.js +5 -5
- package/es/locale/en_US.js +1 -1
- package/es/locale/index.d.ts +2 -0
- package/es/locale/index.js +13 -2
- package/es/locale/zh_CN.js +1 -1
- package/es/style/components.less +0 -3
- package/es/style/index.less +1 -1
- package/es/style/theme/antd.less +36 -48
- package/es/style/theme/base.less +90 -0
- package/es/style/theme/index.less +2 -89
- package/es/utils/index.d.ts +7 -0
- package/es/utils/index.js +37 -1
- package/lib/FormsProvider/index.d.ts +4 -1
- package/lib/ProAction/components/CheckModalContent/index.js +0 -9
- package/lib/ProAction/index.js +3 -6
- package/lib/ProAction/index.less +0 -2
- package/lib/ProConfigProvider/index.d.ts +22 -5
- package/lib/ProConfigProvider/index.js +58 -26
- package/lib/ProDownload/index.js +2 -3
- package/lib/ProDownload/style/index.less +0 -2
- package/lib/ProDownload/utils.js +3 -4
- package/lib/ProDrawerForm/components/ProDrawer/index.js +13 -17
- package/lib/ProDrawerForm/components/ProModal/index.js +12 -20
- package/lib/ProDrawerForm/index.d.ts +2 -1
- package/lib/ProDrawerForm/index.js +35 -33
- package/lib/ProDrawerForm/propsType.d.ts +7 -18
- package/lib/ProDrawerForm/style/index.less +6 -14
- package/lib/ProEditLabel/components/RenderProForm.js +2 -3
- package/lib/ProEditLabel/index.js +10 -15
- package/lib/ProEditLabel/propsType.d.ts +1 -6
- package/lib/ProEditLabel/style/index.less +2 -3
- package/lib/ProEditTable/components/ActionButton/index.js +5 -8
- package/lib/ProEditTable/components/RcTable/BaseTable.js +69 -52
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +69 -48
- package/lib/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/lib/ProEditTable/components/RcTable/index.js +1 -8
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
- package/lib/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/lib/ProEditTable/components/RenderField/index.js +401 -241
- package/lib/ProEditTable/components/RenderToolbar/index.js +5 -5
- package/lib/ProEditTable/components/Summary/index.js +5 -9
- package/lib/ProEditTable/components/Validator/index.js +3 -7
- package/lib/ProEditTable/index.js +96 -100
- package/lib/ProEditTable/propsType.d.ts +7 -7
- package/lib/ProEditTable/style/index.less +12 -12
- package/lib/ProEditTable/utils/config.js +6 -7
- package/lib/ProEditTable/utils/index.js +20 -16
- package/lib/ProEditTable/utils/useEditTableError.js +12 -4
- package/lib/ProEditTable/utils/useShouldUpdateForTable.d.ts +15 -0
- package/lib/ProEditTable/utils/useShouldUpdateForTable.js +139 -0
- package/lib/ProEnum/hooks/useEnum.js +5 -0
- package/lib/ProEnum/hooks/useEnumRequest.js +2 -2
- package/lib/ProEnum/index.js +10 -17
- package/lib/ProEnum/style/index.less +0 -2
- package/lib/ProEnum/utils/index.d.ts +1 -0
- package/lib/ProEnum/utils/index.js +4 -7
- package/lib/ProForm/components/Container.d.ts +1 -0
- package/lib/ProForm/components/Container.js +2 -3
- package/lib/ProForm/components/FormFooter/index.js +18 -19
- package/lib/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/lib/ProForm/components/base/Checkbox/index.js +3 -4
- package/lib/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/lib/ProForm/components/base/DatePicker/index.js +7 -7
- package/lib/ProForm/components/base/DatePicker/useDateLimit.d.ts +3 -0
- package/lib/ProForm/components/base/DatePicker/useDateLimit.js +19 -0
- package/lib/ProForm/components/base/Input/index.js +10 -8
- package/lib/ProForm/components/base/InputNumber/index.js +3 -6
- package/lib/ProForm/components/base/Radio/index.js +3 -4
- package/lib/ProForm/components/base/RangePicker/index.js +6 -6
- package/lib/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/lib/ProForm/components/base/Select/index.js +2 -3
- package/lib/ProForm/components/base/Switch/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +0 -2
- package/lib/ProForm/components/base/TextArea/index.js +3 -4
- package/lib/ProForm/components/base/TextArea/index.less +10 -2
- package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/lib/ProForm/components/base/TimePicker/index.js +6 -7
- package/lib/ProForm/components/base/TimePicker/style/index.less +3 -3
- package/lib/ProForm/components/combination/Container/style/index.less +0 -2
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +15 -13
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +6 -9
- package/lib/ProForm/components/combination/FormList/components/Empty.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +4 -7
- package/lib/ProForm/components/combination/FormList/index.js +2 -3
- package/lib/ProForm/components/combination/FormList/style/index.less +36 -2
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/lib/ProForm/components/combination/Group/component/ComRender.js +0 -1
- package/lib/ProForm/components/combination/Group/index.js +3 -4
- package/lib/ProForm/components/combination/Group/style/index.less +7 -87
- package/lib/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/lib/ProForm/components/combination/Group/utils.js +4 -5
- package/lib/ProForm/components/combination/ProCascader/index.js +12 -14
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/style/index.less +0 -2
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +24 -39
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +11 -15
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/lib/ProForm/components/combination/ProNumberRange/index.js +20 -20
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +3 -54
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +42 -25
- package/lib/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +23 -20
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +64 -6
- package/lib/ProForm/components/index.d.ts +2 -9
- package/lib/ProForm/components/index.js +1 -63
- package/lib/ProForm/components/render/ChangedWrapper.js +8 -9
- package/lib/ProForm/components/render/ConfirmWrapper.js +7 -7
- package/lib/ProForm/components/render/Render.js +29 -30
- package/lib/ProForm/components/render/RenderFields.d.ts +1 -0
- package/lib/ProForm/components/render/RenderFields.js +6 -3
- package/lib/ProForm/components/render/propsType.d.ts +3 -6
- package/lib/ProForm/index.d.ts +2 -2
- package/lib/ProForm/index.js +13 -42
- package/lib/ProForm/propsType.d.ts +3 -0
- package/lib/ProForm/style/index.less +4 -16
- package/lib/ProForm/utils/index.d.ts +15 -1
- package/lib/ProForm/utils/index.js +69 -17
- package/lib/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/lib/ProForm/utils/useForm.js +26 -21
- package/lib/ProForm/utils/useShouldUpdate.d.ts +1 -0
- package/lib/ProForm/utils/useShouldUpdate.js +101 -15
- package/lib/ProIcon/index.js +10 -13
- package/lib/ProIcon/style/index.less +0 -2
- package/lib/ProLayout/components/Layout/Header/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -6
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +40 -39
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -3
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +0 -3
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +7 -5
- package/lib/ProLayout/components/Layout/Menu/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/style/index.less +0 -2
- package/lib/ProLayout/components/Layout/Notice/style/index.less +0 -2
- package/lib/ProLayout/components/ProCollapse/index.js +29 -44
- package/lib/ProLayout/components/ProCollapse/style/index.less +5 -4
- package/lib/ProLayout/components/ProFooter/index.js +2 -3
- package/lib/ProLayout/components/ProFooter/style/index.less +0 -2
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +7 -9
- package/lib/ProLayout/components/ProHeader/index.js +44 -47
- package/lib/ProLayout/components/ProHeader/style/index.less +0 -2
- package/lib/ProLayout/components/TabsManager/components/TabContextMenu.js +2 -3
- package/lib/ProLayout/components/TabsManager/hooks/useTabsState.js +0 -2
- package/lib/ProLayout/index.js +79 -40
- package/lib/ProLayout/style/index.less +2 -3
- package/lib/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/lib/ProSelect/index.js +7 -15
- package/lib/ProSelect/index.less +0 -2
- package/lib/ProSelect/propsType.d.ts +1 -1
- package/lib/ProStep/components/Anchor/index.js +2 -3
- package/lib/ProStep/components/Item/index.js +1 -1
- package/lib/ProStep/components/Step/index.js +1 -0
- package/lib/ProStep/style/index.less +2 -4
- package/lib/ProTable/components/FormatColumn/index.js +33 -31
- package/lib/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +16 -13
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
- package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/lib/ProTable/components/RenderColumn/index.js +15 -18
- package/lib/ProTable/components/RenderSummary/index.js +4 -6
- package/lib/ProTable/components/RenderTableHeader/index.js +3 -5
- package/lib/ProTable/components/RenderTabs/index.js +3 -6
- package/lib/ProTable/components/TableResizable/index.js +2 -1
- package/lib/ProTable/components/TooltipTitle/index.js +2 -3
- package/lib/ProTable/hooks/useAntdTable.js +4 -7
- package/lib/ProTable/index.d.ts +0 -7
- package/lib/ProTable/index.js +10 -13
- package/lib/ProTable/propsType.d.ts +2 -3
- package/lib/ProTable/style/index.less +4 -6
- package/lib/ProTabs/components/Card/index.js +5 -11
- package/lib/ProTabs/index.js +2 -3
- package/lib/ProTabs/style/index.less +0 -2
- package/lib/ProThemeTools/component/ProTools/index.js +18 -22
- package/lib/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/lib/ProThemeTools/context/ThemeContext.js +145 -0
- package/lib/ProThemeTools/index.d.ts +4 -8
- package/lib/ProThemeTools/index.js +88 -48
- package/lib/ProThemeTools/style/index.less +1 -3
- package/lib/ProThemeTools/utils/index.d.ts +16 -6
- package/lib/ProThemeTools/utils/index.js +34 -27
- package/lib/ProTooltip/index.js +14 -9
- package/lib/ProTooltip/style/index.less +0 -2
- package/lib/ProTree/components/AdaptiveTooltip.js +2 -4
- package/lib/ProTree/components/List.js +3 -4
- package/lib/ProTree/components/ProTree.js +5 -12
- package/lib/ProTree/components/ProTreeSelect/index.js +28 -26
- package/lib/ProTree/components/ProTreeSelect/style/index.less +0 -2
- package/lib/ProTree/components/Tree.js +6 -13
- package/lib/ProTree/index.js +0 -8
- package/lib/ProTree/propsType.d.ts +1 -1
- package/lib/ProTree/style/index.less +8 -6
- package/lib/ProTreeModal/components/Cascader.js +3 -4
- package/lib/ProTreeModal/components/List.js +11 -17
- package/lib/ProTreeModal/components/SortableItem.js +2 -3
- package/lib/ProTreeModal/components/Tree.js +3 -4
- package/lib/ProTreeModal/components/Trigger.js +6 -11
- package/lib/ProTreeModal/index.d.ts +0 -1
- package/lib/ProTreeModal/index.js +10 -20
- package/lib/ProTreeModal/style/index.less +12 -3
- package/lib/ProUpload/components/ButtonRender.js +4 -7
- package/lib/ProUpload/components/DragRender.js +2 -3
- package/lib/ProUpload/components/FileItem.d.ts +0 -1
- package/lib/ProUpload/components/FileItem.js +15 -21
- package/lib/ProUpload/components/ImageRender.js +8 -17
- package/lib/ProUpload/index.js +3 -4
- package/lib/ProUpload/style/index.less +171 -12
- package/lib/ProViewer/index.js +30 -36
- package/lib/ProViewer/propsType.js +3 -1
- package/lib/ProViewer/style/index.less +0 -2
- package/lib/ProWaterMark/index.js +3 -4
- package/lib/ProWaterMark/propsType.d.ts +5 -24
- package/lib/global.less +2 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js +34 -21
- package/lib/locale/en_US.js +1 -1
- package/lib/locale/index.d.ts +2 -0
- package/lib/locale/index.js +14 -3
- package/lib/locale/zh_CN.js +1 -1
- package/lib/style/components.less +0 -3
- package/lib/style/index.less +1 -1
- package/lib/style/theme/antd.less +36 -48
- package/lib/style/theme/base.less +90 -0
- package/lib/style/theme/index.less +2 -89
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.js +41 -2
- package/package.json +37 -25
- package/es/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/es/ProEditTable/components/RcTable/VirtualTable.js +0 -9
- package/es/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/es/ProForm/components/combination/ProCombination/index.js +0 -208
- package/es/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/es/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -110
- package/es/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/es/ProForm/components/old/EnumSelect/index.js +0 -265
- package/es/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/es/ProForm/components/old/EnumSelect/interface.js +0 -1
- package/es/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/es/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/es/ProForm/components/old/InputRange/index.js +0 -101
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/es/ProForm/components/old/InputWithSuffix/index.js +0 -47
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/es/ProForm/components/old/ProAddress/index.js +0 -276
- package/es/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/es/ProForm/components/old/ProAddress/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/es/ProForm/components/old/ProCertNo/index.js +0 -66
- package/es/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/es/ProForm/components/old/ProCertNo/propsType.js +0 -1
- package/es/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/es/ProForm/components/old/ProCertValidity/index.js +0 -186
- package/es/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/ProForm/components/old/ProCertValidity/propsType.js +0 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/es/ProForm/components/old/ProRangeBox/index.js +0 -98
- package/es/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/es/ProForm/components/old/ProRangeBox/propsType.js +0 -1
- package/es/ProUpload/style/fileItem.less +0 -159
- package/es/old/ProCertValidity/index.d.ts +0 -9
- package/es/old/ProCertValidity/index.js +0 -186
- package/es/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/old/ProCertValidity/propsType.js +0 -1
- package/es/old/ProEditableTable/index.d.ts +0 -4
- package/es/old/ProEditableTable/index.js +0 -594
- package/es/old/ProEditableTable/propsType.d.ts +0 -68
- package/es/old/ProEditableTable/propsType.js +0 -1
- package/es/old/ProEditableTable/style/index.less +0 -75
- package/es/old/ProEditableTable/utils.d.ts +0 -29
- package/es/old/ProEditableTable/utils.js +0 -321
- package/lib/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/lib/ProEditTable/components/RcTable/VirtualTable.js +0 -14
- package/lib/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/lib/ProForm/components/combination/ProCombination/index.js +0 -217
- package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/lib/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -117
- package/lib/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/lib/ProForm/components/old/EnumSelect/index.js +0 -271
- package/lib/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/lib/ProForm/components/old/EnumSelect/interface.js +0 -5
- package/lib/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/lib/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/lib/ProForm/components/old/InputRange/index.js +0 -108
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/lib/ProForm/components/old/InputWithSuffix/index.js +0 -53
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/lib/ProForm/components/old/ProAddress/index.js +0 -284
- package/lib/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/lib/ProForm/components/old/ProAddress/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/lib/ProForm/components/old/ProCertNo/index.js +0 -72
- package/lib/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/lib/ProForm/components/old/ProCertNo/propsType.js +0 -5
- package/lib/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/lib/ProForm/components/old/ProCertValidity/index.js +0 -192
- package/lib/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/ProForm/components/old/ProCertValidity/propsType.js +0 -5
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/lib/ProForm/components/old/ProRangeBox/index.js +0 -105
- package/lib/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/lib/ProForm/components/old/ProRangeBox/propsType.js +0 -5
- package/lib/ProUpload/style/fileItem.less +0 -159
- package/lib/old/ProCertValidity/index.d.ts +0 -9
- package/lib/old/ProCertValidity/index.js +0 -192
- package/lib/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/old/ProCertValidity/propsType.js +0 -5
- package/lib/old/ProEditableTable/index.d.ts +0 -4
- package/lib/old/ProEditableTable/index.js +0 -598
- package/lib/old/ProEditableTable/propsType.d.ts +0 -68
- package/lib/old/ProEditableTable/propsType.js +0 -5
- package/lib/old/ProEditableTable/style/index.less +0 -75
- package/lib/old/ProEditableTable/utils.d.ts +0 -29
- package/lib/old/ProEditableTable/utils.js +0 -329
- /package/es/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
- /package/lib/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _Tag from "antd/es/tag";
|
|
3
|
-
import "antd/es/space/style";
|
|
4
|
-
import _Space from "antd/es/space";
|
|
5
|
-
import "antd/es/spin/style";
|
|
6
|
-
import _Spin from "antd/es/spin";
|
|
1
|
+
import { Space, Tag, Spin } from 'antd';
|
|
7
2
|
import { LoadingOutlined } from '@ant-design/icons';
|
|
8
3
|
import { tools } from '@zat-design/utils';
|
|
9
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -23,14 +18,14 @@ var Card = props => {
|
|
|
23
18
|
});
|
|
24
19
|
return /*#__PURE__*/_jsx("div", {
|
|
25
20
|
className: "pro-tabs-card",
|
|
26
|
-
children: mode === 'card' ? /*#__PURE__*/_jsxs(
|
|
21
|
+
children: mode === 'card' ? /*#__PURE__*/_jsxs(Space, {
|
|
27
22
|
size: 8,
|
|
28
23
|
align: size === 'small' ? 'start' : 'center',
|
|
29
24
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
30
25
|
className: "pro-tabs-card-left",
|
|
31
26
|
children: [/*#__PURE__*/_jsx("div", {
|
|
32
27
|
className: "pro-tabs-card-left-total",
|
|
33
|
-
children: loading ? /*#__PURE__*/_jsx(
|
|
28
|
+
children: loading ? /*#__PURE__*/_jsx(Spin, {
|
|
34
29
|
indicator: antIcon
|
|
35
30
|
}) : tools.formatAmount(total, 0) || 0
|
|
36
31
|
}), /*#__PURE__*/_jsx("div", {
|
|
@@ -41,10 +36,10 @@ var Card = props => {
|
|
|
41
36
|
className: "pro-tabs-card-right",
|
|
42
37
|
children: icon || '-'
|
|
43
38
|
})]
|
|
44
|
-
}) : /*#__PURE__*/_jsxs(
|
|
39
|
+
}) : /*#__PURE__*/_jsxs(Space, {
|
|
45
40
|
size: 8,
|
|
46
41
|
align: "center",
|
|
47
|
-
children: [label, /*#__PURE__*/_jsx(
|
|
42
|
+
children: [label, /*#__PURE__*/_jsx(Tag, {
|
|
48
43
|
color: "#FF5050",
|
|
49
44
|
children: total >= 100 ? '99+' : total || 0
|
|
50
45
|
})]
|
package/es/ProTabs/index.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import "antd/es/tabs/style";
|
|
2
|
-
import _Tabs from "antd/es/tabs";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
4
|
var _excluded = ["style", "className", "dataSource", "onChange", "transformResponse", "useRequest", "tabSearch", "mode"];
|
|
7
5
|
/* eslint-disable @typescript-eslint/consistent-type-assertions */
|
|
8
6
|
import React, { useMemo, useState, forwardRef, useImperativeHandle } from 'react';
|
|
7
|
+
import { Tabs } from 'antd';
|
|
9
8
|
import { useDeepCompareEffect, useRequest as useRequestFunc } from 'ahooks';
|
|
10
9
|
import classNames from 'classnames';
|
|
11
10
|
import { omit } from 'lodash';
|
|
@@ -109,7 +108,7 @@ var ProTabs = (props, ref) => {
|
|
|
109
108
|
return /*#__PURE__*/_jsx("div", {
|
|
110
109
|
style: style,
|
|
111
110
|
className: cls,
|
|
112
|
-
children: /*#__PURE__*/_jsx(
|
|
111
|
+
children: /*#__PURE__*/_jsx(Tabs, _objectSpread(_objectSpread({
|
|
113
112
|
animated: false
|
|
114
113
|
}, rest), {}, {
|
|
115
114
|
items: _items,
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import "antd/es/button/style";
|
|
2
|
-
import _Button from "antd/es/button";
|
|
3
|
-
import "antd/es/switch/style";
|
|
4
|
-
import _Switch from "antd/es/switch";
|
|
5
|
-
import "antd/es/radio/style";
|
|
6
|
-
import _Radio from "antd/es/radio";
|
|
7
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
8
|
-
import "antd/es/drawer/style";
|
|
9
|
-
import _Drawer from "antd/es/drawer";
|
|
10
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
11
3
|
import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
|
|
4
|
+
import { Button, Drawer, Radio, Switch } from 'antd';
|
|
12
5
|
import React, { useState, useEffect } from 'react';
|
|
13
6
|
import { setThemes } from "../../utils/index";
|
|
14
7
|
import { useProConfig } from "../../../ProConfigProvider";
|
|
@@ -21,7 +14,7 @@ var connect = function connect(Component) {
|
|
|
21
14
|
};
|
|
22
15
|
return ComponentWrapper;
|
|
23
16
|
};
|
|
24
|
-
var NewDrawer = connect(
|
|
17
|
+
var NewDrawer = connect(Drawer);
|
|
25
18
|
var ProTools = _ref => {
|
|
26
19
|
var onReset = _ref.onReset,
|
|
27
20
|
onClose = _ref.onClose,
|
|
@@ -74,7 +67,8 @@ var ProTools = _ref => {
|
|
|
74
67
|
theme: {
|
|
75
68
|
primaryColor: zauiBrand,
|
|
76
69
|
qiankunPrimaryColor: config === null || config === void 0 || (_config$theme = config.theme) === null || _config$theme === void 0 ? void 0 : _config$theme.qiankunPrimaryColor
|
|
77
|
-
}
|
|
70
|
+
},
|
|
71
|
+
forms: {}
|
|
78
72
|
}
|
|
79
73
|
});
|
|
80
74
|
}
|
|
@@ -123,7 +117,8 @@ var ProTools = _ref => {
|
|
|
123
117
|
theme: {
|
|
124
118
|
primaryColor: item.color,
|
|
125
119
|
qiankunPrimaryColor: item.color
|
|
126
|
-
}
|
|
120
|
+
},
|
|
121
|
+
forms: {}
|
|
127
122
|
}
|
|
128
123
|
});
|
|
129
124
|
},
|
|
@@ -140,7 +135,7 @@ var ProTools = _ref => {
|
|
|
140
135
|
})
|
|
141
136
|
}), /*#__PURE__*/_jsx("div", {
|
|
142
137
|
className: "pro-theme-tools-item",
|
|
143
|
-
children: /*#__PURE__*/_jsxs(
|
|
138
|
+
children: /*#__PURE__*/_jsxs(Radio.Group, {
|
|
144
139
|
value: state.zauiSize,
|
|
145
140
|
onChange: e => {
|
|
146
141
|
setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
@@ -150,13 +145,13 @@ var ProTools = _ref => {
|
|
|
150
145
|
'zaui-size': e.target.value
|
|
151
146
|
});
|
|
152
147
|
},
|
|
153
|
-
children: [/*#__PURE__*/_jsx(
|
|
148
|
+
children: [/*#__PURE__*/_jsx(Radio.Button, {
|
|
154
149
|
value: 0.5,
|
|
155
150
|
children: `${locale.ProThemeTools.layoutMode[0]}`
|
|
156
|
-
}), /*#__PURE__*/_jsx(
|
|
151
|
+
}), /*#__PURE__*/_jsx(Radio.Button, {
|
|
157
152
|
value: 1,
|
|
158
153
|
children: `${locale.ProThemeTools.layoutMode[1]}`
|
|
159
|
-
}), /*#__PURE__*/_jsx(
|
|
154
|
+
}), /*#__PURE__*/_jsx(Radio.Button, {
|
|
160
155
|
value: 1.5,
|
|
161
156
|
children: `${locale.ProThemeTools.layoutMode[2]}`
|
|
162
157
|
})]
|
|
@@ -171,7 +166,7 @@ var ProTools = _ref => {
|
|
|
171
166
|
})
|
|
172
167
|
}), /*#__PURE__*/_jsx("div", {
|
|
173
168
|
className: "pro-theme-tools-item",
|
|
174
|
-
children: /*#__PURE__*/_jsxs(
|
|
169
|
+
children: /*#__PURE__*/_jsxs(Radio.Group, {
|
|
175
170
|
value: state.zauiFormAlign,
|
|
176
171
|
onChange: e => {
|
|
177
172
|
setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
@@ -185,14 +180,15 @@ var ProTools = _ref => {
|
|
|
185
180
|
payload: {
|
|
186
181
|
ProForm: {
|
|
187
182
|
labelAlign: e.target.value
|
|
188
|
-
}
|
|
183
|
+
},
|
|
184
|
+
forms: {}
|
|
189
185
|
}
|
|
190
186
|
});
|
|
191
187
|
},
|
|
192
|
-
children: [/*#__PURE__*/_jsx(
|
|
188
|
+
children: [/*#__PURE__*/_jsx(Radio.Button, {
|
|
193
189
|
value: "left",
|
|
194
190
|
children: `${locale.ProThemeTools.flex[0]}`
|
|
195
|
-
}), /*#__PURE__*/_jsx(
|
|
191
|
+
}), /*#__PURE__*/_jsx(Radio.Button, {
|
|
196
192
|
value: "right",
|
|
197
193
|
children: `${locale.ProThemeTools.flex[1]}`
|
|
198
194
|
})]
|
|
@@ -207,7 +203,7 @@ var ProTools = _ref => {
|
|
|
207
203
|
})
|
|
208
204
|
}), /*#__PURE__*/_jsx("div", {
|
|
209
205
|
className: "pro-theme-tools-item",
|
|
210
|
-
children: /*#__PURE__*/_jsx(
|
|
206
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
|
211
207
|
checkedChildren: `${locale.ProThemeTools.switchText[0]}`,
|
|
212
208
|
unCheckedChildren: `${locale.ProThemeTools.switchText[1]}`,
|
|
213
209
|
checked: state.zauiTableBorder,
|
|
@@ -230,7 +226,7 @@ var ProTools = _ref => {
|
|
|
230
226
|
})
|
|
231
227
|
}), /*#__PURE__*/_jsx("div", {
|
|
232
228
|
className: "pro-theme-tools-item",
|
|
233
|
-
children: /*#__PURE__*/_jsx(
|
|
229
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
|
234
230
|
checkedChildren: `${locale.ProThemeTools.switchText[0]}`,
|
|
235
231
|
unCheckedChildren: `${locale.ProThemeTools.switchText[1]}`,
|
|
236
232
|
checked: state.zauiStripe,
|
|
@@ -245,7 +241,7 @@ var ProTools = _ref => {
|
|
|
245
241
|
}
|
|
246
242
|
})
|
|
247
243
|
})]
|
|
248
|
-
}), /*#__PURE__*/_jsx(
|
|
244
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
249
245
|
className: "copy-btn",
|
|
250
246
|
onClick: () => {
|
|
251
247
|
setActive([{
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import type { LocalThemeConfigType } from '../propsType';
|
|
3
|
+
export interface AntdThemeConfigType {
|
|
4
|
+
token?: {
|
|
5
|
+
colorPrimary?: string;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
};
|
|
8
|
+
components?: {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface ThemeStateType {
|
|
13
|
+
localConfig: LocalThemeConfigType;
|
|
14
|
+
antdConfig: AntdThemeConfigType;
|
|
15
|
+
cssVariables: Record<string, any>;
|
|
16
|
+
}
|
|
17
|
+
interface ThemeContextType {
|
|
18
|
+
state: ThemeStateType;
|
|
19
|
+
updateLocalConfig: (config: Partial<LocalThemeConfigType>) => void;
|
|
20
|
+
updateAntdConfig: (config: AntdThemeConfigType) => void;
|
|
21
|
+
updateCssVariables: (variables: Record<string, any>) => void;
|
|
22
|
+
resetTheme: () => void;
|
|
23
|
+
loadFromCache: (cacheState: ThemeStateType) => void;
|
|
24
|
+
}
|
|
25
|
+
declare const defaultThemeConfig: LocalThemeConfigType;
|
|
26
|
+
interface ThemeProviderProps {
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
|
30
|
+
export declare const useTheme: () => ThemeContextType;
|
|
31
|
+
export { defaultThemeConfig };
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
+
import React, { createContext, useContext, useReducer, useCallback } from 'react';
|
|
4
|
+
|
|
5
|
+
// antd5 主题配置接口
|
|
6
|
+
|
|
7
|
+
// 主题状态接口
|
|
8
|
+
|
|
9
|
+
// Action 类型
|
|
10
|
+
|
|
11
|
+
// Context 接口
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
// 默认主题配置
|
|
14
|
+
var defaultThemeConfig = {
|
|
15
|
+
zauiBrand: '#006AFF',
|
|
16
|
+
zauiText: '#343434',
|
|
17
|
+
zauiFontSize: '14px',
|
|
18
|
+
zauiFormAlign: 'left',
|
|
19
|
+
zauiFormRequiredBefore: 'none',
|
|
20
|
+
zauiFormRequiredAfter: 'inline',
|
|
21
|
+
zauiSize: 1,
|
|
22
|
+
zauiSpaceSizeLg: '32px',
|
|
23
|
+
zauiSpaceSizeMd: '16px',
|
|
24
|
+
zauiBigText: false,
|
|
25
|
+
zauiBaseFontSize: '0px',
|
|
26
|
+
zauiTableBorder: false,
|
|
27
|
+
zauiStripe: true
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// 初始状态
|
|
31
|
+
var initialState = {
|
|
32
|
+
localConfig: defaultThemeConfig,
|
|
33
|
+
antdConfig: {
|
|
34
|
+
token: {
|
|
35
|
+
colorPrimary: '#006AFF'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
cssVariables: {}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// Reducer 函数
|
|
42
|
+
function themeReducer(state, action) {
|
|
43
|
+
switch (action.type) {
|
|
44
|
+
case 'UPDATE_LOCAL_CONFIG':
|
|
45
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
46
|
+
localConfig: _objectSpread(_objectSpread({}, state.localConfig), action.payload)
|
|
47
|
+
});
|
|
48
|
+
case 'UPDATE_ANTD_CONFIG':
|
|
49
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
50
|
+
antdConfig: action.payload
|
|
51
|
+
});
|
|
52
|
+
case 'UPDATE_CSS_VARIABLES':
|
|
53
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
54
|
+
cssVariables: _objectSpread(_objectSpread({}, state.cssVariables), action.payload)
|
|
55
|
+
});
|
|
56
|
+
case 'RESET_THEME':
|
|
57
|
+
return _objectSpread(_objectSpread({}, initialState), {}, {
|
|
58
|
+
localConfig: defaultThemeConfig,
|
|
59
|
+
antdConfig: {
|
|
60
|
+
token: {
|
|
61
|
+
colorPrimary: defaultThemeConfig.zauiBrand
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
case 'LOAD_FROM_CACHE':
|
|
66
|
+
return action.payload;
|
|
67
|
+
default:
|
|
68
|
+
return state;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// 创建 Context
|
|
73
|
+
var ThemeContext = /*#__PURE__*/createContext(undefined);
|
|
74
|
+
|
|
75
|
+
// Provider 组件
|
|
76
|
+
|
|
77
|
+
export var ThemeProvider = _ref => {
|
|
78
|
+
var children = _ref.children;
|
|
79
|
+
var _useReducer = useReducer(themeReducer, initialState),
|
|
80
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
81
|
+
state = _useReducer2[0],
|
|
82
|
+
dispatch = _useReducer2[1];
|
|
83
|
+
var updateLocalConfig = useCallback(config => {
|
|
84
|
+
dispatch({
|
|
85
|
+
type: 'UPDATE_LOCAL_CONFIG',
|
|
86
|
+
payload: config
|
|
87
|
+
});
|
|
88
|
+
}, []);
|
|
89
|
+
var updateAntdConfig = useCallback(config => {
|
|
90
|
+
dispatch({
|
|
91
|
+
type: 'UPDATE_ANTD_CONFIG',
|
|
92
|
+
payload: config
|
|
93
|
+
});
|
|
94
|
+
}, []);
|
|
95
|
+
var updateCssVariables = useCallback(variables => {
|
|
96
|
+
dispatch({
|
|
97
|
+
type: 'UPDATE_CSS_VARIABLES',
|
|
98
|
+
payload: variables
|
|
99
|
+
});
|
|
100
|
+
}, []);
|
|
101
|
+
var resetTheme = useCallback(() => {
|
|
102
|
+
dispatch({
|
|
103
|
+
type: 'RESET_THEME'
|
|
104
|
+
});
|
|
105
|
+
}, []);
|
|
106
|
+
var loadFromCache = useCallback(cacheState => {
|
|
107
|
+
dispatch({
|
|
108
|
+
type: 'LOAD_FROM_CACHE',
|
|
109
|
+
payload: cacheState
|
|
110
|
+
});
|
|
111
|
+
}, []);
|
|
112
|
+
var contextValue = {
|
|
113
|
+
state,
|
|
114
|
+
updateLocalConfig,
|
|
115
|
+
updateAntdConfig,
|
|
116
|
+
updateCssVariables,
|
|
117
|
+
resetTheme,
|
|
118
|
+
loadFromCache
|
|
119
|
+
};
|
|
120
|
+
return /*#__PURE__*/_jsx(ThemeContext.Provider, {
|
|
121
|
+
value: contextValue,
|
|
122
|
+
children: children
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
// Hook for using theme context
|
|
127
|
+
export var useTheme = () => {
|
|
128
|
+
var context = useContext(ThemeContext);
|
|
129
|
+
if (context === undefined) {
|
|
130
|
+
throw new Error('useTheme must be used within a ThemeProvider');
|
|
131
|
+
}
|
|
132
|
+
return context;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
// 导出默认配置
|
|
136
|
+
export { defaultThemeConfig };
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import type { ProThemeToolsType } from './propsType';
|
|
2
2
|
declare const ProThemeTools: {
|
|
3
3
|
({ size, className, cacheTime, color, mode, iconFollowTheme, prefixCls, tableBorder, tableStripe, theme, onChange, ...props }: ProThemeToolsType): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
|
|
5
|
-
size: number;
|
|
6
|
-
mode: string;
|
|
7
|
-
color: string;
|
|
8
|
-
iconFollowTheme: boolean;
|
|
9
|
-
cacheTime: boolean;
|
|
10
|
-
};
|
|
11
|
-
setThemes: (themes: import("./utils/index").ThemesProps, themeMapping?: import("./utils/index").ThemesProps) => boolean;
|
|
4
|
+
setThemes: (themes: import("./utils/index").ThemesProps) => boolean;
|
|
12
5
|
};
|
|
13
6
|
export default ProThemeTools;
|
|
7
|
+
export { ThemeProvider, useTheme } from './context/ThemeContext';
|
|
8
|
+
export type { AntdThemeConfigType, ThemeStateType } from './context/ThemeContext';
|
|
9
|
+
export type { LocalThemeConfigType, ProThemeToolsType } from './propsType';
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import "antd/es/config-provider/style";
|
|
2
|
-
import _ConfigProvider from "antd/es/config-provider";
|
|
3
|
-
import "antd/es/message/style";
|
|
4
|
-
import _message from "antd/es/message";
|
|
5
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
7
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
8
4
|
var _excluded = ["size", "className", "cacheTime", "color", "mode", "iconFollowTheme", "prefixCls", "tableBorder", "tableStripe", "theme", "onChange"];
|
|
9
5
|
/* eslint-disable prefer-const */
|
|
6
|
+
import { message } from 'antd';
|
|
10
7
|
import { useEffect, useState } from 'react';
|
|
11
8
|
import { usePrevious, useUpdateEffect, useToggle } from 'ahooks';
|
|
12
9
|
import { ReactSVG } from 'react-svg';
|
|
13
10
|
import { isEqual } from 'lodash';
|
|
14
11
|
import classnames from 'classnames';
|
|
15
|
-
import { getKebabCase, setThemes, setTableBorder, getMapKebabCase, getMapHumpCase } from "./utils/index";
|
|
12
|
+
import { getKebabCase, setThemes, setTableBorder, getMapKebabCase, getMapHumpCase, getAntd5ThemeConfig } from "./utils/index";
|
|
16
13
|
import settingSvg from "../assets/setting.svg";
|
|
17
14
|
import { ProTools } from "./component";
|
|
18
15
|
import locale from "../locale";
|
|
16
|
+
import { useTheme } from "./context/ThemeContext";
|
|
19
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
18
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
19
|
var defaultCacheTime = 1; // 配置保存时间为一天
|
|
@@ -43,12 +41,17 @@ var defaultThemeConfig = {
|
|
|
43
41
|
zauiStripe: true
|
|
44
42
|
};
|
|
45
43
|
var ProThemeTools = _ref => {
|
|
46
|
-
var size = _ref.size,
|
|
44
|
+
var _ref$size = _ref.size,
|
|
45
|
+
size = _ref$size === void 0 ? 24 : _ref$size,
|
|
47
46
|
className = _ref.className,
|
|
48
|
-
cacheTime = _ref.cacheTime,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
_ref$cacheTime = _ref.cacheTime,
|
|
48
|
+
cacheTime = _ref$cacheTime === void 0 ? false : _ref$cacheTime,
|
|
49
|
+
_ref$color = _ref.color,
|
|
50
|
+
color = _ref$color === void 0 ? '#343434' : _ref$color,
|
|
51
|
+
_ref$mode = _ref.mode,
|
|
52
|
+
mode = _ref$mode === void 0 ? 'prd' : _ref$mode,
|
|
53
|
+
_ref$iconFollowTheme = _ref.iconFollowTheme,
|
|
54
|
+
iconFollowTheme = _ref$iconFollowTheme === void 0 ? false : _ref$iconFollowTheme,
|
|
52
55
|
_ref$prefixCls = _ref.prefixCls,
|
|
53
56
|
prefixCls = _ref$prefixCls === void 0 ? 'ant' : _ref$prefixCls,
|
|
54
57
|
_ref$tableBorder = _ref.tableBorder,
|
|
@@ -63,6 +66,10 @@ var ProThemeTools = _ref => {
|
|
|
63
66
|
_useToggle2 = _slicedToArray(_useToggle, 2),
|
|
64
67
|
visible = _useToggle2[0],
|
|
65
68
|
toggle = _useToggle2[1].toggle;
|
|
69
|
+
var _useTheme = useTheme(),
|
|
70
|
+
updateLocalConfig = _useTheme.updateLocalConfig,
|
|
71
|
+
updateAntdConfig = _useTheme.updateAntdConfig,
|
|
72
|
+
updateCssVariables = _useTheme.updateCssVariables;
|
|
66
73
|
var _useState = useState(_objectSpread(_objectSpread({}, defaultThemeConfig), getMapHumpCase(theme))),
|
|
67
74
|
_useState2 = _slicedToArray(_useState, 2),
|
|
68
75
|
state = _useState2[0],
|
|
@@ -74,8 +81,20 @@ var ProThemeTools = _ref => {
|
|
|
74
81
|
|
|
75
82
|
// 重置
|
|
76
83
|
var onReset = () => {
|
|
77
|
-
|
|
78
|
-
|
|
84
|
+
var resetConfig = _objectSpread(_objectSpread({}, state), defaultThemeConfig);
|
|
85
|
+
setState(resetConfig);
|
|
86
|
+
|
|
87
|
+
// 更新 Context
|
|
88
|
+
updateLocalConfig(resetConfig);
|
|
89
|
+
|
|
90
|
+
// 更新 antd 主题
|
|
91
|
+
var antdConfig = getAntd5ThemeConfig({
|
|
92
|
+
'zaui-brand': '#006AFF'
|
|
93
|
+
});
|
|
94
|
+
updateAntdConfig(antdConfig);
|
|
95
|
+
|
|
96
|
+
// 设置 CSS 变量
|
|
97
|
+
var cssVars = {
|
|
79
98
|
'zaui-brand': '#006AFF',
|
|
80
99
|
'zaui-text': '#343434',
|
|
81
100
|
'zaui-form-required-after': 'inline',
|
|
@@ -88,7 +107,9 @@ var ProThemeTools = _ref => {
|
|
|
88
107
|
'zaui-big-text': false,
|
|
89
108
|
'zaui-table-border': false,
|
|
90
109
|
'zaui-stripe': true
|
|
91
|
-
}
|
|
110
|
+
};
|
|
111
|
+
setThemes(cssVars);
|
|
112
|
+
updateCssVariables(cssVars);
|
|
92
113
|
};
|
|
93
114
|
|
|
94
115
|
// 复制
|
|
@@ -100,7 +121,7 @@ var ProThemeTools = _ref => {
|
|
|
100
121
|
input.select();
|
|
101
122
|
if (document.execCommand('copy')) {
|
|
102
123
|
document.execCommand('copy');
|
|
103
|
-
|
|
124
|
+
message.success(`${locale.ProThemeTools.copySuccess}`);
|
|
104
125
|
}
|
|
105
126
|
document.body.removeChild(input);
|
|
106
127
|
};
|
|
@@ -112,11 +133,6 @@ var ProThemeTools = _ref => {
|
|
|
112
133
|
var startTime = curThemeConfig === null || curThemeConfig === void 0 ? void 0 : curThemeConfig.startTime;
|
|
113
134
|
// 默认时间间隔
|
|
114
135
|
var duration = (typeof cacheTime === 'number' ? cacheTime : defaultCacheTime) * 86400000;
|
|
115
|
-
|
|
116
|
-
// antd4以下版本不支持主题色的动态配置
|
|
117
|
-
if (!_ConfigProvider.config) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
136
|
if (cacheTime && startTime && new Date().getTime() - startTime < duration) {
|
|
121
137
|
var _localThemeConfig;
|
|
122
138
|
var localThemeConfig;
|
|
@@ -125,43 +141,47 @@ var ProThemeTools = _ref => {
|
|
|
125
141
|
]));
|
|
126
142
|
setState(_objectSpread(_objectSpread({}, state), localThemeConfig));
|
|
127
143
|
setThemes(cssVariables);
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
144
|
+
|
|
145
|
+
// 更新 Context
|
|
146
|
+
updateLocalConfig(localThemeConfig);
|
|
147
|
+
updateCssVariables(cssVariables);
|
|
148
|
+
|
|
149
|
+
// 更新 antd 主题
|
|
150
|
+
var antdConfig = getAntd5ThemeConfig({
|
|
151
|
+
'zaui-brand': (_localThemeConfig = localThemeConfig) === null || _localThemeConfig === void 0 ? void 0 : _localThemeConfig.zauiBrand
|
|
133
152
|
});
|
|
153
|
+
updateAntdConfig(antdConfig);
|
|
134
154
|
} else {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
155
|
+
var cssVars = getMapKebabCase(state);
|
|
156
|
+
setThemes(cssVars);
|
|
157
|
+
updateCssVariables(cssVars);
|
|
158
|
+
|
|
159
|
+
// 更新 antd 主题
|
|
160
|
+
var _antdConfig = getAntd5ThemeConfig({
|
|
161
|
+
'zaui-brand': state === null || state === void 0 ? void 0 : state.zauiBrand
|
|
141
162
|
});
|
|
163
|
+
updateAntdConfig(_antdConfig);
|
|
142
164
|
}
|
|
143
165
|
}, []);
|
|
144
166
|
|
|
145
167
|
// 主题色动态切换
|
|
146
168
|
useEffect(() => {
|
|
147
169
|
if (visible && zauiBrand) {
|
|
148
|
-
//
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
_ConfigProvider.config({
|
|
153
|
-
theme: {
|
|
154
|
-
primaryColor: zauiBrand
|
|
155
|
-
}
|
|
170
|
+
// 更新 antd 主题
|
|
171
|
+
var antdConfig = getAntd5ThemeConfig({
|
|
172
|
+
'zaui-brand': zauiBrand
|
|
156
173
|
});
|
|
174
|
+
updateAntdConfig(antdConfig);
|
|
157
175
|
}
|
|
158
|
-
}, [zauiBrand]);
|
|
176
|
+
}, [zauiBrand, visible]);
|
|
159
177
|
|
|
160
178
|
// 斑马纹设置
|
|
161
179
|
useEffect(() => {
|
|
162
|
-
|
|
180
|
+
var cssVar = {
|
|
163
181
|
'zaui-table-strip-bg': zauiStripe ? '#fafafa' : '#ffffff'
|
|
164
|
-
}
|
|
182
|
+
};
|
|
183
|
+
setThemes(cssVar);
|
|
184
|
+
updateCssVariables(cssVar);
|
|
165
185
|
}, [zauiStripe]);
|
|
166
186
|
|
|
167
187
|
// 表格边框设置
|
|
@@ -179,8 +199,23 @@ var ProThemeTools = _ref => {
|
|
|
179
199
|
localStorage.setItem('themeConfig', JSON.stringify(newThemeConfig));
|
|
180
200
|
}
|
|
181
201
|
}, [state, cacheTime]);
|
|
202
|
+
|
|
203
|
+
// 状态变化时同步到 Context
|
|
182
204
|
useUpdateEffect(() => {
|
|
183
205
|
if (!isEqual(state, previousState) && visible) {
|
|
206
|
+
// 更新本地配置
|
|
207
|
+
updateLocalConfig(state);
|
|
208
|
+
|
|
209
|
+
// 更新 CSS 变量
|
|
210
|
+
var cssVars = getMapKebabCase(state);
|
|
211
|
+
setThemes(cssVars);
|
|
212
|
+
updateCssVariables(cssVars);
|
|
213
|
+
|
|
214
|
+
// 更新 antd 主题
|
|
215
|
+
var antdConfig = getAntd5ThemeConfig({
|
|
216
|
+
'zaui-brand': state.zauiBrand
|
|
217
|
+
});
|
|
218
|
+
updateAntdConfig(antdConfig);
|
|
184
219
|
onChange === null || onChange === void 0 || onChange(state);
|
|
185
220
|
}
|
|
186
221
|
}, [state]);
|
|
@@ -210,12 +245,8 @@ var ProThemeTools = _ref => {
|
|
|
210
245
|
})]
|
|
211
246
|
}));
|
|
212
247
|
};
|
|
213
|
-
ProThemeTools.defaultProps = {
|
|
214
|
-
size: 24,
|
|
215
|
-
mode: 'prd',
|
|
216
|
-
color: '#343434',
|
|
217
|
-
iconFollowTheme: false,
|
|
218
|
-
cacheTime: false
|
|
219
|
-
};
|
|
220
248
|
ProThemeTools.setThemes = setThemes;
|
|
221
|
-
export default ProThemeTools;
|
|
249
|
+
export default ProThemeTools;
|
|
250
|
+
|
|
251
|
+
// 导出主题相关组件和类型
|
|
252
|
+
export { ThemeProvider, useTheme } from "./context/ThemeContext";
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@root-entry-name: 'default';
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
1
|
|
|
4
2
|
@import '../component/ProTools/style/index.less';
|
|
5
3
|
|
|
@@ -23,7 +21,7 @@
|
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
&.pro-theme-tools-follow {
|
|
26
|
-
background: var(--ant-primary-1);
|
|
24
|
+
background: var(--ant-primary-1, #e6f7ff);
|
|
27
25
|
svg {
|
|
28
26
|
color: var(--zaui-brand, #006aff);
|
|
29
27
|
}
|
|
@@ -2,15 +2,25 @@ export interface ThemesProps {
|
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
}
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* @param themes
|
|
7
|
-
* @param themeMapping
|
|
5
|
+
* 将 kebab-case 的主题配置转换为 antd5 的 token 格式
|
|
6
|
+
* @param themes kebab-case 格式的主题配置
|
|
7
|
+
* @param themeMapping 自定义映射关系
|
|
8
8
|
*/
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const convertToAntd5Tokens: (themes: ThemesProps, themeMapping?: ThemesProps) => {
|
|
10
|
+
token: ThemesProps;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 设置主题变量 - antd5 兼容版本
|
|
14
|
+
* 只设置 CSS 变量,不再使用 ConfigProvider.config
|
|
15
|
+
*/
|
|
16
|
+
export declare const setThemes: (themes: ThemesProps) => boolean;
|
|
10
17
|
/**
|
|
11
|
-
*
|
|
18
|
+
* 获取 antd5 主题配置
|
|
19
|
+
* @param themes kebab-case 格式的主题配置
|
|
12
20
|
*/
|
|
13
|
-
export declare const
|
|
21
|
+
export declare const getAntd5ThemeConfig: (themes: ThemesProps) => {
|
|
22
|
+
token: ThemesProps;
|
|
23
|
+
};
|
|
14
24
|
/** JS实现驼峰命名与横线命名的转换 */
|
|
15
25
|
export declare const getKebabCase: (str: string) => string;
|
|
16
26
|
/** JS实现对象驼峰命名与横线命名的转换 */
|