@coffic/cosy-ui 0.8.7 → 0.8.11

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 (159) hide show
  1. package/dist/app.css +1 -1
  2. package/dist/src-astro/alert/index.ts +7 -15
  3. package/dist/src-astro/assets/iconData.ts +211 -106
  4. package/dist/src-astro/button/index_astro.ts +2 -56
  5. package/dist/src-astro/card/CardCourse.astro +31 -11
  6. package/dist/src-astro/card/index.ts +15 -25
  7. package/dist/src-astro/code-container/CodeContainer.astro +205 -5
  8. package/dist/src-astro/code-container/index.ts +9 -13
  9. package/dist/src-astro/contact/index.ts +16 -20
  10. package/dist/src-astro/errors/index.ts +0 -62
  11. package/dist/src-astro/footer/index.ts +1 -30
  12. package/dist/src-astro/header/Header.astro +1 -2
  13. package/dist/src-astro/header/index.ts +1 -40
  14. package/dist/src-astro/hero/Hero.astro +1 -1
  15. package/dist/src-astro/hero/index.ts +1 -39
  16. package/dist/src-astro/icons/ChartIcon.astro +28 -0
  17. package/dist/src-astro/icons/DashboardIcon.astro +28 -0
  18. package/dist/src-astro/icons/DeleteIcon.astro +28 -0
  19. package/dist/src-astro/icons/DocumentIcon.astro +28 -0
  20. package/dist/src-astro/icons/DownloadIcon.astro +28 -0
  21. package/dist/src-astro/icons/EditIcon.astro +28 -0
  22. package/dist/src-astro/icons/FolderIcon.astro +28 -0
  23. package/dist/src-astro/icons/HeartIcon.astro +28 -0
  24. package/dist/src-astro/icons/HomeIcon.astro +28 -0
  25. package/dist/src-astro/icons/MailIcon.astro +28 -0
  26. package/dist/src-astro/icons/MessageIcon.astro +28 -0
  27. package/dist/src-astro/icons/NotificationIcon.astro +28 -0
  28. package/dist/src-astro/icons/RefreshIcon.astro +28 -0
  29. package/dist/src-astro/icons/ReportIcon.astro +28 -0
  30. package/dist/src-astro/icons/SaveIcon.astro +28 -0
  31. package/dist/src-astro/icons/SecurityIcon.astro +28 -0
  32. package/dist/src-astro/icons/StarIcon.astro +28 -0
  33. package/dist/src-astro/icons/ToolsIcon.astro +28 -0
  34. package/dist/src-astro/icons/UploadIcon.astro +28 -0
  35. package/dist/src-astro/icons/UsersIcon.astro +28 -0
  36. package/dist/src-astro/icons/WalletIcon.astro +28 -0
  37. package/dist/src-astro/icons/index.ts +21 -0
  38. package/dist/src-astro/layout-app/index.ts +5 -9
  39. package/dist/src-astro/layout-dashboard/DashboardLayout.astro +101 -555
  40. package/dist/src-astro/layout-dashboard/DashboardSidebar.astro +206 -0
  41. package/dist/src-astro/layout-dashboard/DashboardTopNavbar.astro +132 -0
  42. package/dist/src-astro/layout-dashboard/index.ts +14 -8
  43. package/dist/src-astro/layout-dashboard/tools.ts +0 -0
  44. package/dist/src-astro/layout-dashboard/types.ts +313 -0
  45. package/package.json +4 -4
  46. package/dist/src-astro/alert/EAlertBasic.astro +0 -11
  47. package/dist/src-astro/alert/EAlertBasicContainer.astro +0 -11
  48. package/dist/src-astro/alert/EAlertCustomStyle.astro +0 -16
  49. package/dist/src-astro/alert/EAlertCustomStyleContainer.astro +0 -11
  50. package/dist/src-astro/alert/EAlertError.astro +0 -6
  51. package/dist/src-astro/alert/EAlertInfo.astro +0 -6
  52. package/dist/src-astro/alert/EAlertSuccess.astro +0 -6
  53. package/dist/src-astro/alert/EAlertTypesContainer.astro +0 -43
  54. package/dist/src-astro/alert/EAlertWarning.astro +0 -6
  55. package/dist/src-astro/alert/EAlertWithTitle.astro +0 -12
  56. package/dist/src-astro/alert/EAlertWithTitleContainer.astro +0 -11
  57. package/dist/src-astro/button/ButtonBasic.astro +0 -18
  58. package/dist/src-astro/button/ButtonBasicContainer.astro +0 -11
  59. package/dist/src-astro/button/ButtonBlock.astro +0 -5
  60. package/dist/src-astro/button/ButtonError.astro +0 -5
  61. package/dist/src-astro/button/ButtonGhost.astro +0 -5
  62. package/dist/src-astro/button/ButtonIconBoth.astro +0 -9
  63. package/dist/src-astro/button/ButtonIconLeft.astro +0 -8
  64. package/dist/src-astro/button/ButtonIconRight.astro +0 -8
  65. package/dist/src-astro/button/ButtonInfo.astro +0 -5
  66. package/dist/src-astro/button/ButtonLinkContainer.astro +0 -19
  67. package/dist/src-astro/button/ButtonNeutral.astro +0 -5
  68. package/dist/src-astro/button/ButtonOutline.astro +0 -5
  69. package/dist/src-astro/button/ButtonShapeCircle.astro +0 -5
  70. package/dist/src-astro/button/ButtonShapeDefault.astro +0 -5
  71. package/dist/src-astro/button/ButtonShapeSquare.astro +0 -5
  72. package/dist/src-astro/button/ButtonShapes.astro +0 -23
  73. package/dist/src-astro/button/ButtonShapesContainer.astro +0 -29
  74. package/dist/src-astro/button/ButtonSizes.astro +0 -15
  75. package/dist/src-astro/button/ButtonSizesContainer.astro +0 -11
  76. package/dist/src-astro/button/ButtonStates.astro +0 -12
  77. package/dist/src-astro/button/ButtonStatesContainer.astro +0 -11
  78. package/dist/src-astro/button/ButtonSuccess.astro +0 -5
  79. package/dist/src-astro/button/ButtonVariantsContainer.astro +0 -73
  80. package/dist/src-astro/button/ButtonWarning.astro +0 -5
  81. package/dist/src-astro/button/ButtonWide.astro +0 -5
  82. package/dist/src-astro/button/ButtonWidth.astro +0 -8
  83. package/dist/src-astro/button/ButtonWidthContainer.astro +0 -19
  84. package/dist/src-astro/button/ButtonWithIcons.astro +0 -25
  85. package/dist/src-astro/button/ButtonWithIconsContainer.astro +0 -29
  86. package/dist/src-astro/card/CardBasic.astro +0 -5
  87. package/dist/src-astro/card/ECardBasic.astro +0 -13
  88. package/dist/src-astro/card/ECardBasicContainer.astro +0 -11
  89. package/dist/src-astro/card/ECardClickable.astro +0 -16
  90. package/dist/src-astro/card/ECardClickableContainer.astro +0 -11
  91. package/dist/src-astro/card/ECardCompact.astro +0 -13
  92. package/dist/src-astro/card/ECardCompactContainer.astro +0 -11
  93. package/dist/src-astro/card/ECardCustomStyle.astro +0 -17
  94. package/dist/src-astro/card/ECardCustomStyleContainer.astro +0 -11
  95. package/dist/src-astro/card/ECardWithImage.astro +0 -16
  96. package/dist/src-astro/card/ECardWithImageContainer.astro +0 -11
  97. package/dist/src-astro/card/ECardWithSubtitle.astro +0 -13
  98. package/dist/src-astro/card/ECardWithSubtitleContainer.astro +0 -11
  99. package/dist/src-astro/code-container/ECodeContainerBasic.astro +0 -19
  100. package/dist/src-astro/code-container/ECodeContainerMultiple.astro +0 -49
  101. package/dist/src-astro/contact/EContactBasic.astro +0 -15
  102. package/dist/src-astro/contact/EContactBasicContainer.astro +0 -11
  103. package/dist/src-astro/contact/EContactCompact.astro +0 -11
  104. package/dist/src-astro/contact/EContactCompactContainer.astro +0 -11
  105. package/dist/src-astro/contact/EContactCustomStyle.astro +0 -21
  106. package/dist/src-astro/contact/EContactCustomStyleContainer.astro +0 -11
  107. package/dist/src-astro/contact/EContactSocial.astro +0 -20
  108. package/dist/src-astro/contact/EContactSocialContainer.astro +0 -11
  109. package/dist/src-astro/contact/EContactWithTitle.astro +0 -17
  110. package/dist/src-astro/contact/EContactWithTitleContainer.astro +0 -11
  111. package/dist/src-astro/errors/E403Basic.astro +0 -11
  112. package/dist/src-astro/errors/E403BasicContainer.astro +0 -20
  113. package/dist/src-astro/errors/E404Basic.astro +0 -11
  114. package/dist/src-astro/errors/E404BasicContainer.astro +0 -20
  115. package/dist/src-astro/errors/E404WithDebug.astro +0 -18
  116. package/dist/src-astro/errors/E500Basic.astro +0 -11
  117. package/dist/src-astro/errors/E500BasicContainer.astro +0 -20
  118. package/dist/src-astro/errors/E503Maintenance.astro +0 -20
  119. package/dist/src-astro/errors/E503MaintenanceContainer.astro +0 -21
  120. package/dist/src-astro/errors/EErrorPageCustomStyle.astro +0 -21
  121. package/dist/src-astro/errors/EErrorPageCustomStyleContainer.astro +0 -21
  122. package/dist/src-astro/errors/EErrorPageShowcase.astro +0 -68
  123. package/dist/src-astro/errors/EErrorPageShowcaseContainer.astro +0 -21
  124. package/dist/src-astro/footer/EFooterBasic.astro +0 -18
  125. package/dist/src-astro/footer/EFooterBasicContainer.astro +0 -11
  126. package/dist/src-astro/footer/EFooterComplete.astro +0 -50
  127. package/dist/src-astro/footer/EFooterCompleteContainer.astro +0 -11
  128. package/dist/src-astro/footer/EFooterFeaturesContainer.astro +0 -40
  129. package/dist/src-astro/footer/EFooterWithLogo.astro +0 -28
  130. package/dist/src-astro/footer/EFooterWithLogoContainer.astro +0 -11
  131. package/dist/src-astro/footer/EFooterWithNavigation.astro +0 -24
  132. package/dist/src-astro/footer/EFooterWithNavigationContainer.astro +0 -11
  133. package/dist/src-astro/footer/EFooterWithProducts.astro +0 -24
  134. package/dist/src-astro/footer/EFooterWithProductsContainer.astro +0 -11
  135. package/dist/src-astro/footer/EFooterWithSocial.astro +0 -24
  136. package/dist/src-astro/footer/EFooterWithSocialContainer.astro +0 -11
  137. package/dist/src-astro/header/HeaderBasic.astro +0 -19
  138. package/dist/src-astro/header/HeaderCustomNavbarCenter.astro +0 -28
  139. package/dist/src-astro/header/HeaderCustomNavbarEnd.astro +0 -25
  140. package/dist/src-astro/header/HeaderCustomNavbarStart.astro +0 -27
  141. package/dist/src-astro/header/HeaderCustomPosition.astro +0 -34
  142. package/dist/src-astro/header/HeaderWithNavigation.astro +0 -27
  143. package/dist/src-astro/hero/HeroAlignCenter.astro +0 -13
  144. package/dist/src-astro/hero/HeroAlignContainer.astro +0 -27
  145. package/dist/src-astro/hero/HeroAlignLeft.astro +0 -13
  146. package/dist/src-astro/hero/HeroAlignRight.astro +0 -13
  147. package/dist/src-astro/hero/HeroBackgroundContainer.astro +0 -18
  148. package/dist/src-astro/hero/HeroBackgroundImage.astro +0 -16
  149. package/dist/src-astro/hero/HeroBackgroundImageContainer.astro +0 -11
  150. package/dist/src-astro/hero/HeroBasic.astro +0 -12
  151. package/dist/src-astro/hero/HeroBasicContainer.astro +0 -11
  152. package/dist/src-astro/hero/HeroGradientBackground.astro +0 -10
  153. package/dist/src-astro/hero/HeroPlainBackground.astro +0 -10
  154. package/dist/src-astro/hero/HeroWithButton.astro +0 -15
  155. package/dist/src-astro/hero/HeroWithButtonContainer.astro +0 -11
  156. package/dist/src-astro/hero/HeroWithImage.astro +0 -16
  157. package/dist/src-astro/hero/HeroWithImageContainer.astro +0 -11
  158. package/dist/src-astro/layout-app/AppLayoutBasic.astro +0 -54
  159. package/dist/src-astro/layout-dashboard/DashboardLayoutBasic.astro +0 -51
