@jis3r/icons 2.5.0 → 2.7.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.
- package/README.md +2 -0
- package/dist/icons/badge-x.svelte +82 -0
- package/dist/icons/badge-x.svelte.d.ts +4 -0
- package/dist/icons/calendar-x-2.svelte +83 -0
- package/dist/icons/calendar-x-2.svelte.d.ts +4 -0
- package/dist/icons/calendar-x.svelte +83 -0
- package/dist/icons/calendar-x.svelte.d.ts +4 -0
- package/dist/icons/circle-x.svelte +80 -0
- package/dist/icons/circle-x.svelte.d.ts +4 -0
- package/dist/icons/file-text.svelte +92 -0
- package/dist/icons/file-text.svelte.d.ts +4 -0
- package/dist/icons/file-x-corner.svelte +83 -0
- package/dist/icons/file-x-corner.svelte.d.ts +4 -0
- package/dist/icons/file-x.svelte +83 -0
- package/dist/icons/file-x.svelte.d.ts +4 -0
- package/dist/icons/globe-x.svelte +80 -0
- package/dist/icons/globe-x.svelte.d.ts +4 -0
- package/dist/icons/mail-x.svelte +81 -0
- package/dist/icons/mail-x.svelte.d.ts +4 -0
- package/dist/icons/map-pin-x-inside.svelte +82 -0
- package/dist/icons/map-pin-x-inside.svelte.d.ts +4 -0
- package/dist/icons/map-pin-x.svelte +83 -0
- package/dist/icons/map-pin-x.svelte.d.ts +4 -0
- package/dist/icons/monitor-x.svelte +82 -0
- package/dist/icons/monitor-x.svelte.d.ts +4 -0
- package/dist/icons/octagon-x.svelte +82 -0
- package/dist/icons/octagon-x.svelte.d.ts +4 -0
- package/dist/icons/package-x.svelte +85 -0
- package/dist/icons/package-x.svelte.d.ts +4 -0
- package/dist/icons/search-x.svelte +101 -0
- package/dist/icons/search-x.svelte.d.ts +4 -0
- package/dist/icons/shield-x.svelte +82 -0
- package/dist/icons/shield-x.svelte.d.ts +4 -0
- package/dist/icons/square-x.svelte +80 -0
- package/dist/icons/square-x.svelte.d.ts +4 -0
- package/dist/icons/ticket-x.svelte +82 -0
- package/dist/icons/ticket-x.svelte.d.ts +4 -0
- package/dist/icons/user-round-x.svelte +124 -0
- package/dist/icons/user-round-x.svelte.d.ts +4 -0
- package/dist/icons/volume-x.svelte +82 -0
- package/dist/icons/volume-x.svelte.d.ts +4 -0
- package/dist/index.d.ts +21 -1
- package/dist/index.js +20 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<a href="https://vercel.com/oss"><img alt="Vercel OSS Program" src="https://vercel.com/oss/program-badge-2026.svg" /></a>
|
|
2
|
+
|
|
1
3
|
# `moving icons` - the standard for animated icons in Svelte. 🧡
|
|
2
4
|
|
|
3
5
|
A collection of 500+ hand-crafted, interaction-ready [Lucide](https://lucide.dev) icons. Built natively for Svelte 5 with zero dependencies. Fully tree-shakeable, MIT licensed, and completely customizable.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { IconProps } from './types.js';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
color = 'currentColor',
|
|
6
|
+
size = 24,
|
|
7
|
+
strokeWidth = 2,
|
|
8
|
+
animate = false,
|
|
9
|
+
class: className = ''
|
|
10
|
+
}: IconProps = $props();
|
|
11
|
+
|
|
12
|
+
function handleMouseEnter() {
|
|
13
|
+
if (animate) return;
|
|
14
|
+
animate = true;
|
|
15
|
+
setTimeout(() => {
|
|
16
|
+
animate = false;
|
|
17
|
+
}, 600);
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<div class={className} aria-label="badge-x" role="img" onmouseenter={handleMouseEnter}>
|
|
22
|
+
<svg
|
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
+
width={size}
|
|
25
|
+
height={size}
|
|
26
|
+
viewBox="0 0 24 24"
|
|
27
|
+
fill="none"
|
|
28
|
+
stroke={color}
|
|
29
|
+
stroke-width={strokeWidth}
|
|
30
|
+
stroke-linecap="round"
|
|
31
|
+
stroke-linejoin="round"
|
|
32
|
+
class="badge-x-icon"
|
|
33
|
+
class:animate
|
|
34
|
+
>
|
|
35
|
+
<path
|
|
36
|
+
d="M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z"
|
|
37
|
+
/>
|
|
38
|
+
<line x1="15" x2="9" y1="9" y2="15" class="diagonal-1" />
|
|
39
|
+
<line x1="9" x2="15" y1="9" y2="15" class="diagonal-2" />
|
|
40
|
+
</svg>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<style>
|
|
44
|
+
div {
|
|
45
|
+
display: inline-block;
|
|
46
|
+
}
|
|
47
|
+
.badge-x-icon {
|
|
48
|
+
overflow: visible;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.diagonal-1,
|
|
52
|
+
.diagonal-2 {
|
|
53
|
+
stroke-dasharray: 10;
|
|
54
|
+
stroke-dashoffset: 0;
|
|
55
|
+
transition: stroke-dashoffset 0.15s ease-out;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.badge-x-icon.animate .diagonal-1 {
|
|
59
|
+
opacity: 0;
|
|
60
|
+
animation: lineAnimation 0.3s ease-out forwards;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.badge-x-icon.animate .diagonal-2 {
|
|
64
|
+
opacity: 0;
|
|
65
|
+
animation: lineAnimation 0.3s ease-out 0.25s forwards;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@keyframes lineAnimation {
|
|
69
|
+
0% {
|
|
70
|
+
opacity: 0;
|
|
71
|
+
stroke-dashoffset: 10;
|
|
72
|
+
}
|
|
73
|
+
15% {
|
|
74
|
+
opacity: 1;
|
|
75
|
+
stroke-dashoffset: 10;
|
|
76
|
+
}
|
|
77
|
+
100% {
|
|
78
|
+
opacity: 1;
|
|
79
|
+
stroke-dashoffset: 0;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
</style>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { IconProps } from './types.js';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
color = 'currentColor',
|
|
6
|
+
size = 24,
|
|
7
|
+
strokeWidth = 2,
|
|
8
|
+
animate = false,
|
|
9
|
+
class: className = ''
|
|
10
|
+
}: IconProps = $props();
|
|
11
|
+
|
|
12
|
+
function handleMouseEnter() {
|
|
13
|
+
if (animate) return;
|
|
14
|
+
animate = true;
|
|
15
|
+
setTimeout(() => {
|
|
16
|
+
animate = false;
|
|
17
|
+
}, 600);
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<div class={className} aria-label="calendar-x-2" role="img" onmouseenter={handleMouseEnter}>
|
|
22
|
+
<svg
|
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
+
width={size}
|
|
25
|
+
height={size}
|
|
26
|
+
viewBox="0 0 24 24"
|
|
27
|
+
fill="none"
|
|
28
|
+
stroke={color}
|
|
29
|
+
stroke-width={strokeWidth}
|
|
30
|
+
stroke-linecap="round"
|
|
31
|
+
stroke-linejoin="round"
|
|
32
|
+
class="calendar-x-2-icon"
|
|
33
|
+
class:animate
|
|
34
|
+
>
|
|
35
|
+
<path d="M8 2v4" />
|
|
36
|
+
<path d="M16 2v4" />
|
|
37
|
+
<path d="M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8" />
|
|
38
|
+
<path d="M3 10h18" />
|
|
39
|
+
<path d="M22 17l-5 5" class="diagonal-1" />
|
|
40
|
+
<path d="m17 17 5 5" class="diagonal-2" />
|
|
41
|
+
</svg>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<style>
|
|
45
|
+
div {
|
|
46
|
+
display: inline-block;
|
|
47
|
+
}
|
|
48
|
+
.calendar-x-2-icon {
|
|
49
|
+
overflow: visible;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.diagonal-1,
|
|
53
|
+
.diagonal-2 {
|
|
54
|
+
stroke-dasharray: 8;
|
|
55
|
+
stroke-dashoffset: 0;
|
|
56
|
+
transition: stroke-dashoffset 0.15s ease-out;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.calendar-x-2-icon.animate .diagonal-1 {
|
|
60
|
+
opacity: 0;
|
|
61
|
+
animation: lineAnimation 0.3s ease-out forwards;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.calendar-x-2-icon.animate .diagonal-2 {
|
|
65
|
+
opacity: 0;
|
|
66
|
+
animation: lineAnimation 0.3s ease-out 0.25s forwards;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@keyframes lineAnimation {
|
|
70
|
+
0% {
|
|
71
|
+
opacity: 0;
|
|
72
|
+
stroke-dashoffset: 8;
|
|
73
|
+
}
|
|
74
|
+
15% {
|
|
75
|
+
opacity: 1;
|
|
76
|
+
stroke-dashoffset: 8;
|
|
77
|
+
}
|
|
78
|
+
100% {
|
|
79
|
+
opacity: 1;
|
|
80
|
+
stroke-dashoffset: 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { IconProps } from './types.js';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
color = 'currentColor',
|
|
6
|
+
size = 24,
|
|
7
|
+
strokeWidth = 2,
|
|
8
|
+
animate = false,
|
|
9
|
+
class: className = ''
|
|
10
|
+
}: IconProps = $props();
|
|
11
|
+
|
|
12
|
+
function handleMouseEnter() {
|
|
13
|
+
if (animate) return;
|
|
14
|
+
animate = true;
|
|
15
|
+
setTimeout(() => {
|
|
16
|
+
animate = false;
|
|
17
|
+
}, 600);
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<div class={className} aria-label="calendar-x" role="img" onmouseenter={handleMouseEnter}>
|
|
22
|
+
<svg
|
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
+
width={size}
|
|
25
|
+
height={size}
|
|
26
|
+
viewBox="0 0 24 24"
|
|
27
|
+
fill="none"
|
|
28
|
+
stroke={color}
|
|
29
|
+
stroke-width={strokeWidth}
|
|
30
|
+
stroke-linecap="round"
|
|
31
|
+
stroke-linejoin="round"
|
|
32
|
+
class="calendar-x-icon"
|
|
33
|
+
class:animate
|
|
34
|
+
>
|
|
35
|
+
<path d="M8 2v4" />
|
|
36
|
+
<path d="M16 2v4" />
|
|
37
|
+
<rect width="18" height="18" x="3" y="4" rx="2" />
|
|
38
|
+
<path d="M3 10h18" />
|
|
39
|
+
<path d="m14 14-4 4" class="diagonal-1" />
|
|
40
|
+
<path d="m10 14 4 4" class="diagonal-2" />
|
|
41
|
+
</svg>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<style>
|
|
45
|
+
div {
|
|
46
|
+
display: inline-block;
|
|
47
|
+
}
|
|
48
|
+
.calendar-x-icon {
|
|
49
|
+
overflow: visible;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.diagonal-1,
|
|
53
|
+
.diagonal-2 {
|
|
54
|
+
stroke-dasharray: 8;
|
|
55
|
+
stroke-dashoffset: 0;
|
|
56
|
+
transition: stroke-dashoffset 0.15s ease-out;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.calendar-x-icon.animate .diagonal-1 {
|
|
60
|
+
opacity: 0;
|
|
61
|
+
animation: lineAnimation 0.3s ease-out forwards;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.calendar-x-icon.animate .diagonal-2 {
|
|
65
|
+
opacity: 0;
|
|
66
|
+
animation: lineAnimation 0.3s ease-out 0.25s forwards;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@keyframes lineAnimation {
|
|
70
|
+
0% {
|
|
71
|
+
opacity: 0;
|
|
72
|
+
stroke-dashoffset: 8;
|
|
73
|
+
}
|
|
74
|
+
15% {
|
|
75
|
+
opacity: 1;
|
|
76
|
+
stroke-dashoffset: 8;
|
|
77
|
+
}
|
|
78
|
+
100% {
|
|
79
|
+
opacity: 1;
|
|
80
|
+
stroke-dashoffset: 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { IconProps } from './types.js';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
color = 'currentColor',
|
|
6
|
+
size = 24,
|
|
7
|
+
strokeWidth = 2,
|
|
8
|
+
animate = false,
|
|
9
|
+
class: className = ''
|
|
10
|
+
}: IconProps = $props();
|
|
11
|
+
|
|
12
|
+
function handleMouseEnter() {
|
|
13
|
+
if (animate) return;
|
|
14
|
+
animate = true;
|
|
15
|
+
setTimeout(() => {
|
|
16
|
+
animate = false;
|
|
17
|
+
}, 600);
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<div class={className} aria-label="circle-x" role="img" onmouseenter={handleMouseEnter}>
|
|
22
|
+
<svg
|
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
+
width={size}
|
|
25
|
+
height={size}
|
|
26
|
+
viewBox="0 0 24 24"
|
|
27
|
+
fill="none"
|
|
28
|
+
stroke={color}
|
|
29
|
+
stroke-width={strokeWidth}
|
|
30
|
+
stroke-linecap="round"
|
|
31
|
+
stroke-linejoin="round"
|
|
32
|
+
class="circle-x-icon"
|
|
33
|
+
class:animate
|
|
34
|
+
>
|
|
35
|
+
<circle cx="12" cy="12" r="10" />
|
|
36
|
+
<path d="m15 9-6 6" class="diagonal-1" />
|
|
37
|
+
<path d="m9 9 6 6" class="diagonal-2" />
|
|
38
|
+
</svg>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<style>
|
|
42
|
+
div {
|
|
43
|
+
display: inline-block;
|
|
44
|
+
}
|
|
45
|
+
.circle-x-icon {
|
|
46
|
+
overflow: visible;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.diagonal-1,
|
|
50
|
+
.diagonal-2 {
|
|
51
|
+
stroke-dasharray: 8.5;
|
|
52
|
+
stroke-dashoffset: 0;
|
|
53
|
+
transition: stroke-dashoffset 0.15s ease-out;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.circle-x-icon.animate .diagonal-1 {
|
|
57
|
+
opacity: 0;
|
|
58
|
+
animation: lineAnimation 0.3s ease-out forwards;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.circle-x-icon.animate .diagonal-2 {
|
|
62
|
+
opacity: 0;
|
|
63
|
+
animation: lineAnimation 0.3s ease-out 0.25s forwards;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@keyframes lineAnimation {
|
|
67
|
+
0% {
|
|
68
|
+
opacity: 0;
|
|
69
|
+
stroke-dashoffset: 8.5;
|
|
70
|
+
}
|
|
71
|
+
15% {
|
|
72
|
+
opacity: 1;
|
|
73
|
+
stroke-dashoffset: 8.5;
|
|
74
|
+
}
|
|
75
|
+
100% {
|
|
76
|
+
opacity: 1;
|
|
77
|
+
stroke-dashoffset: 0;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
</style>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { IconProps } from './types.js';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
color = 'currentColor',
|
|
6
|
+
size = 24,
|
|
7
|
+
strokeWidth = 2,
|
|
8
|
+
animate = false,
|
|
9
|
+
class: className = ''
|
|
10
|
+
}: IconProps = $props();
|
|
11
|
+
|
|
12
|
+
function handleMouseEnter() {
|
|
13
|
+
if (animate) return;
|
|
14
|
+
animate = true;
|
|
15
|
+
setTimeout(() => {
|
|
16
|
+
animate = false;
|
|
17
|
+
}, 700);
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<div class={className} aria-label="file-text" role="img" onmouseenter={handleMouseEnter}>
|
|
22
|
+
<svg
|
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
+
width={size}
|
|
25
|
+
height={size}
|
|
26
|
+
viewBox="0 0 24 24"
|
|
27
|
+
fill="none"
|
|
28
|
+
stroke={color}
|
|
29
|
+
stroke-width={strokeWidth}
|
|
30
|
+
stroke-linecap="round"
|
|
31
|
+
stroke-linejoin="round"
|
|
32
|
+
class="file-text-icon"
|
|
33
|
+
class:animate
|
|
34
|
+
>
|
|
35
|
+
<path
|
|
36
|
+
d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"
|
|
37
|
+
/>
|
|
38
|
+
<path d="M14 2v5a1 1 0 0 0 1 1h5" />
|
|
39
|
+
<path d="M8 9h2" class="text-line text-line-1" />
|
|
40
|
+
<path d="M8 13h8" class="text-line text-line-2" />
|
|
41
|
+
<path d="M8 17h8" class="text-line text-line-3" />
|
|
42
|
+
</svg>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<style>
|
|
46
|
+
div {
|
|
47
|
+
display: inline-block;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.file-text-icon {
|
|
51
|
+
overflow: visible;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.text-line {
|
|
55
|
+
stroke-dasharray: 12;
|
|
56
|
+
stroke-dashoffset: 0;
|
|
57
|
+
transition:
|
|
58
|
+
stroke-dashoffset 0.3s ease,
|
|
59
|
+
opacity 0.3s ease;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.file-text-icon.animate .text-line {
|
|
63
|
+
animation: textLineAnimation 0.6s ease forwards;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.file-text-icon.animate .text-line-1 {
|
|
67
|
+
animation-delay: 0s;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.file-text-icon.animate .text-line-2 {
|
|
71
|
+
animation-delay: 0.1s;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.file-text-icon.animate .text-line-3 {
|
|
75
|
+
animation-delay: 0.2s;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@keyframes textLineAnimation {
|
|
79
|
+
0% {
|
|
80
|
+
stroke-dashoffset: 0;
|
|
81
|
+
opacity: 1;
|
|
82
|
+
}
|
|
83
|
+
50% {
|
|
84
|
+
stroke-dashoffset: 12;
|
|
85
|
+
opacity: 0;
|
|
86
|
+
}
|
|
87
|
+
100% {
|
|
88
|
+
stroke-dashoffset: 0;
|
|
89
|
+
opacity: 1;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
</style>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { IconProps } from './types.js';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
color = 'currentColor',
|
|
6
|
+
size = 24,
|
|
7
|
+
strokeWidth = 2,
|
|
8
|
+
animate = false,
|
|
9
|
+
class: className = ''
|
|
10
|
+
}: IconProps = $props();
|
|
11
|
+
|
|
12
|
+
function handleMouseEnter() {
|
|
13
|
+
if (animate) return;
|
|
14
|
+
animate = true;
|
|
15
|
+
setTimeout(() => {
|
|
16
|
+
animate = false;
|
|
17
|
+
}, 600);
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<div class={className} aria-label="file-x-corner" role="img" onmouseenter={handleMouseEnter}>
|
|
22
|
+
<svg
|
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
+
width={size}
|
|
25
|
+
height={size}
|
|
26
|
+
viewBox="0 0 24 24"
|
|
27
|
+
fill="none"
|
|
28
|
+
stroke={color}
|
|
29
|
+
stroke-width={strokeWidth}
|
|
30
|
+
stroke-linecap="round"
|
|
31
|
+
stroke-linejoin="round"
|
|
32
|
+
class="file-x-corner-icon"
|
|
33
|
+
class:animate
|
|
34
|
+
>
|
|
35
|
+
<path
|
|
36
|
+
d="M11 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5"
|
|
37
|
+
/>
|
|
38
|
+
<path d="M14 2v5a1 1 0 0 0 1 1h5" />
|
|
39
|
+
<path d="m20 17-5 5" class="diagonal-1" />
|
|
40
|
+
<path d="m15 17 5 5" class="diagonal-2" />
|
|
41
|
+
</svg>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<style>
|
|
45
|
+
div {
|
|
46
|
+
display: inline-block;
|
|
47
|
+
}
|
|
48
|
+
.file-x-corner-icon {
|
|
49
|
+
overflow: visible;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.diagonal-1,
|
|
53
|
+
.diagonal-2 {
|
|
54
|
+
stroke-dasharray: 8;
|
|
55
|
+
stroke-dashoffset: 0;
|
|
56
|
+
transition: stroke-dashoffset 0.15s ease-out;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.file-x-corner-icon.animate .diagonal-1 {
|
|
60
|
+
opacity: 0;
|
|
61
|
+
animation: lineAnimation 0.3s ease-out forwards;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.file-x-corner-icon.animate .diagonal-2 {
|
|
65
|
+
opacity: 0;
|
|
66
|
+
animation: lineAnimation 0.3s ease-out 0.25s forwards;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@keyframes lineAnimation {
|
|
70
|
+
0% {
|
|
71
|
+
opacity: 0;
|
|
72
|
+
stroke-dashoffset: 8;
|
|
73
|
+
}
|
|
74
|
+
15% {
|
|
75
|
+
opacity: 1;
|
|
76
|
+
stroke-dashoffset: 8;
|
|
77
|
+
}
|
|
78
|
+
100% {
|
|
79
|
+
opacity: 1;
|
|
80
|
+
stroke-dashoffset: 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { IconProps } from './types.js';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
color = 'currentColor',
|
|
6
|
+
size = 24,
|
|
7
|
+
strokeWidth = 2,
|
|
8
|
+
animate = false,
|
|
9
|
+
class: className = ''
|
|
10
|
+
}: IconProps = $props();
|
|
11
|
+
|
|
12
|
+
function handleMouseEnter() {
|
|
13
|
+
if (animate) return;
|
|
14
|
+
animate = true;
|
|
15
|
+
setTimeout(() => {
|
|
16
|
+
animate = false;
|
|
17
|
+
}, 600);
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<div class={className} aria-label="file-x" role="img" onmouseenter={handleMouseEnter}>
|
|
22
|
+
<svg
|
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
+
width={size}
|
|
25
|
+
height={size}
|
|
26
|
+
viewBox="0 0 24 24"
|
|
27
|
+
fill="none"
|
|
28
|
+
stroke={color}
|
|
29
|
+
stroke-width={strokeWidth}
|
|
30
|
+
stroke-linecap="round"
|
|
31
|
+
stroke-linejoin="round"
|
|
32
|
+
class="file-x-icon"
|
|
33
|
+
class:animate
|
|
34
|
+
>
|
|
35
|
+
<path
|
|
36
|
+
d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"
|
|
37
|
+
/>
|
|
38
|
+
<path d="M14 2v5a1 1 0 0 0 1 1h5" />
|
|
39
|
+
<path d="m14.5 12.5-5 5" class="diagonal-1" />
|
|
40
|
+
<path d="m9.5 12.5 5 5" class="diagonal-2" />
|
|
41
|
+
</svg>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<style>
|
|
45
|
+
div {
|
|
46
|
+
display: inline-block;
|
|
47
|
+
}
|
|
48
|
+
.file-x-icon {
|
|
49
|
+
overflow: visible;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.diagonal-1,
|
|
53
|
+
.diagonal-2 {
|
|
54
|
+
stroke-dasharray: 7.5;
|
|
55
|
+
stroke-dashoffset: 0;
|
|
56
|
+
transition: stroke-dashoffset 0.15s ease-out;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.file-x-icon.animate .diagonal-1 {
|
|
60
|
+
opacity: 0;
|
|
61
|
+
animation: lineAnimation 0.3s ease-out forwards;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.file-x-icon.animate .diagonal-2 {
|
|
65
|
+
opacity: 0;
|
|
66
|
+
animation: lineAnimation 0.3s ease-out 0.25s forwards;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@keyframes lineAnimation {
|
|
70
|
+
0% {
|
|
71
|
+
opacity: 0;
|
|
72
|
+
stroke-dashoffset: 7.5;
|
|
73
|
+
}
|
|
74
|
+
15% {
|
|
75
|
+
opacity: 1;
|
|
76
|
+
stroke-dashoffset: 7.5;
|
|
77
|
+
}
|
|
78
|
+
100% {
|
|
79
|
+
opacity: 1;
|
|
80
|
+
stroke-dashoffset: 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
</style>
|