yc-design-vue 1.6.3 → 1.6.6

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.
@@ -5,8 +5,8 @@ import { getDomText, sleep } from "../_shared/utils/dom.js";
5
5
  import "../_shared/utils/time.js";
6
6
  import "../Empty/index.js";
7
7
  /* empty css */
8
- import _sfc_main$3 from "../_shared/icons/IconCopy.vue.js";
9
- import _sfc_main$1 from "../_shared/icons/IconEdit.vue.js";
8
+ import _sfc_main$3 from "../_shared/icons/IconCopy.vue2.js";
9
+ import _sfc_main$1 from "../_shared/icons/IconEdit.vue2.js";
10
10
  import _sfc_main$2 from "../_shared/icons/IconInfo.vue.js";
11
11
  import useControlValue from "../_shared/utils/control.js";
12
12
  import Input from "../Input/index.js";
@@ -1,19 +1,4 @@
1
- import { defineComponent, createBlock, openBlock, normalizeProps, guardReactiveProps, withCtx, createElementVNode } from "vue";
2
- import YcIcon from "../components/Icon.vue2.js";
3
- const _sfc_main = /* @__PURE__ */ defineComponent({
4
- __name: "IconCopy",
5
- setup(__props) {
6
- return (_ctx, _cache) => {
7
- return openBlock(), createBlock(YcIcon, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
8
- default: withCtx(() => _cache[0] || (_cache[0] = [
9
- createElementVNode("path", { d: "M20 6h18a2 2 0 0 1 2 2v22M8 16v24c0 1.105.891 2 1.996 2h20.007A1.99 1.99 0 0 0 32 40.008V15.997A1.997 1.997 0 0 0 30 14H10a2 2 0 0 0-2 2Z" }, null, -1)
10
- ])),
11
- _: 1,
12
- __: [0]
13
- }, 16);
14
- };
15
- }
16
- });
1
+ import _sfc_main from "./IconCopy.vue2.js";
17
2
  export {
18
3
  _sfc_main as default
19
4
  };
@@ -1,4 +1,19 @@
1
- import _sfc_main from "./IconCopy.vue.js";
1
+ import { defineComponent, createBlock, openBlock, normalizeProps, guardReactiveProps, withCtx, createElementVNode } from "vue";
2
+ import YcIcon from "../components/Icon.vue2.js";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "IconCopy",
5
+ setup(__props) {
6
+ return (_ctx, _cache) => {
7
+ return openBlock(), createBlock(YcIcon, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
8
+ default: withCtx(() => _cache[0] || (_cache[0] = [
9
+ createElementVNode("path", { d: "M20 6h18a2 2 0 0 1 2 2v22M8 16v24c0 1.105.891 2 1.996 2h20.007A1.99 1.99 0 0 0 32 40.008V15.997A1.997 1.997 0 0 0 30 14H10a2 2 0 0 0-2 2Z" }, null, -1)
10
+ ])),
11
+ _: 1,
12
+ __: [0]
13
+ }, 16);
14
+ };
15
+ }
16
+ });
2
17
  export {
3
18
  _sfc_main as default
4
19
  };
@@ -1,19 +1,4 @@
1
- import { defineComponent, createBlock, openBlock, normalizeProps, guardReactiveProps, withCtx, createElementVNode } from "vue";
2
- import YcIcon from "../components/Icon.vue2.js";
3
- const _sfc_main = /* @__PURE__ */ defineComponent({
4
- __name: "IconEdit",
5
- setup(__props) {
6
- return (_ctx, _cache) => {
7
- return openBlock(), createBlock(YcIcon, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
8
- default: withCtx(() => _cache[0] || (_cache[0] = [
9
- createElementVNode("path", { d: "m30.48 19.038 5.733-5.734a1 1 0 0 0 0-1.414l-5.586-5.586a1 1 0 0 0-1.414 0l-5.734 5.734m7 7L15.763 33.754a1 1 0 0 1-.59.286l-6.048.708a1 1 0 0 1-1.113-1.069l.477-6.31a1 1 0 0 1 .29-.631l14.7-14.7m7 7-7-7M6 42h36" }, null, -1)
10
- ])),
11
- _: 1,
12
- __: [0]
13
- }, 16);
14
- };
15
- }
16
- });
1
+ import _sfc_main from "./IconEdit.vue2.js";
17
2
  export {
18
3
  _sfc_main as default
19
4
  };
