Skip to content

Commit

Permalink
✨ feat: Add more ai brands
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 authored Jan 31, 2024
1 parent 16ac47c commit 7c6c843
Show file tree
Hide file tree
Showing 40 changed files with 811 additions and 127 deletions.
14 changes: 14 additions & 0 deletions src/Automatic/components/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { memo } from 'react';

import IconAvatar, { type IconAvatarProps } from '@/IconAvatar';

import { COLOR_PRIMARY } from '../style';
import Mono from './Mono';

export type AvatarProps = Omit<IconAvatarProps, 'Icon'>;

const Avatar = memo<AvatarProps>(({ background, ...rest }) => {
return <IconAvatar Icon={Mono} background={background || COLOR_PRIMARY} {...rest} />;
});

export default Avatar;
27 changes: 27 additions & 0 deletions src/Automatic/components/Color.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { forwardRef } from 'react';

import type { IconType } from '@/types';

const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
return (
<svg
height={size}
ref={ref}
style={{ flex: 'none', lineHeight: 1, ...style }}
viewBox="0 0 24 24"
width={size}
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<g fill="#E00054" fillRule="nonzero">
<path d="M8.462 3.5h2.924l8.33 17h-1.46L10.617 4.942l-1.442.001z" opacity=".8"></path>
<path d="M5.474 20.5l2.817-5.366 2.873 5.366h5.541l-8.362-17L0 20.5z"></path>
<path d="M12.768 3.501L21.113 20.5h1.46L14.238 3.504z" opacity=".4"></path>
<path d="M14.195 3.501L22.54 20.5H24L15.666 3.504z" opacity=".2"></path>
<path d="M11.34 3.501L19.683 20.5h1.464L12.81 3.504z" opacity=".6"></path>
</g>
</svg>
);
});

export default Icon;
27 changes: 27 additions & 0 deletions src/Automatic/components/Combine.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { memo } from 'react';

import IconCombine, { type IconCombineProps } from '@/IconCombine';

import { SPACE_MULTIPLE, TEXT_MULTIPLE } from '../style';
import Color from './Color';
import Mono from './Mono';
import Text from './Text';

export interface CombineProps extends Omit<IconCombineProps, 'Icon' | 'Text'> {
type?: 'color' | 'mono';
}
const Combine = memo<CombineProps>(({ type = 'mono', ...rest }) => {
const Icon = type === 'color' ? Color : Mono;

return (
<IconCombine
Icon={Icon}
Text={Text}
spaceMultiple={SPACE_MULTIPLE}
textMultiple={TEXT_MULTIPLE}
{...rest}
/>
);
});

export default Combine;
29 changes: 29 additions & 0 deletions src/Automatic/components/Mono.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { forwardRef } from 'react';

import type { IconType } from '@/types';

const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
return (
<svg
fill="currentColor"
fillRule="evenodd"
height={size}
ref={ref}
style={{ flex: 'none', lineHeight: 1, ...style }}
viewBox="0 0 24 24"
width={size}
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<g>
<path d="M8.462 3.5h2.924l8.33 17h-1.46L10.617 4.942l-1.442.001z" opacity=".8"></path>
<path d="M5.474 20.5l2.817-5.366 2.873 5.366h5.541l-8.362-17L0 20.5z"></path>
<path d="M12.768 3.501L21.113 20.5h1.46L14.238 3.504z" opacity=".4"></path>
<path d="M14.195 3.501L22.54 20.5H24L15.666 3.504z" opacity=".2"></path>
<path d="M11.34 3.501L19.683 20.5h1.464L12.81 3.504z" opacity=".6"></path>
</g>
</svg>
);
});

export default Icon;
1 change: 1 addition & 0 deletions src/Automatic/components/Text.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '@/Stability/components/Text';
74 changes: 74 additions & 0 deletions src/Automatic/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
nav: Components
group: Icons
title: Automatic1111 (SD Webui)
atomId: Automatic
description: https://github.com/AUTOMATIC1111/stable-diffusion-webui
---

## Icons

Not Official: <https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/2901>

```tsx
import { Automatic } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';

export default () => (
<Flexbox gap={16} horizontal>
<Automatic size={64} />
<Automatic.Color size={64} />
</Flexbox>
);
```

## Text

```tsx
import { Automatic } from '@lobehub/icons';

export default () => <Automatic.Text size={48} />;
```

## Combine

```tsx
import { Automatic } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';

export default () => (
<Flexbox gap={16}>
<Automatic.Combine size={64} />
<Automatic.Combine size={64} type={'color'} />
</Flexbox>
);
```

## Avatars

```tsx
import { Automatic } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';

export default () => (
<Flexbox gap={16} horizontal>
<Automatic.Avatar size={64} />
<Automatic.Avatar size={64} shape={'square'} />
</Flexbox>
);
```

## Colors

```tsx
import { Automatic } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';

import ColorPreview from '../components/ColorPreview';

export default () => (
<Flexbox gap={16} horizontal>
<ColorPreview color={Automatic.colorPrimary} />
</Flexbox>
);
```
24 changes: 24 additions & 0 deletions src/Automatic/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Avatar from './components/Avatar';
import Color from './components/Color';
import Combine from './components/Combine';
import Mono from './components/Mono';
import Text from './components/Text';
import { COLOR_PRIMARY } from './style';

export type CompoundedIcon = typeof Mono & {
Avatar: typeof Avatar;
Color: typeof Color;
Combine: typeof Combine;
Mono: typeof Mono;
Text: typeof Text;
colorPrimary: string;
};

const Icons = Mono as CompoundedIcon;
Icons.Color = Color;
Icons.Text = Text;
Icons.Combine = Combine;
Icons.Avatar = Avatar;
Icons.colorPrimary = COLOR_PRIMARY;

export default Icons;
3 changes: 3 additions & 0 deletions src/Automatic/style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const TEXT_MULTIPLE = 0.75;
export const SPACE_MULTIPLE = 0.2;
export const COLOR_PRIMARY = '#E00054';
29 changes: 10 additions & 19 deletions src/Baichuan/components/Color.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { forwardRef } from 'react';

import { useFillId } from '@/hooks/useFillId';
import type { IconType } from '@/types';

