Skip to content

Commit 7c6c843

Browse files
✨ feat: Add more ai brands
1 parent 16ac47c commit 7c6c843

File tree

40 files changed

+811
-127
lines changed

40 files changed

+811
-127
lines changed

src/Automatic/components/Avatar.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { memo } from 'react';
2+
3+
import IconAvatar, { type IconAvatarProps } from '@/IconAvatar';
4+
5+
import { COLOR_PRIMARY } from '../style';
6+
import Mono from './Mono';
7+
8+
export type AvatarProps = Omit<IconAvatarProps, 'Icon'>;
9+
10+
const Avatar = memo<AvatarProps>(({ background, ...rest }) => {
11+
return <IconAvatar Icon={Mono} background={background || COLOR_PRIMARY} {...rest} />;
12+
});
13+
14+
export default Avatar;

src/Automatic/components/Color.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { forwardRef } from 'react';
2+
3+
import type { IconType } from '@/types';
4+
5+
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
6+
return (
7+
<svg
8+
height={size}
9+
ref={ref}
10+
style={{ flex: 'none', lineHeight: 1, ...style }}
11+
viewBox="0 0 24 24"
12+
width={size}
13+
xmlns="http://www.w3.org/2000/svg"
14+
{...rest}
15+
>
16+
<g fill="#E00054" fillRule="nonzero">
17+
<path d="M8.462 3.5h2.924l8.33 17h-1.46L10.617 4.942l-1.442.001z" opacity=".8"></path>
18+
<path d="M5.474 20.5l2.817-5.366 2.873 5.366h5.541l-8.362-17L0 20.5z"></path>
19+
<path d="M12.768 3.501L21.113 20.5h1.46L14.238 3.504z" opacity=".4"></path>
20+
<path d="M14.195 3.501L22.54 20.5H24L15.666 3.504z" opacity=".2"></path>
21+
<path d="M11.34 3.501L19.683 20.5h1.464L12.81 3.504z" opacity=".6"></path>
22+
</g>
23+
</svg>
24+
);
25+
});
26+
27+
export default Icon;

src/Automatic/components/Combine.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { memo } from 'react';
2+
3+
import IconCombine, { type IconCombineProps } from '@/IconCombine';
4+
5+
import { SPACE_MULTIPLE, TEXT_MULTIPLE } from '../style';
6+
import Color from './Color';
7+
import Mono from './Mono';
8+
import Text from './Text';
9+
10+
export interface CombineProps extends Omit<IconCombineProps, 'Icon' | 'Text'> {
11+
type?: 'color' | 'mono';
12+
}
13+
const Combine = memo<CombineProps>(({ type = 'mono', ...rest }) => {
14+
const Icon = type === 'color' ? Color : Mono;
15+
16+
return (
17+
<IconCombine
18+
Icon={Icon}
19+
Text={Text}
20+
spaceMultiple={SPACE_MULTIPLE}
21+
textMultiple={TEXT_MULTIPLE}
22+
{...rest}
23+
/>
24+
);
25+
});
26+
27+
export default Combine;

src/Automatic/components/Mono.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { forwardRef } from 'react';
2+
3+
import type { IconType } from '@/types';
4+
5+
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
6+
return (
7+
<svg
8+
fill="currentColor"
9+
fillRule="evenodd"
10+
height={size}
11+
ref={ref}
12+
style={{ flex: 'none', lineHeight: 1, ...style }}
13+
viewBox="0 0 24 24"
14+
width={size}
15+
xmlns="http://www.w3.org/2000/svg"
16+
{...rest}
17+
>
18+
<g>
19+
<path d="M8.462 3.5h2.924l8.33 17h-1.46L10.617 4.942l-1.442.001z" opacity=".8"></path>
20+
<path d="M5.474 20.5l2.817-5.366 2.873 5.366h5.541l-8.362-17L0 20.5z"></path>
21+
<path d="M12.768 3.501L21.113 20.5h1.46L14.238 3.504z" opacity=".4"></path>
22+
<path d="M14.195 3.501L22.54 20.5H24L15.666 3.504z" opacity=".2"></path>
23+
<path d="M11.34 3.501L19.683 20.5h1.464L12.81 3.504z" opacity=".6"></path>
24+
</g>
25+
</svg>
26+
);
27+
});
28+
29+
export default Icon;

