yc-design-vue 1.5.8 → 1.6.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/Breadcrumb/BreadcrumbSeparator.vue2.js +1 -1
- package/es/Transfer/TransferPanel.vue2.js +2 -2
- package/es/Typography/TypographyBase.vue2.js +2 -2
- package/es/_shared/icons/IconCopy.vue.js +16 -1
- package/es/_shared/icons/IconCopy.vue2.js +1 -16
- package/es/_shared/icons/IconDelete.vue.js +1 -16
- package/es/_shared/icons/IconDelete.vue2.js +16 -1
- package/es/_shared/icons/IconEdit.vue.js +16 -1
- package/es/_shared/icons/IconEdit.vue2.js +1 -16
- package/es/_shared/icons/IconSearch.vue.js +1 -16
- package/es/_shared/icons/IconSearch.vue2.js +16 -1
- package/es/_shared/icons/IconSeparator.vue.js +1 -16
- package/es/_shared/icons/IconSeparator.vue2.js +16 -1
- package/es/index.d.ts +1 -3
- package/es/index.js +0 -3
- package/es/style.css +1 -1
- package/lib/Breadcrumb/BreadcrumbSeparator.vue2.js +1 -1
- package/lib/Transfer/TransferPanel.vue2.js +1 -1
- package/lib/Typography/TypographyBase.vue2.js +1 -1
- package/lib/_shared/icons/IconCopy.vue.js +1 -1
- package/lib/_shared/icons/IconCopy.vue2.js +1 -1
- package/lib/_shared/icons/IconDelete.vue.js +1 -1
- package/lib/_shared/icons/IconDelete.vue2.js +1 -1
- package/lib/_shared/icons/IconEdit.vue.js +1 -1
- package/lib/_shared/icons/IconEdit.vue2.js +1 -1
- package/lib/_shared/icons/IconSearch.vue.js +1 -1
- package/lib/_shared/icons/IconSearch.vue2.js +1 -1
- package/lib/_shared/icons/IconSeparator.vue.js +1 -1
- package/lib/_shared/icons/IconSeparator.vue2.js +1 -1
- package/lib/index.d.ts +1 -3
- package/lib/index.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +6 -18
- package/es/Icon/index.d.ts +0 -38
- package/es/Icon/index.js +0 -29
- package/es/Icon/index.vue.d.ts +0 -18
- package/es/Icon/index.vue.js +0 -7
- package/es/Icon/index.vue2.js +0 -55
- package/es/Icon/type.d.ts +0 -15
- package/lib/Icon/index.d.ts +0 -38
- package/lib/Icon/index.js +0 -1
- package/lib/Icon/index.vue.d.ts +0 -18
- package/lib/Icon/index.vue.js +0 -1
- package/lib/Icon/index.vue2.js +0 -1
- package/lib/Icon/type.d.ts +0 -15
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "yc-design-vue",
|
3
3
|
"private": false,
|
4
|
-
"version": "1.
|
4
|
+
"version": "1.6.0",
|
5
5
|
"type": "module",
|
6
6
|
"description": "A Vue 3 component library.",
|
7
7
|
"keywords": [
|
@@ -49,24 +49,12 @@
|
|
49
49
|
"./es/style.css": "./es/style.css",
|
50
50
|
"./lib/style.css": "./lib/style.css",
|
51
51
|
"./es/*": {
|
52
|
-
"types":
|
53
|
-
|
54
|
-
"./es/*.d.ts"
|
55
|
-
],
|
56
|
-
"import": [
|
57
|
-
"./es/*/index.js",
|
58
|
-
"./es/*.js"
|
59
|
-
]
|
52
|
+
"types": "./es/*/index.d.ts",
|
53
|
+
"import": "./es/*/index.js"
|
60
54
|
},
|
61
55
|
"./lib/*": {
|
62
|
-
"types":
|
63
|
-
|
64
|
-
"./lib/*.d.ts"
|
65
|
-
],
|
66
|
-
"require": [
|
67
|
-
"./lib/*/index.js",
|
68
|
-
"./lib/*.js"
|
69
|
-
]
|
56
|
+
"types": "./lib/*/index.d.ts",
|
57
|
+
"require": "./lib/*/index.js"
|
70
58
|
}
|
71
59
|
},
|
72
60
|
"dependencies": {
|
@@ -101,7 +89,7 @@
|
|
101
89
|
"vite-plugin-dts": "^4.5.4",
|
102
90
|
"vue": "^3.3.4",
|
103
91
|
"vue-tsc": "^2.0.29",
|
104
|
-
"yc-design-vue": "^1.5.
|
92
|
+
"yc-design-vue": "^1.5.9"
|
105
93
|
},
|
106
94
|
"peerDependencies": {
|
107
95
|
"vue": "^3.3.4"
|
package/es/Icon/index.d.ts
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
import { App } from 'vue';
|
2
|
-
import { IconFontOptions } from './type';
|
3
|
-
import { default as _Icon } from './index.vue';
|
4
|
-
export type IconInstance = InstanceType<typeof _Icon>;
|
5
|
-
export * from './type';
|
6
|
-
declare const Icon: {
|
7
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./type').IconProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
8
|
-
spin: boolean;
|
9
|
-
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, SVGSVGElement, import('vue').ComponentProvideOptions, {
|
10
|
-
P: {};
|
11
|
-
B: {};
|
12
|
-
D: {};
|
13
|
-
C: {};
|
14
|
-
M: {};
|
15
|
-
Defaults: {};
|
16
|
-
}, Readonly<import('./type').IconProps> & Readonly<{}>, {}, {}, {}, {}, {
|
17
|
-
spin: boolean;
|
18
|
-
}>;
|
19
|
-
__isFragment?: never;
|
20
|
-
__isTeleport?: never;
|
21
|
-
__isSuspense?: never;
|
22
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('./type').IconProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
23
|
-
spin: boolean;
|
24
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
25
|
-
$slots: Readonly<import('./type').IconSlots> & import('./type').IconSlots;
|
26
|
-
}) & {
|
27
|
-
install: (app: App) => void;
|
28
|
-
urlCache: Map<string, string>;
|
29
|
-
addFromIconFontCn(options: IconFontOptions): import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
30
|
-
[key: string]: any;
|
31
|
-
}>;
|
32
|
-
};
|
33
|
-
declare module 'vue' {
|
34
|
-
interface GlobalComponents {
|
35
|
-
YcIcon: typeof Icon;
|
36
|
-
}
|
37
|
-
}
|
38
|
-
export default Icon;
|
package/es/Icon/index.js
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
import { h } from "vue";
|
2
|
-
import "../node_modules/tinycolor2/esm/tinycolor.js";
|
3
|
-
import { isServerRendering } from "../_shared/utils/dom.js";
|
4
|
-
import "../_shared/utils/time.js";
|
5
|
-
import "../Empty/index.js";
|
6
|
-
/* empty css */
|
7
|
-
import _Icon from "./index.vue.js";
|
8
|
-
const Icon = Object.assign(_Icon, {
|
9
|
-
install: (app) => {
|
10
|
-
app.component("Yc" + _Icon.name, _Icon);
|
11
|
-
},
|
12
|
-
urlCache: /* @__PURE__ */ new Map(),
|
13
|
-
addFromIconFontCn(options) {
|
14
|
-
const { src, extraProps = {} } = options;
|
15
|
-
if ((src == null ? void 0 : src.length) && !isServerRendering && !this.urlCache.has(src)) {
|
16
|
-
const script = document.createElement("script");
|
17
|
-
script.setAttribute("src", src);
|
18
|
-
script.setAttribute("data-namespace", src);
|
19
|
-
document.body.appendChild(script);
|
20
|
-
this.urlCache.set(src, src);
|
21
|
-
}
|
22
|
-
return h(_Icon, {
|
23
|
-
...extraProps
|
24
|
-
});
|
25
|
-
}
|
26
|
-
});
|
27
|
-
export {
|
28
|
-
Icon as default
|
29
|
-
};
|
package/es/Icon/index.vue.d.ts
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
import { IconProps, IconSlots } from './type';
|
2
|
-
declare function __VLS_template(): {
|
3
|
-
attrs: Partial<{}>;
|
4
|
-
slots: Readonly<IconSlots> & IconSlots;
|
5
|
-
refs: {};
|
6
|
-
rootEl: SVGSVGElement;
|
7
|
-
};
|
8
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
9
|
-
declare const __VLS_component: import('vue').DefineComponent<IconProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IconProps> & Readonly<{}>, {
|
10
|
-
spin: boolean;
|
11
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, SVGSVGElement>;
|
12
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
13
|
-
export default _default;
|
14
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
15
|
-
new (): {
|
16
|
-
$slots: S;
|
17
|
-
};
|
18
|
-
};
|
package/es/Icon/index.vue.js
DELETED
package/es/Icon/index.vue2.js
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
import { defineComponent, toRefs, computed, createElementBlock, openBlock, normalizeStyle, renderSlot } from "vue";
|
2
|
-
import "../node_modules/tinycolor2/esm/tinycolor.js";
|
3
|
-
import { valueToPx } from "../_shared/utils/dom.js";
|
4
|
-
import { isUndefined } from "../_shared/utils/is.js";
|
5
|
-
import "../_shared/utils/time.js";
|
6
|
-
import "../Empty/index.js";
|
7
|
-
/* empty css */
|
8
|
-
const _hoisted_1 = ["xlinkHref"];
|
9
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
10
|
-
...{
|
11
|
-
name: "Icon"
|
12
|
-
},
|
13
|
-
__name: "index",
|
14
|
-
props: {
|
15
|
-
type: {},
|
16
|
-
size: {},
|
17
|
-
rotate: {},
|
18
|
-
spin: { type: Boolean, default: false }
|
19
|
-
},
|
20
|
-
setup(__props) {
|
21
|
-
const props = __props;
|
22
|
-
const { size, rotate, spin } = toRefs(props);
|
23
|
-
const calcSize = (type) => {
|
24
|
-
if (isUndefined(size.value)) {
|
25
|
-
return "1em";
|
26
|
-
} else if (Array.isArray(size.value)) {
|
27
|
-
return valueToPx(size.value[type == "height" ? 1 : 0]);
|
28
|
-
} else {
|
29
|
-
return valueToPx(size.value);
|
30
|
-
}
|
31
|
-
};
|
32
|
-
const style = computed(() => {
|
33
|
-
return {
|
34
|
-
width: calcSize("width"),
|
35
|
-
height: calcSize("height"),
|
36
|
-
transform: isUndefined(rotate.value) ? "" : `rotate(${rotate.value}deg)`,
|
37
|
-
animation: spin.value ? "animation: spin 1s infinite cubic-bezier(0, 0, 1, 1)" : ""
|
38
|
-
};
|
39
|
-
});
|
40
|
-
return (_ctx, _cache) => {
|
41
|
-
return openBlock(), createElementBlock("svg", {
|
42
|
-
style: normalizeStyle(style.value),
|
43
|
-
class: "yc-icon"
|
44
|
-
}, [
|
45
|
-
_ctx.type ? (openBlock(), createElementBlock("use", {
|
46
|
-
key: 0,
|
47
|
-
xlinkHref: `#${_ctx.type}`
|
48
|
-
}, null, 8, _hoisted_1)) : renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true)
|
49
|
-
], 4);
|
50
|
-
};
|
51
|
-
}
|
52
|
-
});
|
53
|
-
export {
|
54
|
-
_sfc_main as default
|
55
|
-
};
|
package/es/Icon/type.d.ts
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
import { ObjectData } from '../_shared/type';
|
2
|
-
import { VNode } from 'vue';
|
3
|
-
export interface IconProps {
|
4
|
-
type?: string;
|
5
|
-
size?: number | string | number[];
|
6
|
-
rotate?: number;
|
7
|
-
spin?: boolean;
|
8
|
-
}
|
9
|
-
export interface IconSlots {
|
10
|
-
default?: () => VNode[];
|
11
|
-
}
|
12
|
-
export interface IconFontOptions {
|
13
|
-
src?: string;
|
14
|
-
extraProps?: ObjectData;
|
15
|
-
}
|
package/lib/Icon/index.d.ts
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
import { App } from 'vue';
|
2
|
-
import { IconFontOptions } from './type';
|
3
|
-
import { default as _Icon } from './index.vue';
|
4
|
-
export type IconInstance = InstanceType<typeof _Icon>;
|
5
|
-
export * from './type';
|
6
|
-
declare const Icon: {
|
7
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./type').IconProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
8
|
-
spin: boolean;
|
9
|
-
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, SVGSVGElement, import('vue').ComponentProvideOptions, {
|
10
|
-
P: {};
|
11
|
-
B: {};
|
12
|
-
D: {};
|
13
|
-
C: {};
|
14
|
-
M: {};
|
15
|
-
Defaults: {};
|
16
|
-
}, Readonly<import('./type').IconProps> & Readonly<{}>, {}, {}, {}, {}, {
|
17
|
-
spin: boolean;
|
18
|
-
}>;
|
19
|
-
__isFragment?: never;
|
20
|
-
__isTeleport?: never;
|
21
|
-
__isSuspense?: never;
|
22
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('./type').IconProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
23
|
-
spin: boolean;
|
24
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
25
|
-
$slots: Readonly<import('./type').IconSlots> & import('./type').IconSlots;
|
26
|
-
}) & {
|
27
|
-
install: (app: App) => void;
|
28
|
-
urlCache: Map<string, string>;
|
29
|
-
addFromIconFontCn(options: IconFontOptions): import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
30
|
-
[key: string]: any;
|
31
|
-
}>;
|
32
|
-
};
|
33
|
-
declare module 'vue' {
|
34
|
-
interface GlobalComponents {
|
35
|
-
YcIcon: typeof Icon;
|
36
|
-
}
|
37
|
-
}
|
38
|
-
export default Icon;
|
package/lib/Icon/index.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js");const t=require("../_shared/utils/dom.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const r=require("./index.vue.js"),s=Object.assign(r,{install:e=>{e.component("Yc"+r.name,r)},urlCache:new Map,addFromIconFontCn(s){const{src:n,extraProps:i={}}=s;if((null==n?void 0:n.length)&&!t.isServerRendering&&!this.urlCache.has(n)){const e=document.createElement("script");e.setAttribute("src",n),e.setAttribute("data-namespace",n),document.body.appendChild(e),this.urlCache.set(n,n)}return e.h(r,{...i})}});module.exports=s;
|
package/lib/Icon/index.vue.d.ts
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
import { IconProps, IconSlots } from './type';
|
2
|
-
declare function __VLS_template(): {
|
3
|
-
attrs: Partial<{}>;
|
4
|
-
slots: Readonly<IconSlots> & IconSlots;
|
5
|
-
refs: {};
|
6
|
-
rootEl: SVGSVGElement;
|
7
|
-
};
|
8
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
9
|
-
declare const __VLS_component: import('vue').DefineComponent<IconProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IconProps> & Readonly<{}>, {
|
10
|
-
spin: boolean;
|
11
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, SVGSVGElement>;
|
12
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
13
|
-
export default _default;
|
14
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
15
|
-
new (): {
|
16
|
-
$slots: S;
|
17
|
-
};
|
18
|
-
};
|
package/lib/Icon/index.vue.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";const e=;/* empty css */;/* empty css */const r=require("../_virtual/_plugin-vue_export-helper.js")(e,[["__scopeId","data-v-52e5518c"]]);module.exports=r;
|
package/lib/Icon/index.vue2.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js");const t=require("../_shared/utils/dom.js"),i=require("../_shared/utils/is.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const n=["xlinkHref"],s=e.defineComponent({name:"Icon",__name:"index",props:{type:{},size:{},rotate:{},spin:{type:Boolean,default:!1}},setup(s){const o=s,{size:r,rotate:l,spin:a}=e.toRefs(o),u=e=>i.isUndefined(r.value)?"1em":Array.isArray(r.value)?t.valueToPx(r.value["height"==e?1:0]):t.valueToPx(r.value),d=e.computed(()=>({width:u("width"),height:u("height"),transform:i.isUndefined(l.value)?"":`rotate(${l.value}deg)`,animation:a.value?"animation: spin 1s infinite cubic-bezier(0, 0, 1, 1)":""}));return(t,i)=>(e.openBlock(),e.createElementBlock("svg",{style:e.normalizeStyle(d.value),class:"yc-icon"},[t.type?(e.openBlock(),e.createElementBlock("use",{key:0,xlinkHref:`#${t.type}`},null,8,n)):e.renderSlot(t.$slots,"default",{key:1},void 0,!0)],4))}});module.exports=s;
|
package/lib/Icon/type.d.ts
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
import { ObjectData } from '../_shared/type';
|
2
|
-
import { VNode } from 'vue';
|
3
|
-
export interface IconProps {
|
4
|
-
type?: string;
|
5
|
-
size?: number | string | number[];
|
6
|
-
rotate?: number;
|
7
|
-
spin?: boolean;
|
8
|
-
}
|
9
|
-
export interface IconSlots {
|
10
|
-
default?: () => VNode[];
|
11
|
-
}
|
12
|
-
export interface IconFontOptions {
|
13
|
-
src?: string;
|
14
|
-
extraProps?: ObjectData;
|
15
|
-
}
|