@coffic/cosy-ui 0.6.42 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) 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/code-container/CodeContainer.astro +2 -2
  14. package/dist/code-container/index.ts +7 -7
  15. package/dist/container/EContainerBasic.astro +13 -0
  16. package/dist/container/EContainerBasicContainer.astro +11 -0
  17. package/dist/container/EContainerFlexBetween.astro +16 -0
  18. package/dist/container/EContainerFlexCenter.astro +23 -0
  19. package/dist/container/EContainerFlexColumn.astro +16 -0
  20. package/dist/container/EContainerFlexContainer.astro +34 -0
  21. package/dist/container/EContainerFlexRow.astro +16 -0
  22. package/dist/container/EContainerPadding.astro +32 -0
  23. package/dist/container/EContainerPaddingContainer.astro +11 -0
  24. package/dist/container/EContainerSizes.astro +36 -0
  25. package/dist/container/EContainerSizesContainer.astro +11 -0
  26. package/dist/container/index.ts +16 -1
  27. package/dist/footer/{FooterBasic.astro → EFooterBasic.astro} +7 -1
  28. package/dist/footer/EFooterBasicContainer.astro +11 -0
  29. package/dist/footer/EFooterComplete.astro +45 -0
  30. package/dist/footer/EFooterCompleteContainer.astro +11 -0
  31. package/dist/footer/EFooterFeaturesContainer.astro +40 -0
  32. package/dist/footer/EFooterWithLogo.astro +23 -0
  33. package/dist/footer/EFooterWithLogoContainer.astro +11 -0
  34. package/dist/footer/EFooterWithNavigation.astro +24 -0
  35. package/dist/footer/EFooterWithNavigationContainer.astro +11 -0
  36. package/dist/footer/EFooterWithProducts.astro +24 -0
  37. package/dist/footer/EFooterWithProductsContainer.astro +11 -0
  38. package/dist/footer/EFooterWithSocial.astro +24 -0
  39. package/dist/footer/EFooterWithSocialContainer.astro +11 -0
  40. package/dist/footer/FooterSection.astro +4 -2
  41. package/dist/footer/index.ts +24 -4
  42. package/dist/icons/index.ts +3 -0
  43. package/dist/index_astro.ts +1 -0
  44. package/package.json +2 -9
  45. package/dist/button/Button.vue +0 -105
  46. package/dist/button/ButtonBasic.vue +0 -11
  47. package/dist/button/ButtonFeature.vue +0 -91
  48. package/dist/button/ButtonFeatureBasic.vue +0 -8
  49. package/dist/button/ButtonFeatureContainer.astro +0 -18
  50. package/dist/button/ButtonFeatureWithTips.vue +0 -7
  51. package/dist/button/ButtonLink.vue +0 -13
  52. package/dist/button/ButtonSizes.vue +0 -12
  53. package/dist/button/ButtonWithIcons.vue +0 -21
  54. package/dist/button/index_vue.ts +0 -4
  55. package/dist/vue/AlertDialog/AlertDialog.vue +0 -120
  56. package/dist/vue/AlertDialog/Basic.vue +0 -38
  57. package/dist/vue/AlertDialog/Multilang.vue +0 -48
  58. package/dist/vue/AlertDialog/index.ts +0 -20
  59. package/dist/vue/BannerBox/BannerBox.vue +0 -296
  60. package/dist/vue/BannerBox/DownloadButton.vue +0 -202
  61. package/dist/vue/BannerBox/ExampleBasic.vue +0 -32
  62. package/dist/vue/BannerBox/ExampleCustomBg.vue +0 -32
  63. package/dist/vue/BannerBox/ExampleDisplayModeAlways.vue +0 -34
  64. package/dist/vue/BannerBox/ExampleDisplayModeHover.vue +0 -34
  65. package/dist/vue/BannerBox/ExampleDisplayModeNever.vue +0 -34
  66. package/dist/vue/BannerBox/ExampleImageExport.vue +0 -37
  67. package/dist/vue/BannerBox/ExampleSizePreset.vue +0 -35
  68. package/dist/vue/BannerBox/FeatureCard.vue +0 -190
  69. package/dist/vue/BannerBox/SmartBanner.vue +0 -44
  70. package/dist/vue/BannerBox/bgStyles.ts +0 -55
  71. package/dist/vue/BannerBox/index.ts +0 -48
  72. package/dist/vue/BannerBox/sizePresets.ts +0 -23
  73. package/dist/vue/BlogList/Basic.vue +0 -30
  74. package/dist/vue/BlogList/BlogList.vue +0 -100
  75. package/dist/vue/BlogList/Empty.vue +0 -8
  76. package/dist/vue/BlogList/EmptyEnglish.vue +0 -8
  77. package/dist/vue/BlogList/English.vue +0 -24
  78. package/dist/vue/BlogList/index.ts +0 -29
  79. package/dist/vue/ConfirmDialog/Basic.vue +0 -57
  80. package/dist/vue/ConfirmDialog/ConfirmDialog.vue +0 -134
  81. package/dist/vue/ConfirmDialog/CustomButtons.vue +0 -69
  82. package/dist/vue/ConfirmDialog/index.ts +0 -20
  83. package/dist/vue/Icons/AlertTriangleIcon.vue +0 -30
  84. package/dist/vue/Icons/CalendarIcon.vue +0 -30
  85. package/dist/vue/Icons/CheckCircleIcon.vue +0 -30
  86. package/dist/vue/Icons/CheckIcon.vue +0 -30
  87. package/dist/vue/Icons/ChevronDownIcon.vue +0 -30
  88. package/dist/vue/Icons/ClipboardIcon.vue +0 -30
  89. package/dist/vue/Icons/CloseIcon.vue +0 -30
  90. package/dist/vue/Icons/InboxArchiveIcon.vue +0 -30
  91. package/dist/vue/Icons/InfoCircleIcon.vue +0 -30
  92. package/dist/vue/Icons/InfoIcon.vue +0 -30
  93. package/dist/vue/Icons/LinkIcon.vue +0 -30
  94. package/dist/vue/Icons/MenuIcon.vue +0 -30
  95. package/dist/vue/Icons/SearchIcon.vue +0 -30
  96. package/dist/vue/Icons/SettingsIcon.vue +0 -30
  97. package/dist/vue/Icons/UserIcon.vue +0 -30
  98. package/dist/vue/Icons/VueIcon.vue +0 -76
  99. package/dist/vue/Icons/XCircleIcon.vue +0 -30
  100. package/dist/vue/ListItem.vue +0 -5
  101. package/dist/vue/MacWindow/Basic.vue +0 -11
  102. package/dist/vue/MacWindow/CustomHeight.vue +0 -13
  103. package/dist/vue/MacWindow/MacWindow.vue +0 -262
  104. package/dist/vue/MacWindow/WithEvents.vue +0 -34
  105. package/dist/vue/MacWindow/WithSidebar.vue +0 -21
  106. package/dist/vue/MacWindow/WithTabs.vue +0 -21
  107. package/dist/vue/MacWindow/WithToolbar.vue +0 -43
  108. package/dist/vue/MacWindow/index.ts +0 -36
  109. package/dist/vue/SmartLink.vue +0 -17
  110. package/dist/vue/TagList.vue +0 -23
  111. package/dist/vue/VueCounter.vue +0 -29
  112. package/dist/vue/iPhone/Basic.vue +0 -33
  113. package/dist/vue/iPhone/CustomBackground.vue +0 -33
  114. package/dist/vue/iPhone/NoFrame.vue +0 -33
  115. package/dist/vue/iPhone/WeatherApp.vue +0 -97
  116. package/dist/vue/iPhone/assets/iPhone 14 Pro - Deep Purple - Landscape.png +0 -0
  117. package/dist/vue/iPhone/assets/iPhone 14 Pro - Deep Purple - Portrait.png +0 -0
  118. package/dist/vue/iPhone/assets/iPhone 14 Pro - Gold - Landscape.png +0 -0
  119. package/dist/vue/iPhone/assets/iPhone 14 Pro - Gold - Portrait.png +0 -0
  120. package/dist/vue/iPhone/assets/iPhone 14 Pro - Silver - Landscape.png +0 -0
  121. package/dist/vue/iPhone/assets/iPhone 14 Pro - Silver - Portrait.png +0 -0
  122. package/dist/vue/iPhone/assets/iPhone 14 Pro - Space Black - Landscape.png +0 -0
  123. package/dist/vue/iPhone/assets/iPhone 14 Pro - Space Black - Portrait.png +0 -0
  124. package/dist/vue/iPhone/iPhoneWindow.vue +0 -193
  125. package/dist/vue/iPhone/index.ts +0 -28
  126. /package/dist/alert/{AlertBasic.astro → EAlertBasic.astro} +0 -0
  127. /package/dist/alert/{AlertCustomStyle.astro → EAlertCustomStyle.astro} +0 -0
  128. /package/dist/alert/{AlertError.astro → EAlertError.astro} +0 -0
  129. /package/dist/alert/{AlertInfo.astro → EAlertInfo.astro} +0 -0
  130. /package/dist/alert/{AlertSuccess.astro → EAlertSuccess.astro} +0 -0
  131. /package/dist/alert/{AlertWarning.astro → EAlertWarning.astro} +0 -0
  132. /package/dist/alert/{AlertWithTitle.astro → EAlertWithTitle.astro} +0 -0
  133. /package/dist/code-container/{CodeContainerBasic.astro → ECodeContainerBasic.astro} +0 -0
  134. /package/dist/code-container/{CodeContainerMultiple.astro → ECodeContainerMultiple.astro} +0 -0
