@coffic/cosy-ui 0.8.10 → 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 (157) 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 +100 -0
  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/index.ts +1 -39
  15. package/dist/src-astro/icons/ChartIcon.astro +28 -0
  16. package/dist/src-astro/icons/DashboardIcon.astro +28 -0
  17. package/dist/src-astro/icons/DeleteIcon.astro +28 -0
  18. package/dist/src-astro/icons/DocumentIcon.astro +28 -0
  19. package/dist/src-astro/icons/DownloadIcon.astro +28 -0
  20. package/dist/src-astro/icons/EditIcon.astro +28 -0
  21. package/dist/src-astro/icons/FolderIcon.astro +28 -0
  22. package/dist/src-astro/icons/HeartIcon.astro +28 -0
  23. package/dist/src-astro/icons/HomeIcon.astro +28 -0
  24. package/dist/src-astro/icons/MailIcon.astro +28 -0
  25. package/dist/src-astro/icons/MessageIcon.astro +28 -0
  26. package/dist/src-astro/icons/NotificationIcon.astro +28 -0
  27. package/dist/src-astro/icons/ReportIcon.astro +28 -0
  28. package/dist/src-astro/icons/SaveIcon.astro +28 -0
  29. package/dist/src-astro/icons/SecurityIcon.astro +28 -0
  30. package/dist/src-astro/icons/StarIcon.astro +28 -0
  31. package/dist/src-astro/icons/ToolsIcon.astro +28 -0
  32. package/dist/src-astro/icons/UploadIcon.astro +28 -0
  33. package/dist/src-astro/icons/UsersIcon.astro +28 -0
  34. package/dist/src-astro/icons/WalletIcon.astro +28 -0
  35. package/dist/src-astro/icons/index.ts +20 -0
  36. package/dist/src-astro/layout-app/index.ts +5 -9
  37. package/dist/src-astro/layout-dashboard/DashboardLayout.astro +101 -555
  38. package/dist/src-astro/layout-dashboard/DashboardSidebar.astro +206 -0
  39. package/dist/src-astro/layout-dashboard/DashboardTopNavbar.astro +132 -0
  40. package/dist/src-astro/layout-dashboard/index.ts +14 -8
  41. package/dist/src-astro/layout-dashboard/tools.ts +0 -0
  42. package/dist/src-astro/layout-dashboard/types.ts +313 -0
  43. package/package.json +1 -1
  44. package/dist/src-astro/alert/EAlertBasic.astro +0 -11
  45. package/dist/src-astro/alert/EAlertBasicContainer.astro +0 -11
  46. package/dist/src-astro/alert/EAlertCustomStyle.astro +0 -16
  47. package/dist/src-astro/alert/EAlertCustomStyleContainer.astro +0 -11
  48. package/dist/src-astro/alert/EAlertError.astro +0 -6
  49. package/dist/src-astro/alert/EAlertInfo.astro +0 -6
  50. package/dist/src-astro/alert/EAlertSuccess.astro +0 -6
  51. package/dist/src-astro/alert/EAlertTypesContainer.astro +0 -43
  52. package/dist/src-astro/alert/EAlertWarning.astro +0 -6
  53. package/dist/src-astro/alert/EAlertWithTitle.astro +0 -12
  54. package/dist/src-astro/alert/EAlertWithTitleContainer.astro +0 -11
  55. package/dist/src-astro/button/ButtonBasic.astro +0 -18
  56. package/dist/src-astro/button/ButtonBasicContainer.astro +0 -11
  57. package/dist/src-astro/button/ButtonBlock.astro +0 -5
  58. package/dist/src-astro/button/ButtonError.astro +0 -5
  59. package/dist/src-astro/button/ButtonGhost.astro +0 -5
  60. package/dist/src-astro/button/ButtonIconBoth.astro +0 -9
  61. package/dist/src-astro/button/ButtonIconLeft.astro +0 -8
  62. package/dist/src-astro/button/ButtonIconRight.astro +0 -8
  63. package/dist/src-astro/button/ButtonInfo.astro +0 -5
  64. package/dist/src-astro/button/ButtonLinkContainer.astro +0 -19
  65. package/dist/src-astro/button/ButtonNeutral.astro +0 -5
  66. package/dist/src-astro/button/ButtonOutline.astro +0 -5
  67. package/dist/src-astro/button/ButtonShapeCircle.astro +0 -5
  68. package/dist/src-astro/button/ButtonShapeDefault.astro +0 -5
  69. package/dist/src-astro/button/ButtonShapeSquare.astro +0 -5
  70. package/dist/src-astro/button/ButtonShapes.astro +0 -23
  71. package/dist/src-astro/button/ButtonShapesContainer.astro +0 -29
  72. package/dist/src-astro/button/ButtonSizes.astro +0 -15
  73. package/dist/src-astro/button/ButtonSizesContainer.astro +0 -11
  74. package/dist/src-astro/button/ButtonStates.astro +0 -12
  75. package/dist/src-astro/button/ButtonStatesContainer.astro +0 -11
  76. package/dist/src-astro/button/ButtonSuccess.astro +0 -5
  77. package/dist/src-astro/button/ButtonVariantsContainer.astro +0 -73
  78. package/dist/src-astro/button/ButtonWarning.astro +0 -5
  79. package/dist/src-astro/button/ButtonWide.astro +0 -5
  80. package/dist/src-astro/button/ButtonWidth.astro +0 -8
  81. package/dist/src-astro/button/ButtonWidthContainer.astro +0 -19
  82. package/dist/src-astro/button/ButtonWithIcons.astro +0 -25
  83. package/dist/src-astro/button/ButtonWithIconsContainer.astro +0 -29
  84. package/dist/src-astro/card/CardBasic.astro +0 -5
  85. package/dist/src-astro/card/ECardBasic.astro +0 -13
  86. package/dist/src-astro/card/ECardBasicContainer.astro +0 -11
  87. package/dist/src-astro/card/ECardClickable.astro +0 -16
  88. package/dist/src-astro/card/ECardClickableContainer.astro +0 -11
  89. package/dist/src-astro/card/ECardCompact.astro +0 -13
  90. package/dist/src-astro/card/ECardCompactContainer.astro +0 -11
  91. package/dist/src-astro/card/ECardCustomStyle.astro +0 -17
  92. package/dist/src-astro/card/ECardCustomStyleContainer.astro +0 -11
  93. package/dist/src-astro/card/ECardWithImage.astro +0 -16
  94. package/dist/src-astro/card/ECardWithImageContainer.astro +0 -11
  95. package/dist/src-astro/card/ECardWithSubtitle.astro +0 -13
  96. package/dist/src-astro/card/ECardWithSubtitleContainer.astro +0 -11
  97. package/dist/src-astro/code-container/ECodeContainerBasic.astro +0 -19
  98. package/dist/src-astro/code-container/ECodeContainerMultiple.astro +0 -49
  99. package/dist/src-astro/contact/EContactBasic.astro +0 -15
  100. package/dist/src-astro/contact/EContactBasicContainer.astro +0 -11
  101. package/dist/src-astro/contact/EContactCompact.astro +0 -11
  102. package/dist/src-astro/contact/EContactCompactContainer.astro +0 -11
  103. package/dist/src-astro/contact/EContactCustomStyle.astro +0 -21
  104. package/dist/src-astro/contact/EContactCustomStyleContainer.astro +0 -11
  105. package/dist/src-astro/contact/EContactSocial.astro +0 -20
  106. package/dist/src-astro/contact/EContactSocialContainer.astro +0 -11
  107. package/dist/src-astro/contact/EContactWithTitle.astro +0 -17
  108. package/dist/src-astro/contact/EContactWithTitleContainer.astro +0 -11
  109. package/dist/src-astro/errors/E403Basic.astro +0 -11
  110. package/dist/src-astro/errors/E403BasicContainer.astro +0 -20
  111. package/dist/src-astro/errors/E404Basic.astro +0 -11
  112. package/dist/src-astro/errors/E404BasicContainer.astro +0 -20
  113. package/dist/src-astro/errors/E404WithDebug.astro +0 -18
  114. package/dist/src-astro/errors/E500Basic.astro +0 -11
  115. package/dist/src-astro/errors/E500BasicContainer.astro +0 -20
  116. package/dist/src-astro/errors/E503Maintenance.astro +0 -20
  117. package/dist/src-astro/errors/E503MaintenanceContainer.astro +0 -21
  118. package/dist/src-astro/errors/EErrorPageCustomStyle.astro +0 -21
  119. package/dist/src-astro/errors/EErrorPageCustomStyleContainer.astro +0 -21
  120. package/dist/src-astro/errors/EErrorPageShowcase.astro +0 -68
  121. package/dist/src-astro/errors/EErrorPageShowcaseContainer.astro +0 -21
  122. package/dist/src-astro/footer/EFooterBasic.astro +0 -18
  123. package/dist/src-astro/footer/EFooterBasicContainer.astro +0 -11
  124. package/dist/src-astro/footer/EFooterComplete.astro +0 -50
  125. package/dist/src-astro/footer/EFooterCompleteContainer.astro +0 -11
  126. package/dist/src-astro/footer/EFooterFeaturesContainer.astro +0 -40
  127. package/dist/src-astro/footer/EFooterWithLogo.astro +0 -28
  128. package/dist/src-astro/footer/EFooterWithLogoContainer.astro +0 -11
  129. package/dist/src-astro/footer/EFooterWithNavigation.astro +0 -24
  130. package/dist/src-astro/footer/EFooterWithNavigationContainer.astro +0 -11
  131. package/dist/src-astro/footer/EFooterWithProducts.astro +0 -24
  132. package/dist/src-astro/footer/EFooterWithProductsContainer.astro +0 -11
  133. package/dist/src-astro/footer/EFooterWithSocial.astro +0 -24
  134. package/dist/src-astro/footer/EFooterWithSocialContainer.astro +0 -11
  135. package/dist/src-astro/header/HeaderBasic.astro +0 -19
  136. package/dist/src-astro/header/HeaderCustomNavbarCenter.astro +0 -28
  137. package/dist/src-astro/header/HeaderCustomNavbarEnd.astro +0 -25
  138. package/dist/src-astro/header/HeaderCustomNavbarStart.astro +0 -27
  139. package/dist/src-astro/header/HeaderCustomPosition.astro +0 -34
  140. package/dist/src-astro/header/HeaderWithNavigation.astro +0 -27
  141. package/dist/src-astro/hero/EHeroAlignCenter.astro +0 -13
  142. package/dist/src-astro/hero/EHeroAlignContainer.astro +0 -27
  143. package/dist/src-astro/hero/EHeroAlignLeft.astro +0 -13
  144. package/dist/src-astro/hero/EHeroAlignRight.astro +0 -13
  145. package/dist/src-astro/hero/EHeroBackgroundContainer.astro +0 -18
  146. package/dist/src-astro/hero/EHeroBackgroundImage.astro +0 -16
  147. package/dist/src-astro/hero/EHeroBackgroundImageContainer.astro +0 -11
  148. package/dist/src-astro/hero/EHeroBasic.astro +0 -12
  149. package/dist/src-astro/hero/EHeroBasicContainer.astro +0 -11
  150. package/dist/src-astro/hero/EHeroGradientBackground.astro +0 -10
  151. package/dist/src-astro/hero/EHeroPlainBackground.astro +0 -10
  152. package/dist/src-astro/hero/EHeroWithButton.astro +0 -14
  153. package/dist/src-astro/hero/EHeroWithButtonContainer.astro +0 -11
  154. package/dist/src-astro/hero/EHeroWithImage.astro +0 -16
  155. package/dist/src-astro/hero/EHeroWithImageContainer.astro +0 -11
  156. package/dist/src-astro/layout-app/AppLayoutBasic.astro +0 -54
  157. package/dist/src-astro/layout-dashboard/DashboardLayoutBasic.astro +0 -51
