@zephyr_zz/zephyr-ui 0.0.1 → 0.0.5
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/style.css +1 -0
- package/dist/types/button/ZzButton.d.ts +2 -0
- package/dist/types/button/ZzButton.vue.d.ts +23 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/zephyrUi.es.js +36 -0
- package/dist/zephyrUi.umd.js +1 -0
- package/package.json +12 -7
- package/.vscode/extensions.json +0 -3
- package/index.html +0 -13
- 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 -8
- package/tsconfig.node.json +0 -26
- package/tsconfig.tsbuildinfo +0 -1
- package/vite.config.ts +0 -23
- /package/{public → dist}/vite.svg +0 -0
package/dist/style.css
ADDED
|
@@ -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,23 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
declare const __VLS_export: __VLS_WithSlots<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, {}, any>, {
|
|
15
|
+
default?: (props: {}) => any;
|
|
16
|
+
}>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineComponent as c, openBlock as r, createElementBlock as _, normalizeClass as l, renderSlot as p } from "vue";
|
|
2
|
+
const u = {
|
|
3
|
+
name: "ZzButton"
|
|
4
|
+
}, d = /* @__PURE__ */ c({
|
|
5
|
+
...u,
|
|
6
|
+
props: {
|
|
7
|
+
type: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: "primary"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
setup(t) {
|
|
13
|
+
return (n, o) => (r(), _("button", {
|
|
14
|
+
class: l(["zz-button", `zz-button--${t.type}`])
|
|
15
|
+
}, [
|
|
16
|
+
p(n.$slots, "default", {}, void 0, !0)
|
|
17
|
+
], 2));
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const i = (t, n) => {
|
|
21
|
+
const o = t.__vccOpts || t;
|
|
22
|
+
for (const [s, a] of n)
|
|
23
|
+
o[s] = a;
|
|
24
|
+
return o;
|
|
25
|
+
}, e = /* @__PURE__ */ i(d, [["__scopeId", "data-v-7c55743a"]]);
|
|
26
|
+
e.install = (t) => {
|
|
27
|
+
t.component(e.name, e);
|
|
28
|
+
};
|
|
29
|
+
const m = (t) => {
|
|
30
|
+
t.use(e);
|
|
31
|
+
}, y = {
|
|
32
|
+
install: m
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
y as default
|
|
36
|
+
};
|
|
@@ -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"},r=e.defineComponent({...n,props:{type:{type:String,default:"primary"}},setup(t){return(s,c)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["zz-button",`zz-button--${t.type}`])},[e.renderSlot(s.$slots,"default",{},void 0,!0)],2))}}),i="",o=((t,s)=>{const c=t.__vccOpts||t;for(const[u,p]of s)c[u]=p;return c})(r,[["__scopeId","data-v-7c55743a"]]);return o.install=t=>{t.component(o.name,o)},{install:t=>{t.use(o)}}});
|
package/package.json
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zephyr_zz/zephyr-ui",
|
|
3
3
|
"private": false,
|
|
4
|
+
"types": "./dist/types/index.d.ts",
|
|
4
5
|
"main": "./dist/zephyrUi.umd.js",
|
|
5
6
|
"module": "./dist/zephyrUi.es.js",
|
|
6
7
|
"exports": {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/zephyrUi.es.js",
|
|
10
|
+
"require": "./dist/zephyrUi.umd.js"
|
|
11
|
+
}
|
|
11
12
|
},
|
|
12
|
-
"version": "0.0.
|
|
13
|
+
"version": "0.0.5",
|
|
13
14
|
"type": "module",
|
|
14
15
|
"scripts": {
|
|
15
16
|
"dev": "vite",
|
|
16
|
-
"build": "vue-tsc -b
|
|
17
|
+
"build": "vite build && pnpm vue-tsc -b",
|
|
17
18
|
"preview": "vite preview"
|
|
18
19
|
},
|
|
19
20
|
"dependencies": {
|
|
21
|
+
"sass": "^1.93.2",
|
|
20
22
|
"vue": "^3.5.22"
|
|
21
23
|
},
|
|
22
24
|
"devDependencies": {
|
|
@@ -27,5 +29,8 @@
|
|
|
27
29
|
"typescript": "~5.9.3",
|
|
28
30
|
"vite": "^7.1.7",
|
|
29
31
|
"vue-tsc": "^3.1.0"
|
|
30
|
-
}
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist"
|
|
35
|
+
]
|
|
31
36
|
}
|
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>
|
|
@@ -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
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
|