@@ -1,17 +1,11 @@
1
1
  ---
2
2
  import { CodeContainer } from '../index';
3
3
  import ButtonBasic from './ButtonBasic.astro';
4
- import VueButtonBasic from './ButtonBasic.vue';
5
4
  import ButtonBasicSourceCode from './ButtonBasic.astro?raw';
6
- import VueButtonBasicSourceCode from './ButtonBasic.vue?raw';
7
5
  ---
8
6
 
9
- <CodeContainer codes={[ButtonBasicSourceCode, VueButtonBasicSourceCode]} titles={['Astro', 'Vue']}>
7
+ <CodeContainer codes={[ButtonBasicSourceCode]} titles={['Basic']}>
10
8
  <div id="tab-1">
11
9
  <ButtonBasic />
12
10
  </div>
13
-
14
- <div id="tab-2">
15
- <VueButtonBasic client:load />
16
- </div>
17
11
  </CodeContainer>
@@ -1,16 +1,14 @@
1
1
  ---
2
2
  import { CodeContainer } from '../index';
3
3
  import ButtonLink from './ButtonLink.astro';
4
- import VueButtonLink from './ButtonLink.vue';
5
4
  import ButtonLinkExternal from './ButtonLinkExternal.astro';
6
5
  import ButtonLinkSourceCode from './ButtonLink.astro?raw';
