@coffic/cosy-ui 0.1.29 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -22
- package/dist/app.css +1 -0
- package/dist/assets/logo-rounded.png +0 -0
- package/dist/assets/logo.png +0 -0
- package/dist/components/base/Alert.astro +186 -0
- package/dist/components/base/Button.astro +103 -0
- package/dist/components/base/Image.astro +291 -0
- package/dist/components/base/Link.astro +131 -0
- package/dist/components/containers/Container.astro +103 -0
- package/dist/components/containers/Main.astro +167 -0
- package/dist/components/containers/Section.astro +145 -0
- package/dist/components/containers/index.ts +3 -0
- package/dist/components/data-display/Blog.astro +195 -0
- package/dist/components/data-display/TeamMember.astro +135 -0
- package/dist/components/data-display/TeamMembers.astro +101 -0
- package/dist/components/display/Banner.astro +57 -0
- package/dist/components/display/Card.astro +135 -0
- package/dist/components/display/CodeBlock.astro +147 -0
- package/dist/components/display/CodeExample.astro +330 -0
- package/dist/components/display/Hero.astro +119 -0
- package/dist/components/display/Modal.astro +115 -0
- package/dist/components/icons/AlertTriangle.astro +35 -0
- package/dist/components/icons/CalendarIcon.astro +38 -0
- package/dist/components/icons/CheckCircle.astro +36 -0
- package/dist/components/icons/CheckIcon.astro +38 -0
- package/dist/components/icons/ClipboardIcon.astro +39 -0
- package/dist/components/icons/CloseIcon.astro +38 -0
- package/dist/components/icons/ErrorIcon.astro +35 -0
- package/dist/components/icons/GithubIcon.astro +31 -0
- package/dist/components/icons/InfoCircle.astro +37 -0
- package/dist/components/icons/InfoIcon.astro +38 -0
- package/dist/components/icons/LinkIcon.astro +39 -0
- package/dist/components/icons/LinkedinIcon.astro +31 -0
- package/dist/components/icons/MenuIcon.astro +41 -0
- package/dist/components/icons/SearchIcon.astro +40 -0
- package/dist/components/icons/SocialIcon.astro +100 -0
- package/dist/components/icons/SuccessIcon.astro +35 -0
- package/dist/components/icons/SunCloudyIcon.astro +45 -0
- package/dist/components/icons/TwitterIcon.astro +31 -0
- package/dist/components/icons/UserIcon.astro +35 -0
- package/dist/components/icons/WarningIcon.astro +38 -0
- package/dist/components/icons/XCircle.astro +37 -0
- package/dist/components/layouts/BaseLayout.astro +144 -0
- package/dist/components/layouts/DashboardLayout.astro +660 -0
- package/dist/components/layouts/DefaultLayout.astro +170 -0
- package/dist/components/layouts/DocumentationLayout.astro +469 -0
- package/dist/components/layouts/Flex.astro +138 -0
- package/dist/components/layouts/Footer.astro +284 -0
- package/dist/components/layouts/Grid.astro +182 -0
- package/dist/components/layouts/Header.astro +114 -0
- package/dist/components/layouts/LandingLayout.astro +388 -0
- package/dist/components/layouts/Stack.astro +149 -0
- package/dist/components/navigation/LanguageSwitcher.astro +81 -0
- package/dist/components/navigation/TableOfContents.astro +352 -0
- package/dist/components/navigation/ThemeSwitcher.astro +89 -0
- package/dist/components/typography/Article.astro +144 -0
- package/dist/components/typography/Heading.astro +205 -0
- package/dist/components/typography/Text.astro +187 -0
- package/dist/index.ts +70 -0
- package/dist/integration.ts +14 -0
- package/dist/style.ts +1 -0
- package/{src → dist}/types/footer.ts +1 -0
- package/dist/utils/theme.ts +55 -0
- package/package.json +67 -59
- package/index.ts +0 -18
- package/src/components/Alert.astro +0 -78
- package/src/components/Article.astro +0 -11
- package/src/components/Banner.astro +0 -49
- package/src/components/Blog.astro +0 -115
- package/src/components/Button.astro +0 -49
- package/src/components/Card.astro +0 -113
- package/src/components/CodeBlock.astro +0 -186
- package/src/components/Footer.astro +0 -148
- package/src/components/Header.astro +0 -305
- package/src/components/Hero.astro +0 -69
- package/src/components/Image.astro +0 -251
- package/src/components/Link.astro +0 -82
- package/src/components/Modal.astro +0 -67
- package/src/components/SocialIcon.astro +0 -36
- package/src/components/TeamMember.astro +0 -68
- package/src/components/TeamMembers.astro +0 -43
- package/src/env.d.ts +0 -0
- /package/{src/components → dist/components/base}/ThemeItem.astro +0 -0
- /package/{src → dist}/utils/social.ts +0 -0
@@ -0,0 +1,119 @@
|
|
1
|
+
---
|
2
|
+
/**
|
3
|
+
* @component Hero
|
4
|
+
*
|
5
|
+
* @description
|
6
|
+
* Hero 组件是一个全屏的展示区域,通常用于网站的首页或重要页面的顶部。
|
7
|
+
* 它提供了一个引人注目的视觉区域,可以包含标题、描述、图片和行动按钮。
|
8
|
+
*
|
9
|
+
* @design
|
10
|
+
* 设计理念:
|
11
|
+
* 1. 视觉冲击力 - 全屏展示,吸引用户注意
|
12
|
+
* 2. 内容聚焦 - 清晰地传达核心信息
|
13
|
+
* 3. 引导行动 - 通过链接按钮引导用户进行下一步操作
|
14
|
+
* 4. 灵活布局 - 支持图片、标题、描述和自定义内容
|
15
|
+
*
|
16
|
+
* @usage
|
17
|
+
* 基本用法:
|
18
|
+
* ```astro
|
19
|
+
* <Hero
|
20
|
+
* title="欢迎使用我们的产品"
|
21
|
+
* description="这是一个简短的描述,介绍产品的主要特点和价值。"
|
22
|
+
* links={[
|
23
|
+
* { text: "开始使用", href: "/getting-started" },
|
24
|
+
* { text: "了解更多", href: "/about" }
|
25
|
+
* ]}
|
26
|
+
* />
|
27
|
+
* ```
|
28
|
+
*
|
29
|
+
* 带图片的用法:
|
30
|
+
* ```astro
|
31
|
+
* <Hero
|
32
|
+
* title="产品展示"
|
33
|
+
* description="查看我们的最新产品。"
|
34
|
+
* image={{ src: "/images/product.png", alt: "产品图片" }}
|
35
|
+
* links={[
|
36
|
+
* { text: "立即购买", href: "/buy" }
|
37
|
+
* ]}
|
38
|
+
* />
|
39
|
+
* ```
|
40
|
+
*
|
41
|
+
* 带自定义内容的用法:
|
42
|
+
* ```astro
|
43
|
+
* <Hero
|
44
|
+
* title="交互式演示"
|
45
|
+
* description="尝试我们的交互式演示。"
|
46
|
+
* links={[
|
47
|
+
* { text: "查看文档", href: "/docs" }
|
48
|
+
* ]}
|
49
|
+
* >
|
50
|
+
* <div slot="app">
|
51
|
+
* <InteractiveDemo />
|
52
|
+
* </div>
|
53
|
+
* </Hero>
|
54
|
+
* ```
|
55
|
+
*
|
56
|
+
* @props
|
57
|
+
* @prop {string} title - Hero 区域的主标题
|
58
|
+
* @prop {string} description - 标题下方的描述文本
|
59
|
+
* @prop {Object} [image] - 可选的图片配置
|
60
|
+
* @prop {string} image.src - 图片的源地址
|
61
|
+
* @prop {string} image.alt - 图片的替代文本
|
62
|
+
* @prop {Array<Link>} links - 链接按钮数组
|
63
|
+
* @prop {string} links[].text - 链接按钮的文本
|
64
|
+
* @prop {string} links[].href - 链接按钮的目标地址
|
65
|
+
*/
|
66
|
+
|
67
|
+
// 导入样式
|
68
|
+
import '../../app.css';
|
69
|
+
|
70
|
+
import Link from '../base/Link.astro';
|
71
|
+
|
72
|
+
interface Link {
|
73
|
+
text: string;
|
74
|
+
href: string;
|
75
|
+
}
|
76
|
+
|
77
|
+
interface Props {
|
78
|
+
title: string;
|
79
|
+
description: string;
|
80
|
+
image?: {
|
81
|
+
src: string;
|
82
|
+
alt: string;
|
83
|
+
};
|
84
|
+
links: Link[];
|
85
|
+
}
|
86
|
+
|
87
|
+
const { title, description, image, links = [] } = Astro.props;
|
88
|
+
---
|
89
|
+
|
90
|
+
<div class="hero-container">
|
91
|
+
<div class="hero-content">
|
92
|
+
{image && <img src={image.src} alt={image.alt} class="hero-image" />}
|
93
|
+
|
94
|
+
<h2 class="hero-title">{title}</h2>
|
95
|
+
<p class="hero-description">
|
96
|
+
{description}
|
97
|
+
</p>
|
98
|
+
|
99
|
+
<div class="hero-app">
|
100
|
+
<slot name="app" />
|
101
|
+
</div>
|
102
|
+
|
103
|
+
<div class="hero-links">
|
104
|
+
{
|
105
|
+
links.map((link: Link) => (
|
106
|
+
<Link
|
107
|
+
href={link.href}
|
108
|
+
external
|
109
|
+
variant="cta"
|
110
|
+
animation="hover-lift"
|
111
|
+
size="lg"
|
112
|
+
>
|
113
|
+
{link.text}
|
114
|
+
</Link>
|
115
|
+
))
|
116
|
+
}
|
117
|
+
</div>
|
118
|
+
</div>
|
119
|
+
</div>
|
@@ -0,0 +1,115 @@
|
|
1
|
+
---
|
2
|
+
/**
|
3
|
+
* @component Modal
|
4
|
+
*
|
5
|
+
* @description
|
6
|
+
* Modal 组件是一个模态对话框,用于在不离开当前页面的情况下显示内容、通知或请求用户输入。
|
7
|
+
* 它会覆盖在页面内容上方,并提供一个聚焦的交互环境。
|
8
|
+
*
|
9
|
+
* @design
|
10
|
+
* 设计理念:
|
11
|
+
* 1. 聚焦交互 - 通过遮罩层和动画效果引导用户注意力
|
12
|
+
* 2. 灵活布局 - 支持标题、内容和操作按钮的灵活组合
|
13
|
+
* 3. 可访问性 - 支持键盘导航和屏幕阅读器
|
14
|
+
* 4. 响应式设计 - 在不同屏幕尺寸下保持良好的用户体验
|
15
|
+
*
|
16
|
+
* @usage
|
17
|
+
* 基本用法:
|
18
|
+
* ```astro
|
19
|
+
* <Modal id="my-modal" title="提示">
|
20
|
+
* <p>这是一个模态对话框的内容。</p>
|
21
|
+
* <button slot="actions" data-modal-target="my-modal">关闭</button>
|
22
|
+
* </Modal>
|
23
|
+
*
|
24
|
+
* <!-- 触发按钮 -->
|
25
|
+
* <button data-modal-target="my-modal">打开模态框</button>
|
26
|
+
* ```
|
27
|
+
*
|
28
|
+
* 自定义操作按钮:
|
29
|
+
* ```astro
|
30
|
+
* <Modal id="confirm-modal" title="确认操作">
|
31
|
+
* <p>您确定要执行此操作吗?</p>
|
32
|
+
* <div slot="actions">
|
33
|
+
* <button class="btn btn-primary">确认</button>
|
34
|
+
* <button class="btn" data-modal-target="confirm-modal">取消</button>
|
35
|
+
* </div>
|
36
|
+
* </Modal>
|
37
|
+
* ```
|
38
|
+
*
|
39
|
+
* 不带标题的模态框:
|
40
|
+
* ```astro
|
41
|
+
* <Modal id="image-modal">
|
42
|
+
* <img src="/images/large-image.jpg" alt="大图预览" />
|
43
|
+
* </Modal>
|
44
|
+
* ```
|
45
|
+
*/
|
46
|
+
|
47
|
+
// 导入样式
|
48
|
+
import '../../app.css';
|
49
|
+
|
50
|
+
interface Props {
|
51
|
+
/**
|
52
|
+
* Modal 的唯一标识符
|
53
|
+
*/
|
54
|
+
id: string;
|
55
|
+
/**
|
56
|
+
* 模态框的标题
|
57
|
+
*/
|
58
|
+
title?: string;
|
59
|
+
/**
|
60
|
+
* 是否显示关闭按钮
|
61
|
+
* @default true
|
62
|
+
*/
|
63
|
+
showCloseButton?: boolean;
|
64
|
+
/**
|
65
|
+
* 自定义类名
|
66
|
+
*/
|
67
|
+
class?: string;
|
68
|
+
}
|
69
|
+
|
70
|
+
const {
|
71
|
+
id,
|
72
|
+
title,
|
73
|
+
showCloseButton = true,
|
74
|
+
class: className = '',
|
75
|
+
} = Astro.props;
|
76
|
+
---
|
77
|
+
|
78
|
+
<dialog id={id} class="modal">
|
79
|
+
<div class:list={["modal-box", className]}>
|
80
|
+
{showCloseButton && (
|
81
|
+
<form method="dialog">
|
82
|
+
<button class="modal-close-button">✕</button>
|
83
|
+
</form>
|
84
|
+
)}
|
85
|
+
|
86
|
+
{title && <h3 class="modal-title">{title}</h3>}
|
87
|
+
|
88
|
+
<div class="modal-content">
|
89
|
+
<slot />
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div class="modal-action">
|
93
|
+
<slot name="actions" />
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
|
97
|
+
<form method="dialog" class="modal-backdrop">
|
98
|
+
<button>关闭</button>
|
99
|
+
</form>
|
100
|
+
</dialog>
|
101
|
+
|
102
|
+
<script define:vars={{ id }}>
|
103
|
+
// 为了方便使用,我们提供一些辅助方法
|
104
|
+
document.addEventListener('DOMContentLoaded', () => {
|
105
|
+
const modal = document.getElementById(id);
|
106
|
+
if (!modal) return;
|
107
|
+
|
108
|
+
// 为所有触发这个模态框的按钮添加点击事件
|
109
|
+
document.querySelectorAll(`[data-modal-target="${id}"]`).forEach(trigger => {
|
110
|
+
trigger.addEventListener('click', () => {
|
111
|
+
modal.showModal();
|
112
|
+
});
|
113
|
+
});
|
114
|
+
});
|
115
|
+
</script>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
---
|
2
|
+
interface Props {
|
3
|
+
/**
|
4
|
+
* 图标的大小
|
5
|
+
* @default "24px"
|
6
|
+
*/
|
7
|
+
size?: string;
|
8
|
+
/**
|
9
|
+
* 图标的颜色
|
10
|
+
* @default "currentColor"
|
11
|
+
*/
|
12
|
+
color?: string;
|
13
|
+
/**
|
14
|
+
* 自定义类名
|
15
|
+
*/
|
16
|
+
class?: string;
|
17
|
+
}
|
18
|
+
|
19
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
20
|
+
---
|
21
|
+
|
22
|
+
<svg
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
24
|
+
width={size}
|
25
|
+
height={size}
|
26
|
+
viewBox="0 0 24 24"
|
27
|
+
fill="none"
|
28
|
+
stroke={color}
|
29
|
+
stroke-width="2"
|
30
|
+
stroke-linecap="round"
|
31
|
+
stroke-linejoin="round"
|
32
|
+
class={className}
|
33
|
+
>
|
34
|
+
<path d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
|
35
|
+
</svg>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
interface Props {
|
3
|
+
/**
|
4
|
+
* 图标的大小
|
5
|
+
* @default "24px"
|
6
|
+
*/
|
7
|
+
size?: string;
|
8
|
+
/**
|
9
|
+
* 图标的颜色
|
10
|
+
* @default "currentColor"
|
11
|
+
*/
|
12
|
+
color?: string;
|
13
|
+
/**
|
14
|
+
* 自定义类名
|
15
|
+
*/
|
16
|
+
class?: string;
|
17
|
+
}
|
18
|
+
|
19
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
20
|
+
---
|
21
|
+
|
22
|
+
<svg
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
24
|
+
width={size}
|
25
|
+
height={size}
|
26
|
+
viewBox="0 0 24 24"
|
27
|
+
fill="none"
|
28
|
+
stroke={color}
|
29
|
+
stroke-width="2"
|
30
|
+
stroke-linecap="round"
|
31
|
+
stroke-linejoin="round"
|
32
|
+
class={className}
|
33
|
+
>
|
34
|
+
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
|
35
|
+
<line x1="16" y1="2" x2="16" y2="6"></line>
|
36
|
+
<line x1="8" y1="2" x2="8" y2="6"></line>
|
37
|
+
<line x1="3" y1="10" x2="21" y2="10"></line>
|
38
|
+
</svg>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
---
|
2
|
+
interface Props {
|
3
|
+
/**
|
4
|
+
* 图标的大小
|
5
|
+
* @default "24px"
|
6
|
+
*/
|
7
|
+
size?: string;
|
8
|
+
/**
|
9
|
+
* 图标的颜色
|
10
|
+
* @default "currentColor"
|
11
|
+
*/
|
12
|
+
color?: string;
|
13
|
+
/**
|
14
|
+
* 自定义类名
|
15
|
+
*/
|
16
|
+
class?: string;
|
17
|
+
}
|
18
|
+
|
19
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
20
|
+
---
|
21
|
+
|
22
|
+
<svg
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
24
|
+
width={size}
|
25
|
+
height={size}
|
26
|
+
viewBox="0 0 24 24"
|
27
|
+
fill="none"
|
28
|
+
stroke={color}
|
29
|
+
stroke-width="2"
|
30
|
+
stroke-linecap="round"
|
31
|
+
stroke-linejoin="round"
|
32
|
+
class={className}
|
33
|
+
>
|
34
|
+
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path>
|
35
|
+
<polyline points="22 4 12 14.01 9 11.01"></polyline>
|
36
|
+
</svg>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
/**
|
3
|
+
* 检查图标组件
|
4
|
+
*/
|
5
|
+
interface Props {
|
6
|
+
/**
|
7
|
+
* 图标的大小
|
8
|
+
* @default "24px"
|
9
|
+
*/
|
10
|
+
size?: string;
|
11
|
+
/**
|
12
|
+
* 图标的颜色
|
13
|
+
* @default "currentColor"
|
14
|
+
*/
|
15
|
+
color?: string;
|
16
|
+
/**
|
17
|
+
* 自定义类名
|
18
|
+
*/
|
19
|
+
class?: string;
|
20
|
+
}
|
21
|
+
|
22
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
23
|
+
---
|
24
|
+
|
25
|
+
<svg
|
26
|
+
xmlns="http://www.w3.org/2000/svg"
|
27
|
+
width={size}
|
28
|
+
height={size}
|
29
|
+
viewBox="0 0 24 24"
|
30
|
+
fill="none"
|
31
|
+
stroke={color}
|
32
|
+
stroke-width="2"
|
33
|
+
stroke-linecap="round"
|
34
|
+
stroke-linejoin="round"
|
35
|
+
class={className}
|
36
|
+
>
|
37
|
+
<polyline points="20 6 9 17 4 12"></polyline>
|
38
|
+
</svg>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
/**
|
3
|
+
* 剪贴板图标组件
|
4
|
+
*/
|
5
|
+
interface Props {
|
6
|
+
/**
|
7
|
+
* 图标的大小
|
8
|
+
* @default "24px"
|
9
|
+
*/
|
10
|
+
size?: string;
|
11
|
+
/**
|
12
|
+
* 图标的颜色
|
13
|
+
* @default "currentColor"
|
14
|
+
*/
|
15
|
+
color?: string;
|
16
|
+
/**
|
17
|
+
* 自定义类名
|
18
|
+
*/
|
19
|
+
class?: string;
|
20
|
+
}
|
21
|
+
|
22
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
23
|
+
---
|
24
|
+
|
25
|
+
<svg
|
26
|
+
xmlns="http://www.w3.org/2000/svg"
|
27
|
+
width={size}
|
28
|
+
height={size}
|
29
|
+
viewBox="0 0 24 24"
|
30
|
+
fill="none"
|
31
|
+
stroke={color}
|
32
|
+
stroke-width="2"
|
33
|
+
stroke-linecap="round"
|
34
|
+
stroke-linejoin="round"
|
35
|
+
class={className}
|
36
|
+
>
|
37
|
+
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
|
38
|
+
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
|
39
|
+
</svg>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
/**
|
3
|
+
* 关闭图标组件
|
4
|
+
*/
|
5
|
+
interface Props {
|
6
|
+
/**
|
7
|
+
* 图标的大小
|
8
|
+
* @default "16px"
|
9
|
+
*/
|
10
|
+
size?: string;
|
11
|
+
/**
|
12
|
+
* 图标的颜色
|
13
|
+
* @default "currentColor"
|
14
|
+
*/
|
15
|
+
color?: string;
|
16
|
+
/**
|
17
|
+
* 自定义类名
|
18
|
+
*/
|
19
|
+
class?: string;
|
20
|
+
}
|
21
|
+
|
22
|
+
const { size = '16px', color = 'currentColor', class: className = '' } = Astro.props;
|
23
|
+
---
|
24
|
+
|
25
|
+
<svg
|
26
|
+
xmlns="http://www.w3.org/2000/svg"
|
27
|
+
width={size}
|
28
|
+
height={size}
|
29
|
+
viewBox="0 0 24 24"
|
30
|
+
fill="none"
|
31
|
+
stroke={color}
|
32
|
+
stroke-width="2"
|
33
|
+
stroke-linecap="round"
|
34
|
+
stroke-linejoin="round"
|
35
|
+
class={className}
|
36
|
+
>
|
37
|
+
<path d="M6 18L18 6M6 6l12 12" />
|
38
|
+
</svg>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
---
|
2
|
+
interface Props {
|
3
|
+
/**
|
4
|
+
* 图标的大小
|
5
|
+
* @default "24px"
|
6
|
+
*/
|
7
|
+
size?: string;
|
8
|
+
/**
|
9
|
+
* 图标的颜色
|
10
|
+
* @default "currentColor"
|
11
|
+
*/
|
12
|
+
color?: string;
|
13
|
+
/**
|
14
|
+
* 自定义类名
|
15
|
+
*/
|
16
|
+
class?: string;
|
17
|
+
}
|
18
|
+
|
19
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
20
|
+
---
|
21
|
+
|
22
|
+
<svg
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
24
|
+
width={size}
|
25
|
+
height={size}
|
26
|
+
viewBox="0 0 24 24"
|
27
|
+
fill="none"
|
28
|
+
stroke={color}
|
29
|
+
stroke-width="2"
|
30
|
+
stroke-linecap="round"
|
31
|
+
stroke-linejoin="round"
|
32
|
+
class={className}
|
33
|
+
>
|
34
|
+
<path d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" />
|
35
|
+
</svg>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
---
|
2
|
+
interface Props {
|
3
|
+
/**
|
4
|
+
* 图标的大小
|
5
|
+
* @default "24px"
|
6
|
+
*/
|
7
|
+
size?: string;
|
8
|
+
/**
|
9
|
+
* 图标的颜色
|
10
|
+
* @default "currentColor"
|
11
|
+
*/
|
12
|
+
color?: string;
|
13
|
+
/**
|
14
|
+
* 自定义类名
|
15
|
+
*/
|
16
|
+
class?: string;
|
17
|
+
}
|
18
|
+
|
19
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
20
|
+
---
|
21
|
+
|
22
|
+
<svg
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
24
|
+
width={size}
|
25
|
+
height={size}
|
26
|
+
viewBox="0 0 24 24"
|
27
|
+
fill={color}
|
28
|
+
class={className}
|
29
|
+
>
|
30
|
+
<path d="M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.509 11.509 0 0112 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12z" />
|
31
|
+
</svg>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
interface Props {
|
3
|
+
/**
|
4
|
+
* 图标的大小
|
5
|
+
* @default "24px"
|
6
|
+
*/
|
7
|
+
size?: string;
|
8
|
+
/**
|
9
|
+
* 图标的颜色
|
10
|
+
* @default "currentColor"
|
11
|
+
*/
|
12
|
+
color?: string;
|
13
|
+
/**
|
14
|
+
* 自定义类名
|
15
|
+
*/
|
16
|
+
class?: string;
|
17
|
+
}
|
18
|
+
|
19
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
20
|
+
---
|
21
|
+
|
22
|
+
<svg
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
24
|
+
width={size}
|
25
|
+
height={size}
|
26
|
+
viewBox="0 0 24 24"
|
27
|
+
fill="none"
|
28
|
+
stroke={color}
|
29
|
+
stroke-width="2"
|
30
|
+
stroke-linecap="round"
|
31
|
+
stroke-linejoin="round"
|
32
|
+
class={className}
|
33
|
+
>
|
34
|
+
<circle cx="12" cy="12" r="10"></circle>
|
35
|
+
<line x1="12" y1="16" x2="12" y2="12"></line>
|
36
|
+
<line x1="12" y1="8" x2="12.01" y2="8"></line>
|
37
|
+
</svg>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
/**
|
3
|
+
* 信息图标组件
|
4
|
+
*/
|
5
|
+
interface Props {
|
6
|
+
/**
|
7
|
+
* 图标的大小
|
8
|
+
* @default "24px"
|
9
|
+
*/
|
10
|
+
size?: string;
|
11
|
+
/**
|
12
|
+
* 图标的颜色
|
13
|
+
* @default "currentColor"
|
14
|
+
*/
|
15
|
+
color?: string;
|
16
|
+
/**
|
17
|
+
* 自定义类名
|
18
|
+
*/
|
19
|
+
class?: string;
|
20
|
+
}
|
21
|
+
|
22
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
23
|
+
---
|
24
|
+
|
25
|
+
<svg
|
26
|
+
xmlns="http://www.w3.org/2000/svg"
|
27
|
+
width={size}
|
28
|
+
height={size}
|
29
|
+
viewBox="0 0 24 24"
|
30
|
+
fill="none"
|
31
|
+
stroke={color}
|
32
|
+
stroke-width="2"
|
33
|
+
stroke-linecap="round"
|
34
|
+
stroke-linejoin="round"
|
35
|
+
class={className}
|
36
|
+
>
|
37
|
+
<path d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
38
|
+
</svg>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
/**
|
3
|
+
* 链接图标组件
|
4
|
+
*/
|
5
|
+
interface Props {
|
6
|
+
/**
|
7
|
+
* 图标的大小
|
8
|
+
* @default "24px"
|
9
|
+
*/
|
10
|
+
size?: string;
|
11
|
+
/**
|
12
|
+
* 图标的颜色
|
13
|
+
* @default "currentColor"
|
14
|
+
*/
|
15
|
+
color?: string;
|
16
|
+
/**
|
17
|
+
* 自定义类名
|
18
|
+
*/
|
19
|
+
class?: string;
|
20
|
+
}
|
21
|
+
|
22
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
23
|
+
---
|
24
|
+
|
25
|
+
<svg
|
26
|
+
xmlns="http://www.w3.org/2000/svg"
|
27
|
+
width={size}
|
28
|
+
height={size}
|
29
|
+
viewBox="0 0 24 24"
|
30
|
+
fill="none"
|
31
|
+
stroke={color}
|
32
|
+
stroke-width="2"
|
33
|
+
stroke-linecap="round"
|
34
|
+
stroke-linejoin="round"
|
35
|
+
class={className}
|
36
|
+
>
|
37
|
+
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>
|
38
|
+
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
39
|
+
</svg>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
---
|
2
|
+
interface Props {
|
3
|
+
/**
|
4
|
+
* 图标的大小
|
5
|
+
* @default "24px"
|
6
|
+
*/
|
7
|
+
size?: string;
|
8
|
+
/**
|
9
|
+
* 图标的颜色
|
10
|
+
* @default "currentColor"
|
11
|
+
*/
|
12
|
+
color?: string;
|
13
|
+
/**
|
14
|
+
* 自定义类名
|
15
|
+
*/
|
16
|
+
class?: string;
|
17
|
+
}
|
18
|
+
|
19
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
20
|
+
---
|
21
|
+
|
22
|
+
<svg
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
24
|
+
width={size}
|
25
|
+
height={size}
|
26
|
+
viewBox="0 0 24 24"
|
27
|
+
fill={color}
|
28
|
+
class={className}
|
29
|
+
>
|
30
|
+
<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" />
|
31
|
+
</svg>
|