src/Automatic/components/Text.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from '@/Stability/components/Text';

src/Automatic/index.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
nav: Components
3+
group: Icons
4+
title: Automatic1111 (SD Webui)
5+
atomId: Automatic
6+
description: https://github.com/AUTOMATIC1111/stable-diffusion-webui
7+
---
8+
9+
## Icons
10+
11+
Not Official: <https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/2901>
12+
13+
```tsx
14+
import { Automatic } from '@lobehub/icons';
15+
import { Flexbox } from 'react-layout-kit';
16+
17+
export default () => (
18+
<Flexbox gap={16} horizontal>
19+
<Automatic size={64} />
20+
<Automatic.Color size={64} />
21+
</Flexbox>
22+
);
23+
```
24+
25+
## Text
26+
27+
```tsx
28+
import { Automatic } from '@lobehub/icons';
29+
30+
export default () => <Automatic.Text size={48} />;
31+
```
32+
33+
## Combine
34+
35+
```tsx
36+
import { Automatic } from '@lobehub/icons';
37+
import { Flexbox } from 'react-layout-kit';
38+
39+
export default () => (
40+
<Flexbox gap={16}>
41+
<Automatic.Combine size={64} />
42+
<Automatic.Combine size={64} type={'color'} />
43+
</Flexbox>
44+
);
45+
```
46+
47+
## Avatars
48+
49+
```tsx
50+
import { Automatic } from '@lobehub/icons';
51+
import { Flexbox } from 'react-layout-kit';
52+
53+
export default () => (
54+
<Flexbox gap={16} horizontal>
55+
<Automatic.Avatar size={64} />
56+
<Automatic.Avatar size={64} shape={'square'} />
57+
</Flexbox>
58+
);
59+
```
60+
61+
## Colors
62+
63+
```tsx
64+
import { Automatic } from '@lobehub/icons';
65+
import { Flexbox } from 'react-layout-kit';
66+
67+
import ColorPreview from '../components/ColorPreview';
68+
69+
export default () => (
70+
<Flexbox gap={16} horizontal>
71+
<ColorPreview color={Automatic.colorPrimary} />
72+
</Flexbox>
73+
);
74+
```

src/Automatic/index.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import Avatar from './components/Avatar';
2+
import Color from './components/Color';
3+
import Combine from './components/Combine';
4+
import Mono from './components/Mono';
5+
import Text from './components/Text';
6+
import { COLOR_PRIMARY } from './style';
7+
8+
export type CompoundedIcon = typeof Mono & {
9+
Avatar: typeof Avatar;
10+
Color: typeof Color;
11+
Combine: typeof Combine;
12+
Mono: typeof Mono;
13+
Text: typeof Text;
14+
colorPrimary: string;
15+
};
16+
17+
const Icons = Mono as CompoundedIcon;
18+
Icons.Color = Color;
19+
Icons.Text = Text;
20+
Icons.Combine = Combine;
21+
Icons.Avatar = Avatar;
22+
Icons.colorPrimary = COLOR_PRIMARY;
23+
24+
export default Icons;

src/Automatic/style.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const TEXT_MULTIPLE = 0.75;
2+
export const SPACE_MULTIPLE = 0.2;
3+
export const COLOR_PRIMARY = '#E00054';

src/Baichuan/components/Color.tsx

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { forwardRef } from 'react';
22

3+
import { useFillId } from '@/hooks/useFillId';
34
import type { IconType } from '@/types';
45