@@ -1,4 +1,19 @@
1
- import _sfc_main from "./IconEdit.vue.js";
1
+ import { defineComponent, createBlock, openBlock, normalizeProps, guardReactiveProps, withCtx, createElementVNode } from "vue";
2
+ import YcIcon from "../components/Icon.vue2.js";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "IconEdit",
5
+ setup(__props) {
6
+ return (_ctx, _cache) => {
7
+ return openBlock(), createBlock(YcIcon, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
8
+ default: withCtx(() => _cache[0] || (_cache[0] = [
9
+ createElementVNode("path", { d: "m30.48 19.038 5.733-5.734a1 1 0 0 0 0-1.414l-5.586-5.586a1 1 0 0 0-1.414 0l-5.734 5.734m7 7L15.763 33.754a1 1 0 0 1-.59.286l-6.048.708a1 1 0 0 1-1.113-1.069l.477-6.31a1 1 0 0 1 .29-.631l14.7-14.7m7 7-7-7M6 42h36" }, null, -1)
10
+ ])),
11
+ _: 1,
12
+ __: [0]
13
+ }, 16);
14
+ };
15
+ }
16
+ });
2
17
  export {
3
18
  _sfc_main as default
4
19
  };
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),t=require("../node_modules/@vueuse/core/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js");const o=require("../_shared/utils/dom.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const l=require("../_shared/icons/IconCopy.vue.js"),a=require("../_shared/icons/IconEdit.vue.js"),n=require("../_shared/icons/IconInfo.vue.js"),r=require("../_shared/utils/control.js"),u=require("../Input/index.js"),d=require("../Tooltip/index.js"),p=e.defineComponent({name:"TypographyBase",__name:"TypographyBase",props:{tag:{default:"span"},type:{default:void 0},bold:{type:Boolean,default:!1},disabled:{type:Boolean},mark:{type:Boolean,default:!1},underline:{type:Boolean,default:!1},delete:{type:Boolean,default:!1},code:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},editing:{type:Boolean,default:void 0},defaultEditing:{type:Boolean,default:!1},editText:{default:""},copyable:{type:Boolean,default:!1},copyText:{default:""},copyDelay:{default:3e3},ellipsis:{type:[Boolean,Object],default:!0},editTooltiProps:{default:()=>({})},copyTooltiProps:{default:()=>({})}},emits:["update:editing","update:editText","edit-start","change","copy","edit-end","ellipsis","expand"],setup(p,{emit:i}){const s=p,c=i,{editing:y,defaultEditing:f,editText:v,copyText:m,copyable:g,copyDelay:B,code:k,mark:h,delete:x,underline:_,bold:T}=e.toRefs(s),{isSupported:C,copy:b}=t.useClipboard(),j=e.ref(!1),q=e.ref(),V=e.ref(),E=r(y,f.value,e=>{c("update:editing",e)}),N=r(v,"",e=>{c("update:editText",e),c("change",e)});e.ref({});const w=e.computed(()=>{const e=[h.value,k.value,x.value,_.value,T.value];return["mark","code","del","u","b"].filter((t,o)=>e[o])}),D=e.defineComponent({props:{tags:{type:Array,default:()=>[]}},setup:(t,{slots:o})=>()=>{var l;const{tags:a}=e.toRefs(t),n=(t,o)=>o>=a.value.length?t:e.h(a.value[o],null,n(t,o+1));return n(null==(l=o.default)?void 0:l.call(o),0)}}),I=async()=>{var e;E.value=!0,N.value=N.value?N.value:o.getDomText(q),c("edit-start"),await o.sleep(0),null==(e=V.value)||e.focus()},P=()=>{E.value=!1,c("edit-end")},R=async()=>{if(!g.value||!C.value||j.value)return;const e=m.value||o.getDomText(q);b(e),c("copy",e),j.value=!0,await o.sleep(B.value),j.value=!1};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{class:e.normalizeClass(["yc-typography",{[`yc-typography-${t.type}`]:t.type,"yc-typography-bold":e.unref(T),"yc-typography-disabled":t.disabled,"yc-typography-underline":e.unref(_),"yc-typography-delete":e.unref(x)}]),ref_key:"contentRef",ref:q},{default:e.withCtx(()=>[e.unref(E)?(e.openBlock(),e.createBlock(e.unref(u),{key:0,modelValue:e.unref(N),"onUpdate:modelValue":o[0]||(o[0]=t=>e.isRef(N)?N.value=t:null),ref_key:"inputRef",ref:V,onBlur:P},null,8,["modelValue"])):(e.openBlock(),e.createBlock(e.unref(D),{key:1,tags:w.value},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},8,["tags"])),t.editable&&!e.unref(E)?(e.openBlock(),e.createElementBlock("span",{key:2,class:"yc-typography-operation-edit",onClick:I},[e.createVNode(e.unref(d),e.mergeProps({content:"编辑",position:"top"},t.editTooltiProps),{default:e.withCtx(()=>[e.createElementVNode("span",null,[e.createVNode(e.unref(a))])]),_:1},16)])):e.createCommentVNode("",!0),e.unref(g)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"yc-typography-operation-copy",onClick:R},[e.createVNode(e.unref(d),e.mergeProps({position:"top"},t.copyTooltiProps),{content:e.withCtx(()=>[e.renderSlot(t.$slots,"copy-tooltip",{copied:j.value},()=>[e.createTextVNode(e.toDisplayString(""+(j.value?"已复制":"复制")),1)],!0)]),default:e.withCtx(()=>[e.createElementVNode("span",null,[e.renderSlot(t.$slots,"copy-icon",{copied:j.value},()=>[j.value?(e.openBlock(),e.createBlock(e.unref(n),{key:0,color:"rgb(0, 180, 42)"})):(e.openBlock(),e.createBlock(e.unref(l),{key:1}))],!0)])]),_:3},16)])):e.createCommentVNode("",!0)]),_:3},8,["class"]))}});module.exports=p;
1
+ "use strict";const e=require("vue"),t=require("../node_modules/@vueuse/core/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js");const o=require("../_shared/utils/dom.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const l=require("../_shared/icons/IconCopy.vue2.js"),a=require("../_shared/icons/IconEdit.vue2.js"),n=require("../_shared/icons/IconInfo.vue.js"),r=require("../_shared/utils/control.js"),u=require("../Input/index.js"),d=require("../Tooltip/index.js"),p=e.defineComponent({name:"TypographyBase",__name:"TypographyBase",props:{tag:{default:"span"},type:{default:void 0},bold:{type:Boolean,default:!1},disabled:{type:Boolean},mark:{type:Boolean,default:!1},underline:{type:Boolean,default:!1},delete:{type:Boolean,default:!1},code:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},editing:{type:Boolean,default:void 0},defaultEditing:{type:Boolean,default:!1},editText:{default:""},copyable:{type:Boolean,default:!1},copyText:{default:""},copyDelay:{default:3e3},ellipsis:{type:[Boolean,Object],default:!0},editTooltiProps:{default:()=>({})},copyTooltiProps:{default:()=>({})}},emits:["update:editing","update:editText","edit-start","change","copy","edit-end","ellipsis","expand"],setup(p,{emit:i}){const s=p,c=i,{editing:y,defaultEditing:f,editText:v,copyText:m,copyable:g,copyDelay:B,code:k,mark:h,delete:x,underline:_,bold:T}=e.toRefs(s),{isSupported:C,copy:b}=t.useClipboard(),j=e.ref(!1),q=e.ref(),V=e.ref(),E=r(y,f.value,e=>{c("update:editing",e)}),N=r(v,"",e=>{c("update:editText",e),c("change",e)});e.ref({});const w=e.computed(()=>{const e=[h.value,k.value,x.value,_.value,T.value];return["mark","code","del","u","b"].filter((t,o)=>e[o])}),D=e.defineComponent({props:{tags:{type:Array,default:()=>[]}},setup:(t,{slots:o})=>()=>{var l;const{tags:a}=e.toRefs(t),n=(t,o)=>o>=a.value.length?t:e.h(a.value[o],null,n(t,o+1));return n(null==(l=o.default)?void 0:l.call(o),0)}}),I=async()=>{var e;E.value=!0,N.value=N.value?N.value:o.getDomText(q),c("edit-start"),await o.sleep(0),null==(e=V.value)||e.focus()},P=()=>{E.value=!1,c("edit-end")},R=async()=>{if(!g.value||!C.value||j.value)return;const e=m.value||o.getDomText(q);b(e),c("copy",e),j.value=!0,await o.sleep(B.value),j.value=!1};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{class:e.normalizeClass(["yc-typography",{[`yc-typography-${t.type}`]:t.type,"yc-typography-bold":e.unref(T),"yc-typography-disabled":t.disabled,"yc-typography-underline":e.unref(_),"yc-typography-delete":e.unref(x)}]),ref_key:"contentRef",ref:q},{default:e.withCtx(()=>[e.unref(E)?(e.openBlock(),e.createBlock(e.unref(u),{key:0,modelValue:e.unref(N),"onUpdate:modelValue":o[0]||(o[0]=t=>e.isRef(N)?N.value=t:null),ref_key:"inputRef",ref:V,onBlur:P},null,8,["modelValue"])):(e.openBlock(),e.createBlock(e.unref(D),{key:1,tags:w.value},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},8,["tags"])),t.editable&&!e.unref(E)?(e.openBlock(),e.createElementBlock("span",{key:2,class:"yc-typography-operation-edit",onClick:I},[e.createVNode(e.unref(d),e.mergeProps({content:"编辑",position:"top"},t.editTooltiProps),{default:e.withCtx(()=>[e.createElementVNode("span",null,[e.createVNode(e.unref(a))])]),_:1},16)])):e.createCommentVNode("",!0),e.unref(g)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"yc-typography-operation-copy",onClick:R},[e.createVNode(e.unref(d),e.mergeProps({position:"top"},t.copyTooltiProps),{content:e.withCtx(()=>[e.renderSlot(t.$slots,"copy-tooltip",{copied:j.value},()=>[e.createTextVNode(e.toDisplayString(""+(j.value?"已复制":"复制")),1)],!0)]),default:e.withCtx(()=>[e.createElementVNode("span",null,[e.renderSlot(t.$slots,"copy-icon",{copied:j.value},()=>[j.value?(e.openBlock(),e.createBlock(e.unref(n),{key:0,color:"rgb(0, 180, 42)"})):(e.openBlock(),e.createBlock(e.unref(l),{key:1}))],!0)])]),_:3},16)])):e.createCommentVNode("",!0)]),_:3},8,["class"]))}});module.exports=p;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),o=require("../components/Icon.vue2.js"),t=e.defineComponent({__name:"IconCopy",setup:t=>(t,n)=>(e.openBlock(),e.createBlock(o,e.normalizeProps(e.guardReactiveProps(t.$attrs)),{default:e.withCtx(()=>n[0]||(n[0]=[e.createElementVNode("path",{d:"M20 6h18a2 2 0 0 1 2 2v22M8 16v24c0 1.105.891 2 1.996 2h20.007A1.99 1.99 0 0 0 32 40.008V15.997A1.997 1.997 0 0 0 30 14H10a2 2 0 0 0-2 2Z"},null,-1)])),_:1,__:[0]},16))});module.exports=t;
1
+ "use strict";const e=require("./IconCopy.vue2.js");module.exports=e;
@@ -1 +1 @@
1
- "use strict";const e=require("./IconCopy.vue.js");module.exports=e;
1
+ "use strict";const e=require("vue"),o=require("../components/Icon.vue2.js"),t=e.defineComponent({__name:"IconCopy",setup:t=>(t,n)=>(e.openBlock(),e.createBlock(o,e.normalizeProps(e.guardReactiveProps(t.$attrs)),{default:e.withCtx(()=>n[0]||(n[0]=[e.createElementVNode("path",{d:"M20 6h18a2 2 0 0 1 2 2v22M8 16v24c0 1.105.891 2 1.996 2h20.007A1.99 1.99 0 0 0 32 40.008V15.997A1.997 1.997 0 0 0 30 14H10a2 2 0 0 0-2 2Z"},null,-1)])),_:1,__:[0]},16))});module.exports=t;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),t=require("../components/Icon.vue2.js"),o=e.defineComponent({__name:"IconEdit",setup:o=>(o,a)=>(e.openBlock(),e.createBlock(t,e.normalizeProps(e.guardReactiveProps(o.$attrs)),{default:e.withCtx(()=>a[0]||(a[0]=[e.createElementVNode("path",{d:"m30.48 19.038 5.733-5.734a1 1 0 0 0 0-1.414l-5.586-5.586a1 1 0 0 0-1.414 0l-5.734 5.734m7 7L15.763 33.754a1 1 0 0 1-.59.286l-6.048.708a1 1 0 0 1-1.113-1.069l.477-6.31a1 1 0 0 1 .29-.631l14.7-14.7m7 7-7-7M6 42h36"},null,-1)])),_:1,__:[0]},16))});module.exports=o;
1
+ "use strict";const e=require("./IconEdit.vue2.js");module.exports=e;
@@ -1 +1 @@
1
- "use strict";const e=require("./IconEdit.vue.js");module.exports=e;
1
+ "use strict";const e=require("vue"),t=require("../components/Icon.vue2.js"),o=e.defineComponent({__name:"IconEdit",setup:o=>(o,a)=>(e.openBlock(),e.createBlock(t,e.normalizeProps(e.guardReactiveProps(o.$attrs)),{default:e.withCtx(()=>a[0]||(a[0]=[e.createElementVNode("path",{d:"m30.48 19.038 5.733-5.734a1 1 0 0 0 0-1.414l-5.586-5.586a1 1 0 0 0-1.414 0l-5.734 5.734m7 7L15.763 33.754a1 1 0 0 1-.59.286l-6.048.708a1 1 0 0 1-1.113-1.069l.477-6.31a1 1 0 0 1 .29-.631l14.7-14.7m7 7-7-7M6 42h36"},null,-1)])),_:1,__:[0]},16))});module.exports=o;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yc-design-vue",
3
3
  "private": false,
4
- "version": "1.6.3",
4
+ "version": "1.6.6",
5
5
  "type": "module",
6
6
  "description": "A Vue 3 component library.",
7
7
  "keywords": [
@@ -38,8 +38,26 @@
38
38
  "import": "./es/index.js",
39
39
  "require": "./lib/index.js"
40
40
  },
41
- "./es/*": "./es/*",
42
- "./lib/*": "./lib/*"
41
+ "./es": {
42
+ "types": "./es/index.d.ts",
43
+ "import": "./es/index.js"
44
+ },
45
+ "./lib": {
46
+ "types": "./lib/index.d.ts",
47
+ "require": "./lib/index.js"
48
+ },
49
+ "./es/style.css": "./es/style.css",
50
+ "./es/shared.css": "./es/shared.css",
51
+ "./lib/style.css": "./lib/style.css",
52
+ "./lib/shared.css": "./lib/shared.css",
53
+ "./es/*": {
54
+ "types": "./es/*.d.ts",
55
+ "import": "./es/*"
56
+ },
57
+ "./lib/*": {
58
+ "types": "./lib/*.d.ts",
59
+ "require": "./lib/*"
60
+ }
43
61
  },
44
62
  "dependencies": {
45
63
  "@vueuse/core": "^12.0.0",
@@ -74,7 +92,7 @@
74
92
  "vite-plugin-dts": "^4.5.4",
75
93
  "vue": "^3.3.4",
76
94
  "vue-tsc": "^2.0.29",
77
- "yc-design-vue": "^1.6.2"
95
+ "yc-design-vue": "^1.6.1"
78
96
  },
79
97
  "peerDependencies": {
80
98
  "vue": "^3.3.4"