@jis3r/icons 1.1.5 → 1.5.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.
Files changed (70) hide show
  1. package/dist/components/navbar.svelte +78 -0
  2. package/dist/components/navbar.svelte.d.ts +6 -0
  3. package/dist/components/ui/badge/badge.svelte.d.ts +2 -30
  4. package/dist/components/ui/button/button.svelte.d.ts +2 -62
  5. package/dist/components/ui/card/card-description.svelte +1 -1
  6. package/dist/components/ui/card/card-title.svelte +1 -1
  7. package/dist/components/ui/card/card.svelte +1 -1
  8. package/dist/components/ui/input/input.svelte +2 -2
  9. package/dist/components/ui/tooltip/tooltip-content.svelte +1 -1
  10. package/dist/icons/arrow-down-0-1.svelte.d.ts +3 -3
  11. package/dist/icons/arrow-down-1-0.svelte.d.ts +3 -3
  12. package/dist/icons/arrow-up-0-1.svelte.d.ts +3 -3
  13. package/dist/icons/arrow-up-1-0.svelte.d.ts +3 -3
  14. package/dist/icons/book-up-2.svelte.d.ts +3 -3
  15. package/dist/icons/bookmark-check.svelte +26 -2
  16. package/dist/icons/bookmark-minus.svelte +108 -0
  17. package/dist/icons/bookmark-minus.svelte.d.ts +19 -0
  18. package/dist/icons/bookmark-plus.svelte +114 -0
  19. package/dist/icons/bookmark-plus.svelte.d.ts +19 -0
  20. package/dist/icons/bookmark-x.svelte +114 -0
  21. package/dist/icons/{file-warning.svelte.d.ts → bookmark-x.svelte.d.ts} +3 -3
  22. package/dist/icons/bookmark.svelte +81 -0
  23. package/dist/icons/{align-center.svelte.d.ts → bookmark.svelte.d.ts} +3 -3
  24. package/dist/icons/bot.svelte +94 -0
  25. package/dist/icons/{file-check-2.svelte.d.ts → bot.svelte.d.ts} +3 -3
  26. package/dist/icons/calendar-check-2.svelte.d.ts +3 -3
  27. package/dist/icons/clock-1.svelte.d.ts +3 -3
  28. package/dist/icons/clock-10.svelte.d.ts +3 -3
  29. package/dist/icons/clock-11.svelte.d.ts +3 -3
  30. package/dist/icons/clock-12.svelte.d.ts +3 -3
  31. package/dist/icons/clock-2.svelte.d.ts +3 -3
  32. package/dist/icons/clock-3.svelte.d.ts +3 -3
  33. package/dist/icons/clock-4.svelte.d.ts +3 -3
  34. package/dist/icons/clock-5.svelte.d.ts +3 -3
  35. package/dist/icons/clock-6.svelte.d.ts +3 -3
  36. package/dist/icons/clock-7.svelte.d.ts +3 -3
  37. package/dist/icons/clock-8.svelte.d.ts +3 -3
  38. package/dist/icons/clock-9.svelte.d.ts +3 -3
  39. package/dist/icons/dice-1.svelte.d.ts +3 -3
  40. package/dist/icons/dice-2.svelte.d.ts +3 -3
  41. package/dist/icons/dice-3.svelte.d.ts +3 -3
  42. package/dist/icons/dice-4.svelte.d.ts +3 -3
  43. package/dist/icons/dice-5.svelte.d.ts +3 -3
  44. package/dist/icons/dice-6.svelte.d.ts +3 -3
  45. package/dist/icons/disc-3.svelte.d.ts +3 -3
  46. package/dist/icons/{file-check-2.svelte → file-check-corner.svelte} +9 -7
  47. package/dist/icons/file-check-corner.svelte.d.ts +19 -0
  48. package/dist/icons/{file-warning.svelte → file-exclamation-point.svelte} +6 -1
  49. package/dist/icons/file-exclamation-point.svelte.d.ts +19 -0
  50. package/dist/icons/grid-2x2-check.svelte.d.ts +3 -3
  51. package/dist/icons/index.d.ts +8 -2
  52. package/dist/icons/index.js +5621 -40
  53. package/dist/icons/link-2-off.svelte.d.ts +3 -3
  54. package/dist/icons/maximize-2.svelte.d.ts +3 -3
  55. package/dist/icons/minimize-2.svelte.d.ts +3 -3
  56. package/dist/icons/mouse-pointer-2.svelte.d.ts +3 -3
  57. package/dist/icons/move-diagonal-2.svelte.d.ts +3 -3
  58. package/dist/icons/navigation-2-off.svelte.d.ts +3 -3
  59. package/dist/icons/paperclip.svelte +81 -0
  60. package/dist/icons/paperclip.svelte.d.ts +19 -0
  61. package/dist/icons/{align-center.svelte → text-align-center.svelte} +1 -1
  62. package/dist/icons/text-align-center.svelte.d.ts +19 -0
  63. package/dist/icons/text-search.svelte +124 -0
  64. package/dist/icons/text-search.svelte.d.ts +19 -0
  65. package/dist/icons/trash-2.svelte.d.ts +3 -3
  66. package/dist/index.d.ts +10 -3
  67. package/dist/index.js +10 -3
  68. package/dist/utils/icons.js +4 -2
  69. package/package.json +20 -9
  70. package/dist/icons/metadata.json +0 -8120
