@jis3r/icons 1.1.5 → 1.2.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,124 @@
1
+ <script>
2
+ /**
3
+ * @typedef {Object} Props
4
+ * @property {string} [color]
5
+ * @property {number} [size]
6
+ * @property {number} [strokeWidth]
7
+ * @property {boolean} [isHovered]
8
+ * @property {string} [class]
9
+ */
10
+
11
+ /** @type {Props} */
12
+ let {
13
+ color = 'currentColor',
14
+ size = 24,
15
+ strokeWidth = 2,
16
+ isHovered = false,
17
+ class: className = ''
18
+ } = $props();
19
+
20
+ function handleMouseEnter() {
21
+ if (!isHovered) {
22
+ isHovered = true;
23
+ setTimeout(() => {
24
+ isHovered = false;
25
+ }, 1000);
26
+ }
27
+ }
28
+ </script>
29
+
30
+ <div class={className} aria-label="text-search" role="img" onmouseenter={handleMouseEnter}>
31
+ <svg
32
+ xmlns="http://www.w3.org/2000/svg"
33
+ width={size}
34
+ height={size}
35
+ viewBox="0 0 24 24"
36
+ fill="none"
37
+ stroke={color}
38
+ stroke-width={strokeWidth}
39
+ stroke-linecap="round"
40
+ stroke-linejoin="round"
41
+ class="text-search-icon"
42
+ class:animate={isHovered}
43
+ >
44
+ <path d="M21 5H3" class="line top" />
45
+ <g class="text-group">
46
+ <path d="M10 12H3" class="line middle" />
47
+ <path d="M10 19H3" class="line bottom" />
48
+ </g>
49
+
50
+ <g class="magnifier">
51
+ <circle cx="17" cy="15" r="3" />
52
+ <path d="m21 19-1.9-1.9" />
53
+ </g>
54
+ </svg>
55
+ </div>
56
+
57
+ <style>
58
+ div {
59
+ display: inline-block;
60
+ }
61
+ .text-search-icon {
62
+ overflow: visible;
63
+ }
64
+
65
+ .line {
66
+ transition: opacity 0.1s ease-out;
67
+ }
68
+ .top,
69
+ .middle,
70
+ .bottom {
71
+ transform-origin: left center;
72
+ }
73
+
74
+ .magnifier {
75
+ transform-origin: 17px 15px;
76
+ }
77
+ .text-search-icon.animate .magnifier {
78
+ animation: search-bounce 1s ease-in-out;
79
+ }
80
+
81
+ .text-search-icon.animate .top {
82
+ animation: line-shrink-top 1s ease-in-out;
83
+ }
84
+ .text-search-icon.animate .middle {
85
+ animation: line-shrink-mid 1s ease-in-out;
86
+ }
87
+ .text-search-icon.animate .bottom {
88
+ animation: line-shrink-bot 1s ease-in-out 0.05s;
89
+ }
90
+
91
+ @keyframes search-bounce {
92
+ 0%,
93
+ 100% {
94
+ transform: translateX(0) translateY(0);
95
+ }
96
+ 25% {
97
+ transform: translateX(0) translateY(-4px);
98
+ }
99
+ 50% {
100
+ transform: translateX(-3px) translateY(0);
101
+ }
102
+ }
103
+
104
+ @keyframes line-shrink-mid {
105
+ 0%,
106
+ 25%,
107
+ 100% {
108
+ transform: scaleX(1);
109
+ }
110
+ 50% {
111
+ transform: scaleX(0.7);
112
+ }
113
+ }
114
+ @keyframes line-shrink-bot {
115
+ 0%,
116
+ 30%,
117
+ 100% {
118
+ transform: scaleX(1);
119
+ }
120
+ 50% {
121
+ transform: scaleX(0.8);
122
+ }
123
+ }
124
+ </style>
@@ -0,0 +1,19 @@
1
+ export default TextSearch;
2
+ type TextSearch = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<Props>): void;
5
+ };
6
+ declare const TextSearch: import("svelte").Component<{
7
+ color?: string;
8
+ size?: number;
9
+ strokeWidth?: number;
10
+ isHovered?: boolean;
11
+ class?: string;
12
+ }, {}, "">;
13
+ type Props = {
14
+ color?: string;
15
+ size?: number;
16
+ strokeWidth?: number;
17
+ isHovered?: boolean;
18
+ class?: string;
19
+ };
package/dist/index.d.ts CHANGED
@@ -434,6 +434,7 @@ export { default as Telescope } from "./icons/telescope.svelte";
434
434
  export { default as Terminal } from "./icons/terminal.svelte";
435
435
  export { default as TextCursorInput } from "./icons/text-cursor-input.svelte";
436
436
  export { default as TextCursor } from "./icons/text-cursor.svelte";
437
+ export { default as TextSearch } from "./icons/text-search.svelte";
437
438
  export { default as Thermometer } from "./icons/thermometer.svelte";
438
439
  export { default as ThumbsDown } from "./icons/thumbs-down.svelte";
439
440
  export { default as ThumbsUp } from "./icons/thumbs-up.svelte";
package/dist/index.js CHANGED
@@ -434,6 +434,7 @@ export { default as Telescope } from './icons/telescope.svelte';
434
434
  export { default as Terminal } from './icons/terminal.svelte';
435
435
  export { default as TextCursorInput } from './icons/text-cursor-input.svelte';
436
436
  export { default as TextCursor } from './icons/text-cursor.svelte';
437
+ export { default as TextSearch } from './icons/text-search.svelte';
437
438
  export { default as Thermometer } from './icons/thermometer.svelte';
438
439
  export { default as ThumbsDown } from './icons/thumbs-down.svelte';
439
440
  export { default as ThumbsUp } from './icons/thumbs-up.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jis3r/icons",
3
- "version": "1.1.5",
3
+ "version": "1.2.0",
4
4
  "description": "beautifully crafted, moving icons. for svelte.",
5
5
  "author": "jis3r",
6
6
  "license": "MIT",
@@ -75,4 +75,4 @@
75
75
  "overrides": {
76
76
  "cookie": "0.7.0"
77
77
  }
78
- }
78
+ }