@@ -1,16 +1,8 @@
1
- import Alert from './Alert.astro';
2
- import AlertBasicContainer from './EAlertBasicContainer.astro';
3
- import AlertWithTitleContainer from './EAlertWithTitleContainer.astro';
4
- import AlertTypesContainer from './EAlertTypesContainer.astro';
5
- import AlertCustomStyleContainer from './EAlertCustomStyleContainer.astro';
1
+ export { default as Alert } from './Alert.astro';
6
2
 
7
- export { Alert };
8
- export const AlertPackage = {
9
- Alert,
10
- AlertContainers: {
11
- Basic: AlertBasicContainer,
12
- WithTitle: AlertWithTitleContainer,
13
- Types: AlertTypesContainer,
14
- CustomStyle: AlertCustomStyleContainer,
15
- },
16
- };
3
+ // Export types
4
+ export interface AlertProps {
5
+ type?: 'info' | 'success' | 'warning' | 'error';
6
+ title?: string;
7
+ class?: string;
8
+ }
@@ -5,113 +5,218 @@
5
5
  */
6
6
 
7
7
  export interface IconData {
8
- /**
9
- * 图标路径数据
10
- */
11
- path: string;
12
- /**
13
- * 额外的视图框设置,默认为"0 0 24 24"
14
- */
15
- viewBox?: string;
8
+ /**
9
+ * 图标路径数据
10
+ */
11
+ path: string;
12
+ /**
13
+ * 额外的视图框设置,默认为"0 0 24 24"
14
+ */
15
+ viewBox?: string;
16
16
  }