@@ -0,0 +1,78 @@
1
+ <script>
2
+ import { Button } from './ui/button';
3
+ import { Sun, Moon } from '@lucide/svelte';
4
+ import { toggleMode } from 'mode-watcher';
5
+ import { onMount, onDestroy } from 'svelte';
6
+ import Github from './github.svelte';
7
+ import NumberFlow from '@number-flow/svelte';
8
+ import iflog from 'iflog';
9
+
10
+ let stars = $state(0);
11
+ let interval;
12
+
13
+ onMount(async () => {
14
+ try {
15
+ const res = await fetch('https://api.github.com/repos/jis3r/icons');
16
+ if (!res.ok) {
17
+ throw new Error(`GitHub API error: ${res.status}`);
18
+ }
19
+ const data = await res.json();
20
+
21
+ const targetStars = data.stargazers_count || 0;
22
+ if (targetStars === 0) return;
23
+
24
+ const maxIncrement = Math.max(5, Math.ceil(targetStars / 30));
25
+ const delay = 10;
26
+
27
+ interval = setInterval(() => {
28
+ if (stars < targetStars) {
29
+ const remaining = targetStars - stars;
30
+ const progress = remaining / targetStars;
31
+ const easeOutFactor = progress * progress;
32
+ const currentIncrement = Math.max(1, Math.ceil(maxIncrement * easeOutFactor));
33
+
34
+ stars = Math.min(stars + currentIncrement, targetStars);
35
+ } else {
36
+ clearInterval(interval);
37
+ }
38
+ }, delay);
39
+ } catch (err) {
40
+ iflog.error('Failed to fetch GitHub stars:', err);
41
+ stars = 312;
42
+ }
43
+ });
44
+
45
+ onDestroy(() => {
46
+ if (interval) {
47
+ clearInterval(interval);
48
+ }
49
+ });
50
+ </script>
51
+
52
+ <header
53
+ class="bg-background bg-opacity-40 fixed top-0 z-50 h-[72px] w-full border-b backdrop-blur-xl"
54
+ >
55
+ <nav class="container flex items-center justify-between py-4">
56
+ <a href="/" class="cursor-pointer text-base"> moving icons </a>
57
+ <div class="flex gap-1">
58
+ <Button
59
+ variant="outline"
60
+ class="flex w-[85px] justify-between gap-2"
61
+ href="https://github.com/jis3r/icons"
62
+ >
63
+ <Github size="20" />
64
+ <NumberFlow value={stars} />
65
+ </Button>
66
+
67
+ <Button onclick={toggleMode} variant="outline" size="icon">
68
+ <Sun
69
+ class="h-[1.2rem] w-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0"
70
+ />
71
+ <Moon
72
+ class="absolute h-[1.2rem] w-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90"
73
+ />
74
+ <span class="sr-only">Toggle theme</span>
75
+ </Button>
76
+ </div>
77
+ </nav>
78
+ </header>
@@ -0,0 +1,6 @@
1
+ export default Navbar;
2
+ type Navbar = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<Record<string, never>>): void;
5
+ };
6
+ declare const Navbar: import("svelte").Component<Record<string, never>, {}, "">;
@@ -5,21 +5,7 @@ export const badgeVariants: import("tailwind-variants").TVReturnType<{
5
5
  destructive: string;
6
6
  outline: string;
7
7
  };