7
- import VueButtonLinkSourceCode from './ButtonLink.vue?raw';
8
6
  import ButtonLinkExternalSourceCode from './ButtonLinkExternal.astro?raw';
9
7
  ---
10
8
 
11
9
  <CodeContainer
12
10
  titles={['基础链接', '外部链接', 'Vue']}
13
- codes={[ButtonLinkSourceCode, ButtonLinkExternalSourceCode, VueButtonLinkSourceCode]}>
11
+ codes={[ButtonLinkSourceCode, ButtonLinkExternalSourceCode]}>
14
12
  <div id="tab-1">
15
13
  <ButtonLink />
16
14
  </div>
@@ -18,8 +16,4 @@ import ButtonLinkExternalSourceCode from './ButtonLinkExternal.astro?raw';
18
16
  <div id="tab-2">
19
17
  <ButtonLinkExternal />
20
18
  </div>
21
-
22
- <div id="tab-3">
23
- <VueButtonLink client:load />
24
- </div>
25
19
  </CodeContainer>
@@ -1,17 +1,11 @@
1
1
  ---
2
2
  import { CodeContainer } from '../index';
3
3
  import ButtonSizes from './ButtonSizes.astro';
4
- import VueButtonSizes from './ButtonSizes.vue';
5
4
  import ButtonSizesSourceCode from './ButtonSizes.astro?raw';
