yc-design-vue 1.1.9 → 1.2.0
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/es/Button/Button.vue.d.ts +1 -0
- package/es/Button/Button.vue.js +1 -1
- package/es/Button/Button.vue2.js +7 -4
- package/es/Button/index.d.ts +3 -0
- package/es/Button/type.d.ts +1 -0
- package/es/Divider/index.d.ts +3 -3
- package/es/Divider/index.vue.d.ts +1 -1
- package/es/Divider/index.vue.js +1 -1
- package/es/Divider/type.d.ts +1 -1
- package/es/Space/index.d.ts +3 -3
- package/es/Space/index.vue.d.ts +1 -1
- package/es/Space/index.vue.js +1 -1
- package/es/Space/index.vue2.js +8 -2
- package/es/Space/type.d.ts +2 -1
- package/es/style.css +1 -1
- package/lib/Button/Button.vue.d.ts +1 -0
- package/lib/Button/Button.vue.js +1 -1
- package/lib/Button/Button.vue2.js +1 -1
- package/lib/Button/index.d.ts +3 -0
- package/lib/Button/type.d.ts +1 -0
- package/lib/Divider/index.d.ts +3 -3
- package/lib/Divider/index.vue.d.ts +1 -1
- package/lib/Divider/index.vue.js +1 -1
- package/lib/Divider/type.d.ts +1 -1
- package/lib/Space/index.d.ts +3 -3
- package/lib/Space/index.vue.d.ts +1 -1
- package/lib/Space/index.vue.js +1 -1
- package/lib/Space/index.vue2.js +1 -1
- package/lib/Space/type.d.ts +2 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
@@ -28,6 +28,7 @@ declare const __VLS_component: import('vue').DefineComponent<ButtonProps, {}, {}
|
|
28
28
|
status: import('./type').ButtonStatus;
|
29
29
|
long: boolean;
|
30
30
|
htmlType: import('./type').ButtonHtmlType;
|
31
|
+
autofocus: boolean;
|
31
32
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
32
33
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
33
34
|
export default _default;
|
package/lib/Button/Button.vue.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("./Button.vue2.js");;/* empty css */const t=require("../_virtual/_plugin-vue_export-helper.js")(e,[["__scopeId","data-v-
|
1
|
+
"use strict";const e=require("./Button.vue2.js");;/* empty css */const t=require("../_virtual/_plugin-vue_export-helper.js")(e,[["__scopeId","data-v-1536384b"]]);module.exports=t;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue"),o=require("./hooks/useContext.js"),t=require("../Spin/index.js"),n=["href"],
|
1
|
+
"use strict";const e=require("vue"),o=require("./hooks/useContext.js"),t=require("../Spin/index.js"),n=["href","autofocus"],u={key:0,class:"yc-button-icon"},l=["type","disabled","autofocus"],s={key:0,class:"yc-button-icon"},c=e.defineComponent({name:"Button",__name:"Button",props:{type:{default:void 0},shape:{default:void 0},status:{default:void 0},size:{default:void 0},long:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:void 0},htmlType:{default:"button"},autofocus:{type:Boolean,default:!1},href:{default:""}},emits:["mousedown","mouseup","click","dblclick","contextmenu"],setup(c,{emit:a}){const i=e.useSlots(),d=c,r=a,{loading:p,disabled:f,type:k,status:y,shape:m,long:b}=e.toRefs(d),{size:v,disabled:B,type:h,status:$,shape:g}=o().inject(d),x=e.computed(()=>["yc-button",`yc-button-size-${v.value}`,`yc-button-${h.value}`,`yc-button-status-${$.value}`,`yc-button-shape-${g.value}`,{"yc-button-long":b.value,"yc-button-loading":p.value,"yc-button-disabled":B.value,"yc-button-only-icon":!i.default}]),C=(e,o)=>{B.value||p.value||r(e,o)};return(o,c)=>o.href?(e.openBlock(),e.createElementBlock("a",e.mergeProps({key:0,href:o.href,class:x.value,autofocus:o.autofocus},o.$attrs,{onMousedown:c[0]||(c[0]=e=>C("mousedown",e)),onMouseup:c[1]||(c[1]=e=>C("mouseup",e)),onClick:c[2]||(c[2]=e=>C("click",e)),onDblclick:c[3]||(c[3]=e=>C("dblclick",e)),onContextmenu:c[4]||(c[4]=e=>C("contextmenu",e))}),[o.$slots.icon||e.unref(p)?(e.openBlock(),e.createElementBlock("span",u,[e.unref(p)?(e.openBlock(),e.createBlock(e.unref(t),{key:0,"is-size-inherit":""})):e.renderSlot(o.$slots,"icon",{key:1},void 0,!0)])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default",{},void 0,!0)],16,n)):(e.openBlock(),e.createElementBlock("button",e.mergeProps({key:1,type:o.htmlType,disabled:e.unref(B),class:x.value,autofocus:o.autofocus},o.$attrs,{onMousedown:c[5]||(c[5]=e=>C("mousedown",e)),onMouseup:c[6]||(c[6]=e=>C("mouseup",e)),onClick:c[7]||(c[7]=e=>C("click",e)),onDblclick:c[8]||(c[8]=e=>C("dblclick",e)),onContextmenu:c[9]||(c[9]=e=>C("contextmenu",e))}),[o.$slots.icon||e.unref(p)?(e.openBlock(),e.createElementBlock("span",s,[e.unref(p)?(e.openBlock(),e.createBlock(e.unref(t),{key:0,"is-size-inherit":""})):e.renderSlot(o.$slots,"icon",{key:1},void 0,!0)])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default",{},void 0,!0)],16,l))}});module.exports=c;
|
package/lib/Button/index.d.ts
CHANGED
@@ -27,6 +27,7 @@ declare const Button: {
|
|
27
27
|
status: import('./type').ButtonStatus;
|
28
28
|
long: boolean;
|
29
29
|
htmlType: import('./type').ButtonHtmlType;
|
30
|
+
autofocus: boolean;
|
30
31
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
31
32
|
P: {};
|
32
33
|
B: {};
|
@@ -50,6 +51,7 @@ declare const Button: {
|
|
50
51
|
status: import('./type').ButtonStatus;
|
51
52
|
long: boolean;
|
52
53
|
htmlType: import('./type').ButtonHtmlType;
|
54
|
+
autofocus: boolean;
|
53
55
|
}>;
|
54
56
|
__isFragment?: never;
|
55
57
|
__isTeleport?: never;
|
@@ -76,6 +78,7 @@ declare const Button: {
|
|
76
78
|
status: import('./type').ButtonStatus;
|
77
79
|
long: boolean;
|
78
80
|
htmlType: import('./type').ButtonHtmlType;
|
81
|
+
autofocus: boolean;
|
79
82
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
80
83
|
$slots: Readonly<import('./type').ButtonSlots> & import('./type').ButtonSlots;
|
81
84
|
}) & {
|
package/lib/Button/type.d.ts
CHANGED
package/lib/Divider/index.d.ts
CHANGED
@@ -7,7 +7,7 @@ declare const Divider: {
|
|
7
7
|
size: number;
|
8
8
|
type: import('./type').DividerType;
|
9
9
|
direction: import('..').Direction;
|
10
|
-
margin: number;
|
10
|
+
margin: number | string;
|
11
11
|
orientation: import('./type').Orientation;
|
12
12
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
13
13
|
P: {};
|
@@ -20,7 +20,7 @@ declare const Divider: {
|
|
20
20
|
size: number;
|
21
21
|
type: import('./type').DividerType;
|
22
22
|
direction: import('..').Direction;
|
23
|
-
margin: number;
|
23
|
+
margin: number | string;
|
24
24
|
orientation: import('./type').Orientation;
|
25
25
|
}>;
|
26
26
|
__isFragment?: never;
|
@@ -30,7 +30,7 @@ declare const Divider: {
|
|
30
30
|
size: number;
|
31
31
|
type: import('./type').DividerType;
|
32
32
|
direction: import('..').Direction;
|
33
|
-
margin: number;
|
33
|
+
margin: number | string;
|
34
34
|
orientation: import('./type').Orientation;
|
35
35
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
36
36
|
$slots: Readonly<import('./type').DividerSlots> & import('./type').DividerSlots;
|
@@ -10,7 +10,7 @@ declare const __VLS_component: import('vue').DefineComponent<DividerProps, {}, {
|
|
10
10
|
size: number;
|
11
11
|
type: import('./type').DividerType;
|
12
12
|
direction: import('..').Direction;
|
13
|
-
margin: number;
|
13
|
+
margin: number | string;
|
14
14
|
orientation: import('./type').Orientation;
|
15
15
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
16
16
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
package/lib/Divider/index.vue.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=;/* empty css */;/* empty css */const r=require("../_virtual/_plugin-vue_export-helper.js")(e,[["__scopeId","data-v-
|
1
|
+
"use strict";const e=;/* empty css */;/* empty css */const r=require("../_virtual/_plugin-vue_export-helper.js")(e,[["__scopeId","data-v-5d3da063"]]);module.exports=r;
|
package/lib/Divider/type.d.ts
CHANGED
package/lib/Space/index.d.ts
CHANGED
@@ -4,7 +4,7 @@ export type SpaceInstance = InstanceType<typeof _Space>;
|
|
4
4
|
export * from './type';
|
5
5
|
declare const Space: {
|
6
6
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./type').SpaceProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
7
|
-
size: import('
|
7
|
+
size: import('./type').SpaceSize | [import('./type').SpaceSize, import('./type').SpaceSize];
|
8
8
|
fill: boolean;
|
9
9
|
wrap: boolean;
|
10
10
|
direction: import('..').Direction;
|
@@ -17,7 +17,7 @@ declare const Space: {
|
|
17
17
|
M: {};
|
18
18
|
Defaults: {};
|
19
19
|
}, Readonly<import('./type').SpaceProps> & Readonly<{}>, {}, {}, {}, {}, {
|
20
|
-
size: import('
|
20
|
+
size: import('./type').SpaceSize | [import('./type').SpaceSize, import('./type').SpaceSize];
|
21
21
|
fill: boolean;
|
22
22
|
wrap: boolean;
|
23
23
|
direction: import('..').Direction;
|
@@ -27,7 +27,7 @@ declare const Space: {
|
|
27
27
|
__isTeleport?: never;
|
28
28
|
__isSuspense?: never;
|
29
29
|
} & import('vue').ComponentOptionsBase<Readonly<import('./type').SpaceProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
30
|
-
size: import('
|
30
|
+
size: import('./type').SpaceSize | [import('./type').SpaceSize, import('./type').SpaceSize];
|
31
31
|
fill: boolean;
|
32
32
|
wrap: boolean;
|
33
33
|
direction: import('..').Direction;
|
package/lib/Space/index.vue.d.ts
CHANGED
@@ -7,7 +7,7 @@ declare function __VLS_template(): {
|
|
7
7
|
};
|
8
8
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
9
9
|
declare const __VLS_component: import('vue').DefineComponent<SpaceProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SpaceProps> & Readonly<{}>, {
|
10
|
-
size: import('
|
10
|
+
size: import('./type').SpaceSize | [import('./type').SpaceSize, import('./type').SpaceSize];
|
11
11
|
fill: boolean;
|
12
12
|
wrap: boolean;
|
13
13
|
direction: import('..').Direction;
|
package/lib/Space/index.vue.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=;/* empty css */;/* empty css */const r=require("../_virtual/_plugin-vue_export-helper.js")(e,[["__scopeId","data-v-
|
1
|
+
"use strict";const e=;/* empty css */;/* empty css */const r=require("../_virtual/_plugin-vue_export-helper.js")(e,[["__scopeId","data-v-4f9e1543"]]);module.exports=r;
|
package/lib/Space/index.vue2.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js");const l=require("../_shared/utils/dom.js"),t=require("../_shared/utils/is.js");require("../_shared/utils/time.js");const o=require("../_shared/utils/vue-utils.js");require("../Empty/index.js");/* empty css */const
|
1
|
+
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js");const l=require("../_shared/utils/dom.js"),t=require("../_shared/utils/is.js");require("../_shared/utils/time.js");const o=require("../_shared/utils/vue-utils.js");require("../Empty/index.js");/* empty css */const a={class:"yc-space-item"},s={key:0,class:"yc-space-split"},r=e.defineComponent({name:"Space",__name:"index",props:{align:{default:void 0},direction:{default:"horizontal"},wrap:{type:Boolean,default:!1},fill:{type:Boolean,default:!1},size:{default:"small"}},setup(r){const n=e.useSlots(),i=r,{size:c,direction:u,align:d}=e.toRefs(i),m=e.computed(()=>{const e={mini:4,small:8,medium:16,large:24};return t.isNumber(c.value)?l.valueToPx(c.value):t.isArray(c.value)?c.value.map(e=>l.valueToPx(e)).join(" "):l.valueToPx(e[c.value])}),p=e.computed(()=>t.isUndefined(d.value)?"horizontal"==u.value?"center":"start":d.value),v=e.computed(()=>{var l;if(!n.split)return[];const t=[];return((null==(l=n.default)?void 0:l.call(n))||[]).forEach(l=>{l.type===e.Fragment?t.push(...l.children):l.type!==e.Comment&&t.push(l)}),t});return(l,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-space",`yc-space-align-${p.value}`,`yc-space-direction-${e.unref(u)}`,{"yc-space-wrap":l.wrap,"yc-space-fill":l.fill}]),style:e.normalizeStyle({gap:m.value})},[l.$slots.split?e.createCommentVNode("",!0):e.renderSlot(l.$slots,"default",{key:0},void 0,!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(t,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r},[e.createElementVNode("div",a,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o.getSlotFunction)(t))))]),r<v.value.length-1?(e.openBlock(),e.createElementBlock("div",s,[e.renderSlot(l.$slots,"split",{},void 0,!0)])):e.createCommentVNode("",!0)],64))),128))],6))}});module.exports=r;
|
package/lib/Space/type.d.ts
CHANGED
@@ -5,10 +5,11 @@ export interface SpaceProps {
|
|
5
5
|
direction?: Direction;
|
6
6
|
wrap?: boolean;
|
7
7
|
fill?: boolean;
|
8
|
-
size?:
|
8
|
+
size?: SpaceSize | [SpaceSize, SpaceSize];
|
9
9
|
}
|
10
10
|
export interface SpaceSlots {
|
11
11
|
default?: () => VNode[];
|
12
12
|
split?: () => VNode[];
|
13
13
|
}
|
14
14
|
export type SpaceAlign = 'start' | 'end' | 'center' | 'baseline';
|
15
|
+
export type SpaceSize = Size | number;
|