@nice2dev/icons 1.3.15 → 1.3.17

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 (153) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/NiceDesktopIconExporter.js +688 -599
  4. package/dist/cjs/NiceFaviconGenerator.js +603 -417
  5. package/dist/cjs/NiceIconPicker.js +788 -508
  6. package/dist/cjs/NiceIconPreview.js +246 -188
  7. package/dist/cjs/NiceIconSetCreator.js +683 -552
  8. package/dist/cjs/NiceIconStacker.js +547 -171
  9. package/dist/cjs/NiceIconValue.js +27 -35
  10. package/dist/cjs/NtdIconBadge.js +384 -360
  11. package/dist/cjs/NtdIconMorph.js +419 -354
  12. package/dist/cjs/NtdStateMorph.js +150 -147
  13. package/dist/cjs/advancedIconSearch.js +373 -510
  14. package/dist/cjs/animationControls.js +518 -642
  15. package/dist/cjs/animationSpeed.js +69 -0
  16. package/dist/cjs/client.js +12 -15
  17. package/dist/cjs/createIcon.js +374 -252
  18. package/dist/cjs/design-tokens.js +324 -390
  19. package/dist/cjs/figmaExport.js +162 -257
  20. package/dist/cjs/figmaSync.js +234 -316
  21. package/dist/cjs/headless-ui.js +240 -368
  22. package/dist/cjs/iconAnalytics.js +337 -393
  23. package/dist/cjs/iconHtml.js +64 -86
  24. package/dist/cjs/iconMetadata.js +392 -472
  25. package/dist/cjs/iconParts.js +120 -90
  26. package/dist/cjs/iconStack.js +136 -155
  27. package/dist/cjs/iconStyles.js +1670 -509
  28. package/dist/cjs/iconValue.js +359 -430
  29. package/dist/cjs/icons/accessibility.js +1119 -134
  30. package/dist/cjs/icons/actions.js +1290 -330
  31. package/dist/cjs/icons/ai.js +1424 -144
  32. package/dist/cjs/icons/brand.js +613 -184
  33. package/dist/cjs/icons/business.js +938 -192
  34. package/dist/cjs/icons/devtech.js +1656 -227
  35. package/dist/cjs/icons/ecommerce.js +802 -111
  36. package/dist/cjs/icons/education.js +1345 -199
  37. package/dist/cjs/icons/files.js +1597 -328
  38. package/dist/cjs/icons/fintech.js +793 -104
  39. package/dist/cjs/icons/food.js +1028 -156
  40. package/dist/cjs/icons/fun.js +804 -109
  41. package/dist/cjs/icons/gaming.js +916 -170
  42. package/dist/cjs/icons/health.js +623 -112
  43. package/dist/cjs/icons/index.js +32 -42
  44. package/dist/cjs/icons/input.js +282 -83
  45. package/dist/cjs/icons/legal.js +1065 -122
  46. package/dist/cjs/icons/media.js +1061 -267
  47. package/dist/cjs/icons/navigation.js +407 -123
  48. package/dist/cjs/icons/omniverk.js +523 -93
  49. package/dist/cjs/icons/realestate.js +1520 -193
  50. package/dist/cjs/icons/saas.js +867 -98
  51. package/dist/cjs/icons/science.js +1344 -202
  52. package/dist/cjs/icons/shapes.js +1316 -308
  53. package/dist/cjs/icons/smarthome.js +786 -90
  54. package/dist/cjs/icons/social.js +591 -59
  55. package/dist/cjs/icons/sports.js +1133 -133
  56. package/dist/cjs/icons/sustainability.js +1211 -139
  57. package/dist/cjs/icons/travel.js +1470 -148
  58. package/dist/cjs/icons/ui.js +1508 -315
  59. package/dist/cjs/icons/weather.js +1160 -173
  60. package/dist/cjs/index.js +559 -568
  61. package/dist/cjs/lottieIntegration.js +261 -266
  62. package/dist/cjs/nicetodev-icons.css +1 -1
  63. package/dist/cjs/particleEffects.js +270 -251
  64. package/dist/cjs/resolver.js +229 -284
  65. package/dist/cjs/rsc.js +175 -193
  66. package/dist/cjs/sharpen.js +73 -130
  67. package/dist/cjs/smilAnimations.js +380 -165
  68. package/dist/cjs/stacking.js +87 -122
  69. package/dist/cjs/tailwind-plugin.js +280 -320
  70. package/dist/cjs/types.js +46 -72
  71. package/dist/cjs/utilities.js +163 -324
  72. package/dist/cjs/variantProps.js +12 -52
  73. package/dist/esm/NiceDesktopIconExporter.js +671 -598
  74. package/dist/esm/NiceFaviconGenerator.js +583 -416
  75. package/dist/esm/NiceIconPicker.js +789 -507
  76. package/dist/esm/NiceIconPreview.js +247 -187
  77. package/dist/esm/NiceIconSetCreator.js +685 -551
  78. package/dist/esm/NiceIconStacker.js +549 -170
  79. package/dist/esm/NiceIconValue.js +29 -34
  80. package/dist/esm/NtdIconBadge.js +388 -359
  81. package/dist/esm/NtdIconMorph.js +423 -353
  82. package/dist/esm/NtdStateMorph.js +152 -146
  83. package/dist/esm/advancedIconSearch.js +391 -509
  84. package/dist/esm/animationControls.js +527 -641
  85. package/dist/esm/animationSpeed.js +69 -0
  86. package/dist/esm/client.js +48 -10
  87. package/dist/esm/createIcon.js +375 -251
  88. package/dist/esm/design-tokens.js +334 -387
  89. package/dist/esm/figmaExport.js +170 -256
  90. package/dist/esm/figmaSync.js +237 -315
  91. package/dist/esm/headless-ui.js +254 -365
  92. package/dist/esm/iconAnalytics.js +342 -392
  93. package/dist/esm/iconHtml.js +67 -85
  94. package/dist/esm/iconMetadata.js +404 -471
  95. package/dist/esm/iconParts.js +125 -89
  96. package/dist/esm/iconStack.js +145 -154
  97. package/dist/esm/iconStyles.js +1681 -508
  98. package/dist/esm/iconValue.js +361 -429
  99. package/dist/esm/icons/accessibility.js +1133 -133
  100. package/dist/esm/icons/actions.js +1320 -329
  101. package/dist/esm/icons/ai.js +1441 -143
  102. package/dist/esm/icons/brand.js +616 -179
  103. package/dist/esm/icons/business.js +957 -191
  104. package/dist/esm/icons/devtech.js +1687 -226
  105. package/dist/esm/icons/ecommerce.js +816 -110
  106. package/dist/esm/icons/education.js +1364 -198
  107. package/dist/esm/icons/files.js +1628 -327
  108. package/dist/esm/icons/fintech.js +807 -103
  109. package/dist/esm/icons/food.js +1043 -153
  110. package/dist/esm/icons/fun.js +819 -108
  111. package/dist/esm/icons/gaming.js +933 -169
  112. package/dist/esm/icons/health.js +636 -111
  113. package/dist/esm/icons/index.js +589 -32
  114. package/dist/esm/icons/input.js +326 -82
  115. package/dist/esm/icons/legal.js +1079 -121
  116. package/dist/esm/icons/media.js +1086 -266
  117. package/dist/esm/icons/navigation.js +421 -122
  118. package/dist/esm/icons/omniverk.js +534 -91
  119. package/dist/esm/icons/realestate.js +1544 -198
  120. package/dist/esm/icons/saas.js +880 -97
  121. package/dist/esm/icons/science.js +1370 -208
  122. package/dist/esm/icons/shapes.js +1343 -307
  123. package/dist/esm/icons/smarthome.js +799 -89
  124. package/dist/esm/icons/social.js +599 -58
  125. package/dist/esm/icons/sports.js +1148 -132
  126. package/dist/esm/icons/sustainability.js +1226 -138
  127. package/dist/esm/icons/travel.js +1486 -147
  128. package/dist/esm/icons/ui.js +1540 -314
  129. package/dist/esm/icons/weather.js +1181 -172
  130. package/dist/esm/index.js +749 -58
  131. package/dist/esm/lottieIntegration.js +264 -265
  132. package/dist/esm/nicetodev-icons.css +1 -1
  133. package/dist/esm/particleEffects.js +271 -250
  134. package/dist/esm/resolver.js +231 -283
  135. package/dist/esm/rsc.js +182 -192
  136. package/dist/esm/sharpen.js +78 -129
  137. package/dist/esm/smilAnimations.js +385 -164
  138. package/dist/esm/stacking.js +99 -121
  139. package/dist/esm/tailwind-plugin.js +282 -319
  140. package/dist/esm/types.js +50 -71
  141. package/dist/esm/utilities.js +177 -321
  142. package/dist/esm/variantProps.js +23 -52
  143. package/dist/types/animationSpeed.d.ts +19 -0
  144. package/dist/types/createIcon.d.ts +6 -0
  145. package/dist/types/iconStyles.d.ts +6 -1
  146. package/dist/types/icons/brand.d.ts +0 -4
  147. package/dist/types/icons/food.d.ts +0 -3
  148. package/dist/types/icons/index.d.ts +3 -3
  149. package/dist/types/icons/omniverk.d.ts +0 -3
  150. package/dist/types/icons/science.d.ts +1 -1
  151. package/dist/types/smilAnimations.d.ts +4 -2
  152. package/dist/types/types.d.ts +7 -0
  153. package/package.json +15 -22
