@liweihan/ui 0.0.1
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/button/Button.d.ts +27 -0
- package/dist/button/index.d.ts +3 -0
- package/dist/button/types.d.ts +2 -0
- package/dist/index.d.ts +8 -0
- package/dist/lwh-ui.css +2 -0
- package/dist/lwh-ui.js +41 -0
- package/dist/lwh-ui.umd +1 -0
- package/package.json +40 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ButtonType, ButtonSize } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
type?: ButtonType;
|
|
4
|
+
size?: ButtonSize;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_1: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_1) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
+
click: (event: MouseEvent) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
type: ButtonType;
|
|
17
|
+
size: ButtonSize;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
export { default as LwhButton } from './button';
|
|
3
|
+
export type { ButtonType, ButtonSize } from './button';
|
|
4
|
+
export declare function install(app: App): void;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
install: typeof install;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
package/dist/lwh-ui.css
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.lwh-btn[data-v-de5b92dd]{cursor:pointer;border:1px solid #0000;border-radius:4px;justify-content:center;align-items:center;font-family:inherit;line-height:1;transition:all .2s;display:inline-flex}.lwh-btn--small[data-v-de5b92dd]{padding:6px 12px;font-size:12px}.lwh-btn--medium[data-v-de5b92dd]{padding:8px 16px;font-size:14px}.lwh-btn--large[data-v-de5b92dd]{padding:12px 24px;font-size:16px}.lwh-btn--default[data-v-de5b92dd]{color:#333;background:#fff;border-color:#d9d9d9}.lwh-btn--default[data-v-de5b92dd]:hover{color:#4096ff;border-color:#4096ff}.lwh-btn--primary[data-v-de5b92dd]{color:#fff;background:#1677ff;border-color:#1677ff}.lwh-btn--primary[data-v-de5b92dd]:hover{background:#4096ff;border-color:#4096ff}.lwh-btn--danger[data-v-de5b92dd]{color:#fff;background:#ff4d4f;border-color:#ff4d4f}.lwh-btn--danger[data-v-de5b92dd]:hover{background:#ff7875;border-color:#ff7875}.lwh-btn--disabled[data-v-de5b92dd]{opacity:.5;cursor:not-allowed;pointer-events:none}
|
|
2
|
+
/*$vite$:1*/
|
package/dist/lwh-ui.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Fragment as e, createElementBlock as t, createElementVNode as n, createTextVNode as r, defineComponent as i, normalizeClass as a, openBlock as o, renderSlot as s } from "vue";
|
|
2
|
+
//#region src/button/Button.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var c = ["disabled"], l = /* @__PURE__ */ ((e, t) => {
|
|
4
|
+
let n = e.__vccOpts || e;
|
|
5
|
+
for (let [e, r] of t) n[e] = r;
|
|
6
|
+
return n;
|
|
7
|
+
})(/* @__PURE__ */ i({
|
|
8
|
+
__name: "Button",
|
|
9
|
+
props: {
|
|
10
|
+
type: { default: "default" },
|
|
11
|
+
size: { default: "medium" },
|
|
12
|
+
disabled: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: !1
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
emits: ["click"],
|
|
18
|
+
setup(i, { emit: l }) {
|
|
19
|
+
let u = i, d = l;
|
|
20
|
+
function f(e) {
|
|
21
|
+
u.disabled || d("click", e);
|
|
22
|
+
}
|
|
23
|
+
return (l, u) => (o(), t(e, null, [n("button", {
|
|
24
|
+
class: a(["lwh-btn", [
|
|
25
|
+
`lwh-btn--${i.type}`,
|
|
26
|
+
`lwh-btn--${i.size}`,
|
|
27
|
+
{ "lwh-btn--disabled": i.disabled }
|
|
28
|
+
]]),
|
|
29
|
+
disabled: i.disabled,
|
|
30
|
+
onClick: f
|
|
31
|
+
}, [s(l.$slots, "default", {}, void 0, !0)], 10, c), u[0] ||= r(" aaa ", -1)], 64));
|
|
32
|
+
}
|
|
33
|
+
}), [["__scopeId", "data-v-de5b92dd"]]), u = [l];
|
|
34
|
+
function d(e) {
|
|
35
|
+
u.forEach((t) => {
|
|
36
|
+
e.component("LwhButton", t);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
var f = { install: d };
|
|
40
|
+
//#endregion
|
|
41
|
+
export { l as LwhButton, f as default, d as install };
|
package/dist/lwh-ui.umd
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("vue")):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.LwhUI={},e.Vue))})(this,function(e,t){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var n=[`disabled`],r=((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n})((0,t.defineComponent)({__name:`Button`,props:{type:{default:`default`},size:{default:`medium`},disabled:{type:Boolean,default:!1}},emits:[`click`],setup(e,{emit:r}){let i=e,a=r;function o(e){i.disabled||a(`click`,e)}return(r,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createElementVNode)(`button`,{class:(0,t.normalizeClass)([`lwh-btn`,[`lwh-btn--${e.type}`,`lwh-btn--${e.size}`,{"lwh-btn--disabled":e.disabled}]]),disabled:e.disabled,onClick:o},[(0,t.renderSlot)(r.$slots,`default`,{},void 0,!0)],10,n),i[0]||=(0,t.createTextVNode)(` aaa `,-1)],64))}}),[[`__scopeId`,`data-v-de5b92dd`]]),i=[r];function a(e){i.forEach(t=>{e.component(`LwhButton`,t)})}var o={install:a};e.LwhButton=r,e.default=o,e.install=a});
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@liweihan/ui",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "A simple Vue 3 UI component library",
|
|
7
|
+
"main": "./dist/lwh-ui.umd",
|
|
8
|
+
"module": "./dist/lwh-ui.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/lwh-ui.js",
|
|
13
|
+
"require": "./dist/lwh-ui.umd",
|
|
14
|
+
"types": "./dist/index.d.ts"
|
|
15
|
+
},
|
|
16
|
+
"./style.css": "./dist/lwh-ui.css"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "vite",
|
|
26
|
+
"build": "vite build",
|
|
27
|
+
"preview": "vite preview"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"vue": "^3.5.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
34
|
+
"typescript": "~6.0.2",
|
|
35
|
+
"vite": "^8.1.1",
|
|
36
|
+
"vite-plugin-dts": "^5.0.3",
|
|
37
|
+
"vue": "^3.5.0",
|
|
38
|
+
"vue-tsc": "^2.2.0"
|
|
39
|
+
}
|
|
40
|
+
}
|