File tree Expand file tree Collapse file tree 9 files changed +225
-0
lines changed Expand file tree Collapse file tree 9 files changed +225
-0
lines changed Original file line number Diff line number Diff line change
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 ;
Original file line number Diff line number Diff line change
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 = "none" fillRule = "evenodd" >
17
+ < circle cx = "12" cy = "12" fill = "#0055E9" r = "12" > </ circle >
18
+ < path
19
+ 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"
20
+ fill = "#A8DFF5"
21
+ > </ path >
22
+ < path
23
+ 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"
24
+ fill = "#0055E9"
25
+ > </ path >
26
+ < path
27
+ 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"
28
+ fill = "#00BCFF"
29
+ > </ path >
30
+ < path
31
+ 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"
32
+ fill = "#ECECEE"
33
+ > </ path >
34
+ </ g >
35
+ </ svg >
36
+ ) ;
37
+ } ) ;
38
+
39
+ export default Icon ;
Original file line number Diff line number Diff line change
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 ;
Original file line number Diff line number Diff line change
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
+ < 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 >
19
+ </ svg >
20
+ ) ;
21
+ } ) ;
22
+
23
+ export default Icon ;
Original file line number Diff line number Diff line change
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 , width : 'fit-content' , ...style } }
13
+ viewBox = "0 0 92 24"
14
+ xmlns = "http://www.w3.org/2000/svg"
15
+ { ...rest }
16
+ >
17
+ < 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 >
18
+ </ svg >
19
+ ) ;
20
+ } ) ;
21
+
22
+ export default Icon ;
Original file line number Diff line number Diff line change
1
+ ---
2
+ nav : Components
3
+ group : Icons
4
+ title : Hunyuan (腾讯混元)
5
+ atomId : Hunyuan
6
+ description : https://hunyuan.tencent.com
7
+ ---
8
+
9
+ ## Icons
10
+
11
+ ``` tsx
12
+ import { Hunyuan } from ' @lobehub/icons' ;
13
+ import { Flexbox } from ' react-layout-kit' ;
14
+
15
+ export default () => (
16
+ <Flexbox gap = { 16 } horizontal >
17
+ <Hunyuan size = { 64 } />
18
+ <Hunyuan.Color size = { 64 } />
19
+ </Flexbox >
20
+ );
21
+ ```
22
+
23
+ ## Text
24
+
25
+ ``` tsx
26
+ import { Hunyuan } from ' @lobehub/icons' ;
27
+
28
+ export default () => <Hunyuan.Text size = { 48 } />;
29
+ ```
30
+
31
+ ## Combine
32
+
33
+ ``` tsx
34
+ import { Hunyuan } from ' @lobehub/icons' ;
35
+ import { Flexbox } from ' react-layout-kit' ;
36
+
37
+ export default () => (
38
+ <Flexbox gap = { 16 } >
39
+ <Hunyuan.Combine size = { 64 } />
40
+ <Hunyuan.Combine size = { 64 } type = { ' color' } />
41
+ </Flexbox >
42
+ );
43
+ ```
44
+
45
+ ## Avatars
46
+
47
+ ``` tsx
48
+ import { Hunyuan } from ' @lobehub/icons' ;
49
+ import { Flexbox } from ' react-layout-kit' ;
50
+
51
+ export default () => (
52
+ <Flexbox gap = { 16 } horizontal >
53
+ <Hunyuan.Avatar size = { 64 } />
54
+ <Hunyuan.Avatar size = { 64 } shape = { ' square' } />
55
+ </Flexbox >
56
+ );
57
+ ```
58
+
59
+ ## Colors
60
+
61
+ ``` tsx
62
+ import { Hunyuan } from ' @lobehub/icons' ;
63
+ import { Flexbox } from ' react-layout-kit' ;
64
+
65
+ import ColorPreview from ' ../components/ColorPreview' ;
66
+
67
+ export default () => (
68
+ <Flexbox gap = { 16 } horizontal >
69
+ <ColorPreview color = { Hunyuan .colorPrimary } />
70
+ </Flexbox >
71
+ );
72
+ ```
Original file line number Diff line number Diff line change
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
+
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 ;
Original file line number Diff line number Diff line change
1
+ export const TEXT_MULTIPLE = 0.75 ;
2
+ export const SPACE_MULTIPLE = 0.2 ;
3
+ export const COLOR_PRIMARY = '#0053e0' ;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export { default as Dalle, type CompoundedIcon as DalleProps } from './Dalle';
11
11
export { default as Fireworks , type CompoundedIcon as FireworksProps } from './Fireworks' ;
12
12
export { default as Gemini , type CompoundedIcon as GeminiProps } from './Gemini' ;
13
13
export { default as HuggingFace , type CompoundedIcon as HuggingFaceProps } from './HuggingFace' ;
14
+ export { default as Hunyuan , type CompoundedIcon as HunyuanProps } from './Hunyuan' ;
14
15
export { default as IconAvatar , type IconAvatarProps } from './IconAvatar' ;
15
16
export { default as IconCombine , type IconCombineProps } from './IconCombine' ;
16
17
export { default as Meta , type CompoundedIcon as MetaProps } from './Meta' ;
You can’t perform that action at this time.
0 commit comments