const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
const { id, fill } = useFillId('baichuan');
return (
<svg
height={size}
Expand All @@ -13,28 +15,17 @@ const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<path d="M7.333 2h-3.2l-2 4.333V17.8L0 22h5.2l2.028-4.2L7.333 2z" fill="url(#a)"></path>
<path d="M14.667 2h-5.2v20h5.2V2z" fill="url(#b)"></path>
<path d="M16.8 7.733H22V22h-5.2V7.733z" fill="url(#c)"></path>
<path d="M22 2h-5.2v4.133H22V2z" fill="url(#d)"></path>
<defs>
<linearGradient gradientUnits="userSpaceOnUse" id="a" x1="0" x2="24.091" y1="2" y2="23.818">
<stop stopColor="#FEC13E"></stop>
<stop offset="1" stopColor="#FF6933"></stop>
</linearGradient>
<linearGradient gradientUnits="userSpaceOnUse" id="b" x1="0" x2="24.091" y1="2" y2="23.818">
<stop stopColor="#FEC13E"></stop>
<stop offset="1" stopColor="#FF6933"></stop>
</linearGradient>
<linearGradient gradientUnits="userSpaceOnUse" id="c" x1="0" x2="24.091" y1="2" y2="23.818">
<stop stopColor="#FEC13E"></stop>
<stop offset="1" stopColor="#FF6933"></stop>
</linearGradient>
<linearGradient gradientUnits="userSpaceOnUse" id="d" x1="0" x2="24.091" y1="2" y2="23.818">
<stop stopColor="#FEC13E"></stop>
<stop offset="1" stopColor="#FF6933"></stop>
<linearGradient id={id} x1="17.764%" x2="100%" y1="8.678%" y2="91.322%">
<stop offset="0%" stopColor="#FEC13E"></stop>
<stop offset="100%" stopColor="#FF6933"></stop>
</linearGradient>
</defs>
<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"
fill={fill}
fillRule="nonzero"
></path>
</svg>
);
});
Expand Down
23 changes: 1 addition & 22 deletions src/Baichuan/components/Mono.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,7 @@ const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<path d="M7.333 2h-3.2l-2 4.333V17.8L0 22h5.2l2.028-4.2L7.333 2z"></path>
<path d="M14.667 2h-5.2v20h5.2V2z"></path>
<path d="M16.8 7.733H22V22h-5.2V7.733z"></path>
<path d="M22 2h-5.2v4.133H22V2z"></path>
<defs>
<linearGradient gradientUnits="userSpaceOnUse" id="a" x1="0" x2="24.091" y1="2" y2="23.818">
<stop stopColor="#FEC13E"></stop>
<stop offset="1" stopColor="#FF6933"></stop>
</linearGradient>
<linearGradient gradientUnits="userSpaceOnUse" id="b" x1="0" x2="24.091" y1="2" y2="23.818">
<stop stopColor="#FEC13E"></stop>
<stop offset="1" stopColor="#FF6933"></stop>
</linearGradient>
<linearGradient gradientUnits="userSpaceOnUse" id="c" x1="0" x2="24.091" y1="2" y2="23.818">
<stop stopColor="#FEC13E"></stop>
<stop offset="1" stopColor="#FF6933"></stop>
</linearGradient>
<linearGradient gradientUnits="userSpaceOnUse" id="d" x1="0" x2="24.091" y1="2" y2="23.818">
<stop stopColor="#FEC13E"></stop>
<stop offset="1" stopColor="#FF6933"></stop>
</linearGradient>
</defs>
<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>
</svg>
);
});
Expand Down
6 changes: 1 addition & 5 deletions src/Baichuan/components/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<path
clipRule="evenodd"
d="M2 2v2.712h8.136L9.57 7.198H4.26v14.576h2.712v-1.356h9.717v1.356h2.938V7.198H12.51l.677-2.486h8.362V2H2zm4.972 16.045v-2.938h9.717v2.825l-9.717.113zm0-8.361v2.937l9.717-.113V9.684H6.972z"
></path>
<path d="M28.893 2.113h-2.825v10.735c0 1.92-1.133 4.988-2.712 7.231L25.729 22c1.873-2.578 3.164-6.667 3.164-8.927V2.113zM32.96 3.017h2.712v16.61h-2.711V3.017zM42.452 2H39.74v19.661h2.712V2z"></path>
<path d="M2 2v2.712h8.136L9.57 7.198H4.26v14.576h2.712v-1.356h9.717v1.356h2.938V7.198H12.51l.677-2.486h8.362V2H2zm4.972 16.045v-2.938h9.717v2.825l-9.717.113zm0-8.361v2.937l9.717-.113V9.684H6.972zm21.921-7.571h-2.825v10.735c0 1.92-1.133 4.988-2.712 7.231L25.729 22c1.873-2.578 3.164-6.667 3.164-8.927V2.113zm4.067.904h2.712v16.61h-2.711l-.001-16.61zM42.452 2H39.74v19.661h2.712V2z"></path>
</svg>
);
});
Expand Down
2 changes: 1 addition & 1 deletion src/Dalle/style.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const TEXT_MULTIPLE = 0.75;
export const TEXT_MULTIPLE = 0.7;
export const SPACE_MULTIPLE = 0.2;
export const COLOR_PRIMARY = '#000';
1 change: 0 additions & 1 deletion src/Gemini/style.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export const TEXT_MULTIPLE = 0.8;
export const SPACE_MULTIPLE = 0.2;

export const COLOR_PRIMARY = '#1C69FF';
export const COLOR_GRADIENT = 'linear-gradient(45deg, #1C69FF 40%, #F0DCD6 100%)';
4 changes: 2 additions & 2 deletions src/IconCombine/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { IconType } from '@/types';