17
17
 
18
18
  export const iconData: Record<string, IconData> = {
19
- // 警告三角形图标
20
- alertTriangle: {
21
- path: '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',
22
- },
23
-
24
- // 成功检查图标
25
- checkCircle: {
26
- path: 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z',
27
- },
28
-
29
- // 信息图标
30
- infoCircle: {
31
- path: 'M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z',
32
- },
33
-
34
- // 错误图标
35
- xCircle: {
36
- path: 'M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z',
37
- },
38
-
39
- // 搜索图标
40
- search: {
41
- path: 'M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z',
42
- },
43
-
44
- // 设置图标
45
- settings: {
46
- path: 'M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z',
47
- },
48
-
49
- // 信息图标
50
- info: {
51
- path: 'M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z',
52
- },
53
-
54
- // 用户图标
55
- user: {
56
- path: 'M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z',
57
- },
58
-
59
- // 菜单图标
60
- menu: {
61
- path: 'M4 6h16M4 12h16M4 18h16',
62
- },
63
-
64
- // 关闭图标
65
- close: {
66
- path: 'M6 18L18 6M6 6l12 12',
67
- },
68
-
69
- // 检查图标
70
- check: {
71
- path: 'M5 13l4 4L19 7',
72
- },
73
-
74
- // 下拉图标
75
- chevronDown: {
76
- path: 'M19 9l-7 7-7-7',
77
- },
78
-
79
- // 日历图标
80
- calendar: {
81
- path: 'M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z',
82
- },
83
-
84
- // 链接图标
85
- link: {
86
- path: 'M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1',
87
- },
88
-
89
- // 剪贴板图标
90
- clipboard: {
91
- path: 'M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2',
92
- },
93
-
94
- // 收件箱归档图标
95
- inboxArchive: {
96
- path: 'M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4',
97
- },
98
-
99
- // GitHub 图标
100
- github: {
101
- path: 'M12.001 2C6.47598 2 2.00098 6.475 2.00098 12C2.00098 16.425 4.86348 20.1625 8.83848 21.4875C9.33848 21.575 9.52598 21.275 9.52598 21.0125C9.52598 20.775 9.51348 19.9875 9.51348 19.15C7.00098 19.6125 6.35098 18.5375 6.15098 17.975C6.03848 17.6875 5.55098 16.8 5.12598 16.5625C4.77598 16.375 4.27598 15.9125 5.11348 15.9C5.90098 15.8875 6.46348 16.625 6.65098 16.925C7.55098 18.4375 8.98848 18.0125 9.56348 17.75C9.65098 17.1 9.91348 16.6625 10.201 16.4125C7.97598 16.1625 5.65098 15.3 5.65098 11.475C5.65098 10.3875 6.03848 9.4875 6.67598 8.7875C6.57598 8.5375 6.22598 7.5125 6.77598 6.1375C6.77598 6.1375 7.61348 5.875 9.52598 7.1625C10.326 6.9375 11.176 6.825 12.026 6.825C12.876 6.825 13.726 6.9375 14.526 7.1625C16.4385 5.8625 17.276 6.1375 17.276 6.1375C17.826 7.5125 17.476 8.5375 17.376 8.7875C18.0135 9.4875 18.401 10.375 18.401 11.475C18.401 15.3125 16.0635 16.1625 13.8385 16.4125C14.201 16.725 14.5135 17.325 14.5135 18.2625C14.5135 19.6 14.501 20.675 14.501 21.0125C14.501 21.275 14.6885 21.5875 15.1885 21.4875C19.259 20.1133 21.9999 16.2963 22.001 12C22.001 6.475 17.526 2 12.001 2Z',
102
- },
103
-
104
- // 领英图标
105
- linkedin: {
106
- path: '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',
107
- },
108
-
109
- // Twitter 图标
110
- twitter: {
111
- path: 'M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z',
112
- },
113
-
114
- sunCloudy: {
115
- path: 'M9.98392 5.05991C11.1323 3.22236 13.1734 2 15.5 2C19.0899 2 22 4.91015 22 8.5C22 9.58031 21.7365 10.5991 21.2701 11.4955C22.3351 12.4985 23 13.9216 23 15.5C23 18.5376 20.5376 21 17.5 21H9C4.58172 21 1 17.4183 1 13C1 8.58172 4.58172 5 9 5C9.33312 5 9.66149 5.02036 9.98392 5.05991ZM12.0554 5.60419C14.0675 6.43637 15.6662 8.06578 16.4576 10.0986C16.7951 10.0339 17.1436 10 17.5 10C18.2351 10 18.9366 10.1442 19.5776 10.4059C19.8486 9.82719 20 9.18128 20 8.5C20 6.01472 17.9853 4 15.5 4C14.1177 4 12.8809 4.6233 12.0554 5.60419ZM17.5 19C19.433 19 21 17.433 21 15.5C21 13.567 19.433 12 17.5 12C16.5205 12 15.6351 12.4023 14.9998 13.0507C14.9999 13.0338 15 13.0169 15 13C15 9.68629 12.3137 7 9 7C5.68629 7 3 9.68629 3 13C3 16.3137 5.68629 19 9 19H17.5Z',
116
- },
19
+ // 警告三角形图标
20
+ alertTriangle: {
21
+ path: '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',
22
+ },
23
+
24
+ // 成功检查图标
25
+ checkCircle: {
26
+ path: 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z',
27
+ },
28
+
29
+ // 信息图标
30
+ infoCircle: {
31
+ path: 'M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z',
32
+ },
33
+
34
+ // 错误图标
35
+ xCircle: {
36
+ path: 'M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z',
37
+ },
38
+
39
+ // 搜索图标
40
+ search: {
41
+ path: 'M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z',
42
+ },
43
+
44
+ // 设置图标
45
+ settings: {
46
+ path: 'M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z',
47
+ },
48
+
49
+ // 信息图标
50
+ info: {
51
+ path: 'M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z',
52
+ },
53
+
54
+ // 用户图标
55
+ user: {
56
+ path: 'M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z',
57
+ },
58
+
59
+ // 菜单图标
60
+ menu: {
61
+ path: 'M4 6h16M4 12h16M4 18h16',
62
+ },
63
+
64
+ // 关闭图标
65
+ close: {
66
+ path: 'M6 18L18 6M6 6l12 12',
67
+ },
68
+
69
+ // 检查图标
70
+ check: {
71
+ path: 'M5 13l4 4L19 7',
72
+ },
73
+
74
+ // 下拉图标
75
+ chevronDown: {
76
+ path: 'M19 9l-7 7-7-7',
77
+ },
78
+
79
+ // 日历图标
80
+ calendar: {
81
+ path: 'M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z',
82
+ },
83
+
84
+ // 链接图标
85
+ link: {
86
+ path: 'M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1',
87
+ },
88
+
89
+ // 剪贴板图标
90
+ clipboard: {
91
+ path: 'M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2',
92
+ },
93
+
94
+ // 收件箱归档图标
95
+ inboxArchive: {
96
+ path: 'M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4',
97
+ },
98
+
99
+ // GitHub 图标
100
+ github: {
101
+ path: 'M12.001 2C6.47598 2 2.00098 6.475 2.00098 12C2.00098 16.425 4.86348 20.1625 8.83848 21.4875C9.33848 21.575 9.52598 21.275 9.52598 21.0125C9.52598 20.775 9.51348 19.9875 9.51348 19.15C7.00098 19.6125 6.35098 18.5375 6.15098 17.975C6.03848 17.6875 5.55098 16.8 5.12598 16.5625C4.77598 16.375 4.27598 15.9125 5.11348 15.9C5.90098 15.8875 6.46348 16.625 6.65098 16.925C7.55098 18.4375 8.98848 18.0125 9.56348 17.75C9.65098 17.1 9.91348 16.6625 10.201 16.4125C7.97598 16.1625 5.65098 15.3 5.65098 11.475C5.65098 10.3875 6.03848 9.4875 6.67598 8.7875C6.57598 8.5375 6.22598 7.5125 6.77598 6.1375C6.77598 6.1375 7.61348 5.875 9.52598 7.1625C10.326 6.9375 11.176 6.825 12.026 6.825C12.876 6.825 13.726 6.9375 14.526 7.1625C16.4385 5.8625 17.276 6.1375 17.276 6.1375C17.826 7.5125 17.476 8.5375 17.376 8.7875C18.0135 9.4875 18.401 10.375 18.401 11.475C18.401 15.3125 16.0635 16.1625 13.8385 16.4125C14.201 16.725 14.5135 17.325 14.5135 18.2625C14.5135 19.6 14.501 20.675 14.501 21.0125C14.501 21.275 14.6885 21.5875 15.1885 21.4875C19.259 20.1133 21.9999 16.2963 22.001 12C22.001 6.475 17.526 2 12.001 2Z',
102
+ },
103
+
104
+ // 领英图标
105
+ linkedin: {
106
+ path: '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',
107
+ },
108
+
109
+ // Twitter 图标
110
+ twitter: {
111
+ path: 'M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z',
112
+ },
113
+
114
+ sunCloudy: {
115
+ path: 'M9.98392 5.05991C11.1323 3.22236 13.1734 2 15.5 2C19.0899 2 22 4.91015 22 8.5C22 9.58031 21.7365 10.5991 21.2701 11.4955C22.3351 12.4985 23 13.9216 23 15.5C23 18.5376 20.5376 21 17.5 21H9C4.58172 21 1 17.4183 1 13C1 8.58172 4.58172 5 9 5C9.33312 5 9.66149 5.02036 9.98392 5.05991ZM12.0554 5.60419C14.0675 6.43637 15.6662 8.06578 16.4576 10.0986C16.7951 10.0339 17.1436 10 17.5 10C18.2351 10 18.9366 10.1442 19.5776 10.4059C19.8486 9.82719 20 9.18128 20 8.5C20 6.01472 17.9853 4 15.5 4C14.1177 4 12.8809 4.6233 12.0554 5.60419ZM17.5 19C19.433 19 21 17.433 21 15.5C21 13.567 19.433 12 17.5 12C16.5205 12 15.6351 12.4023 14.9998 13.0507C14.9999 13.0338 15 13.0169 15 13C15 9.68629 12.3137 7 9 7C5.68629 7 3 9.68629 3 13C3 16.3137 5.68629 19 9 19H17.5Z',
116
+ },
117
+
118
+ // 刷新图标
119
+ refresh: {
120
+ path: 'M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15',
121
+ },
122
+
123
+ // 主页图标
124
+ home: {
125
+ path: 'M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6',
126
+ },
127
+
128
+ // 仪表盘图标
129
+ dashboard: {
130
+ path: 'M3 13a8 8 0 018-8 8 8 0 018 8m0 0a8 8 0 11-16 0m8-2.5a2.5 2.5 0 100 5 2.5 2.5 0 000-5z',
131
+ },
132
+
133
+ // 图表图标
134
+ chart: {
135
+ path: 'M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z',
136
+ },
137
+
138
+ // 文档图标
139
+ document: {
140
+ path: 'M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z',
141
+ },
142
+
143
+ // 通知图标
144
+ notification: {
145
+ path: 'M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9',
146
+ },
147
+
148
+ // 用户组图标
149
+ users: {
150
+ path: 'M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197m0 0a4 4 0 017 0M13 7a4 4 0 11-8 0 4 4 0 018 0z',
151
+ },
152
+
153
+ // 消息图标
154
+ message: {
155
+ path: 'M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z',
156
+ },
157
+
158
+ // 邮件图标
159
+ mail: {
160
+ path: 'M3 8l7.89 5.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',
161
+ },
162
+
163
+ // 文件夹图标
164
+ folder: {
165
+ path: 'M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z',
166
+ },
167
+
168
+ // 星形图标
169
+ star: {
170
+ path: 'M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z',
171
+ },
172
+
173
+ // 心形图标
174
+ heart: {
175
+ path: 'M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z',
176
+ },
177
+
178
+ // 保存图标
179
+ save: {
180
+ path: 'M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4',
181
+ },
182
+
183
+ // 编辑图标
184
+ edit: {
185
+ path: 'M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7m-1.5-9.5a2.121 2.121 0 113 3L12 15l-4 1 1-4 9.5-9.5z',
186
+ },
187
+
188
+ // 删除图标
189
+ delete: {
190
+ path: 'M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16',
191
+ },
192
+
193
+ // 工具图标
194
+ tools: {
195
+ path: 'M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z',
196
+ },
197
+
198
+ // 钱包图标
199
+ wallet: {
200
+ path: 'M17 9V7a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2m2 4h10a2 2 0 002-2v-6a2 2 0 00-2-2H9a2 2 0 00-2 2v6a2 2 0 002 2zm7-5a2 2 0 11-4 0 2 2 0 014 0z',
201
+ },
202
+
203
+ // 报告图标
204
+ report: {
205
+ path: 'M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z',
206
+ },
207
+
208
+ // 安全图标
209
+ security: {
210
+ path: 'M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z',
211
+ },
212
+
213
+ // 上传图标
214
+ upload: {
215
+ path: 'M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12',
216
+ },
217
+
218
+ // 下载图标
219
+ download: {
220
+ path: 'M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 11l3 3m0 0l3-3m-3 3V4',
221
+ },
117
222
  };
