@coffic/cosy-ui 0.6.10 → 0.6.14
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/dist/app.css +1 -1
- package/dist/assets/iconData.ts +93 -0
- package/dist/components/base/Alert.astro +1 -1
- package/dist/components/base/Button.astro +102 -91
- package/dist/components/base/Image.astro +1 -1
- package/dist/components/base/Link.astro +1 -1
- package/dist/components/containers/Container.astro +1 -1
- package/dist/components/containers/Main.astro +1 -1
- package/dist/components/containers/Section.astro +96 -94
- package/dist/components/data-display/Blog.astro +1 -1
- package/dist/components/data-display/ProductCard.astro +2 -4
- package/dist/components/data-display/Products.astro +2 -2
- package/dist/components/data-display/TeamMember.astro +2 -4
- package/dist/components/data-display/TeamMembers.astro +1 -1
- package/dist/components/display/Banner.astro +1 -1
- package/dist/components/display/Card.astro +1 -1
- package/dist/components/display/CodeBlock.astro +1 -1
- package/dist/components/display/CodeExample.astro +1 -1
- package/dist/components/display/Hero.astro +1 -1
- package/dist/components/display/Modal.astro +1 -1
- package/dist/components/layouts/AppLayout.astro +2 -6
- package/dist/components/layouts/BaseLayout.astro +1 -1
- package/dist/components/layouts/DashboardLayout.astro +1 -1
- package/dist/components/layouts/Footer.astro +2 -5
- package/dist/components/layouts/Grid.astro +1 -1
- package/dist/components/layouts/Header.astro +1 -1
- package/dist/components/layouts/NavItems.astro +1 -1
- package/dist/components/layouts/Sidebar.astro +2 -2
- package/dist/components/layouts/SidebarNav.astro +1 -1
- package/dist/components/layouts/Stack.astro +72 -70
- package/dist/components/navigation/LanguageSwitcher.astro +2 -2
- package/dist/components/navigation/TableOfContents.astro +1 -1
- package/dist/components/navigation/ThemeSwitcher.astro +2 -2
- package/dist/components/typography/Article.astro +2 -2
- package/dist/components/typography/Heading.astro +2 -2
- package/dist/components/typography/Text.astro +1 -1
- package/dist/icons/AlertTriangle.astro +24 -0
- package/dist/icons/AstroIcon.astro +46 -0
- package/dist/icons/CalendarIcon.astro +24 -0
- package/dist/icons/CheckCircle.astro +23 -0
- package/dist/icons/CheckIcon.astro +27 -0
- package/dist/{components/icons → icons}/ChevronDownIcon.astro +3 -13
- package/dist/icons/ClipboardIcon.astro +27 -0
- package/dist/icons/CloseIcon.astro +27 -0
- package/dist/icons/ErrorIcon.astro +24 -0
- package/dist/icons/GithubIcon.astro +24 -0
- package/dist/icons/InfoCircle.astro +24 -0
- package/dist/icons/InfoIcon.astro +26 -0
- package/dist/icons/LinkIcon.astro +27 -0
- package/dist/icons/LinkedinIcon.astro +23 -0
- package/dist/icons/MenuIcon.astro +27 -0
- package/dist/icons/SearchIcon.astro +23 -0
- package/dist/icons/SettingsIcon.astro +18 -0
- package/dist/{components/icons → icons}/SocialIcon.astro +14 -14
- package/dist/icons/SuccessIcon.astro +24 -0
- package/dist/icons/SunCloudyIcon.astro +23 -0
- package/dist/icons/TwitterIcon.astro +24 -0
- package/dist/icons/UserIcon.astro +24 -0
- package/dist/icons/WarningIcon.astro +27 -0
- package/dist/icons/XCircle.astro +24 -0
- package/dist/index.ts +1 -1
- package/dist/index_icons.ts +23 -0
- package/dist/index_vue.ts +41 -0
- package/dist/vue/{AlertDialog.vue → AlertDialog/AlertDialog.vue} +1 -1
- package/dist/vue/AlertDialog/Basic.vue +38 -0
- package/dist/vue/AlertDialog/Multilang.vue +48 -0
- package/dist/vue/AlertDialog/index.ts +58 -0
- package/dist/vue/BannerBox/BannerBox.vue +435 -0
- package/dist/vue/BannerBox/Basic.vue +32 -0
- package/dist/vue/BannerBox/CustomBg.vue +32 -0
- package/dist/vue/BannerBox/CustomComponent.vue +60 -0
- package/dist/vue/BannerBox/DisplayMode.vue +49 -0
- package/dist/vue/{FeatureCard.vue → BannerBox/FeatureCard.vue} +23 -42
- package/dist/vue/BannerBox/ImageExport.vue +37 -0
- package/dist/vue/BannerBox/SizePreset.vue +35 -0
- package/dist/vue/BannerBox/SmartBanner.vue +44 -0
- package/dist/vue/BannerBox/index.ts +76 -0
- package/dist/vue/FeatureButton.vue +25 -26
- package/dist/vue/Icons/AlertTriangleIcon.vue +30 -0
- package/dist/vue/Icons/CalendarIcon.vue +30 -0
- package/dist/vue/Icons/CheckCircleIcon.vue +30 -0
- package/dist/vue/Icons/CheckIcon.vue +30 -0
- package/dist/vue/Icons/ChevronDownIcon.vue +30 -0
- package/dist/vue/Icons/ClipboardIcon.vue +30 -0
- package/dist/vue/Icons/CloseIcon.vue +30 -0
- package/dist/vue/Icons/InfoCircleIcon.vue +30 -0
- package/dist/vue/Icons/InfoIcon.vue +30 -0
- package/dist/vue/Icons/LinkIcon.vue +30 -0
- package/dist/vue/Icons/MenuIcon.vue +30 -0
- package/dist/vue/Icons/SearchIcon.vue +30 -0
- package/dist/vue/Icons/SettingsIcon.vue +30 -0
- package/dist/vue/Icons/UserIcon.vue +30 -0
- package/dist/vue/Icons/VueIcon.vue +76 -0
- package/dist/vue/Icons/XCircleIcon.vue +30 -0
- package/dist/vue/MacWindow/Basic.vue +11 -0
- package/dist/vue/MacWindow/CustomHeight.vue +13 -0
- package/dist/vue/{MacWindow.vue → MacWindow/MacWindow.vue} +73 -38
- package/dist/vue/MacWindow/WithEvents.vue +34 -0
- package/dist/vue/MacWindow/WithSidebar.vue +21 -0
- package/dist/vue/MacWindow/WithTabs.vue +21 -0
- package/dist/vue/MacWindow/WithToolbar.vue +43 -0
- package/dist/vue/MacWindow/index.ts +50 -0
- package/dist/vue/SmartHero.vue +28 -34
- package/dist/vue/VueCounter.vue +29 -0
- package/dist/vue/iPhone/Basic.vue +33 -0
- package/dist/vue/iPhone/CustomBackground.vue +33 -0
- package/dist/vue/iPhone/NoFrame.vue +33 -0
- package/dist/vue/iPhone/WeatherApp.vue +97 -0
- package/dist/vue/iPhone/assets/iPhone 14 Pro - Deep Purple - Landscape.png +0 -0
- package/dist/vue/iPhone/assets/iPhone 14 Pro - Deep Purple - Portrait.png +0 -0
- package/dist/vue/iPhone/assets/iPhone 14 Pro - Gold - Landscape.png +0 -0
- package/dist/vue/iPhone/assets/iPhone 14 Pro - Gold - Portrait.png +0 -0
- package/dist/vue/iPhone/assets/iPhone 14 Pro - Silver - Landscape.png +0 -0
- package/dist/vue/iPhone/assets/iPhone 14 Pro - Silver - Portrait.png +0 -0
- package/dist/vue/iPhone/assets/iPhone 14 Pro - Space Black - Landscape.png +0 -0
- package/dist/vue/iPhone/assets/iPhone 14 Pro - Space Black - Portrait.png +0 -0
- package/dist/vue/{iPhoneWindow.vue → iPhone/iPhoneWindow.vue} +14 -7
- package/dist/vue/iPhone/index.ts +41 -0
- package/dist/vue/shims-vue.d.ts +5 -0
- package/package.json +13 -12
- package/dist/components/icons/AlertTriangle.astro +0 -35
- package/dist/components/icons/CalendarIcon.astro +0 -38
- package/dist/components/icons/CheckCircle.astro +0 -36
- package/dist/components/icons/CheckIcon.astro +0 -38
- package/dist/components/icons/ClipboardIcon.astro +0 -39
- package/dist/components/icons/CloseIcon.astro +0 -38
- package/dist/components/icons/ErrorIcon.astro +0 -35
- package/dist/components/icons/GithubIcon.astro +0 -31
- package/dist/components/icons/InfoCircle.astro +0 -37
- package/dist/components/icons/InfoIcon.astro +0 -38
- package/dist/components/icons/LinkIcon.astro +0 -39
- package/dist/components/icons/LinkedinIcon.astro +0 -31
- package/dist/components/icons/MenuIcon.astro +0 -38
- package/dist/components/icons/SearchIcon.astro +0 -36
- package/dist/components/icons/SettingsIcon.astro +0 -36
- package/dist/components/icons/SuccessIcon.astro +0 -35
- package/dist/components/icons/SunCloudyIcon.astro +0 -41
- package/dist/components/icons/TwitterIcon.astro +0 -31
- package/dist/components/icons/UserIcon.astro +0 -35
- package/dist/components/icons/WarningIcon.astro +0 -38
- package/dist/components/icons/XCircle.astro +0 -37
- package/dist/entities/Banner.ts +0 -105
- package/dist/icons.ts +0 -22
- package/dist/vue/BannerBox.vue +0 -267
- package/dist/vue/FeatureGroup.vue +0 -22
- package/dist/vue/SmartBanner.vue +0 -45
- package/dist/vue/WildBanner.vue +0 -15
- package/dist/vue.ts +0 -14
- /package/dist/{collection.ts → index_collection.ts} +0 -0
@@ -146,12 +146,9 @@
|
|
146
146
|
*/
|
147
147
|
|
148
148
|
import { processSocialLink } from '../../utils/social';
|
149
|
-
import SocialIcon from '
|
150
|
-
import type { IFooterProps } from '../../types/footer';
|
151
|
-
import { createTextGetter } from '../../utils/i18n';
|
149
|
+
import { SocialIcon, LanguageUtil, type IFooterProps, createTextGetter } from '../../index';
|
152
150
|
import NavSection from './NavSection.astro';
|
153
|
-
import
|
154
|
-
import '../../app.css';
|
151
|
+
import '../../style.ts';
|
155
152
|
|
156
153
|
const {
|
157
154
|
siteName,
|
@@ -21,11 +21,11 @@
|
|
21
21
|
* ```
|
22
22
|
*/
|
23
23
|
|
24
|
-
import '../../
|
24
|
+
import '../../style.ts';
|
25
25
|
import { isPathMatch } from '../../utils/path';
|
26
26
|
import Modal from '../display/Modal.astro';
|
27
27
|
import SidebarNav from './SidebarNav.astro';
|
28
|
-
import MenuIcon from '
|
28
|
+
import { MenuIcon } from '../../index';
|
29
29
|
import type { ISidebarProps } from '../../index';
|
30
30
|
|
31
31
|
export interface Props extends ISidebarProps {}
|
@@ -1,18 +1,18 @@
|
|
1
1
|
---
|
2
2
|
/**
|
3
3
|
* @component Stack
|
4
|
-
*
|
4
|
+
*
|
5
5
|
* @description
|
6
6
|
* Stack 组件是一个垂直堆叠布局组件,用于垂直排列元素并控制它们之间的间距。
|
7
7
|
* 它提供了灵活的间距控制、对齐方式和分隔线选项,使垂直布局更加简单。
|
8
|
-
*
|
8
|
+
*
|
9
9
|
* @design
|
10
10
|
* 设计理念:
|
11
11
|
* 1. 简化布局 - 提供简单直观的方式创建垂直堆叠布局
|
12
12
|
* 2. 一致性 - 通过预设的间距选项确保布局一致性
|
13
13
|
* 3. 灵活性 - 支持多种对齐方式和分隔线选项
|
14
14
|
* 4. 可组合性 - 可以与其他布局组件组合使用
|
15
|
-
*
|
15
|
+
*
|
16
16
|
* @usage
|
17
17
|
* 基本用法:
|
18
18
|
* ```astro
|
@@ -22,7 +22,7 @@
|
|
22
22
|
* <div>第三个元素</div>
|
23
23
|
* </Stack>
|
24
24
|
* ```
|
25
|
-
*
|
25
|
+
*
|
26
26
|
* 自定义间距:
|
27
27
|
* ```astro
|
28
28
|
* <Stack gap="lg">
|
@@ -30,7 +30,7 @@
|
|
30
30
|
* <div>垂直排列</div>
|
31
31
|
* </Stack>
|
32
32
|
* ```
|
33
|
-
*
|
33
|
+
*
|
34
34
|
* 带分隔线:
|
35
35
|
* ```astro
|
36
36
|
* <Stack dividers={true} dividerColor="primary">
|
@@ -38,7 +38,7 @@
|
|
38
38
|
* <div>使用主题色</div>
|
39
39
|
* </Stack>
|
40
40
|
* ```
|
41
|
-
*
|
41
|
+
*
|
42
42
|
* 自定义对齐:
|
43
43
|
* ```astro
|
44
44
|
* <Stack align="center">
|
@@ -49,7 +49,7 @@
|
|
49
49
|
*/
|
50
50
|
|
51
51
|
// 导入样式
|
52
|
-
import '../../
|
52
|
+
import '../../style.ts';
|
53
53
|
|
54
54
|
// 定义间距类型
|
55
55
|
type GapSize = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
@@ -61,89 +61,91 @@ type AlignType = 'start' | 'center' | 'end' | 'stretch';
|
|
61
61
|
type DividerColor = 'gray' | 'light' | 'dark' | 'primary';
|
62
62
|
|
63
63
|
interface Props {
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
64
|
+
/**
|
65
|
+
* 元素间距
|
66
|
+
* @default "md"
|
67
|
+
*/
|
68
|
+
gap?: GapSize;
|
69
|
+
|
70
|
+
/**
|
71
|
+
* 是否显示分隔线
|
72
|
+
* @default false
|
73
|
+
*/
|
74
|
+
dividers?: boolean;
|
75
|
+
|
76
|
+
/**
|
77
|
+
* 分隔线颜色
|
78
|
+
* @default "gray"
|
79
|
+
*/
|
80
|
+
dividerColor?: DividerColor;
|
81
|
+
|
82
|
+
/**
|
83
|
+
* 对齐方式
|
84
|
+
* @default "stretch"
|
85
|
+
*/
|
86
|
+
align?: AlignType;
|
87
|
+
|
88
|
+
/**
|
89
|
+
* 自定义类名
|
90
|
+
*/
|
91
|
+
class?: string;
|
92
|
+
|
93
|
+
/**
|
94
|
+
* 类名列表
|
95
|
+
*/
|
96
|
+
'class:list'?: any;
|
97
|
+
|
98
|
+
[key: string]: any;
|
99
99
|
}
|
100
100
|
|
101
101
|
const {
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
102
|
+
gap = 'md',
|
103
|
+
dividers = false,
|
104
|
+
dividerColor = 'gray',
|
105
|
+
align = 'stretch',
|
106
|
+
class: className = '',
|
107
|
+
'class:list': classList,
|
108
|
+
...rest
|
109
109
|
} = Astro.props;
|
110
110
|
|
111
111
|
// 间距映射
|
112
112
|
const gapClasses: Record<GapSize, string> = {
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
113
|
+
none: 'stack-gap-none',
|
114
|
+
xs: 'stack-gap-xs',
|
115
|
+
sm: 'stack-gap-sm',
|
116
|
+
md: 'stack-gap-md',
|
117
|
+
lg: 'stack-gap-lg',
|
118
|
+
xl: 'stack-gap-xl',
|
119
119
|
};
|
120
120
|
|
121
121
|
// 对齐方式映射
|
122
122
|
const alignClasses: Record<AlignType, string> = {
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
123
|
+
start: 'stack-align-start',
|
124
|
+
center: 'stack-align-center',
|
125
|
+
end: 'stack-align-end',
|
126
|
+
stretch: 'stack-align-stretch',
|
127
127
|
};
|
128
128
|
|
129
129
|
// 分隔线颜色映射
|
130
130
|
const dividerColorClasses: Record<DividerColor, string> = {
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
131
|
+
gray: 'stack-divider-gray',
|
132
|
+
light: 'stack-divider-light',
|
133
|
+
dark: 'stack-divider-dark',
|
134
|
+
primary: 'stack-divider-primary',
|
135
135
|
};
|
136
136
|
|
137
137
|
// 构建最终类名
|
138
138
|
const stackClasses = [
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
]
|
139
|
+
'stack',
|
140
|
+
alignClasses[align as AlignType],
|
141
|
+
gapClasses[gap as GapSize],
|
142
|
+
dividers ? `stack-divider ${dividerColorClasses[dividerColor as DividerColor]}` : '',
|
143
|
+
className,
|
144
|
+
]
|
145
|
+
.filter(Boolean)
|
146
|
+
.join(' ');
|
145
147
|
---
|
146
148
|
|
147
149
|
<div class:list={[stackClasses, classList]} {...rest}>
|
148
|
-
|
150
|
+
<slot />
|
149
151
|
</div>
|
@@ -27,8 +27,8 @@
|
|
27
27
|
* ```
|
28
28
|
*/
|
29
29
|
|
30
|
-
import ChevronDownIcon from '
|
31
|
-
import '../../
|
30
|
+
import { ChevronDownIcon } from '../../index';
|
31
|
+
import '../../style.ts';
|
32
32
|
import { LanguageUtil } from '../../utils/language';
|
33
33
|
|
34
34
|
interface Props {
|
@@ -26,8 +26,8 @@
|
|
26
26
|
*/
|
27
27
|
|
28
28
|
import Button from '../base/Button.astro';
|
29
|
-
import SunCloudyIcon from '
|
30
|
-
import '../../
|
29
|
+
import SunCloudyIcon from '../../icons/SunCloudyIcon.astro';
|
30
|
+
import '../../style.ts';
|
31
31
|
|
32
32
|
interface Props {
|
33
33
|
/**
|
@@ -104,8 +104,8 @@
|
|
104
104
|
*/
|
105
105
|
|
106
106
|
// 导入样式
|
107
|
-
import '../../
|
108
|
-
import type { IArticleProps } from '
|
107
|
+
import '../../style.ts';
|
108
|
+
import type { IArticleProps } from '../../types/article';
|
109
109
|
|
110
110
|
export interface Props extends IArticleProps {}
|
111
111
|
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
import AstroIcon from './AstroIcon.astro';
|
3
|
+
|
4
|
+
interface Props {
|
5
|
+
/**
|
6
|
+
* 图标的大小
|
7
|
+
* @default "24px"
|
8
|
+
*/
|
9
|
+
size?: string;
|
10
|
+
/**
|
11
|
+
* 图标的颜色
|
12
|
+
* @default "currentColor"
|
13
|
+
*/
|
14
|
+
color?: string;
|
15
|
+
/**
|
16
|
+
* 自定义类名
|
17
|
+
*/
|
18
|
+
class?: string;
|
19
|
+
}
|
20
|
+
|
21
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
22
|
+
---
|
23
|
+
|
24
|
+
<AstroIcon name="alertTriangle" size={size} color={color} class={className} />
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
import { iconData } from '../assets/iconData';
|
3
|
+
|
4
|
+
interface Props {
|
5
|
+
/**
|
6
|
+
* 图标名称,必须在iconData中存在
|
7
|
+
*/
|
8
|
+
name: string;
|
9
|
+
/**
|
10
|
+
* 图标的大小
|
11
|
+
* @default "24px"
|
12
|
+
*/
|
13
|
+
size?: string;
|
14
|
+
/**
|
15
|
+
* 图标的颜色
|
16
|
+
* @default "currentColor"
|
17
|
+
*/
|
18
|
+
color?: string;
|
19
|
+
/**
|
20
|
+
* 自定义类名
|
21
|
+
*/
|
22
|
+
class?: string;
|
23
|
+
}
|
24
|
+
|
25
|
+
const { name, size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
26
|
+
const icon = iconData[name];
|
27
|
+
const viewBox = icon?.viewBox || '0 0 24 24';
|
28
|
+
---
|
29
|
+
|
30
|
+
{
|
31
|
+
icon && (
|
32
|
+
<svg
|
33
|
+
xmlns="http://www.w3.org/2000/svg"
|
34
|
+
width={size}
|
35
|
+
height={size}
|
36
|
+
viewBox={viewBox}
|
37
|
+
fill="none"
|
38
|
+
stroke={color}
|
39
|
+
stroke-width="2"
|
40
|
+
stroke-linecap="round"
|
41
|
+
stroke-linejoin="round"
|
42
|
+
class={className}>
|
43
|
+
<path d={icon.path} />
|
44
|
+
</svg>
|
45
|
+
)
|
46
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
import AstroIcon from './AstroIcon.astro';
|
3
|
+
|
4
|
+
interface Props {
|
5
|
+
/**
|
6
|
+
* 图标的大小
|
7
|
+
* @default "24px"
|
8
|
+
*/
|
9
|
+
size?: string;
|
10
|
+
/**
|
11
|
+
* 图标的颜色
|
12
|
+
* @default "currentColor"
|
13
|
+
*/
|
14
|
+
color?: string;
|
15
|
+
/**
|
16
|
+
* 自定义类名
|
17
|
+
*/
|
18
|
+
class?: string;
|
19
|
+
}
|
20
|
+
|
21
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
22
|
+
---
|
23
|
+
|
24
|
+
<AstroIcon name="calendar" size={size} color={color} class={className} />
|
@@ -0,0 +1,23 @@
|
|
1
|
+
---
|
2
|
+
import AstroIcon from './AstroIcon.astro';
|
3
|
+
interface Props {
|
4
|
+
/**
|
5
|
+
* 图标的大小
|
6
|
+
* @default "24px"
|
7
|
+
*/
|
8
|
+
size?: string;
|
9
|
+
/**
|
10
|
+
* 图标的颜色
|
11
|
+
* @default "currentColor"
|
12
|
+
*/
|
13
|
+
color?: string;
|
14
|
+
/**
|
15
|
+
* 自定义类名
|
16
|
+
*/
|
17
|
+
class?: string;
|
18
|
+
}
|
19
|
+
|
20
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
21
|
+
---
|
22
|
+
|
23
|
+
<AstroIcon name="checkCircle" size={size} color={color} class={className} />
|
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
import AstroIcon from './AstroIcon.astro';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* 检查图标组件
|
6
|
+
*/
|
7
|
+
interface Props {
|
8
|
+
/**
|
9
|
+
* 图标的大小
|
10
|
+
* @default "24px"
|
11
|
+
*/
|
12
|
+
size?: string;
|
13
|
+
/**
|
14
|
+
* 图标的颜色
|
15
|
+
* @default "currentColor"
|
16
|
+
*/
|
17
|
+
color?: string;
|
18
|
+
/**
|
19
|
+
* 自定义类名
|
20
|
+
*/
|
21
|
+
class?: string;
|
22
|
+
}
|
23
|
+
|
24
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
25
|
+
---
|
26
|
+
|
27
|
+
<AstroIcon name="check" size={size} color={color} class={className} />
|
@@ -1,4 +1,6 @@
|
|
1
1
|
---
|
2
|
+
import AstroIcon from './AstroIcon.astro';
|
3
|
+
|
2
4
|
interface Props {
|
3
5
|
/**
|
4
6
|
* 图标的大小
|
@@ -19,16 +21,4 @@ interface Props {
|
|
19
21
|
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
20
22
|
---
|
21
23
|
|
22
|
-
<
|
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
|
-
<path d="M19 9l-7 7-7-7"></path>
|
34
|
-
</svg>
|
24
|
+
<AstroIcon name="chevronDown" size={size} color={color} class={className} />
|
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
import AstroIcon from './AstroIcon.astro';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* 剪贴板图标组件
|
6
|
+
*/
|
7
|
+
interface Props {
|
8
|
+
/**
|
9
|
+
* 图标的大小
|
10
|
+
* @default "24px"
|
11
|
+
*/
|
12
|
+
size?: string;
|
13
|
+
/**
|
14
|
+
* 图标的颜色
|
15
|
+
* @default "currentColor"
|
16
|
+
*/
|
17
|
+
color?: string;
|
18
|
+
/**
|
19
|
+
* 自定义类名
|
20
|
+
*/
|
21
|
+
class?: string;
|
22
|
+
}
|
23
|
+
|
24
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
25
|
+
---
|
26
|
+
|
27
|
+
<AstroIcon name="clipboard" size={size} color={color} class={className} />
|
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
import AstroIcon from './AstroIcon.astro';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* 关闭图标组件
|
6
|
+
*/
|
7
|
+
interface Props {
|
8
|
+
/**
|
9
|
+
* 图标的大小
|
10
|
+
* @default "16px"
|
11
|
+
*/
|
12
|
+
size?: string;
|
13
|
+
/**
|
14
|
+
* 图标的颜色
|
15
|
+
* @default "currentColor"
|
16
|
+
*/
|
17
|
+
color?: string;
|
18
|
+
/**
|
19
|
+
* 自定义类名
|
20
|
+
*/
|
21
|
+
class?: string;
|
22
|
+
}
|
23
|
+
|
24
|
+
const { size = '16px', color = 'currentColor', class: className = '' } = Astro.props;
|
25
|
+
---
|
26
|
+
|
27
|
+
<AstroIcon name="close" size={size} color={color} class={className} />
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
import AstroIcon from './AstroIcon.astro';
|
3
|
+
|
4
|
+
interface Props {
|
5
|
+
/**
|
6
|
+
* 图标的大小
|
7
|
+
* @default "24px"
|
8
|
+
*/
|
9
|
+
size?: string;
|
10
|
+
/**
|
11
|
+
* 图标的颜色
|
12
|
+
* @default "currentColor"
|
13
|
+
*/
|
14
|
+
color?: string;
|
15
|
+
/**
|
16
|
+
* 自定义类名
|
17
|
+
*/
|
18
|
+
class?: string;
|
19
|
+
}
|
20
|
+
|
21
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
22
|
+
---
|
23
|
+
|
24
|
+
<AstroIcon name="error" size={size} color={color} class={className} />
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
import AstroIcon from './AstroIcon.astro';
|
3
|
+
|
4
|
+
interface Props {
|
5
|
+
/**
|
6
|
+
* 图标的大小
|
7
|
+
* @default "24px"
|
8
|
+
*/
|
9
|
+
size?: string;
|
10
|
+
/**
|
11
|
+
* 图标的颜色
|
12
|
+
* @default "currentColor"
|
13
|
+
*/
|
14
|
+
color?: string;
|
15
|
+
/**
|
16
|
+
* 自定义类名
|
17
|
+
*/
|
18
|
+
class?: string;
|
19
|
+
}
|
20
|
+
|
21
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
22
|
+
---
|
23
|
+
|
24
|
+
<AstroIcon name="github" size={size} color={color} class={className} />
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
import AstroIcon from './AstroIcon.astro';
|
3
|
+
|
4
|
+
interface Props {
|
5
|
+
/**
|
6
|
+
* 图标的大小
|
7
|
+
* @default "24px"
|
8
|
+
*/
|
9
|
+
size?: string;
|
10
|
+
/**
|
11
|
+
* 图标的颜色
|
12
|
+
* @default "currentColor"
|
13
|
+
*/
|
14
|
+
color?: string;
|
15
|
+
/**
|
16
|
+
* 自定义类名
|
17
|
+
*/
|
18
|
+
class?: string;
|
19
|
+
}
|
20
|
+
|
21
|
+
const { size = '24px', color = 'currentColor', class: className = '' } = Astro.props;
|
22
|
+
---
|
23
|
+
|
24
|
+
<AstroIcon name="infoCircle" size={size} color={color} class={className} />
|