Skip to content

Commit 8e63d1b

Browse files
✨ feat: Add more ai brand
1 parent a57cb02 commit 8e63d1b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1920
-51
lines changed

docs/index.tsx

Lines changed: 49 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,68 @@
1-
import * as Icons from '@lobehub/icons';
2-
import { StoryBook, useControls, useCreateStore } from '@lobehub/ui';
1+
import { Features, FeaturesProps } from '@lobehub/ui';
2+
import { Segmented } from 'antd';
33
import { createStyles } from 'antd-style';
4-
import { Flexbox } from 'react-layout-kit';
4+
import { Expand, GitPullRequest, Trees } from 'lucide-react';
5+
import { useState } from 'react';
6+
import { Center } from 'react-layout-kit';
57

6-
const data = Object.values(Icons).filter((icon: any) => icon?.colorPrimary);
8+
import Dashboard from '@/components/Dashboard';
9+
import DashboardText from '@/components/Dashboard/Text';
10+
11+
const items: FeaturesProps['items'] = [
12+
{
13+
description:
14+
'Icons are designed to be lightweight, utilizing highly optimized scalable vector graphics (SVG) for the best performance and quality.',
15+
icon: Expand,
16+
title: 'Lightweight & Scalable',
17+
},
18+
{
19+
description:
20+
'The collection is tree-shakable, ensuring that you only import the icons that you use, which helps in reducing the overall bundle size of your project.',
21+
icon: Trees,
22+
title: 'Tree Shakable',
23+
},
24+
{
25+
description:
26+
'Lobe Icons boasts an active community of designers and developers. Engage with us on platforms like GitHub and Discord to contribute or get support.',
27+
icon: GitPullRequest,
28+
title: 'Active Community',
29+
},
30+
];
731