@@ -1,402 +1,472 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { useNiceTranslation } from '@nice2dev/ui-core';
3
- import { forwardRef, useState, useRef, useEffect, useCallback } from 'react';
4
- import { NtdCheck, NtdMinus, NtdPlus } from './icons/actions.js';
5
- import { NtdPause, NtdPlay } from './icons/media.js';
6
- import { NtdClose, NtdChevronDown, NtdChevronUp, NtdMenu } from './icons/navigation.js';
7
- import { NtdMoon, NtdSun } from './icons/ui.js';
8
- import { SIZE_MAP } from './types.js';
9
-
10
- /* ────────────────────────────────────────────────────────────────────────────
11
- EASING FUNCTIONS
12
- ───────────────────────────────────────────────────────────────────────────── */
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useNiceTranslation } from "@nice2dev/ui-core";
3
+ import { forwardRef, useState, useRef, useEffect, useCallback } from "react";
4
+ import { NtdCheck, NtdMinus, NtdPlus } from "./icons/actions.js";
5
+ import { NtdPause, NtdPlay } from "./icons/media.js";
6
+ import { NtdClose, NtdChevronDown, NtdChevronUp, NtdMenu } from "./icons/navigation.js";
7
+ import { NtdMoon, NtdSun } from "./icons/ui.js";
8
+ import { SIZE_MAP } from "./types.js";
13
9
  const EASING_MAP = {
14
- linear: 'linear',
15
- ease: 'ease',
16
- 'ease-in': 'ease-in',
17
- 'ease-out': 'ease-out',
18
- 'ease-in-out': 'ease-in-out',
19
- spring: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)',
20
- bounce: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)',
10
+ linear: "linear",
11
+ ease: "ease",
12
+ "ease-in": "ease-in",
13
+ "ease-out": "ease-out",
14
+ "ease-in-out": "ease-in-out",
15
+ spring: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
16
+ bounce: "cubic-bezier(0.68, -0.55, 0.265, 1.55)"
21
17
  };
