@vrojs/base 0.0.3 → 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.
Files changed (51) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.js +41 -33
  3. package/dist/style/index.css +1 -1
  4. package/dist/types/ExtractComponentProps.d.ts +3 -0
  5. package/dist/types/ExtractComponentProps.js +1 -0
  6. package/dist/types/VroSlots.d.ts +4 -0
  7. package/dist/types/VroSlots.js +1 -0
  8. package/dist/types/index.d.ts +2 -0
  9. package/dist/utils/addUnit.d.ts +1 -0
  10. package/dist/utils/addUnit.js +7 -0
  11. package/dist/utils/index.d.ts +1 -1
  12. package/dist/utils/index.js +15 -15
  13. package/dist/utils/showComponent.d.ts +6 -5
  14. package/dist/utils/showComponent.js +32 -10
  15. package/dist/vro-circle-progress/index.d.ts +113 -0
  16. package/dist/vro-circle-progress/index.js +11 -0
  17. package/dist/vro-circle-progress/style/css.d.ts +0 -0
  18. package/dist/vro-circle-progress/style/css.js +4 -0
  19. package/dist/vro-circle-progress/style/index.css +1 -0
  20. package/dist/vro-circle-progress/style/index.d.ts +0 -0
  21. package/dist/vro-circle-progress/style/index.js +4 -0
  22. package/dist/vro-circle-progress/types.d.ts +57 -0
  23. package/dist/vro-circle-progress/types.js +52 -0
  24. package/dist/vro-circle-progress/vro-circle-progress.vue.d.ts +70 -0
  25. package/dist/vro-circle-progress/vro-circle-progress.vue.js +72 -0
  26. package/dist/vro-circle-progress/vro-circle-progress.vue2.js +4 -0
  27. package/dist/vro-icon/index.d.ts +58 -0
  28. package/dist/vro-icon/index.js +11 -0
  29. package/dist/vro-icon/style/css.d.ts +0 -0
  30. package/dist/vro-icon/style/css.js +4 -0
  31. package/dist/vro-icon/style/index.css +1 -0
  32. package/dist/vro-icon/style/index.d.ts +0 -0
  33. package/dist/vro-icon/style/index.js +4 -0
  34. package/dist/vro-icon/types.d.ts +29 -0
  35. package/dist/vro-icon/types.js +30 -0
  36. package/dist/vro-icon/vro-icon.vue.d.ts +37 -0
  37. package/dist/vro-icon/vro-icon.vue.js +36 -0
  38. package/dist/vro-icon/vro-icon.vue2.js +4 -0
  39. package/dist/vro-input/index.d.ts +3 -3
  40. package/dist/vro-input/types.d.ts +5 -5
  41. package/dist/vro-input/types.js +6 -9
  42. package/dist/vro-input/vro-input.vue.d.ts +3 -3
  43. package/dist/vro-loading/index.d.ts +9 -30
  44. package/dist/vro-loading/style/index.css +1 -1
  45. package/dist/vro-loading/types.d.ts +7 -9
  46. package/dist/vro-loading/types.js +8 -10
  47. package/dist/vro-loading/vro-loading.vue.d.ts +6 -18
  48. package/dist/vro-loading/vro-loading.vue.js +37 -24
  49. package/package.json +7 -4
  50. package/dist/utils/props.d.ts +0 -2
  51. package/dist/utils/props.js +0 -5
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  export * from './types';
2
2
  export * from './utils';
3
3
  export * from './vro-aspect-ratio';
4
+ export * from './vro-circle-progress';
5
+ export * from './vro-icon';
4
6
  export * from './vro-input';
5
7
  export * from './vro-loading';
6
8
  export * from './vro-vnr';
