@coffic/cosy-ui 0.6.26 → 0.6.30

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 (126) hide show
  1. package/README.md +1 -0
  2. package/dist/{components/base → alert}/Alert.astro +6 -3
  3. package/dist/alert/AlertBasic.astro +11 -0
  4. package/dist/alert/AlertCustomStyle.astro +14 -0
  5. package/dist/alert/AlertTypes.astro +17 -0
  6. package/dist/alert/AlertWithTitle.astro +12 -0
  7. package/dist/alert/index.ts +20 -0
  8. package/dist/app.css +1 -1
  9. package/dist/{components/typography → article}/Article.astro +2 -2
  10. package/dist/article/ArticleBasic.astro +31 -0
  11. package/dist/article/index.ts +11 -0
  12. package/dist/{components/base → button}/Button.astro +1 -2
  13. package/dist/button/ButtonBasic.astro +18 -0
  14. package/dist/button/ButtonShapes.astro +23 -0
  15. package/dist/button/ButtonSizes.astro +15 -0
  16. package/dist/button/ButtonStates.astro +12 -0
  17. package/dist/button/ButtonWithIcons.astro +25 -0
  18. package/dist/button/index.ts +23 -0
  19. package/dist/components/containers/Main.astro +1 -2
  20. package/dist/components/data-display/ProductCard.astro +2 -1
  21. package/dist/components/data-display/TeamMember.astro +2 -1
  22. package/dist/components/data-display/TeamMembers.astro +2 -1
  23. package/dist/components/display/Hero.astro +1 -1
  24. package/dist/components/display/Modal.astro +1 -1
  25. package/dist/{components/errors → errors}/404.astro +1 -1
  26. package/dist/errors/404Basic.astro +5 -0
  27. package/dist/errors/index.ts +11 -0
  28. package/dist/flex/FlexBasic.astro +9 -0
  29. package/dist/flex/index.ts +11 -0
  30. package/dist/{components/layouts → footer}/Footer.astro +8 -8
  31. package/dist/footer/FooterBasic.astro +12 -0
  32. package/dist/footer/FooterSection.astro +46 -0
  33. package/dist/footer/index.ts +11 -0
  34. package/dist/{components/layouts → grid}/Grid.astro +1 -1
  35. package/dist/grid/GridBasic.astro +9 -0
  36. package/dist/grid/index.ts +11 -0
  37. package/dist/{components/layouts → header}/Header.astro +20 -56
  38. package/dist/header/HeaderBasic.astro +14 -0
  39. package/dist/header/HeaderCustomNavbarCenter.astro +23 -0
  40. package/dist/header/HeaderCustomNavbarEnd.astro +20 -0
  41. package/dist/header/HeaderCustomNavbarStart.astro +20 -0
  42. package/dist/header/HeaderCustomPosition.astro +23 -0
  43. package/dist/header/HeaderWithNavigation.astro +22 -0
  44. package/dist/header/index.ts +26 -0
  45. package/dist/{components/typography → heading}/Heading.astro +2 -2
  46. package/dist/heading/HeadingBasic.astro +10 -0
  47. package/dist/heading/index.ts +11 -0
  48. package/dist/{components/base → image}/Image.astro +9 -7
  49. package/dist/image/ImageBasic.astro +1 -0
  50. package/dist/image/ImageEffects.astro +32 -0
  51. package/dist/image/ImageLoading.astro +35 -0
  52. package/dist/image/index.ts +17 -0
  53. package/dist/index.ts +2 -95
  54. package/dist/index_astro.ts +78 -0
  55. package/dist/index_utils.ts +8 -0
  56. package/dist/{components/navigation → language-switcher}/LanguageSwitcher.astro +3 -3
  57. package/dist/language-switcher/LanguageSwitcherBasic.astro +7 -0
  58. package/dist/language-switcher/index.ts +11 -0
  59. package/dist/{components/layouts → layout-app}/AppLayout.astro +25 -5
  60. package/dist/layout-app/AppLayoutBasic.astro +53 -0
  61. package/dist/layout-app/index.ts +11 -0
  62. package/dist/{components/layouts → layout-basic}/BaseLayout.astro +2 -2
  63. package/dist/layout-basic/BaseLayoutBasic.astro +16 -0
  64. package/dist/layout-basic/index.ts +11 -0
  65. package/dist/{components/layouts → layout-dashboard}/DashboardLayout.astro +2 -2
  66. package/dist/layout-dashboard/DashboardLayoutBasic.astro +48 -0
  67. package/dist/layout-dashboard/index.ts +11 -0
  68. package/dist/{components/base → link}/Link.astro +1 -1
  69. package/dist/link/LinkAnimations.astro +21 -0
  70. package/dist/link/LinkBasic.astro +17 -0
  71. package/dist/link/LinkVariants.astro +20 -0
  72. package/dist/link/index.ts +17 -0
  73. package/dist/module/Module.astro +61 -0
  74. package/dist/module/ModuleBasic.astro +12 -0
  75. package/dist/module/ModuleCustom.astro +14 -0
  76. package/dist/module/ModuleGrid.astro +26 -0
  77. package/dist/module/index.ts +17 -0
  78. package/dist/{components/layouts → nav-item}/NavItems.astro +2 -3
  79. package/dist/nav-item/NavItemsBasic.astro +27 -0
  80. package/dist/nav-item/index.ts +11 -0
  81. package/dist/nav-section/NavSection.astro +42 -0
  82. package/dist/nav-section/NavSectionBasic.astro +12 -0
  83. package/dist/nav-section/index.ts +11 -0
  84. package/dist/{components/layouts → sidebar}/Sidebar.astro +5 -6
  85. package/dist/sidebar/SidebarBasic.astro +1 -0
  86. package/dist/sidebar/index.ts +11 -0
  87. package/dist/{components/layouts → sidebar-nav}/SidebarNav.astro +3 -3
  88. package/dist/sidebar-nav/SidebarNavBasic.astro +32 -0
  89. package/dist/sidebar-nav/index.ts +11 -0
  90. package/dist/speak/Speak.astro +65 -0
  91. package/dist/speak/SpeakBasic.astro +13 -0
  92. package/dist/speak/SpeakGrid.astro +29 -0
  93. package/dist/speak/index.ts +14 -0
  94. package/dist/{components/layouts → stack}/Stack.astro +1 -1
  95. package/dist/stack/StackBasic.astro +15 -0
  96. package/dist/stack/index.ts +11 -0
  97. package/dist/{components/typography → text}/Text.astro +1 -1
  98. package/dist/text/TextBasic.astro +12 -0
  99. package/dist/text/TextSizes.astro +11 -0
  100. package/dist/text/index.ts +11 -0
  101. package/dist/theme-item/ThemeItem.astro +45 -0
  102. package/dist/theme-item/ThemeItemBasic.astro +10 -0
  103. package/dist/theme-item/index.ts +11 -0
  104. package/dist/{components/navigation → theme-switcher}/ThemeSwitcher.astro +4 -4
  105. package/dist/theme-switcher/ThemeSwitcherBasic.astro +7 -0
  106. package/dist/theme-switcher/index.ts +11 -0
  107. package/dist/{components/navigation → toc}/TableOfContents.astro +3 -3
  108. package/dist/toc/TableOfContentsBasic.astro +25 -0
  109. package/dist/toc/index.ts +11 -0
  110. package/dist/types/image.ts +16 -0
  111. package/dist/types/menu.ts +24 -0
  112. package/dist/utils/component.ts +39 -0
  113. package/dist/vue/AlertDialog/index.ts +3 -41
  114. package/dist/vue/BannerBox/index.ts +9 -44
  115. package/dist/vue/BlogList/index.ts +5 -27
  116. package/dist/vue/Buttons/index.ts +5 -27
  117. package/dist/vue/ConfirmDialog/index.ts +3 -41
  118. package/dist/vue/MacWindow/index.ts +7 -21
  119. package/dist/vue/SmartHero/index.ts +4 -26
  120. package/dist/vue/iPhone/index.ts +5 -18
  121. package/package.json +7 -7
  122. package/dist/components/base/Module.astro +0 -18
  123. package/dist/components/base/Speak.astro +0 -22
  124. package/dist/components/base/ThemeItem.astro +0 -21
  125. package/dist/components/layouts/NavSection.astro +0 -32
  126. /package/dist/{components/layouts → flex}/Flex.astro +0 -0
