@jis3r/icons 1.5.0 → 1.6.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.
@@ -399,6 +399,8 @@ import signalLow from './signal-low.svelte';
399
399
  import signalMedium from './signal-medium.svelte';
400
400
  import signalZero from './signal-zero.svelte';
401
401
  import signature from './signature.svelte';
402
+ import slidersHorizontal from './sliders-horizontal.svelte';
403
+ import slidersVertical from './sliders-vertical.svelte';
402
404
  import smartphoneNfc from './smartphone-nfc.svelte';
403
405
  import snowflake from './snowflake.svelte';
404
406
  import speech from './speech.svelte';
@@ -4858,6 +4860,18 @@ let ICONS_LIST = [
4858
4860
  ],
4859
4861
  categories: ['text']
4860
4862
  },
4863
+ {
4864
+ name: 'sliders-horizontal',
4865
+ icon: slidersHorizontal,
4866
+ tags: ['settings', 'filters', 'controls'],
4867
+ categories: ['account']
4868
+ },
4869
+ {
4870
+ name: 'sliders-vertical',
4871
+ icon: slidersVertical,
4872
+ tags: ['settings', 'controls'],
4873
+ categories: ['account']
4874
+ },
4861
4875
  {
4862
4876
  name: 'smartphone-nfc',
4863
4877
  icon: smartphoneNfc,
@@ -0,0 +1,185 @@
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 = 28,
15
+ strokeWidth = 2,
16
+ isHovered = false,
17
+ class: className = ''
18
+ } = $props();
19
+
20
+ // Group 1 coordinates
21
+ let line1a_x2 = $state(14);
22
+ let line1b_x1 = $state(10);
23
+ let line1c_x1 = $state(14);
24
+ let line1c_x2 = $state(14);
25
+
26
+ // Group 2 coordinates
27
+ let line2a_x2 = $state(12);
28
+ let line2b_x1 = $state(8);
29
+ let line2c_x1 = $state(8);
30
+ let line2c_x2 = $state(8);
31
+
32
+ // Group 3 coordinates
33
+ let line3a_x2 = $state(12);
34
+ let line3b_x1 = $state(16);
35
+ let line3c_x1 = $state(16);
36
+ let line3c_x2 = $state(16);
37
+
38
+ function animateValue(start, end, duration, callback) {
39
+ return new Promise((resolve) => {
40
+ const startTime = performance.now();
41
+ const animate = (currentTime) => {
42
+ const elapsed = currentTime - startTime;
43
+ const progress = Math.min(elapsed / duration, 1);
44
+
45
+ // Spring-like easing: cubic-bezier(0.34, 1.56, 0.64, 1)
46
+ const eased =
47
+ progress < 0.5
48
+ ? 4 * progress * progress * progress
49
+ : 1 - Math.pow(-2 * progress + 2, 3) / 2;
50
+
51
+ const current = start + (end - start) * eased;
52
+ callback(current);
53
+
54
+ if (progress < 1) {
55
+ requestAnimationFrame(animate);
56
+ } else {
57
+ resolve();
58
+ }
59
+ };
60
+ requestAnimationFrame(animate);
61
+ });
62
+ }
63
+
64
+ function handleMouseEnter() {
65
+ isHovered = true;
66
+
67
+ // Animate all values simultaneously
68
+ Promise.all([
69
+ animateValue(14, 10, 400, (val) => {
70
+ line1a_x2 = val;
71
+ }),
72
+ animateValue(10, 5, 400, (val) => {
73
+ line1b_x1 = val;
74
+ }),
75
+ animateValue(14, 9, 400, (val) => {
76
+ line1c_x1 = val;
77
+ line1c_x2 = val;
78
+ }),
79
+ animateValue(12, 18, 400, (val) => {
80
+ line2a_x2 = val;
81
+ }),
82
+ animateValue(8, 13, 400, (val) => {
83
+ line2b_x1 = val;
84
+ }),
85
+ animateValue(8, 14, 400, (val) => {
86
+ line2c_x1 = val;
87
+ line2c_x2 = val;
88
+ }),
89
+ animateValue(12, 4, 400, (val) => {
90
+ line3a_x2 = val;
91
+ }),
92
+ animateValue(16, 8, 400, (val) => {
93
+ line3b_x1 = val;
94
+ }),
95
+ animateValue(16, 8, 400, (val) => {
96
+ line3c_x1 = val;
97
+ line3c_x2 = val;
98
+ })
99
+ ]);
100
+ }
101
+
102
+ function handleMouseLeave() {
103
+ isHovered = false;
104
+
105
+ // Reset all values to normal
106
+ Promise.all([
107
+ animateValue(line1a_x2, 14, 400, (val) => {
108
+ line1a_x2 = val;
109
+ }),
110
+ animateValue(line1b_x1, 10, 400, (val) => {
111
+ line1b_x1 = val;
112
+ }),
113
+ animateValue(line1c_x1, 14, 400, (val) => {
114
+ line1c_x1 = val;
115
+ line1c_x2 = val;
116
+ }),
117
+ animateValue(line2a_x2, 12, 400, (val) => {
118
+ line2a_x2 = val;
119
+ }),
120
+ animateValue(line2b_x1, 8, 400, (val) => {
121
+ line2b_x1 = val;
122
+ }),
123
+ animateValue(line2c_x1, 8, 400, (val) => {
124
+ line2c_x1 = val;
125
+ line2c_x2 = val;
126
+ }),
127
+ animateValue(line3a_x2, 12, 400, (val) => {
128
+ line3a_x2 = val;
129
+ }),
130
+ animateValue(line3b_x1, 16, 400, (val) => {
131
+ line3b_x1 = val;
132
+ }),
133
+ animateValue(line3c_x1, 16, 400, (val) => {
134
+ line3c_x1 = val;
135
+ line3c_x2 = val;
136
+ })
137
+ ]);
138
+ }
139
+ </script>
140
+
141
+ <div
142
+ class={className}
143
+ aria-label="sliders-horizontal"
144
+ role="img"
145
+ onmouseenter={handleMouseEnter}
146
+ onmouseleave={handleMouseLeave}
147
+ >
148
+ <svg
149
+ xmlns="http://www.w3.org/2000/svg"
150
+ width={size}
151
+ height={size}
152
+ viewBox="0 0 24 24"
153
+ fill="none"
154
+ stroke={color}
155
+ stroke-width={strokeWidth}
156
+ stroke-linecap="round"
157
+ stroke-linejoin="round"
158
+ class="sliders-icon"
159
+ >
160
+ <!-- Group 1 -->
161
+ <line x1="21" x2={line1a_x2} y1="4" y2="4" />
162
+ <line x1={line1b_x1} x2="3" y1="4" y2="4" />
163
+ <line x1={line1c_x1} x2={line1c_x2} y1="2" y2="6" />
164
+
165
+ <!-- Group 2 -->
166
+ <line x1="21" x2={line2a_x2} y1="12" y2="12" />
167
+ <line x1={line2b_x1} x2="3" y1="12" y2="12" />
168
+ <line x1={line2c_x1} x2={line2c_x2} y1="10" y2="14" />
169
+
170
+ <!-- Group 3 -->
171
+ <line x1="3" x2={line3a_x2} y1="20" y2="20" />
172
+ <line x1={line3b_x1} x2="21" y1="20" y2="20" />
173
+ <line x1={line3c_x1} x2={line3c_x2} y1="18" y2="22" />
174
+ </svg>
175
+ </div>
176
+
177
+ <style>
178
+ div {
179
+ display: inline-block;
180
+ }
181
+
182
+ .sliders-icon {
183
+ overflow: visible;
184
+ }
185
+ </style>
@@ -0,0 +1,19 @@
1
+ export default SlidersHorizontal;
2
+ type SlidersHorizontal = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<Props>): void;
5
+ };
6
+ declare const SlidersHorizontal: 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
+ };
@@ -0,0 +1,185 @@
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 = 28,
15
+ strokeWidth = 2,
16
+ isHovered = false,
17
+ class: className = ''
18
+ } = $props();
19
+
20
+ // Group 1 coordinates
21
+ let line1a_y2 = $state(14);
22
+ let line1b_y1 = $state(10);
23
+ let line1c_y1 = $state(14);
24
+ let line1c_y2 = $state(14);
25
+
26
+ // Group 2 coordinates
27
+ let line2a_y2 = $state(12);
28
+ let line2b_y1 = $state(8);
29
+ let line2c_y1 = $state(8);
30
+ let line2c_y2 = $state(8);
31
+
32
+ // Group 3 coordinates
33
+ let line3a_y2 = $state(12);
34
+ let line3b_y1 = $state(16);
35
+ let line3c_y1 = $state(16);
36
+ let line3c_y2 = $state(16);
37
+
38
+ function animateValue(start, end, duration, callback) {
39
+ return new Promise((resolve) => {
40
+ const startTime = performance.now();
41
+ const animate = (currentTime) => {
42
+ const elapsed = currentTime - startTime;
43
+ const progress = Math.min(elapsed / duration, 1);
44
+
45
+ // Spring-like easing: cubic-bezier(0.34, 1.56, 0.64, 1)
46
+ const eased =
47
+ progress < 0.5
48
+ ? 4 * progress * progress * progress
49
+ : 1 - Math.pow(-2 * progress + 2, 3) / 2;
50
+
51
+ const current = start + (end - start) * eased;
52
+ callback(current);
53
+
54
+ if (progress < 1) {
55
+ requestAnimationFrame(animate);
56
+ } else {
57
+ resolve();
58
+ }
59
+ };
60
+ requestAnimationFrame(animate);
61
+ });
62
+ }
63
+
64
+ function handleMouseEnter() {
65
+ isHovered = true;
66
+
67
+ // Animate all values simultaneously
68
+ Promise.all([
69
+ animateValue(14, 10, 400, (val) => {
70
+ line1a_y2 = val;
71
+ }),
72
+ animateValue(10, 5, 400, (val) => {
73
+ line1b_y1 = val;
74
+ }),
75
+ animateValue(14, 9, 400, (val) => {
76
+ line1c_y1 = val;
77
+ line1c_y2 = val;
78
+ }),
79
+ animateValue(12, 18, 400, (val) => {
80
+ line2a_y2 = val;
81
+ }),
82
+ animateValue(8, 13, 400, (val) => {
83
+ line2b_y1 = val;
84
+ }),
85
+ animateValue(8, 14, 400, (val) => {
86
+ line2c_y1 = val;
87
+ line2c_y2 = val;
88
+ }),
89
+ animateValue(12, 4, 400, (val) => {
90
+ line3a_y2 = val;
91
+ }),
92
+ animateValue(16, 8, 400, (val) => {
93
+ line3b_y1 = val;
94
+ }),
95
+ animateValue(16, 8, 400, (val) => {
96
+ line3c_y1 = val;
97
+ line3c_y2 = val;
98
+ })
99
+ ]);
100
+ }
101
+
102
+ function handleMouseLeave() {
103
+ isHovered = false;
104
+
105
+ // Reset all values to normal
106
+ Promise.all([
107
+ animateValue(line1a_y2, 14, 400, (val) => {
108
+ line1a_y2 = val;
109
+ }),
110
+ animateValue(line1b_y1, 10, 400, (val) => {
111
+ line1b_y1 = val;
112
+ }),
113
+ animateValue(line1c_y1, 14, 400, (val) => {
114
+ line1c_y1 = val;
115
+ line1c_y2 = val;
116
+ }),
117
+ animateValue(line2a_y2, 12, 400, (val) => {
118
+ line2a_y2 = val;
119
+ }),
120
+ animateValue(line2b_y1, 8, 400, (val) => {
121
+ line2b_y1 = val;
122
+ }),
123
+ animateValue(line2c_y1, 8, 400, (val) => {
124
+ line2c_y1 = val;
125
+ line2c_y2 = val;
126
+ }),
127
+ animateValue(line3a_y2, 12, 400, (val) => {
128
+ line3a_y2 = val;
129
+ }),
130
+ animateValue(line3b_y1, 16, 400, (val) => {
131
+ line3b_y1 = val;
132
+ }),
133
+ animateValue(line3c_y1, 16, 400, (val) => {
134
+ line3c_y1 = val;
135
+ line3c_y2 = val;
136
+ })
137
+ ]);
138
+ }
139
+ </script>
140
+
141
+ <div
142
+ class={className}
143
+ aria-label="sliders-vertical"
144
+ role="img"
145
+ onmouseenter={handleMouseEnter}
146
+ onmouseleave={handleMouseLeave}
147
+ >
148
+ <svg
149
+ xmlns="http://www.w3.org/2000/svg"
150
+ width={size}
151
+ height={size}
152
+ viewBox="0 0 24 24"
153
+ fill="none"
154
+ stroke={color}
155
+ stroke-width={strokeWidth}
156
+ stroke-linecap="round"
157
+ stroke-linejoin="round"
158
+ class="sliders-icon"
159
+ >
160
+ <!-- Group 1 -->
161
+ <line x1="4" x2="4" y1="21" y2={line1a_y2} />
162
+ <line x1="4" x2="4" y1={line1b_y1} y2="3" />
163
+ <line x1="2" x2="6" y1={line1c_y1} y2={line1c_y2} />
164
+
165
+ <!-- Group 2 -->
166
+ <line x1="12" x2="12" y1="21" y2={line2a_y2} />
167
+ <line x1="12" x2="12" y1={line2b_y1} y2="3" />
168
+ <line x1="10" x2="14" y1={line2c_y1} y2={line2c_y2} />
169
+
170
+ <!-- Group 3 -->
171
+ <line x1="20" x2="20" y1="3" y2={line3a_y2} />
172
+ <line x1="20" x2="20" y1={line3b_y1} y2="21" />
173
+ <line x1="18" x2="22" y1={line3c_y1} y2={line3c_y2} />
174
+ </svg>
175
+ </div>
176
+
177
+ <style>
178
+ div {
179
+ display: inline-block;
180
+ }
181
+
182
+ .sliders-icon {
183
+ overflow: visible;
184
+ }
185
+ </style>
@@ -0,0 +1,19 @@
1
+ export default SlidersVertical;
2
+ type SlidersVertical = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<Props>): void;
5
+ };
6
+ declare const SlidersVertical: 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
@@ -399,6 +399,8 @@ export { default as SignalMedium } from "./icons/signal-medium.svelte";
399
399
  export { default as SignalZero } from "./icons/signal-zero.svelte";