@@ -1,60 +1,6 @@
1
1
  import Button from './Button.astro';
2
- import ButtonBasicContainer from './ButtonBasicContainer.astro';
3
- import ButtonShapesContainer from './ButtonShapesContainer.astro';
4
- import ButtonSizesContainer from './ButtonSizesContainer.astro';
5
- import ButtonStatesContainer from './ButtonStatesContainer.astro';
6
- import ButtonWithIconsContainer from './ButtonWithIconsContainer.astro';
7
- import ButtonWidthContainer from './ButtonWidthContainer.astro';
8
- import ButtonVariantsContainer from './ButtonVariantsContainer.astro';
9
- import ButtonLinkContainer from './ButtonLinkContainer.astro';
10
- import ButtonWide from './ButtonWide.astro';
11
- import ButtonBlock from './ButtonBlock.astro';
12
- import ButtonIconLeft from './ButtonIconLeft.astro';
13
- import ButtonIconRight from './ButtonIconRight.astro';
14
- import ButtonIconBoth from './ButtonIconBoth.astro';
15
- import ButtonShapeCircle from './ButtonShapeCircle.astro';
16
- import ButtonShapeSquare from './ButtonShapeSquare.astro';
17
- import ButtonShapeDefault from './ButtonShapeDefault.astro';
18
- import ButtonInfo from './ButtonInfo.astro';
19
- import ButtonSuccess from './ButtonSuccess.astro';
20
- import ButtonWarning from './ButtonWarning.astro';
21
- import ButtonError from './ButtonError.astro';
22
- import ButtonGhost from './ButtonGhost.astro';
2
+ import ButtonVariants from './ButtonVariants.astro';
23
3
  import ButtonLink from './ButtonLink.astro';