package/dist/index.js CHANGED
@@ -1,37 +1,45 @@
1
- import { ComponentManager as e } from "./utils/ComponentManager.js";
2
- import { parseDecimalString as t, parseNumberString as m } from "./utils/format.js";
3
- import { getSlotEntries as f } from "./utils/getSlotEntries.js";
4
- import { mountComponent as s } from "./utils/mountComponent.js";
5
- import { parseType as i } from "./utils/parseType.js";
6
- import { definePropType as V } from "./utils/props.js";
7
- import { renderComponent as d } from "./utils/renderComponent.js";
8
- import { showComponent as u } from "./utils/showComponent.js";
9
- import { withInstall as C } from "./utils/withInstall.js";
10
- import { VroAspectRatio as I } from "./vro-aspect-ratio/index.js";
11
- import { VroInput as h } from "./vro-input/index.js";
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";
12
14
  import { VroLoading as y } from "./vro-loading/index.js";
13
- import { VroVnr as L } from "./vro-vnr/index.js";
14
- import { vroAspectRatioProps as T } from "./vro-aspect-ratio/types.js";
15
- import { vroInputProps as D } from "./vro-input/types.js";
16
- import { vroLoadingProps as M } from "./vro-loading/types.js";
17
- import { vroVnrProps as j } from "./vro-vnr/types.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";
18
22
  export {
19
- e as ComponentManager,
20
- I as VroAspectRatio,
21
- h as VroInput,
23
+ p as ComponentManager,
24
+ u as VroAspectRatio,
25
+ h as VroCircleProgress,
26
+ A as VroIcon,
27
+ R as VroInput,
22
28
  y as VroLoading,
23
- L as VroVnr,
24
- V as definePropType,
25
- f as getSlotEntries,
26
- s as mountComponent,
27
- t as parseDecimalString,
28
- m as parseNumberString,
29
- i as parseType,
30
- d as renderComponent,
31
- u as showComponent,
32
- T as vroAspectRatioProps,
33
- D as vroInputProps,
34
- M as vroLoadingProps,
35
- j as vroVnrProps,
36
- C as withInstall
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
37
45
  };
@@ -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%}.vro-loading{--vro-loading-size: 32px;--vro-loading-color: currentColor;display:inline-flex;align-items:center;justify-content:center;color:var(--vro-loading-color);line-height:1;vertical-align:middle}.vro-loading__circular{width:var(--vro-loading-size);height:var(--vro-loading-size);animation:vro-loading-rotate 1.6s 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 1.6s ease-in-out infinite}.vro-loading__spinner{position:relative;width:var(--vro-loading-size);height:var(--vro-loading-size);animation:vro-loading-fade 1.2s linear infinite}.vro-loading__spinner i{position:absolute;left:50%;top:0;width:2px;height:28%;background:currentColor;border-radius:999px;transform-origin:center calc(var(--vro-loading-size) / 2)}.vro-loading__spinner i:nth-child(1){opacity:calc(1 / 12);transform:translate(-50%) rotate(0)}.vro-loading__spinner i:nth-child(2){opacity:calc(2 / 12);transform:translate(-50%) rotate(30deg)}.vro-loading__spinner i:nth-child(3){opacity:.25;transform:translate(-50%) rotate(60deg)}.vro-loading__spinner i:nth-child(4){opacity:calc(4 / 12);transform:translate(-50%) rotate(90deg)}.vro-loading__spinner i:nth-child(5){opacity:calc(5 / 12);transform:translate(-50%) rotate(120deg)}.vro-loading__spinner i:nth-child(6){opacity:.5;transform:translate(-50%) rotate(150deg)}.vro-loading__spinner i:nth-child(7){opacity:calc(7 / 12);transform:translate(-50%) rotate(180deg)}.vro-loading__spinner i:nth-child(8){opacity:calc(8 / 12);transform:translate(-50%) rotate(210deg)}.vro-loading__spinner i:nth-child(9){opacity:.75;transform:translate(-50%) rotate(240deg)}.vro-loading__spinner i:nth-child(10){opacity:calc(10 / 12);transform:translate(-50%) rotate(270deg)}.vro-loading__spinner i:nth-child(11){opacity:calc(11 / 12);transform:translate(-50%) rotate(300deg)}.vro-loading__spinner i:nth-child(12){opacity:1;transform:translate(-50%) rotate(330deg)}.vro-loading__dots{display:inline-flex;align-items:center;justify-content:center;gap:calc(var(--vro-loading-size) * .12);width:var(--vro-loading-size);height:var(--vro-loading-size)}.vro-loading__dots i{width:calc(var(--vro-loading-size) * .18);height:calc(var(--vro-loading-size) * .18);background:currentColor;border-radius:50%;animation:vro-loading-dot 1s ease-in-out infinite}.vro-loading__dots i:nth-child(2){animation-delay:.15s}.vro-loading__dots i:nth-child(3){animation-delay:.3s}@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)}}
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,3 @@
1
+ export type ExtractComponentProps<T> = T extends new (...args: any[]) => {
2
+ $props: infer P;
3
+ } ? P : Record<string, any>;
@@ -0,0 +1,4 @@
1
+ export type VroSlot = (props?: any) => any;
2
+ export interface VroSlots {
3
+ [name: string]: VroSlot | undefined;
4
+ }
@@ -0,0 +1 @@
1
+
@@ -1,2 +1,4 @@
1
1
  export type * from './Arrayable';