22
18
  const MORPH_PATHS = {
23
- 'menu-close': {
24
- from: 'M3 6h18M3 12h18M3 18h18', // hamburger
25
- to: 'M6 6l12 12M6 18L18 6', // X
26
- viewBox: '0 0 24 24',
27
- },
28
- 'play-pause': {
29
- from: 'M5 3l14 9-14 9V3z', // play triangle
30
- to: 'M6 4h4v16H6zM14 4h4v16h-4z', // pause bars
31
- viewBox: '0 0 24 24',
32
- },
33
- 'plus-minus': {
34
- from: 'M12 5v14M5 12h14', // plus
35
- to: 'M5 12h14', // minus
36
- viewBox: '0 0 24 24',
37
- },
38
- 'check-cross': {
39
- from: 'M5 12l5 5L20 7', // check
40
- to: 'M6 6l12 12M6 18L18 6', // cross
41
- viewBox: '0 0 24 24',
42
- },
43
- 'chevron-up-down': {
44
- from: 'M6 15l6-6 6 6', // chevron up
45
- to: 'M6 9l6 6 6-6', // chevron down
46
- viewBox: '0 0 24 24',
47
- },
48
- 'expand-collapse': {
49
- from: 'M4 14h6v6M20 10h-6V4M14 10l7-7M3 21l7-7', // expand
50
- to: 'M4 4h6v6M20 20h-6v-6M10 10L3 3M14 14l7 7', // collapse
51
- viewBox: '0 0 24 24',
52
- },
53
- 'sun-moon': {
54
- from: 'M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41M12 6a6 6 0 100 12 6 6 0 000-12z', // sun
55
- to: 'M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z', // moon
56
- viewBox: '0 0 24 24',
57
- },
58
- 'volume-mute': {
59
- from: 'M11 5L6 9H2v6h4l5 4V5zM19.07 4.93a10 10 0 010 14.14M15.54 8.46a5 5 0 010 7.07', // volume high
60
- to: 'M11 5L6 9H2v6h4l5 4V5zM23 9l-6 6M17 9l6 6', // muted
61
- viewBox: '0 0 24 24',
62
- },
63
- 'lock-unlock': {
64
- from: 'M19 11H5a2 2 0 00-2 2v7a2 2 0 002 2h14a2 2 0 002-2v-7a2 2 0 00-2-2zM7 11V7a5 5 0 0110 0v4', // locked
65
- to: 'M19 11H5a2 2 0 00-2 2v7a2 2 0 002 2h14a2 2 0 002-2v-7a2 2 0 00-2-2zM7 11V7a5 5 0 019.9-1', // unlocked
66
- viewBox: '0 0 24 24',
67
- },
68
- 'eye-hidden': {
69
- from: 'M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8zM12 9a3 3 0 100 6 3 3 0 000-6z', // eye open
70
- to: 'M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24M1 1l22 22', // eye hidden
71
- viewBox: '0 0 24 24',
72
- },
73
- 'heart-broken': {
74
- from: 'M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z', // heart full
75
- to: 'M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78L12 21.23l8.84-8.84a5.5 5.5 0 000-7.78zM12 5.67l-2 6 4-2-2 6', // heart broken
76
- viewBox: '0 0 24 24',
77
- },
78
- 'star-empty': {
79
- from: 'M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z', // star filled
80
- to: 'M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z', // same path, different fill
81
- viewBox: '0 0 24 24',
82
- },
19
+ "menu-close": {
20
+ from: "M3 6h18M3 12h18M3 18h18",
21
+ // hamburger
22
+ to: "M6 6l12 12M6 18L18 6",
23
+ // X
24
+ viewBox: "0 0 24 24"
25
+ },
26
+ "play-pause": {
27
+ from: "M5 3l14 9-14 9V3z",
28
+ // play triangle
29
+ to: "M6 4h4v16H6zM14 4h4v16h-4z",
30
+ // pause bars
31
+ viewBox: "0 0 24 24"
32
+ },
33
+ "plus-minus": {
34
+ from: "M12 5v14M5 12h14",
35
+ // plus
36
+ to: "M5 12h14",
37
+ // minus
38
+ viewBox: "0 0 24 24"
39
+ },
40
+ "check-cross": {
41
+ from: "M5 12l5 5L20 7",
42
+ // check
43
+ to: "M6 6l12 12M6 18L18 6",
44
+ // cross
45
+ viewBox: "0 0 24 24"
46
+ },
47
+ "chevron-up-down": {
48
+ from: "M6 15l6-6 6 6",
49
+ // chevron up
50
+ to: "M6 9l6 6 6-6",
51
+ // chevron down
52
+ viewBox: "0 0 24 24"
53
+ },
54
+ "expand-collapse": {
55
+ from: "M4 14h6v6M20 10h-6V4M14 10l7-7M3 21l7-7",
56
+ // expand
57
+ to: "M4 4h6v6M20 20h-6v-6M10 10L3 3M14 14l7 7",
58
+ // collapse
59
+ viewBox: "0 0 24 24"
60
+ },
61
+ "sun-moon": {
62
+ from: "M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41M12 6a6 6 0 100 12 6 6 0 000-12z",
63
+ // sun
64
+ to: "M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z",
65
+ // moon
66
+ viewBox: "0 0 24 24"
67
+ },
68
+ "volume-mute": {
69
+ from: "M11 5L6 9H2v6h4l5 4V5zM19.07 4.93a10 10 0 010 14.14M15.54 8.46a5 5 0 010 7.07",
70
+ // volume high
71
+ to: "M11 5L6 9H2v6h4l5 4V5zM23 9l-6 6M17 9l6 6",
72
+ // muted
73
+ viewBox: "0 0 24 24"
74
+ },
75
+ "lock-unlock": {
76
+ from: "M19 11H5a2 2 0 00-2 2v7a2 2 0 002 2h14a2 2 0 002-2v-7a2 2 0 00-2-2zM7 11V7a5 5 0 0110 0v4",
77
+ // locked
78
+ to: "M19 11H5a2 2 0 00-2 2v7a2 2 0 002 2h14a2 2 0 002-2v-7a2 2 0 00-2-2zM7 11V7a5 5 0 019.9-1",
79
+ // unlocked
80
+ viewBox: "0 0 24 24"
81
+ },
82
+ "eye-hidden": {
83
+ from: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8zM12 9a3 3 0 100 6 3 3 0 000-6z",
84
+ // eye open
85
+ to: "M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24M1 1l22 22",
86
+ // eye hidden
87
+ viewBox: "0 0 24 24"
88
+ },
89
+ "heart-broken": {
90
+ from: "M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z",
91
+ // heart full
92
+ to: "M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78L12 21.23l8.84-8.84a5.5 5.5 0 000-7.78zM12 5.67l-2 6 4-2-2 6",
93
+ // heart broken
94
+ viewBox: "0 0 24 24"
95
+ },
96
+ "star-empty": {
97
+ from: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z",
98
+ // star filled
99
+ to: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z",
100
+ // same path, different fill
101
+ viewBox: "0 0 24 24"
102
+ }
83
103
  };
