@coffic/cosy-ui 0.6.42 → 0.7.4

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.
Files changed (166) hide show
  1. package/dist/alert/{AlertBasicContainer.astro → EAlertBasicContainer.astro} +2 -2
  2. package/dist/alert/{AlertCustomStyleContainer.astro → EAlertCustomStyleContainer.astro} +2 -2
  3. package/dist/alert/{AlertTypesContainer.astro → EAlertTypesContainer.astro} +8 -8
  4. package/dist/alert/{AlertWithTitleContainer.astro → EAlertWithTitleContainer.astro} +2 -2
  5. package/dist/alert/index.ts +12 -12
  6. package/dist/app.css +1 -1
  7. package/dist/button/ButtonBasicContainer.astro +1 -7
  8. package/dist/button/ButtonLinkContainer.astro +1 -7
  9. package/dist/button/ButtonSizesContainer.astro +1 -7
  10. package/dist/button/ButtonVariantsContainer.astro +1 -8
  11. package/dist/button/ButtonWithIconsContainer.astro +2 -13
  12. package/dist/button/index_astro.ts +1 -3
  13. package/dist/buttons-vue/index.ts +1 -0
  14. package/dist/card/Card.astro +59 -10
  15. package/dist/card/ECardBasic.astro +11 -0
  16. package/dist/card/ECardBasicContainer.astro +11 -0
  17. package/dist/card/ECardClickable.astro +13 -0
  18. package/dist/card/ECardClickableContainer.astro +11 -0
  19. package/dist/card/ECardCompact.astro +13 -0
  20. package/dist/card/ECardCompactContainer.astro +11 -0
  21. package/dist/card/ECardCustomStyle.astro +17 -0
  22. package/dist/card/ECardCustomStyleContainer.astro +11 -0
  23. package/dist/card/ECardWithImage.astro +16 -0
  24. package/dist/card/ECardWithImageContainer.astro +11 -0
  25. package/dist/card/ECardWithSubtitle.astro +13 -0
  26. package/dist/card/ECardWithSubtitleContainer.astro +11 -0
  27. package/dist/card/index.ts +32 -6
  28. package/dist/code-container/CodeContainer.astro +2 -2
  29. package/dist/code-container/index.ts +7 -7
  30. package/dist/contact/Contact.astro +279 -0
  31. package/dist/contact/EContactBasic.astro +15 -0
  32. package/dist/contact/EContactBasicContainer.astro +12 -0
  33. package/dist/contact/EContactCompact.astro +12 -0
  34. package/dist/contact/EContactCompactContainer.astro +12 -0
  35. package/dist/contact/EContactCustomStyle.astro +22 -0
  36. package/dist/contact/EContactCustomStyleContainer.astro +12 -0
  37. package/dist/contact/EContactSocial.astro +21 -0
  38. package/dist/contact/EContactSocialContainer.astro +12 -0
  39. package/dist/contact/EContactWithTitle.astro +18 -0
  40. package/dist/contact/EContactWithTitleContainer.astro +12 -0
  41. package/dist/contact/index.ts +21 -0
  42. package/dist/container/EContainerBasic.astro +13 -0
  43. package/dist/container/EContainerBasicContainer.astro +11 -0
  44. package/dist/container/EContainerFlexBetween.astro +16 -0
  45. package/dist/container/EContainerFlexCenter.astro +23 -0
  46. package/dist/container/EContainerFlexColumn.astro +16 -0
  47. package/dist/container/EContainerFlexContainer.astro +34 -0
  48. package/dist/container/EContainerFlexRow.astro +16 -0
  49. package/dist/container/EContainerPadding.astro +32 -0
  50. package/dist/container/EContainerPaddingContainer.astro +11 -0
  51. package/dist/container/EContainerSizes.astro +36 -0
  52. package/dist/container/EContainerSizesContainer.astro +11 -0
  53. package/dist/container/index.ts +16 -1
  54. package/dist/counter-vue/index.ts +1 -0
  55. package/dist/footer/{FooterBasic.astro → EFooterBasic.astro} +7 -1
  56. package/dist/footer/EFooterBasicContainer.astro +11 -0
  57. package/dist/footer/EFooterComplete.astro +45 -0
  58. package/dist/footer/EFooterCompleteContainer.astro +11 -0
  59. package/dist/footer/EFooterFeaturesContainer.astro +40 -0
  60. package/dist/footer/EFooterWithLogo.astro +23 -0
  61. package/dist/footer/EFooterWithLogoContainer.astro +11 -0
  62. package/dist/footer/EFooterWithNavigation.astro +24 -0
  63. package/dist/footer/EFooterWithNavigationContainer.astro +11 -0
  64. package/dist/footer/EFooterWithProducts.astro +24 -0
  65. package/dist/footer/EFooterWithProductsContainer.astro +11 -0
  66. package/dist/footer/EFooterWithSocial.astro +24 -0
  67. package/dist/footer/EFooterWithSocialContainer.astro +11 -0
  68. package/dist/footer/FooterSection.astro +4 -2
  69. package/dist/footer/index.ts +24 -4
  70. package/dist/icons/index.ts +3 -0
  71. package/dist/icons-vue/index.ts +1 -0
  72. package/dist/index_astro.ts +43 -33
  73. package/dist/index_vue.ts +12 -23
  74. package/dist/list-vue/index.ts +1 -0
  75. package/dist/{vue/MacWindow → mac-window-vue}/MacWindow.vue +1 -1
  76. package/package.json +3 -10
  77. package/dist/button/ButtonFeatureContainer.astro +0 -18
  78. package/dist/button/index_vue.ts +0 -4
  79. package/dist/vue/SmartLink.vue +0 -17
  80. package/dist/vue/TagList.vue +0 -23
  81. /package/dist/alert/{AlertBasic.astro → EAlertBasic.astro} +0 -0
  82. /package/dist/alert/{AlertCustomStyle.astro → EAlertCustomStyle.astro} +0 -0
  83. /package/dist/alert/{AlertError.astro → EAlertError.astro} +0 -0
  84. /package/dist/alert/{AlertInfo.astro → EAlertInfo.astro} +0 -0
  85. /package/dist/alert/{AlertSuccess.astro → EAlertSuccess.astro} +0 -0
  86. /package/dist/alert/{AlertWarning.astro → EAlertWarning.astro} +0 -0
  87. /package/dist/alert/{AlertWithTitle.astro → EAlertWithTitle.astro} +0 -0
  88. /package/dist/{vue/AlertDialog → alert-dialog-vue}/AlertDialog.vue +0 -0
  89. /package/dist/{vue/AlertDialog → alert-dialog-vue}/Basic.vue +0 -0
  90. /package/dist/{vue/AlertDialog → alert-dialog-vue}/Multilang.vue +0 -0
  91. /package/dist/{vue/AlertDialog → alert-dialog-vue}/index.ts +0 -0
  92. /package/dist/{vue/BannerBox → banner-box-vue}/BannerBox.vue +0 -0
  93. /package/dist/{vue/BannerBox → banner-box-vue}/DownloadButton.vue +0 -0
  94. /package/dist/{vue/BannerBox → banner-box-vue}/ExampleBasic.vue +0 -0
  95. /package/dist/{vue/BannerBox → banner-box-vue}/ExampleCustomBg.vue +0 -0
  96. /package/dist/{vue/BannerBox → banner-box-vue}/ExampleDisplayModeAlways.vue +0 -0
  97. /package/dist/{vue/BannerBox → banner-box-vue}/ExampleDisplayModeHover.vue +0 -0
  98. /package/dist/{vue/BannerBox → banner-box-vue}/ExampleDisplayModeNever.vue +0 -0
  99. /package/dist/{vue/BannerBox → banner-box-vue}/ExampleImageExport.vue +0 -0
  100. /package/dist/{vue/BannerBox → banner-box-vue}/ExampleSizePreset.vue +0 -0
  101. /package/dist/{vue/BannerBox → banner-box-vue}/FeatureCard.vue +0 -0
  102. /package/dist/{vue/BannerBox → banner-box-vue}/SmartBanner.vue +0 -0
  103. /package/dist/{vue/BannerBox → banner-box-vue}/bgStyles.ts +0 -0
  104. /package/dist/{vue/BannerBox → banner-box-vue}/index.ts +0 -0
  105. /package/dist/{vue/BannerBox → banner-box-vue}/sizePresets.ts +0 -0
  106. /package/dist/{vue/BlogList → blog-vue}/Basic.vue +0 -0
  107. /package/dist/{vue/BlogList → blog-vue}/BlogList.vue +0 -0
  108. /package/dist/{vue/BlogList → blog-vue}/Empty.vue +0 -0
  109. /package/dist/{vue/BlogList → blog-vue}/EmptyEnglish.vue +0 -0
  110. /package/dist/{vue/BlogList → blog-vue}/English.vue +0 -0
  111. /package/dist/{vue/BlogList → blog-vue}/index.ts +0 -0
  112. /package/dist/{button → buttons-vue}/Button.vue +0 -0
  113. /package/dist/{button → buttons-vue}/ButtonBasic.vue +0 -0
  114. /package/dist/{button → buttons-vue}/ButtonFeature.vue +0 -0
  115. /package/dist/{button → buttons-vue}/ButtonFeatureBasic.vue +0 -0
  116. /package/dist/{button → buttons-vue}/ButtonFeatureWithTips.vue +0 -0
  117. /package/dist/{button → buttons-vue}/ButtonLink.vue +0 -0
  118. /package/dist/{button → buttons-vue}/ButtonSizes.vue +0 -0
  119. /package/dist/{button → buttons-vue}/ButtonVariants.vue +0 -0
  120. /package/dist/{button → buttons-vue}/ButtonWithIcons.vue +0 -0
  121. /package/dist/code-container/{CodeContainerBasic.astro → ECodeContainerBasic.astro} +0 -0
  122. /package/dist/code-container/{CodeContainerMultiple.astro → ECodeContainerMultiple.astro} +0 -0
  123. /package/dist/{vue/ConfirmDialog → confirm-dialog-vue}/Basic.vue +0 -0
  124. /package/dist/{vue/ConfirmDialog → confirm-dialog-vue}/ConfirmDialog.vue +0 -0
  125. /package/dist/{vue/ConfirmDialog → confirm-dialog-vue}/CustomButtons.vue +0 -0
  126. /package/dist/{vue/ConfirmDialog → confirm-dialog-vue}/index.ts +0 -0
  127. /package/dist/{vue → counter-vue}/VueCounter.vue +0 -0
  128. /package/dist/{vue/iPhone → iPhone-vue}/Basic.vue +0 -0
  129. /package/dist/{vue/iPhone → iPhone-vue}/CustomBackground.vue +0 -0
  130. /package/dist/{vue/iPhone → iPhone-vue}/NoFrame.vue +0 -0
  131. /package/dist/{vue/iPhone → iPhone-vue}/WeatherApp.vue +0 -0
  132. /package/dist/{vue/iPhone → iPhone-vue}/assets/iPhone 14 Pro - Deep Purple - Landscape.png +0 -0
  133. /package/dist/{vue/iPhone → iPhone-vue}/assets/iPhone 14 Pro - Deep Purple - Portrait.png +0 -0
  134. /package/dist/{vue/iPhone → iPhone-vue}/assets/iPhone 14 Pro - Gold - Landscape.png +0 -0
  135. /package/dist/{vue/iPhone → iPhone-vue}/assets/iPhone 14 Pro - Gold - Portrait.png +0 -0
  136. /package/dist/{vue/iPhone → iPhone-vue}/assets/iPhone 14 Pro - Silver - Landscape.png +0 -0
  137. /package/dist/{vue/iPhone → iPhone-vue}/assets/iPhone 14 Pro - Silver - Portrait.png +0 -0
  138. /package/dist/{vue/iPhone → iPhone-vue}/assets/iPhone 14 Pro - Space Black - Landscape.png +0 -0
  139. /package/dist/{vue/iPhone → iPhone-vue}/assets/iPhone 14 Pro - Space Black - Portrait.png +0 -0
  140. /package/dist/{vue/iPhone → iPhone-vue}/iPhoneWindow.vue +0 -0
  141. /package/dist/{vue/iPhone → iPhone-vue}/index.ts +0 -0
  142. /package/dist/{vue/Icons → icons-vue}/AlertTriangleIcon.vue +0 -0
  143. /package/dist/{vue/Icons → icons-vue}/CalendarIcon.vue +0 -0
  144. /package/dist/{vue/Icons → icons-vue}/CheckCircleIcon.vue +0 -0
  145. /package/dist/{vue/Icons → icons-vue}/CheckIcon.vue +0 -0
  146. /package/dist/{vue/Icons → icons-vue}/ChevronDownIcon.vue +0 -0
  147. /package/dist/{vue/Icons → icons-vue}/ClipboardIcon.vue +0 -0
  148. /package/dist/{vue/Icons → icons-vue}/CloseIcon.vue +0 -0
  149. /package/dist/{vue/Icons → icons-vue}/InboxArchiveIcon.vue +0 -0
  150. /package/dist/{vue/Icons → icons-vue}/InfoCircleIcon.vue +0 -0
  151. /package/dist/{vue/Icons → icons-vue}/InfoIcon.vue +0 -0
  152. /package/dist/{vue/Icons → icons-vue}/LinkIcon.vue +0 -0
  153. /package/dist/{vue/Icons → icons-vue}/MenuIcon.vue +0 -0
  154. /package/dist/{vue/Icons → icons-vue}/SearchIcon.vue +0 -0
  155. /package/dist/{vue/Icons → icons-vue}/SettingsIcon.vue +0 -0
  156. /package/dist/{vue/Icons → icons-vue}/UserIcon.vue +0 -0
  157. /package/dist/{vue/Icons → icons-vue}/VueIcon.vue +0 -0
  158. /package/dist/{vue/Icons → icons-vue}/XCircleIcon.vue +0 -0
  159. /package/dist/{vue → list-vue}/ListItem.vue +0 -0
  160. /package/dist/{vue/MacWindow → mac-window-vue}/Basic.vue +0 -0
  161. /package/dist/{vue/MacWindow → mac-window-vue}/CustomHeight.vue +0 -0
  162. /package/dist/{vue/MacWindow → mac-window-vue}/WithEvents.vue +0 -0
  163. /package/dist/{vue/MacWindow → mac-window-vue}/WithSidebar.vue +0 -0
  164. /package/dist/{vue/MacWindow → mac-window-vue}/WithTabs.vue +0 -0
  165. /package/dist/{vue/MacWindow → mac-window-vue}/WithToolbar.vue +0 -0
  166. /package/dist/{vue/MacWindow → mac-window-vue}/index.ts +0 -0