6
- import VueButtonSizesSourceCode from './ButtonSizes.vue?raw';
7
5
  ---
8
6
 
9
- <CodeContainer codes={[ButtonSizesSourceCode, VueButtonSizesSourceCode]} titles={['Astro', 'Vue']}>
7
+ <CodeContainer codes={[ButtonSizesSourceCode]}>
10
8
  <div id="tab-1">
11
9
  <ButtonSizes />
12
10
  </div>
13
-
14
- <div id="tab-2">
15
- <VueButtonSizes client:load />
16
- </div>
17
11
  </CodeContainer>
@@ -8,7 +8,6 @@ import ButtonGhost from './ButtonGhost.astro';
8
8
  import ButtonLink from './ButtonLink.astro';
9
9
  import ButtonOutline from './ButtonOutline.astro';
10
10
  import ButtonNeutral from './ButtonNeutral.astro';
11
- import VueButtonVariants from './ButtonVariants.vue';
12
11
  import ButtonInfoSourceCode from './ButtonInfo.astro?raw';
13
12
  import ButtonSuccessSourceCode from './ButtonSuccess.astro?raw';
14
13
  import ButtonWarningSourceCode from './ButtonWarning.astro?raw';
@@ -17,11 +16,10 @@ import ButtonGhostSourceCode from './ButtonGhost.astro?raw';
17
16
  import ButtonLinkSourceCode from './ButtonLink.astro?raw';
18
17
  import ButtonOutlineSourceCode from './ButtonOutline.astro?raw';
19
18
  import ButtonNeutralSourceCode from './ButtonNeutral.astro?raw';
20
- import VueButtonVariantsSourceCode from './ButtonVariants.vue?raw';
21
19
  ---
22
20
 
23
21
  <CodeContainer
24
- titles={['Info', 'Success', 'Warning', 'Error', 'Ghost', 'Link', 'Outline', 'Neutral', 'Vue']}
22
+ titles={['Info', 'Success', 'Warning', 'Error', 'Ghost', 'Link', 'Outline', 'Neutral']}
25
23
  codes={[
26
24
  ButtonInfoSourceCode,
27
25
  ButtonSuccessSourceCode,
@@ -31,7 +29,6 @@ import VueButtonVariantsSourceCode from './ButtonVariants.vue?raw';
31
29
  ButtonLinkSourceCode,
32
30
  ButtonOutlineSourceCode,
33
31
  ButtonNeutralSourceCode,
34
- VueButtonVariantsSourceCode,
35
32
  ]}>
36
33
  <div id="tab-1">
37
34
  <ButtonInfo />
@@ -64,8 +61,4 @@ import VueButtonVariantsSourceCode from './ButtonVariants.vue?raw';
64
61
  <div id="tab-8">
65
62
  <ButtonNeutral />
66
63
  </div>
67
-
68
- <div id="tab-9">
69
- <VueButtonVariants client:load />
70
- </div>
71
64
  </CodeContainer>
@@ -3,21 +3,14 @@ import { CodeContainer } from '../index';
3
3
  import ButtonIconLeft from './ButtonIconLeft.astro';
