Skip to content

Commit a9239f5

Browse files
✨ feat: Add SambaNova
1 parent fb564ab commit a9239f5

File tree

14 files changed

+272
-5
lines changed

14 files changed

+272
-5
lines changed

src/Azure/components/Avatar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import { memo } from 'react';
55
import IconAvatar, { type IconAvatarProps } from '@/features/IconAvatar';
66

77
import { COLOR_PRIMARY, TITLE } from '../style';
8-
import Mono from './Mono';
8+
import Color from './Color';
99

1010
export type AvatarProps = Omit<IconAvatarProps, 'Icon'>;
1111

1212
const Avatar = memo<AvatarProps>(({ background, ...rest }) => {
1313
return (
1414
<IconAvatar
15-
Icon={Mono}
15+
Icon={Color}
1616
aria-label={TITLE}
1717
background={background || COLOR_PRIMARY}
1818
iconMultiple={0.7}

src/Azure/style.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export const TITLE = 'Azure';
22
export const TEXT_MULTIPLE = 0.75;
33
export const SPACE_MULTIPLE = 0.25;
4-
export const COLOR_PRIMARY = '#00A4EF';
4+
export const COLOR_PRIMARY = '#fff';
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'use client';
2+
3+
import { memo } from 'react';
4+
5+
import IconAvatar, { type IconAvatarProps } from '@/features/IconAvatar';
6+
7+
import { COLOR_PRIMARY, TITLE } from '../style';
8+
import Mono from './Mono';
9+
10+
export type AvatarProps = Omit<IconAvatarProps, 'Icon'>;
11+
12+
const Avatar = memo<AvatarProps>(({ background, ...rest }) => {
13+
return (
14+
<IconAvatar Icon={Mono} aria-label={TITLE} background={background || COLOR_PRIMARY} {...rest} />
15+
);
16+
});
17+
18+
export default Avatar;

src/SambaNova/components/Color.tsx

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
'use client';
2+
3+
import { forwardRef } from 'react';
4+
5+
import type { IconType } from '@/types';
6+
7+
import { TITLE } from '../style';
8+
9+
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
10+
return (
11+
<svg
12+
height={size}
13+
ref={ref}
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
22+
d="M23 23h-1.223V8.028c0-3.118-2.568-5.806-5.744-5.806H8.027c-3.176 0-5.744 2.565-5.744 5.686 0 3.119 2.568 5.684 5.744 5.684h.794c1.346 0 2.445 1.1 2.445 2.444 0 1.346-1.1 2.446-2.445 2.446H1v-1.223h7.761c.671 0 1.223-.551 1.223-1.16 0-.67-.552-1.16-1.223-1.16h-.794C4.177 14.872 1 11.756 1 7.909 1 4.058 4.176 1 8.027 1h8.066C19.88 1 23 4.239 23 8.028V23z"
23+
fill="#EE7624"
24+
/>
25+
<path
26+
d="M8.884 12.672c1.71.06 3.361 1.588 3.361 3.422 0 1.833-1.528 3.421-3.421 3.421H1v1.223h7.761c2.568 0 4.705-2.077 4.705-4.644 0-.672-.123-1.283-.43-1.894-.245-.551-.67-1.1-1.099-1.528-.489-.429-1.039-.734-1.65-.977-.525-.175-1.048-.193-1.594-.212-.218-.008-.441-.016-.669-.034-.428 0-1.406-.245-1.956-.61a3.369 3.369 0 01-1.223-1.406c-.183-.489-.305-.977-.305-1.528A3.417 3.417 0 017.96 4.482h8.066c1.895 0 3.422 1.65 3.422 3.483v15.032h1.223V8.027c0-2.568-2.077-4.768-4.645-4.768h-8c-2.568 0-4.705 2.077-4.705 4.646 0 .67.123 1.282.43 1.894a4.45 4.45 0 001.099 1.528c.429.428 1.039.734 1.588.976.306.123.611.183.976.246.857.06 1.406.123 1.466.123h.003z"
27+
fill="#EE7624"
28+
/>
29+
<path
30+
d="M1 23h7.761v-.003c3.85 0 7.03-3.116 7.09-7.026 0-3.79-3.117-6.906-6.967-6.906H8.09c-.672 0-1.222-.552-1.222-1.16 0-.608.487-1.16 1.159-1.16h8.069c.608 0 1.159.611 1.159 1.283v14.97h1.223V8.024c0-1.345-1.1-2.505-2.445-2.505H7.967a2.451 2.451 0 00-2.445 2.445 2.45 2.45 0 002.445 2.445h.794c3.176 0 5.744 2.568 5.744 5.684s-2.568 5.684-5.744 5.684H1V23z"
31+
fill="#EE7624"
32+
/>
33+
</svg>
34+
);
35+
});
36+
37+
export default Icon;
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
'use client';
2+
3+
import { memo } from 'react';
4+
5+
import IconCombine, { type IconCombineProps } from '@/features/IconCombine';
6+
7+
import { SPACE_MULTIPLE, TEXT_MULTIPLE, TITLE } from '../style';
8+
import Color from './Color';
9+
import Mono from './Mono';
10+
import Text from './Text';
11+
12+
export interface CombineProps extends Omit<IconCombineProps, 'Icon' | 'Text'> {
13+
type?: 'color' | 'mono';
14+
}
15+
const Combine = memo<CombineProps>(({ type = 'mono', ...rest }) => {
16+
const Icon = type === 'color' ? Color : Mono;
17+
18+
return (
19+
<IconCombine
20+
Icon={Icon}
21+
Text={Text}
22+
aria-label={TITLE}
23+
spaceMultiple={SPACE_MULTIPLE}
24+
textMultiple={TEXT_MULTIPLE}
25+
{...rest}
26+
/>
27+
);
28+
});
29+
30+
export default Combine;

src/SambaNova/components/Mono.tsx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
'use client';
2+
3+
import { forwardRef } from 'react';
4+
5+
import type { IconType } from '@/types';
6+
7+
import { TITLE } from '../style';
8+
9+
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
10+
return (
11+
<svg
12+
fill="currentColor"
13+
fillRule="evenodd"
14+
height={size}
15+
ref={ref}
16+
style={{ flex: 'none', lineHeight: 1, ...style }}
17+
viewBox="0 0 24 24"
18+
width={size}
19+
xmlns="http://www.w3.org/2000/svg"
20+
{...rest}
21+
>
22+
<title>{TITLE}</title>
23+
<path d="M23 23h-1.223V8.028c0-3.118-2.568-5.806-5.744-5.806H8.027c-3.176 0-5.744 2.565-5.744 5.686 0 3.119 2.568 5.684 5.744 5.684h.794c1.346 0 2.445 1.1 2.445 2.444 0 1.346-1.1 2.446-2.445 2.446H1v-1.223h7.761c.671 0 1.223-.551 1.223-1.16 0-.67-.552-1.16-1.223-1.16h-.794C4.177 14.872 1 11.756 1 7.909 1 4.058 4.176 1 8.027 1h8.066C19.88 1 23 4.239 23 8.028V23z" />
24+
<path d="M8.884 12.672c1.71.06 3.361 1.588 3.361 3.422 0 1.833-1.528 3.421-3.421 3.421H1v1.223h7.761c2.568 0 4.705-2.077 4.705-4.644 0-.672-.123-1.283-.43-1.894-.245-.551-.67-1.1-1.099-1.528-.489-.429-1.039-.734-1.65-.977-.525-.175-1.048-.193-1.594-.212-.218-.008-.441-.016-.669-.034-.428 0-1.406-.245-1.956-.61a3.369 3.369 0 01-1.223-1.406c-.183-.489-.305-.977-.305-1.528A3.417 3.417 0 017.96 4.482h8.066c1.895 0 3.422 1.65 3.422 3.483v15.032h1.223V8.027c0-2.568-2.077-4.768-4.645-4.768h-8c-2.568 0-4.705 2.077-4.705 4.646 0 .67.123 1.282.43 1.894a4.45 4.45 0 001.099 1.528c.429.428 1.039.734 1.588.976.306.123.611.183.976.246.857.06 1.406.123 1.466.123h.003z" />
25+
<path d="M1 23h7.761v-.003c3.85 0 7.03-3.116 7.09-7.026 0-3.79-3.117-6.906-6.967-6.906H8.09c-.672 0-1.222-.552-1.222-1.16 0-.608.487-1.16 1.159-1.16h8.069c.608 0 1.159.611 1.159 1.283v14.97h1.223V8.024c0-1.345-1.1-2.505-2.445-2.505H7.967a2.451 2.451 0 00-2.445 2.445 2.45 2.45 0 002.445 2.445h.794c3.176 0 5.744 2.568 5.744 5.684s-2.568 5.684-5.744 5.684H1V23z" />
26+
</svg>
27+
);
28+
});
29+
30+
export default Icon;

