Skip to content

Commit c37897d

Browse files
✨ feat: Add Line and DingTalk icons
1 parent 4ad5367 commit c37897d

14 files changed

Lines changed: 302 additions & 16 deletions

File tree

package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
"@giscus/react": "^3.1.0",
149149
"@mdx-js/mdx": "^3.1.1",
150150
"@mdx-js/react": "^3.1.1",
151-
"@pierre/diffs": "^1.1.10",
151+
"@pierre/diffs": "^1.1.19",
152152
"@radix-ui/react-slot": "^1.2.4",
153153
"@shikijs/core": "^4.0.2",
154154
"@shikijs/transformers": "^4.0.2",
@@ -160,13 +160,13 @@
160160
"clsx": "^2.1.1",
161161
"dayjs": "^1.11.20",
162162
"emoji-mart": "^5.6.0",
163-
"es-toolkit": "^1.45.1",
163+
"es-toolkit": "^1.46.0",
164164
"fast-deep-equal": "^3.1.3",
165165
"immer": "^11.1.4",
166-
"katex": "^0.16.44",
166+
"katex": "^0.16.45",
167167
"leva": "^0.10.1",
168-
"lucide-react": "^1.7.0",
169-
"marked": "^17.0.5",
168+
"lucide-react": "^1.11.0",
169+
"marked": "^17.0.6",
170170
"mermaid": "^11.14.0",
171171
"motion": "^12.38.0",
172172
"numeral": "^2.0.6",
@@ -202,14 +202,14 @@
202202
"url-join": "^5.0.0",
203203
"use-merge-value": "^1.2.0",
204204
"uuid": "^13.0.0",
205-
"virtua": "^0.49.0"
205+
"virtua": "^0.49.1"
206206
},
207207
"devDependencies": {
208208
"@ant-design/icons": "^6.1.1",
209209
"@commitlint/cli": "^19.8.1",
210210
"@lobehub/eslint-config": "2.0.0",
211211
"@lobehub/fluent-emoji": "^4.1.0",
212-
"@lobehub/icons": "^5.2.0",
212+
"@lobehub/icons": "^5.6.0",
213213
"@lobehub/lint": "^2.1.5",
214214
"@testing-library/react": "^16.3.2",
215215
"@types/chroma-js": "^3.1.2",
@@ -221,17 +221,17 @@
221221
"@types/react": "^19.2.14",
222222
"@types/react-dom": "^19.2.3",
223223
"@types/unist": "^3.0.3",
224-
"@typescript-eslint/eslint-plugin": "^8.58.0",
225-
"@typescript-eslint/parser": "^8.58.0",
224+
"@typescript-eslint/eslint-plugin": "^8.59.0",
225+
"@typescript-eslint/parser": "^8.59.0",
226226
"@vitest/coverage-v8": "^3.2.4",
227-
"antd": "^6.3.5",
227+
"antd": "^6.3.6",
228228
"babel-plugin-antd-style": "^1.0.4",
229229
"cheerio": "^1.2.0",
230230
"clean-package": "^2.2.0",
231231
"commitlint": "^19.8.1",
232232
"concurrently": "^9.2.1",
233233
"cross-env": "^10.1.0",
234-
"dotenv": "^17.4.0",
234+
"dotenv": "^17.4.2",
235235
"dpdm": "^4.0.1",
236236
"dumi": "^2.4.23",
237237
"dumi-theme-lobehub": "^5.0.0",
@@ -242,17 +242,17 @@
242242
"jsdom": "^26.1.0",
243243
"lint-staged": "^16.4.0",
244244
"mdast-util-to-markdown": "^2.1.2",
245-
"prettier": "^3.8.1",
246-
"react": "^19.2.4",
247-
"react-dom": "^19.2.4",
245+
"prettier": "^3.8.3",
246+
"react": "^19.2.5",
247+
"react-dom": "^19.2.5",
248248
"remark": "^15.0.1",
249249
"remark-cli": "^12.0.1",
250250
"semantic-release": "^21.1.2",
251251
"stylelint": "^16.26.1",
252252
"svgo": "^4.0.1",
253-
"tsdown": "^0.21.7",
253+
"tsdown": "^0.21.10",
254254
"tsx": "^4.21.0",
255-
"typescript": "^6.0.2",
255+
"typescript": "^6.0.3",
256256
"unist-util-is": "^6.0.1",
257257
"unist-util-visit": "^5.1.0",
258258
"vitest": "^3.2.4"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
'use client';
2+
3+
import { IconAvatar, type IconAvatarProps } from '@lobehub/icons';
4+
import { type FC } from 'react';
5+
6+
import { COLOR_PRIMARY, TITLE } from '../style';
7+
import Mono from './Mono';
8+
9+
export type AvatarProps = Omit<IconAvatarProps, 'Icon'>;
10+
11+
const Avatar: FC<AvatarProps> = ({ background, ...rest }) => {
12+
return (
13+
<IconAvatar
14+
Icon={Mono}
15+
aria-label={TITLE}
16+
background={background || COLOR_PRIMARY}
17+
color={'#fff'}
18+
{...rest}
19+
/>
20+
);
21+
};
22+
23+
export default Avatar;
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
'use client';
2+
3+
import type { IconType } from '@lobehub/icons';
4+
import { memo } from 'react';
5+
6+
import { TITLE } from '../style';
7+
8+
const Icon: IconType = memo(({ size = '1em', style, ...rest }) => {
9+
return (
10+
<svg
11+
height={size}
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+
<title>{TITLE}</title>
19+
<path
20+
d="M21.17 8.973c-.07.255-.161.503-.274.742h.003l-.014.031c-.8 1.795-2.888 5.32-2.888 5.32l-.009-.023-.61 1.115h2.94L14.702 24l1.275-5.334h-2.315l.804-3.527c-.652.164-1.418.391-2.33.698 0 0-1.23.757-3.548-1.458 0 0-1.563-1.443-.656-1.807.384-.152 1.87-.346 3.04-.515 1.577-.225 2.55-.345 2.55-.345s-4.869.078-6.024-.115c-1.155-.19-2.618-2.214-2.932-3.993 0 0-.483-.977 1.036-.516 1.52.462 7.814 1.8 7.814 1.8S5.234 6.256 4.69 5.614c-.543-.642-1.603-3.51-1.465-5.27 0 0 .061-.441.49-.324 0 0 6.052 2.906 10.188 4.493 4.137 1.59 7.732 2.402 7.268 4.46z"
21+
fill="#3296FA"
22+
/>
23+
</svg>
24+
);
25+
});
26+
27+
export default Icon;
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
'use client';
2+
3+
import type { IconType } from '@lobehub/icons';
4+
import { memo } from 'react';
5+
6+
import { TITLE } from '../style';
7+
8+
const Icon: IconType = memo(({ size = '1em', style, ...rest }) => {
9+
return (
10+
<svg
11+
fill="currentColor"
12+
fillRule="evenodd"
13+
height={size}
14+
style={{ flex: 'none', lineHeight: 1, ...style }}
15+
viewBox="0 0 24 24"
16+
width={size}
17+
xmlns="http://www.w3.org/2000/svg"
18+
{...rest}
19+
>
20+
<title>{TITLE}</title>
21+
<path d="M21.17 8.973c-.07.255-.161.503-.274.742h.003l-.014.031c-.8 1.795-2.888 5.32-2.888 5.32l-.009-.023-.61 1.115h2.94L14.702 24l1.275-5.334h-2.315l.804-3.527c-.652.164-1.418.391-2.33.698 0 0-1.23.757-3.548-1.458 0 0-1.563-1.443-.656-1.807.384-.152 1.87-.346 3.04-.515 1.577-.225 2.55-.345 2.55-.345s-4.869.078-6.024-.115c-1.155-.19-2.618-2.214-2.932-3.993 0 0-.483-.977 1.036-.516 1.52.462 7.814 1.8 7.814 1.8S5.234 6.256 4.69 5.614c-.543-.642-1.603-3.51-1.465-5.27 0 0 .061-.441.49-.324 0 0 6.052 2.906 10.188 4.493 4.137 1.59 7.732 2.402 7.268 4.46z" />
22+
</svg>
23+
);
24+
});
25+
26+
export default Icon;

src/icons/DingTalk/index.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
nav: Components
3+
group: Channel Icons
4+
title: DingTalk
5+
apiHeader:
6+
pkg: '@lobehub/ui/icons'
7+
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/src/icons/DingTalk/index.md'
8+
sourceUrl: 'https://github.com/lobehub/lobe-ui/tree/master/src/icons/DingTalk/index.ts'
9+
---
10+
11+
## Icons
12+
13+
```tsx
14+
import { DingTalk } from '@lobehub/ui/icons';
15+
16+
import { Flexbox } from '@/Flex';
17+
18+
export default () => <DingTalk size={64} />;
19+
```
20+
21+
## Color
22+
23+
```tsx
24+
import { DingTalk } from '@lobehub/ui/icons';
25+
26+
import { Flexbox } from '@/Flex';
27+
28+
export default () => <DingTalk.Color size={64} />;
29+
```
30+
31+
## Avatars
32+
33+
```tsx
34+
import { DingTalk } from '@lobehub/ui/icons';
35+
36+
import { Flexbox } from '@/Flex';
37+
38+
export default () => (
39+
<Flexbox gap={16} horizontal>
40+
<DingTalk.Avatar size={64} />
41+
<DingTalk.Avatar size={64} shape={'square'} />
42+
</Flexbox>
43+
);
44+
```

src/icons/DingTalk/index.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
'use client';
2+
3+
import Avatar from './components/Avatar';
4+
import Color from './components/Color';
5+
import Mono from './components/Mono';
6+
import { COLOR_PRIMARY, TITLE } from './style';
7+
8+
export type CompoundedIcon = typeof Mono & {
9+
Avatar: typeof Avatar;
10+
Color: typeof Color;
11+
colorPrimary: string;
12+
title: string;
13+
};
14+
15+
const Icons = Mono as CompoundedIcon;
16+
Icons.Color = Color;
17+
Icons.Avatar = Avatar;
18+
Icons.colorPrimary = COLOR_PRIMARY;
19+
Icons.title = TITLE;
20+
export default Icons;

src/icons/DingTalk/style.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export const TITLE = 'DingTalk';
2+
export const COLOR_PRIMARY = '#3296FA';
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
'use client';
2+
3+
import { IconAvatar, type IconAvatarProps } from '@lobehub/icons';
4+
import { type FC } from 'react';
5+
6+
import { COLOR_PRIMARY, TITLE } from '../style';
7+
import Mono from './Mono';
8+
9+
export type AvatarProps = Omit<IconAvatarProps, 'Icon'>;
10+
11+
const Avatar: FC<AvatarProps> = ({ background, ...rest }) => {
12+
return (
13+
<IconAvatar
14+
Icon={Mono}
15+
aria-label={TITLE}
16+
background={background || COLOR_PRIMARY}
17+
color={'#fff'}
18+
{...rest}
19+
/>
20+
);
21+
};
22+
23+
export default Avatar;
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
'use client';
2+
3+
import type { IconType } from '@lobehub/icons';
4+
import { memo } from 'react';
5+
6+
import { TITLE } from '../style';
7+
8+
const Icon: IconType = memo(({ size = '1em', style, ...rest }) => {
9+
return (
10+
<svg
11+
height={size}
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+
<title>{TITLE}</title>
19+
<path
20+
d="M19.365 9.863a.631.631 0 010 1.26H17.61v1.126h1.755a.63.63 0 110 1.259h-2.386a.631.631 0 01-.627-.63v-4.77c0-.345.282-.63.63-.63h2.386a.63.63 0 01-.003 1.26H17.61v1.125h1.755zm-3.855 3.016a.63.63 0 01-.631.627.618.618 0 01-.51-.25l-2.443-3.317v2.94a.63.63 0 01-1.257 0V8.108a.627.627 0 01.624-.628c.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.63.63-.63.345 0 .63.285.63.63v4.77zm-5.741 0a.632.632 0 01-.631.629.631.631 0 01-.627-.63v-4.77c0-.345.282-.63.63-.63.346 0 .628.285.628.63v4.77zm-2.466.629H4.917a.634.634 0 01-.63-.63v-4.77c0-.345.285-.63.63-.63.348 0 .63.285.63.63v4.14h1.756a.63.63 0 010 1.26zM24 10.314C24 4.943 18.615.572 12 .572S0 4.942 0 10.314c0 4.81 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.3.079.766.038 1.08l-.164 1.02c-.045.3-.24 1.186 1.049.645 1.291-.54 6.916-4.078 9.436-6.975C23.176 14.392 24 12.458 24 10.314z"
21+
fill="#06C755"
22+
/>
23+
</svg>
24+
);
25+
});
26+
27+
export default Icon;

src/icons/Line/components/Mono.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
'use client';
2+
3+
import type { IconType } from '@lobehub/icons';
4+
import { memo } from 'react';
5+
6+
import { TITLE } from '../style';
7+
8+
const Icon: IconType = memo(({ size = '1em', style, ...rest }) => {
9+
return (
10+
<svg
11+
fill="currentColor"
12+
fillRule="evenodd"
13+
height={size}
14+
style={{ flex: 'none', lineHeight: 1, ...style }}
15+
viewBox="0 0 24 24"
16+
width={size}
17+
xmlns="http://www.w3.org/2000/svg"
18+
{...rest}
19+
>
20+
<title>{TITLE}</title>
21+
<path d="M19.365 9.863a.631.631 0 010 1.26H17.61v1.126h1.755a.63.63 0 110 1.259h-2.386a.631.631 0 01-.627-.63v-4.77c0-.345.282-.63.63-.63h2.386a.63.63 0 01-.003 1.26H17.61v1.125h1.755zm-3.855 3.016a.63.63 0 01-.631.627.618.618 0 01-.51-.25l-2.443-3.317v2.94a.63.63 0 01-1.257 0V8.108a.627.627 0 01.624-.628c.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.63.63-.63.345 0 .63.285.63.63v4.77zm-5.741 0a.632.632 0 01-.631.629.631.631 0 01-.627-.63v-4.77c0-.345.282-.63.63-.63.346 0 .628.285.628.63v4.77zm-2.466.629H4.917a.634.634 0 01-.63-.63v-4.77c0-.345.285-.63.63-.63.348 0 .63.285.63.63v4.14h1.756a.63.63 0 010 1.26zM24 10.314C24 4.943 18.615.572 12 .572S0 4.942 0 10.314c0 4.81 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.3.079.766.038 1.08l-.164 1.02c-.045.3-.24 1.186 1.049.645 1.291-.54 6.916-4.078 9.436-6.975C23.176 14.392 24 12.458 24 10.314z" />
22+
</svg>
23+
);
24+
});
25+
26+
export default Icon;

0 commit comments

Comments
 (0)