export interface IconCombineProps extends FlexboxProps {
Icon: IconType;
Text: IconType;
Text?: IconType;
color?: string;
extra?: string;
extraClassName?: string;
Expand Down Expand Up @@ -35,7 +35,7 @@ const IconCombine = memo<IconCombineProps>(
return (
<Flexbox align={'center'} flex={'none'} horizontal style={{ color, ...style }} {...rest}>
{showLogo && <Icon size={size} style={{ marginRight: size * spaceMultiple }} />}
{showText && <Text size={size * textMultiple} />}
{showText && Text && <Text size={size * textMultiple} />}
{extra && (
<span
className={extraClassName}
Expand Down
44 changes: 10 additions & 34 deletions src/Minimax/components/Color.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { forwardRef } from 'react';

import { useFillId } from '@/hooks/useFillId';
import type { IconType } from '@/types';

const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
const { id, fill } = useFillId('minimax');
return (
<svg
height={size}
Expand All @@ -13,43 +15,17 @@ const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<g clipPath="url(#a)">
<path
d="M9.815 4.093a.789.789 0 011.578 0v11.65a.652.652 0 101.304 0V4.093a2.093 2.093 0 00-4.186 0v14.168a.766.766 0 11-1.533 0V9.177a2.07 2.07 0 10-4.141 0v3.843a.766.766 0 11-1.532 0v-1.393a.652.652 0 10-1.305 0v1.393a2.07 2.07 0 104.142 0V9.177a.766.766 0 011.532 0v9.084a2.07 2.07 0 104.141 0V4.093z"
fill="url(#b)"
></path>
<path
d="M15.49 4.093a.789.789 0 011.577 0v12.639a2.048 2.048 0 104.096 0V9.177a.766.766 0 111.532 0v6.634a.652.652 0 001.305 0V9.177a2.07 2.07 0 10-4.142 0v7.555a.744.744 0 01-1.487 0V4.093a2.093 2.093 0 10-4.186 0v16.08a.744.744 0 11-1.488 0v-1.956a.652.652 0 00-1.304 0v1.956a2.048 2.048 0 104.096 0V4.093z"
fill="url(#c)"
></path>
</g>
<defs>
<linearGradient
gradientUnits="userSpaceOnUse"
id="b"
x1="0"
x2="24.023"
y1="12.122"
y2="12.122"
>
<stop stopColor="#E2167E"></stop>
<stop offset="1" stopColor="#FE603C"></stop>
<linearGradient id={id} x1="0%" x2="100.182%" y1="50.057%" y2="50.057%">
<stop offset="0%" stopColor="#E2167E"></stop>
<stop offset="100%" stopColor="#FE603C"></stop>
</linearGradient>
<linearGradient
gradientUnits="userSpaceOnUse"
id="c"
x1="0"
x2="24.023"
y1="12.122"
y2="12.122"
>
<stop stopColor="#E2167E"></stop>
<stop offset="1" stopColor="#FE603C"></stop>
</linearGradient>
<clipPath id="a">
<path d="M0 0h24v24H0z" fill="#fff"></path>
</clipPath>
</defs>
<path
d="M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z"
fill={fill}
fillRule="nonzero"
></path>
</svg>
);
});
Expand Down
3 changes: 1 addition & 2 deletions src/Minimax/components/Mono.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<path d="M9.815 4.093a.789.789 0 011.578 0v11.65a.652.652 0 101.304 0V4.093a2.093 2.093 0 00-4.186 0v14.168a.766.766 0 11-1.533 0V9.177a2.07 2.07 0 10-4.141 0v3.843a.766.766 0 11-1.532 0v-1.393a.652.652 0 10-1.305 0v1.393a2.07 2.07 0 104.142 0V9.177a.766.766 0 011.532 0v9.084a2.07 2.07 0 104.141 0V4.093z"></path>
<path d="M15.49 4.093a.789.789 0 011.577 0v12.639a2.048 2.048 0 104.096 0V9.177a.766.766 0 111.532 0v6.634a.652.652 0 001.305 0V9.177a2.07 2.07 0 10-4.142 0v7.555a.744.744 0 01-1.487 0V4.093a2.093 2.093 0 10-4.186 0v16.08a.744.744 0 11-1.488 0v-1.956a.652.652 0 00-1.304 0v1.956a2.048 2.048 0 104.096 0V4.093z"></path>
<path d="M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z"></path>
</svg>
);
});
Expand Down
Loading

0 comments on commit 7c6c843

Please sign in to comment.