src/SambaNova/components/Text.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
'use client';
2+
3+
import { forwardRef } from 'react';
4+
5+
import type { IconType } from '@/types';
6+
7+
import { TITLE } from '../style';
8+
9+
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
10+
return (
11+
<svg
12+
fill="currentColor"
13+
fillRule="evenodd"
14+
height={size}
15+
ref={ref}
16+
style={{ flex: 'none', lineHeight: 1, ...style }}
17+
viewBox="0 0 175 24"
18+
xmlns="http://www.w3.org/2000/svg"
19+
{...rest}
20+
>
21+
<title>{TITLE}</title>
22+
<path d="M11.5 5.904c0-1.92-1.232-3.066-2.977-3.066-1.488 0-2.833 1.345-2.833 2.89 0 1.546 1.003 2.349 3.066 3.005 4.582 1.46 6.27 3.18 6.27 6.846 0 3.665-2.748 6.413-6.499 6.413-3.75 0-6.47-2.691-6.527-6.67h3.095c.028 2.291 1.373 3.836 3.436 3.836 2.063 0 3.409-1.488 3.409-3.58 0-1.545-.69-2.52-2.948-3.294-5.239-1.773-6.385-3.494-6.385-6.499C2.607 2.548 5.27 0 8.536 0c3.494 0 6.013 2.206 6.07 5.9h-3.094l-.012.004zM31.433 21.596v-2.462h-.058c-1.117 1.891-3.123 2.862-5.381 2.862-4.64 0-8.42-3.494-8.42-8.077 0-5.068 3.637-8.619 8.305-8.619 2.32 0 4.265.86 5.496 2.662h.058V5.728h2.976v15.864h-2.976v.004zm.057-7.901c0-3.095-2.235-5.671-5.525-5.671-2.976 0-5.41 2.548-5.41 5.67 0 3.124 2.434 5.586 5.41 5.586s5.525-2.576 5.525-5.585zM58.908 21.596V12.72c0-3.004-1.26-4.696-3.75-4.696-2.635 0-3.78 1.46-3.78 4.64v8.932H48.4v-9.218c0-3.123-1.46-4.35-3.608-4.35-2.634 0-3.922 1.545-3.922 4.668V21.6h-2.976V5.732h2.748V7.45h.057C41.988 5.932 43.19 5.3 45.254 5.3c2.063 0 4.122 1.003 4.925 2.662 1.146-1.802 2.72-2.662 5.24-2.662 4.121 0 6.47 2.577 6.47 6.67v9.622h-2.977l-.004.004zM65.346 21.596V.408h2.976v7.53h.057c1.288-1.745 3.294-2.634 5.439-2.634 4.497 0 8.22 3.78 8.22 8.362 0 4.583-3.495 8.334-7.963 8.334-2.291 0-4.412-.917-5.728-2.69h-.057v2.29h-2.948l.004-.004zm13.715-7.93c0-3.004-2.377-5.642-5.439-5.642-3.062 0-5.381 2.576-5.381 5.585 0 3.01 2.377 5.672 5.41 5.672 3.033 0 5.41-2.52 5.41-5.615zM97.575 21.596v-2.462h-.057c-1.117 1.891-3.123 2.862-5.382 2.862-4.64 0-8.419-3.494-8.419-8.077 0-5.068 3.637-8.619 8.305-8.619 2.32 0 4.265.86 5.496 2.662h.057V5.728h2.976v15.864h-2.976v.004zm.057-7.901c0-3.095-2.234-5.671-5.524-5.671-2.977 0-5.41 2.548-5.41 5.67 0 3.124 2.434 5.586 5.41 5.586s5.524-2.576 5.524-5.585zM117.855 21.596L107.372 5.22h-.057v16.377h-3.09V.408h3.38l10.307 16.12h.057V.409h3.09v21.188h-3.208.004zM132.304 21.996c-4.469 0-8.448-3.808-8.448-8.277 0-4.84 3.808-8.419 8.676-8.419 4.383 0 8.505 3.437 8.448 8.476-.057 4.236-3.608 8.22-8.676 8.22zm.086-13.972c-2.977 0-5.558 2.52-5.558 5.614s2.492 5.642 5.496 5.642c3.005 0 5.668-2.462 5.668-5.67 0-3.21-2.492-5.586-5.611-5.586h.005zM147.41 21.596l-6.3-15.864h3.181l4.15 11.339h.057l4.065-11.339h3.18l-6.242 15.864h-2.091zM169.785 21.596v-2.462h-.057c-1.118 1.891-3.124 2.862-5.382 2.862-4.64 0-8.419-3.494-8.419-8.077 0-5.068 3.636-8.619 8.305-8.619 2.319 0 4.264.86 5.496 2.662h.057V5.728h2.976v15.864h-2.976v.004zm.057-7.901c0-3.095-2.235-5.671-5.525-5.671-2.976 0-5.41 2.548-5.41 5.67 0 3.124 2.434 5.586 5.41 5.586 2.977 0 5.525-2.576 5.525-5.585z" />
23+
</svg>
24+
);
25+
});
26+
27+
export default Icon;

