@nice2dev/icons 1.0.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 (132) hide show
  1. package/CHANGELOG.md +124 -0
  2. package/LICENSE +21 -0
  3. package/README.md +581 -0
  4. package/dist/cjs/NiceIconPicker.js +387 -0
  5. package/dist/cjs/NiceIconPicker.js.map +1 -0
  6. package/dist/cjs/NiceVectorEditor.js +675 -0
  7. package/dist/cjs/NiceVectorEditor.js.map +1 -0
  8. package/dist/cjs/animationControls.js +690 -0
  9. package/dist/cjs/animationControls.js.map +1 -0
  10. package/dist/cjs/createIcon.js +142 -0
  11. package/dist/cjs/createIcon.js.map +1 -0
  12. package/dist/cjs/figmaExport.js +288 -0
  13. package/dist/cjs/figmaExport.js.map +1 -0
  14. package/dist/cjs/icons/actions.js +257 -0
  15. package/dist/cjs/icons/actions.js.map +1 -0
  16. package/dist/cjs/icons/brand.js +128 -0
  17. package/dist/cjs/icons/brand.js.map +1 -0
  18. package/dist/cjs/icons/business.js +228 -0
  19. package/dist/cjs/icons/business.js.map +1 -0
  20. package/dist/cjs/icons/devtech.js +374 -0
  21. package/dist/cjs/icons/devtech.js.map +1 -0
  22. package/dist/cjs/icons/ecommerce.js +171 -0
  23. package/dist/cjs/icons/ecommerce.js.map +1 -0
  24. package/dist/cjs/icons/files.js +286 -0
  25. package/dist/cjs/icons/files.js.map +1 -0
  26. package/dist/cjs/icons/fintech.js +151 -0
  27. package/dist/cjs/icons/fintech.js.map +1 -0
  28. package/dist/cjs/icons/fun.js +124 -0
  29. package/dist/cjs/icons/fun.js.map +1 -0
  30. package/dist/cjs/icons/health.js +132 -0
  31. package/dist/cjs/icons/health.js.map +1 -0
  32. package/dist/cjs/icons/media.js +219 -0
  33. package/dist/cjs/icons/media.js.map +1 -0
  34. package/dist/cjs/icons/navigation.js +147 -0
  35. package/dist/cjs/icons/navigation.js.map +1 -0
  36. package/dist/cjs/icons/saas.js +141 -0
  37. package/dist/cjs/icons/saas.js.map +1 -0
  38. package/dist/cjs/icons/shapes.js +205 -0
  39. package/dist/cjs/icons/shapes.js.map +1 -0
  40. package/dist/cjs/icons/smarthome.js +141 -0
  41. package/dist/cjs/icons/smarthome.js.map +1 -0
  42. package/dist/cjs/icons/social.js +159 -0
  43. package/dist/cjs/icons/social.js.map +1 -0
  44. package/dist/cjs/icons/ui.js +262 -0
  45. package/dist/cjs/icons/ui.js.map +1 -0
  46. package/dist/cjs/icons/weather.js +187 -0
  47. package/dist/cjs/icons/weather.js.map +1 -0
  48. package/dist/cjs/index.js +362 -0
  49. package/dist/cjs/index.js.map +1 -0
  50. package/dist/cjs/nicetodev-icons.css +1 -0
  51. package/dist/cjs/smilAnimations.js +182 -0
  52. package/dist/cjs/smilAnimations.js.map +1 -0
  53. package/dist/cjs/types.js +47 -0
  54. package/dist/cjs/types.js.map +1 -0
  55. package/dist/esm/NiceIconPicker.js +385 -0
  56. package/dist/esm/NiceIconPicker.js.map +1 -0
  57. package/dist/esm/NiceVectorEditor.js +673 -0
  58. package/dist/esm/NiceVectorEditor.js.map +1 -0
  59. package/dist/esm/animationControls.js +680 -0
  60. package/dist/esm/animationControls.js.map +1 -0
  61. package/dist/esm/createIcon.js +140 -0
  62. package/dist/esm/createIcon.js.map +1 -0
  63. package/dist/esm/figmaExport.js +279 -0
  64. package/dist/esm/figmaExport.js.map +1 -0
  65. package/dist/esm/icons/actions.js +231 -0
  66. package/dist/esm/icons/actions.js.map +1 -0
  67. package/dist/esm/icons/brand.js +124 -0
  68. package/dist/esm/icons/brand.js.map +1 -0
  69. package/dist/esm/icons/business.js +209 -0
  70. package/dist/esm/icons/business.js.map +1 -0
  71. package/dist/esm/icons/devtech.js +342 -0
  72. package/dist/esm/icons/devtech.js.map +1 -0
  73. package/dist/esm/icons/ecommerce.js +154 -0
  74. package/dist/esm/icons/ecommerce.js.map +1 -0
  75. package/dist/esm/icons/files.js +254 -0
  76. package/dist/esm/icons/files.js.map +1 -0
  77. package/dist/esm/icons/fintech.js +136 -0
  78. package/dist/esm/icons/fintech.js.map +1 -0
  79. package/dist/esm/icons/fun.js +110 -0
  80. package/dist/esm/icons/fun.js.map +1 -0
  81. package/dist/esm/icons/health.js +118 -0
  82. package/dist/esm/icons/health.js.map +1 -0
  83. package/dist/esm/icons/media.js +195 -0
  84. package/dist/esm/icons/media.js.map +1 -0
  85. package/dist/esm/icons/navigation.js +132 -0
  86. package/dist/esm/icons/navigation.js.map +1 -0
  87. package/dist/esm/icons/saas.js +127 -0
  88. package/dist/esm/icons/saas.js.map +1 -0
  89. package/dist/esm/icons/shapes.js +182 -0
  90. package/dist/esm/icons/shapes.js.map +1 -0
  91. package/dist/esm/icons/smarthome.js +127 -0
  92. package/dist/esm/icons/smarthome.js.map +1 -0
  93. package/dist/esm/icons/social.js +150 -0
  94. package/dist/esm/icons/social.js.map +1 -0
  95. package/dist/esm/icons/ui.js +233 -0
  96. package/dist/esm/icons/ui.js.map +1 -0
  97. package/dist/esm/icons/weather.js +166 -0
  98. package/dist/esm/icons/weather.js.map +1 -0
  99. package/dist/esm/index.js +25 -0
  100. package/dist/esm/index.js.map +1 -0
  101. package/dist/esm/nicetodev-icons.css +1 -0
  102. package/dist/esm/smilAnimations.js +176 -0
  103. package/dist/esm/smilAnimations.js.map +1 -0
  104. package/dist/esm/types.js +44 -0
  105. package/dist/esm/types.js.map +1 -0
  106. package/dist/types/NiceIconPicker.d.ts +149 -0
  107. package/dist/types/NiceVectorEditor.d.ts +75 -0
  108. package/dist/types/animationControls.d.ts +307 -0
  109. package/dist/types/createIcon.d.ts +76 -0
  110. package/dist/types/figmaExport.d.ts +243 -0
  111. package/dist/types/icons/actions.d.ts +25 -0
  112. package/dist/types/icons/brand.d.ts +3 -0
  113. package/dist/types/icons/business.d.ts +25 -0
  114. package/dist/types/icons/devtech.d.ts +39 -0
  115. package/dist/types/icons/ecommerce.d.ts +16 -0
  116. package/dist/types/icons/files.d.ts +31 -0
  117. package/dist/types/icons/fintech.d.ts +14 -0
  118. package/dist/types/icons/fun.d.ts +13 -0
  119. package/dist/types/icons/health.d.ts +14 -0
  120. package/dist/types/icons/index.d.ts +17 -0
  121. package/dist/types/icons/media.d.ts +23 -0
  122. package/dist/types/icons/navigation.d.ts +14 -0
  123. package/dist/types/icons/saas.d.ts +13 -0
  124. package/dist/types/icons/shapes.d.ts +22 -0
  125. package/dist/types/icons/smarthome.d.ts +13 -0
  126. package/dist/types/icons/social.d.ts +18 -0
  127. package/dist/types/icons/ui.d.ts +28 -0
  128. package/dist/types/icons/weather.d.ts +20 -0
  129. package/dist/types/index.d.ts +69 -0
  130. package/dist/types/smilAnimations.d.ts +102 -0
  131. package/dist/types/types.d.ts +179 -0
  132. package/package.json +86 -0
