mortise-tenon-design 0.0.9 → 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.
@@ -7,4 +7,3 @@ const s = (t, e) => {
7
7
  export {
8
8
  s as default
9
9
  };
10
- //# sourceMappingURL=_plugin-vue_export-helper.mjs.map
@@ -6,4 +6,3 @@ const m = t;
6
6
  export {
7
7
  m as MtButton
8
8
  };
9
- //# sourceMappingURL=index.mjs.map
@@ -5,4 +5,3 @@ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-aa934c60"]]);
5
5
  export {
6
6
  p as default
7
7
  };
8
- //# sourceMappingURL=button.vue.mjs.map
@@ -33,4 +33,3 @@ const y = ["disabled"], M = /* @__PURE__ */ c({
33
33
  export {
34
34
  M as default
35
35
  };
36
- //# sourceMappingURL=button.vue2.mjs.map
package/es/index.mjs CHANGED
@@ -2,4 +2,3 @@ import { MtButton as r } from "./components/button/index.mjs";
2
2
  export {
3
3
  r as MtButton
4
4
  };
5
- //# sourceMappingURL=index.mjs.map
@@ -1,2 +1 @@
1
1
  "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=(e,o)=>{const t=e.__vccOpts||e;for(const[r,s]of o)t[r]=s;return t};exports.default=u;
2
- //# sourceMappingURL=_plugin-vue_export-helper.js.map
@@ -1,2 +1 @@
1
1
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./src/button.vue.js");t.default.install=e=>{t.default.name&&e.component(t.default.name,t.default)};const n=t.default;exports.MtButton=n;
2
- //# sourceMappingURL=index.js.map
@@ -1,2 +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-aa934c60"]]);exports.default=u;
2
- //# sourceMappingURL=button.vue.js.map
@@ -1,2 +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:"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;
2
- //# sourceMappingURL=button.vue2.js.map
package/lib/index.js CHANGED
@@ -1,2 +1 @@
1
1
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components/button/index.js");exports.MtButton=t.MtButton;
2
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mortise-tenon-design",
3
3
  "type": "module",
4
- "version": "0.0.9",
4
+ "version": "0.0.10",
5
5
  "description": "榫卯组件库",
6
6
  "author": "nixwai",
7
7
  "license": "ISC",
@@ -1 +0,0 @@
1
- {"version":3,"file":"_plugin-vue_export-helper.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../packages/components/button/index.ts"],"sourcesContent":["import type { App } from 'vue';\nimport Button from './src/button.vue';\n\nButton.install = (app: App): void => {\n if (Button.name) {\n app.component(Button.name, Button);\n }\n};\n\nexport const MtButton = Button;\n\nexport * from './src/types';\n"],"names":["Button","app","MtButton"],"mappings":";AAGAA,EAAO,UAAU,CAACC,MAAmB;AACnC,EAAID,EAAO,QACLC,EAAA,UAAUD,EAAO,MAAMA,CAAM;AAErC;AAEO,MAAME,IAAWF;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"button.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"button.vue2.mjs","sources":["../../../../../../packages/components/button/src/button.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ButtonProps } from './types';\nimport { computed, onMounted, ref } from 'vue';\n\ndefineOptions({ name: 'MtButton' });\n\nconst props = withDefaults(defineProps<ButtonProps>(), { time: '1s' });\nconst emit = defineEmits(['click']);\n\n/** 禁止点击状态 */\nconst forbidStatus = ref(false);\nconst buttonDisabled = computed(() => {\n if (props.disabled) {\n return true;\n }\n return props.mode === 'throttle' && forbidStatus.value;\n});\n\nconst hasMode = props.mode && ['throttle', 'debounce'].includes(props.mode);\nconst buttonRef = ref();\n\nonMounted(() => {\n if (hasMode) {\n // 监听动画执行结束\n buttonRef.value.$el.addEventListener('animationend', () => {\n forbidStatus.value = false;\n });\n }\n});\n\nfunction handleClick(e: MouseEvent) {\n if (forbidStatus.value) {\n return;\n }\n emit('click', e);\n if (hasMode) {\n forbidStatus.value = true;\n }\n}\n</script>\n\n<template>\n <button\n ref=\"buttonRef\"\n :disabled=\"buttonDisabled\"\n :class=\"{ 'ex-button': hasMode }\"\n :style=\"{ 'animation-duration': time, 'pointer-events': buttonDisabled ? 'none' : 'all' }\"\n @click=\"handleClick\"\n >\n <slot />\n </button>\n</template>\n\n<style scoped>\n.ex-button {\n animation: temp-animation step-end forwards;\n}\n\n.ex-button:active {\n animation: none;\n}\n\n@keyframes temp-animation {\n /** 空动画 */\n}\n</style>\n"],"names":["props","__props","emit","__emit","forbidStatus","ref","buttonDisabled","computed","hasMode","buttonRef","onMounted","handleClick","e"],"mappings":";;;;;;;;;;;AAMA,UAAMA,IAAQC,GACRC,IAAOC,GAGPC,IAAeC,EAAI,EAAK,GACxBC,IAAiBC,EAAS,MAC1BP,EAAM,WACD,KAEFA,EAAM,SAAS,cAAcI,EAAa,KAClD,GAEKI,IAAUR,EAAM,QAAQ,CAAC,YAAY,UAAU,EAAE,SAASA,EAAM,IAAI,GACpES,IAAYJ;AAElB,IAAAK,EAAU,MAAM;AACd,MAAIF,KAEFC,EAAU,MAAM,IAAI,iBAAiB,gBAAgB,MAAM;AACzD,QAAAL,EAAa,QAAQ;AAAA,MAAA,CACtB;AAAA,IACH,CACD;AAED,aAASO,EAAYC,GAAe;AAClC,MAAIR,EAAa,UAGjBF,EAAK,SAASU,CAAC,GACXJ,MACFJ,EAAa,QAAQ;AAAA,IAEzB;;;;;;;;;;;;;"}
package/es/index.mjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_plugin-vue_export-helper.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../packages/components/button/index.ts"],"sourcesContent":["import type { App } from 'vue';\nimport Button from './src/button.vue';\n\nButton.install = (app: App): void => {\n if (Button.name) {\n app.component(Button.name, Button);\n }\n};\n\nexport const MtButton = Button;\n\nexport * from './src/types';\n"],"names":["Button","app","MtButton"],"mappings":"uHAGAA,EAAAA,QAAO,QAAWC,GAAmB,CAC/BD,EAAAA,QAAO,MACLC,EAAA,UAAUD,EAAAA,QAAO,KAAMA,EAAM,OAAA,CAErC,EAEO,MAAME,EAAWF,EAAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"button.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"button.vue2.js","sources":["../../../../../../packages/components/button/src/button.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ButtonProps } from './types';\nimport { computed, onMounted, ref } from 'vue';\n\ndefineOptions({ name: 'MtButton' });\n\nconst props = withDefaults(defineProps<ButtonProps>(), { time: '1s' });\nconst emit = defineEmits(['click']);\n\n/** 禁止点击状态 */\nconst forbidStatus = ref(false);\nconst buttonDisabled = computed(() => {\n if (props.disabled) {\n return true;\n }\n return props.mode === 'throttle' && forbidStatus.value;\n});\n\nconst hasMode = props.mode && ['throttle', 'debounce'].includes(props.mode);\nconst buttonRef = ref();\n\nonMounted(() => {\n if (hasMode) {\n // 监听动画执行结束\n buttonRef.value.$el.addEventListener('animationend', () => {\n forbidStatus.value = false;\n });\n }\n});\n\nfunction handleClick(e: MouseEvent) {\n if (forbidStatus.value) {\n return;\n }\n emit('click', e);\n if (hasMode) {\n forbidStatus.value = true;\n }\n}\n</script>\n\n<template>\n <button\n ref=\"buttonRef\"\n :disabled=\"buttonDisabled\"\n :class=\"{ 'ex-button': hasMode }\"\n :style=\"{ 'animation-duration': time, 'pointer-events': buttonDisabled ? 'none' : 'all' }\"\n @click=\"handleClick\"\n >\n <slot />\n </button>\n</template>\n\n<style scoped>\n.ex-button {\n animation: temp-animation step-end forwards;\n}\n\n.ex-button:active {\n animation: none;\n}\n\n@keyframes temp-animation {\n /** 空动画 */\n}\n</style>\n"],"names":["props","__props","emit","__emit","forbidStatus","ref","buttonDisabled","computed","hasMode","buttonRef","onMounted","handleClick","e"],"mappings":"qSAMA,MAAMA,EAAQC,EACRC,EAAOC,EAGPC,EAAeC,MAAI,EAAK,EACxBC,EAAiBC,EAAAA,SAAS,IAC1BP,EAAM,SACD,GAEFA,EAAM,OAAS,YAAcI,EAAa,KAClD,EAEKI,EAAUR,EAAM,MAAQ,CAAC,WAAY,UAAU,EAAE,SAASA,EAAM,IAAI,EACpES,EAAYJ,EAAAA,MAElBK,EAAAA,UAAU,IAAM,CACVF,GAEFC,EAAU,MAAM,IAAI,iBAAiB,eAAgB,IAAM,CACzDL,EAAa,MAAQ,EAAA,CACtB,CACH,CACD,EAED,SAASO,EAAYC,EAAe,CAC9BR,EAAa,QAGjBF,EAAK,QAASU,CAAC,EACXJ,IACFJ,EAAa,MAAQ,IAEzB"}
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}