mortise-tenon-design 0.0.1 → 0.0.3
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/{type → es}/components/button/index.d.ts +2 -2
- package/es/components/button/index.mjs +1 -1
- package/es/components/button/src/button.vue.mjs +2 -2
- package/es/components/button/src/button.vue2.mjs +3 -3
- package/es/core/index.d.ts +1 -0
- package/es/core/index.mjs +4 -0
- package/es/style.css +1 -1
- package/lib/components/button/index.d.ts +81 -0
- package/lib/components/button/index.js +1 -1
- package/lib/components/button/src/button.vue.d.ts +40 -0
- package/lib/components/button/src/button.vue.js +1 -1
- package/lib/components/button/src/button.vue2.js +1 -1
- package/lib/components/button/src/types.d.ts +8 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/core/index.d.ts +1 -0
- package/lib/core/index.js +1 -0
- package/lib/core/paths/paths.d.ts +0 -0
- package/lib/core/vite.config.d.ts +2 -0
- package/lib/style.css +1 -1
- package/package.json +4 -3
- package/es/index.mjs +0 -4
- package/lib/index.js +0 -1
- package/type/core/index.d.ts +0 -1
- /package/{type → es}/components/button/src/button.vue.d.ts +0 -0
- /package/{type → es}/components/button/src/types.d.ts +0 -0
- /package/{type → es}/components/index.d.ts +0 -0
- /package/{type → es}/core/paths/paths.d.ts +0 -0
- /package/{type → es}/core/vite.config.d.ts +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
export declare const
|
1
|
+
export declare const MtButton: {
|
2
2
|
new (...args: any[]): import('vue').CreateComponentPublicInstance<Readonly<import('vue').ExtractPropTypes<{
|
3
3
|
mode: {
|
4
4
|
type: import('vue').PropType<"debounce" | "throttle">;
|
@@ -78,4 +78,4 @@ export declare const XButton: {
|
|
78
78
|
};
|
79
79
|
});
|
80
80
|
export * from './src/types';
|
81
|
-
export default
|
81
|
+
export default MtButton;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import o from "./button.vue2.mjs";
|
2
2
|
/* empty css */
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
4
|
-
const
|
4
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c1292849"]]);
|
5
5
|
export {
|
6
|
-
|
6
|
+
_ as default
|
7
7
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { defineComponent as c, ref as i, computed as m, onMounted as f, openBlock as b, createElementBlock as p, normalizeClass as v, unref as k, normalizeStyle as _, renderSlot as h } from "vue";
|
2
|
-
const y = ["disabled"],
|
3
|
-
name: "
|
2
|
+
const y = ["disabled"], M = /* @__PURE__ */ c({
|
3
|
+
name: "MtButton",
|
4
4
|
__name: "button",
|
5
5
|
props: {
|
6
6
|
mode: {},
|
@@ -34,5 +34,5 @@ const y = ["disabled"], S = /* @__PURE__ */ c({
|
|
34
34
|
}
|
35
35
|
});
|
36
36
|
export {
|
37
|
-
|
37
|
+
M as default
|
38
38
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from '../components';
|
package/es/style.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.ex-button[data-v-
|
1
|
+
.ex-button[data-v-c1292849]{animation:temp-animation-c1292849 step-end forwards}.ex-button[data-v-c1292849]:active{animation:none}@keyframes temp-animation-c1292849{}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
export declare const MtButton: {
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstance<Readonly<import('vue').ExtractPropTypes<{
|
3
|
+
mode: {
|
4
|
+
type: import('vue').PropType<"debounce" | "throttle">;
|
5
|
+
};
|
6
|
+
time: {
|
7
|
+
type: import('vue').PropType<string>;
|
8
|
+
default: string;
|
9
|
+
};
|
10
|
+
disabled: {
|
11
|
+
type: import('vue').PropType<boolean>;
|
12
|
+
};
|
13
|
+
}>> & {
|
14
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
15
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
16
|
+
click: (...args: any[]) => void;
|
17
|
+
}, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{
|
18
|
+
mode: {
|
19
|
+
type: import('vue').PropType<"debounce" | "throttle">;
|
20
|
+
};
|
21
|
+
time: {
|
22
|
+
type: import('vue').PropType<string>;
|
23
|
+
default: string;
|
24
|
+
};
|
25
|
+
disabled: {
|
26
|
+
type: import('vue').PropType<boolean>;
|
27
|
+
};
|
28
|
+
}>> & {
|
29
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
30
|
+
}, {
|
31
|
+
time: string;
|
32
|
+
}, true, {}, {}, {
|
33
|
+
P: {};
|
34
|
+
B: {};
|
35
|
+
D: {};
|
36
|
+
C: {};
|
37
|
+
M: {};
|
38
|
+
Defaults: {};
|
39
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
40
|
+
mode: {
|
41
|
+
type: import('vue').PropType<"debounce" | "throttle">;
|
42
|
+
};
|
43
|
+
time: {
|
44
|
+
type: import('vue').PropType<string>;
|
45
|
+
default: string;
|
46
|
+
};
|
47
|
+
disabled: {
|
48
|
+
type: import('vue').PropType<boolean>;
|
49
|
+
};
|
50
|
+
}>> & {
|
51
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
52
|
+
}, {}, {}, {}, {}, {
|
53
|
+
time: string;
|
54
|
+
}>;
|
55
|
+
__isFragment?: never;
|
56
|
+
__isTeleport?: never;
|
57
|
+
__isSuspense?: never;
|
58
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
59
|
+
mode: {
|
60
|
+
type: import('vue').PropType<"debounce" | "throttle">;
|
61
|
+
};
|
62
|
+
time: {
|
63
|
+
type: import('vue').PropType<string>;
|
64
|
+
default: string;
|
65
|
+
};
|
66
|
+
disabled: {
|
67
|
+
type: import('vue').PropType<boolean>;
|
68
|
+
};
|
69
|
+
}>> & {
|
70
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
71
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
72
|
+
click: (...args: any[]) => void;
|
73
|
+
}, string, {
|
74
|
+
time: string;
|
75
|
+
}, {}, string, {}> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
76
|
+
$slots: {
|
77
|
+
default?(_: {}): any;
|
78
|
+
};
|
79
|
+
});
|
80
|
+
export * from './src/types';
|
81
|
+
export default MtButton;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./src/button.vue.js");t.default.install=u=>{t.default.name&&u.component(t.default.name,t.default)};const e=t.default;exports.MtButton=e;exports.default=e;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { ButtonProps } from './types';
|
2
|
+
declare function __VLS_template(): {
|
3
|
+
default?(_: {}): any;
|
4
|
+
};
|
5
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ButtonProps>, {
|
6
|
+
time: string;
|
7
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
8
|
+
click: (...args: any[]) => void;
|
9
|
+
}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ButtonProps>, {
|
10
|
+
time: string;
|
11
|
+
}>>> & {
|
12
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
13
|
+
}, {
|
14
|
+
time: string;
|
15
|
+
}, {}>;
|
16
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
17
|
+
export default _default;
|
18
|
+
|
19
|
+
type __VLS_WithDefaults<P, D> = {
|
20
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
21
|
+
default: D[K];
|
22
|
+
}> : P[K];
|
23
|
+
};
|
24
|
+
type __VLS_Prettify<T> = {
|
25
|
+
[K in keyof T]: T[K];
|
26
|
+
} & {};
|
27
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
28
|
+
new (): {
|
29
|
+
$slots: S;
|
30
|
+
};
|
31
|
+
};
|
32
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
33
|
+
type __VLS_TypePropsToOption<T> = {
|
34
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
35
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
36
|
+
} : {
|
37
|
+
type: import('vue').PropType<T[K]>;
|
38
|
+
required: true;
|
39
|
+
};
|
40
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./button.vue2.js");;/* empty css */const t=require("../../../_virtual/_plugin-vue_export-helper.js"),u=t.default(e.default,[["__scopeId","data-v-
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./button.vue2.js");;/* empty css */const t=require("../../../_virtual/_plugin-vue_export-helper.js"),u=t.default(e.default,[["__scopeId","data-v-c1292849"]]);exports.default=u;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=["disabled"],f=e.defineComponent({name:"
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=["disabled"],f=e.defineComponent({name:"MtButton",__name:"button",props:{mode:{},time:{default:"1s"},disabled:{type:Boolean}},emits:["click"],setup(i,{emit:s}){const t=i,r=s,n=e.ref(!1),u=e.computed(()=>t.disabled?!0:t.mode==="throttle"&&n.value),l=t.mode&&["throttle","debounce"].includes(t.mode),a=e.ref();e.onMounted(()=>{l&&a.value.$el.addEventListener("animationend",()=>{n.value=!1})});function d(o){n.value||(r("click",o),l&&(n.value=!0))}return(o,m)=>(e.openBlock(),e.createElementBlock("button",{ref_key:"buttonRef",ref:a,disabled:u.value,class:e.normalizeClass({"ex-button":e.unref(l)}),style:e.normalizeStyle({"animation-duration":o.time,"pointer-events":u.value?"none":"all"}),onClick:d},[e.renderSlot(o.$slots,"default",{},void 0,!0)],14,c))}});exports.default=f;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './button';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from '../components';
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../components/button/index.js");exports.MtButton=t.MtButton;
|
File without changes
|
package/lib/style.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.ex-button[data-v-
|
1
|
+
.ex-button[data-v-c1292849]{animation:temp-animation-c1292849 step-end forwards}.ex-button[data-v-c1292849]:active{animation:none}@keyframes temp-animation-c1292849{}
|
package/package.json
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "mortise-tenon-design",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.3",
|
4
4
|
"description": "榫卯组件库",
|
5
5
|
"author": "nixwai",
|
6
6
|
"license": "ISC",
|
7
|
-
"main": "lib/index.js",
|
8
|
-
"module": "es/index.mjs",
|
7
|
+
"main": "lib/core/index.js",
|
8
|
+
"module": "es/core/index.mjs",
|
9
|
+
"types": "es/core/index.d.ts",
|
9
10
|
"repository": {
|
10
11
|
"type": "git",
|
11
12
|
"url": "https://github.com/nixwai/mortise-tenon-design"
|
package/es/index.mjs
DELETED
package/lib/index.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components/button/index.js");exports.XButton=t.XButton;
|
package/type/core/index.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from '@mortise-tenon-design/components';
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|