84
- /* ────────────────────────────────────────────────────────────────────────────
85
- STYLES
86
- ───────────────────────────────────────────────────────────────────────────── */
87
- const morphStyles = `
88
- .ntd-morph-container {
89
- display: inline-flex;
90
- align-items: center;
91
- justify-content: center;
92
- position: relative;
93
- }
94
-
95
- .ntd-morph-icon {
96
- position: absolute;
97
- top: 0;
98
- left: 0;
99
- transition-property: opacity, transform;
100
- }
101
-
102
- .ntd-morph-icon--active {
103
- opacity: 1;
104
- transform: scale(1) rotate(0deg);
105
- }
106
-
107
- .ntd-morph-icon--inactive {
108
- opacity: 0;
109
- transform: scale(0.8) rotate(-15deg);
110
- }
111
-
112
- .ntd-morph-path {
113
- transition-property: d, fill, stroke;
114
- }
115
-
116
- @keyframes ntd-morph-spin {
117
- from { transform: rotate(0deg); }
118
- to { transform: rotate(180deg); }
119
- }
120
-
121
- .ntd-morph-spinning .ntd-morph-icon {
122
- animation: ntd-morph-spin 0.3s ease-in-out;
123
- }
104
+ const morphStyles = `
105
+ .ntd-morph-container {
106
+ display: inline-flex;
107
+ align-items: center;
108
+ justify-content: center;
109
+ position: relative;
110
+ }
111
+
112
+ .ntd-morph-icon {
113
+ position: absolute;
114
+ top: 0;
115
+ left: 0;
116
+ transition-property: opacity, transform;
117
+ }
118
+
119
+ .ntd-morph-icon--active {
120
+ opacity: 1;
121
+ transform: scale(1) rotate(0deg);
122
+ }
123
+
124
+ .ntd-morph-icon--inactive {
125
+ opacity: 0;
126
+ transform: scale(0.8) rotate(-15deg);
127
+ }
128
+
129
+ .ntd-morph-path {
130
+ transition-property: d, fill, stroke;
131
+ }
132
+
133
+ @keyframes ntd-morph-spin {
134
+ from { transform: rotate(0deg); }
135
+ to { transform: rotate(180deg); }
136
+ }
137
+
138
+ .ntd-morph-spinning .ntd-morph-icon {
139
+ animation: ntd-morph-spin 0.3s ease-in-out;
140
+ }
124
141
  `;
125
- /* ────────────────────────────────────────────────────────────────────────────
126
- MAIN COMPONENT
127
- ───────────────────────────────────────────────────────────────────────────── */
128
- /**
129
- * Icon morphing component for smooth transitions between two icons.
130
- *
131
- * @example
132
- * ```tsx
133
- * // Controlled state
134
- * <NtdIconMorph
135
- * from={NtdMenu}
136
- * to={NtdClose}
137
- * morphed={isOpen}
138
- * duration={300}
139
- * />
140
- *
141
- * // Self-managed with trigger
142
- * <NtdIconMorph
143
- * from={NtdPlay}
144
- * to={NtdPause}
145
- * trigger="click"
146
- * />
147
- * ```
148
- */
149
142
  const NtdIconMorph = /* @__PURE__ */ Object.assign(
150
- /* @__PURE__ */ forwardRef(({ from: FromIcon, to: ToIcon, morphed: controlledMorphed, trigger = 'none', duration = 300, easing = 'ease-in-out', size = 'md', variant = 'solid', primaryColor = 'currentColor', secondaryColor, onMorphStart, onMorphEnd, className, style, 'aria-label': ariaLabel, }, ref) => {
151
- var _a, _b;
152
- // Internal state for self-managed triggers
153
- const [internalMorphed, setInternalMorphed] = useState(false);
154
- const morphed = controlledMorphed !== null && controlledMorphed !== void 0 ? controlledMorphed : internalMorphed;
155
- const [isAnimating, setIsAnimating] = useState(false);
156
- const timeoutRef = useRef(undefined);
157
- const stylesInjectedRef = useRef(false);
158
- // Resolve size
159
- const resolvedSize = typeof size === 'number' ? size : ((_a = SIZE_MAP[size]) !== null && _a !== void 0 ? _a : 24);
160
- // Resolve easing
161
- const resolvedEasing = (_b = EASING_MAP[easing]) !== null && _b !== void 0 ? _b : easing;
162
- // Inject styles once
163
- useEffect(() => {
143
+ /* @__PURE__ */ forwardRef(
144
+ ({
145
+ from: FromIcon,
146
+ to: ToIcon,
147
+ morphed: controlledMorphed,
148
+ trigger = "none",
149
+ duration = 300,
150
+ easing = "ease-in-out",
151
+ size = "md",
152
+ variant = "solid",
153
+ primaryColor = "currentColor",
154
+ secondaryColor,
155
+ onMorphStart,
156
+ onMorphEnd,
157
+ className,
158
+ style,
159
+ "aria-label": ariaLabel
160
+ }, ref) => {
161
+ const [internalMorphed, setInternalMorphed] = useState(false);
162
+ const morphed = controlledMorphed ?? internalMorphed;
163
+ const [isAnimating, setIsAnimating] = useState(false);
164
+ const timeoutRef = useRef(void 0);
165
+ const stylesInjectedRef = useRef(false);
166
+ const resolvedSize = typeof size === "number" ? size : SIZE_MAP[size] ?? 24;
167
+ const resolvedEasing = EASING_MAP[easing] ?? easing;
168
+ useEffect(() => {
164
169
  if (stylesInjectedRef.current) {
165
- return;
170
+ return;
166
171
  }
167
- if (typeof document === 'undefined') {
168
- return;
172
+ if (typeof document === "undefined") {
173
+ return;
169
174
  }
170
- const styleId = 'ntd-morph-styles';
175
+ const styleId = "ntd-morph-styles";
171
176
  if (!document.getElementById(styleId)) {
172
- const styleEl = document.createElement('style');
173
- styleEl.id = styleId;
174
- styleEl.textContent = morphStyles;
175
- document.head.appendChild(styleEl);
177
+ const styleEl = document.createElement("style");
178
+ styleEl.id = styleId;
179
+ styleEl.textContent = morphStyles;
180
+ document.head.appendChild(styleEl);
176
181
  }
177
182
  stylesInjectedRef.current = true;
178
- }, []);
179
- // Handle animation timing
180
- useEffect(() => {
183
+ }, []);
184
+ useEffect(() => {
181
185
  return () => {
182
- if (timeoutRef.current) {
183
- clearTimeout(timeoutRef.current);
184
- }
186
+ if (timeoutRef.current) {
187
+ clearTimeout(timeoutRef.current);
188
+ }
185
189
  };
186
- }, []);
187
- const startMorph = useCallback((toMorphed) => {
188
- if (isAnimating) {
190
+ }, []);
191
+ const startMorph = useCallback(
192
+ (toMorphed) => {
193
+ if (isAnimating) {
189
194
  return;
190
- }
191
- setIsAnimating(true);
192
- onMorphStart === null || onMorphStart === void 0 ? void 0 : onMorphStart(toMorphed);
193
- if (controlledMorphed === undefined) {
195
+ }
196
+ setIsAnimating(true);
197
+ onMorphStart?.(toMorphed);
198
+ if (controlledMorphed === void 0) {
194
199
  setInternalMorphed(toMorphed);
195
- }
196
- timeoutRef.current = setTimeout(() => {
200
+ }
201
+ timeoutRef.current = setTimeout(() => {
197
202
  setIsAnimating(false);
198
- onMorphEnd === null || onMorphEnd === void 0 ? void 0 : onMorphEnd(toMorphed);
199
- }, duration);
200
- }, [isAnimating, duration, onMorphStart, onMorphEnd, controlledMorphed]);
201
- // Event handlers for triggers
202
- const handleClick = useCallback(() => {
203
- if (trigger === 'click') {
204
- startMorph(!morphed);
203
+ onMorphEnd?.(toMorphed);
204
+ }, duration);
205
+ },
206
+ [isAnimating, duration, onMorphStart, onMorphEnd, controlledMorphed]
207
+ );
208
+ const handleClick = useCallback(() => {
209
+ if (trigger === "click") {
210
+ startMorph(!morphed);
205
211
  }
206
- }, [trigger, morphed, startMorph]);
207
- const handleMouseEnter = useCallback(() => {
208
- if (trigger === 'hover') {
209
- startMorph(true);
212
+ }, [trigger, morphed, startMorph]);
213
+ const handleMouseEnter = useCallback(() => {
214
+ if (trigger === "hover") {
215
+ startMorph(true);
210
216
  }
211
- }, [trigger, startMorph]);
212
- const handleMouseLeave = useCallback(() => {
213
- if (trigger === 'hover') {
214
- startMorph(false);
217
+ }, [trigger, startMorph]);
218
+ const handleMouseLeave = useCallback(() => {
219
+ if (trigger === "hover") {
220
+ startMorph(false);
215
221
  }
216
- }, [trigger, startMorph]);
217
- const handleFocus = useCallback(() => {
218
- if (trigger === 'focus') {
219
- startMorph(true);
222
+ }, [trigger, startMorph]);
223
+ const handleFocus = useCallback(() => {
224
+ if (trigger === "focus") {
225
+ startMorph(true);
220
226
  }
221
- }, [trigger, startMorph]);
222
- const handleBlur = useCallback(() => {
223
- if (trigger === 'focus') {
224
- startMorph(false);
227
+ }, [trigger, startMorph]);
228
+ const handleBlur = useCallback(() => {
229
+ if (trigger === "focus") {
230
+ startMorph(false);
225
231
  }
226
- }, [trigger, startMorph]);
227
- const transitionStyle = {
232
+ }, [trigger, startMorph]);
233
+ const transitionStyle = {
228
234
  transitionDuration: `${duration}ms`,
229
- transitionTimingFunction: resolvedEasing,
230
- };
231
- const iconProps = {
235
+ transitionTimingFunction: resolvedEasing
236
+ };
237
+ const iconProps = {
232
238
  size: resolvedSize,
233
239
  variant,
234
240
  primaryColor,
235
- secondaryColor,
236
- };
237
- return (jsxs("div", { ref: ref, className: `ntd-morph-container ${className !== null && className !== void 0 ? className : ''}`, style: {
241
+ secondaryColor
242
+ };
243
+ return /* @__PURE__ */ jsxs(
244
+ "div",
245
+ {
246
+ ref,
247
+ className: `ntd-morph-container ${className ?? ""}`,
248
+ style: {
238
249
  width: resolvedSize,
239
250
  height: resolvedSize,
240
- cursor: trigger !== 'none' ? 'pointer' : undefined,
241
- ...style,
242
- }, onClick: handleClick, onKeyDown: (e) => {
243
- if (trigger === 'click' && (e.key === 'Enter' || e.key === ' ')) {
244
- e.preventDefault();
245
- handleClick();
251
+ cursor: trigger !== "none" ? "pointer" : void 0,
252
+ ...style
253
+ },
254
+ onClick: handleClick,
255
+ onKeyDown: (e) => {
256
+ if (trigger === "click" && (e.key === "Enter" || e.key === " ")) {
257
+ e.preventDefault();
258
+ handleClick();
246
259
  }
247
- }, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onFocus: handleFocus, onBlur: handleBlur, tabIndex: trigger === 'focus' || trigger === 'click' ? 0 : undefined, role: trigger !== 'none' ? 'button' : undefined, "aria-label": ariaLabel, "aria-pressed": trigger !== 'none' ? morphed : undefined, children: [jsx("div", { className: `ntd-morph-icon ${morphed ? 'ntd-morph-icon--inactive' : 'ntd-morph-icon--active'}`, style: transitionStyle, "aria-hidden": morphed, children: jsx(FromIcon, { ...iconProps }) }), jsx("div", { className: `ntd-morph-icon ${morphed ? 'ntd-morph-icon--active' : 'ntd-morph-icon--inactive'}`, style: transitionStyle, "aria-hidden": !morphed, children: jsx(ToIcon, { ...iconProps }) })] }));
248
- }), { displayName: 'NtdIconMorph' });
249
- /**
250
- * Path-based morphing using CSS transitions on SVG path data.
251
- * Requires browser support for CSS `d` property transitions (modern browsers).
252
- *
253
- * @example
254
- * ```tsx
255
- * <NtdPathMorph
256
- * pair="menu-close"
257
- * morphed={isOpen}
258
- * duration={250}
259
- * color="#333"
260
- * />
261
- * ```
262
- */
260
+ },
261
+ onMouseEnter: handleMouseEnter,
262
+ onMouseLeave: handleMouseLeave,
263
+ onFocus: handleFocus,
264
+ onBlur: handleBlur,
265
+ tabIndex: trigger === "focus" || trigger === "click" ? 0 : void 0,
266
+ role: trigger !== "none" ? "button" : void 0,
267
+ "aria-label": ariaLabel,
268
+ "aria-pressed": trigger !== "none" ? morphed : void 0,
269
+ children: [
270
+ /* @__PURE__ */ jsx(
271
+ "div",
272
+ {
273
+ className: `ntd-morph-icon ${morphed ? "ntd-morph-icon--inactive" : "ntd-morph-icon--active"}`,
274
+ style: transitionStyle,
275
+ "aria-hidden": morphed,
276
+ children: /* @__PURE__ */ jsx(FromIcon, { ...iconProps })
277
+ }
278
+ ),
279
+ /* @__PURE__ */ jsx(
280
+ "div",
281
+ {
282
+ className: `ntd-morph-icon ${morphed ? "ntd-morph-icon--active" : "ntd-morph-icon--inactive"}`,
283
+ style: transitionStyle,
284
+ "aria-hidden": !morphed,
285
+ children: /* @__PURE__ */ jsx(ToIcon, { ...iconProps })
286
+ }
287
+ )
288
+ ]
289
+ }
290
+ );
291
+ }
292
+ ),
293
+ { displayName: "NtdIconMorph" }
294
+ );
263
295
  const NtdPathMorph = /* @__PURE__ */ Object.assign(
264
- /* @__PURE__ */ forwardRef(({ pair, morphed: controlledMorphed, trigger = 'none', duration = 300, easing = 'ease-in-out', size = 'md', color = 'currentColor', strokeWidth = 2, filled = false, onMorphStart, onMorphEnd, className, style, 'aria-label': ariaLabel, }, ref) => {
265
- var _a, _b;
266
- const { t } = useNiceTranslation();
267
- const [internalMorphed, setInternalMorphed] = useState(false);
268
- const morphed = controlledMorphed !== null && controlledMorphed !== void 0 ? controlledMorphed : internalMorphed;
269
- const [isAnimating, setIsAnimating] = useState(false);
270
- const timeoutRef = useRef(undefined);
271
- const pathData = MORPH_PATHS[pair];
272
- const resolvedSize = typeof size === 'number' ? size : ((_a = SIZE_MAP[size]) !== null && _a !== void 0 ? _a : 24);
273
- const resolvedEasing = (_b = EASING_MAP[easing]) !== null && _b !== void 0 ? _b : easing;
274
- useEffect(() => {
296
+ /* @__PURE__ */ forwardRef(
297
+ ({
298
+ pair,
299
+ morphed: controlledMorphed,
300
+ trigger = "none",
301
+ duration = 300,
302
+ easing = "ease-in-out",
303
+ size = "md",
304
+ color = "currentColor",
305
+ strokeWidth = 2,
306
+ filled = false,
307
+ onMorphStart,
308
+ onMorphEnd,
309
+ className,
310
+ style,
311
+ "aria-label": ariaLabel
312
+ }, ref) => {
313
+ const { t } = useNiceTranslation();
314
+ const [internalMorphed, setInternalMorphed] = useState(false);
315
+ const morphed = controlledMorphed ?? internalMorphed;
316
+ const [isAnimating, setIsAnimating] = useState(false);
317
+ const timeoutRef = useRef(void 0);
318
+ const pathData = MORPH_PATHS[pair];
319
+ const resolvedSize = typeof size === "number" ? size : SIZE_MAP[size] ?? 24;
320
+ const resolvedEasing = EASING_MAP[easing] ?? easing;
321
+ useEffect(() => {
275
322
  return () => {
276
- if (timeoutRef.current) {
277
- clearTimeout(timeoutRef.current);
278
- }
323
+ if (timeoutRef.current) {
324
+ clearTimeout(timeoutRef.current);
325
+ }
279
326
  };
280
- }, []);
281
- const startMorph = useCallback((toMorphed) => {
282
- if (isAnimating) {
327
+ }, []);
328
+ const startMorph = useCallback(
329
+ (toMorphed) => {
330
+ if (isAnimating) {
283
331
  return;
284
- }
285
- setIsAnimating(true);
286
- onMorphStart === null || onMorphStart === void 0 ? void 0 : onMorphStart(toMorphed);
287
- if (controlledMorphed === undefined) {
332
+ }
333
+ setIsAnimating(true);
334
+ onMorphStart?.(toMorphed);
335
+ if (controlledMorphed === void 0) {
288
336
  setInternalMorphed(toMorphed);
289
- }
290
- timeoutRef.current = setTimeout(() => {
337
+ }
338
+ timeoutRef.current = setTimeout(() => {
291
339
  setIsAnimating(false);
292
- onMorphEnd === null || onMorphEnd === void 0 ? void 0 : onMorphEnd(toMorphed);
293
- }, duration);
294
- }, [isAnimating, duration, onMorphStart, onMorphEnd, controlledMorphed]);
295
- const handleClick = useCallback(() => {
296
- if (trigger === 'click') {
297
- startMorph(!morphed);
340
+ onMorphEnd?.(toMorphed);
341
+ }, duration);
342
+ },
343
+ [isAnimating, duration, onMorphStart, onMorphEnd, controlledMorphed]
344
+ );
345
+ const handleClick = useCallback(() => {
346
+ if (trigger === "click") {
347
+ startMorph(!morphed);
298
348
  }
299
- }, [trigger, morphed, startMorph]);
300
- const handleMouseEnter = useCallback(() => {
301
- if (trigger === 'hover') {
302
- startMorph(true);
349
+ }, [trigger, morphed, startMorph]);
350
+ const handleMouseEnter = useCallback(() => {
351
+ if (trigger === "hover") {
352
+ startMorph(true);
303
353
  }
304
- }, [trigger, startMorph]);
305
- const handleMouseLeave = useCallback(() => {
306
- if (trigger === 'hover') {
307
- startMorph(false);
354
+ }, [trigger, startMorph]);
355
+ const handleMouseLeave = useCallback(() => {
356
+ if (trigger === "hover") {
357
+ startMorph(false);
308
358
  }
309
- }, [trigger, startMorph]);
310
- if (!pathData) {
359
+ }, [trigger, startMorph]);
360
+ if (!pathData) {
311
361
  console.warn(`NtdPathMorph: Unknown pair "${pair}"`);
312
362
  return null;
363
+ }
364
+ const currentPath = morphed ? pathData.to : pathData.from;
365
+ return /* @__PURE__ */ jsx(
366
+ "svg",
367
+ {
368
+ ref,
369
+ xmlns: "http://www.w3.org/2000/svg",
370
+ viewBox: pathData.viewBox,
371
+ width: resolvedSize,
372
+ height: resolvedSize,
373
+ className: `ntd-path-morph ${className ?? ""}`,
374
+ style: {
375
+ cursor: trigger !== "none" ? "pointer" : void 0,
376
+ ...style
377
+ },
378
+ onClick: handleClick,
379
+ onMouseEnter: handleMouseEnter,
380
+ onMouseLeave: handleMouseLeave,
381
+ role: trigger !== "none" ? "button" : "img",
382
+ "aria-label": ariaLabel ?? t("ntdIconMorph.icon", "{pair} icon").replace("{pair}", String(pair)),
383
+ "aria-pressed": trigger !== "none" ? morphed : void 0,
384
+ children: /* @__PURE__ */ jsx(
385
+ "path",
386
+ {
387
+ d: currentPath,
388
+ fill: filled ? color : "none",
389
+ stroke: filled ? "none" : color,
390
+ strokeWidth: filled ? 0 : strokeWidth,
391
+ strokeLinecap: "round",
392
+ strokeLinejoin: "round",
393
+ style: {
394
+ transition: `d ${duration}ms ${resolvedEasing}, fill ${duration}ms ${resolvedEasing}, stroke ${duration}ms ${resolvedEasing}`
395
+ }
396
+ }
397
+ )
398
+ }
399
+ );
313
400
  }
314
- const currentPath = morphed ? pathData.to : pathData.from;
315
- return (jsx("svg", { ref: ref, xmlns: "http://www.w3.org/2000/svg", viewBox: pathData.viewBox, width: resolvedSize, height: resolvedSize, className: `ntd-path-morph ${className !== null && className !== void 0 ? className : ''}`, style: {
316
- cursor: trigger !== 'none' ? 'pointer' : undefined,
317
- ...style,
318
- }, onClick: handleClick, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, role: trigger !== 'none' ? 'button' : 'img', "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : t('ntdIconMorph.icon', '{pair} icon').replace('{pair}', String(pair)), "aria-pressed": trigger !== 'none' ? morphed : undefined, children: jsx("path", { d: currentPath, fill: filled ? color : 'none', stroke: filled ? 'none' : color, strokeWidth: filled ? 0 : strokeWidth, strokeLinecap: "round", strokeLinejoin: "round", style: {
319
- transition: `d ${duration}ms ${resolvedEasing}, fill ${duration}ms ${resolvedEasing}, stroke ${duration}ms ${resolvedEasing}`,
320
- } }) }));
321
- }), { displayName: 'NtdPathMorph' });
322
- /* ────────────────────────────────────────────────────────────────────────────
323
- PREDEFINED MORPH PAIR COMPONENT
324
- Convenience wrapper for common morphing patterns
325
- ───────────────────────────────────────────────────────────────────────────── */
326
- // Import icons lazily for predefined pairs
401
+ ),
402
+ { displayName: "NtdPathMorph" }
403
+ );
327
404
  const ICON_PAIRS = {
328
- 'menu-close': { from: NtdMenu, to: NtdClose },
329
- 'play-pause': { from: NtdPlay, to: NtdPause },
330
- 'plus-minus': { from: NtdPlus, to: NtdMinus },
331
- 'check-cross': { from: NtdCheck, to: NtdClose }, // Using Close as X
332
- 'chevron-up-down': { from: NtdChevronUp, to: NtdChevronDown },
333
- 'expand-collapse': { from: NtdPlus, to: NtdMinus }, // simplified
334
- 'sun-moon': { from: NtdSun, to: NtdMoon },
335
- 'volume-mute': { from: NtdPlay, to: NtdPause }, // placeholder
336
- 'lock-unlock': { from: NtdCheck, to: NtdClose }, // placeholder
337
- 'eye-hidden': { from: NtdCheck, to: NtdClose }, // placeholder
338
- 'heart-broken': { from: NtdCheck, to: NtdClose }, // placeholder
339
- 'star-empty': { from: NtdCheck, to: NtdClose }, // placeholder
405
+ "menu-close": { from: NtdMenu, to: NtdClose },
406
+ "play-pause": { from: NtdPlay, to: NtdPause },
407
+ "plus-minus": { from: NtdPlus, to: NtdMinus },
408
+ "check-cross": { from: NtdCheck, to: NtdClose },
409
+ // Using Close as X
410
+ "chevron-up-down": { from: NtdChevronUp, to: NtdChevronDown },
411
+ "expand-collapse": { from: NtdPlus, to: NtdMinus },
412
+ // simplified
413
+ "sun-moon": { from: NtdSun, to: NtdMoon },
414
+ "volume-mute": { from: NtdPlay, to: NtdPause },
415
+ // placeholder
416
+ "lock-unlock": { from: NtdCheck, to: NtdClose },
417
+ // placeholder
418
+ "eye-hidden": { from: NtdCheck, to: NtdClose },
419
+ // placeholder
420
+ "heart-broken": { from: NtdCheck, to: NtdClose },
421
+ // placeholder
422
+ "star-empty": { from: NtdCheck, to: NtdClose }
423
+ // placeholder
340
424
  };
341
- /**
342
- * Convenience component for predefined icon morph pairs.
343
- *
344
- * @example
345
- * ```tsx
346
- * <NtdMorphPair pair="menu-close" morphed={isMenuOpen} />
347
- * <NtdMorphPair pair="sun-moon" trigger="click" />
348
- * ```
349
- */
350
425
  const NtdMorphPair = /* @__PURE__ */ Object.assign(
351
- /* @__PURE__ */ forwardRef(({ pair, ...props }, ref) => {
426
+ /* @__PURE__ */ forwardRef(({ pair, ...props }, ref) => {
352
427
  const iconPair = ICON_PAIRS[pair];
353
428
  if (!iconPair) {
354
- console.warn(`NtdMorphPair: Unknown pair "${pair}"`);
355
- return null;
429
+ console.warn(`NtdMorphPair: Unknown pair "${pair}"`);
430
+ return null;
356
431
  }
357
- return jsx(NtdIconMorph, { ref: ref, from: iconPair.from, to: iconPair.to, ...props });
358
- }), { displayName: 'NtdMorphPair' });
359
- /**
360
- * Hook for managing morph state with animation awareness.
361
- *
362
- * @example
363
- * ```tsx
364
- * const { morphed, toggle, isAnimating } = useMorphState({ duration: 300 });
365
- *
366
- * return (
367
- * <button onClick={toggle} disabled={isAnimating}>
368
- * <NtdIconMorph from={NtdMenu} to={NtdClose} morphed={morphed} />
369
- * </button>
370
- * );
371
- * ```
372
- */
432
+ return /* @__PURE__ */ jsx(NtdIconMorph, { ref, from: iconPair.from, to: iconPair.to, ...props });
433
+ }),
434
+ { displayName: "NtdMorphPair" }
435
+ );
373
436
  function useMorphState(options = {}) {
374
- const { initial = false, duration = 300, onChange } = options;
375
- const [morphed, setMorphedState] = useState(initial);
376
- const [isAnimating, setIsAnimating] = useState(false);
377
- const timeoutRef = useRef(undefined);
378
- useEffect(() => {
379
- return () => {
380
- if (timeoutRef.current) {
381
- clearTimeout(timeoutRef.current);
382
- }
383
- };
384
- }, []);
385
- const setMorphed = useCallback((value) => {
386
- if (morphed === value || isAnimating) {
387
- return;
388
- }
389
- setIsAnimating(true);
390
- setMorphedState(value);
391
- onChange === null || onChange === void 0 ? void 0 : onChange(value);
392
- timeoutRef.current = setTimeout(() => {
393
- setIsAnimating(false);
394
- }, duration);
395
- }, [morphed, isAnimating, duration, onChange]);
396
- const toggle = useCallback(() => setMorphed(!morphed), [morphed, setMorphed]);
397
- const morph = useCallback(() => setMorphed(true), [setMorphed]);
398
- const unmorph = useCallback(() => setMorphed(false), [setMorphed]);
399
- return { morphed, toggle, morph, unmorph, setMorphed, isAnimating };
437
+ const { initial = false, duration = 300, onChange } = options;
438
+ const [morphed, setMorphedState] = useState(initial);
439
+ const [isAnimating, setIsAnimating] = useState(false);
440
+ const timeoutRef = useRef(void 0);
441
+ useEffect(() => {
442
+ return () => {
443
+ if (timeoutRef.current) {
444
+ clearTimeout(timeoutRef.current);
445
+ }
446
+ };
447
+ }, []);
448
+ const setMorphed = useCallback(
449
+ (value) => {
450
+ if (morphed === value || isAnimating) {
451
+ return;
452
+ }
453
+ setIsAnimating(true);
454
+ setMorphedState(value);
455
+ onChange?.(value);
456
+ timeoutRef.current = setTimeout(() => {
457
+ setIsAnimating(false);
458
+ }, duration);
459
+ },
460
+ [morphed, isAnimating, duration, onChange]
461
+ );
462
+ const toggle = useCallback(() => setMorphed(!morphed), [morphed, setMorphed]);
463
+ const morph = useCallback(() => setMorphed(true), [setMorphed]);
464
+ const unmorph = useCallback(() => setMorphed(false), [setMorphed]);
465
+ return { morphed, toggle, morph, unmorph, setMorphed, isAnimating };
400
466
  }
401
-
402
- export { NtdIconMorph, NtdMorphPair, NtdPathMorph, useMorphState };
467
+ export {
468
+ NtdIconMorph,
469
+ NtdMorphPair,
470
+ NtdPathMorph,
471
+ useMorphState
472
+ };