8
- }, undefined, "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2", import("tailwind-variants/dist/config").TVConfig<{
9
- variant: {
10
- default: string;
11
- secondary: string;
12
- destructive: string;
13
- outline: string;
14
- };
15
- }, {
16
- variant: {
17
- default: string;
18
- secondary: string;
19
- destructive: string;
20
- outline: string;
21
- };
22
- }>, {
8
+ }, undefined, "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2", {
23
9
  variant: {
24
10
  default: string;
25
11
  secondary: string;
@@ -33,21 +19,7 @@ export const badgeVariants: import("tailwind-variants").TVReturnType<{
33
19
  destructive: string;
34
20
  outline: string;
35
21
  };
36
- }, undefined, "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2", import("tailwind-variants/dist/config").TVConfig<{
37
- variant: {
38
- default: string;
39
- secondary: string;
40
- destructive: string;
41
- outline: string;
42
- };
43
- }, {
44
- variant: {
45
- default: string;
46
- secondary: string;
47
- destructive: string;
48
- outline: string;
49
- };
50
- }>, unknown, unknown, undefined>>;
22
+ }, undefined, "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2", unknown, unknown, undefined>>;
51
23
  export default Badge;
52
24
  type Badge = {
53
25
  $on?(type: string, callback: (e: any) => void): () => void;
@@ -13,37 +13,7 @@ export const buttonVariants: import("tailwind-variants").TVReturnType<{
13
13
  lg: string;
14
14
  icon: string;
15
15
  };
16
- }, undefined, "ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", import("tailwind-variants/dist/config").TVConfig<{
17
- variant: {
18
- default: string;
19
- destructive: string;
20
- outline: string;
21
- secondary: string;
22
- ghost: string;
23
- link: string;
24
- };
25
- size: {
26
- default: string;
27
- sm: string;
28
- lg: string;
29
- icon: string;
30
- };
31
- }, {
32
- variant: {
33
- default: string;
34
- destructive: string;
35
- outline: string;
36
- secondary: string;
37
- ghost: string;
38
- link: string;
39
- };
40
- size: {
41
- default: string;
42
- sm: string;
43
- lg: string;
44
- icon: string;
45
- };
46
- }>, {
16
+ }, undefined, "ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
47
17
  variant: {
48
18
  default: string;
49
19
  destructive: string;
@@ -73,37 +43,7 @@ export const buttonVariants: import("tailwind-variants").TVReturnType<{
73
43
  lg: string;
74
44
  icon: string;
75
45
  };
76
- }, undefined, "ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", import("tailwind-variants/dist/config").TVConfig<{
77
- variant: {
78
- default: string;
79
- destructive: string;
80
- outline: string;
81
- secondary: string;
82
- ghost: string;
83
- link: string;
84
- };
85
- size: {
86
- default: string;
87
- sm: string;
88
- lg: string;
89
- icon: string;
90
- };
91
- }, {
92
- variant: {
93
- default: string;
94
- destructive: string;
95
- outline: string;
96
- secondary: string;
97
- ghost: string;
98
- link: string;
99
- };
100
- size: {
101
- default: string;
102
- sm: string;
103
- lg: string;
104
- icon: string;
105
- };
106
- }>, unknown, unknown, undefined>>;
46
+ }, undefined, "ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", unknown, unknown, undefined>>;
107
47
  export default Button;
