srcdev-nuxt-components 2.1.11 → 2.1.12

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,53 @@
1
+ <template>
2
+ <div class="animated-svg-text" :class="[elementClasses]">
3
+ <slot name="text"></slot>
4
+ </div>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ const props = defineProps({
9
+ styleClassPassthrough: {
10
+ type: Array as PropType<string[]>,
11
+ default: () => [],
12
+ },
13
+ });
14
+
15
+ const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
16
+
17
+ watch(
18
+ () => props.styleClassPassthrough,
19
+ () => {
20
+ resetElementClasses(props.styleClassPassthrough);
21
+ }
22
+ );
23
+ </script>
24
+
25
+ <style lang="css">
26
+ @keyframes textAnimation {
27
+ 0% {
28
+ stroke-dashoffset: var(--_animated-svg-text-stroke-dasharray);
29
+ stroke-width: 0.3;
30
+ }
31
+ 70% {
32
+ fill: transparent;
33
+ stroke-width: 0.3;
34
+ }
35
+ 100% {
36
+ fill: var(--_animated-svg-text-color);
37
+ stroke-dashoffset: 0;
38
+ stroke-width: 0;
39
+ }
40
+ }
41
+ .animated-svg-text {
42
+ /* Component styles */
43
+
44
+ svg path {
45
+ fill: transparent;
46
+ stroke: var(--_animated-svg-text-color);
47
+ stroke-width: 0.3;
48
+ stroke-dasharray: var(--_animated-svg-text-stroke-dasharray);
49
+ stroke-dashoffset: var(--_animated-svg-text-stroke-dasharray);
50
+ animation: textAnimation 4s ease-in-out 1 forwards;
51
+ }
52
+ }
53
+ </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-components",
3
3
  "type": "module",
4
- "version": "2.1.11",
4
+ "version": "2.1.12",
5
5
  "main": "nuxt.config.ts",
6
6
  "scripts": {
7
7
  "clean": "rm -rf .nuxt && rm -rf .output && rm -rf .playground/.nuxt && rm -rf .playground/.output",