@vrojs/base 0.0.5 → 0.0.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.
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%}: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{
|
|
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{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.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%}: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}}
|
|
@@ -1 +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{
|
|
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{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.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%}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as p, computed as k, createElementBlock as
|
|
1
|
+
import { defineComponent as p, computed as k, createElementBlock as l, openBlock as i, normalizeStyle as m, renderSlot as h, createElementVNode as n, createTextVNode as f, toDisplayString as g } from "vue";
|
|
2
2
|
import { clamp as u } from "@daysnap/utils";
|
|
3
3
|
import { addUnit as v } from "../utils/addUnit.js";
|
|
4
4
|
import { vroCircleProgressProps as _ } from "./types.js";
|
|
5
5
|
const y = ["aria-valuenow"], w = {
|
|
6
6
|
class: "vro-circle-progress-svg",
|
|
7
7
|
viewBox: "0 0 100 100"
|
|
8
|
-
}, x = ["r", "stroke-width"], b = ["r", "stroke-width", "stroke-linecap", "stroke-dasharray", "stroke-dashoffset"],
|
|
8
|
+
}, x = ["r", "stroke-width"], b = ["r", "stroke-width", "stroke-linecap", "stroke-dasharray", "stroke-dashoffset"], s = 50, W = /* @__PURE__ */ p({
|
|
9
9
|
name: "VroCircleProgress",
|
|
10
10
|
__name: "vro-circle-progress",
|
|
11
11
|
props: _,
|
|
12
12
|
setup(d) {
|
|
13
13
|
const e = d, r = k(() => {
|
|
14
|
-
const o = u(0, e.modelValue, 100), t = u(0, e.strokeWidth, 100), a = s - t / 2,
|
|
14
|
+
const o = u(0, e.modelValue, 100), t = u(0, e.strokeWidth, 100), a = s - t / 2, c = 2 * Math.PI * a;
|
|
15
15
|
return {
|
|
16
16
|
value: o,
|
|
17
17
|
strokeWidth: t,
|
|
18
18
|
radius: a,
|
|
19
|
-
circumference:
|
|
20
|
-
strokeDashoffset:
|
|
19
|
+
circumference: c,
|
|
20
|
+
strokeDashoffset: c * (1 - o / 100),
|
|
21
21
|
text: `${Math.round(o)}%`,
|
|
22
22
|
style: {
|
|
23
23
|
"--size": v(e.size) || "var(--vro-circle-progress-size)",
|
|
@@ -28,7 +28,7 @@ const y = ["aria-valuenow"], w = {
|
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
});
|
|
31
|
-
return (o, t) => (
|
|
31
|
+
return (o, t) => (i(), l("div", {
|
|
32
32
|
class: "vro-circle-progress",
|
|
33
33
|
style: m(r.value.style),
|
|
34
34
|
role: "progressbar",
|
|
@@ -36,8 +36,8 @@ const y = ["aria-valuenow"], w = {
|
|
|
36
36
|
"aria-valuemin": "0",
|
|
37
37
|
"aria-valuemax": "100"
|
|
38
38
|
}, [
|
|
39
|
-
(
|
|
40
|
-
|
|
39
|
+
(i(), l("svg", w, [
|
|
40
|
+
n("circle", {
|
|
41
41
|
class: "vro-circle-progress-track",
|
|
42
42
|
cx: s,
|
|
43
43
|
cy: s,
|
|
@@ -45,7 +45,7 @@ const y = ["aria-valuenow"], w = {
|
|
|
45
45
|
fill: "none",
|
|
46
46
|
"stroke-width": r.value.strokeWidth
|
|
47
47
|
}, null, 8, x),
|
|
48
|
-
|
|
48
|
+
n("circle", {
|
|
49
49
|
class: "vro-circle-progress-line",
|
|
50
50
|
cx: s,
|
|
51
51
|
cy: s,
|
|
@@ -57,16 +57,14 @@ const y = ["aria-valuenow"], w = {
|
|
|
57
57
|
"stroke-dashoffset": r.value.strokeDashoffset
|
|
58
58
|
}, null, 8, b)
|
|
59
59
|
])),
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
g(f(r.value.text), 1)
|
|
65
|
-
])
|
|
60
|
+
h(o.$slots, "default", {
|
|
61
|
+
value: r.value.value
|
|
62
|
+
}, () => [
|
|
63
|
+
f(g(r.value.text), 1)
|
|
66
64
|
])
|
|
67
65
|
], 12, y));
|
|
68
66
|
}
|
|
69
67
|
});
|
|
70
68
|
export {
|
|
71
|
-
|
|
69
|
+
W as default
|
|
72
70
|
};
|