package/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![English](https://img.shields.io/badge/English-violet)](README.md)
4
4
  [![简体中文](https://img.shields.io/badge/中文文档-gray)](README-zh.md)
5
+ [![Release](https://img.shields.io/github/v/release/cofficlab/cosy-ui?style=flat-square&logo=github&color=blue)](https://github.com/yuaotian/go-cursor-help/releases/latest)
5
6
  [![DEV](https://img.shields.io/badge/DEV-gray)](README-dev.md)
6
7
  [![NPM](https://img.shields.io/badge/NPM-orange)](https://www.npmjs.com/package/@coffic/cosy-ui)
7
8
  ![NPM Downloads](https://img.shields.io/npm/dm/%40coffic%2Fcosy-ui)
@@ -36,9 +36,12 @@
36
36
  * @slot default - 提示内容
37
37
  */
38
38
 
39
- // 导入其他资源必须使用相对路径
40
- import '../../style.ts';
41
- import { InfoIcon, SuccessIcon, WarningIcon, ErrorIcon } from '../../index';
39
+ // 注意:
40
+ // 1. 导入样式文件才能正确处理文件中使用的class
41
+ // 2. 所有的导入必须使用相对路径
42
+
43
+ import '../style.ts';
44
+ import { InfoIcon, SuccessIcon, WarningIcon, ErrorIcon } from '../index';
42
45
 
43
46
  interface Props {
44
47
  type?: 'info' | 'success' | 'warning' | 'error';
@@ -0,0 +1,11 @@
1
+ ---
2
+ /**
3
+ * @component Alert.Basic
4
+ *
5
+ * @description
6
+ * 基础Alert组件示例,展示最简单的信息提示用法。
7
+ */
8
+ import { Alert } from '../index';
9
+ ---
10
+
11
+ <Alert type="info">这是一条信息提示</Alert>
@@ -0,0 +1,14 @@
1
+ ---
2
+ /**
3
+ * @component Alert.CustomStyle
4
+ *
5
+ * @description
6
+ * 展示如何使用class属性自定义Alert组件的样式。
7
+ */
8
+ import '../style.ts';
9
+ import { Alert } from '../index';
10
+ ---
11
+
12
+ <Alert type="info" class="cosy:bg-purple-100 cosy:text-purple-800 cosy:border-purple-300">
13
+ 这是一个自定义样式的提示框
14
+ </Alert>
@@ -0,0 +1,17 @@
1
+ ---
2
+ /**
3
+ * @component Alert.Types
4
+ *
5
+ * @description
6
+ * 展示Alert组件的所有类型:info、success、warning、error。
7
+ */
8
+ import '../style.ts';
9
+ import { Alert } from '../index';
10
+ ---
11
+
12
+ <div class="cosy:flex cosy:flex-col cosy:gap-4">
13
+ <Alert type="info">这是一条信息提示</Alert>
14
+ <Alert type="success">这是一条成功提示</Alert>
15
+ <Alert type="warning">这是一条警告提示</Alert>
16
+ <Alert type="error">这是一条错误提示</Alert>
17
+ </div>
@@ -0,0 +1,12 @@
1
+ ---
2
+ /**
3
+ * @component Alert.WithTitle
4
+ *
5
+ * @description
6
+ * 带标题的Alert组件示例,展示如何使用title属性添加标题。
7
+ */
8
+ import '../style.ts';
9
+ import { Alert } from '../index';
10
+ ---
11
+
12
+ <Alert type="success" title="操作成功">您的操作已成功完成</Alert>
@@ -0,0 +1,20 @@
1
+ import Alert from './Alert.astro';
2
+ import AlertBasic from './AlertBasic.astro';
3
+ import AlertWithTitle from './AlertWithTitle.astro';
4
+ import AlertTypes from './AlertTypes.astro';
5
+ import AlertCustomStyle from './AlertCustomStyle.astro';
6
+ import BasicSourceCode from './AlertBasic.astro?raw';
7
+ import WithTitleSourceCode from './AlertWithTitle.astro?raw';
8
+ import TypesSourceCode from './AlertTypes.astro?raw';
9
+ import CustomStyleSourceCode from './AlertCustomStyle.astro?raw';
10
+ import { extractSimpleExample } from '../utils/component';
11
+
12
+ export { Alert, AlertBasic, AlertWithTitle, AlertTypes, AlertCustomStyle, };
13
+
14
+ // 导出示例源代码
15
+ export const AlertExampleCodes = {
16
+ Basic: extractSimpleExample(BasicSourceCode, 'Alert'),
17
+ WithTitle: extractSimpleExample(WithTitleSourceCode, 'Alert'),
18
+ Types: extractSimpleExample(TypesSourceCode, 'Alert'),
19
+ CustomStyle: extractSimpleExample(CustomStyleSourceCode, 'Alert'),
20
+ };