@mirweb/mir-web-components 2.2.15 → 2.3.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.
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="loader" :style="{ margin: wrapperMargin }">
|
|
3
|
+
<div class="spinner" :style="{ width: spinnerSize, height: spinnerSize }">
|
|
4
|
+
<svg class="spinner__circle" viewBox="25 25 50 50">
|
|
5
|
+
<circle
|
|
6
|
+
class="spinner__svg"
|
|
7
|
+
cx="50"
|
|
8
|
+
cy="50"
|
|
9
|
+
r="20"
|
|
10
|
+
fill="none"
|
|
11
|
+
stroke-width="2"
|
|
12
|
+
stroke-miterlimit="10"
|
|
13
|
+
/>
|
|
14
|
+
</svg>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup lang="ts">
|
|
20
|
+
import { computed } from "vue";
|
|
21
|
+
|
|
22
|
+
const props = defineProps({
|
|
23
|
+
size: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "100px",
|
|
26
|
+
},
|
|
27
|
+
margin: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "300px auto",
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const spinnerSize = computed(() => props.size);
|
|
34
|
+
const wrapperMargin = computed(() => props.margin);
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<style lang="scss" scoped>
|
|
38
|
+
@use "../../../assets/scss/variables.scss" as *;
|
|
39
|
+
|
|
40
|
+
.loader {
|
|
41
|
+
max-width: 984px;
|
|
42
|
+
margin: auto;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.spinner {
|
|
46
|
+
position: relative;
|
|
47
|
+
margin: 0 auto;
|
|
48
|
+
border-radius: 50%;
|
|
49
|
+
&:before {
|
|
50
|
+
content: "";
|
|
51
|
+
display: block;
|
|
52
|
+
padding-top: 100%;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&__circle {
|
|
56
|
+
animation: rotate 2s linear infinite;
|
|
57
|
+
height: 100%;
|
|
58
|
+
transform-origin: center center;
|
|
59
|
+
width: 100%;
|
|
60
|
+
position: absolute;
|
|
61
|
+
top: 0;
|
|
62
|
+
bottom: 0;
|
|
63
|
+
left: 0;
|
|
64
|
+
right: 0;
|
|
65
|
+
margin: auto;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&__svg {
|
|
69
|
+
stroke-dasharray: 1, 200;
|
|
70
|
+
stroke-dashoffset: 0;
|
|
71
|
+
animation:
|
|
72
|
+
dash 1.5s ease-in-out infinite,
|
|
73
|
+
color 6s ease-in-out infinite;
|
|
74
|
+
stroke-linecap: round;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@keyframes rotate {
|
|
79
|
+
100% {
|
|
80
|
+
transform: rotate(360deg);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@keyframes dash {
|
|
85
|
+
0% {
|
|
86
|
+
stroke-dasharray: 1, 200;
|
|
87
|
+
stroke-dashoffset: 0;
|
|
88
|
+
}
|
|
89
|
+
50% {
|
|
90
|
+
stroke-dasharray: 89, 200;
|
|
91
|
+
stroke-dashoffset: -35px;
|
|
92
|
+
}
|
|
93
|
+
100% {
|
|
94
|
+
stroke-dasharray: 89, 200;
|
|
95
|
+
stroke-dashoffset: -124px;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@keyframes color {
|
|
100
|
+
100%,
|
|
101
|
+
0% {
|
|
102
|
+
stroke: $blue-500;
|
|
103
|
+
}
|
|
104
|
+
40% {
|
|
105
|
+
stroke: $blue-600;
|
|
106
|
+
}
|
|
107
|
+
66% {
|
|
108
|
+
stroke: $blue-700;
|
|
109
|
+
}
|
|
110
|
+
80%,
|
|
111
|
+
90% {
|
|
112
|
+
stroke: $blue-800;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
</style>
|
package/dist/components/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { default as AtomDropdown } from "./atoms/dropdown/dropdown.vue";
|
|
|
5
5
|
export { default as AtomImage } from "./atoms/image/image.vue";
|
|
6
6
|
export { default as AtomLabel } from "./atoms/label/label.vue";
|
|
7
7
|
export { default as AtomLink } from "./atoms/link/link.vue";
|
|
8
|
+
export { default as AtomLoader } from "./atoms/loader/loader.vue";
|
|
8
9
|
export { default as AtomRadioButton } from "./atoms/radio-button/radio-button.vue";
|
|
9
10
|
export { default as AtomSelect } from "./atoms/select/select.vue";
|
|
10
11
|
export { default as AtomSelectMultiple } from "./atoms/select-multiple/select-multiple.vue";
|