-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cab1be6
commit d2dc21a
Showing
9 changed files
with
225 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
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="none" fillRule="evenodd"> | ||
<circle cx="12" cy="12" fill="#0055E9" r="12"></circle> | ||
<path | ||
d="M12 0c.518 0 1.028.033 1.528.096A6.188 6.188 0 0112.12 12.28l-.12.001c-2.99 0-5.242 2.179-5.554 5.11-.223 2.086.353 4.412 2.242 6.146C3.672 22.1 0 17.479 0 12 0 5.373 5.373 0 12 0z" | ||
fill="#A8DFF5" | ||
></path> | ||
<path | ||
d="M5.286 5a2.438 2.438 0 01.682 3.38c-3.962 5.966-3.215 10.743 2.648 15.136C3.636 22.056 0 17.452 0 12c0-1.787.39-3.482 1.09-5.006.253-.435.525-.872.817-1.311A2.438 2.438 0 015.286 5z" | ||
fill="#0055E9" | ||
></path> | ||
<path | ||
d="M12.98.04c.272.021.543.053.81.093.583.106 1.117.254 1.538.44 6.638 2.927 8.07 10.052 1.748 15.642a4.125 4.125 0 01-5.822-.358c-1.51-1.706-1.3-4.184.357-5.822.858-.848 3.108-1.223 4.045-2.441 1.257-1.634 2.122-6.009-2.523-7.506L12.98.039z" | ||
fill="#00BCFF" | ||
></path> | ||
<path | ||
d="M13.528.096A6.187 6.187 0 0112 12.281a5.75 5.75 0 00-1.71.255c.147-.905.595-1.784 1.321-2.501.858-.848 3.108-1.223 4.045-2.441 1.27-1.651 2.14-6.104-2.676-7.554.184.014.367.033.548.056z" | ||
fill="#ECECEE" | ||
></path> | ||
</g> | ||
</svg> | ||
); | ||
}); | ||
|
||
export default Icon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
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} | ||
> | ||
<path d="M12 0c6.627 0 12 5.373 12 12s-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0zm1.652 1.123l-.01-.001c.533.097 1.023.233 1.41.404 6.084 2.683 7.396 9.214 1.601 14.338a3.781 3.781 0 01-5.337-.328 3.654 3.654 0 01-.884-3.044c-1.934.6-3.295 2.305-3.524 4.45-.204 1.912.324 4.044 2.056 5.634l.245.067C10.1 22.876 11.036 23 12 23c6.075 0 11-4.925 11-11 0-5.513-4.056-10.08-9.348-10.877zM2.748 6.21c-.178.269-.348.536-.51.803l-.235.394.078-.167A10.957 10.957 0 001 12c0 4.919 3.228 9.083 7.682 10.49l.214.065C3.523 18.528 2.84 14.149 6.47 8.68A2.234 2.234 0 102.748 6.21zm10.157-5.172c4.408 1.33 3.61 5.41 2.447 6.924-.86 1.117-2.922 1.46-3.708 2.238-.666.657-1.077 1.462-1.212 2.291A5.303 5.303 0 0112 12.258a5.672 5.672 0 001.404-11.169 10.51 10.51 0 00-.5-.052z"></path> | ||
</svg> | ||
); | ||
}); | ||
|
||
export default Icon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
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, width: 'fit-content', ...style }} | ||
viewBox="0 0 92 24" | ||
xmlns="http://www.w3.org/2000/svg" | ||
{...rest} | ||
> | ||
<path d="M20.222 9.566c.267.472.774.919 1.522 1.339.749.42 1.463.712 2.145.874l-.578 1.947a8.034 8.034 0 01-1.278-.388 8.589 8.589 0 01-1.522-.785l-.533 2.345h1.089c.548 0 .892.096 1.033.288.14.192.181.45.122.774-.133.87-.3 1.855-.5 2.954l-.544 2.998h-6.022l-.4-1.793h4.31l.623-3.03c.06-.295-.067-.443-.378-.443h-7.578l.711-3.628c-.133.059-.396.162-.788.31-.393.147-.849.28-1.367.398l.467-2.213a9.862 9.862 0 002.077-.807c.66-.347 1.211-.727 1.656-1.14h-3.356l.356-1.725h4.178c.163-.28.318-.62.466-1.018h-4.466l.355-1.77h1.534l-.534-2.655h2.334c.088.487.266 1.372.533 2.655h.8a20.69 20.69 0 00.4-3.03h2.355c-.074 1.194-.207 2.204-.4 3.03h.867a22.19 22.19 0 001.045-2.655h2.333a23.519 23.519 0 01-1.133 2.655H23.8l-.422 1.77H18.51c-.015.074-.148.413-.4 1.018h5.956l-.423 1.725h-3.422zM10.2 2.597c.444 0 .778.045 1 .133.222.089.356.236.4.443.044.206.044.442 0 .708L8.378 21.91H6.11l1.311-6.924h-1.51a81.747 81.747 0 01-.568 2.6 89.375 89.375 0 01-1.122 4.325H2a71.239 71.239 0 001.778-7.058l2.2-12.257H10.2zm-.889 2.301c.03-.162.011-.273-.055-.332-.067-.059-.182-.088-.345-.088H7.8L7.2 7.84h1.556l.555-2.943zm8.6 4.668h-.822a8.103 8.103 0 01-1.578 1.615h3.445a7.048 7.048 0 01-.578-.774 6.104 6.104 0 01-.467-.84zM7.756 13.173l.666-3.54H6.867l-.623 3.54h1.512zm6.644 1.725h3.289l.444-2.035H13.6l1.044.708-.244 1.327zm3.956 2.633l-.4 1.726h-7.667l-.311-1.726h8.378zM32.267 6.823h-2.423l-.822-4.646h2.311l.934 4.646zm11.777-4.447c.652 0 1.07.11 1.256.332.185.221.226.612.122 1.173L42.6 19.677h2.756l-.8 2.058h-4.8a1112.951 1112.951 0 001.777-10.111h-3.555L36.2 21.734h-2.444l1.777-10.11H32.49l.378-1.88h3l.844-4.735 2.156 1.593-.556 3.141h3.556c.34-2.006.63-3.598.866-4.778.045-.207.034-.365-.033-.476-.067-.11-.27-.166-.611-.166h-8.2l-.445-1.947h10.6zm-12.488 5.62l-1.69 9.446c.46-.339 1.438-1.098 2.934-2.278l-.533 2.876a47.11 47.11 0 01-2.778 2.035A66.226 66.226 0 0126.51 22l2.245-12.058h-2.29l.334-1.946h4.756zM54.444 6.535h-2.866c-.563-1.165-1.23-2.677-2-4.535h2.644a55.019 55.019 0 002.222 4.535zm11.49-4.093c.459 0 .807.037 1.044.111.237.074.4.221.489.443.089.22.096.59.022 1.106l-1 7.102H54.533l1.134-8.762h10.266zm-1.178 1.815h-6.89l-.2 1.593h7.156L65 4.61c.044-.235-.037-.353-.244-.353zm-11.312 8.03h-2.822a66.97 66.97 0 01-1.755-4.734H51.4a69.069 69.069 0 002.044 4.735zm3.778-2.898h7.067l.267-1.747h-7.112l-.222 1.747zm2.111 7.213H56.09l-.511 3.363h3.689l-.711 1.947h-5.712l1.534-9.868h2.4l-.4 2.633H59.6l-.267 1.925zm7.49-.93c-.993.355-2.438.812-4.334 1.372l-.4 2.92h4.867l-.69 1.948H59.4l1.4-9.868h2.4l-.4 2.92c1.852-.619 3.281-1.15 4.289-1.592l-.267 2.3zm-16.156-1.747h2.622c-1.304 3.186-2.511 5.848-3.622 7.987h-2.89a92.754 92.754 0 003.89-7.987zM89.4 3.15l-.333 2.036H73.91l.333-2.036H89.4zm.289 8.01h-4.911l-1.2 8.628h5.933l-.778 2.124h-8.2l1.6-10.753h-3.089a20.92 20.92 0 01-1.155 4.016 15.946 15.946 0 01-1.922 3.462c-.778 1.062-1.826 2.154-3.145 3.275h-3.8c1.215-.93 2.197-1.76 2.945-2.49a16.46 16.46 0 001.977-2.311 14.29 14.29 0 001.478-2.7c.415-.988.734-2.072.956-3.252h-5l.31-2.035H90l-.311 2.035z"></path> | ||
</svg> | ||
); | ||
}); | ||
|
||
export default Icon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
nav: Components | ||
group: Icons | ||
title: Hunyuan (腾讯混元) | ||
atomId: Hunyuan | ||
description: https://hunyuan.tencent.com | ||
--- | ||
|
||
## Icons | ||
|
||
```tsx | ||
import { Hunyuan } from '@lobehub/icons'; | ||
import { Flexbox } from 'react-layout-kit'; | ||
|
||
export default () => ( | ||
<Flexbox gap={16} horizontal> | ||
<Hunyuan size={64} /> | ||
<Hunyuan.Color size={64} /> | ||
</Flexbox> | ||
); | ||
``` | ||
|
||
## Text | ||
|
||
```tsx | ||
import { Hunyuan } from '@lobehub/icons'; | ||
|
||
export default () => <Hunyuan.Text size={48} />; | ||
``` | ||
|
||
## Combine | ||
|
||
```tsx | ||
import { Hunyuan } from '@lobehub/icons'; | ||
import { Flexbox } from 'react-layout-kit'; | ||
|
||
export default () => ( | ||
<Flexbox gap={16}> | ||
<Hunyuan.Combine size={64} /> | ||
<Hunyuan.Combine size={64} type={'color'} /> | ||
</Flexbox> | ||
); | ||
``` | ||
|
||
## Avatars | ||
|
||
```tsx | ||
import { Hunyuan } from '@lobehub/icons'; | ||
import { Flexbox } from 'react-layout-kit'; | ||
|
||
export default () => ( | ||
<Flexbox gap={16} horizontal> | ||
<Hunyuan.Avatar size={64} /> | ||
<Hunyuan.Avatar size={64} shape={'square'} /> | ||
</Flexbox> | ||
); | ||
``` | ||
|
||
## Colors | ||
|
||
```tsx | ||
import { Hunyuan } from '@lobehub/icons'; | ||
import { Flexbox } from 'react-layout-kit'; | ||
|
||
import ColorPreview from '../components/ColorPreview'; | ||
|
||
export default () => ( | ||
<Flexbox gap={16} horizontal> | ||
<ColorPreview color={Hunyuan.colorPrimary} /> | ||
</Flexbox> | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
|
||
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = '#0053e0'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters