From 7c6c843d05b251e0e29b0d43ea389b65457515cf Mon Sep 17 00:00:00 2001 From: CanisMinor Date: Wed, 31 Jan 2024 17:28:20 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Add=20more=20ai=20brands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Automatic/components/Avatar.tsx | 14 ++++ src/Automatic/components/Color.tsx | 27 ++++++++ src/Automatic/components/Combine.tsx | 27 ++++++++ src/Automatic/components/Mono.tsx | 29 ++++++++ src/Automatic/components/Text.tsx | 1 + src/Automatic/index.md | 74 +++++++++++++++++++++ src/Automatic/index.ts | 24 +++++++ src/Automatic/style.ts | 3 + src/Baichuan/components/Color.tsx | 29 +++----- src/Baichuan/components/Mono.tsx | 23 +------ src/Baichuan/components/Text.tsx | 6 +- src/Dalle/style.ts | 2 +- src/Gemini/style.ts | 1 - src/IconCombine/index.tsx | 4 +- src/Minimax/components/Color.tsx | 44 +++---------- src/Minimax/components/Mono.tsx | 3 +- src/Minimax/components/Text.tsx | 7 +- src/Mistral/components/Avatar.tsx | 22 +++++++ src/Mistral/components/Color.tsx | 31 +++++++++ src/Mistral/components/Combine.tsx | 27 ++++++++ src/Mistral/components/Mono.tsx | 30 +++++++++ src/Mistral/components/Text.tsx | 22 +++++++ src/Mistral/index.md | 74 +++++++++++++++++++++ src/Mistral/index.ts | 26 ++++++++ src/Mistral/style.ts | 5 ++ src/Ollama/components/Mono.tsx | 4 +- src/Ollama/components/Text.tsx | 32 +++++---- src/Ollama/style.ts | 2 +- src/Stability/components/Avatar.tsx | 14 ++++ src/Stability/components/BrandColor.tsx | 37 +++++++++++ src/Stability/components/BrandMono.tsx | 25 +++++++ src/Stability/components/Color.tsx | 38 +++++++++++ src/Stability/components/Combine.tsx | 27 ++++++++ src/Stability/components/Mono.tsx | 26 ++++++++ src/Stability/components/Text.tsx | 22 +++++++ src/Stability/index.md | 88 +++++++++++++++++++++++++ src/Stability/index.ts | 32 +++++++++ src/Stability/style.ts | 4 ++ src/components/ColorPreview/index.tsx | 29 ++++---- src/index.ts | 3 + 40 files changed, 811 insertions(+), 127 deletions(-) create mode 100644 src/Automatic/components/Avatar.tsx create mode 100644 src/Automatic/components/Color.tsx create mode 100644 src/Automatic/components/Combine.tsx create mode 100644 src/Automatic/components/Mono.tsx create mode 100644 src/Automatic/components/Text.tsx create mode 100644 src/Automatic/index.md create mode 100644 src/Automatic/index.ts create mode 100644 src/Automatic/style.ts create mode 100644 src/Mistral/components/Avatar.tsx create mode 100644 src/Mistral/components/Color.tsx create mode 100644 src/Mistral/components/Combine.tsx create mode 100644 src/Mistral/components/Mono.tsx create mode 100644 src/Mistral/components/Text.tsx create mode 100644 src/Mistral/index.md create mode 100644 src/Mistral/index.ts create mode 100644 src/Mistral/style.ts create mode 100644 src/Stability/components/Avatar.tsx create mode 100644 src/Stability/components/BrandColor.tsx create mode 100644 src/Stability/components/BrandMono.tsx create mode 100644 src/Stability/components/Color.tsx create mode 100644 src/Stability/components/Combine.tsx create mode 100644 src/Stability/components/Mono.tsx create mode 100644 src/Stability/components/Text.tsx create mode 100644 src/Stability/index.md create mode 100644 src/Stability/index.ts create mode 100644 src/Stability/style.ts diff --git a/src/Automatic/components/Avatar.tsx b/src/Automatic/components/Avatar.tsx new file mode 100644 index 0000000..e7c3a9d --- /dev/null +++ b/src/Automatic/components/Avatar.tsx @@ -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; + +const Avatar = memo(({ background, ...rest }) => { + return ; +}); + +export default Avatar; diff --git a/src/Automatic/components/Color.tsx b/src/Automatic/components/Color.tsx new file mode 100644 index 0000000..2709c1a --- /dev/null +++ b/src/Automatic/components/Color.tsx @@ -0,0 +1,27 @@ +import { forwardRef } from 'react'; + +import type { IconType } from '@/types'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + + + + + + + + + ); +}); + +export default Icon; diff --git a/src/Automatic/components/Combine.tsx b/src/Automatic/components/Combine.tsx new file mode 100644 index 0000000..176cdc8 --- /dev/null +++ b/src/Automatic/components/Combine.tsx @@ -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 { + type?: 'color' | 'mono'; +} +const Combine = memo(({ type = 'mono', ...rest }) => { + const Icon = type === 'color' ? Color : Mono; + + return ( + + ); +}); + +export default Combine; diff --git a/src/Automatic/components/Mono.tsx b/src/Automatic/components/Mono.tsx new file mode 100644 index 0000000..84cca1a --- /dev/null +++ b/src/Automatic/components/Mono.tsx @@ -0,0 +1,29 @@ +import { forwardRef } from 'react'; + +import type { IconType } from '@/types'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + + + + + + + + + ); +}); + +export default Icon; diff --git a/src/Automatic/components/Text.tsx b/src/Automatic/components/Text.tsx new file mode 100644 index 0000000..091373d --- /dev/null +++ b/src/Automatic/components/Text.tsx @@ -0,0 +1 @@ +export { default } from '@/Stability/components/Text'; diff --git a/src/Automatic/index.md b/src/Automatic/index.md new file mode 100644 index 0000000..399e838 --- /dev/null +++ b/src/Automatic/index.md @@ -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: + +```tsx +import { Automatic } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + +); +``` + +## Text + +```tsx +import { Automatic } from '@lobehub/icons'; + +export default () => ; +``` + +## Combine + +```tsx +import { Automatic } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + +); +``` + +## Avatars + +```tsx +import { Automatic } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + +); +``` + +## Colors + +```tsx +import { Automatic } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +import ColorPreview from '../components/ColorPreview'; + +export default () => ( + + + +); +``` diff --git a/src/Automatic/index.ts b/src/Automatic/index.ts new file mode 100644 index 0000000..ebca4b1 --- /dev/null +++ b/src/Automatic/index.ts @@ -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; diff --git a/src/Automatic/style.ts b/src/Automatic/style.ts new file mode 100644 index 0000000..c486556 --- /dev/null +++ b/src/Automatic/style.ts @@ -0,0 +1,3 @@ +export const TEXT_MULTIPLE = 0.75; +export const SPACE_MULTIPLE = 0.2; +export const COLOR_PRIMARY = '#E00054'; diff --git a/src/Baichuan/components/Color.tsx b/src/Baichuan/components/Color.tsx index a54dcd5..27875c6 100644 --- a/src/Baichuan/components/Color.tsx +++ b/src/Baichuan/components/Color.tsx @@ -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 ( { xmlns="http://www.w3.org/2000/svg" {...rest} > - - - - - - - - - - - - - - - - - - - + + + + ); }); diff --git a/src/Baichuan/components/Mono.tsx b/src/Baichuan/components/Mono.tsx index c2d4c02..1e3b67a 100644 --- a/src/Baichuan/components/Mono.tsx +++ b/src/Baichuan/components/Mono.tsx @@ -15,28 +15,7 @@ const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { xmlns="http://www.w3.org/2000/svg" {...rest} > - - - - - - - - - - - - - - - - - - - - - - + ); }); diff --git a/src/Baichuan/components/Text.tsx b/src/Baichuan/components/Text.tsx index 0218023..50d5935 100644 --- a/src/Baichuan/components/Text.tsx +++ b/src/Baichuan/components/Text.tsx @@ -14,11 +14,7 @@ const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { xmlns="http://www.w3.org/2000/svg" {...rest} > - - + ); }); diff --git a/src/Dalle/style.ts b/src/Dalle/style.ts index fb3e32d..056db49 100644 --- a/src/Dalle/style.ts +++ b/src/Dalle/style.ts @@ -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'; diff --git a/src/Gemini/style.ts b/src/Gemini/style.ts index ad11eee..7908bbb 100644 --- a/src/Gemini/style.ts +++ b/src/Gemini/style.ts @@ -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%)'; diff --git a/src/IconCombine/index.tsx b/src/IconCombine/index.tsx index e8d0490..16ea736 100644 --- a/src/IconCombine/index.tsx +++ b/src/IconCombine/index.tsx @@ -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; @@ -35,7 +35,7 @@ const IconCombine = memo( return ( {showLogo && } - {showText && } + {showText && Text && } {extra && ( { + const { id, fill } = useFillId('minimax'); return ( { xmlns="http://www.w3.org/2000/svg" {...rest} > - - - - - - - + + + - - - - - - - + ); }); diff --git a/src/Minimax/components/Mono.tsx b/src/Minimax/components/Mono.tsx index bc8dbe0..375d70b 100644 --- a/src/Minimax/components/Mono.tsx +++ b/src/Minimax/components/Mono.tsx @@ -15,8 +15,7 @@ const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { xmlns="http://www.w3.org/2000/svg" {...rest} > - - + ); }); diff --git a/src/Minimax/components/Text.tsx b/src/Minimax/components/Text.tsx index ff264c8..2e7a686 100644 --- a/src/Minimax/components/Text.tsx +++ b/src/Minimax/components/Text.tsx @@ -14,12 +14,7 @@ const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { xmlns="http://www.w3.org/2000/svg" {...rest} > - - - + ); }); diff --git a/src/Mistral/components/Avatar.tsx b/src/Mistral/components/Avatar.tsx new file mode 100644 index 0000000..abb7186 --- /dev/null +++ b/src/Mistral/components/Avatar.tsx @@ -0,0 +1,22 @@ +import { memo } from 'react'; + +import IconAvatar, { type IconAvatarProps } from '@/IconAvatar'; + +import { COLOR_GRADIENT } from '../style'; +import Mono from './Mono'; + +export type AvatarProps = Omit; + +const Avatar = memo(({ background, ...rest }) => { + return ( + + ); +}); + +export default Avatar; diff --git a/src/Mistral/components/Color.tsx b/src/Mistral/components/Color.tsx new file mode 100644 index 0000000..d356c41 --- /dev/null +++ b/src/Mistral/components/Color.tsx @@ -0,0 +1,31 @@ +import { forwardRef } from 'react'; + +import type { IconType } from '@/types'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + + + + + + + + + + ); +}); + +export default Icon; diff --git a/src/Mistral/components/Combine.tsx b/src/Mistral/components/Combine.tsx new file mode 100644 index 0000000..176cdc8 --- /dev/null +++ b/src/Mistral/components/Combine.tsx @@ -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 { + type?: 'color' | 'mono'; +} +const Combine = memo(({ type = 'mono', ...rest }) => { + const Icon = type === 'color' ? Color : Mono; + + return ( + + ); +}); + +export default Combine; diff --git a/src/Mistral/components/Mono.tsx b/src/Mistral/components/Mono.tsx new file mode 100644 index 0000000..9904653 --- /dev/null +++ b/src/Mistral/components/Mono.tsx @@ -0,0 +1,30 @@ +import { forwardRef } from 'react'; + +import type { IconType } from '@/types'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + + + + + + + + + + ); +}); + +export default Icon; diff --git a/src/Mistral/components/Text.tsx b/src/Mistral/components/Text.tsx new file mode 100644 index 0000000..b3ce5f5 --- /dev/null +++ b/src/Mistral/components/Text.tsx @@ -0,0 +1,22 @@ +import { forwardRef } from 'react'; + +import type { IconType } from '@/types'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + + + ); +}); + +export default Icon; diff --git a/src/Mistral/index.md b/src/Mistral/index.md new file mode 100644 index 0000000..db2a8b4 --- /dev/null +++ b/src/Mistral/index.md @@ -0,0 +1,74 @@ +--- +nav: Components +group: Icons +title: Mistral +atomId: Mistral +description: https://mistral.ai +--- + +## Icons + +```tsx +import { Mistral } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + +); +``` + +## Text + +```tsx +import { Mistral } from '@lobehub/icons'; + +export default () => ; +``` + +## Combine + +```tsx +import { Mistral } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + +); +``` + +## Avatars + +```tsx +import { Mistral } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + + +); +``` + +## Colors + +```tsx +import { Mistral } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +import ColorPreview from '../components/ColorPreview'; + +export default () => ( + + + + +); +``` diff --git a/src/Mistral/index.ts b/src/Mistral/index.ts new file mode 100644 index 0000000..18cfc53 --- /dev/null +++ b/src/Mistral/index.ts @@ -0,0 +1,26 @@ +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_GRADIENT, COLOR_PRIMARY } from './style'; + +export type CompoundedIcon = typeof Mono & { + Avatar: typeof Avatar; + Color: typeof Color; + Combine: typeof Combine; + Mono: typeof Mono; + Text: typeof Text; + colorGradient: string; + colorPrimary: string; +}; + +const Icons = Mono as CompoundedIcon; +Icons.Color = Color; +Icons.Text = Text; +Icons.Combine = Combine; +Icons.Avatar = Avatar; +Icons.colorPrimary = COLOR_PRIMARY; +Icons.colorGradient = COLOR_GRADIENT; + +export default Icons; diff --git a/src/Mistral/style.ts b/src/Mistral/style.ts new file mode 100644 index 0000000..419901b --- /dev/null +++ b/src/Mistral/style.ts @@ -0,0 +1,5 @@ +export const TEXT_MULTIPLE = 0.75; +export const SPACE_MULTIPLE = 0.2; +export const COLOR_PRIMARY = '#fd6f00'; +export const COLOR_GRADIENT = + 'linear-gradient(to bottom, #F7D046, #F2A73B, #EE792F, #EE792F, #EA3326'; diff --git a/src/Ollama/components/Mono.tsx b/src/Ollama/components/Mono.tsx index 91eece2..b46ec81 100644 --- a/src/Ollama/components/Mono.tsx +++ b/src/Ollama/components/Mono.tsx @@ -15,9 +15,7 @@ const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { xmlns="http://www.w3.org/2000/svg" {...rest} > - - - + ); }); diff --git a/src/Ollama/components/Text.tsx b/src/Ollama/components/Text.tsx index 46bc811..adb0cd1 100644 --- a/src/Ollama/components/Text.tsx +++ b/src/Ollama/components/Text.tsx @@ -1,18 +1,22 @@ import { forwardRef } from 'react'; -import { Flexbox, FlexboxProps } from 'react-layout-kit'; -const Icon = forwardRef( - ({ size = '1em', style, ...rest }, ref) => { - return ( - - Ollama - - ); - }, -); +import type { IconType } from '@/types'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + + + ); +}); export default Icon; diff --git a/src/Ollama/style.ts b/src/Ollama/style.ts index 255ad03..82a243f 100644 --- a/src/Ollama/style.ts +++ b/src/Ollama/style.ts @@ -1,3 +1,3 @@ -export const TEXT_MULTIPLE = 0.75; +export const TEXT_MULTIPLE = 0.6; export const SPACE_MULTIPLE = 0.1; export const COLOR_PRIMARY = '#fff'; diff --git a/src/Stability/components/Avatar.tsx b/src/Stability/components/Avatar.tsx new file mode 100644 index 0000000..700b80c --- /dev/null +++ b/src/Stability/components/Avatar.tsx @@ -0,0 +1,14 @@ +import { memo } from 'react'; + +import IconAvatar, { type IconAvatarProps } from '@/IconAvatar'; + +import { COLOR_GRADIENT } from '../style'; +import Mono from './Mono'; + +export type AvatarProps = Omit; + +const Avatar = memo(({ background, ...rest }) => { + return ; +}); + +export default Avatar; diff --git a/src/Stability/components/BrandColor.tsx b/src/Stability/components/BrandColor.tsx new file mode 100644 index 0000000..695293c --- /dev/null +++ b/src/Stability/components/BrandColor.tsx @@ -0,0 +1,37 @@ +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('stability-brand'); + return ( + + + + + + + + + + + + + ); +}); + +export default Icon; diff --git a/src/Stability/components/BrandMono.tsx b/src/Stability/components/BrandMono.tsx new file mode 100644 index 0000000..cf9d6eb --- /dev/null +++ b/src/Stability/components/BrandMono.tsx @@ -0,0 +1,25 @@ +import { forwardRef } from 'react'; + +import type { IconType } from '@/types'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + + + + + + ); +}); + +export default Icon; diff --git a/src/Stability/components/Color.tsx b/src/Stability/components/Color.tsx new file mode 100644 index 0000000..8a3450b --- /dev/null +++ b/src/Stability/components/Color.tsx @@ -0,0 +1,38 @@ +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('stability'); + return ( + + + + + + + + + + + + + ); +}); + +export default Icon; diff --git a/src/Stability/components/Combine.tsx b/src/Stability/components/Combine.tsx new file mode 100644 index 0000000..176cdc8 --- /dev/null +++ b/src/Stability/components/Combine.tsx @@ -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 { + type?: 'color' | 'mono'; +} +const Combine = memo(({ type = 'mono', ...rest }) => { + const Icon = type === 'color' ? Color : Mono; + + return ( + + ); +}); + +export default Combine; diff --git a/src/Stability/components/Mono.tsx b/src/Stability/components/Mono.tsx new file mode 100644 index 0000000..f5d7c49 --- /dev/null +++ b/src/Stability/components/Mono.tsx @@ -0,0 +1,26 @@ +import { forwardRef } from 'react'; + +import type { IconType } from '@/types'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + + + + + + ); +}); + +export default Icon; diff --git a/src/Stability/components/Text.tsx b/src/Stability/components/Text.tsx new file mode 100644 index 0000000..bfff53f --- /dev/null +++ b/src/Stability/components/Text.tsx @@ -0,0 +1,22 @@ +import { forwardRef } from 'react'; + +import type { IconType } from '@/types'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + + + ); +}); + +export default Icon; diff --git a/src/Stability/index.md b/src/Stability/index.md new file mode 100644 index 0000000..cda83ca --- /dev/null +++ b/src/Stability/index.md @@ -0,0 +1,88 @@ +--- +nav: Components +group: Icons +title: Stability (StableDiffusion) +atomId: Stability +description: https://deepmind.google/technologies/gemini +--- + +## Icons + +```tsx +import { Stability } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + +); +``` + +## Text + +```tsx +import { Stability } from '@lobehub/icons'; + +export default () => ; +``` + +## Combine + +```tsx +import { Stability } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + +); +``` + +## Brands + +```tsx +import { Stability } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + +); +``` + +## Avatars + +```tsx +import { Stability } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + + +); +``` + +## Colors + +```tsx +import { Stability } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +import ColorPreview from '../components/ColorPreview'; + +export default () => ( + + + + +); +``` diff --git a/src/Stability/index.ts b/src/Stability/index.ts new file mode 100644 index 0000000..6308258 --- /dev/null +++ b/src/Stability/index.ts @@ -0,0 +1,32 @@ +import Avatar from './components/Avatar'; +import BrandColor from './components/BrandColor'; +import BrandMono from './components/BrandMono'; +import Color from './components/Color'; +import Combine from './components/Combine'; +import Mono from './components/Mono'; +import Text from './components/Text'; +import { COLOR_GRADIENT, COLOR_PRIMARY } from './style'; + +export type CompoundedIcon = typeof Mono & { + Avatar: typeof Avatar; + Brand: typeof BrandMono; + BrandColor: typeof BrandColor; + Color: typeof Color; + Combine: typeof Combine; + Mono: typeof Mono; + Text: typeof Text; + colorGradient: string; + colorPrimary: string; +}; + +const Icons = Mono as CompoundedIcon; +Icons.Color = Color; +Icons.Text = Text; +Icons.Combine = Combine; +Icons.Avatar = Avatar; +Icons.Brand = BrandMono; +Icons.BrandColor = BrandColor; +Icons.colorPrimary = COLOR_PRIMARY; +Icons.colorGradient = COLOR_GRADIENT; + +export default Icons; diff --git a/src/Stability/style.ts b/src/Stability/style.ts new file mode 100644 index 0000000..f58ad37 --- /dev/null +++ b/src/Stability/style.ts @@ -0,0 +1,4 @@ +export const TEXT_MULTIPLE = 0.75; +export const SPACE_MULTIPLE = 0.2; +export const COLOR_PRIMARY = '#330066'; +export const COLOR_GRADIENT = 'linear-gradient(to bottom, #9D39FF, #A380FF)'; diff --git a/src/components/ColorPreview/index.tsx b/src/components/ColorPreview/index.tsx index d7a965b..ac95753 100644 --- a/src/components/ColorPreview/index.tsx +++ b/src/components/ColorPreview/index.tsx @@ -1,4 +1,4 @@ -import { CopyButton } from '@lobehub/ui'; +import { CopyButton, Tooltip } from '@lobehub/ui'; import { createStyles } from 'antd-style'; import { memo } from 'react'; import { Flexbox } from 'react-layout-kit'; @@ -9,8 +9,6 @@ const useStyles = createStyles(({ css, token, cx }) => { 'copy-button', css` position: absolute; - top: 4px; - right: 4px; opacity: 0; `, ), @@ -19,12 +17,8 @@ const useStyles = createStyles(({ css, token, cx }) => { flex: none; - min-width: 98px; + width: 98px; height: 98px; - padding-inline: 16px; - - font-family: ${token.fontFamilyCode}; - line-height: 1; background: ${token.colorBgContainer}; border: 1px solid ${token.colorBorder}; @@ -47,15 +41,16 @@ const IconPreview = memo(({ color }) => { const { styles } = useStyles(); return ( - -
{color}
- -
+ + + + + ); }); diff --git a/src/index.ts b/src/index.ts index c9c8589..be1193d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ export { default as Anthropic, type CompoundedIcon as AnthropicProps } from './Anthropic'; +export { default as Automatic, type CompoundedIcon as AutomaticProps } from './Automatic'; export { default as Baichuan, type CompoundedIcon as BaichuanProps } from './Baichuan'; export { default as ChatGLM, type CompoundedIcon as ChatGLMProps } from './ChatGLM'; export { default as Cohere, type CompoundedIcon as CohereProps } from './Cohere'; @@ -7,9 +8,11 @@ export { default as Gemini, type CompoundedIcon as GeminiProps } from './Gemini' export { default as IconAvatar, type IconAvatarProps } from './IconAvatar'; export { default as IconCombine, type IconCombineProps } from './IconCombine'; export { default as Minimax, type CompoundedIcon as MinimaxProps } from './Minimax'; +export { default as Mistral, type CompoundedIcon as MistralProps } from './Mistral'; export { default as Ollama, type CompoundedIcon as OllamaProps } from './Ollama'; export { default as OpenAI, type CompoundedIcon as OpenAIProps } from './OpenAI'; export { default as Spark, type CompoundedIcon as SparkProps } from './Spark'; +export { default as Stability, type CompoundedIcon as StabilityProps } from './Stability'; export { default as Tongyi, type CompoundedIcon as TongyiProps } from './Tongyi'; export type { IconType } from './types'; export { default as Wenxin, type CompoundedIcon as WenxinProps } from './Wenxin';