108
48
  type Button = {
109
49
  $on?(type: string, callback: (e: any) => void): () => void;
@@ -4,6 +4,6 @@
4
4
  let { ref = $bindable(null), class: className, children, ...restProps } = $props();
5
5
  </script>
6
6
 
7
- <p bind:this={ref} class={cn('text-sm text-muted-foreground', className)} {...restProps}>
7
+ <p bind:this={ref} class={cn('text-muted-foreground text-sm', className)} {...restProps}>
8
8
  {@render children?.()}
9
9
  </p>
@@ -8,7 +8,7 @@
8
8
  role="heading"
9
9
  aria-level={level}
10
10
  bind:this={ref}
11
- class={cn('text-2xl font-semibold leading-none tracking-tight', className)}
11
+ class={cn('text-2xl leading-none font-semibold tracking-tight', className)}
12
12
  {...restProps}
13
13
  >
14
14
  {@render children?.()}
@@ -6,7 +6,7 @@
6
6
 
7
7
  <div
8
8
  bind:this={ref}
9
- class={cn('rounded-lg border bg-card text-card-foreground shadow-sm', className)}
9
+ class={cn('bg-card text-card-foreground rounded-lg border shadow-sm', className)}
10
10
  {...restProps}
11
11
  >
12
12
  {@render children?.()}
@@ -15,7 +15,7 @@
15
15
  <input
16
16
  bind:this={ref}
17
17
  class={cn(
18
- 'flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
18
+ 'border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-base file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
19
19
  className
20
20
  )}
21
21
  type="file"
@@ -27,7 +27,7 @@
27
27
  <input
28
28
  bind:this={ref}
29
29
  class={cn(
30
- 'flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
30
+ 'border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-base file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
31
31
  className
32
32
  )}
33
33
  {type}
@@ -9,7 +9,7 @@
9
9
  bind:ref
10
10
  {sideOffset}
11
11
  class={cn(
12
- 'z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
12
+ 'bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md',
13
13
  className
14
14
  )}
15
15
  {...restProps}
@@ -1,9 +1,9 @@
1
- export default ArrowDown_0_1;
2
- type ArrowDown_0_1 = {
1
+ export default ArrowDown01;
2
+ type ArrowDown01 = {
3
3
  $on?(type: string, callback: (e: any) => void): () => void;
4
4
  $set?(props: Partial<Props>): void;
5
5
  };
6
- declare const ArrowDown_0_1: import("svelte").Component<{
6
+ declare const ArrowDown01: import("svelte").Component<{
7
7
  color?: string;
8
8
  size?: number;
9
9
  strokeWidth?: number;
@@ -1,9 +1,9 @@
1
- export default ArrowDown_1_0;
2
- type ArrowDown_1_0 = {
1
+ export default ArrowDown10;
2
+ type ArrowDown10 = {
3
3
  $on?(type: string, callback: (e: any) => void): () => void;
4
4
  $set?(props: Partial<Props>): void;
5
5
  };
6
- declare const ArrowDown_1_0: import("svelte").Component<{
6
+ declare const ArrowDown10: import("svelte").Component<{
7
7
  color?: string;
8
8
  size?: number;
9
9
  strokeWidth?: number;
@@ -1,9 +1,9 @@
1
- export default ArrowUp_0_1;
2
- type ArrowUp_0_1 = {
1
+ export default ArrowUp01;
2
+ type ArrowUp01 = {
3
3
  $on?(type: string, callback: (e: any) => void): () => void;
4
4
  $set?(props: Partial<Props>): void;
5
5
  };
6
- declare const ArrowUp_0_1: import("svelte").Component<{
6
+ declare const ArrowUp01: import("svelte").Component<{
7
7
  color?: string;
8
8
  size?: number;
9
9
  strokeWidth?: number;
@@ -1,9 +1,9 @@
1
- export default ArrowUp_1_0;
2
- type ArrowUp_1_0 = {
1
+ export default ArrowUp10;
2
+ type ArrowUp10 = {
3
3
  $on?(type: string, callback: (e: any) => void): () => void;
4
4
  $set?(props: Partial<Props>): void;
5
5
  };
6
- declare const ArrowUp_1_0: import("svelte").Component<{
6
+ declare const ArrowUp10: import("svelte").Component<{
7
7
  color?: string;
8
8
  size?: number;
9
9
  strokeWidth?: number;
@@ -1,9 +1,9 @@
1
- export default BookUp_2;
2
- type BookUp_2 = {
1
+ export default BookUp2;
2
+ type BookUp2 = {
3
3
  $on?(type: string, callback: (e: any) => void): () => void;
4
4
  $set?(props: Partial<Props>): void;
5
5
  };
6
- declare const BookUp_2: import("svelte").Component<{
6
+ declare const BookUp2: import("svelte").Component<{
7
7
  color?: string;
8
8
  size?: number;
9
9
  strokeWidth?: number;
@@ -21,7 +21,7 @@
21
21
  isHovered = true;
22
22
  setTimeout(() => {
23
23
  isHovered = false;
24
- }, 500);
24
+ }, 600);
25
25
  }
26
26
  </script>
27
27
 
@@ -39,7 +39,7 @@
39
39
  class="bookmark-check-icon"
40
40
  class:animate={isHovered}
41
41
  >
42
- <path d="m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2Z" />
42
+ <path d="m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2Z" class="bookmark-path" />
43
43
  <path d="m9 10 2 2 4-4" class="check-path" />
44
44
  </svg>
45
45
  </div>
@@ -51,6 +51,13 @@
51
51
  .bookmark-check-icon {
52
52
  overflow: visible;
53
53
  }
54
+ .bookmark-path {
55
+ transform-origin: center;
56
+ transition: transform 0.3s ease-out;
57
+ }
58
+ .bookmark-check-icon.animate .bookmark-path {
59
+ animation: bookmarkBounce 0.6s ease-out;
60
+ }
54
61
  .check-path {
55
62
  stroke-dasharray: 9;
56
63
  stroke-dashoffset: 0;
@@ -61,6 +68,23 @@
61
68
  .bookmark-check-icon.animate .check-path {
62
69
  animation: checkAnimation 0.5s ease-out backwards;
63
70
  }
71
+ @keyframes bookmarkBounce {
72
+ 0% {
73
+ transform: scale(1, 1);
74
+ }
75
+ 25% {
76
+ transform: scale(0.9, 1.3);
77
+ }
78
+ 50% {
79
+ transform: scale(1.1, 0.9);
80
+ }
81
+ 75% {
82
+ transform: scale(0.95, 1.05);
83
+ }
84
+ 100% {
85
+ transform: scale(1, 1);
86
+ }
87
+ }
64
88
  @keyframes checkAnimation {
65
89
  0% {
66
90
  stroke-dashoffset: 9;
@@ -0,0 +1,108 @@
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
+ isHovered = true;
22
+
23
+ setTimeout(() => {
24
+ isHovered = false;
25
+ }, 600);
26
+ }
27
+ </script>
28
+
29
+ <div class={className} aria-label="bookmark-minus" role="img" onmouseenter={handleMouseEnter}>
30
+ <svg
31
+ xmlns="http://www.w3.org/2000/svg"
32
+ width={size}
33
+ height={size}
34
+ viewBox="0 0 24 24"
35
+ fill="none"
36
+ stroke={color}
37
+ stroke-width={strokeWidth}
38
+ stroke-linecap="round"
39
+ stroke-linejoin="round"
40
+ class="bookmark-minus-icon"
41
+ class:animate={isHovered}
42
+ >
43
+ <path d="m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z" class="bookmark-path" />
44
+ <path d="M9 10h6" class="horizontal" />
45
+ </svg>
46
+ </div>
47
+
48
+ <style>
49
+ div {
50
+ display: inline-block;
51
+ }
52
+ .bookmark-minus-icon {
53
+ overflow: visible;
54
+ }
55
+
56
+ .bookmark-path {
57
+ transform-origin: center;
58
+ transition: transform 0.3s ease-out;
59
+ }
60
+
61
+ .horizontal {
62
+ stroke-dasharray: 6;
63
+ stroke-dashoffset: 0;
64
+ transition: stroke-dashoffset 0.15s ease-out;
65
+ }
66
+
67
+ .bookmark-minus-icon.animate .bookmark-path {
68
+ animation: bookmarkBounce 0.6s ease-out;
69
+ }
70
+
71
+ .bookmark-minus-icon.animate .horizontal {
72
+ opacity: 0;
73
+ animation: lineAnimation 0.3s ease-out forwards;
74
+ }
75
+
76
+ @keyframes bookmarkBounce {
77
+ 0% {
78
+ transform: scale(1, 1);
79
+ }
80
+ 25% {
81
+ transform: scale(0.9, 1.3);
82
+ }
83
+ 50% {
84
+ transform: scale(1.1, 0.9);
85
+ }
86
+ 75% {
87
+ transform: scale(0.95, 1.05);
88
+ }
89
+ 100% {
90
+ transform: scale(1, 1);
91
+ }
92
+ }
93
+
94
+ @keyframes lineAnimation {
95
+ 0% {
96
+ opacity: 0;
97
+ stroke-dashoffset: 6;
98
+ }
99
+ 15% {
100
+ opacity: 1;
101
+ stroke-dashoffset: 6;
102
+ }
103
+ 100% {
104
+ opacity: 1;
105
+ stroke-dashoffset: 0;
106
+ }
107
+ }
108
+ </style>
@@ -0,0 +1,19 @@
1
+ export default BookmarkMinus;
2
+ type BookmarkMinus = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<Props>): void;
5
+ };
6
+ declare const BookmarkMinus: 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,114 @@
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
+ isHovered = true;
22
+ setTimeout(() => {
23
+ isHovered = false;
24
+ }, 500);
25
+ }
26
+ </script>
27
+
28
+ <div class={className} aria-label="bookmark-plus" role="img" onmouseenter={handleMouseEnter}>
29
+ <svg
30
+ xmlns="http://www.w3.org/2000/svg"
31
+ width={size}
32
+ height={size}
33
+ viewBox="0 0 24 24"
34
+ fill="none"
35
+ stroke={color}
36
+ stroke-width={strokeWidth}
37
+ stroke-linecap="round"
38
+ stroke-linejoin="round"
39
+ class="bookmark-plus-icon"
40
+ class:animate={isHovered}
41
+ >
42
+ <path d="m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z" class="bookmark-path" />
43
+ <path d="M9 10h6" class="horizontal" />
44
+ <path d="M12 7v6" class="vertical" />
45
+ </svg>
46
+ </div>
47
+
48
+ <style>
49
+ div {
50
+ display: inline-block;
51
+ }
52
+ .bookmark-plus-icon {
53
+ overflow: visible;
54
+ }
55
+
56
+ .bookmark-path {
57
+ transform-origin: center;
58
+ transition: transform 0.3s ease-out;
59
+ }
60
+
61
+ .horizontal,
62
+ .vertical {
63
+ stroke-dasharray: 8;
64
+ stroke-dashoffset: 0;
65
+ transition: stroke-dashoffset 0.15s ease-out;
66
+ }
67
+
68
+ .bookmark-plus-icon.animate .bookmark-path {
69
+ animation: bookmarkBounce 0.6s ease-out;
70
+ }
71
+
72
+ .bookmark-plus-icon.animate .horizontal {
73
+ opacity: 0;
74
+ animation: lineAnimation 0.3s ease-out forwards;
75
+ }
76
+
77
+ .bookmark-plus-icon.animate .vertical {
78
+ opacity: 0;
79
+ animation: lineAnimation 0.3s ease-out 0.25s forwards;
80
+ }
81
+
82
+ @keyframes bookmarkBounce {
83
+ 0% {
84
+ transform: scale(1, 1);
85
+ }
86
+ 25% {
87
+ transform: scale(0.9, 1.3);
88
+ }
89
+ 50% {
90
+ transform: scale(1.1, 0.9);
91
+ }
92
+ 75% {
93
+ transform: scale(0.95, 1.05);
94
+ }
95
+ 100% {
96
+ transform: scale(1, 1);
97
+ }
98
+ }
99
+
100
+ @keyframes lineAnimation {
101
+ 0% {
102
+ opacity: 0;
103
+ stroke-dashoffset: 8;
104
+ }
105
+ 15% {
106
+ opacity: 1;
107
+ stroke-dashoffset: 8;
108
+ }
109
+ 100% {
110
+ opacity: 1;
111
+ stroke-dashoffset: 0;
112
+ }
113
+ }
114
+ </style>
@@ -0,0 +1,19 @@
1
+ export default BookmarkPlus;
2
+ type BookmarkPlus = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<Props>): void;
5
+ };
6
+ declare const BookmarkPlus: 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
+ };