400
400
  export { default as Signal } from "./icons/signal.svelte";
401
401
  export { default as Signature } from "./icons/signature.svelte";
402
+ export { default as SlidersHorizontal } from "./icons/sliders-horizontal.svelte";
403
+ export { default as SlidersVertical } from "./icons/sliders-vertical.svelte";
402
404
  export { default as SmartphoneNfc } from "./icons/smartphone-nfc.svelte";
403
405
  export { default as Snowflake } from "./icons/snowflake.svelte";
404
406
  export { default as Speech } from "./icons/speech.svelte";
package/dist/index.js CHANGED
@@ -399,6 +399,8 @@ export { default as SignalMedium } from './icons/signal-medium.svelte';
399
399
  export { default as SignalZero } from './icons/signal-zero.svelte';
400
400
  export { default as Signal } from './icons/signal.svelte';
401
401
  export { default as Signature } from './icons/signature.svelte';
402
+ export { default as SlidersHorizontal } from './icons/sliders-horizontal.svelte';
403
+ export { default as SlidersVertical } from './icons/sliders-vertical.svelte';
402
404
  export { default as SmartphoneNfc } from './icons/smartphone-nfc.svelte';
403
405
  export { default as Snowflake } from './icons/snowflake.svelte';
404
406
  export { default as Speech } from './icons/speech.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jis3r/icons",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "beautifully crafted, moving icons. for svelte.",
5
5
  "keywords": [
6
6
  "svelte",
@@ -86,4 +86,4 @@
86
86
  "overrides": {
87
87
  "cookie": "0.7.0"
88
88
  }
89
- }
89
+ }