src/SambaNova/index.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
nav: Components
3+
group: Provider
4+
title: SambaNova
5+
atomId: SambaNova
6+
description: https://sambanova.ai
7+
---
8+
9+
## Icons
10+
11+
```tsx
12+
import { SambaNova } from '@lobehub/icons';
13+
import { Flexbox } from 'react-layout-kit';
14+
15+
export default () => (
16+
<Flexbox gap={16} horizontal>
17+
<SambaNova size={64} />
18+
<SambaNova.Color size={64} />
19+
</Flexbox>
20+
);
21+
```
22+
23+
## Text
24+
25+
```tsx
26+
import { SambaNova } from '@lobehub/icons';
27+
28+
export default () => <SambaNova.Text size={48} />;
29+
```
30+
31+
## Combine
32+
33+
```tsx
34+
import { SambaNova } from '@lobehub/icons';
35+
import { Flexbox } from 'react-layout-kit';
36+
37+
export default () => (
38+
<Flexbox gap={16} align={'flex-start'}>
39+
<SambaNova.Combine size={64} />
40+
<SambaNova.Combine size={64} type={'color'} />
41+
</Flexbox>
42+
);
43+
```
44+
45+
## Avatars
46+
47+
```tsx
48+
import { SambaNova } from '@lobehub/icons';
49+
import { Flexbox } from 'react-layout-kit';
50+
51+
export default () => (
52+
<Flexbox gap={16} horizontal>
53+
<SambaNova.Avatar size={64} />
54+
<SambaNova.Avatar size={64} shape={'square'} />
55+
</Flexbox>
56+
);
57+
```
58+
59+
## Colors
60+
61+
```tsx
62+
import { SambaNova } 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={SambaNova.colorPrimary} />
70+
</Flexbox>
71+
);
72+
```

src/SambaNova/index.ts

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

src/SambaNova/style.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const TITLE = 'SambaNova';
2+
export const TEXT_MULTIPLE = 0.8;
3+
export const SPACE_MULTIPLE = 0.2;
4+
export const COLOR_PRIMARY = '#EE7624';

0 commit comments

Comments
 (0)