56
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
7+
const { id, fill } = useFillId('baichuan');
68
return (
79
<svg
810
height={size}
@@ -13,28 +15,17 @@ const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
1315
xmlns="http://www.w3.org/2000/svg"
1416
{...rest}
1517
>
16-
<path d="M7.333 2h-3.2l-2 4.333V17.8L0 22h5.2l2.028-4.2L7.333 2z" fill="url(#a)"></path>
17-
<path d="M14.667 2h-5.2v20h5.2V2z" fill="url(#b)"></path>
18-
<path d="M16.8 7.733H22V22h-5.2V7.733z" fill="url(#c)"></path>
19-
<path d="M22 2h-5.2v4.133H22V2z" fill="url(#d)"></path>
2018
<defs>
21-
<linearGradient gradientUnits="userSpaceOnUse" id="a" x1="0" x2="24.091" y1="2" y2="23.818">
22-
<stop stopColor="#FEC13E"></stop>
23-
<stop offset="1" stopColor="#FF6933"></stop>
24-
</linearGradient>
25-
<linearGradient gradientUnits="userSpaceOnUse" id="b" x1="0" x2="24.091" y1="2" y2="23.818">
26-
<stop stopColor="#FEC13E"></stop>
27-
<stop offset="1" stopColor="#FF6933"></stop>
28-
</linearGradient>
29-
<linearGradient gradientUnits="userSpaceOnUse" id="c" x1="0" x2="24.091" y1="2" y2="23.818">
30-
<stop stopColor="#FEC13E"></stop>
31-
<stop offset="1" stopColor="#FF6933"></stop>
32-
</linearGradient>
33-
<linearGradient gradientUnits="userSpaceOnUse" id="d" x1="0" x2="24.091" y1="2" y2="23.818">
34-
<stop stopColor="#FEC13E"></stop>
35-
<stop offset="1" stopColor="#FF6933"></stop>
19+
<linearGradient id={id} x1="17.764%" x2="100%" y1="8.678%" y2="91.322%">
20+
<stop offset="0%" stopColor="#FEC13E"></stop>
21+
<stop offset="100%" stopColor="#FF6933"></stop>
3622
</linearGradient>
3723
</defs>
24+
<path
25+
d="M7.333 2h-3.2l-2 4.333V17.8L0 22h5.2l2.028-4.2L7.333 2zm7.334 0h-5.2v20h5.2V2zM16.8 7.733H22V22h-5.2V7.733zM22 2h-5.2v4.133H22V2z"
26+
fill={fill}
27+
fillRule="nonzero"
28+
></path>
3829
</svg>
3930
);
4031
});

src/Baichuan/components/Mono.tsx

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,7 @@ const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
1515
xmlns="http://www.w3.org/2000/svg"
1616
{...rest}
1717
>
18-
<path d="M7.333 2h-3.2l-2 4.333V17.8L0 22h5.2l2.028-4.2L7.333 2z"></path>
19-
<path d="M14.667 2h-5.2v20h5.2V2z"></path>
20-
<path d="M16.8 7.733H22V22h-5.2V7.733z"></path>
21-
<path d="M22 2h-5.2v4.133H22V2z"></path>
22-
<defs>
23-
<linearGradient gradientUnits="userSpaceOnUse" id="a" x1="0" x2="24.091" y1="2" y2="23.818">
24-
<stop stopColor="#FEC13E"></stop>
25-
<stop offset="1" stopColor="#FF6933"></stop>
26-
</linearGradient>
27-
<linearGradient gradientUnits="userSpaceOnUse" id="b" x1="0" x2="24.091" y1="2" y2="23.818">
28-
<stop stopColor="#FEC13E"></stop>
29-
<stop offset="1" stopColor="#FF6933"></stop>
30-
</linearGradient>
31-
<linearGradient gradientUnits="userSpaceOnUse" id="c" x1="0" x2="24.091" y1="2" y2="23.818">
32-
<stop stopColor="#FEC13E"></stop>
33-
<stop offset="1" stopColor="#FF6933"></stop>
34-
</linearGradient>
35-
<linearGradient gradientUnits="userSpaceOnUse" id="d" x1="0" x2="24.091" y1="2" y2="23.818">
36-
<stop stopColor="#FEC13E"></stop>
37-
<stop offset="1" stopColor="#FF6933"></stop>
38-
</linearGradient>
39-
</defs>
18+
<path d="M7.333 2h-3.2l-2 4.333V17.8L0 22h5.2l2.028-4.2L7.333 2zm7.334 0h-5.2v20h5.2V2zM16.8 7.733H22V22h-5.2V7.733zM22 2h-5.2v4.133H22V2z"></path>
4019
</svg>
4120
);
4221
});

0 commit comments

Comments
 (0)