@coffic/cosy-ui 0.8.13 → 0.8.16
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.
- package/README.md +31 -0
- package/dist/index-vue.ts +2 -2
- package/dist/{vue/buttons-vue → src-vue/buttons}/Button.vue +14 -19
- package/dist/{vue/icons-vue → src-vue/icons}/VueIcon.vue +3 -13
- package/package.json +1 -1
- /package/dist/{vue → src-vue}/SmartLink.vue +0 -0
- /package/dist/{vue → src-vue}/TagList.vue +0 -0
- /package/dist/{vue → src-vue}/alert-dialog-vue/AlertDialog.vue +0 -0
- /package/dist/{vue → src-vue}/alert-dialog-vue/Basic.vue +0 -0
- /package/dist/{vue → src-vue}/alert-dialog-vue/Multilang.vue +0 -0
- /package/dist/{vue → src-vue}/alert-dialog-vue/index.ts +0 -0
- /package/dist/{vue → src-vue}/banner-box-vue/BannerBox.vue +0 -0
- /package/dist/{vue → src-vue}/banner-box-vue/DownloadButton.vue +0 -0
- /package/dist/{vue → src-vue}/banner-box-vue/ExampleBasic.vue +0 -0
- /package/dist/{vue → src-vue}/banner-box-vue/ExampleCustomBg.vue +0 -0
- /package/dist/{vue → src-vue}/banner-box-vue/ExampleDisplayModeAlways.vue +0 -0
- /package/dist/{vue → src-vue}/banner-box-vue/ExampleDisplayModeHover.vue +0 -0
- /package/dist/{vue → src-vue}/banner-box-vue/ExampleDisplayModeNever.vue +0 -0
- /package/dist/{vue → src-vue}/banner-box-vue/ExampleImageExport.vue +0 -0
- /package/dist/{vue → src-vue}/banner-box-vue/ExampleSizePreset.vue +0 -0
- /package/dist/{vue → src-vue}/banner-box-vue/FeatureCard.vue +0 -0
- /package/dist/{vue → src-vue}/banner-box-vue/SmartBanner.vue +0 -0
- /package/dist/{vue → src-vue}/banner-box-vue/bgStyles.ts +0 -0
- /package/dist/{vue → src-vue}/banner-box-vue/index.ts +0 -0
- /package/dist/{vue → src-vue}/banner-box-vue/sizePresets.ts +0 -0
- /package/dist/{vue → src-vue}/blog-vue/Basic.vue +0 -0
- /package/dist/{vue → src-vue}/blog-vue/BlogList.vue +0 -0
- /package/dist/{vue → src-vue}/blog-vue/Empty.vue +0 -0
- /package/dist/{vue → src-vue}/blog-vue/EmptyEnglish.vue +0 -0
- /package/dist/{vue → src-vue}/blog-vue/English.vue +0 -0
- /package/dist/{vue → src-vue}/blog-vue/index.ts +0 -0
- /package/dist/{vue/buttons-vue → src-vue/buttons}/ButtonBasic.vue +0 -0
- /package/dist/{vue/buttons-vue → src-vue/buttons}/ButtonFeature.vue +0 -0
- /package/dist/{vue/buttons-vue → src-vue/buttons}/ButtonFeatureBasic.vue +0 -0
- /package/dist/{vue/buttons-vue → src-vue/buttons}/ButtonFeatureWithTips.vue +0 -0
- /package/dist/{vue/buttons-vue → src-vue/buttons}/ButtonLink.vue +0 -0
- /package/dist/{vue/buttons-vue → src-vue/buttons}/ButtonSizes.vue +0 -0
- /package/dist/{vue/buttons-vue → src-vue/buttons}/ButtonVariants.vue +0 -0
- /package/dist/{vue/buttons-vue → src-vue/buttons}/ButtonWithIcons.vue +0 -0
- /package/dist/{vue/buttons-vue → src-vue/buttons}/index.ts +0 -0
- /package/dist/{vue → src-vue}/confirm-dialog-vue/Basic.vue +0 -0
- /package/dist/{vue → src-vue}/confirm-dialog-vue/ConfirmDialog.vue +0 -0
- /package/dist/{vue → src-vue}/confirm-dialog-vue/CustomButtons.vue +0 -0
- /package/dist/{vue → src-vue}/confirm-dialog-vue/index.ts +0 -0
- /package/dist/{vue → src-vue}/cosy.ts +0 -0
- /package/dist/{vue → src-vue}/counter-vue/VueCounter.vue +0 -0
- /package/dist/{vue → src-vue}/counter-vue/index.ts +0 -0
- /package/dist/{vue → src-vue}/iPhone-vue/Basic.vue +0 -0
- /package/dist/{vue → src-vue}/iPhone-vue/CustomBackground.vue +0 -0
- /package/dist/{vue → src-vue}/iPhone-vue/NoFrame.vue +0 -0
- /package/dist/{vue → src-vue}/iPhone-vue/WeatherApp.vue +0 -0
- /package/dist/{vue → src-vue}/iPhone-vue/assets/iPhone 14 Pro - Deep Purple - Landscape.png +0 -0
- /package/dist/{vue → src-vue}/iPhone-vue/assets/iPhone 14 Pro - Deep Purple - Portrait.png +0 -0
- /package/dist/{vue → src-vue}/iPhone-vue/assets/iPhone 14 Pro - Gold - Landscape.png +0 -0
- /package/dist/{vue → src-vue}/iPhone-vue/assets/iPhone 14 Pro - Gold - Portrait.png +0 -0
- /package/dist/{vue → src-vue}/iPhone-vue/assets/iPhone 14 Pro - Silver - Landscape.png +0 -0
- /package/dist/{vue → src-vue}/iPhone-vue/assets/iPhone 14 Pro - Silver - Portrait.png +0 -0
- /package/dist/{vue → src-vue}/iPhone-vue/assets/iPhone 14 Pro - Space Black - Landscape.png +0 -0
- /package/dist/{vue → src-vue}/iPhone-vue/assets/iPhone 14 Pro - Space Black - Portrait.png +0 -0
- /package/dist/{vue → src-vue}/iPhone-vue/iPhoneWindow.vue +0 -0
- /package/dist/{vue → src-vue}/iPhone-vue/index.ts +0 -0
- /package/dist/{vue/icons-vue → src-vue/icons}/AlertTriangleIcon.vue +0 -0
- /package/dist/{vue/icons-vue → src-vue/icons}/CalendarIcon.vue +0 -0
- /package/dist/{vue/icons-vue → src-vue/icons}/CheckCircleIcon.vue +0 -0
- /package/dist/{vue/icons-vue → src-vue/icons}/CheckIcon.vue +0 -0
- /package/dist/{vue/icons-vue → src-vue/icons}/ChevronDownIcon.vue +0 -0
- /package/dist/{vue/icons-vue → src-vue/icons}/ClipboardIcon.vue +0 -0
- /package/dist/{vue/icons-vue → src-vue/icons}/CloseIcon.vue +0 -0
- /package/dist/{vue/icons-vue → src-vue/icons}/InboxArchiveIcon.vue +0 -0
- /package/dist/{vue/icons-vue → src-vue/icons}/InfoCircleIcon.vue +0 -0
- /package/dist/{vue/icons-vue → src-vue/icons}/InfoIcon.vue +0 -0
- /package/dist/{vue/icons-vue → src-vue/icons}/LinkIcon.vue +0 -0
- /package/dist/{vue/icons-vue → src-vue/icons}/MenuIcon.vue +0 -0
- /package/dist/{vue/icons-vue → src-vue/icons}/SearchIcon.vue +0 -0
- /package/dist/{vue/icons-vue → src-vue/icons}/SettingsIcon.vue +0 -0
- /package/dist/{vue/icons-vue → src-vue/icons}/UserIcon.vue +0 -0
- /package/dist/{vue/icons-vue → src-vue/icons}/XCircleIcon.vue +0 -0
- /package/dist/{vue/icons-vue → src-vue/icons}/index.ts +0 -0
- /package/dist/{vue → src-vue}/list-vue/ListItem.vue +0 -0
- /package/dist/{vue → src-vue}/list-vue/index.ts +0 -0
- /package/dist/{vue → src-vue}/mac-window-vue/Basic.vue +0 -0
- /package/dist/{vue → src-vue}/mac-window-vue/CustomHeight.vue +0 -0
- /package/dist/{vue → src-vue}/mac-window-vue/MacWindow.vue +0 -0
- /package/dist/{vue → src-vue}/mac-window-vue/WithEvents.vue +0 -0
- /package/dist/{vue → src-vue}/mac-window-vue/WithSidebar.vue +0 -0
- /package/dist/{vue → src-vue}/mac-window-vue/WithTabs.vue +0 -0
- /package/dist/{vue → src-vue}/mac-window-vue/WithToolbar.vue +0 -0
- /package/dist/{vue → src-vue}/mac-window-vue/index.ts +0 -0
- /package/dist/{vue → src-vue}/utils/component.ts +0 -0
- /package/dist/{vue → src-vue}/utils/i18n.ts +0 -0
- /package/dist/{vue → src-vue}/utils/image.ts +0 -0
- /package/dist/{vue → src-vue}/utils/lang_entry.ts +0 -0
- /package/dist/{vue → src-vue}/utils/lang_package.ts +0 -0
- /package/dist/{vue → src-vue}/utils/language.ts +0 -0
- /package/dist/{vue → src-vue}/utils/link.ts +0 -0
- /package/dist/{vue → src-vue}/utils/logger.ts +0 -0
- /package/dist/{vue → src-vue}/utils/path.ts +0 -0
- /package/dist/{vue → src-vue}/utils/social.ts +0 -0
- /package/dist/{vue → src-vue}/utils/theme.ts +0 -0
- /package/dist/{vue → src-vue}/utils/url.ts +0 -0
package/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Cosy UI
|
2
|
+
|
3
|
+
[](README.md)
|
4
|
+
[](docs/README-zh.md)
|
5
|
+
[](https://github.com/yuaotian/go-cursor-help/releases/latest)
|
6
|
+
[](README-dev.md)
|
7
|
+
[](https://www.npmjs.com/package/@coffic/cosy-ui)
|
8
|
+

|
9
|
+

|
10
|
+
[](https://coffic.cn)
|
11
|
+
[](https://github.com/nookery)
|
12
|
+

|
13
|
+
|
14
|
+
This is an Astro component library that provides a unified UI style for multiple projects under the same organization.
|
15
|
+
|
16
|
+
## Quick Start
|
17
|
+
|
18
|
+
Installation
|
19
|
+
|
20
|
+
```bash
|
21
|
+
npm install @coffic/cosy-ui
|
22
|
+
```
|
23
|
+
|
24
|
+
Usage in Astro components:
|
25
|
+
|
26
|
+
```js
|
27
|
+
---
|
28
|
+
import { Button } from "@coffic/cosy-ui";
|
29
|
+
---
|
30
|
+
<Button>Hi</Button>
|
31
|
+
```
|
package/dist/index-vue.ts
CHANGED
@@ -14,10 +14,10 @@ export * from './src-vue/counter-vue/index';
|
|
14
14
|
export * from './src-vue/confirm-dialog-vue/index';
|
15
15
|
|
16
16
|
// Buttons
|
17
|
-
export * from './src-vue/buttons
|
17
|
+
export * from './src-vue/buttons/index';
|
18
18
|
|
19
19
|
// Icons
|
20
|
-
export * from './src-vue/icons
|
20
|
+
export * from './src-vue/icons/index';
|
21
21
|
|
22
22
|
// List
|
23
23
|
export * from './src-vue/list-vue/index';
|
@@ -1,19 +1,20 @@
|
|
1
1
|
<script setup lang="ts">
|
2
2
|
import { computed } from 'vue';
|
3
|
+
import '../../style.ts';
|
3
4
|
|
4
5
|
interface Props {
|
5
6
|
variant?:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
7
|
+
| 'primary'
|
8
|
+
| 'secondary'
|
9
|
+
| 'accent'
|
10
|
+
| 'info'
|
11
|
+
| 'success'
|
12
|
+
| 'warning'
|
13
|
+
| 'error'
|
14
|
+
| 'ghost'
|
15
|
+
| 'link'
|
16
|
+
| 'outline'
|
17
|
+
| 'neutral';
|
17
18
|
size?: 'lg' | 'md' | 'sm' | 'xs';
|
18
19
|
shape?: 'circle' | 'square';
|
19
20
|
wide?: boolean;
|
@@ -88,14 +89,8 @@ const buttonClasses = computed(() => {
|
|
88
89
|
</script>
|
89
90
|
|
90
91
|
<template>
|
91
|
-
<component
|
92
|
-
:
|
93
|
-
:class="buttonClasses"
|
94
|
-
:type="props.href ? undefined : props.type"
|
95
|
-
:disabled="props.disabled"
|
96
|
-
:href="props.href"
|
97
|
-
:target="props.target"
|
98
|
-
>
|
92
|
+
<component :is="props.href ? 'a' : 'button'" :class="buttonClasses" :type="props.href ? undefined : props.type"
|
93
|
+
:disabled="props.disabled" :href="props.href" :target="props.target">
|
99
94
|
<span class="cosy:flex cosy:items-center cosy:gap-2">
|
100
95
|
<slot name="icon-left" />
|
101
96
|
<slot />
|
@@ -28,7 +28,7 @@ import { Icon } from 'cosy-ui';
|
|
28
28
|
-->
|
29
29
|
|
30
30
|
<script setup lang="ts">
|
31
|
-
import '../../style.
|
31
|
+
import '../../style.js';
|
32
32
|
import { computed } from 'vue';
|
33
33
|
import { iconData } from '../../assets/iconData';
|
34
34
|
|
@@ -69,18 +69,8 @@ const viewBox = computed(() => {
|
|
69
69
|
</script>
|
70
70
|
|
71
71
|
<template>
|
72
|
-
<svg
|
73
|
-
|
74
|
-
:width="size"
|
75
|
-
:height="size"
|
76
|
-
:viewBox="viewBox"
|
77
|
-
fill="none"
|
78
|
-
:stroke="color"
|
79
|
-
stroke-width="2"
|
80
|
-
stroke-linecap="round"
|
81
|
-
stroke-linejoin="round"
|
82
|
-
:class="props.class"
|
83
|
-
>
|
72
|
+
<svg xmlns="http://www.w3.org/2000/svg" :width="size" :height="size" :viewBox="viewBox" fill="none" :stroke="color"
|
73
|
+
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" :class="props.class">
|
84
74
|
<path v-if="icon" :d="icon.path" />
|
85
75
|
</svg>
|
86
76
|
</template>
|
package/package.json
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|