@@ -0,0 +1,279 @@
1
+ ---
2
+ /**
3
+ * @component Contact
4
+ *
5
+ * @description
6
+ * Contact 组件用于展示企业或个人的联系信息,支持多种联系方式(邮件、电话、地址)和社交媒体链接。
7
+ * 组件设计简洁专业,适合在企业网站的联系页面、页脚或关于我们页面中使用。
8
+ *
9
+ * @usage
10
+ * 基本用法:
11
+ * ```astro
12
+ * <Contact
13
+ * email="contact@company.com"
14
+ * phone="+1 (555) 123-4567"
15
+ * address="123 Business St, City, State 12345"
16
+ * />
17
+ * ```
18
+ *
19
+ * 带社交媒体链接:
20
+ * ```astro
21
+ * <Contact
22
+ * email="contact@company.com"
23
+ * phone="+1 (555) 123-4567"
24
+ * address="123 Business St, City, State 12345"
25
+ * github="https://github.com/company"
26
+ * twitter="https://twitter.com/company"
27
+ * facebook="https://facebook.com/company"
28
+ * />
29
+ * ```
30
+ *
31
+ * 带标题和描述:
32
+ * ```astro
33
+ * <Contact
34
+ * title="联系我们"
35
+ * description="欢迎随时与我们取得联系"
36
+ * email="contact@company.com"
37
+ * phone="+1 (555) 123-4567"
38
+ * />
39
+ * ```
40
+ *
41
+ * 紧凑模式:
42
+ * ```astro
43
+ * <Contact
44
+ * email="contact@company.com"
45
+ * phone="+1 (555) 123-4567"
46
+ * compact
47
+ * />
48
+ * ```
49
+ *
50
+ * @props
51
+ * @prop {string} [title] - 联系信息标题
52
+ * @prop {string} [description] - 联系信息描述
53
+ * @prop {string} [email] - 电子邮件地址
54
+ * @prop {string} [phone] - 电话号码
55
+ * @prop {string} [address] - 地址信息
56
+ * @prop {string} [website] - 网站链接
57
+ * @prop {string} [github] - GitHub链接
58
+ * @prop {string} [twitter] - Twitter链接
59
+ * @prop {string} [facebook] - Facebook链接
60
+ * @prop {string} [linkedin] - LinkedIn链接
61
+ * @prop {boolean} [compact] - 是否使用紧凑模式
62
+ * @prop {string} [class] - 自定义CSS类,可用于覆盖默认样式
63
+ *
64
+ * @slots
65
+ * @slot default - 额外的联系信息内容
66
+ */
67
+
68
+ import '../style.ts';
69
+
70
+ interface Props {
71
+ title?: string;
72
+ description?: string;
73
+ email?: string;
74
+ phone?: string;
75
+ address?: string;
76
+ website?: string;
77
+ github?: string;
78
+ twitter?: string;
79
+ facebook?: string;
80
+ linkedin?: string;
81
+ compact?: boolean;
82
+ class?: string;
83
+ }
84
+
85
+ const {
86
+ title,
87
+ description,
88
+ email,
89
+ phone,
90
+ address,
91
+ website,
92
+ github,
93
+ twitter,
94
+ facebook,
95
+ linkedin,
96
+ compact,
97
+ class: className = '',
98
+ } = Astro.props;
99
+
100
+ // 构建联系信息容器样式
101
+ const contactClasses = [
102
+ 'cosy:card',
103
+ 'cosy:w-full',
104
+ 'cosy:bg-base-100',
105
+ 'cosy:shadow-lg',
106
+ compact ? 'cosy:card-compact' : '',
107
+ className,
108
+ ]
109
+ .filter(Boolean)
110
+ .join(' ');
111
+
112
+ // 内容区域的padding
113
+ const contentPadding = compact ? 'cosy:p-4' : 'cosy:p-6';
114
+
115
+ // 联系信息项的样式
116
+ const contactItemClass = 'cosy:flex cosy:items-center cosy:gap-3 cosy:mb-4 last:cosy:mb-0';
117
+ const iconClass = 'cosy:w-5 cosy:h-5 cosy:text-primary cosy:flex-shrink-0';
118
+ const linkClass =
119
+ 'cosy:link cosy:link-hover cosy:text-base-content cosy:no-underline hover:cosy:text-primary cosy:transition-colors';
120
+
121
+ // 社交媒体链接样式
122
+ const socialLinksClass =
123
+ 'cosy:flex cosy:gap-4 cosy:mt-6 cosy:pt-4 cosy:border-t cosy:border-base-300';
124
+ const socialLinkClass =
125
+ 'cosy:btn cosy:btn-ghost cosy:btn-circle cosy:btn-sm cosy:text-base-content hover:cosy:text-primary hover:cosy:bg-primary/10';
126
+ ---
127
+
128
+ <div class={contactClasses}>
129
+ <div class={`cosy:card-body ${contentPadding}`}>
130
+ {title && <h2 class="cosy:card-title cosy:text-2xl cosy:font-bold cosy:mb-2">{title}</h2>}
131
+
132
+ {description && <p class="cosy:text-base-content/70 cosy:mb-6">{description}</p>}
133
+
134
+ <div class="cosy:space-y-0">
135
+ {
136
+ email && (
137
+ <div class={contactItemClass}>
138
+ <svg class={iconClass} fill="none" stroke="currentColor" viewBox="0 0 24 24">
139
+ <path
140
+ stroke-linecap="round"
141
+ stroke-linejoin="round"
142
+ stroke-width="2"
143
+ d="M3 8l7.89 4.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
144
+ />
145
+ </svg>
146
+ <a href={`mailto:${email}`} class={linkClass}>
147
+ {email}
148
+ </a>
149
+ </div>
150
+ )
151
+ }
152
+
153
+ {
154
+ phone && (
155
+ <div class={contactItemClass}>
156
+ <svg class={iconClass} fill="none" stroke="currentColor" viewBox="0 0 24 24">
157
+ <path
158
+ stroke-linecap="round"
159
+ stroke-linejoin="round"
160
+ stroke-width="2"
161
+ d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"
162
+ />
163
+ </svg>
164
+ <a href={`tel:${phone}`} class={linkClass}>
165
+ {phone}
166
+ </a>
167
+ </div>
168
+ )
169
+ }
170
+
171
+ {
172
+ address && (
173
+ <div class={contactItemClass}>
174
+ <svg class={iconClass} fill="none" stroke="currentColor" viewBox="0 0 24 24">
175
+ <path
176
+ stroke-linecap="round"
177
+ stroke-linejoin="round"
178
+ stroke-width="2"
179
+ d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
180
+ />
181
+ <path
182
+ stroke-linecap="round"
183
+ stroke-linejoin="round"
184
+ stroke-width="2"
185
+ d="M15 11a3 3 0 11-6 0 3 3 0 016 0z"
186
+ />
187
+ </svg>
188
+ <span class="cosy:text-base-content">{address}</span>
189
+ </div>
190
+ )
191
+ }
192
+
193
+ {
194
+ website && (
195
+ <div class={contactItemClass}>
196
+ <svg class={iconClass} fill="none" stroke="currentColor" viewBox="0 0 24 24">
197
+ <path
198
+ stroke-linecap="round"
199
+ stroke-linejoin="round"
200
+ stroke-width="2"
201
+ d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"
202
+ />
203
+ </svg>
204
+ <a href={website} target="_blank" rel="noopener noreferrer" class={linkClass}>
205
+ {website.replace(/^https?:\/\//, '')}
206
+ </a>
207
+ </div>
208
+ )
209
+ }
210
+ </div>
211
+
212
+ {
213
+ Astro.slots.has('default') && (
214
+ <div class="cosy:mt-4">
215
+ <slot />
216
+ </div>
217
+ )
218
+ }
219
+
220
+ {
221
+ (github || twitter || facebook || linkedin) && (
222
+ <div class={socialLinksClass}>
223
+ {github && (
224
+ <a
225
+ href={github}
226
+ target="_blank"
227
+ rel="noopener noreferrer"
228
+ class={socialLinkClass}
229
+ title="GitHub">
230
+ <svg class="cosy:w-5 cosy:h-5" fill="currentColor" viewBox="0 0 24 24">
231
+ <path d="M12 0c-6.626 0-12 5.373-12 12 0 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.23.957-.266 1.983-.399 3.003-.404 1.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.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
232
+ </svg>
233
+ </a>
234
+ )}
235
+
236
+ {twitter && (
237
+ <a
238
+ href={twitter}
239
+ target="_blank"
240
+ rel="noopener noreferrer"
241
+ class={socialLinkClass}
242
+ title="Twitter">
243
+ <svg class="cosy:w-5 cosy:h-5" fill="currentColor" viewBox="0 0 24 24">
244
+ <path d="M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z" />
245
+ </svg>
246
+ </a>
247
+ )}
248
+
249
+ {facebook && (
250
+ <a
251
+ href={facebook}
252
+ target="_blank"
253
+ rel="noopener noreferrer"
254
+ class={socialLinkClass}
255
+ title="Facebook">
256
+ <svg class="cosy:w-5 cosy:h-5" fill="currentColor" viewBox="0 0 24 24">
257
+ <path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" />
258
+ </svg>
259
+ </a>
260
+ )}
261
+
262
+ {linkedin && (
263
+ <a
264
+ href={linkedin}
265
+ target="_blank"
266
+ rel="noopener noreferrer"
267
+ class={socialLinkClass}
268
+ title="LinkedIn">
269
+ <svg class="cosy:w-5 cosy:h-5" fill="currentColor" viewBox="0 0 24 24">
270
+ <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" />
271
+ </svg>
272
+ </a>
273
+ )}
274
+ </div>
275
+ )
276
+ }
277
+ </div>
278
+ </div>
279
+
@@ -0,0 +1,15 @@
1
+ ---
2
+ /**
3
+ * @component Contact.Basic
4
+ *
5
+ * @description
6
+ * 基础Contact组件示例,展示最简单的联系信息用法。
7
+ */
8
+ import Contact from './Contact.astro';
9
+ ---
10
+
11
+ <Contact
12
+ email="contact@company.com"
13
+ phone="+1 (555) 123-4567"
14
+ address="123 Business St, City, State 12345"
15
+ />
@@ -0,0 +1,12 @@
1
+ ---
2
+ import { CodeContainer } from '../index';
3
+ import ContactBasic from './EContactBasic.astro';
4
+ import ContactBasicSourceCode from './EContactBasic.astro?raw';
5
+ ---
6
+
7
+ <CodeContainer codes={[ContactBasicSourceCode]}>
8
+ <div id="tab-1">
9
+ <ContactBasic />
10
+ </div>
11
+ </CodeContainer>
12
+
@@ -0,0 +1,12 @@
1
+ ---
2
+ /**
3
+ * @component Contact.Compact
4
+ *
5
+ * @description
6
+ * 紧凑模式的Contact组件示例。
7
+ */
8
+ import Contact from './Contact.astro';
9
+ ---
10
+
11
+ <Contact email="contact@company.com" phone="+1 (555) 123-4567" compact />
12
+
@@ -0,0 +1,12 @@
1
+ ---
2
+ import { CodeContainer } from '../index';
3
+ import ContactCompact from './EContactCompact.astro';
4
+ import ContactCompactSourceCode from './EContactCompact.astro?raw';
5
+ ---
6
+
7
+ <CodeContainer codes={[ContactCompactSourceCode]}>
8
+ <div id="tab-1">
9
+ <ContactCompact />
10
+ </div>
11
+ </CodeContainer>
12
+
@@ -0,0 +1,22 @@
1
+ ---
2
+ /**
3
+ * @component Contact.CustomStyle
4
+ *
5
+ * @description
6
+ * 展示如何使用class属性自定义Contact组件的样式。
7
+ */
8
+ import '../style.ts';
9
+ import Contact from './Contact.astro';
10
+ ---
11
+
12
+ <Contact
13
+ title="联系我们"
14
+ description="自定义样式的联系信息卡片"
15
+ email="contact@company.com"
16
+ phone="+1 (555) 123-4567"
17
+ address="123 Business St, City, State 12345"
18
+ github="https://github.com/company"
19
+ twitter="https://twitter.com/company"
20
+ class="cosy:bg-gradient-to-br cosy:from-blue-50 cosy:to-purple-50 cosy:border-2 cosy:border-blue-200 cosy:shadow-2xl"
21
+ />
22
+
@@ -0,0 +1,12 @@
1
+ ---
2
+ import { CodeContainer } from '../index';
3
+ import ContactCustomStyle from './EContactCustomStyle.astro';
4
+ import ContactCustomStyleSourceCode from './EContactCustomStyle.astro?raw';
5
+ ---
6
+
7
+ <CodeContainer codes={[ContactCustomStyleSourceCode]}>
8
+ <div id="tab-1">
9
+ <ContactCustomStyle />
10
+ </div>
11
+ </CodeContainer>
12
+
@@ -0,0 +1,21 @@
1
+ ---
2
+ /**
3
+ * @component Contact.Social
4
+ *
5
+ * @description
6
+ * 带社交媒体链接的Contact组件示例。
7
+ */
8
+ import Contact from './Contact.astro';
9
+ ---
10
+
11
+ <Contact
12
+ title="联系我们"
13
+ email="contact@company.com"
14
+ phone="+1 (555) 123-4567"
15
+ website="https://www.company.com"
16
+ github="https://github.com/company"
17
+ twitter="https://twitter.com/company"
18
+ facebook="https://facebook.com/company"
19
+ linkedin="https://linkedin.com/company/company"
20
+ />
21
+
@@ -0,0 +1,12 @@
1
+ ---
2
+ import { CodeContainer } from '../index';
3
+ import ContactSocial from './EContactSocial.astro';
4
+ import ContactSocialSourceCode from './EContactSocial.astro?raw';
5
+ ---
6
+
7
+ <CodeContainer codes={[ContactSocialSourceCode]}>
8
+ <div id="tab-1">
9
+ <ContactSocial />
10
+ </div>
11
+ </CodeContainer>
12
+
@@ -0,0 +1,18 @@
1
+ ---
2
+ /**
3
+ * @component Contact.WithTitle
4
+ *
5
+ * @description
6
+ * 带标题和描述的Contact组件示例。
7
+ */
8
+ import Contact from './Contact.astro';
9
+ ---
10
+
11
+ <Contact
12
+ title="联系我们"
13
+ description="欢迎随时与我们取得联系,我们将尽快回复您"
14
+ email="contact@company.com"
15
+ phone="+1 (555) 123-4567"
16
+ address="123 Business St, City, State 12345"
17
+ />
18
+
@@ -0,0 +1,12 @@
1
+ ---
2
+ import { CodeContainer } from '../index';
3
+ import ContactWithTitle from './EContactWithTitle.astro';
4
+ import ContactWithTitleSourceCode from './EContactWithTitle.astro?raw';
5
+ ---
6
+
7
+ <CodeContainer codes={[ContactWithTitleSourceCode]}>
8
+ <div id="tab-1">
9
+ <ContactWithTitle />
10
+ </div>
11
+ </CodeContainer>
12
+
@@ -0,0 +1,21 @@
1
+ import Contact from './Contact.astro';
2
+
3
+ // Container components
4
+ import ContactBasicContainer from './EContactBasicContainer.astro';
5
+ import ContactWithTitleContainer from './EContactWithTitleContainer.astro';
6
+ import ContactSocialContainer from './EContactSocialContainer.astro';
7
+ import ContactCompactContainer from './EContactCompactContainer.astro';
8
+ import ContactCustomStyleContainer from './EContactCustomStyleContainer.astro';
9
+
10
+ export { Contact };
11
+
12
+ export const ContactPackage = {
13
+ Contact,
14
+ ContactContainers: {
15
+ Basic: ContactBasicContainer,
16
+ WithTitle: ContactWithTitleContainer,
17
+ Social: ContactSocialContainer,
18
+ Compact: ContactCompactContainer,
19
+ CustomStyle: ContactCustomStyleContainer,
20
+ },
21
+ };
@@ -0,0 +1,13 @@
1
+ ---
2
+ /**
3
+ * @component Container.Basic
4
+ *
5
+ * @description
6
+ * 基础Container组件示例,展示最简单的容器用法。
7
+ */
8
+ import { Container } from '../index';
9
+ ---
10
+
11
+ <Container>
12
+ <p class="cosy:text-center">这是一个基础容器,内容会被限制在一个合理的宽度内并居中显示</p>
13
+ </Container>
@@ -0,0 +1,11 @@
1
+ ---
2
+ import { CodeContainer } from '../index';
3
+ import ContainerBasic from './EContainerBasic.astro';
4
+ import ContainerBasicSourceCode from './EContainerBasic.astro?raw';
5
+ ---
6
+
7
+ <CodeContainer codes={[ContainerBasicSourceCode]}>
8
+ <div id="tab-1">
9
+ <ContainerBasic />
10
+ </div>
11
+ </CodeContainer>
@@ -0,0 +1,16 @@
1
+ ---
2
+ /**
3
+ * @component Container.FlexBetween
4
+ *
5
+ * @description
6
+ * 展示Container组件的两端对齐(justify="between")布局功能。
7
+ */
8
+ import '../style.ts';
9
+ import { Container } from '../index';
10
+ ---
11
+
12
+ <Container flex="row" justify="between" border padding="md">
13
+ <div class="cosy:bg-primary cosy:text-primary-content cosy:p-4 cosy:rounded">左侧</div>
14
+ <div class="cosy:bg-secondary cosy:text-secondary-content cosy:p-4 cosy:rounded">中间</div>
15
+ <div class="cosy:bg-accent cosy:text-accent-content cosy:p-4 cosy:rounded">右侧</div>
16
+ </Container>
@@ -0,0 +1,23 @@
1
+ ---
2
+ /**
3
+ * @component Container.FlexCenter
4
+ *
5
+ * @description
6
+ * 展示Container组件的居中对齐(items="center" justify="center")布局功能。
7
+ */
8
+ import '../style.ts';
9
+ import { Container } from '../index';
10
+ ---
11
+
12
+ <Container
13
+ flex="row"
14
+ gap="md"
15
+ items="center"
16
+ justify="center"
17
+ border
18
+ padding="md"
19
+ class="cosy:h-32">
20
+ <div class="cosy:bg-primary cosy:text-primary-content cosy:p-4 cosy:rounded">居中项</div>
21
+ <div class="cosy:bg-secondary cosy:text-secondary-content cosy:p-6 cosy:rounded">较大项</div>
22
+ <div class="cosy:bg-accent cosy:text-accent-content cosy:p-2 cosy:rounded">较小项</div>
23
+ </Container>
@@ -0,0 +1,16 @@
1
+ ---
2
+ /**
3
+ * @component Container.FlexColumn
4
+ *
5
+ * @description
6
+ * 展示Container组件的列排列(flex="col")布局功能。
7
+ */
8
+ import '../style.ts';
9
+ import { Container } from '../index';
10
+ ---
11
+
12
+ <Container flex="col" gap="md" border padding="md">
13
+ <div class="cosy:bg-primary cosy:text-primary-content cosy:p-4 cosy:rounded">第一项</div>
14
+ <div class="cosy:bg-secondary cosy:text-secondary-content cosy:p-4 cosy:rounded">第二项</div>
15
+ <div class="cosy:bg-accent cosy:text-accent-content cosy:p-4 cosy:rounded">第三项</div>
16
+ </Container>
@@ -0,0 +1,34 @@
1
+ ---
2
+ import { CodeContainer } from '../index';
3
+ import ContainerFlexRow from './EContainerFlexRow.astro';
4
+ import ContainerFlexColumn from './EContainerFlexColumn.astro';
5
+ import ContainerFlexCenter from './EContainerFlexCenter.astro';
6
+ import ContainerFlexBetween from './EContainerFlexBetween.astro';
7
+
8
+ import ContainerFlexRowSourceCode from './EContainerFlexRow.astro?raw';
9
+ import ContainerFlexColumnSourceCode from './EContainerFlexColumn.astro?raw';
10
+ import ContainerFlexCenterSourceCode from './EContainerFlexCenter.astro?raw';
11
+ import ContainerFlexBetweenSourceCode from './EContainerFlexBetween.astro?raw';
12
+ ---
13
+
14
+ <CodeContainer
15
+ titles={['Row', 'Column', 'Center', 'Between']}
16
+ codes={[
17
+ ContainerFlexRowSourceCode,
18
+ ContainerFlexColumnSourceCode,
19
+ ContainerFlexCenterSourceCode,
20
+ ContainerFlexBetweenSourceCode,
21
+ ]}>
22
+ <div id="tab-1">
23
+ <ContainerFlexRow />
24
+ </div>
25
+ <div id="tab-2">
26
+ <ContainerFlexColumn />
27
+ </div>
28
+ <div id="tab-3">
29
+ <ContainerFlexCenter />
30
+ </div>
31
+ <div id="tab-4">
32
+ <ContainerFlexBetween />
33
+ </div>
34
+ </CodeContainer>
@@ -0,0 +1,16 @@
1
+ ---
2
+ /**
3
+ * @component Container.FlexRow
4
+ *
5
+ * @description
6
+ * 展示Container组件的行排列(flex="row")布局功能。
7
+ */
8
+ import '../style.ts';
9
+ import { Container } from '../index';
10
+ ---
11
+
12
+ <Container flex="row" gap="md" border padding="md">
13
+ <div class="cosy:bg-primary cosy:text-primary-content cosy:p-4 cosy:rounded">第一项</div>
14
+ <div class="cosy:bg-secondary cosy:text-secondary-content cosy:p-4 cosy:rounded">第二项</div>
15
+ <div class="cosy:bg-accent cosy:text-accent-content cosy:p-4 cosy:rounded">第三项</div>
16
+ </Container>
@@ -0,0 +1,32 @@
1
+ ---
2
+ /**
3
+ * @component Container.Padding
4
+ *
5
+ * @description
6
+ * 展示Container组件的不同内边距选项:none、sm、md、lg、xl。
7
+ */
8
+ import '../style.ts';
9
+ import { Container } from '../index';
10
+ ---
11
+
12
+ <div class="cosy:space-y-4">
13
+ <Container padding="none" border>
14
+ <p class="cosy:text-center">无内边距 (none)</p>
15
+ </Container>
16
+
17
+ <Container padding="sm" border>
18
+ <p class="cosy:text-center">小内边距 (sm)</p>
19
+ </Container>
20
+
21
+ <Container padding="md" border>
22
+ <p class="cosy:text-center">中等内边距 (md) - 默认</p>
23
+ </Container>
24
+
25
+ <Container padding="lg" border>
26
+ <p class="cosy:text-center">大内边距 (lg)</p>
27
+ </Container>
28
+
29
+ <Container padding="xl" border>
30
+ <p class="cosy:text-center">超大内边距 (xl)</p>
31
+ </Container>
32
+ </div>
@@ -0,0 +1,11 @@
1
+ ---
2
+ import { CodeContainer } from '../index';
3
+ import ContainerPadding from './EContainerPadding.astro';
4
+ import ContainerPaddingSourceCode from './EContainerPadding.astro?raw';
5
+ ---
6
+
7
+ <CodeContainer codes={[ContainerPaddingSourceCode]}>
8
+ <div id="tab-1">
9
+ <ContainerPadding />
10
+ </div>
11
+ </CodeContainer>