@can2421/ui 0.0.8 → 0.0.10
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/index.d.ts +69 -6
- package/dist/index.es.js +29 -24
- package/dist/index.umd.js +1 -2
- package/dist/ui.css +1 -0
- package/package.json +1 -1
- package/dist/index.css +0 -1
- package/dist/playground/src/App.vue.d.ts +0 -2
- package/dist/playground/src/main.d.ts +0 -0
- package/dist/playground/src/router/index.d.ts +0 -2
- package/dist/playground/src/views/Home/index.vue.d.ts +0 -2
- package/dist/playground/vite.config.d.ts +0 -2
- package/dist/ui/src/index.d.ts +0 -69
- package/dist/ui/vite.config.d.ts +0 -2
- /package/dist/{ui/src/components → components}/button/Button.vue.d.ts +0 -0
- /package/dist/{ui/src/components → components}/button/index.d.ts +0 -0
- /package/dist/{ui/src/components → components}/button/types/button.d.ts +0 -0
- /package/dist/{ui/src/install.d.ts → install.d.ts} +0 -0
- /package/dist/{ui/src/types.d.ts → types.d.ts} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as a, createElementBlock as r, openBlock as l, normalizeClass as d, renderSlot as p } from "vue";
|
|
2
2
|
const u = {
|
|
3
3
|
type: {
|
|
4
4
|
type: String,
|
|
@@ -8,52 +8,57 @@ const u = {
|
|
|
8
8
|
type: Boolean,
|
|
9
9
|
default: !1
|
|
10
10
|
}
|
|
11
|
-
}, f = ["disabled"], m = /* @__PURE__ */
|
|
11
|
+
}, f = ["disabled"], m = /* @__PURE__ */ a({
|
|
12
12
|
__name: "Button",
|
|
13
13
|
props: u,
|
|
14
14
|
emits: ["click"],
|
|
15
15
|
setup(t, { emit: e }) {
|
|
16
|
-
const
|
|
17
|
-
function c(
|
|
18
|
-
|
|
16
|
+
const n = t, o = e;
|
|
17
|
+
function c(s) {
|
|
18
|
+
n.disabled || o("click", s);
|
|
19
19
|
}
|
|
20
|
-
return (
|
|
20
|
+
return (s, C) => (l(), r("button", {
|
|
21
21
|
class: d(["hyc-button", [
|
|
22
|
-
`hyc-button--${
|
|
23
|
-
{ "hyc-button--disabled":
|
|
22
|
+
`hyc-button--${s.type}`,
|
|
23
|
+
{ "hyc-button--disabled": s.disabled }
|
|
24
24
|
]]),
|
|
25
|
-
disabled:
|
|
25
|
+
disabled: s.disabled,
|
|
26
26
|
onClick: c
|
|
27
27
|
}, [
|
|
28
|
-
p(
|
|
28
|
+
p(s.$slots, "default", {}, void 0, !0)
|
|
29
29
|
], 10, f));
|
|
30
30
|
}
|
|
31
|
-
}), b =
|
|
32
|
-
|
|
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) {
|
|
33
38
|
const e = {};
|
|
34
|
-
return Object.entries(t).forEach(([
|
|
35
|
-
const c = `${
|
|
36
|
-
e[c] =
|
|
39
|
+
return Object.entries(t).forEach(([n, o]) => {
|
|
40
|
+
const c = `${_}${n}`;
|
|
41
|
+
e[c] = o;
|
|
37
42
|
}), e;
|
|
38
43
|
}
|
|
39
|
-
function
|
|
40
|
-
Object.entries(e).forEach(([
|
|
41
|
-
t.component(
|
|
44
|
+
function k(t, e) {
|
|
45
|
+
Object.entries(e).forEach(([n, o]) => {
|
|
46
|
+
t.component(n, o);
|
|
42
47
|
});
|
|
43
48
|
}
|
|
44
49
|
const B = {
|
|
45
|
-
Button:
|
|
50
|
+
Button: y
|
|
46
51
|
// 添加新组件示例:
|
|
47
52
|
// Input,
|
|
48
53
|
// Dialog,
|
|
49
|
-
}, i =
|
|
54
|
+
}, i = h(B), O = i.HycButton, v = {
|
|
50
55
|
install(t) {
|
|
51
|
-
|
|
56
|
+
k(t, i);
|
|
52
57
|
}
|
|
53
58
|
};
|
|
54
59
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
y as Button,
|
|
61
|
+
O as HycButton,
|
|
57
62
|
u as buttonProps,
|
|
58
|
-
|
|
63
|
+
v as default
|
|
59
64
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(d);const l={type:{type:String,default:"primary"},disabled:{type:Boolean,default:!1}},f=["disabled"],u=e.defineComponent({__name:"Button",props:l,emits:["click"],setup(n,{emit:o}){const i=n,s=o;function r(c){i.disabled||s("click",c)}return(c,k)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["hyc-button",[`hyc-button--${c.type}`,{"hyc-button--disabled":c.disabled}]]),disabled:c.disabled,onClick:r},[e.renderSlot(c.$slots,"default")],10,f))}}),p="Hyc";function b(n){const o={};return Object.entries(n).forEach(([i,s])=>{const r=`${p}${i}`;o[r]=s}),o}function y(n,o){Object.entries(o).forEach(([i,s])=>{n.component(i,s)})}const a=b({Button:u}),m=a.HycButton,h={install(n){y(n,a)}};t.Button=u,t.HycButton=m,t.buttonProps=l,t.default=h,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
(function(e,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e.HycUILib={},e.Vue))})(this,(function(e,n){"use strict";const u={type:{type:String,default:"primary"},disabled:{type:Boolean,default:!1}},a=["disabled"],l=((t,o)=>{const s=t.__vccOpts||t;for(const[c,d]of o)s[c]=d;return s})(n.defineComponent({__name:"Button",props:u,emits:["click"],setup(t,{emit:o}){const s=t,c=o;function d(i){s.disabled||c("click",i)}return(i,k)=>(n.openBlock(),n.createElementBlock("button",{class:n.normalizeClass(["hyc-button",[`hyc-button--${i.type}`,{"hyc-button--disabled":i.disabled}]]),disabled:i.disabled,onClick:d},[n.renderSlot(i.$slots,"default",{},void 0,!0)],10,a))}}),[["__scopeId","data-v-6c0ad3e0"]]),f="Hyc";function p(t){const o={};return Object.entries(t).forEach(([s,c])=>{const d=`${f}${s}`;o[d]=c}),o}function m(t,o){Object.entries(o).forEach(([s,c])=>{t.component(s,c)})}const r=p({Button:l}),b=r.HycButton,y={install(t){m(t,r)}};e.Button=l,e.HycButton=b,e.buttonProps=u,e.default=y,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/dist/ui.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
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}
|
package/package.json
CHANGED
package/dist/index.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.hyc-button{padding:8px 16px;border-radius:4px;border:none;cursor:pointer;font-size:14px;transition:all .3s}.hyc-button--primary{background-color:#1890ff;color:#fff}.hyc-button--secondary{background-color:#f5f5f5;color:#333}.hyc-button--text{background-color:transparent;color:#1890ff}.hyc-button--disabled{opacity:.6;cursor:not-allowed}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
-
export default _default;
|
|
File without changes
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
-
export default _default;
|
package/dist/ui/src/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/ui/vite.config.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|