@nice2dev/icons 1.3.14 → 1.3.16

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 (142) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/NiceDesktopIconExporter.js +688 -599
  3. package/dist/cjs/NiceFaviconGenerator.js +603 -417
  4. package/dist/cjs/NiceIconPicker.js +788 -508
  5. package/dist/cjs/NiceIconPreview.js +246 -188
  6. package/dist/cjs/NiceIconSetCreator.js +683 -552
  7. package/dist/cjs/NiceIconStacker.js +547 -171
  8. package/dist/cjs/NiceIconValue.js +27 -35
  9. package/dist/cjs/NtdIconBadge.js +384 -360
  10. package/dist/cjs/NtdIconMorph.js +419 -354
  11. package/dist/cjs/NtdStateMorph.js +150 -147
  12. package/dist/cjs/advancedIconSearch.js +373 -510
  13. package/dist/cjs/animationControls.js +518 -642
  14. package/dist/cjs/client.js +12 -15
  15. package/dist/cjs/createIcon.js +349 -251
  16. package/dist/cjs/design-tokens.js +324 -390
  17. package/dist/cjs/figmaExport.js +162 -257
  18. package/dist/cjs/figmaSync.js +234 -316
  19. package/dist/cjs/headless-ui.js +240 -368
  20. package/dist/cjs/iconAnalytics.js +337 -393
  21. package/dist/cjs/iconHtml.js +64 -86
  22. package/dist/cjs/iconMetadata.js +392 -472
  23. package/dist/cjs/iconParts.js +120 -90
  24. package/dist/cjs/iconStack.js +136 -155
  25. package/dist/cjs/iconStyles.js +1609 -504
  26. package/dist/cjs/iconValue.js +359 -430
  27. package/dist/cjs/icons/accessibility.js +1119 -134
  28. package/dist/cjs/icons/actions.js +1290 -330
  29. package/dist/cjs/icons/ai.js +1424 -144
  30. package/dist/cjs/icons/brand.js +1344 -172
  31. package/dist/cjs/icons/business.js +903 -193
  32. package/dist/cjs/icons/devtech.js +1656 -227
  33. package/dist/cjs/icons/ecommerce.js +802 -111
  34. package/dist/cjs/icons/education.js +1345 -199
  35. package/dist/cjs/icons/files.js +1597 -328
  36. package/dist/cjs/icons/fintech.js +793 -104
  37. package/dist/cjs/icons/food.js +1507 -153
  38. package/dist/cjs/icons/fun.js +786 -109
  39. package/dist/cjs/icons/gaming.js +916 -170
  40. package/dist/cjs/icons/health.js +623 -112
  41. package/dist/cjs/icons/index.js +34 -35
  42. package/dist/cjs/icons/input.js +282 -83
  43. package/dist/cjs/icons/legal.js +1065 -122
  44. package/dist/cjs/icons/media.js +1061 -267
  45. package/dist/cjs/icons/navigation.js +387 -122
  46. package/dist/cjs/icons/omniverk.js +747 -90
  47. package/dist/cjs/icons/realestate.js +1520 -193
  48. package/dist/cjs/icons/saas.js +867 -98
  49. package/dist/cjs/icons/science.js +1465 -165
  50. package/dist/cjs/icons/shapes.js +1316 -308
  51. package/dist/cjs/icons/smarthome.js +786 -90
  52. package/dist/cjs/icons/social.js +591 -59
  53. package/dist/cjs/icons/sports.js +1225 -133
  54. package/dist/cjs/icons/sustainability.js +1211 -139
  55. package/dist/cjs/icons/travel.js +1470 -148
  56. package/dist/cjs/icons/ui.js +1508 -315
  57. package/dist/cjs/icons/weather.js +1160 -173
  58. package/dist/cjs/index.js +566 -566
  59. package/dist/cjs/lottieIntegration.js +261 -266
  60. package/dist/cjs/nicetodev-icons.css +1 -1
  61. package/dist/cjs/particleEffects.js +270 -251
  62. package/dist/cjs/resolver.js +229 -284
  63. package/dist/cjs/rsc.js +175 -193
  64. package/dist/cjs/sharpen.js +73 -130
  65. package/dist/cjs/smilAnimations.js +371 -165
  66. package/dist/cjs/stacking.js +87 -122
  67. package/dist/cjs/tailwind-plugin.js +280 -320
  68. package/dist/cjs/types.js +46 -72
  69. package/dist/cjs/utilities.js +163 -324
  70. package/dist/cjs/variantProps.js +12 -52
  71. package/dist/esm/NiceDesktopIconExporter.js +671 -598
  72. package/dist/esm/NiceFaviconGenerator.js +583 -416
  73. package/dist/esm/NiceIconPicker.js +789 -507
  74. package/dist/esm/NiceIconPreview.js +247 -187
  75. package/dist/esm/NiceIconSetCreator.js +685 -551
  76. package/dist/esm/NiceIconStacker.js +549 -170
  77. package/dist/esm/NiceIconValue.js +29 -34
  78. package/dist/esm/NtdIconBadge.js +388 -359
  79. package/dist/esm/NtdIconMorph.js +423 -353
  80. package/dist/esm/NtdStateMorph.js +152 -146
  81. package/dist/esm/advancedIconSearch.js +391 -509
  82. package/dist/esm/animationControls.js +527 -641
  83. package/dist/esm/client.js +48 -10
  84. package/dist/esm/createIcon.js +350 -250
  85. package/dist/esm/design-tokens.js +334 -387
  86. package/dist/esm/figmaExport.js +170 -256
  87. package/dist/esm/figmaSync.js +237 -315
  88. package/dist/esm/headless-ui.js +254 -365
  89. package/dist/esm/iconAnalytics.js +342 -392
  90. package/dist/esm/iconHtml.js +67 -85
  91. package/dist/esm/iconMetadata.js +404 -471
  92. package/dist/esm/iconParts.js +125 -89
  93. package/dist/esm/iconStack.js +145 -154
  94. package/dist/esm/iconStyles.js +1620 -503
  95. package/dist/esm/iconValue.js +361 -429
  96. package/dist/esm/icons/accessibility.js +1133 -133
  97. package/dist/esm/icons/actions.js +1320 -329
  98. package/dist/esm/icons/ai.js +1441 -143
  99. package/dist/esm/icons/brand.js +1351 -171
  100. package/dist/esm/icons/business.js +931 -201
  101. package/dist/esm/icons/devtech.js +1687 -226
  102. package/dist/esm/icons/ecommerce.js +816 -110
  103. package/dist/esm/icons/education.js +1364 -198
  104. package/dist/esm/icons/files.js +1628 -327
  105. package/dist/esm/icons/fintech.js +807 -103
  106. package/dist/esm/icons/food.js +1524 -152
  107. package/dist/esm/icons/fun.js +801 -108
  108. package/dist/esm/icons/gaming.js +933 -169
  109. package/dist/esm/icons/health.js +636 -111
  110. package/dist/esm/icons/index.js +596 -32
  111. package/dist/esm/icons/input.js +326 -82
  112. package/dist/esm/icons/legal.js +1079 -121
  113. package/dist/esm/icons/media.js +1086 -266
  114. package/dist/esm/icons/navigation.js +401 -121
  115. package/dist/esm/icons/omniverk.js +759 -89
  116. package/dist/esm/icons/realestate.js +1544 -198
  117. package/dist/esm/icons/saas.js +880 -97
  118. package/dist/esm/icons/science.js +1482 -164
  119. package/dist/esm/icons/shapes.js +1343 -307
  120. package/dist/esm/icons/smarthome.js +799 -89
  121. package/dist/esm/icons/social.js +599 -58
  122. package/dist/esm/icons/sports.js +1240 -132
  123. package/dist/esm/icons/sustainability.js +1226 -138
  124. package/dist/esm/icons/travel.js +1486 -147
  125. package/dist/esm/icons/ui.js +1540 -314
  126. package/dist/esm/icons/weather.js +1181 -172
  127. package/dist/esm/index.js +756 -58
  128. package/dist/esm/lottieIntegration.js +264 -265
  129. package/dist/esm/nicetodev-icons.css +1 -1
  130. package/dist/esm/particleEffects.js +271 -250
  131. package/dist/esm/resolver.js +231 -283
  132. package/dist/esm/rsc.js +182 -192
  133. package/dist/esm/sharpen.js +78 -129
  134. package/dist/esm/smilAnimations.js +376 -164
  135. package/dist/esm/stacking.js +99 -121
  136. package/dist/esm/tailwind-plugin.js +282 -319
  137. package/dist/esm/types.js +50 -71
  138. package/dist/esm/utilities.js +177 -321
  139. package/dist/esm/variantProps.js +23 -52
  140. package/dist/types/icons/index.d.ts +1 -1
  141. package/dist/types/icons/science.d.ts +9 -0
  142. package/package.json +15 -22
