From 1d39c3857b7539b618eb22a8e276ffe96f7efb66 Mon Sep 17 00:00:00 2001 From: aelf-lxy Date: Mon, 25 Mar 2024 16:08:11 +0800 Subject: [PATCH 1/2] fix: delete --- packages/component/src/Input/demos/basic.tsx | 5 +++-- packages/component/src/Input/index.tsx | 8 ++++---- packages/component/src/Input/style/index.ts | 3 +++ packages/component/src/Modal/index.tsx | 4 ++-- .../internal-icons/src/components/CircleClose.tsx | 13 ------------- .../internal-icons/src/components/CloseIcon.tsx | 11 ----------- .../internal-icons/src/components/DownArrowIcon.tsx | 11 ----------- .../src/components/EyeTwoToneIcon.tsx | 11 ----------- packages/internal-icons/src/components/Keyboard.tsx | 11 ----------- packages/internal-icons/src/index.ts | 2 -- 10 files changed, 12 insertions(+), 67 deletions(-) delete mode 100644 packages/internal-icons/src/components/CircleClose.tsx delete mode 100644 packages/internal-icons/src/components/CloseIcon.tsx delete mode 100644 packages/internal-icons/src/components/DownArrowIcon.tsx delete mode 100644 packages/internal-icons/src/components/EyeTwoToneIcon.tsx delete mode 100644 packages/internal-icons/src/components/Keyboard.tsx diff --git a/packages/component/src/Input/demos/basic.tsx b/packages/component/src/Input/demos/basic.tsx index fa48a59..3b58862 100644 --- a/packages/component/src/Input/demos/basic.tsx +++ b/packages/component/src/Input/demos/basic.tsx @@ -1,8 +1,9 @@ import React from 'react'; -// import { AndroidOutlined } from '@ant-design/icons'; -import { Input } from 'aelf-design'; import { Space } from 'antd'; +// import { AndroidOutlined } from '@ant-design/icons'; +import Input from '../index'; + const App: React.FC = () => { return (
diff --git a/packages/component/src/Input/index.tsx b/packages/component/src/Input/index.tsx index af2a849..e7e2751 100644 --- a/packages/component/src/Input/index.tsx +++ b/packages/component/src/Input/index.tsx @@ -1,6 +1,6 @@ import React, { ReactNode } from 'react'; import { - CircleCloseIconOutlined, + CloseCircleOutlined, EyeInvisibleOutlined, EyeOutlined, IconProps, @@ -41,7 +41,7 @@ const getClearIcon = ( onClear?.(e); }} > - { const { styles: st } = useStyles({ size }); const token = useTheme(); @@ -70,7 +70,7 @@ function Input({ size = 'middle', className, onClear, allowClear, ...rest }: IIn } /> ); -} +}; function InputPassword({ size = 'middle', diff --git a/packages/component/src/Input/style/index.ts b/packages/component/src/Input/style/index.ts index e56249b..2dc337c 100644 --- a/packages/component/src/Input/style/index.ts +++ b/packages/component/src/Input/style/index.ts @@ -30,6 +30,9 @@ const useStyles = createStyles(({ css, token, prefixCls }, { size }: { size: Inp & .${prefixCls}-input-password-icon { cursor: pointer; } + & .${prefixCls}-input-clear-icon { + font-size: inherit; + } `, }; }); diff --git a/packages/component/src/Modal/index.tsx b/packages/component/src/Modal/index.tsx index b55296f..398a3e4 100644 --- a/packages/component/src/Modal/index.tsx +++ b/packages/component/src/Modal/index.tsx @@ -1,5 +1,5 @@ import React, { memo } from 'react'; -import { CloseIcon } from '@aelf-design/internal-icons'; +import { CloseOutlined } from '@aelf-design/internal-icons'; import { Modal as AntdModal, ModalProps } from 'antd'; import { useTheme } from 'antd-style'; @@ -20,7 +20,7 @@ function Modal({ wrapClassName, width = 438, closeIcon = true, children, ...prop closeIcon={ closeIcon ? (
- +
) : null } diff --git a/packages/internal-icons/src/components/CircleClose.tsx b/packages/internal-icons/src/components/CircleClose.tsx deleted file mode 100644 index 5c8b5d7..0000000 --- a/packages/internal-icons/src/components/CircleClose.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import * as React from 'react'; - -import { AelfIcon } from '../icon/AelfIcon'; -import AelfSVGComponent from '../svgs/circle-close.svg'; -import { type IconProps } from '../type'; - -const componentName = 'CircleCloseIconOutlined'; -export const CircleCloseIconOutlined = React.forwardRef( - (props, ref) => { - return ; - }, -); -CircleCloseIconOutlined.displayName = componentName; diff --git a/packages/internal-icons/src/components/CloseIcon.tsx b/packages/internal-icons/src/components/CloseIcon.tsx deleted file mode 100644 index 2c41c71..0000000 --- a/packages/internal-icons/src/components/CloseIcon.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import * as React from 'react'; - -import { AelfIcon } from '../icon/AelfIcon'; -import AelfSVGComponent from '../svgs/close.svg'; -import { type IconProps } from '../type'; - -const componentName = 'CloseIcon'; -export const CloseIcon = React.forwardRef((props, ref) => { - return ; -}); -CloseIcon.displayName = 'CloseIcon'; diff --git a/packages/internal-icons/src/components/DownArrowIcon.tsx b/packages/internal-icons/src/components/DownArrowIcon.tsx deleted file mode 100644 index 901613a..0000000 --- a/packages/internal-icons/src/components/DownArrowIcon.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import * as React from 'react'; - -import { AelfIcon } from '../icon/AelfIcon'; -import AelfSVGComponent from '../svgs/downArrow.svg'; -import { type IconProps } from '../type'; - -const componentName = 'DownArrowIcon'; -export const DownArrowIcon = React.forwardRef((props, ref) => { - return ; -}); -DownArrowIcon.displayName = componentName; diff --git a/packages/internal-icons/src/components/EyeTwoToneIcon.tsx b/packages/internal-icons/src/components/EyeTwoToneIcon.tsx deleted file mode 100644 index 39a2816..0000000 --- a/packages/internal-icons/src/components/EyeTwoToneIcon.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import * as React from 'react'; - -import { AelfIcon } from '../icon/AelfIcon'; -import AelfSVGComponent from '../svgs/eye.svg'; -import { type IconProps } from '../type'; - -const componentName = 'EyeTwoToneIcon'; -export const EyeTwoToneIcon = React.forwardRef((props, ref) => { - return ; -}); -EyeTwoToneIcon.displayName = componentName; diff --git a/packages/internal-icons/src/components/Keyboard.tsx b/packages/internal-icons/src/components/Keyboard.tsx deleted file mode 100644 index 412a5e1..0000000 --- a/packages/internal-icons/src/components/Keyboard.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import * as React from 'react'; - -import { AelfIcon } from '../icon/AelfIcon'; -import AelfSVGComponent from '../svgs/key-board.svg'; -import { type IconProps } from '../type'; - -const componentName = 'Keyboard'; -export const Keyboard = React.forwardRef((props, ref) => { - return ; -}); -Keyboard.displayName = componentName; diff --git a/packages/internal-icons/src/index.ts b/packages/internal-icons/src/index.ts index 640b3b8..4f25de9 100644 --- a/packages/internal-icons/src/index.ts +++ b/packages/internal-icons/src/index.ts @@ -1,7 +1,5 @@ 'use client'; -export * from './components/CircleClose'; export * from './components/ClearIcon'; -export * from './components/CloseIcon'; export * from './components/FileIcon'; export * from './components/NextButtonIcon'; export * from './components/PrevButtonIcon'; From 30df8ba9f3fc953d6cc705a6bc446413fb61757b Mon Sep 17 00:00:00 2001 From: aelf-lxy Date: Mon, 25 Mar 2024 16:20:11 +0800 Subject: [PATCH 2/2] fix: delete icons --- packages/component/src/Input/demos/basic.tsx | 5 ++--- packages/component/src/Input/index.tsx | 4 ++-- packages/component/src/Search/style/index.ts | 1 + packages/component/src/Upload/index.tsx | 8 ++++---- .../internal-icons/src/components/ClearIcon.tsx | 11 ----------- packages/internal-icons/src/components/FileIcon.tsx | 13 ------------- packages/internal-icons/src/index.ts | 2 -- 7 files changed, 9 insertions(+), 35 deletions(-) delete mode 100644 packages/internal-icons/src/components/ClearIcon.tsx delete mode 100644 packages/internal-icons/src/components/FileIcon.tsx diff --git a/packages/component/src/Input/demos/basic.tsx b/packages/component/src/Input/demos/basic.tsx index 3b58862..fa48a59 100644 --- a/packages/component/src/Input/demos/basic.tsx +++ b/packages/component/src/Input/demos/basic.tsx @@ -1,8 +1,7 @@ import React from 'react'; -import { Space } from 'antd'; - // import { AndroidOutlined } from '@ant-design/icons'; -import Input from '../index'; +import { Input } from 'aelf-design'; +import { Space } from 'antd'; const App: React.FC = () => { return ( diff --git a/packages/component/src/Input/index.tsx b/packages/component/src/Input/index.tsx index e7e2751..a773024 100644 --- a/packages/component/src/Input/index.tsx +++ b/packages/component/src/Input/index.tsx @@ -1,6 +1,6 @@ import React, { ReactNode } from 'react'; import { - CloseCircleOutlined, + CloseFilled, EyeInvisibleOutlined, EyeOutlined, IconProps, @@ -41,7 +41,7 @@ const getClearIcon = ( onClear?.(e); }} > - -
- +
Ready for review
@@ -67,7 +67,7 @@ function UploadItemRender({ actions.remove(); }} > - ((props, ref) => { - return ; -}); -ClearIconFilled.displayName = componentName; diff --git a/packages/internal-icons/src/components/FileIcon.tsx b/packages/internal-icons/src/components/FileIcon.tsx deleted file mode 100644 index 9132586..0000000 --- a/packages/internal-icons/src/components/FileIcon.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import * as React from 'react'; - -import { AelfIcon } from '../icon/AelfIcon'; -import AelfSVGComponent from '../svgs/file.svg'; -import { type IconProps } from '../type'; - -const componentName = 'FileIcon'; -export const FileIcon = React.forwardRef((props, ref) => { - return ( - - ); -}); -FileIcon.displayName = componentName; diff --git a/packages/internal-icons/src/index.ts b/packages/internal-icons/src/index.ts index 4f25de9..72d381a 100644 --- a/packages/internal-icons/src/index.ts +++ b/packages/internal-icons/src/index.ts @@ -1,6 +1,4 @@ 'use client'; -export * from './components/ClearIcon'; -export * from './components/FileIcon'; export * from './components/NextButtonIcon'; export * from './components/PrevButtonIcon'; export * from './components/ProgressErrorIcon';