@can2421/ui 0.0.10 → 0.0.12
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/package.json +10 -4
- package/dist/components/button/Button.vue.d.ts +0 -42
- package/dist/components/button/index.d.ts +0 -4
- package/dist/components/button/types/button.d.ts +0 -12
- package/dist/index.d.ts +0 -69
- package/dist/index.es.js +0 -64
- package/dist/install.d.ts +0 -12
- package/dist/types.d.ts +0 -1
- package/dist/ui.css +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@can2421/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": {
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -20,10 +20,13 @@
|
|
|
20
20
|
"module": "dist/index.es.js",
|
|
21
21
|
"unpkg": "dist/index.umd.js",
|
|
22
22
|
"jsdelivr": "dist/index.umd.js",
|
|
23
|
-
"types": "dist/index.d.ts",
|
|
24
|
-
"style": "dist/ui.css",
|
|
23
|
+
"types": "dist/types/index.d.ts",
|
|
24
|
+
"style": "dist/style/ui.css",
|
|
25
25
|
"files": [
|
|
26
|
-
"
|
|
26
|
+
"es",
|
|
27
|
+
"lib",
|
|
28
|
+
"style",
|
|
29
|
+
"types"
|
|
27
30
|
],
|
|
28
31
|
"scripts": {
|
|
29
32
|
"build": "vite build",
|
|
@@ -34,6 +37,9 @@
|
|
|
34
37
|
"registry": "https://registry.npmjs.org",
|
|
35
38
|
"tag": "latest"
|
|
36
39
|
},
|
|
40
|
+
"directories": {
|
|
41
|
+
"lib": "lib"
|
|
42
|
+
},
|
|
37
43
|
"dependencies": {
|
|
38
44
|
"vue": "^3.5.26"
|
|
39
45
|
},
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
declare function __VLS_template(): {
|
|
2
|
-
attrs: Partial<{}>;
|
|
3
|
-
slots: {
|
|
4
|
-
default?(_: {}): any;
|
|
5
|
-
};
|
|
6
|
-
refs: {};
|
|
7
|
-
rootEl: HTMLButtonElement;
|
|
8
|
-
};
|
|
9
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
-
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
11
|
-
type: {
|
|
12
|
-
type: import('vue').PropType<import('.').ButtonType>;
|
|
13
|
-
default: string;
|
|
14
|
-
};
|
|
15
|
-
disabled: {
|
|
16
|
-
type: BooleanConstructor;
|
|
17
|
-
default: boolean;
|
|
18
|
-
};
|
|
19
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
-
click: (event: MouseEvent) => any;
|
|
21
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
22
|
-
type: {
|
|
23
|
-
type: import('vue').PropType<import('.').ButtonType>;
|
|
24
|
-
default: string;
|
|
25
|
-
};
|
|
26
|
-
disabled: {
|
|
27
|
-
type: BooleanConstructor;
|
|
28
|
-
default: boolean;
|
|
29
|
-
};
|
|
30
|
-
}>> & Readonly<{
|
|
31
|
-
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
32
|
-
}>, {
|
|
33
|
-
type: import('.').ButtonType;
|
|
34
|
-
disabled: boolean;
|
|
35
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>;
|
|
36
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
37
|
-
export default _default;
|
|
38
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
39
|
-
new (): {
|
|
40
|
-
$slots: S;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
export type ButtonType = 'primary' | 'danger' | 'warn' | 'success';
|
|
3
|
-
export declare const buttonProps: {
|
|
4
|
-
type: {
|
|
5
|
-
type: PropType<ButtonType>;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
disabled: {
|
|
9
|
-
type: BooleanConstructor;
|
|
10
|
-
default: boolean;
|
|
11
|
-
};
|
|
12
|
-
};
|
package/dist/index.d.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue';
|
|
2
|
-
export declare const HycButton: {
|
|
3
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
4
|
-
type: {
|
|
5
|
-
type: import('vue').PropType<import('./types').ButtonType>;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
disabled: {
|
|
9
|
-
type: BooleanConstructor;
|
|
10
|
-
default: boolean;
|
|
11
|
-
};
|
|
12
|
-
}>> & Readonly<{
|
|
13
|
-
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
14
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
|
-
click: (event: MouseEvent) => any;
|
|
16
|
-
}, import('vue').PublicProps, {
|
|
17
|
-
type: import('./types').ButtonType;
|
|
18
|
-
disabled: boolean;
|
|
19
|
-
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLButtonElement, import('vue').ComponentProvideOptions, {
|
|
20
|
-
P: {};
|
|
21
|
-
B: {};
|
|
22
|
-
D: {};
|
|
23
|
-
C: {};
|
|
24
|
-
M: {};
|
|
25
|
-
Defaults: {};
|
|
26
|
-
}, Readonly<import('vue').ExtractPropTypes<{
|
|
27
|
-
type: {
|
|
28
|
-
type: import('vue').PropType<import('./types').ButtonType>;
|
|
29
|
-
default: string;
|
|
30
|
-
};
|
|
31
|
-
disabled: {
|
|
32
|
-
type: BooleanConstructor;
|
|
33
|
-
default: boolean;
|
|
34
|
-
};
|
|
35
|
-
}>> & Readonly<{
|
|
36
|
-
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
37
|
-
}>, {}, {}, {}, {}, {
|
|
38
|
-
type: import('./types').ButtonType;
|
|
39
|
-
disabled: boolean;
|
|
40
|
-
}>;
|
|
41
|
-
__isFragment?: never;
|
|
42
|
-
__isTeleport?: never;
|
|
43
|
-
__isSuspense?: never;
|
|
44
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
45
|
-
type: {
|
|
46
|
-
type: import('vue').PropType<import('./types').ButtonType>;
|
|
47
|
-
default: string;
|
|
48
|
-
};
|
|
49
|
-
disabled: {
|
|
50
|
-
type: BooleanConstructor;
|
|
51
|
-
default: boolean;
|
|
52
|
-
};
|
|
53
|
-
}>> & Readonly<{
|
|
54
|
-
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
55
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
56
|
-
click: (event: MouseEvent) => any;
|
|
57
|
-
}, string, {
|
|
58
|
-
type: import('./types').ButtonType;
|
|
59
|
-
disabled: boolean;
|
|
60
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
61
|
-
$slots: {
|
|
62
|
-
default?(_: {}): any;
|
|
63
|
-
};
|
|
64
|
-
});
|
|
65
|
-
export * from './types';
|
|
66
|
-
declare const _default: {
|
|
67
|
-
install(app: App): void;
|
|
68
|
-
};
|
|
69
|
-
export default _default;
|
package/dist/index.es.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { defineComponent as a, createElementBlock as r, openBlock as l, normalizeClass as d, renderSlot as p } from "vue";
|
|
2
|
-
const u = {
|
|
3
|
-
type: {
|
|
4
|
-
type: String,
|
|
5
|
-
default: "primary"
|
|
6
|
-
},
|
|
7
|
-
disabled: {
|
|
8
|
-
type: Boolean,
|
|
9
|
-
default: !1
|
|
10
|
-
}
|
|
11
|
-
}, f = ["disabled"], m = /* @__PURE__ */ a({
|
|
12
|
-
__name: "Button",
|
|
13
|
-
props: u,
|
|
14
|
-
emits: ["click"],
|
|
15
|
-
setup(t, { emit: e }) {
|
|
16
|
-
const n = t, o = e;
|
|
17
|
-
function c(s) {
|
|
18
|
-
n.disabled || o("click", s);
|
|
19
|
-
}
|
|
20
|
-
return (s, C) => (l(), r("button", {
|
|
21
|
-
class: d(["hyc-button", [
|
|
22
|
-
`hyc-button--${s.type}`,
|
|
23
|
-
{ "hyc-button--disabled": s.disabled }
|
|
24
|
-
]]),
|
|
25
|
-
disabled: s.disabled,
|
|
26
|
-
onClick: c
|
|
27
|
-
}, [
|
|
28
|
-
p(s.$slots, "default", {}, void 0, !0)
|
|
29
|
-
], 10, f));
|
|
30
|
-
}
|
|
31
|
-
}), b = (t, e) => {
|
|
32
|
-
const n = t.__vccOpts || t;
|
|
33
|
-
for (const [o, c] of e)
|
|
34
|
-
n[o] = c;
|
|
35
|
-
return n;
|
|
36
|
-
}, y = /* @__PURE__ */ b(m, [["__scopeId", "data-v-6c0ad3e0"]]), _ = "Hyc";
|
|
37
|
-
function h(t) {
|
|
38
|
-
const e = {};
|
|
39
|
-
return Object.entries(t).forEach(([n, o]) => {
|
|
40
|
-
const c = `${_}${n}`;
|
|
41
|
-
e[c] = o;
|
|
42
|
-
}), e;
|
|
43
|
-
}
|
|
44
|
-
function k(t, e) {
|
|
45
|
-
Object.entries(e).forEach(([n, o]) => {
|
|
46
|
-
t.component(n, o);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
const B = {
|
|
50
|
-
Button: y
|
|
51
|
-
// 添加新组件示例:
|
|
52
|
-
// Input,
|
|
53
|
-
// Dialog,
|
|
54
|
-
}, i = h(B), O = i.HycButton, v = {
|
|
55
|
-
install(t) {
|
|
56
|
-
k(t, i);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
export {
|
|
60
|
-
y as Button,
|
|
61
|
-
O as HycButton,
|
|
62
|
-
u as buttonProps,
|
|
63
|
-
v as default
|
|
64
|
-
};
|
package/dist/install.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue';
|
|
2
|
-
export declare const COMPONENT_PREFIX = "Hyc";
|
|
3
|
-
/**
|
|
4
|
-
* 为组件添加前缀的工具函数
|
|
5
|
-
* @param components 组件映射对象
|
|
6
|
-
* @returns 带前缀的组件映射对象
|
|
7
|
-
*/
|
|
8
|
-
export declare function withPrefix<T extends Record<string, any>>(components: T): { [K in keyof T as `${typeof COMPONENT_PREFIX}${K & string}`]: T[K]; };
|
|
9
|
-
/**
|
|
10
|
-
* 安装组件到 Vue 应用
|
|
11
|
-
*/
|
|
12
|
-
export declare function installComponents(app: App, components: Record<string, any>): void;
|
package/dist/types.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './components/button';
|
package/dist/ui.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.hyc-button[data-v-6c0ad3e0]{padding:8px 16px;border-radius:4px;border:none;cursor:pointer;font-size:14px;transition:all .3s}.hyc-button--primary[data-v-6c0ad3e0]{background-color:#1890ff;color:#fff}.hyc-button--secondary[data-v-6c0ad3e0]{background-color:#f5f5f5;color:#333}.hyc-button--text[data-v-6c0ad3e0]{background-color:transparent;color:#1890ff}.hyc-button--disabled[data-v-6c0ad3e0]{opacity:.6;cursor:not-allowed}
|