2
2
  export type * from './DeepPartial';
3
+ export type * from './ExtractComponentProps';
4
+ export type * from './VroSlots';
@@ -0,0 +1 @@
1
+ export declare function addUnit(value?: string | number, defaultUnit?: string): string;
@@ -0,0 +1,7 @@
1
+ import { isNumeric as t } from "@daysnap/utils";
2
+ function f(r, i = "px") {
3
+ return !r && r !== 0 ? "" : t(r) ? `${r}${i}` : r;
4
+ }
5
+ export {
6
+ f as addUnit
7
+ };
@@ -1,9 +1,9 @@
1
+ export * from './addUnit';
1
2
  export * from './ComponentManager';
2
3
  export * from './format';
3
4
  export * from './getSlotEntries';
4
5
  export * from './mountComponent';
5
6
  export * from './parseType';
6
- export * from './props';
7
7
  export * from './renderComponent';
8
8
  export * from './showComponent';
9
9
  export * from './withInstall';
@@ -1,21 +1,21 @@
1
- import { ComponentManager as e } from "./ComponentManager.js";
2
- import { parseDecimalString as p, parseNumberString as m } from "./format.js";
3
- import { getSlotEntries as f } from "./getSlotEntries.js";
4
- import { mountComponent as a } from "./mountComponent.js";
5
- import { parseType as s } from "./parseType.js";
6
- import { definePropType as l } from "./props.js";
7
- import { renderComponent as S } from "./renderComponent.js";
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
8
  import { showComponent as h } from "./showComponent.js";
9
9
  import { withInstall as w } from "./withInstall.js";
10
10
  export {
11
- e as ComponentManager,
12
- l as definePropType,
13
- f as getSlotEntries,
14
- a as mountComponent,
15
- p as parseDecimalString,
16
- m as parseNumberString,
17
- s as parseType,
18
- S as renderComponent,
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
19
  h as showComponent,
20
20
  w as withInstall
21
21
  };
@@ -1,6 +1,7 @@
1
1
  import { AppContext, Component } from 'vue';
2
- export declare function showComponent<T extends Component, P = T extends {
3
- new (): {
4
- $props: infer Props;
5
- };
6
- } ? Props : Record<string, any>>(component: T, props: Partial<P>, appContext?: AppContext | null): Promise<any>;
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 w } from "./renderComponent.js";
2
- function i(n, o, e = null) {
3
- return new Promise((t, r) => {
4
- const { destroy: c, instance: s } = w(
5
- n,
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
- ...o,
8
- onClosed: () => c()
10
+ ...t,
11
+ ...f(t, r, () => a())
9
12
  },
10
- e ?? n._context ?? window.app?._context ?? window._app?._context
13
+ p(e, i)
11
14
  );
12
- s.exposed.show(o).then(t).catch(r);
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
- i as showComponent
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,4 @@
1
+ import '../../style/base.css';
2
+ import './index.css';
3
+ /* empty css */
4
+ /* empty css */
@@ -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,4 @@
1
+ import '../../style/base.css';
2
+ import './index.css';
3
+ /* empty css */
4
+ /* empty css */
@@ -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
+ };