4
4
  import ButtonIconRight from './ButtonIconRight.astro';
5
5
  import ButtonIconBoth from './ButtonIconBoth.astro';
6
- import VueButtonWithIcons from './ButtonWithIcons.vue';
7
6
  import ButtonIconLeftSourceCode from './ButtonIconLeft.astro?raw';
8
7
  import ButtonIconRightSourceCode from './ButtonIconRight.astro?raw';
9
8
  import ButtonIconBothSourceCode from './ButtonIconBoth.astro?raw';
10
- import VueButtonWithIconsSourceCode from './ButtonWithIcons.vue?raw';
11
9
  ---
12
10
 
13
11
  <CodeContainer
14
- titles={['左侧图标', '右侧图标', '两侧图标', 'Vue']}
15
- codes={[
16
- ButtonIconLeftSourceCode,
17
- ButtonIconRightSourceCode,
18
- ButtonIconBothSourceCode,
19
- VueButtonWithIconsSourceCode,
20
- ]}>
12
+ titles={['左侧图标', '右侧图标', '两侧图标']}
13
+ codes={[ButtonIconLeftSourceCode, ButtonIconRightSourceCode, ButtonIconBothSourceCode]}>
21
14
  <div id="tab-1">
22
15
  <ButtonIconLeft />
23
16
  </div>
@@ -29,8 +22,4 @@ import VueButtonWithIconsSourceCode from './ButtonWithIcons.vue?raw';
29
22
  <div id="tab-3">
30
23
  <ButtonIconBoth />
31
24
  </div>
32
-
33
- <div id="tab-4">
34
- <VueButtonWithIcons client:load />
35
- </div>
36
25
  </CodeContainer>
@@ -24,7 +24,6 @@ import ButtonLink from './ButtonLink.astro';
24
24
  import ButtonLinkExternal from './ButtonLinkExternal.astro';
25
25
  import ButtonOutline from './ButtonOutline.astro';
26
26
  import ButtonNeutral from './ButtonNeutral.astro';
27
- import ButtonFeatureContainer from './ButtonFeatureContainer.astro';
28
27
 
29
28
  export {
30
29
  Button
@@ -59,6 +58,5 @@ export const ButtonPackage = {
59
58
  Width: ButtonWidthContainer,
60
59
  Variants: ButtonVariantsContainer,
61
60
  Link: ButtonLinkContainer,
62
- Feature: ButtonFeatureContainer,
63
61
  }
64
- };
62
+ };
@@ -84,7 +84,7 @@ const { titles = [], descriptions = [], codes } = Astro.props;
84
84
  data-example={`tab-${index + 1}`}>
85
85
  {/* 描述 */}
86
86
  {descriptions[index] && (
87
- <p class="cosy:px-4 cosy:py-2 cosy:bg-gradient-to-b not-prose cosy:from-blue-100/50 cosy:to-blue-100/90 ">
87
+ <p class="cosy:px-4 cosy:py-2 cosy:text-sm cosy:bg-gradient-to-b not-prose cosy:from-blue-100/50 cosy:to-blue-100/90 ">
88
88
  {descriptions[index]}
89
89
  </p>
90
90
  )}
@@ -113,7 +113,7 @@ const { titles = [], descriptions = [], codes } = Astro.props;
113
113
  const exampleTabs = document.querySelectorAll('[role="tab"][data-tab^="tab-"]');
