@vrojs/base 0.0.2 → 0.0.4
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/dist/index.d.ts +2 -0
- package/dist/index.js +43 -33
- package/dist/style/index.css +1 -1
- package/dist/types/ExtractComponentProps.d.ts +3 -0
- package/dist/types/ExtractComponentProps.js +1 -0
- package/dist/types/VroSlots.d.ts +4 -0
- package/dist/types/VroSlots.js +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/utils/addUnit.d.ts +1 -0
- package/dist/utils/addUnit.js +7 -0
- package/dist/utils/getSlotEntries.d.ts +5 -0
- package/dist/utils/getSlotEntries.js +4 -0
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +19 -17
- package/dist/utils/showComponent.d.ts +6 -5
- package/dist/utils/showComponent.js +32 -10
- package/dist/vro-circle-progress/index.d.ts +113 -0
- package/dist/vro-circle-progress/index.js +11 -0
- package/dist/vro-circle-progress/style/css.d.ts +0 -0
- package/dist/vro-circle-progress/style/css.js +4 -0
- package/dist/vro-circle-progress/style/index.css +1 -0
- package/dist/vro-circle-progress/style/index.d.ts +0 -0
- package/dist/vro-circle-progress/style/index.js +4 -0
- package/dist/vro-circle-progress/types.d.ts +57 -0
- package/dist/vro-circle-progress/types.js +52 -0
- package/dist/vro-circle-progress/vro-circle-progress.vue.d.ts +70 -0
- package/dist/vro-circle-progress/vro-circle-progress.vue.js +72 -0
- package/dist/vro-circle-progress/vro-circle-progress.vue2.js +4 -0
- package/dist/vro-icon/index.d.ts +58 -0
- package/dist/vro-icon/index.js +11 -0
- package/dist/vro-icon/style/css.d.ts +0 -0
- package/dist/vro-icon/style/css.js +4 -0
- package/dist/vro-icon/style/index.css +1 -0
- package/dist/vro-icon/style/index.d.ts +0 -0
- package/dist/vro-icon/style/index.js +4 -0
- package/dist/vro-icon/types.d.ts +29 -0
- package/dist/vro-icon/types.js +30 -0
- package/dist/vro-icon/vro-icon.vue.d.ts +37 -0
- package/dist/vro-icon/vro-icon.vue.js +36 -0
- package/dist/vro-icon/vro-icon.vue2.js +4 -0
- package/dist/vro-input/index.d.ts +3 -3
- package/dist/vro-input/types.d.ts +5 -5
- package/dist/vro-input/types.js +6 -9
- package/dist/vro-input/vro-input.vue.d.ts +3 -3
- package/dist/vro-loading/index.d.ts +9 -30
- package/dist/vro-loading/style/index.css +1 -1
- package/dist/vro-loading/types.d.ts +7 -9
- package/dist/vro-loading/types.js +8 -10
- package/dist/vro-loading/vro-loading.vue.d.ts +6 -18
- package/dist/vro-loading/vro-loading.vue.js +37 -24
- package/package.json +7 -4
- package/dist/utils/props.d.ts +0 -2
- package/dist/utils/props.js +0 -5
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,35 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
1
|
+
import { addUnit as e } from "./utils/addUnit.js";
|
|
2
|
+
import { ComponentManager as p } from "./utils/ComponentManager.js";
|
|
3
|
+
import { parseDecimalString as n, parseNumberString as f } from "./utils/format.js";
|
|
4
|
+
import { getSlotEntries as s } from "./utils/getSlotEntries.js";
|
|
5
|
+
import { mountComponent as i } from "./utils/mountComponent.js";
|
|
6
|
+
import { parseType as P } from "./utils/parseType.js";
|
|
7
|
+
import { renderComponent as c } from "./utils/renderComponent.js";
|
|
8
|
+
import { showComponent as v } from "./utils/showComponent.js";
|
|
9
|
+
import { withInstall as d } from "./utils/withInstall.js";
|
|
10
|
+
import { VroAspectRatio as u } from "./vro-aspect-ratio/index.js";
|
|
11
|
+
import { VroCircleProgress as h } from "./vro-circle-progress/index.js";
|
|
12
|
+
import { VroIcon as A } from "./vro-icon/index.js";
|
|
13
|
+
import { VroInput as R } from "./vro-input/index.js";
|
|
14
|
+
import { VroLoading as y } from "./vro-loading/index.js";
|
|
15
|
+
import { VroVnr as E } from "./vro-vnr/index.js";
|
|
16
|
+
import { vroAspectRatioProps as N } from "./vro-aspect-ratio/types.js";
|
|
17
|
+
import { vroCircleProgressProps as U } from "./vro-circle-progress/types.js";
|
|
18
|
+
import { vroIconProps as k } from "./vro-icon/types.js";
|
|
19
|
+
import { vroInputProps as z } from "./vro-input/types.js";
|
|
20
|
+
import { vroLoadingProps as F } from "./vro-loading/types.js";
|
|
21
|
+
import { vroVnrProps as H } from "./vro-vnr/types.js";
|
|
17
22
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
N as
|
|
34
|
-
|
|
23
|
+
p as ComponentManager,
|
|
24
|
+
u as VroAspectRatio,
|
|
25
|
+
h as VroCircleProgress,
|
|
26
|
+
A as VroIcon,
|
|
27
|
+
R as VroInput,
|
|
28
|
+
y as VroLoading,
|
|
29
|
+
E as VroVnr,
|
|
30
|
+
e as addUnit,
|
|
31
|
+
s as getSlotEntries,
|
|
32
|
+
i as mountComponent,
|
|
33
|
+
n as parseDecimalString,
|
|
34
|
+
f as parseNumberString,
|
|
35
|
+
P as parseType,
|
|
36
|
+
c as renderComponent,
|
|
37
|
+
v as showComponent,
|
|
38
|
+
N as vroAspectRatioProps,
|
|
39
|
+
U as vroCircleProgressProps,
|
|
40
|
+
k as vroIconProps,
|
|
41
|
+
z as vroInputProps,
|
|
42
|
+
F as vroLoadingProps,
|
|
43
|
+
H as vroVnrProps,
|
|
44
|
+
d as withInstall
|
|
35
45
|
};
|
package/dist/style/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.vro-aspect-ratio{position:relative}.vro-aspect-ratio-inner{position:relative;width:100%}.vro-aspect-ratio-content{position:absolute;top:0;left:0;width:100%;height:100%}
|
|
1
|
+
@charset "UTF-8";.vro-aspect-ratio{position:relative}.vro-aspect-ratio-inner{position:relative;width:100%}.vro-aspect-ratio-content{position:absolute;top:0;left:0;width:100%;height:100%}:root,:host{--vro-circle-progress-size: 100px;--vro-circle-progress-color: currentColor;--vro-circle-progress-background-color: rgba(0, 0, 0, .08);--vro-circle-progress-duration: .3s;--vro-circle-progress-curve: ease;--vro-circle-progress-content-color: currentColor;--vro-circle-progress-content-font-size: 16px}.vro-circle-progress{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--size);height:var(--size);color:var(--vro-circle-progress-content-color);font-size:var(--vro-circle-progress-content-font-size);line-height:1;vertical-align:middle}.vro-circle-progress-svg{display:block;width:100%;height:100%}.vro-circle-progress-track{stroke:var(--background-color)}.vro-circle-progress-line{stroke:var(--color);transition:stroke-dashoffset var(--duration) var(--curve),stroke var(--duration) var(--curve);transform:rotate(-90deg);transform-origin:50% 50%}.vro-circle-progress-content{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center}:root,:host{--vro-icon-duration: 2s;--vro-icon-size: inherit;--vro-icon-color: inherit}.vro-icon{display:inline-flex;justify-content:center;align-items:center;position:relative;fill:currentColor;line-height:1em;font-size:var(--size);color:var(--color);text-rendering:auto;-webkit-font-smoothing:antialiased}.vro-icon img{display:block;width:1em;height:1em;object-fit:contain}.vro-icon svg{height:1em;width:1em;fill:currentColor;stroke:currentColor}.vro-icon.is-loading{animation:rotating var(--duration) linear infinite}@keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:root,:host{--vro-loading-size: 24px;--vro-loading-color: currentColor;--vro-loading-circular-duration: 1.6s;--vro-loading-spinner-duration: 1.2s;--vro-loading-dots-duration: 1s;--vro-loading-image-duration: 1.2s}.vro-loading{display:inline-flex;align-items:center;justify-content:center;color:var(--color);line-height:1;vertical-align:middle}.vro-loading-circular{width:var(--size);height:var(--size);animation:vro-loading-rotate var(--duration) linear infinite}.vro-loading-circular circle{stroke:currentColor;stroke-width:4;stroke-linecap:round;stroke-dasharray:90,150;stroke-dashoffset:0;animation:vro-loading-circular var(--duration) ease-in-out infinite}.vro-loading-spinner{width:var(--size);height:var(--size);animation:vro-loading-fade var(--duration) linear infinite}.vro-loading-dots{display:inline-flex;align-items:center;justify-content:center;gap:calc(var(--size) * .12);width:var(--size);height:var(--size)}.vro-loading-dots i{width:calc(var(--size) * .18);height:calc(var(--size) * .18);background:currentColor;border-radius:50%;animation:vro-loading-dot var(--duration) ease-in-out infinite}.vro-loading-dots i:nth-child(2){animation-delay:.15s}.vro-loading-dots i:nth-child(3){animation-delay:.3s}.vro-loading-image{display:grid;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr);gap:max(1px,var(--size) * .14);width:var(--size);height:var(--size)}.vro-loading-image i{background:currentColor;opacity:.16}.vro-loading-image i:nth-child(1){animation:vro-loading-image-1 var(--duration) linear infinite}.vro-loading-image i:nth-child(2){animation:vro-loading-image-2 var(--duration) linear infinite}.vro-loading-image i:nth-child(3){animation:vro-loading-image-4 var(--duration) linear infinite}.vro-loading-image i:nth-child(4){animation:vro-loading-image-3 var(--duration) linear infinite}@keyframes vro-loading-rotate{to{transform:rotate(360deg)}}@keyframes vro-loading-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}to{stroke-dasharray:90,150;stroke-dashoffset:-120}}@keyframes vro-loading-fade{to{transform:rotate(360deg)}}@keyframes vro-loading-dot{0%,80%,to{opacity:.35;transform:scale(.72)}40%{opacity:1;transform:scale(1)}}@keyframes vro-loading-image-1{0%,12.5%,to{opacity:.86}25%,87.5%{opacity:.16}}@keyframes vro-loading-image-2{0%,to{opacity:.16}12.5%,37.5%{opacity:.86}50%{opacity:.16}}@keyframes vro-loading-image-3{0%,25%,to{opacity:.16}37.5%,62.5%{opacity:.86}75%{opacity:.16}}@keyframes vro-loading-image-4{0%,50%,to{opacity:.16}62.5%,87.5%{opacity:.86}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function addUnit(value?: string | number, defaultUnit?: string): string;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
export * from './addUnit';
|
|
1
2
|
export * from './ComponentManager';
|
|
2
3
|
export * from './format';
|
|
4
|
+
export * from './getSlotEntries';
|
|
3
5
|
export * from './mountComponent';
|
|
4
6
|
export * from './parseType';
|
|
5
|
-
export * from './props';
|
|
6
7
|
export * from './renderComponent';
|
|
7
8
|
export * from './showComponent';
|
|
8
9
|
export * from './withInstall';
|
package/dist/utils/index.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { addUnit as e } from "./addUnit.js";
|
|
2
|
+
import { ComponentManager as p } from "./ComponentManager.js";
|
|
3
|
+
import { parseDecimalString as n, parseNumberString as f } from "./format.js";
|
|
4
|
+
import { getSlotEntries as a } from "./getSlotEntries.js";
|
|
5
|
+
import { mountComponent as s } from "./mountComponent.js";
|
|
6
|
+
import { parseType as l } from "./parseType.js";
|
|
7
|
+
import { renderComponent as d } from "./renderComponent.js";
|
|
8
|
+
import { showComponent as h } from "./showComponent.js";
|
|
9
|
+
import { withInstall as w } from "./withInstall.js";
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
d as
|
|
18
|
-
|
|
11
|
+
p as ComponentManager,
|
|
12
|
+
e as addUnit,
|
|
13
|
+
a as getSlotEntries,
|
|
14
|
+
s as mountComponent,
|
|
15
|
+
n as parseDecimalString,
|
|
16
|
+
f as parseNumberString,
|
|
17
|
+
l as parseType,
|
|
18
|
+
d as renderComponent,
|
|
19
|
+
h as showComponent,
|
|
20
|
+
w as withInstall
|
|
19
21
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AppContext, Component } from 'vue';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
2
|
+
import { ExtractComponentProps } from '../types';
|
|
3
|
+
export interface ShowComponentOptions {
|
|
4
|
+
appContext?: AppContext | null;
|
|
5
|
+
destroyHandlers?: string[] | false;
|
|
6
|
+
}
|
|
7
|
+
export declare function showComponent<T extends Component, P = ExtractComponentProps<T>>(component: T, props: Partial<P>, options?: ShowComponentOptions | null): Promise<any>;
|
|
@@ -1,17 +1,39 @@
|
|
|
1
|
-
import { renderComponent as
|
|
2
|
-
function
|
|
3
|
-
return new Promise((
|
|
4
|
-
const {
|
|
5
|
-
|
|
1
|
+
import { renderComponent as u } from "./renderComponent.js";
|
|
2
|
+
function w(e, t, s = null) {
|
|
3
|
+
return new Promise((n, o) => {
|
|
4
|
+
const { destroyHandlers: r, appContext: i } = s || {};
|
|
5
|
+
let c = !1, a = () => {
|
|
6
|
+
};
|
|
7
|
+
const { destroy: d, instance: l } = u(
|
|
8
|
+
e,
|
|
6
9
|
{
|
|
7
|
-
...
|
|
8
|
-
|
|
10
|
+
...t,
|
|
11
|
+
...f(t, r, () => a())
|
|
9
12
|
},
|
|
10
|
-
e
|
|
13
|
+
p(e, i)
|
|
11
14
|
);
|
|
12
|
-
|
|
15
|
+
a = () => {
|
|
16
|
+
c || (c = !0, d());
|
|
17
|
+
}, l.exposed.show(t).then(n).catch(o).finally(() => {
|
|
18
|
+
r || a();
|
|
19
|
+
});
|
|
13
20
|
});
|
|
14
21
|
}
|
|
22
|
+
function p(e, t) {
|
|
23
|
+
return t ?? e._context ?? window.app?._context ?? window._app?._context;
|
|
24
|
+
}
|
|
25
|
+
function f(e, t, s) {
|
|
26
|
+
return (t || []).reduce((n, o) => {
|
|
27
|
+
const r = e[o];
|
|
28
|
+
return n[o] = async (...i) => {
|
|
29
|
+
try {
|
|
30
|
+
await r?.(...i);
|
|
31
|
+
} finally {
|
|
32
|
+
s();
|
|
33
|
+
}
|
|
34
|
+
}, n;
|
|
35
|
+
}, {});
|
|
36
|
+
}
|
|
15
37
|
export {
|
|
16
|
-
|
|
38
|
+
w as showComponent
|
|
17
39
|
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export declare const VroCircleProgress: import('..').WithInstall<{
|
|
3
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: NumberConstructor;
|
|
6
|
+
default: number;
|
|
7
|
+
};
|
|
8
|
+
size: {
|
|
9
|
+
type: import('vue').PropType<string | number>;
|
|
10
|
+
default: number;
|
|
11
|
+
};
|
|
12
|
+
strokeWidth: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
16
|
+
strokeLinecap: {
|
|
17
|
+
type: import('vue').PropType<import('./types').VroCircleProgressStrokeLinecap>;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
duration: {
|
|
21
|
+
type: import('vue').PropType<string | number>;
|
|
22
|
+
default: number;
|
|
23
|
+
};
|
|
24
|
+
color: StringConstructor;
|
|
25
|
+
backgroundColor: StringConstructor;
|
|
26
|
+
curve: StringConstructor;
|
|
27
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
28
|
+
size: string | number;
|
|
29
|
+
modelValue: number;
|
|
30
|
+
strokeWidth: number;
|
|
31
|
+
strokeLinecap: import('./types').VroCircleProgressStrokeLinecap;
|
|
32
|
+
duration: string | number;
|
|
33
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
34
|
+
P: {};
|
|
35
|
+
B: {};
|
|
36
|
+
D: {};
|
|
37
|
+
C: {};
|
|
38
|
+
M: {};
|
|
39
|
+
Defaults: {};
|
|
40
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
41
|
+
modelValue: {
|
|
42
|
+
type: NumberConstructor;
|
|
43
|
+
default: number;
|
|
44
|
+
};
|
|
45
|
+
size: {
|
|
46
|
+
type: import('vue').PropType<string | number>;
|
|
47
|
+
default: number;
|
|
48
|
+
};
|
|
49
|
+
strokeWidth: {
|
|
50
|
+
type: NumberConstructor;
|
|
51
|
+
default: number;
|
|
52
|
+
};
|
|
53
|
+
strokeLinecap: {
|
|
54
|
+
type: import('vue').PropType<import('./types').VroCircleProgressStrokeLinecap>;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
duration: {
|
|
58
|
+
type: import('vue').PropType<string | number>;
|
|
59
|
+
default: number;
|
|
60
|
+
};
|
|
61
|
+
color: StringConstructor;
|
|
62
|
+
backgroundColor: StringConstructor;
|
|
63
|
+
curve: StringConstructor;
|
|
64
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
65
|
+
size: string | number;
|
|
66
|
+
modelValue: number;
|
|
67
|
+
strokeWidth: number;
|
|
68
|
+
strokeLinecap: import('./types').VroCircleProgressStrokeLinecap;
|
|
69
|
+
duration: string | number;
|
|
70
|
+
}>;
|
|
71
|
+
__isFragment?: never;
|
|
72
|
+
__isTeleport?: never;
|
|
73
|
+
__isSuspense?: never;
|
|
74
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
75
|
+
modelValue: {
|
|
76
|
+
type: NumberConstructor;
|
|
77
|
+
default: number;
|
|
78
|
+
};
|
|
79
|
+
size: {
|
|
80
|
+
type: import('vue').PropType<string | number>;
|
|
81
|
+
default: number;
|
|
82
|
+
};
|
|
83
|
+
strokeWidth: {
|
|
84
|
+
type: NumberConstructor;
|
|
85
|
+
default: number;
|
|
86
|
+
};
|
|
87
|
+
strokeLinecap: {
|
|
88
|
+
type: import('vue').PropType<import('./types').VroCircleProgressStrokeLinecap>;
|
|
89
|
+
default: string;
|
|
90
|
+
};
|
|
91
|
+
duration: {
|
|
92
|
+
type: import('vue').PropType<string | number>;
|
|
93
|
+
default: number;
|
|
94
|
+
};
|
|
95
|
+
color: StringConstructor;
|
|
96
|
+
backgroundColor: StringConstructor;
|
|
97
|
+
curve: StringConstructor;
|
|
98
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
99
|
+
size: string | number;
|
|
100
|
+
modelValue: number;
|
|
101
|
+
strokeWidth: number;
|
|
102
|
+
strokeLinecap: import('./types').VroCircleProgressStrokeLinecap;
|
|
103
|
+
duration: string | number;
|
|
104
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
105
|
+
$slots: Readonly<import('./types').VroCircleProgressSlots> & import('./types').VroCircleProgressSlots;
|
|
106
|
+
})>;
|
|
107
|
+
export default VroCircleProgress;
|
|
108
|
+
export type VroCircleProgressInstance = InstanceType<typeof VroCircleProgress>;
|
|
109
|
+
declare module 'vue' {
|
|
110
|
+
interface GlobalComponents {
|
|
111
|
+
VroCircleProgress: typeof VroCircleProgress;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "@daysnap/utils";
|
|
2
|
+
import "vue";
|
|
3
|
+
import { withInstall as r } from "../utils/withInstall.js";
|
|
4
|
+
import o from "./vro-circle-progress.vue.js";
|
|
5
|
+
import { vroCircleProgressProps as l } from "./types.js";
|
|
6
|
+
const e = r(o);
|
|
7
|
+
export {
|
|
8
|
+
e as VroCircleProgress,
|
|
9
|
+
e as default,
|
|
10
|
+
l as vroCircleProgressProps
|
|
11
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root,:host{--vro-circle-progress-size: 100px;--vro-circle-progress-color: currentColor;--vro-circle-progress-background-color: rgba(0, 0, 0, .08);--vro-circle-progress-duration: .3s;--vro-circle-progress-curve: ease;--vro-circle-progress-content-color: currentColor;--vro-circle-progress-content-font-size: 16px}.vro-circle-progress{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--size);height:var(--size);color:var(--vro-circle-progress-content-color);font-size:var(--vro-circle-progress-content-font-size);line-height:1;vertical-align:middle}.vro-circle-progress-svg{display:block;width:100%;height:100%}.vro-circle-progress-track{stroke:var(--background-color)}.vro-circle-progress-line{stroke:var(--color);transition:stroke-dashoffset var(--duration) var(--curve),stroke var(--duration) var(--curve);transform:rotate(-90deg);transform-origin:50% 50%}.vro-circle-progress-content{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center}
|
|
File without changes
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export type VroCircleProgressStrokeLinecap = 'butt' | 'round' | 'square';
|
|
3
|
+
export declare const vroCircleProgressProps: {
|
|
4
|
+
/**
|
|
5
|
+
* 当前进度,取值范围为 0 ~ 100。
|
|
6
|
+
*/
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
default: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* 圆环尺寸,传入数字时单位为 px。
|
|
13
|
+
*/
|
|
14
|
+
size: {
|
|
15
|
+
type: PropType<string | number>;
|
|
16
|
+
default: number;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* 进度条宽度。
|
|
20
|
+
*/
|
|
21
|
+
strokeWidth: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
default: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* 进度条端点样式。
|
|
27
|
+
*/
|
|
28
|
+
strokeLinecap: {
|
|
29
|
+
type: PropType<VroCircleProgressStrokeLinecap>;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* 动画时长,传入数字时单位为 ms。
|
|
34
|
+
*/
|
|
35
|
+
duration: {
|
|
36
|
+
type: PropType<string | number>;
|
|
37
|
+
default: number;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* 进度条颜色。
|
|
41
|
+
*/
|
|
42
|
+
color: StringConstructor;
|
|
43
|
+
/**
|
|
44
|
+
* 轨道颜色。
|
|
45
|
+
*/
|
|
46
|
+
backgroundColor: StringConstructor;
|
|
47
|
+
/**
|
|
48
|
+
* 动画速度曲线。
|
|
49
|
+
*/
|
|
50
|
+
curve: StringConstructor;
|
|
51
|
+
};
|
|
52
|
+
export interface VroCircleProgressSlots {
|
|
53
|
+
default?: (props: {
|
|
54
|
+
value: number;
|
|
55
|
+
}) => any;
|
|
56
|
+
}
|
|
57
|
+
export type VroCircleProgressProps = ExtractPropTypes<typeof vroCircleProgressProps>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
/**
|
|
3
|
+
* 当前进度,取值范围为 0 ~ 100。
|
|
4
|
+
*/
|
|
5
|
+
modelValue: {
|
|
6
|
+
type: Number,
|
|
7
|
+
default: 0
|
|
8
|
+
},
|
|
9
|
+
/**
|
|
10
|
+
* 圆环尺寸,传入数字时单位为 px。
|
|
11
|
+
*/
|
|
12
|
+
size: {
|
|
13
|
+
type: [Number, String],
|
|
14
|
+
default: 100
|
|
15
|
+
},
|
|
16
|
+
/**
|
|
17
|
+
* 进度条宽度。
|
|
18
|
+
*/
|
|
19
|
+
strokeWidth: {
|
|
20
|
+
type: Number,
|
|
21
|
+
default: 10
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* 进度条端点样式。
|
|
25
|
+
*/
|
|
26
|
+
strokeLinecap: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "round"
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* 动画时长,传入数字时单位为 ms。
|
|
32
|
+
*/
|
|
33
|
+
duration: {
|
|
34
|
+
type: [Number, String],
|
|
35
|
+
default: 300
|
|
36
|
+
},
|
|
37
|
+
/**
|
|
38
|
+
* 进度条颜色。
|
|
39
|
+
*/
|
|
40
|
+
color: String,
|
|
41
|
+
/**
|
|
42
|
+
* 轨道颜色。
|
|
43
|
+
*/
|
|
44
|
+
backgroundColor: String,
|
|
45
|
+
/**
|
|
46
|
+
* 动画速度曲线。
|
|
47
|
+
*/
|
|
48
|
+
curve: String
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
e as vroCircleProgressProps
|
|
52
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { VroCircleProgressSlots } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<VroCircleProgressSlots> & VroCircleProgressSlots;
|
|
5
|
+
refs: {};
|
|
6
|
+
rootEl: HTMLDivElement;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: NumberConstructor;
|
|
12
|
+
default: number;
|
|
13
|
+
};
|
|
14
|
+
size: {
|
|
15
|
+
type: import('vue').PropType<string | number>;
|
|
16
|
+
default: number;
|
|
17
|
+
};
|
|
18
|
+
strokeWidth: {
|
|
19
|
+
type: NumberConstructor;
|
|
20
|
+
default: number;
|
|
21
|
+
};
|
|
22
|
+
strokeLinecap: {
|
|
23
|
+
type: import('vue').PropType<import('./types').VroCircleProgressStrokeLinecap>;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
duration: {
|
|
27
|
+
type: import('vue').PropType<string | number>;
|
|
28
|
+
default: number;
|
|
29
|
+
};
|
|
30
|
+
color: StringConstructor;
|
|
31
|
+
backgroundColor: StringConstructor;
|
|
32
|
+
curve: StringConstructor;
|
|
33
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
34
|
+
modelValue: {
|
|
35
|
+
type: NumberConstructor;
|
|
36
|
+
default: number;
|
|
37
|
+
};
|
|
38
|
+
size: {
|
|
39
|
+
type: import('vue').PropType<string | number>;
|
|
40
|
+
default: number;
|
|
41
|
+
};
|
|
42
|
+
strokeWidth: {
|
|
43
|
+
type: NumberConstructor;
|
|
44
|
+
default: number;
|
|
45
|
+
};
|
|
46
|
+
strokeLinecap: {
|
|
47
|
+
type: import('vue').PropType<import('./types').VroCircleProgressStrokeLinecap>;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
duration: {
|
|
51
|
+
type: import('vue').PropType<string | number>;
|
|
52
|
+
default: number;
|
|
53
|
+
};
|
|
54
|
+
color: StringConstructor;
|
|
55
|
+
backgroundColor: StringConstructor;
|
|
56
|
+
curve: StringConstructor;
|
|
57
|
+
}>> & Readonly<{}>, {
|
|
58
|
+
size: string | number;
|
|
59
|
+
modelValue: number;
|
|
60
|
+
strokeWidth: number;
|
|
61
|
+
strokeLinecap: import('./types').VroCircleProgressStrokeLinecap;
|
|
62
|
+
duration: string | number;
|
|
63
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
64
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
65
|
+
export default _default;
|
|
66
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
67
|
+
new (): {
|
|
68
|
+
$slots: S;
|
|
69
|
+
};
|
|
70
|
+
};
|