24
4
  import ButtonLinkExternal from './ButtonLinkExternal.astro';
25
- import ButtonOutline from './ButtonOutline.astro';
26
- import ButtonNeutral from './ButtonNeutral.astro';
27
5
 
28
- export { Button };
29
-
30
- export const ButtonPackage = {
31
- Button,
32
- ButtonWide,
33
- ButtonBlock,
34
- ButtonIconLeft,
35
- ButtonIconRight,
36
- ButtonIconBoth,
37
- ButtonShapeCircle,
38
- ButtonShapeSquare,
39
- ButtonShapeDefault,
40
- ButtonInfo,
41
- ButtonSuccess,
42
- ButtonWarning,
43
- ButtonError,
44
- ButtonGhost,
45
- ButtonLink,
46
- ButtonLinkExternal,
47
- ButtonOutline,
48
- ButtonNeutral,
49
-
50
- ButtonContainers: {
51
- Basic: ButtonBasicContainer,
52
- Shapes: ButtonShapesContainer,
53
- Sizes: ButtonSizesContainer,
54
- States: ButtonStatesContainer,
55
- WithIcons: ButtonWithIconsContainer,
56
- Width: ButtonWidthContainer,
57
- Variants: ButtonVariantsContainer,
58
- Link: ButtonLinkContainer,
59
- },
60
- };
6
+ export { Button, ButtonVariants, ButtonLink, ButtonLinkExternal };
@@ -1,6 +1,22 @@
1
1
  ---