114
114
  exampleTabs.forEach((tab) => {
115
115
  tab.addEventListener('click', () => {
116
- console.log('CodeContainer: 切换示例', tab);
116
+ console.log('CodeContainer: 切换示例', tab.getAttribute('data-tab'));
117
117
  const container = tab.closest('[data-role="code-container"]');
118
118
  if (!container) return;
119
119
 
@@ -1,14 +1,14 @@
1
1
  import { default as CodeContainer } from './CodeContainer.astro';
2
- import { default as CodeContainerBasic } from './CodeContainerBasic.astro';
3
- import { default as CodeContainerMultiple } from './CodeContainerMultiple.astro';
4
- import BasicSourceCode from './CodeContainerBasic.astro?raw';
5
- import MultipleSourceCode from './CodeContainerMultiple.astro?raw';
2
+ import { default as CodeContainerBasic } from './ECodeContainerBasic.astro';
3
+ import { default as CodeContainerMultiple } from './ECodeContainerMultiple.astro';
4
+ import BasicSourceCode from './ECodeContainerBasic.astro?raw';
5
+ import MultipleSourceCode from './ECodeContainerMultiple.astro?raw';
6
6
  import { extractSimpleExample } from '../utils/component';
7
7
 
8
8
  export { CodeContainer, CodeContainerBasic, CodeContainerMultiple };
9
9
 
10
10
  // 导出示例源代码
11
11
  export const CodeContainerExampleCodes = {
12
- Basic: extractSimpleExample(BasicSourceCode, 'CodeContainer'),
13
- Multiple: extractSimpleExample(MultipleSourceCode, 'CodeContainer'),
14
- };
12
+ Basic: extractSimpleExample(BasicSourceCode, 'CodeContainer'),
13
+ Multiple: extractSimpleExample(MultipleSourceCode, 'CodeContainer'),
14
+ };
@@ -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>
@@ -0,0 +1,36 @@
1
+ ---
2
+ /**
3
+ * @component Container.Sizes
4
+ *
5
+ * @description
6
+ * 展示Container组件的不同尺寸选项:xs、sm、md、lg、xl、full。
7
+ */
8
+ import '../style.ts';
9
+ import { Container } from '../index';
10
+ ---
11
+
12
+ <div class="cosy:space-y-4">
13
+ <Container size="xs" border>
14
+ <p class="cosy:text-center">超小尺寸容器 (xs)</p>
15
+ </Container>
16
+
17
+ <Container size="sm" border>
18
+ <p class="cosy:text-center">小尺寸容器 (sm)</p>
19
+ </Container>
20
+
21
+ <Container size="md" border>
22
+ <p class="cosy:text-center">中等尺寸容器 (md) - 默认</p>
23
+ </Container>
24
+
25
+ <Container size="lg" border>
26
+ <p class="cosy:text-center">大尺寸容器 (lg)</p>
27
+ </Container>
28
+
29
+ <Container size="xl" border>
30
+ <p class="cosy:text-center">超大尺寸容器 (xl)</p>
31
+ </Container>
32
+
33
+ <Container size="full" border>
34
+ <p class="cosy:text-center">全宽容器 (full)</p>
35
+ </Container>
36
+ </div>
@@ -0,0 +1,11 @@
1
+ ---
2
+ import { CodeContainer } from '../index';
3
+ import ContainerSizes from './EContainerSizes.astro';
4
+ import ContainerSizesSourceCode from './EContainerSizes.astro?raw';
5
+ ---
6
+
7
+ <CodeContainer codes={[ContainerSizesSourceCode]}>
8
+ <div id="tab-1">
9
+ <ContainerSizes />
10
+ </div>
11
+ </CodeContainer>
@@ -1 +1,16 @@
1
- export { default as Container } from './Container.astro';
1
+ import Container from './Container.astro';
2
+ import ContainerBasicContainer from './EContainerBasicContainer.astro';
3
+ import ContainerSizesContainer from './EContainerSizesContainer.astro';
4
+ import ContainerPaddingContainer from './EContainerPaddingContainer.astro';
5
+ import ContainerFlexContainer from './EContainerFlexContainer.astro';
6
+
7
+ export { default as Container } from './Container.astro';
8
+ export const ContainerPackage = {
9
+ Container,
10
+ ContainerContainers: {
11
+ Basic: ContainerBasicContainer,
12
+ Sizes: ContainerSizesContainer,
13
+ Padding: ContainerPaddingContainer,
14
+ Flex: ContainerFlexContainer,
15
+ },
16
+ }
@@ -1,5 +1,11 @@
1
1
  ---
2
- import Footer from './Footer.astro';
2
+ /**
3
+ * @component Footer.Basic
4
+ *
5
+ * @description
6
+ * 基础Footer组件示例,展示最简单的页脚用法。
7
+ */
8
+ import { Footer } from '../index';
3
9
  ---
4
10
 
5
11
  <Footer
@@ -0,0 +1,11 @@
1
+ ---
2
+ import { CodeContainer } from '../index';
3
+ import FooterBasic from './EFooterBasic.astro';
4
+ import FooterBasicSourceCode from './EFooterBasic.astro?raw';
5
+ ---
6
+
7
+ <CodeContainer codes={[FooterBasicSourceCode]}>
8
+ <div id="tab-1">
9
+ <FooterBasic />
10
+ </div>
11
+ </CodeContainer>
@@ -0,0 +1,45 @@
1
+ ---
2
+ /**
3
+ * @component Footer.Complete
4
+ *
5
+ * @description
6
+ * 展示完整功能的页脚示例,包含所有主要属性。
7
+ */
8
+ import { Footer } from '../index';
9
+ import { getExampleImage } from '../utils/image';
10
+ ---
11
+
12
+ <Footer
13
+ siteName="我的网站"
14
+ homeLink="/"
15
+ slogan="简单而强大"
16
+ company="我的公司"
17
+ copyright="保留所有权利"
18
+ inspirationalSlogan="构建美好的数字体验"
19
+ logo={{
20
+ src: getExampleImage({ width: 100, height: 100, provider: 'robohash', tag: 'logo' }),
21
+ alt: '网站Logo',
22
+ }}
23
+ products={[
24
+ { name: '产品A', href: '/products/a' },
25
+ { name: '产品B', href: '/products/b' },
26
+ { name: '产品C', href: '/products/c' },
27
+ { name: '外部产品', href: 'https://example.com', external: true },
28
+ ]}
29
+ socialLinks={[
30
+ 'https://github.com/myusername',
31
+ 'https://twitter.com/myusername',
32
+ 'https://linkedin.com/in/myusername',
33
+ 'https://facebook.com/myusername',
34
+ ]}
35
+ aboutLink="/about"
36
+ contactLink="/contact"
37
+ termsLink="/terms"
38
+ privacyLink="/privacy"
39
+ teamLink="/team"
40
+ careersLink="/careers"
41
+ newsLink="/news"
42
+ blogLink="/blog"
43
+ faqLink="/faq"
44
+ icp="京ICP备12345678号"
45
+ />
@@ -0,0 +1,11 @@
1
+ ---
2
+ import { CodeContainer } from '../index';
3
+ import FooterComplete from './EFooterComplete.astro';
4
+ import FooterCompleteSourceCode from './EFooterComplete.astro?raw';
5
+ ---
6
+
7
+ <CodeContainer codes={[FooterCompleteSourceCode]}>
8
+ <div id="tab-1">
9
+ <FooterComplete />
10
+ </div>
11
+ </CodeContainer>
@@ -0,0 +1,40 @@
1
+ ---
2
+ import { CodeContainer } from '../index';
3
+ import FooterBasic from './EFooterBasic.astro';
4
+ import FooterWithSocial from './EFooterWithSocial.astro';
5
+ import FooterWithProducts from './EFooterWithProducts.astro';
6
+ import FooterWithLogo from './EFooterWithLogo.astro';
7
+ import FooterWithNavigation from './EFooterWithNavigation.astro';
8
+
9
+ import FooterBasicSourceCode from './EFooterBasic.astro?raw';
10
+ import FooterWithSocialSourceCode from './EFooterWithSocial.astro?raw';
11
+ import FooterWithProductsSourceCode from './EFooterWithProducts.astro?raw';
12
+ import FooterWithLogoSourceCode from './EFooterWithLogo.astro?raw';
13
+ import FooterWithNavigationSourceCode from './EFooterWithNavigation.astro?raw';
14
+ ---
15
+
16
+ <CodeContainer
17
+ titles={['基础', '社交媒体', '产品链接', 'Logo', '导航链接']}
18
+ codes={[
19
+ FooterBasicSourceCode,
20
+ FooterWithSocialSourceCode,
21
+ FooterWithProductsSourceCode,
22
+ FooterWithLogoSourceCode,
23
+ FooterWithNavigationSourceCode,
24
+ ]}>
25
+ <div id="tab-1">
26
+ <FooterBasic />
27
+ </div>
28
+ <div id="tab-2">
29
+ <FooterWithSocial />
30
+ </div>
31
+ <div id="tab-3">
32
+ <FooterWithProducts />
33
+ </div>
34
+ <div id="tab-4">
35
+ <FooterWithLogo />
36
+ </div>
37
+ <div id="tab-5">
38
+ <FooterWithNavigation />
39
+ </div>
40
+ </CodeContainer>
@@ -0,0 +1,23 @@
1
+ ---
2
+ /**
3
+ * @component Footer.WithLogo
4
+ *
5
+ * @description
6
+ * 展示带有Logo的页脚示例。
7
+ */
8
+ import { Footer } from '../index';
9
+ import { getExampleImage } from '../utils/image';
10
+ ---
11
+
12
+ <Footer
13
+ siteName="我的网站"
14
+ homeLink="/"
15
+ slogan="简单而强大"
16
+ company="我的公司"
17
+ copyright="保留所有权利"
18
+ inspirationalSlogan="构建美好的数字体验"
19
+ logo={{
20
+ src: getExampleImage({ width: 100, height: 100, provider: 'robohash', tag: 'logo' }),
21
+ alt: '网站Logo',
22
+ }}
23
+ />
@@ -0,0 +1,11 @@
1
+ ---
2
+ import { CodeContainer } from '../index';
3
+ import FooterWithLogo from './EFooterWithLogo.astro';
4
+ import FooterWithLogoSourceCode from './EFooterWithLogo.astro?raw';
5
+ ---
6
+
7
+ <CodeContainer codes={[FooterWithLogoSourceCode]}>
8
+ <div id="tab-1">
9
+ <FooterWithLogo />
10
+ </div>
11
+ </CodeContainer>
@@ -0,0 +1,24 @@
1
+ ---
2
+ /**
3
+ * @component Footer.WithNavigation
4
+ *
5
+ * @description
6
+ * 展示带有导航链接的页脚示例。
7
+ */
8
+ import { Footer } from '../index';
9
+ ---
10
+
11
+ <Footer
12
+ siteName="我的网站"
13
+ homeLink="/"
14
+ slogan="简单而强大"
15
+ company="我的公司"
16
+ copyright="保留所有权利"
17
+ inspirationalSlogan="构建美好的数字体验"
18
+ aboutLink="/about"
19
+ contactLink="/contact"
20
+ termsLink="/terms"
21
+ privacyLink="/privacy"
22
+ blogLink="/blog"
23
+ faqLink="/faq"
24
+ />
@@ -0,0 +1,11 @@
1
+ ---
2
+ import { CodeContainer } from '../index';
3
+ import FooterWithNavigation from './EFooterWithNavigation.astro';
4
+ import FooterWithNavigationSourceCode from './EFooterWithNavigation.astro?raw';
5
+ ---
6
+
7
+ <CodeContainer codes={[FooterWithNavigationSourceCode]}>
8
+ <div id="tab-1">
9
+ <FooterWithNavigation />
10
+ </div>
11
+ </CodeContainer>