Skip to content

Commit

Permalink
Merge pull request #91 from AElf-devops/release/v1.0.0
Browse files Browse the repository at this point in the history
feat: add chat icon and interactive icon
  • Loading branch information
curryZhaoAelf authored Mar 25, 2024
2 parents ffd6c74 + d880a56 commit 1362d6a
Show file tree
Hide file tree
Showing 108 changed files with 745 additions and 44 deletions.
1 change: 0 additions & 1 deletion .dumi/theme/builtins/IconSearch/IconSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ const IconSearch: React.FC = () => {

const renderCategories = useMemo<React.ReactNode | React.ReactNode[]>(() => {
const { searchKey = '', theme } = displayState;

const categoriesResult = Object.keys(categories)
.map((key) => {
let iconList = categories[key as CategoriesKeys];
Expand Down
4 changes: 0 additions & 4 deletions .dumi/theme/builtins/IconSearch/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ import * as AntdIcons from '@aelf-design/internal-icons';

const categoriesConfig = require('./icon-config.json');

const all = Object.keys(AntdIcons)
.map((n) => n.replace(/(Outlined|Filled|TwoTone)$/, ''))
.filter((n, i, arr) => arr.indexOf(n) === i);

const other: string[] = [];

export const categories: Record<string, string[]> = {
Expand Down
66 changes: 65 additions & 1 deletion .dumi/theme/builtins/IconSearch/icon-config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
{
"chat": [
"Album",
"Attach",
"Camera",
"ChatNew",
"Chat",
"Group",
"Keyboard",
"Mute",
"Pin",
"QrCode",
"RedPacket",
"Smile",
"Transfer",
"Unmute",
"Unpin",
"UserAdd",
"UserAdded",
"UserFind",
"UserProfile"
],
"direction": [
"Backtop",
"DownArrow",
Expand All @@ -20,5 +41,48 @@
"UpArrow",
"Up"
],
"suggestion": ["Add", "Check", "Minus"]
"interactive": [
"Artboard",
"Calendar",
"Clear",
"Copy",
"Delete",
"Download",
"Edit",
"Exit",
"EyeInvisible",
"Eye",
"Filter",
"FingerPrint",
"Lock",
"Menu",
"More",
"MoreVertical",
"Refresh",
"Scan",
"Search",
"ShareExternal",
"ShareInternal",
"Star",
"Switch",
"Upload",
"Wallet"
],
"suggestion": [
"AddCircle",
"Add",
"CheckCircle",
"Check",
"Circle",
"CloseCircle",
"Close",
"ExclamationCircle",
"InfoCircle",
"MinusCircle",
"Minus",
"MoreCircle",
"QuestionCircle",
"Stop",
"TimeCircle"
]
}
4 changes: 2 additions & 2 deletions docs/icon.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
nav: icons
nav: Icons
group:
title: Display
order: 3
---

## 图标列表
## Icon List

<IconSearch></IconSearch>
4 changes: 4 additions & 0 deletions packages/component/src/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ const AELFDProvider = (props: IAelfdThemeProviderProps) => {
theme={(appearance: ThemeAppearance) => {
const comp = {
...props.theme?.components,
Button: {
colorPrimary: appearance === 'dark' ? '#1370DD' : '#127FFF',
...props.theme?.components?.Button,
},
Input: {
paddingBlock: 11,
paddingBlockSM: 7,
Expand Down
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/AlbumOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/album.svg';
import { IconProps } from '../../type';

const componentName = 'AlbumOutlined';
export const AlbumOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
AlbumOutlined.displayName = componentName;
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/AttachOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/attach.svg';
import { IconProps } from '../../type';

const componentName = 'AttachOutlined';
export const AttachOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
AttachOutlined.displayName = componentName;
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/CameraOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/camera.svg';
import { IconProps } from '../../type';

const componentName = 'CameraOutlined';
export const CameraOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
CameraOutlined.displayName = componentName;
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/ChatNewOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/chat-new.svg';
import { IconProps } from '../../type';

const componentName = 'ChatNewOutlined';
export const ChatNewOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
ChatNewOutlined.displayName = componentName;
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/ChatOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/chat.svg';
import { IconProps } from '../../type';

const componentName = 'ChatOutlined';
export const ChatOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
ChatOutlined.displayName = componentName;
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/GroupOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/group.svg';
import { IconProps } from '../../type';

const componentName = 'GroupOutlined';
export const GroupOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
GroupOutlined.displayName = componentName;
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/KeyboardOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/keyboard.svg';
import { IconProps } from '../../type';

const componentName = 'KeyboardOutlined';
export const KeyboardOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
KeyboardOutlined.displayName = componentName;
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/MuteOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/mute.svg';
import { IconProps } from '../../type';

const componentName = 'MuteOutlined';
export const MuteOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
MuteOutlined.displayName = componentName;
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/PinOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/pin.svg';
import { IconProps } from '../../type';

const componentName = 'PinOutlined';
export const PinOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
PinOutlined.displayName = componentName;
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/QrCodeOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/qr-code.svg';
import { IconProps } from '../../type';

const componentName = 'QrCodeOutlined';
export const QrCodeOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
QrCodeOutlined.displayName = componentName;
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/RedPacketOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/red-packet.svg';
import { IconProps } from '../../type';

const componentName = 'RedPacketOutlined';
export const RedPacketOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
RedPacketOutlined.displayName = componentName;
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/SmileOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/smile.svg';
import { IconProps } from '../../type';

const componentName = 'SmileOutlined';
export const SmileOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
SmileOutlined.displayName = componentName;
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/TransferOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/transfer.svg';
import { IconProps } from '../../type';

const componentName = 'TransferOutlined';
export const TransferOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
TransferOutlined.displayName = componentName;
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/UnmuteOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/unmute.svg';
import { IconProps } from '../../type';

const componentName = 'UnmuteOutlined';
export const UnmuteOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
UnmuteOutlined.displayName = componentName;
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/UnpinOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/unpin.svg';
import { IconProps } from '../../type';

const componentName = 'UnpinOutlined';
export const UnpinOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
UnpinOutlined.displayName = componentName;
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/UserAddOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/user-add.svg';
import { IconProps } from '../../type';

const componentName = 'UserAddOutlined';
export const UserAddOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
UserAddOutlined.displayName = componentName;
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/UserAddedOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/user-added.svg';
import { IconProps } from '../../type';

const componentName = 'UserAddedOutlined';
export const UserAddedOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
UserAddedOutlined.displayName = componentName;
11 changes: 11 additions & 0 deletions packages/internal-icons/src/components/chat/UserFindOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/user-find.svg';
import { IconProps } from '../../type';

const componentName = 'UserFindOutlined';
export const UserFindOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
UserFindOutlined.displayName = componentName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/chat/user-profile.svg';
import { IconProps } from '../../type';

const componentName = 'UserProfileOutlined';
export const UserProfileOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
UserProfileOutlined.displayName = componentName;
19 changes: 19 additions & 0 deletions packages/internal-icons/src/components/chat/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export * from './AlbumOutlined';
export * from './AttachOutlined';
export * from './CameraOutlined';
export * from './ChatNewOutlined';
export * from './ChatOutlined';
export * from './GroupOutlined';
export * from './KeyboardOutlined';
export * from './MuteOutlined';
export * from './PinOutlined';
export * from './QrCodeOutlined';
export * from './RedPacketOutlined';
export * from './SmileOutlined';
export * from './TransferOutlined';
export * from './UnmuteOutlined';
export * from './UnpinOutlined';
export * from './UserAddOutlined';
export * from './UserAddedOutlined';
export * from './UserFindOutlined';
export * from './UserProfileOutlined';
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/interactive/artboard.svg';
import { IconProps } from '../../type';

const componentName = 'ArtboardOutlined';
export const ArtboardOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
ArtboardOutlined.displayName = componentName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/interactive/calendar.svg';
import { IconProps } from '../../type';

const componentName = 'CalendarOutlined';
export const CalendarOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return <AelfIcon component={AelfSVGComponent} ref={ref} {...props} />;
});
CalendarOutlined.displayName = componentName;
Loading

0 comments on commit 1362d6a

Please sign in to comment.