832
const useStyles = createStyles(({ css, token }) => ({
933
container: css`
34+
margin-top: -4%;
35+
`,
36+
dashboard: css`
1037
overflow: hidden;
11-
1238
max-width: 960px;
13-
margin-top: -4%;
14-
1539
border: 1px solid ${token.colorBorder};
1640
border-radius: ${token.borderRadiusLG}px;
1741
`,
18-
item: css`
19-
width: 96px;
20-
height: 96px;
21-
background: ${token.colorBgContainer};
42+
segmented: css`
43+
border: 1px solid ${token.colorBorder};
2244
`,
2345
}));
2446

2547
export default () => {
48+
const [avtive, setActive] = useState('icons');
2649
const { styles } = useStyles();
27-
const store = useCreateStore();
28-
29-
const { size, color, monochrome } = useControls(
30-
{
31-
color: {
32-
color: true,
33-
value: '#fff',
34-
},
35-
monochrome: true,
36-
size: {
37-
max: 96,
38-
min: 16,
39-
step: 1,
40-
value: 48,
41-
},
42-
},
43-
{ store },
44-
);
4550

4651
return (
47-
<StoryBook className={styles.container} levaStore={store}>
48-
<Flexbox align={'center'} gap={4} horizontal justify={'center'} style={{ flexWrap: 'wrap' }}>
49-
{data.map((Icon: any, index) => {
50-
const IconRender = !monochrome && Icon.Color ? Icon.Color : Icon;
51-
52-
return (
53-
<Flexbox align={'center'} className={styles.item} justify={'center'} key={index}>
54-
<IconRender color={color === '#fff' ? undefined : color} size={size} />
55-
</Flexbox>
56-
);
57-
})}
58-
</Flexbox>
59-
</StoryBook>
52+
<Center className={styles.container} gap={16}>
53+
<Segmented
54+
className={styles.segmented}
55+
onChange={(v) => setActive(v as any)}
56+
options={[
57+
{ label: 'Brand Icons', value: 'icons' },
58+
{ label: 'Brand Texts', value: 'texts' },
59+
]}
60+
size={'large'}
61+
value={avtive}
62+
/>
63+
{avtive === 'icons' && <Dashboard className={styles.dashboard} />}
64+
{avtive === 'texts' && <DashboardText className={styles.dashboard} />}
65+
<Features items={items} />
66+
</Center>
6067
);
6168
};

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"@types/react": "18.2.40",
8484
"@types/react-dom": "^18",
8585
"@vitest/coverage-v8": "latest",
86+
"antd": "^5.13.3",
8687
"antd-style": "^3",
8788
"babel-plugin-antd-style": "latest",
8889
"commitlint": "^18",
@@ -95,6 +96,7 @@
9596
"husky": "^8",
9697
"jsdom": "^23",
9798
"lint-staged": "^15",
99+
"lucide-react": "latest",
98100
"prettier": "^3",
99101
"react": "^18",
100102
"react-dom": "^18",

src/Bing/components/Avatar.tsx

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

src/Bing/components/Color.tsx

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import { forwardRef } from 'react';
2+
3+
import { useFillIds } from '@/hooks/useFillId';
4+
import type { IconType } from '@/types';
5+
6+
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
7+
const [a, b, c] = useFillIds('bing', 3);
8+
9+
return (
10+
<svg
11+
height={size}
12+
ref={ref}
13+
style={{ flex: 'none', lineHeight: 1, ...style }}
14+
viewBox="0 0 24 24"
15+
width={size}
16+
xmlns="http://www.w3.org/2000/svg"
17+
{...rest}
18+
>
19+
<defs>
20+
<radialGradient
21+
cx="93.717%"
22+
cy="77.818%"
23+
fx="93.717%"
24+
fy="77.818%"
25+
gradientTransform="scale(-1 -.7146) rotate(49.288 2.035 -2.198)"
26+
id={a.id}
27+
r="143.691%"
28+
>
29+
<stop offset="0%" stopColor="#00CACC"></stop>
30+
<stop offset="100%" stopColor="#048FCE"></stop>
31+
</radialGradient>
32+
<radialGradient
33+
cx="13.893%"
34+
cy="71.448%"
35+
fx="13.893%"
36+
fy="71.448%"
37+
gradientTransform="scale(.6042 1) rotate(-23.34 .184 .494)"
38+
id={b.id}
39+
r="149.21%"
40+
>
41+
<stop offset="0%" stopColor="#00BBEC"></stop>
42+
<stop offset="100%" stopColor="#2756A9"></stop>
43+
</radialGradient>
44+
<linearGradient id={c.id} x1="50%" x2="50%" y1="0%" y2="100%">
45+
<stop offset="0%" stopColor="#00BBEC"></stop>
46+
<stop offset="100%" stopColor="#2756A9"></stop>
47+
</linearGradient>
48+
</defs>
49+
<g fill="none" fillRule="evenodd">
50+
<path
51+
d="M11.97 7.569a.92.92 0 00-.805.863c-.013.195-.01.209.43 1.347 1 2.59 1.242 3.214 1.283 3.302.099.213.237.413.41.592.134.138.222.212.37.311.26.176.39.224 1.405.527.989.295 1.529.49 1.994.723.603.302 1.024.644 1.29 1.051.191.292.36.815.434 1.342.029.206.029.661 0 .847a2.491 2.491 0 01-.376 1.026c-.1.151-.065.126.081-.058.415-.52.838-1.408 1.054-2.213a6.728 6.728 0 00.102-3.012 6.626 6.626 0 00-3.291-4.53 104.157 104.157 0 00-1.322-.698l-.254-.133a737.941 737.941 0 01-1.575-.827c-.548-.29-.78-.406-.846-.426a1.376 1.376 0 00-.29-.045l-.093.01z"
52+
fill={a.fill}
53+
></path>
54+
<path
55+
d="M13.164 17.24a4.385 4.385 0 00-.202.125 511.45 511.45 0 00-1.795 1.115 163.087 163.087 0 01-.989.614l-.463.288a99.198 99.198 0 01-1.502.941c-.326.2-.704.334-1.09.387-.18.024-.52.024-.7 0a2.807 2.807 0 01-1.318-.538 3.665 3.665 0 01-.543-.545 2.837 2.837 0 01-.506-1.141 2.161 2.161 0 00-.041-.182c-.008-.008.006.138.032.33.027.199.085.487.147.733.482 1.907 1.85 3.457 3.705 4.195a6.31 6.31 0 001.658.412c.22.025.844.035 1.074.017 1.054-.08 1.972-.393 2.913-.992a325.28 325.28 0 01.937-.596l.384-.244.684-.435.234-.149.009-.005.025-.017.013-.007.172-.11.597-.38c.76-.481.987-.65 1.34-.998.148-.146.37-.394.381-.425.002-.007.042-.068.088-.136a2.49 2.49 0 00.373-1.023 4.181 4.181 0 000-.847 4.336 4.336 0 00-.318-1.137c-.224-.472-.7-.9-1.383-1.245a2.972 2.972 0 00-.406-.181c-.01 0-.646.392-1.413.87a7089.171 7089.171 0 00-1.658 1.031l-.439.274z"
56+
fill={b.fill}
57+
fillRule="nonzero"
58+
></path>
59+
<path
60+
d="M4.003 14.946l.004 3.33.042.193c.134.604.366 1.04.77 1.445a2.701 2.701 0 001.955.814c.536 0 1-.135 1.479-.43l.703-.435.556-.346V8.003c0-2.306-.004-3.675-.012-3.782a2.734 2.734 0 00-.797-1.765c-.145-.144-.268-.24-.637-.496A1780.102 1780.102 0 015.762.362C5.406.115 5.38.098 5.271.059a.943.943 0 00-1.254.696C4.003.818 4 1.659 4 6.223v5.394H4l.003 3.329z"
61+
fill={c.fill}
62+
fillRule="nonzero"
63+
></path>
64+
</g>
65+
</svg>
66+
);
67+
});
68+
69+
export default Icon;

src/Bing/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/Bing/components/Mono.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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="M4.842.005a.966.966 0 01.604.142l2.62 1.813c.369.256.492.352.637.496.471.47.752 1.09.797 1.765l.008.847.003 1.441.004 13.002.144-.094 7.015-4.353.015.003.029.01c-.398-.17-.893-.339-1.655-.566l-.484-.146c-.584-.18-.71-.238-.921-.38a2.009 2.009 0 01-.37-.312 2.172 2.172 0 01-.41-.592L11.32 9.063c-.166-.444-.166-.49-.156-.63a.92.92 0 01.806-.864l.094-.01c.044-.005.22.023.29.044l.052.021c.06.026.16.075.313.154l3.63 1.908a6.626 6.626 0 013.292 4.531c.194.99.159 2.037-.102 3.012-.216.805-.639 1.694-1.054 2.213l-.08.099-.047.05c-.01.01-.013.01-.01.002l.043-.074-.072.114c-.011.031-.233.28-.38.425l-.17.161c-.22.202-.431.36-.832.62L13.544 23c-.941.6-1.86.912-2.913.992-.23.018-.854.008-1.074-.017a6.31 6.31 0 01-1.658-.412c-1.854-.738-3.223-2.288-3.705-4.195a8.077 8.077 0 01-.121-.57l-.046-.325a1.123 1.123 0 01-.014-.168l-.006-.029L4 11.617 4.01.866a.981.981 0 01.007-.111.943.943 0 01.825-.75z"></path>
19+
</svg>
20+
);
21+
});
22+
23+
export default Icon;

src/Bing/components/Text.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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 44 24"
14+
xmlns="http://www.w3.org/2000/svg"
15+
{...rest}
16+
>
17+
<path d="M2 18.658V2.763h4.956c1.509 0 2.71.336 3.59 1.01.881.672 1.322 1.547 1.322 2.624 0 .898-.253 1.683-.75 2.356a4.048 4.048 0 01-2.08 1.413v.045c1.079.124 1.927.527 2.565 1.223.65.673.97 1.57.97 2.658 0 1.358-.529 2.468-1.575 3.298-1.047.83-2.379 1.268-3.987 1.268H2zM4.588 4.883v4.52h1.674c.903 0 1.608-.224 2.115-.639.517-.449.77-1.054.77-1.84 0-1.368-.891-2.041-2.676-2.041H4.588zm0 6.64v5.026h2.203c.969 0 1.718-.224 2.235-.673.529-.46.793-1.088.793-1.885 0-1.648-1.112-2.467-3.359-2.467H4.588zm11.146-6.595c-.408 0-.771-.146-1.058-.415-.297-.27-.44-.617-.44-1.044 0-.426.143-.774.44-1.054.298-.28.65-.415 1.068-.415.419 0 .782.135 1.08.415.297.28.44.64.44 1.054 0 .404-.143.74-.44 1.032-.298.28-.661.427-1.09.427zm1.255 13.73h-2.522V7.306H17l-.011 11.352zm12.5 0h-2.522v-6.394c0-2.131-.738-3.186-2.203-3.186-.77 0-1.41.303-1.916.898a3.292 3.292 0 00-.749 2.21v6.472h-2.533V7.306H22.1V9.19h.044a4.007 4.007 0 011.505-1.602 3.909 3.909 0 012.107-.551c1.212 0 2.137.403 2.776 1.211.639.797.958 1.952.958 3.478v6.932zm12.5-.909c0 4.162-2.048 6.249-6.167 6.249a9.049 9.049 0 01-3.8-.74V20.9c1.211.718 2.379 1.066 3.47 1.066 2.643 0 3.975-1.324 3.975-3.982V16.75h-.044a4.125 4.125 0 01-1.579 1.632 4.026 4.026 0 01-2.188.533 4.034 4.034 0 01-1.811-.365 4.107 4.107 0 01-1.47-1.138 6.238 6.238 0 01-1.245-4.072c0-1.93.44-3.455 1.344-4.6.903-1.143 2.114-1.704 3.678-1.704 1.465 0 2.555.617 3.27 1.84h.045V7.305H42l-.01 10.443zm-2.5-4.285v-1.48c0-.797-.264-1.481-.782-2.042a2.534 2.534 0 00-.878-.642 2.491 2.491 0 00-1.06-.21c-.958 0-1.707.37-2.247 1.088a4.937 4.937 0 00-.815 3.017c0 1.122.265 2.008.77 2.681.53.673 1.212.998 2.071.998.882 0 1.587-.325 2.126-.953.55-.65.815-1.458.815-2.468v.011z"></path>
18+
</svg>
19+
);
20+
});
21+
22+
export default Icon;

src/Bing/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: Microsoft (Bing)
5+
atomId: Bing
6+
description: https://bing.com
7+
---
8+
9+
## Icons
10+
11+
```tsx
12+
import { Bing } from '@lobehub/icons';
13+
import { Flexbox } from 'react-layout-kit';
14+
15+
export default () => (
16+
<Flexbox gap={16} horizontal>
17+
<Bing size={64} />
18+
<Bing.Color size={64} />
19+
</Flexbox>
20+
);
21+
```
22+
23+
## Text
24+
25+
```tsx
26+
import { Bing } from '@lobehub/icons';
27+
28+
export default () => <Bing.Text size={48} />;
29+
```
30+
31+
## Combine
32+
33+
```tsx
34+
import { Bing } from '@lobehub/icons';
35+
import { Flexbox } from 'react-layout-kit';
36+
37+
export default () => (
38+
<Flexbox gap={16}>
39+
<Bing.Combine size={64} />
40+
<Bing.Combine size={64} type={'color'} />
41+
</Flexbox>
42+
);
43+
```
44+
45+
## Avatars
46+
47+
```tsx
48+
import { Bing } from '@lobehub/icons';
49+
import { Flexbox } from 'react-layout-kit';
50+
51+
export default () => (
52+
<Flexbox gap={16} horizontal>
53+
<Bing.Avatar size={64} background={Bing.colorGradient} />
54+
<Bing.Avatar size={64} />
55+
<Bing.Avatar size={64} shape={'square'} />
56+
</Flexbox>
57+
);
58+
```
59+
60+
## Colors
61+
62+
```tsx
63+
import { Bing } from '@lobehub/icons';
64+
import { Flexbox } from 'react-layout-kit';
65+
66+
import ColorPreview from '../components/ColorPreview';
67+
68+
export default () => (
69+
<Flexbox gap={16} horizontal>
70+
<ColorPreview color={Bing.colorPrimary} />
71+
<ColorPreview color={Bing.colorGradient} />
72+
</Flexbox>
73+
);
74+
```

src/Bing/index.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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_GRADIENT, COLOR_PRIMARY } from './style';
7+
8+
export type CompoundedIcon = typeof Mono & {
9+
Avatar: typeof Avatar;
10+
Color: typeof Color;
11+
Combine: typeof Combine;
12+
Text: typeof Text;
13+
colorGradient: string;
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+
Icons.colorGradient = COLOR_GRADIENT;
24+
25+
export default Icons;

0 commit comments

Comments
 (0)