2
- import { Image } from 'astro:assets';
3
- import bookCover from '../assets/book.png';
2
+ /**
3
+ * @component CardCourse
4
+ *
5
+ * @description
6
+ * 课程卡片组件,用于展示课程信息,具有统一的设计风格。
7
+ *
8
+ * @usage
9
+ * ```astro
10
+ * <CardCourse title="React 基础教程" link="/courses/react-basics" />
11
+ * ```
12
+ *
13
+ * @props
14
+ * - title: string - 课程标题
15
+ * - link: string - 课程链接
16
+ */
17
+
18
+ // 导入样式
19
+ import '../../style.ts';
4
20
 
5
21
  interface Props {
6
22
  title: string;
@@ -11,18 +27,22 @@ const { title, link } = Astro.props;
11
27
  ---
12
28
 
13
29
  <div>
14
- <a href={link} class="justify-center flex no-underline text-base-content">
15
- <div class="w-56 h-80">
30
+ <a
31
+ href={link}
32
+ class="cosy:justify-center cosy:flex cosy:no-underline cosy:text-base-content">
33
+ <div class="cosy:w-56 cosy:h-80">
16
34
  <div
17
- class="bg-gradient-to-br w-full h-full from-accent/50 to-primary/30 rounded-3xl shadow-lg backdrop-blur-sm"
18
- >
35
+ class="cosy:bg-gradient-to-br cosy:w-full cosy:h-full cosy:from-accent/50 cosy:to-primary/30 cosy:rounded-3xl cosy:shadow-lg cosy:backdrop-blur-sm">
19
36
  <div
20
- class="bg-base-100/60 w-full h-full rounded-3xl border border-base-content/30 hover:scale-105 hover:shadow-2xl transform duration-200 backdrop-filter backdrop-blur-sm"
21
- >
22
- <div class="card-body p-1 h-full">
23
- <Image src={bookCover} alt={title} class="h-3/5 w-full" />
37
+ class="cosy:bg-base-100/60 cosy:w-full cosy:h-full cosy:rounded-3xl cosy:border cosy:border-base-content/30 hover:cosy:scale-105 hover:cosy:shadow-2xl cosy:transform cosy:duration-200 cosy:backdrop-filter cosy:backdrop-blur-sm">
38
+ <div class="card-body cosy:p-1 cosy:h-full">
39
+ <!-- 使用书本图标代替图片 -->
40
+ <div
41
+ class="cosy:h-3/5 cosy:w-full cosy:flex cosy:items-center cosy:justify-center cosy:text-6xl cosy:text-primary">
42
+ 📚
43
+ </div>
24
44
  <div>
25
- <h2 class="text-lg text-center font-medium">
45
+ <h2 class="cosy:text-lg cosy:text-center cosy:font-medium">
26
46
  {title}
27
47
  </h2>
28
48
  </div>
@@ -1,27 +1,17 @@
1
- import Card from './Card.astro';
2
- import CardCourse from './CardCourse.astro';
3
- import CardBasic from './CardBasic.astro';
1
+ export { default as Card } from './Card.astro';
2
+ export { default as CardCourse } from './CardCourse.astro';
4
3
 
5
- // Container components
6
- import CardBasicContainer from './ECardBasicContainer.astro';
7
- import CardWithSubtitleContainer from './ECardWithSubtitleContainer.astro';
8
- import CardWithImageContainer from './ECardWithImageContainer.astro';
9
- import CardClickableContainer from './ECardClickableContainer.astro';
10
- import CardCompactContainer from './ECardCompactContainer.astro';
11
- import CardCustomStyleContainer from './ECardCustomStyleContainer.astro';
4
+ // Export types
5
+ export interface CardProps {
6
+ title: string;
7
+ subtitle?: string;
8
+ imageUrl?: string;
9
+ href?: string;
10
+ compact?: boolean;
11
+ class?: string;
12
+ }
12
13
 
13
- export { Card };
14
- export { CardCourse };
15
- export { CardBasic };
16
-
17
- export const CardPackage = {
18
- Card,
19
- CardContainers: {
20
- Basic: CardBasicContainer,
21
- WithSubtitle: CardWithSubtitleContainer,
22
- WithImage: CardWithImageContainer,
23
- Clickable: CardClickableContainer,
24
- Compact: CardCompactContainer,
25
- CustomStyle: CardCustomStyleContainer,
26
- },
27
- };
14
+ export interface CardCourseProps {
15
+ title: string;
16
+ link: string;
17
+ }