@@ -1,5 +1,5 @@
1
- 'use strict';
2
-
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  /**
4
4
  * @file tailwind-plugin.ts
5
5
  * @description Tailwind CSS Plugin for @nice2dev/icons
@@ -12,334 +12,294 @@
12
12
  * @license MIT
13
13
  */
14
14
  const defaultSizes = {
15
- xs: '0.75rem',
16
- sm: '1rem',
17
- md: '1.5rem',
18
- lg: '2rem',
19
- xl: '3rem',
20
- '2xl': '4rem',
15
+ xs: "0.75rem",
16
+ sm: "1rem",
17
+ md: "1.5rem",
18
+ lg: "2rem",
19
+ xl: "3rem",
20
+ "2xl": "4rem"
21
21
  };
22
- /**
23
- * Tailwind CSS Plugin for NiceToDev Icons
24
- *
25
- * @example
26
- * // tailwind.config.js
27
- * import { ntdIconPlugin } from '@nice2dev/icons/tailwind';
28
- *
29
- * export default {
30
- * plugins: [
31
- * ntdIconPlugin({
32
- * prefix: 'ntd-icon',
33
- * animations: true,
34
- * }),
35
- * ],
36
- * };
37
- *
38
- * @example
39
- * // Usage in components
40
- * <NtdHome className="ntd-icon-md text-blue-500 hover:ntd-icon-bounce" />
41
- * <NtdStar className="ntd-icon-lg ntd-icon-spin text-yellow-400" />
42
- */
43
22
  const ntdIconPlugin = (options = {}) => {
44
- const { prefix = 'ntd-icon', sizes = defaultSizes, animations = true, variantUtilities = true, } = options;
45
- return function ({ addUtilities, addComponents, theme, matchUtilities }) {
46
- // ─────────────────────────────────────────────────────────────────────
47
- // SIZE UTILITIES
48
- // ─────────────────────────────────────────────────────────────────────
49
- const sizeUtilities = {};
50
- Object.entries(sizes).forEach(([key, value]) => {
51
- sizeUtilities[`.${prefix}-${key}`] = {
52
- width: value,
53
- height: value,
54
- };
55
- });
56
- addUtilities(sizeUtilities);
57
- // Dynamic sizing using Tailwind's spacing scale
58
- matchUtilities({
59
- [`${prefix}-size`]: (value) => ({
60
- width: value,
61
- height: value,
62
- }),
63
- }, { values: theme('spacing') });
64
- // ─────────────────────────────────────────────────────────────────────
65
- // COLOR UTILITIES (for SVG icons)
66
- // ─────────────────────────────────────────────────────────────────────
67
- const colorUtilities = {
68
- // Primary color (main icon color)
69
- [`.${prefix}-current`]: {
70
- color: 'currentColor',
71
- '--ntd-primary-color': 'currentColor',
72
- },
73
- // For duotone: secondary color
74
- [`.${prefix}-secondary-current`]: {
75
- '--ntd-secondary-color': 'currentColor',
76
- },
77
- // Opacity for secondary color in duotone
78
- [`.${prefix}-secondary-opacity-25`]: {
79
- '--ntd-secondary-opacity': '0.25',
80
- },
81
- [`.${prefix}-secondary-opacity-50`]: {
82
- '--ntd-secondary-opacity': '0.5',
83
- },
84
- [`.${prefix}-secondary-opacity-75`]: {
85
- '--ntd-secondary-opacity': '0.75',
86
- },
87
- };
88
- addUtilities(colorUtilities);
89
- // Dynamic color matching using Tailwind's color palette
90
- matchUtilities({
91
- [`${prefix}-primary`]: (value) => ({
92
- '--ntd-primary-color': value,
93
- }),
94
- [`${prefix}-secondary`]: (value) => ({
95
- '--ntd-secondary-color': value,
96
- }),
97
- }, { values: flattenColorPalette(theme('colors')) });
98
- // ─────────────────────────────────────────────────────────────────────
99
- // STROKE WIDTH UTILITIES
100
- // ─────────────────────────────────────────────────────────────────────
101
- const strokeUtilities = {
102
- [`.${prefix}-stroke-thin`]: {
103
- '--ntd-stroke-width': '1',
104
- },
105
- [`.${prefix}-stroke-normal`]: {
106
- '--ntd-stroke-width': '1.5',
107
- },
108
- [`.${prefix}-stroke-medium`]: {
109
- '--ntd-stroke-width': '2',
110
- },
111
- [`.${prefix}-stroke-thick`]: {
112
- '--ntd-stroke-width': '2.5',
113
- },
114
- [`.${prefix}-stroke-bold`]: {
115
- '--ntd-stroke-width': '3',
116
- },
117
- };
118
- addUtilities(strokeUtilities);
119
- matchUtilities({
120
- [`${prefix}-stroke`]: (value) => ({
121
- '--ntd-stroke-width': value,
122
- }),
123
- }, { values: { '0.5': '0.5', '1': '1', '1.5': '1.5', '2': '2', '2.5': '2.5', '3': '3' } });
124
- // ─────────────────────────────────────────────────────────────────────
125
- // VARIANT UTILITIES
126
- // ─────────────────────────────────────────────────────────────────────
127
- if (variantUtilities) {
128
- const variantClasses = {
129
- [`.${prefix}-solid`]: {
130
- '--ntd-variant': 'solid',
131
- },
132
- [`.${prefix}-outline`]: {
133
- '--ntd-variant': 'outline',
134
- },
135
- [`.${prefix}-sharp`]: {
136
- '--ntd-variant': 'sharp',
137
- },
138
- [`.${prefix}-duotone`]: {
139
- '--ntd-variant': 'duotone',
140
- },
141
- [`.${prefix}-cutout`]: {
142
- '--ntd-variant': 'cutout',
143
- },
144
- [`.${prefix}-vivid`]: {
145
- '--ntd-variant': 'vivid',
146
- },
147
- };
148
- addUtilities(variantClasses);
23
+ const {
24
+ prefix = "ntd-icon",
25
+ sizes = defaultSizes,
26
+ animations = true,
27
+ variantUtilities = true
28
+ } = options;
29
+ return function({ addUtilities, addComponents, theme, matchUtilities }) {
30
+ const sizeUtilities = {};
31
+ Object.entries(sizes).forEach(([key, value]) => {
32
+ sizeUtilities[`.${prefix}-${key}`] = {
33
+ width: value,
34
+ height: value
35
+ };
36
+ });
37
+ addUtilities(sizeUtilities);
38
+ matchUtilities(
39
+ {
40
+ [`${prefix}-size`]: (value) => ({
41
+ width: value,
42
+ height: value
43
+ })
44
+ },
45
+ { values: theme("spacing") }
46
+ );
47
+ const colorUtilities = {
48
+ // Primary color (main icon color)
49
+ [`.${prefix}-current`]: {
50
+ color: "currentColor",
51
+ "--ntd-primary-color": "currentColor"
52
+ },
53
+ // For duotone: secondary color
54
+ [`.${prefix}-secondary-current`]: {
55
+ "--ntd-secondary-color": "currentColor"
56
+ },
57
+ // Opacity for secondary color in duotone
58
+ [`.${prefix}-secondary-opacity-25`]: {
59
+ "--ntd-secondary-opacity": "0.25"
60
+ },
61
+ [`.${prefix}-secondary-opacity-50`]: {
62
+ "--ntd-secondary-opacity": "0.5"
63
+ },
64
+ [`.${prefix}-secondary-opacity-75`]: {
65
+ "--ntd-secondary-opacity": "0.75"
66
+ }
67
+ };
68
+ addUtilities(colorUtilities);
69
+ matchUtilities(
70
+ {
71
+ [`${prefix}-primary`]: (value) => ({
72
+ "--ntd-primary-color": value
73
+ }),
74
+ [`${prefix}-secondary`]: (value) => ({
75
+ "--ntd-secondary-color": value
76
+ })
77
+ },
78
+ { values: flattenColorPalette(theme("colors")) }
79
+ );
80
+ const strokeUtilities = {
81
+ [`.${prefix}-stroke-thin`]: {
82
+ "--ntd-stroke-width": "1"
83
+ },
84
+ [`.${prefix}-stroke-normal`]: {
85
+ "--ntd-stroke-width": "1.5"
86
+ },
87
+ [`.${prefix}-stroke-medium`]: {
88
+ "--ntd-stroke-width": "2"
89
+ },
90
+ [`.${prefix}-stroke-thick`]: {
91
+ "--ntd-stroke-width": "2.5"
92
+ },
93
+ [`.${prefix}-stroke-bold`]: {
94
+ "--ntd-stroke-width": "3"
95
+ }
96
+ };
97
+ addUtilities(strokeUtilities);
98
+ matchUtilities(
99
+ {
100
+ [`${prefix}-stroke`]: (value) => ({
101
+ "--ntd-stroke-width": value
102
+ })
103
+ },
104
+ { values: { "0.5": "0.5", "1": "1", "1.5": "1.5", "2": "2", "2.5": "2.5", "3": "3" } }
105
+ );
106
+ if (variantUtilities) {
107
+ const variantClasses = {
108
+ [`.${prefix}-solid`]: {
109
+ "--ntd-variant": "solid"
110
+ },
111
+ [`.${prefix}-outline`]: {
112
+ "--ntd-variant": "outline"
113
+ },
114
+ [`.${prefix}-sharp`]: {
115
+ "--ntd-variant": "sharp"
116
+ },
117
+ [`.${prefix}-duotone`]: {
118
+ "--ntd-variant": "duotone"
119
+ },
120
+ [`.${prefix}-cutout`]: {
121
+ "--ntd-variant": "cutout"
122
+ },
123
+ [`.${prefix}-vivid`]: {
124
+ "--ntd-variant": "vivid"
149
125
  }
150
- // ─────────────────────────────────────────────────────────────────────
151
- // ANIMATION UTILITIES
152
- // ─────────────────────────────────────────────────────────────────────
153
- if (animations) {
154
- const animationUtilities = {
155
- // Spin animation
156
- [`.${prefix}-spin`]: {
157
- animation: `${prefix}-spin 1s linear infinite`,
158
- },
159
- [`.${prefix}-spin-slow`]: {
160
- animation: `${prefix}-spin 2s linear infinite`,
161
- },
162
- [`.${prefix}-spin-fast`]: {
163
- animation: `${prefix}-spin 0.5s linear infinite`,
164
- },
165
- // Pulse animation
166
- [`.${prefix}-pulse`]: {
167
- animation: `${prefix}-pulse 2s ease-in-out infinite`,
168
- },
169
- // Bounce animation
170
- [`.${prefix}-bounce`]: {
171
- animation: `${prefix}-bounce 1s ease-in-out infinite`,
172
- },
173
- // Shake animation (for errors/alerts)
174
- [`.${prefix}-shake`]: {
175
- animation: `${prefix}-shake 0.5s ease-in-out`,
176
- },
177
- // Fade in
178
- [`.${prefix}-fade-in`]: {
179
- animation: `${prefix}-fade-in 0.3s ease-out`,
180
- },
181
- // Scale up
182
- [`.${prefix}-scale-in`]: {
183
- animation: `${prefix}-scale-in 0.2s ease-out`,
184
- },
185
- // Wiggle (for attention)
186
- [`.${prefix}-wiggle`]: {
187
- animation: `${prefix}-wiggle 0.5s ease-in-out`,
188
- },
189
- // Float (subtle up/down)
190
- [`.${prefix}-float`]: {
191
- animation: `${prefix}-float 3s ease-in-out infinite`,
192
- },
193
- // Glow effect
194
- [`.${prefix}-glow`]: {
195
- filter: 'drop-shadow(0 0 8px currentColor)',
196
- animation: `${prefix}-glow 2s ease-in-out infinite alternate`,
197
- },
198
- };
199
- addUtilities(animationUtilities);
200
- // Keyframes for animations
201
- addComponents({
202
- [`@keyframes ${prefix}-spin`]: {
203
- from: { transform: 'rotate(0deg)' },
204
- to: { transform: 'rotate(360deg)' },
205
- },
206
- [`@keyframes ${prefix}-pulse`]: {
207
- '0%, 100%': { opacity: '1' },
208
- '50%': { opacity: '0.5' },
209
- },
210
- [`@keyframes ${prefix}-bounce`]: {
211
- '0%, 100%': { transform: 'translateY(0)' },
212
- '50%': { transform: 'translateY(-25%)' },
213
- },
214
- [`@keyframes ${prefix}-shake`]: {
215
- '0%, 100%': { transform: 'translateX(0)' },
216
- '10%, 30%, 50%, 70%, 90%': { transform: 'translateX(-4px)' },
217
- '20%, 40%, 60%, 80%': { transform: 'translateX(4px)' },
218
- },
219
- [`@keyframes ${prefix}-fade-in`]: {
220
- from: { opacity: '0' },
221
- to: { opacity: '1' },
222
- },
223
- [`@keyframes ${prefix}-scale-in`]: {
224
- from: { transform: 'scale(0.8)', opacity: '0' },
225
- to: { transform: 'scale(1)', opacity: '1' },
226
- },
227
- [`@keyframes ${prefix}-wiggle`]: {
228
- '0%, 100%': { transform: 'rotate(0deg)' },
229
- '25%': { transform: 'rotate(-5deg)' },
230
- '75%': { transform: 'rotate(5deg)' },
231
- },
232
- [`@keyframes ${prefix}-float`]: {
233
- '0%, 100%': { transform: 'translateY(0)' },
234
- '50%': { transform: 'translateY(-10%)' },
235
- },
236
- [`@keyframes ${prefix}-glow`]: {
237
- from: { filter: 'drop-shadow(0 0 4px currentColor)' },
238
- to: { filter: 'drop-shadow(0 0 12px currentColor)' },
239
- },
240
- });
241
- // Hover animations
242
- const hoverAnimations = {
243
- [`.hover\\:${prefix}-bounce:hover`]: {
244
- animation: `${prefix}-bounce 0.5s ease-in-out`,
245
- },
246
- [`.hover\\:${prefix}-shake:hover`]: {
247
- animation: `${prefix}-shake 0.5s ease-in-out`,
248
- },
249
- [`.hover\\:${prefix}-wiggle:hover`]: {
250
- animation: `${prefix}-wiggle 0.5s ease-in-out`,
251
- },
252
- [`.hover\\:${prefix}-scale:hover`]: {
253
- transform: 'scale(1.1)',
254
- transition: 'transform 0.2s ease-out',
255
- },
256
- [`.hover\\:${prefix}-glow:hover`]: {
257
- filter: 'drop-shadow(0 0 8px currentColor)',
258
- },
259
- };
260
- addUtilities(hoverAnimations);
126
+ };
127
+ addUtilities(variantClasses);
128
+ }
129
+ if (animations) {
130
+ const animationUtilities = {
131
+ // Spin animation
132
+ [`.${prefix}-spin`]: {
133
+ animation: `${prefix}-spin 1s linear infinite`
134
+ },
135
+ [`.${prefix}-spin-slow`]: {
136
+ animation: `${prefix}-spin 2s linear infinite`
137
+ },
138
+ [`.${prefix}-spin-fast`]: {
139
+ animation: `${prefix}-spin 0.5s linear infinite`
140
+ },
141
+ // Pulse animation
142
+ [`.${prefix}-pulse`]: {
143
+ animation: `${prefix}-pulse 2s ease-in-out infinite`
144
+ },
145
+ // Bounce animation
146
+ [`.${prefix}-bounce`]: {
147
+ animation: `${prefix}-bounce 1s ease-in-out infinite`
148
+ },
149
+ // Shake animation (for errors/alerts)
150
+ [`.${prefix}-shake`]: {
151
+ animation: `${prefix}-shake 0.5s ease-in-out`
152
+ },
153
+ // Fade in
154
+ [`.${prefix}-fade-in`]: {
155
+ animation: `${prefix}-fade-in 0.3s ease-out`
156
+ },
157
+ // Scale up
158
+ [`.${prefix}-scale-in`]: {
159
+ animation: `${prefix}-scale-in 0.2s ease-out`
160
+ },
161
+ // Wiggle (for attention)
162
+ [`.${prefix}-wiggle`]: {
163
+ animation: `${prefix}-wiggle 0.5s ease-in-out`
164
+ },
165
+ // Float (subtle up/down)
166
+ [`.${prefix}-float`]: {
167
+ animation: `${prefix}-float 3s ease-in-out infinite`
168
+ },
169
+ // Glow effect
170
+ [`.${prefix}-glow`]: {
171
+ filter: "drop-shadow(0 0 8px currentColor)",
172
+ animation: `${prefix}-glow 2s ease-in-out infinite alternate`
261
173
  }
262
- // ─────────────────────────────────────────────────────────────────────
263
- // TRANSITION UTILITIES
264
- // ─────────────────────────────────────────────────────────────────────
265
- const transitionUtilities = {
266
- [`.${prefix}-transition`]: {
267
- transition: 'all 0.2s ease-out',
268
- },
269
- [`.${prefix}-transition-fast`]: {
270
- transition: 'all 0.1s ease-out',
271
- },
272
- [`.${prefix}-transition-slow`]: {
273
- transition: 'all 0.3s ease-out',
274
- },
275
- [`.${prefix}-transition-colors`]: {
276
- transition: 'color 0.2s ease-out, fill 0.2s ease-out, stroke 0.2s ease-out',
277
- },
278
- };
279
- addUtilities(transitionUtilities);
280
- // ─────────────────────────────────────────────────────────────────────
281
- // ACCESSIBILITY UTILITIES
282
- // ─────────────────────────────────────────────────────────────────────
283
- const a11yUtilities = {
284
- // Reduced motion support
285
- [`@media (prefers-reduced-motion: reduce)`]: {
286
- [`.${prefix}-spin, .${prefix}-spin-slow, .${prefix}-spin-fast, .${prefix}-pulse, .${prefix}-bounce, .${prefix}-shake, .${prefix}-wiggle, .${prefix}-float, .${prefix}-glow`]: {
287
- animation: 'none !important',
288
- },
289
- },
290
- // Focus visible outline
291
- [`.${prefix}-focus-visible:focus-visible`]: {
292
- outline: '2px solid currentColor',
293
- outlineOffset: '2px',
294
- },
295
- // High contrast mode
296
- [`@media (forced-colors: active)`]: {
297
- [`.${prefix}-high-contrast`]: {
298
- forcedColorAdjust: 'auto',
299
- },
300
- },
301
- };
302
- addComponents(a11yUtilities);
174
+ };
175
+ addUtilities(animationUtilities);
176
+ addComponents({
177
+ [`@keyframes ${prefix}-spin`]: {
178
+ from: { transform: "rotate(0deg)" },
179
+ to: { transform: "rotate(360deg)" }
180
+ },
181
+ [`@keyframes ${prefix}-pulse`]: {
182
+ "0%, 100%": { opacity: "1" },
183
+ "50%": { opacity: "0.5" }
184
+ },
185
+ [`@keyframes ${prefix}-bounce`]: {
186
+ "0%, 100%": { transform: "translateY(0)" },
187
+ "50%": { transform: "translateY(-25%)" }
188
+ },
189
+ [`@keyframes ${prefix}-shake`]: {
190
+ "0%, 100%": { transform: "translateX(0)" },
191
+ "10%, 30%, 50%, 70%, 90%": { transform: "translateX(-4px)" },
192
+ "20%, 40%, 60%, 80%": { transform: "translateX(4px)" }
193
+ },
194
+ [`@keyframes ${prefix}-fade-in`]: {
195
+ from: { opacity: "0" },
196
+ to: { opacity: "1" }
197
+ },
198
+ [`@keyframes ${prefix}-scale-in`]: {
199
+ from: { transform: "scale(0.8)", opacity: "0" },
200
+ to: { transform: "scale(1)", opacity: "1" }
201
+ },
202
+ [`@keyframes ${prefix}-wiggle`]: {
203
+ "0%, 100%": { transform: "rotate(0deg)" },
204
+ "25%": { transform: "rotate(-5deg)" },
205
+ "75%": { transform: "rotate(5deg)" }
206
+ },
207
+ [`@keyframes ${prefix}-float`]: {
208
+ "0%, 100%": { transform: "translateY(0)" },
209
+ "50%": { transform: "translateY(-10%)" }
210
+ },
211
+ [`@keyframes ${prefix}-glow`]: {
212
+ from: { filter: "drop-shadow(0 0 4px currentColor)" },
213
+ to: { filter: "drop-shadow(0 0 12px currentColor)" }
214
+ }
215
+ });
216
+ const hoverAnimations = {
217
+ [`.hover\\:${prefix}-bounce:hover`]: {
218
+ animation: `${prefix}-bounce 0.5s ease-in-out`
219
+ },
220
+ [`.hover\\:${prefix}-shake:hover`]: {
221
+ animation: `${prefix}-shake 0.5s ease-in-out`
222
+ },
223
+ [`.hover\\:${prefix}-wiggle:hover`]: {
224
+ animation: `${prefix}-wiggle 0.5s ease-in-out`
225
+ },
226
+ [`.hover\\:${prefix}-scale:hover`]: {
227
+ transform: "scale(1.1)",
228
+ transition: "transform 0.2s ease-out"
229
+ },
230
+ [`.hover\\:${prefix}-glow:hover`]: {
231
+ filter: "drop-shadow(0 0 8px currentColor)"
232
+ }
233
+ };
234
+ addUtilities(hoverAnimations);
235
+ }
236
+ const transitionUtilities = {
237
+ [`.${prefix}-transition`]: {
238
+ transition: "all 0.2s ease-out"
239
+ },
240
+ [`.${prefix}-transition-fast`]: {
241
+ transition: "all 0.1s ease-out"
242
+ },
243
+ [`.${prefix}-transition-slow`]: {
244
+ transition: "all 0.3s ease-out"
245
+ },
246
+ [`.${prefix}-transition-colors`]: {
247
+ transition: "color 0.2s ease-out, fill 0.2s ease-out, stroke 0.2s ease-out"
248
+ }
249
+ };
250
+ addUtilities(transitionUtilities);
251
+ const a11yUtilities = {
252
+ // Reduced motion support
253
+ [`@media (prefers-reduced-motion: reduce)`]: {
254
+ [`.${prefix}-spin, .${prefix}-spin-slow, .${prefix}-spin-fast, .${prefix}-pulse, .${prefix}-bounce, .${prefix}-shake, .${prefix}-wiggle, .${prefix}-float, .${prefix}-glow`]: {
255
+ animation: "none !important"
256
+ }
257
+ },
258
+ // Focus visible outline
259
+ [`.${prefix}-focus-visible:focus-visible`]: {
260
+ outline: "2px solid currentColor",
261
+ outlineOffset: "2px"
262
+ },
263
+ // High contrast mode
264
+ [`@media (forced-colors: active)`]: {
265
+ [`.${prefix}-high-contrast`]: {
266
+ forcedColorAdjust: "auto"
267
+ }
268
+ }
303
269
  };
270
+ addComponents(a11yUtilities);
271
+ };
304
272
  };
305
- /**
306
- * Helper to flatten color palette for matchUtilities
307
- */
308
273
  function flattenColorPalette(colors) {
309
- const result = {};
310
- function flatten(obj, prefix = '') {
311
- for (const [key, value] of Object.entries(obj)) {
312
- if (typeof value === 'string') {
313
- result[prefix ? `${prefix}-${key}` : key] = value;
314
- }
315
- else if (typeof value === 'object' && value !== null) {
316
- flatten(value, prefix ? `${prefix}-${key}` : key);
317
- }
318
- }
274
+ const result = {};
275
+ function flatten(obj, prefix = "") {
276
+ for (const [key, value] of Object.entries(obj)) {
277
+ if (typeof value === "string") {
278
+ result[prefix ? `${prefix}-${key}` : key] = value;
279
+ } else if (typeof value === "object" && value !== null) {
280
+ flatten(value, prefix ? `${prefix}-${key}` : key);
281
+ }
319
282
  }
320
- flatten(colors);
321
- return result;
283
+ }
284
+ flatten(colors);
285
+ return result;
322
286
  }
323
- /**
324
- * Preset for common icon configurations
325
- */
326
287
  const ntdIconPreset = {
327
- theme: {
328
- extend: {
329
- colors: {
330
- ntd: {
331
- primary: '#3B82F6',
332
- secondary: '#64748B',
333
- accent: '#8B5CF6',
334
- success: '#22C55E',
335
- warning: '#F59E0B',
336
- error: '#EF4444',
337
- info: '#06B6D4',
338
- },
339
- },
340
- },
341
- },
288
+ theme: {
289
+ extend: {
290
+ colors: {
291
+ ntd: {
292
+ primary: "#3B82F6",
293
+ secondary: "#64748B",
294
+ accent: "#8B5CF6",
295
+ success: "#22C55E",
296
+ warning: "#F59E0B",
297
+ error: "#EF4444",
298
+ info: "#06B6D4"
299
+ }
300
+ }
301
+ }
302
+ }
342
303
  };
343
-
344
304
  exports.ntdIconPlugin = ntdIconPlugin;
345
305
  exports.ntdIconPreset = ntdIconPreset;