@zephyr_zz/zephyr-ui 0.0.4 → 0.0.7
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/dist/types/button/ZzButton.d.ts +2 -0
- package/dist/types/button/ZzButton.vue.d.ts +22 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/zephyr-ui.css +1 -0
- package/dist/zephyr-ui.js +35 -0
- package/dist/zephyr-ui.umd.cjs +1 -0
- package/package.json +7 -3
- package/.vscode/extensions.json +0 -3
- package/index.html +0 -13
- package/npm +0 -0
- package/packages/button/ZzButton.ts +0 -7
- package/packages/button/ZzButton.vue +0 -53
- package/packages/index.ts +0 -10
- package/src/App.vue +0 -9
- package/src/assets/vue.svg +0 -1
- package/src/main.ts +0 -8
- package/src/style.css +0 -79
- package/tsconfig.app.json +0 -16
- package/tsconfig.json +0 -15
- package/tsconfig.node.json +0 -26
- package/tsconfig.tsbuildinfo +0 -1
- package/vite.config.ts +0 -23
- /package/{public → dist}/vite.svg +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
type: {
|
|
4
|
+
type: PropType<"primary" | "success" | "warning" | "danger">;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
8
|
+
type: {
|
|
9
|
+
type: PropType<"primary" | "success" | "warning" | "danger">;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
}>> & Readonly<{}>, {
|
|
13
|
+
type: "primary" | "success" | "warning" | "danger";
|
|
14
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>, {
|
|
15
|
+
default?(_: {}): any;
|
|
16
|
+
}>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.zz-button[data-v-7c55743a]{padding:8px 16px;border:none;border-radius:4px;cursor:pointer;font-weight:500;transition:.2s}.zz-button--primary[data-v-7c55743a]{background:#409eff;color:#fff}.zz-button--success[data-v-7c55743a]{background:#67c23a;color:#fff}.zz-button--warning[data-v-7c55743a]{background:#e6a23c;color:#fff}.zz-button--danger[data-v-7c55743a]{background:#f56c6c;color:#fff}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineComponent as a, createElementBlock as c, openBlock as l, normalizeClass as p, renderSlot as u } from "vue";
|
|
2
|
+
const _ = {
|
|
3
|
+
name: "ZzButton"
|
|
4
|
+
}, m = /* @__PURE__ */ a({
|
|
5
|
+
..._,
|
|
6
|
+
props: {
|
|
7
|
+
type: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: "primary"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
setup(t) {
|
|
13
|
+
return (o, n) => (l(), c("button", {
|
|
14
|
+
class: p(["zz-button", `zz-button--${t.type}`])
|
|
15
|
+
}, [
|
|
16
|
+
u(o.$slots, "default", {}, void 0, !0)
|
|
17
|
+
], 2));
|
|
18
|
+
}
|
|
19
|
+
}), d = (t, o) => {
|
|
20
|
+
const n = t.__vccOpts || t;
|
|
21
|
+
for (const [s, r] of o)
|
|
22
|
+
n[s] = r;
|
|
23
|
+
return n;
|
|
24
|
+
}, e = /* @__PURE__ */ d(m, [["__scopeId", "data-v-7c55743a"]]);
|
|
25
|
+
e.install = (t) => {
|
|
26
|
+
t.component(e.name, e);
|
|
27
|
+
};
|
|
28
|
+
const f = (t) => {
|
|
29
|
+
t.use(e);
|
|
30
|
+
}, z = {
|
|
31
|
+
install: f
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
z as default
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("vue")):typeof define=="function"&&define.amd?define(["vue"],n):(e=typeof globalThis<"u"?globalThis:e||self,e.ZephyrUI=n(e.Vue))})(this,(function(e){"use strict";const n={name:"ZzButton"},c=e.defineComponent({...n,props:{type:{type:String,default:"primary"}},setup(t){return(s,r)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["zz-button",`zz-button--${t.type}`])},[e.renderSlot(s.$slots,"default",{},void 0,!0)],2))}}),o=((t,s)=>{const r=t.__vccOpts||t;for(const[p,u]of s)r[p]=u;return r})(c,[["__scopeId","data-v-7c55743a"]]);return o.install=t=>{t.component(o.name,o)},{install:t=>{t.use(o)}}}));
|
package/package.json
CHANGED
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"require": "./dist/zephyrUi.umd.js"
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
|
-
"version": "0.0.
|
|
13
|
+
"version": "0.0.7",
|
|
14
14
|
"type": "module",
|
|
15
15
|
"scripts": {
|
|
16
16
|
"dev": "vite",
|
|
17
|
-
"build": "vite build
|
|
17
|
+
"build": "vite build",
|
|
18
18
|
"preview": "vite preview"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
@@ -28,6 +28,10 @@
|
|
|
28
28
|
"sass-embedded": "^1.93.2",
|
|
29
29
|
"typescript": "~5.9.3",
|
|
30
30
|
"vite": "^7.1.7",
|
|
31
|
+
"vite-plugin-dts": "^4.5.4",
|
|
31
32
|
"vue-tsc": "^3.1.0"
|
|
32
|
-
}
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist"
|
|
36
|
+
]
|
|
33
37
|
}
|
package/.vscode/extensions.json
DELETED
package/index.html
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>project-code</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="app"></div>
|
|
11
|
-
<script type="module" src="/src/main.ts"></script>
|
|
12
|
-
</body>
|
|
13
|
-
</html>
|
package/npm
DELETED
|
File without changes
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<button class="zz-button" :class="`zz-button--${type}`">
|
|
3
|
-
<slot />
|
|
4
|
-
</button>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script setup lang="ts">
|
|
8
|
-
import type { PropType } from 'vue';
|
|
9
|
-
|
|
10
|
-
defineProps({
|
|
11
|
-
type: {
|
|
12
|
-
type: String as PropType<'primary' | 'success' | 'warning' | 'danger'>,
|
|
13
|
-
default: 'primary'
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<script lang="ts">
|
|
19
|
-
export default {
|
|
20
|
-
name: "ZzButton",
|
|
21
|
-
};
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<style scoped lang="scss">
|
|
25
|
-
.zz-button {
|
|
26
|
-
padding: 8px 16px;
|
|
27
|
-
border: none;
|
|
28
|
-
border-radius: 4px;
|
|
29
|
-
cursor: pointer;
|
|
30
|
-
font-weight: 500;
|
|
31
|
-
transition: 0.2s;
|
|
32
|
-
|
|
33
|
-
&--primary {
|
|
34
|
-
background: #409eff;
|
|
35
|
-
color: white;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&--success {
|
|
39
|
-
background: #67c23a;
|
|
40
|
-
color: white;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&--warning {
|
|
44
|
-
background: #e6a23c;
|
|
45
|
-
color: white;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&--danger {
|
|
49
|
-
background: #f56c6c;
|
|
50
|
-
color: white;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
</style>
|
package/packages/index.ts
DELETED
package/src/App.vue
DELETED
package/src/assets/vue.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
package/src/main.ts
DELETED
package/src/style.css
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400;
|
|
5
|
-
|
|
6
|
-
color-scheme: light dark;
|
|
7
|
-
color: rgba(255, 255, 255, 0.87);
|
|
8
|
-
background-color: #242424;
|
|
9
|
-
|
|
10
|
-
font-synthesis: none;
|
|
11
|
-
text-rendering: optimizeLegibility;
|
|
12
|
-
-webkit-font-smoothing: antialiased;
|
|
13
|
-
-moz-osx-font-smoothing: grayscale;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
a {
|
|
17
|
-
font-weight: 500;
|
|
18
|
-
color: #646cff;
|
|
19
|
-
text-decoration: inherit;
|
|
20
|
-
}
|
|
21
|
-
a:hover {
|
|
22
|
-
color: #535bf2;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
body {
|
|
26
|
-
margin: 0;
|
|
27
|
-
display: flex;
|
|
28
|
-
place-items: center;
|
|
29
|
-
min-width: 320px;
|
|
30
|
-
min-height: 100vh;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
h1 {
|
|
34
|
-
font-size: 3.2em;
|
|
35
|
-
line-height: 1.1;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
button {
|
|
39
|
-
border-radius: 8px;
|
|
40
|
-
border: 1px solid transparent;
|
|
41
|
-
padding: 0.6em 1.2em;
|
|
42
|
-
font-size: 1em;
|
|
43
|
-
font-weight: 500;
|
|
44
|
-
font-family: inherit;
|
|
45
|
-
background-color: #1a1a1a;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
transition: border-color 0.25s;
|
|
48
|
-
}
|
|
49
|
-
button:hover {
|
|
50
|
-
border-color: #646cff;
|
|
51
|
-
}
|
|
52
|
-
button:focus,
|
|
53
|
-
button:focus-visible {
|
|
54
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.card {
|
|
58
|
-
padding: 2em;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
#app {
|
|
62
|
-
max-width: 1280px;
|
|
63
|
-
margin: 0 auto;
|
|
64
|
-
padding: 2rem;
|
|
65
|
-
text-align: center;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
@media (prefers-color-scheme: light) {
|
|
69
|
-
:root {
|
|
70
|
-
color: #213547;
|
|
71
|
-
background-color: #ffffff;
|
|
72
|
-
}
|
|
73
|
-
a:hover {
|
|
74
|
-
color: #747bff;
|
|
75
|
-
}
|
|
76
|
-
button {
|
|
77
|
-
background-color: #f9f9f9;
|
|
78
|
-
}
|
|
79
|
-
}
|
package/tsconfig.app.json
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
5
|
-
"types": ["vite/client"],
|
|
6
|
-
|
|
7
|
-
/* Linting */
|
|
8
|
-
"strict": true,
|
|
9
|
-
"noUnusedLocals": true,
|
|
10
|
-
"noUnusedParameters": true,
|
|
11
|
-
"erasableSyntaxOnly": true,
|
|
12
|
-
"noFallthroughCasesInSwitch": true,
|
|
13
|
-
"noUncheckedSideEffectImports": true
|
|
14
|
-
},
|
|
15
|
-
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
|
|
16
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ESNext",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"declaration": true, // ✅ 生成类型声明
|
|
6
|
-
"declarationDir": "dist/types", // ✅ 输出目录
|
|
7
|
-
"emitDeclarationOnly": true, // 只生成声明文件,不生成 JS(Vite 会生成 JS)
|
|
8
|
-
"strict": true,
|
|
9
|
-
"moduleResolution": "Node",
|
|
10
|
-
"esModuleInterop": true,
|
|
11
|
-
"skipLibCheck": true,
|
|
12
|
-
"forceConsistentCasingInFileNames": true
|
|
13
|
-
},
|
|
14
|
-
"include": ["packages/**/*.ts", "packages/**/*.vue"]
|
|
15
|
-
}
|
package/tsconfig.node.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
-
"target": "ES2023",
|
|
5
|
-
"lib": ["ES2023"],
|
|
6
|
-
"module": "ESNext",
|
|
7
|
-
"types": ["node"],
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
|
|
10
|
-
/* Bundler mode */
|
|
11
|
-
"moduleResolution": "bundler",
|
|
12
|
-
"allowImportingTsExtensions": true,
|
|
13
|
-
"verbatimModuleSyntax": true,
|
|
14
|
-
"moduleDetection": "force",
|
|
15
|
-
"noEmit": true,
|
|
16
|
-
|
|
17
|
-
/* Linting */
|
|
18
|
-
"strict": true,
|
|
19
|
-
"noUnusedLocals": true,
|
|
20
|
-
"noUnusedParameters": true,
|
|
21
|
-
"erasableSyntaxOnly": true,
|
|
22
|
-
"noFallthroughCasesInSwitch": true,
|
|
23
|
-
"noUncheckedSideEffectImports": true
|
|
24
|
-
},
|
|
25
|
-
"include": ["vite.config.ts"]
|
|
26
|
-
}
|
package/tsconfig.tsbuildinfo
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["./packages/index.ts","./packages/button/zzbutton.ts","./packages/button/zzbutton.vue"],"version":"5.9.3"}
|
package/vite.config.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vite'
|
|
2
|
-
import vue from '@vitejs/plugin-vue'
|
|
3
|
-
import path from 'path'
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [vue()],
|
|
7
|
-
build: {
|
|
8
|
-
lib: {
|
|
9
|
-
entry: path.resolve(__dirname, 'packages/index.ts'),
|
|
10
|
-
name: 'zephyrUi',
|
|
11
|
-
fileName: (format) => `zephyrUi.${format}.js`, // ✅ 输出 JS 文件
|
|
12
|
-
formats: ['es', 'umd']
|
|
13
|
-
},
|
|
14
|
-
rollupOptions: {
|
|
15
|
-
external: ['vue'],
|
|
16
|
-
output: {
|
|
17
|
-
globals: {
|
|
18
|
-
vue: 'Vue'
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
})
|
|
File without changes
|