@@ -1,13 +0,0 @@
1
- ---
2
- /**
3
- * @component Card.Compact
4
- *
5
- * @description
6
- * 紧凑模式的Card组件示例,展示如何使用compact属性。
7
- */
8
- import { Card } from '../../index-astro';
9
- ---
10
-
11
- <Card title="紧凑卡片" subtitle="使用compact模式可以减少内边距" compact>
12
- 这是一个紧凑模式的卡片,适合在空间有限的情况下使用。
13
- </Card>
@@ -1,11 +0,0 @@
1
- ---
2
- import { CodeContainer } from '../../index-astro';
3
- import CardCompact from './ECardCompact.astro';
4
- import CardCompactSourceCode from './ECardCompact.astro?raw';
5
- ---
6
-
7
- <CodeContainer codes={[CardCompactSourceCode]}>
8
- <div id="tab-1">
9
- <CardCompact />
10
- </div>
11
- </CodeContainer>
@@ -1,17 +0,0 @@
1
- ---
2
- /**
3
- * @component Card.CustomStyle
4
- *
5
- * @description
6
- * 展示如何使用class属性自定义Card组件的样式。
7
- */
8
- import '../../style.ts';
9
- import { Card } from '../../index-astro';
10
- ---
11
-
12
- <Card
13
- title="自定义样式卡片"
14
- subtitle="这个卡片使用了自定义的背景色和边框"
15
- class="cosy:bg-gradient-to-r cosy:from-blue-50 cosy:to-indigo-100 cosy:border-2 cosy:border-blue-200">
16
- 这是一个自定义样式的卡片,展示了如何通过class属性来覆盖默认样式。
17
- </Card>
@@ -1,11 +0,0 @@
1
- ---
2
- import { CodeContainer } from '../../index-astro';
3
- import CardCustomStyle from './ECardCustomStyle.astro';
4
- import CardCustomStyleSourceCode from './ECardCustomStyle.astro?raw';
5
- ---
6
-
7
- <CodeContainer codes={[CardCustomStyleSourceCode]}>
8
- <div id="tab-1">
9
- <CardCustomStyle />
10
- </div>
11
- </CodeContainer>
@@ -1,16 +0,0 @@
1
- ---
2
- /**
3
- * @component Card.WithImage
4
- *
5
- * @description
6
- * 带图片的Card组件示例,展示如何使用imageUrl属性。
7
- */
8
- import { Card } from '../../index-astro';
9
- ---
10
-
11
- <Card
12
- title="带图片的卡片"
13
- subtitle="这张卡片展示了如何添加顶部图片"
14
- imageUrl="https://picsum.photos/400/200?random=1">
15
- 这是一个带有图片的卡片,图片会自动显示在卡片顶部,并适配卡片宽度。
16
- </Card>
@@ -1,11 +0,0 @@
1
- ---
2
- import { CodeContainer } from '../../index-astro';
3
- import CardWithImage from './ECardWithImage.astro';
4
- import CardWithImageSourceCode from './ECardWithImage.astro?raw';
5
- ---
6
-
7
- <CodeContainer codes={[CardWithImageSourceCode]}>
8
- <div id="tab-1">
9
- <CardWithImage />
10
- </div>
11
- </CodeContainer>
@@ -1,13 +0,0 @@
1
- ---
2
- /**
3
- * @component Card.WithSubtitle
4
- *
5
- * @description
6
- * 带副标题的Card组件示例,展示如何使用subtitle属性。
7
- */
8
- import { Card } from '../../index-astro';
9
- ---
10
-
11
- <Card title="带副标题的卡片" subtitle="这是卡片的副标题,用于提供更多描述信息">
12
- 卡片的主要内容区域,可以包含更详细的信息和其他元素。
13
- </Card>
@@ -1,11 +0,0 @@
1
- ---
2
- import { CodeContainer } from '../../index-astro';
3
- import CardWithSubtitle from './ECardWithSubtitle.astro';
4
- import CardWithSubtitleSourceCode from './ECardWithSubtitle.astro?raw';
5
- ---
6
-
7
- <CodeContainer codes={[CardWithSubtitleSourceCode]}>
8
- <div id="tab-1">
9
- <CardWithSubtitle />
10
- </div>
11
- </CodeContainer>
@@ -1,19 +0,0 @@
1
- ---
2
- /**
3
- * CodeContainerBasic - 基础代码容器示例组件
4
- * 展示CodeContainer的基本用法
5
- */
6
-
7
- import { CodeContainer } from './index';
8
- import { Alert } from '../alert';
9
-
10
- const code = `<Alert type="info">
11
- 这是一个基础示例
12
- </Alert>`;
13
- ---
14
-
15
- <CodeContainer codes={[code]}>
16
- <div id="tab-1">
17
- <Alert type="info"> 这是一个基础示例 </Alert>
18
- </div>
19
- </CodeContainer>
@@ -1,49 +0,0 @@
1
- ---
2
- /**
3
- * CodeContainerMultiple - 多标签代码容器示例组件
4
- * 展示CodeContainer的多标签用法
5
- */
6
-
7
- import { CodeContainer } from './index';
8
- import { Alert } from '../alert';
9
-
10
- const infoCode = `<Alert type="info" title="信息提示">
11
- 这是一条信息提示
12
- </Alert>`;
13
-
14
- const successCode = `<Alert type="success" title="成功提示">
15
- 操作已成功完成
16
- </Alert>`;
17
-
18
- const warningCode = `<Alert type="warning" title="警告提示">
19
- 请注意可能的风险
20
- </Alert>`;
21
-
22
- const errorCode = `<Alert type="error" title="错误提示">
23
- 操作失败,请重试
24
- </Alert>`;
25
-
26
- const titles = ['信息', '成功', '警告', '错误'];
27
- const descriptions = [
28
- '用于展示一般信息',
29
- '用于展示成功状态',
30
- '用于展示警告信息',
31
- '用于展示错误信息',
32
- ];
33
- const codes = [infoCode, successCode, warningCode, errorCode];
34
- ---
35
-
36
- <CodeContainer titles={titles} descriptions={descriptions} codes={codes}>
37
- <div id="tab-1">
38
- <Alert type="info" title="信息提示"> 这是一条信息提示 </Alert>
39
- </div>
40
- <div id="tab-2">
41
- <Alert type="success" title="成功提示"> 操作已成功完成 </Alert>
42
- </div>
43
- <div id="tab-3">
44
- <Alert type="warning" title="警告提示"> 请注意可能的风险 </Alert>
45
- </div>
46
- <div id="tab-4">
47
- <Alert type="error" title="错误提示"> 操作失败,请重试 </Alert>
48
- </div>
49
- </CodeContainer>
@@ -1,15 +0,0 @@
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
- />
@@ -1,11 +0,0 @@
1
- ---
2
- import { CodeContainer } from '../../index-astro';
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>
@@ -1,11 +0,0 @@
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 />
@@ -1,11 +0,0 @@
1
- ---
2
- import { CodeContainer } from '../../index-astro';
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>
@@ -1,21 +0,0 @@
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
- />
@@ -1,11 +0,0 @@
1
- ---
2
- import { CodeContainer } from '../../index-astro';
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>
@@ -1,20 +0,0 @@
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
- />
@@ -1,11 +0,0 @@
1
- ---
2
- import { CodeContainer } from '../../index-astro';
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>
@@ -1,17 +0,0 @@
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
- />
@@ -1,11 +0,0 @@
1
- ---
2
- import { CodeContainer } from '../../index-astro';
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>
@@ -1,11 +0,0 @@
1
- ---
2
- /**
3
- * @component Error403.Basic
4
- *
5
- * @description
6
- * 基础的403禁止访问错误页面示例。
7
- */
8
- import Error403 from './403.astro';
9
- ---
10
-
11
- <Error403 />
@@ -1,20 +0,0 @@
1
- ---
2
- /**
3
- * @component Error403BasicContainer
4
- *
5
- * @description
6
- * 403错误页面基础示例的容器组件,用于展示代码和预览。
7
- */
8
- import { CodeContainer } from '../../index-astro';
9
- import E403Basic from './E403Basic.astro';
10
- import BasicSourceCode from './E403Basic.astro?raw';
11
- ---
12
-
13
- <CodeContainer
14
- titles={['403错误页面']}
15
- descriptions={['基础的403禁止访问错误页面示例']}
16
- codes={[BasicSourceCode]}>
17
- <div id="tab-1">
18
- <E403Basic />
19
- </div>
20
- </CodeContainer>
@@ -1,11 +0,0 @@
1
- ---
2
- /**
3
- * @component Error404.Basic
4
- *
5
- * @description
6
- * 基础的404错误页面示例,展示最简单的404错误页面用法。
7
- */
8
- import Error404 from './404.astro';
9
- ---
10
-
11
- <Error404 />
@@ -1,20 +0,0 @@
1
- ---
2
- /**
3
- * @component Error404BasicContainer
4
- *
5
- * @description
6
- * 404错误页面基础示例的容器组件,用于展示代码和预览。
7
- */
8
- import { CodeContainer } from '../../index-astro';
9
- import E404Basic from './E404Basic.astro';
10
- import BasicSourceCode from './E404Basic.astro?raw';
11
- ---
12
-
13
- <CodeContainer
14
- titles={['404错误页面']}
15
- descriptions={['基础的404错误页面示例']}
16
- codes={[BasicSourceCode]}>
17
- <div id="tab-1">
18
- <E404Basic />
19
- </div>
20
- </CodeContainer>
@@ -1,18 +0,0 @@
1
- ---
2
- /**
3
- * @component Error404.WithDebug
4
- *
5
- * @description
6
- * 带调试信息的404错误页面示例,展示如何显示调试信息。
7
- */
8
- import Error404 from './404.astro';
9
- ---
10
-
11
- <Error404
12
- debugKVs={{
13
- reason: '页面不存在',
14
- suggestedAction: '请检查URL拼写',
15
- timestamp: new Date().toISOString(),
16
- requestId: 'REQ_2024_001',
17
- }}
18
- />
@@ -1,11 +0,0 @@
1
- ---
2
- /**
3
- * @component Error500.Basic
4
- *
5
- * @description
6
- * 基础的500服务器内部错误页面示例。
7
- */
8
- import Error500 from './500.astro';
9
- ---
10
-
11
- <Error500 />
@@ -1,20 +0,0 @@
1
- ---
2
- /**
3
- * @component Error500BasicContainer
4
- *
5
- * @description
6
- * 500错误页面基础示例的容器组件,用于展示代码和预览。
7
- */
8
- import { CodeContainer } from '../../index-astro';
9
- import E500Basic from './E500Basic.astro';
10
- import BasicSourceCode from './E500Basic.astro?raw';
11
- ---
12
-
13
- <CodeContainer
14
- titles={['500错误页面']}
15
- descriptions={['基础的500服务器内部错误页面示例']}
16
- codes={[BasicSourceCode]}>
17
- <div id="tab-1">
18
- <E500Basic />
19
- </div>
20
- </CodeContainer>
@@ -1,20 +0,0 @@
1
- ---
2
- /**
3
- * @component Error503.Maintenance
4
- *
5
- * @description
6
- * 503服务不可用错误页面的维护模式示例,展示系统维护时的页面。
7
- */
8
- import Error503 from './503.astro';
9
- ---
10
-
11
- <Error503
12
- maintenanceMode={true}
13
- estimatedRecovery="2024-12-25 10:00"
14
- statusPageUrl="https://status.example.com"
15
- debugKVs={{
16
- reason: '系统升级',
17
- startTime: '2024-12-25 08:00',
18
- version: 'v2.1.0',
19
- }}
20
- />
@@ -1,21 +0,0 @@
1
- ---
2
- /**
3
- * @component Error503MaintenanceContainer
4
- *
5
- * @description
6
- * 503错误页面维护模式示例的容器组件,用于展示代码和预览。
7
- */
8
- import { CodeContainer } from '../../index-astro';
9
- import E503Maintenance from './E503Maintenance.astro';
10
-
11
- import MaintenanceSourceCode from './E503Maintenance.astro?raw';
12
- ---
13
-
14
- <CodeContainer
15
- titles={['503维护模式页面']}
16
- descriptions={['503服务不可用错误页面的维护模式示例']}
17
- codes={[MaintenanceSourceCode]}>
18
- <div id="tab-1">
19
- <E503Maintenance />
20
- </div>
21
- </CodeContainer>
@@ -1,21 +0,0 @@
1
- ---
2
- /**
3
- * @component ErrorPage.CustomStyle
4
- *
5
- * @description
6
- * 错误页面的自定义样式示例,展示如何通过class属性自定义错误页面的样式。
7
- */
8
- import Error404 from './404.astro';
9
- ---
10
-
11
- <div
12
- class="cosy:bg-gradient-to-br cosy:from-purple-50 cosy:to-pink-50 cosy:dark:from-purple-900/20 cosy:dark:to-pink-900/20 cosy:p-8 cosy:rounded-xl"
13
- >
14
- <Error404
15
- debugKVs={{
16
- customization: '自定义渐变背景',
17
- style: '紫色到粉色渐变',
18
- note: '这是一个自定义样式的示例',
19
- }}
20
- />
21
- </div>
@@ -1,21 +0,0 @@
1
- ---
2
- /**
3
- * @component ErrorPageCustomStyleContainer
4
- *
5
- * @description
6
- * 错误页面自定义样式示例的容器组件,用于展示代码和预览。
7
- */
8
- import { CodeContainer } from '../../index-astro';
9
- import EErrorPageCustomStyle from './EErrorPageCustomStyle.astro';
10
-
11
- import CustomStyleSourceCode from './EErrorPageCustomStyle.astro?raw';
12
- ---
13
-
14
- <CodeContainer
15
- titles={['自定义样式错误页面']}
16
- descriptions={['展示如何自定义错误页面的样式外观']}
17
- codes={[CustomStyleSourceCode]}>
18
- <div id="tab-1">
19
- <EErrorPageCustomStyle />
20
- </div>
21
- </CodeContainer>
@@ -1,68 +0,0 @@
1
- ---
2
- /**
3
- * @component ErrorPage.Showcase
4
- *
5
- * @description
6
- * 展示所有错误页面的组件示例,用于演示和测试不同类型的错误页面。
7
- */
8
- import ErrorPage from './ErrorPage.astro';
9
- import { Container, Stack } from '../../index-astro';
10
- ---
11
-
12
- <Container size="lg" padding="lg">
13
- <Stack gap="xl">
14
- <div class="cosy:text-center cosy:mb-8">
15
- <h1 class="cosy:text-3xl cosy:font-bold cosy:mb-4">错误页面展示</h1>
16
- <p class="cosy:text-base-content/70">
17
- 以下是不同HTTP错误状态码对应的错误页面
18
- </p>
19
- </div>
20
-
21
- <!-- 404错误 -->
22
- <section class="cosy:border cosy:border-base-300 cosy:rounded-lg cosy:p-6">
23
- <h2 class="cosy:text-xl cosy:font-semibold cosy:mb-4">
24
- 404 - 页面未找到
25
- </h2>
26
- <ErrorPage errorCode={404} debugKVs={{ example: 'demo' }} />
27
- </section>
28
-
29
- <!-- 403错误 -->
30
- <section class="cosy:border cosy:border-base-300 cosy:rounded-lg cosy:p-6">
31
- <h2 class="cosy:text-xl cosy:font-semibold cosy:mb-4">403 - 禁止访问</h2>
32
- <ErrorPage
33
- errorCode={403}
34
- loginUrl="/login"
35
- contactUrl="/contact"
36
- debugKVs={{ requiredRole: 'admin', currentRole: 'user' }}
37
- />
38
- </section>
39
-
40
- <!-- 500错误 -->
41
- <section class="cosy:border cosy:border-base-300 cosy:rounded-lg cosy:p-6">
42
- <h2 class="cosy:text-xl cosy:font-semibold cosy:mb-4">
43
- 500 - 服务器内部错误
44
- </h2>
45
- <ErrorPage
46
- errorCode={500}
47
- supportUrl="/support"
48
- statusPageUrl="/status"
49
- debugKVs={{ errorId: 'ERR_2024_001', serverInfo: 'Server-01' }}
50
- />
51
- </section>
52
-
53
- <!-- 503错误 -->
54
- <section class="cosy:border cosy:border-base-300 cosy:rounded-lg cosy:p-6">
55
- <h2 class="cosy:text-xl cosy:font-semibold cosy:mb-4">
56
- 503 - 服务不可用
57
- </h2>
58
- <ErrorPage
59
- errorCode={503}
60
- maintenanceMode={true}
61
- estimatedRecovery="2024-12-25 10:00"
62
- statusPageUrl="/status"
63
- notificationUrl="/notifications"
64
- debugKVs={{ reason: '系统升级', startTime: '2024-12-25 08:00' }}
65
- />
66
- </section>
67
- </Stack>
68
- </Container>
@@ -1,21 +0,0 @@
1
- ---
2
- /**
3
- * @component ErrorPageShowcaseContainer
4
- *
5
- * @description
6
- * 错误页面展示示例的容器组件,用于展示代码和预览。
7
- */
8
- import { CodeContainer } from '../../index-astro';
9
- import EErrorPageShowcase from './EErrorPageShowcase.astro';
10
-
11
- import ShowcaseSourceCode from './EErrorPageShowcase.astro?raw';
12
- ---
13
-
14
- <CodeContainer
15
- titles={['错误页面展示']}
16
- descriptions={['展示所有错误页面类型的综合示例']}
17
- codes={[ShowcaseSourceCode]}>
18
- <div id="tab-1">
19
- <EErrorPageShowcase />
20
- </div>
21
- </CodeContainer>
@@ -1,18 +0,0 @@
1
- ---
2
- /**
3
- * @component Footer.Basic
4
- *
5
- * @description
6
- * 基础Footer组件示例,展示最简单的页脚用法。
7
- */
8
- import { Footer } from '../../index-astro';
9
- ---
10
-
11
- <Footer
12
- siteName="我的网站"
13
- homeLink="/"
14
- slogan="简单而强大"
15
- company="我的公司"
16
- copyright="保留所有权利"
17
- inspirationalSlogan="构建美好的数字体验"
18
- />