package/README.md ADDED
@@ -0,0 +1,581 @@
1
+ # @nice2dev/icons
2
+
3
+ Beautiful, lightweight, multi-color SVG icon library for React with 65+ CSS animations, four rendering variants, gradient fills, and a built-in icon picker component.
4
+
5
+ [![npm](https://img.shields.io/npm/v/@nice2dev/icons)](https://www.npmjs.com/package/@nice2dev/icons)
6
+ [![license](https://img.shields.io/npm/l/@nice2dev/icons)](LICENSE)
7
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.x-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
8
+
9
+ ---
10
+
11
+ ## Table of Contents
12
+
13
+ - [Features](#features)
14
+ - [Installation](#installation)
15
+ - [Quick Start](#quick-start)
16
+ - [API Reference](#api-reference)
17
+ - [Icon Component Props (`NtdIconProps`)](#icon-component-props-ntdiconprops)
18
+ - [Size Presets (`IconSize`)](#size-presets-iconsize)
19
+ - [Variants (`IconVariant`)](#variants-iconvariant)
20
+ - [Colors & Opacity](#colors--opacity)
21
+ - [Animations (`IconAnimation`)](#animations-iconanimation)
22
+ - [Gradient Fills](#gradient-fills)
23
+ - [Accessibility](#accessibility)
24
+ - [NiceIconPicker](#niceiconpicker)
25
+ - [IconPickerEntry](#iconpickerentry)
26
+ - [NiceIconPickerProps](#niceiconpickerprops)
27
+ - [NiceIconPickerHandle (imperative ref)](#niceiconpickerhandle-imperative-ref)
28
+ - [Creating Custom Icons (`createIcon`)](#creating-custom-icons-createicon)
29
+ - [CreateIconOptions](#createiconoptions)
30
+ - [IconPathRenderer](#iconpathrenderer)
31
+ - [IconRenderProps](#iconrenderprops)
32
+ - [Full Icon Catalog](#full-icon-catalog)
33
+ - [Full Animation Catalog](#full-animation-catalog)
34
+ - [CSS Theming Variables](#css-theming-variables)
35
+ - [Tree Shaking](#tree-shaking)
36
+ - [Storybook](#storybook)
37
+ - [Build & Development](#build--development)
38
+ - [License](#license)
39
+
40
+ ---
41
+
42
+ ## Features
43
+
44
+ - **300+ icons** across 17 categories (navigation, actions, UI, media, files, fun, weather, shapes, business, social, devtech, health, brand, brand-studio, brand-lockup, brand-enterprise)
45
+ - **4 variants** per icon — `solid`, `outline`, `duotone`, `flat` (badge-style)
46
+ - **Multi-color** — `primaryColor`, `secondaryColor`, `accentColor` with per-channel opacity
47
+ - **Gradient fills** — 12 built-in presets (sunset, ocean, aurora…), linear/radial, animated
48
+ - **65+ CSS animations** — `spin`, `pulse`, `bounce`, `heartbeat`, `glitch`, `neon`, `explode`, and many more
49
+ - **Tree-shakeable** — import only what you need; unused icons are eliminated at build time
50
+ - **NiceIconPicker** — searchable, categorized dropdown component for icon selection
51
+ - **createIcon()** factory — build your own icons following the same API
52
+ - **Zero runtime dependencies** — only `react` and `react-dom` as peer deps
53
+ - **Full TypeScript** — strict types, IntelliSense, TSDoc on every export
54
+ - **Accessible** — `role`, `aria-hidden`, `aria-label`, `<title>` support
55
+ - **CSS variable theming** — customize the picker with CSS custom properties
56
+
57
+ ---
58
+
59
+ ## Installation
60
+
61
+ ```bash
62
+ npm install @nice2dev/icons
63
+ ```
64
+
65
+ Peer dependencies: `react >= 17.0.0`, `react-dom >= 17.0.0`.
66
+
67
+ ---
68
+
69
+ ## Quick Start
70
+
71
+ ```tsx
72
+ import { NtdHome, NtdSearch, NtdHeart } from '@nice2dev/icons';
73
+
74
+ function App() {
75
+ return (
76
+ <>
77
+ {/* Solid blue home icon, large */}
78
+ <NtdHome size="lg" primaryColor="#3b82f6" />
79
+
80
+ {/* Animated search icon */}
81
+ <NtdSearch size="md" animation="pulse" />
82
+
83
+ {/* Duotone heart with custom colors */}
84
+ <NtdHeart
85
+ variant="duotone"
86
+ primaryColor="#e74c3c"
87
+ secondaryColor="#fca5a5"
88
+ animation="heartbeat"
89
+ />
90
+ </>
91
+ );
92
+ }
93
+ ```
94
+
95
+ ---
96
+
97
+ ## API Reference
98
+
99
+ ### Icon Component Props (`NtdIconProps`)
100
+
101
+ Every icon component accepts these props (extends `SVGProps<SVGSVGElement>`):
102
+
103
+ | Prop | Type | Default | Description |
104
+ |------|------|---------|-------------|
105
+ | `size` | `IconSize` | `'md'` | Named preset or pixel number |
106
+ | `variant` | `IconVariant` | `'solid'` | Rendering variant |
107
+ | `primaryColor` | `string` | `'currentColor'` | Main icon color |
108
+ | `secondaryColor` | `string` | `primaryColor` | Secondary color (duotone background) |
109
+ | `accentColor` | `string` | `'#ffffff'` | Accent color for detail elements |
110
+ | `primaryOpacity` | `number` | `1` | Opacity of primary elements (0–1) |
111
+ | `secondaryOpacity` | `number` | `0.4` | Opacity of secondary elements (0–1) |
112
+ | `accentOpacity` | `number` | `1` | Opacity of accent elements (0–1) |
113
+ | `strokeWidth` | `number` | `2` | Base stroke width for outline/duotone |
114
+ | `strokeLinecap` | `'round' \| 'square' \| 'butt'` | `'round'` | Stroke line cap style |
115
+ | `strokeLinejoin` | `'round' \| 'miter' \| 'bevel'` | `'round'` | Stroke line join style |
116
+ | `animation` | `IconAnimation` | `undefined` | CSS animation name |
117
+ | `animationDuration` | `string` | CSS default | Duration override (e.g. `'0.5s'`) |
118
+ | `gradient` | `GradientPreset` | `undefined` | Apply a gradient fill preset |
119
+ | `gradientType` | `'linear' \| 'radial'` | `'linear'` | Gradient shape |
120
+ | `gradientAngle` | `number` | `135` | Angle for linear gradients (degrees) |
121
+ | `gradientAnimation` | `'shift' \| 'spin' \| 'pulse'` | `undefined` | Animate the gradient |
122
+ | `title` | `string` | `undefined` | Accessible title for screen readers |
123
+ | `className` | `string` | `undefined` | Custom CSS class |
124
+ | `style` | `CSSProperties` | `undefined` | Inline styles |
125
+ | `ref` | `Ref<SVGSVGElement>` | — | Forward ref to the `<svg>` element |
126
+
127
+ Plus all standard `SVGProps<SVGSVGElement>` attributes (`onClick`, `id`, `data-*`, etc.).
128
+
129
+ ---
130
+
131
+ ### Size Presets (`IconSize`)
132
+
133
+ ```ts
134
+ type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'xxl' | 'xxxl' | number;
135
+ ```
136
+
137
+ | Preset | Pixels |
138
+ |--------|--------|
139
+ | `xs` | 12 |
140
+ | `sm` | 16 |
141
+ | `md` | 24 |
142
+ | `lg` | 32 |
143
+ | `xl` | 48 |
144
+ | `2xl` | 64 |
145
+ | `xxl` | 96 |
146
+ | `xxxl` | 128 |
147
+
148
+ Pass a `number` for a custom pixel size: `<NtdStar size={20} />`.
149
+
150
+ The pixel map is exported as `SIZE_MAP: Record<string, number>`.
151
+
152
+ ---
153
+
154
+ ### Variants (`IconVariant`)
155
+
156
+ ```ts
157
+ type IconVariant = 'solid' | 'outline' | 'duotone' | 'flat';
158
+ ```
159
+
160
+ | Variant | Description |
161
+ |---------|-------------|
162
+ | `solid` | Filled shapes using `fill` |
163
+ | `outline` | Stroked paths with `fill="none"` |
164
+ | `duotone` | Background shape at `secondaryOpacity` + foreground stroke |
165
+ | `flat` | Colored badge background (`secondaryColor`, rounded rect) with solid content on top |
166
+
167
+ ```tsx
168
+ <NtdHome variant="outline" primaryColor="#000" strokeWidth={1.5} />
169
+ ```
170
+
171
+ ---
172
+
173
+ ### Colors & Opacity
174
+
175
+ ```tsx
176
+ <NtdHeart
177
+ variant="duotone"
178
+ primaryColor="#e74c3c" // foreground stroke
179
+ secondaryColor="#fca5a5" // background fill
180
+ secondaryOpacity={0.3} // background opacity
181
+ accentColor="#fff" // small details
182
+ />
183
+ ```
184
+
185
+ - If `secondaryColor` is omitted, it defaults to `primaryColor`.
186
+ - If `accentColor` is omitted, it defaults to `'#ffffff'`.
187
+
188
+ ---
189
+
190
+ ### Animations (`IconAnimation`)
191
+
192
+ Apply an animation by name:
193
+
194
+ ```tsx
195
+ <NtdBell animation="shake" />
196
+ <NtdBell animation="shake" animationDuration="0.3s" />
197
+ ```
198
+
199
+ Each animation maps to a CSS class `.ntd-anim-{name}` defined in `animations.css` (auto-imported).
200
+
201
+ See [Full Animation Catalog](#full-animation-catalog) for the complete list.
202
+
203
+ ---
204
+
205
+ ### Gradient Fills
206
+
207
+ Apply gradient fills using the `gradient` prop with one of 12 built-in presets:
208
+
209
+ ```tsx
210
+ <NtdHeart gradient="sunset" />
211
+ <NtdStar gradient="ocean" gradientType="radial" />
212
+ <NtdZap gradient="neon" gradientAnimation="spin" />
213
+ <NtdGlobe gradient="aurora" gradientAngle={45} />
214
+ ```
215
+
216
+ #### Available Presets (`GradientPreset`)
217
+
218
+ | Preset | Colors |
219
+ |--------|--------|
220
+ | `sunset` | `#ff6b6b` → `#feca57` → `#ff9ff3` |
221
+ | `ocean` | `#0652DD` → `#1B9CFC` → `#38ada9` |
222
+ | `forest` | `#0a3d0a` → `#1e8449` → `#58D68D` |
223
+ | `fire` | `#e74c3c` → `#f39c12` → `#f1c40f` |
224
+ | `ice` | `#74b9ff` → `#a29bfe` → `#dfe6e9` |
225
+ | `neon` | `#6c5ce7` → `#fd79a8` → `#00cec9` |
226
+ | `gold` | `#f9ca24` → `#f0932b` → `#e17055` |
227
+ | `purple-haze` | `#6c5ce7` → `#a55eea` → `#e056a0` |
228
+ | `aurora` | `#00b894` → `#00cec9` → `#0984e3` → `#6c5ce7` |
229
+ | `midnight` | `#0c0c1d` → `#1e3a5f` → `#2c3e50` |
230
+ | `candy` | `#ff6b81` → `#ffa502` → `#2ed573` |
231
+ | `steel` | `#636e72` → `#b2bec3` → `#dfe6e9` |
232
+
233
+ Color stops are exported as `GRADIENT_PRESETS: Record<GradientPreset, readonly string[]>`.
234
+
235
+ #### Gradient Animations (`GradientAnimation`)
236
+
237
+ | Animation | Effect |
238
+ |-----------|--------|
239
+ | `shift` | Slides gradient colors horizontally |
240
+ | `spin` | Rotates the gradient around the icon center |
241
+ | `pulse` | Pulsates between stop colors |
242
+
243
+ Animations use SVG SMIL (`<animate>` / `<animateTransform>`) — no JavaScript runtime, works in all modern browsers.
244
+
245
+ ---
246
+
247
+ ### Accessibility
248
+
249
+ - When `title` is provided → `role="img"`, `aria-label={title}`, `<title>` element inside SVG
250
+ - When `title` is omitted → `aria-hidden="true"`, `role="presentation"` (decorative)
251
+
252
+ ```tsx
253
+ <NtdSearch title="Search" /> {/* accessible */}
254
+ <NtdStar /> {/* decorative, hidden from AT */}
255
+ ```
256
+
257
+ ---
258
+
259
+ ## NiceIconPicker
260
+
261
+ A fully-featured, searchable, categorized icon picker dropdown.
262
+
263
+ ```tsx
264
+ import { NiceIconPicker, type IconPickerEntry } from '@nice2dev/icons';
265
+ import { NtdHome, NtdSearch, NtdHeart } from '@nice2dev/icons';
266
+
267
+ const icons: IconPickerEntry[] = [
268
+ { name: 'NtdHome', Component: NtdHome, category: 'UI' },
269
+ { name: 'NtdSearch', Component: NtdSearch, category: 'Actions' },
270
+ { name: 'NtdHeart', Component: NtdHeart, category: 'UI' },
271
+ ];
272
+
273
+ function App() {
274
+ const [selected, setSelected] = useState<string | null>(null);
275
+
276
+ return (
277
+ <NiceIconPicker
278
+ icons={icons}
279
+ value={selected}
280
+ onChange={(name) => setSelected(name)}
281
+ variant="solid"
282
+ placeholder="Pick an icon…"
283
+ clearable
284
+ />
285
+ );
286
+ }
287
+ ```
288
+
289
+ ### IconPickerEntry
290
+
291
+ ```ts
292
+ interface IconPickerEntry {
293
+ name: string; // unique identifier (e.g. 'NtdHome')
294
+ Component: ForwardRefExoticComponent<…>; // the icon component
295
+ category: string; // grouping label
296
+ }
297
+ ```
298
+
299
+ ### NiceIconPickerProps
300
+
301
+ | Prop | Type | Default | Description |
302
+ |------|------|---------|-------------|
303
+ | `icons` | `IconPickerEntry[]` | **required** | Full icon registry |
304
+ | `value` | `string \| null` | `null` | Currently selected icon name |
305
+ | `onChange` | `(name: string \| null, entry: IconPickerEntry \| null) => void` | — | Selection callback |
306
+ | `placeholder` | `string` | `'Select icon…'` | Placeholder text |
307
+ | `variant` | `IconVariant` | `'solid'` | Variant for grid preview |
308
+ | `gridIconSize` | `IconSize \| number` | `'md'` | Icon size in the grid |
309
+ | `triggerIconSize` | `IconSize \| number` | `'sm'` | Icon size in trigger button |
310
+ | `categories` | `string[]` | auto-detected | Ordered category tab names |
311
+ | `className` | `string` | — | Additional CSS class |
312
+ | `disabled` | `boolean` | `false` | Disable the picker |
313
+ | `clearable` | `boolean` | `true` | Show "Clear selection" button |
314
+
315
+ ### NiceIconPickerHandle (imperative ref)
316
+
317
+ ```tsx
318
+ const ref = useRef<NiceIconPickerHandle>(null);
319
+ ref.current?.open(); // programmatically open
320
+ ref.current?.close(); // programmatically close
321
+ ref.current?.toggle(); // toggle open/closed
322
+ ```
323
+
324
+ ```ts
325
+ interface NiceIconPickerHandle {
326
+ open: () => void;
327
+ close: () => void;
328
+ toggle: () => void;
329
+ }
330
+ ```
331
+
332
+ ---
333
+
334
+ ## Creating Custom Icons (`createIcon`)
335
+
336
+ Build icons following the same pattern as the built-in library:
337
+
338
+ ```tsx
339
+ import { createIcon } from '@nice2dev/icons';
340
+
341
+ export const NtdMyIcon = createIcon({
342
+ displayName: 'NtdMyIcon',
343
+ viewBox: '0 0 24 24', // optional, defaults to '0 0 24 24'
344
+ paths: {
345
+ solid: ({ primaryColor }) => (
346
+ <path d="M12 2l10 20H2z" fill={primaryColor} />
347
+ ),
348
+ outline: ({ primaryColor, strokeWidth }) => (
349
+ <path d="M12 2l10 20H2z" stroke={primaryColor} strokeWidth={strokeWidth} fill="none" />
350
+ ),
351
+ duotone: ({ primaryColor, secondaryColor, secondaryOpacity, strokeWidth }) => (
352
+ <>
353
+ <path d="M12 2l10 20H2z" fill={secondaryColor} opacity={secondaryOpacity} />
354
+ <path d="M12 2l10 20H2z" stroke={primaryColor} strokeWidth={strokeWidth} fill="none" />
355
+ </>
356
+ ),
357
+ flat: ({ primaryColor, secondaryColor }) => (
358
+ <>
359
+ <rect x="2" y="2" width="20" height="20" rx="4" fill={secondaryColor} />
360
+ <path d="M12 2l10 20H2z" fill={primaryColor} />
361
+ </>
362
+ ),
363
+ },
364
+ });
365
+
366
+ // Usage — exactly like any built-in icon:
367
+ <NtdMyIcon size="lg" variant="duotone" primaryColor="#8b5cf6" animation="pulse" />
368
+ ```
369
+
370
+ ### CreateIconOptions
371
+
372
+ | Field | Type | Default | Description |
373
+ |-------|------|---------|-------------|
374
+ | `displayName` | `string` | **required** | React display name |
375
+ | `viewBox` | `string` | `'0 0 24 24'` | SVG viewBox |
376
+ | `paths.solid` | `IconPathRenderer` | **required** | Solid variant renderer |
377
+ | `paths.outline` | `IconPathRenderer` | **required** | Outline variant renderer |
378
+ | `paths.duotone` | `IconPathRenderer` | **required** | Duotone variant renderer |
379
+ | `paths.flat` | `IconPathRenderer` | **required** | Flat (badge) variant renderer |
380
+
381
+ ### IconPathRenderer
382
+
383
+ ```ts
384
+ type IconPathRenderer = (props: IconRenderProps) => React.ReactNode;
385
+ ```
386
+
387
+ ### IconRenderProps
388
+
389
+ Properties passed to every path renderer (pre-resolved from user props):
390
+
391
+ | Prop | Type | Description |
392
+ |------|------|-------------|
393
+ | `variant` | `IconVariant` | Active variant |
394
+ | `primaryColor` | `string` | Resolved primary color |
395
+ | `secondaryColor` | `string` | Resolved secondary color |
396
+ | `accentColor` | `string` | Resolved accent color |
397
+ | `primaryOpacity` | `number` | Primary opacity |
398
+ | `secondaryOpacity` | `number` | Secondary opacity |
399
+ | `accentOpacity` | `number` | Accent opacity |
400
+ | `strokeWidth` | `number` | Stroke width |
401
+ | `strokeLinecap` | `'round' \| 'square' \| 'butt'` | Stroke line cap |
402
+ | `strokeLinejoin` | `'round' \| 'miter' \| 'bevel'` | Stroke line join |
403
+
404
+ ---
405
+
406
+ ## Full Icon Catalog
407
+
408
+ ### Navigation (14 icons)
409
+ `NtdArrowUp` · `NtdArrowDown` · `NtdArrowLeft` · `NtdArrowRight` · `NtdChevronUp` · `NtdChevronDown` · `NtdChevronLeft` · `NtdChevronRight` · `NtdMenu` · `NtdClose` · `NtdMoreHorizontal` · `NtdMoreVertical` · `NtdExternalLink` · `NtdRefresh`
410
+
411
+ ### Actions (25 icons)
412
+ `NtdSearch` · `NtdEdit` · `NtdTrash` · `NtdSave` · `NtdDownload` · `NtdUpload` · `NtdShare` · `NtdCopy` · `NtdClipboard` · `NtdPlus` · `NtdMinus` · `NtdCheck` · `NtdFilter` · `NtdSort` · `NtdPrint` · `NtdZoomIn` · `NtdZoomOut` · `NtdUndo` · `NtdRedo` · `NtdLink` · `NtdSettings` · `NtdLogIn` · `NtdLogOut` · `NtdLock` · `NtdUnlock`
413
+
414
+ ### UI & Status (26 icons)
415
+ `NtdHome` · `NtdUser` · `NtdUsers` · `NtdHeart` · `NtdStar` · `NtdBell` · `NtdEye` · `NtdEyeOff` · `NtdInfo` · `NtdWarning` · `NtdError` · `NtdSuccess` · `NtdHelp` · `NtdClock` · `NtdCalendar` · `NtdTag` · `NtdBookmark` · `NtdFlag` · `NtdThumbUp` · `NtdThumbDown` · `NtdShield` · `NtdGlobe` · `NtdMap` · `NtdPin` · `NtdSun` · `NtdMoon`
416
+
417
+ ### Media & Communication (19 icons)
418
+ `NtdPlay` · `NtdPause` · `NtdStop` · `NtdSkipForward` · `NtdSkipBack` · `NtdVolume` · `NtdVolumeMute` · `NtdImage` · `NtdCamera` · `NtdVideo` · `NtdMicrophone` · `NtdMusic` · `NtdMail` · `NtdPhone` · `NtdChat` · `NtdSend` · `NtdNotification` · `NtdWifi` · `NtdBluetooth`
419
+
420
+ ### Files & Misc (31 icons)
421
+ `NtdFile` · `NtdFileText` · `NtdFolder` · `NtdFolderOpen` · `NtdArchive` · `NtdDatabase` · `NtdCloud` · `NtdCloudUpload` · `NtdCloudDownload` · `NtdTerminal` · `NtdCode` · `NtdGit` · `NtdPackage` · `NtdLayers` · `NtdGrid` · `NtdList` · `NtdTable` · `NtdSmartphone` · `NtdMonitor` · `NtdCpu` · `NtdZap` · `NtdKey` · `NtdAward` · `NtdCoffee` · `NtdCart` · `NtdCreditCard` · `NtdPieChart` · `NtdBarChart` · `NtdActivity` · `NtdTarget` · `NtdTruck`
422
+
423
+ ### Fun & Emoji (13 icons)
424
+ `NtdDumpsterFire` · `NtdRocket` · `NtdGamepad` · `NtdPuzzle` · `NtdPartyPopper` · `NtdTrophy` · `NtdCrown` · `NtdDice` · `NtdSmiley` · `NtdSad` · `NtdSkull` · `NtdGhost` · `NtdLightning`
425
+
426
+ ### Weather & Nature (20 icons)
427
+ `NtdSunrise` · `NtdSunset` · `NtdRain` · `NtdSnow` · `NtdThunderstorm` · `NtdWind` · `NtdDroplet` · `NtdThermometer` · `NtdUmbrella` · `NtdLeaf` · `NtdFlower` · `NtdTree` · `NtdMountain` · `NtdWave` · `NtdFire` · `NtdSnowflake` · `NtdCompass` · `NtdAnchor` · `NtdFeather` · `NtdBug`
428
+
429
+ ### Arrows & Shapes (22 icons)
430
+ `NtdArrowUpCircle` · `NtdArrowDownCircle` · `NtdArrowLeftCircle` · `NtdArrowRightCircle` · `NtdSquare` · `NtdCircle` · `NtdTriangle` · `NtdHexagon` · `NtdOctagon` · `NtdDiamond` · `NtdPentagon` · `NtdCross` · `NtdStar4` · `NtdCornerUpLeft` · `NtdCornerUpRight` · `NtdCornerDownLeft` · `NtdCornerDownRight` · `NtdMaximize` · `NtdMinimize` · `NtdMove` · `NtdRepeat` · `NtdShuffle`
431
+
432
+ ### Business & Finance (16 icons)
433
+ `NtdBriefcase` · `NtdDollar` · `NtdWallet` · `NtdReceipt` · `NtdBank` · `NtdTrendUp` · `NtdTrendDown` · `NtdPercent` · `NtdInvoice` · `NtdStore` · `NtdBarcode` · `NtdCalculator` · `NtdPresentation` · `NtdClipboardCheck` · `NtdPiggyBank` · `NtdCoins`
434
+
435
+ ### Social & Communication (8 icons)
436
+ `NtdAtSign` · `NtdPhoneOff` · `NtdBubble` · `NtdThumbsUp` · `NtdThumbsDown` · `NtdBellRing` · `NtdMegaphone` · `NtdQrCode`
437
+
438
+ ### Dev & Tech (9 icons)
439
+ `NtdBrackets` · `NtdServer` · `NtdGitBranch` · `NtdGitCommit` · `NtdGitMerge` · `NtdBattery` · `NtdSlash` · `NtdHash` · `NtdBugDev`
440
+
441
+ ### Food & Health (13 icons)
442
+ `NtdApple` · `NtdPizza` · `NtdGlass` · `NtdHeartPulse` · `NtdPill` · `NtdSyringe` · `NtdStethoscope` · `NtdWeight` · `NtdBandaid` · `NtdCake` · `NtdEgg` · `NtdHamburger` · `NtdDna`
443
+
444
+ ### Brand & Logo (14 icons)
445
+ `NtdNiceToDev` · `NtdNiceMonogram` · `NtdNiceOrbit` · `NtdNiceSpark` · `NtdNiceShield` · `NtdNiceBadge` · `NtdNiceCore` · `NtdNiceCrest` · `NtdNiceHelix` · `NtdNicePortal` · `NtdNicePulseMark` · `NtdNiceFlagship` · `NtdOmniVerk` · `NtdOmniVerkLogo`
446
+
447
+ ### Brand Studio (25 icons)
448
+ `NtdStudioGrid` · `NtdStudioBlueprint` · `NtdStudioCursor` · `NtdStudioPrototype` · `NtdStudioComponent` · `NtdStudioToken` · `NtdStudioPalette` · `NtdStudioBrush` · `NtdStudioPenTool` · `NtdStudioLayerStack` · `NtdStudioSpline` · `NtdStudioNodes` · `NtdStudioFlow` · `NtdStudioRelease` · `NtdStudioRocketMark` · `NtdStudioAIBrain` · `NtdStudioNeural` · `NtdStudioChipmark` · `NtdStudioTerminalMark` · `NtdStudioForge` · `NtdStudioWireframe` · `NtdStudioPersona` · `NtdStudioBenchmark` · `NtdStudioStudio` · `NtdStudioBeacon`
449
+
450
+ ### Brand Lockups (4 icons)
451
+ `NtdNiceLockupHorizontal` · `NtdNiceLockupStacked` · `NtdNiceWordmark` · `NtdNiceSymbolWordmark`
452
+
453
+ ### Brand Enterprise (18 icons)
454
+ `NtdEnterpriseRoadmap` · `NtdEnterpriseBacklog` · `NtdEnterpriseKanban` · `NtdEnterpriseSprint` · `NtdEnterpriseMilestone` · `NtdEnterprisePipeline` · `NtdEnterpriseDeploy` · `NtdEnterpriseMonitor` · `NtdEnterpriseAlert` · `NtdEnterpriseSla` · `NtdEnterpriseKpi` · `NtdEnterpriseRevenue` · `NtdEnterpriseRisk` · `NtdEnterpriseCompliance` · `NtdEnterpriseGateway` · `NtdEnterpriseDataMesh` · `NtdEnterpriseFeatureFlag` · `NtdEnterpriseWorkspace`
455
+
456
+ ---
457
+
458
+ ## Full Animation Catalog
459
+
460
+ ### Core Transforms (13)
461
+ `spin` · `spin-reverse` · `pulse` · `bounce` · `shake` · `float` · `flip` · `glow` · `wiggle` · `rubber` · `swing` · `tada` · `heartbeat`
462
+
463
+ ### Entrance Animations (22)
464
+ `fade-in` · `slide-up` · `slide-down` · `slide-left` · `slide-right` · `drop` · `rise` · `roll-in` · `materialize` · `vortex` · `meteor` · `scale-in` · `signature` · `draw-sequence` · `stroke-order` · `glow-trace` · `seal-stamp` · `reveal` · `typewriter` · `unfold` · `assemble` · `draw` · `draw-from-dot`
465
+
466
+ ### Exit Animations (3)
467
+ `scale-out` · `fold` · `dissolve`
468
+
469
+ ### Organic / Natural (10)
470
+ `breathe` · `drift` · `orbit` · `sway` · `tilt` · `rock` · `pendulum` · `levitate` · `flap` · `skate`
471
+
472
+ ### Energetic / Impact (10)
473
+ `jello` · `pop` · `squeeze` · `crush` · `stretch` · `stomp` · `snap` · `twist` · `dash` · `surge`
474
+
475
+ ### Effects / Digital (8)
476
+ `flash` · `blink` · `flicker` · `vibrate` · `tremble` · `glitch` · `neon` · `earthquake`
477
+
478
+ ### Complex Transforms (7)
479
+ `wobble` · `spiral` · `warp` · `morph` · `zoom-pulse` · `ripple` · `radar`
480
+
481
+ ### Dramatic (6)
482
+ `ping` · `implode` · `explode` · `scatter` · `rotate-x` · `draw-loop`
483
+
484
+ ---
485
+
486
+ ## CSS Theming Variables
487
+
488
+ ### Icon Picker
489
+
490
+ Override these CSS custom properties on a parent element to theme the picker:
491
+
492
+ ```css
493
+ .my-theme {
494
+ --ntd-picker-bg: #1a1a2e;
495
+ --ntd-picker-border: #333;
496
+ --ntd-picker-text: #e0e0e0;
497
+ --ntd-picker-accent: #6366f1;
498
+ --ntd-picker-hover: rgba(99, 102, 241, 0.15);
499
+ --ntd-picker-radius: 8px;
500
+ }
501
+ ```
502
+
503
+ ### Animation Classes
504
+
505
+ All animation classes follow the pattern `.ntd-anim-{name}`. You can override timing in CSS:
506
+
507
+ ```css
508
+ .ntd-anim-spin {
509
+ animation-duration: 0.5s !important;
510
+ }
511
+ ```
512
+
513
+ Or use the `animationDuration` prop inline:
514
+
515
+ ```tsx
516
+ <NtdBell animation="spin" animationDuration="0.5s" />
517
+ ```
518
+
519
+ ---
520
+
521
+ ## Tree Shaking
522
+
523
+ The library uses `sideEffects: ["*.css"]` in `package.json` and `preserveModules` in Rollup, so bundlers like webpack and vite can eliminate unused icons at build time.
524
+
525
+ ```tsx
526
+ // Only NtdHome and NtdSearch (+ CSS) end up in your bundle
527
+ import { NtdHome, NtdSearch } from '@nice2dev/icons';
528
+ ```
529
+
530
+ ---
531
+
532
+ ## Storybook
533
+
534
+ Run the interactive component explorer:
535
+
536
+ ```bash
537
+ npm run storybook # dev server on http://localhost:6006
538
+ npm run build-storybook # static build to storybook-static/
539
+ ```
540
+
541
+ Stories cover:
542
+ - **Components/Icon** — all props, variants, sizes, colors, animations
543
+ - **Components/NiceIconPicker** — controlled picker, disabled, outline variant
544
+ - **Components/Animations** — full gallery of 65+ animations
545
+ - **Guides/createIcon** — building custom icons with the factory
546
+
547
+ ---
548
+
549
+ ## Build & Development
550
+
551
+ ```bash
552
+ npm install # install dependencies
553
+ npm run build # tsc (types) + rollup (CJS + ESM)
554
+ npm run dev # rollup watch mode
555
+ npm run demo # vite dev server for the demo app
556
+ npm run demo:build # build the demo
557
+ npm run lint # eslint
558
+ npm run storybook # storybook dev
559
+ npm run build-storybook # build storybook
560
+ ```
561
+
562
+ ### Output Structure
563
+
564
+ ```
565
+ dist/
566
+ cjs/ # CommonJS modules
567
+ esm/ # ES modules
568
+ types/ # TypeScript declarations (.d.ts)
569
+ ```
570
+
571
+ Entry points in `package.json`:
572
+ - `main` → `dist/cjs/index.js`
573
+ - `module` → `dist/esm/index.js`
574
+ - `types` → `dist/types/index.d.ts`
575
+
576
+ ---
577
+
578
+ ## License
579
+
580
+ MIT © NiceToDev
581
+