@nice2dev/icons 1.3.5 → 1.3.7

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 (46) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +24 -4
  3. package/dist/cjs/NiceIconStacker.js +124 -58
  4. package/dist/cjs/client.js +5 -1
  5. package/dist/cjs/createIcon.js +2 -2
  6. package/dist/cjs/iconStack.js +113 -0
  7. package/dist/cjs/icons/actions.js +11 -4
  8. package/dist/cjs/icons/business.js +27 -17
  9. package/dist/cjs/icons/ecommerce.js +14 -4
  10. package/dist/cjs/icons/education.js +18 -11
  11. package/dist/cjs/icons/files.js +20 -12
  12. package/dist/cjs/icons/health.js +31 -15
  13. package/dist/cjs/icons/travel.js +4 -4
  14. package/dist/cjs/icons/ui.js +7 -6
  15. package/dist/cjs/icons/weather.js +4 -3
  16. package/dist/cjs/index.js +5 -1
  17. package/dist/cjs/nicetodev-icons.css +1 -1
  18. package/dist/cjs/rsc.js +1 -1
  19. package/dist/cjs/stacking.js +39 -11
  20. package/dist/esm/NiceIconStacker.js +125 -59
  21. package/dist/esm/client.js +2 -1
  22. package/dist/esm/createIcon.js +3 -3
  23. package/dist/esm/iconParts.js +1 -1
  24. package/dist/esm/iconStack.js +106 -0
  25. package/dist/esm/icons/actions.js +11 -4
  26. package/dist/esm/icons/business.js +27 -17
  27. package/dist/esm/icons/ecommerce.js +14 -4
  28. package/dist/esm/icons/education.js +18 -11
  29. package/dist/esm/icons/files.js +22 -14
  30. package/dist/esm/icons/health.js +31 -15
  31. package/dist/esm/icons/media.js +1 -1
  32. package/dist/esm/icons/travel.js +4 -4
  33. package/dist/esm/icons/ui.js +7 -6
  34. package/dist/esm/icons/weather.js +5 -4
  35. package/dist/esm/index.js +2 -1
  36. package/dist/esm/nicetodev-icons.css +1 -1
  37. package/dist/esm/rsc.js +1 -1
  38. package/dist/esm/smilAnimations.js +1 -1
  39. package/dist/esm/stacking.js +38 -12
  40. package/dist/types/NiceIconStacker.d.ts +18 -28
  41. package/dist/types/client.d.ts +4 -2
  42. package/dist/types/iconStack.d.ts +83 -0
  43. package/dist/types/index.d.ts +4 -2
  44. package/dist/types/stacking.d.ts +16 -3
  45. package/dist/types/types.d.ts +24 -5
  46. package/package.json +2 -2
@@ -203,7 +203,7 @@ export interface NtdIconProps extends Omit<SVGProps<SVGSVGElement>, 'ref'> {
203
203
  secondaryOpacity?: number;
204
204
  /** Opacity for accent/detail elements (0-1) */
205
205
  accentOpacity?: number;
206
- /** Base stroke width for outline / duotone icons (default 2) */
206
+ /** Base stroke width for outline / duotone icons (default 1) */
207
207
  strokeWidth?: number;
208
208
  /** Stroke line cap style (default 'round') */
209
209
  strokeLinecap?: 'round' | 'square' | 'butt';
@@ -271,7 +271,8 @@ export interface NtdIconProps extends Omit<SVGProps<SVGSVGElement>, 'ref'> {
271
271
  transformOrigin?: string;
272
272
  /**
273
273
  * Where this icon sits when it is a child of another icon (1.3.5):
274
- * `<NtdSquare><NtdStar stackAlign="top-right" /></NtdSquare>`. Default `'center'`. Text children
274
+ * `<NtdSquare><NtdStar stackAlign="top-right" /></NtdSquare>`. Default `'center'`; `half-…`
275
+ * positions sit halfway from the centre to that edge or corner (1.3.6). Text children
275
276
  * (`<NtdStar>1</NtdStar>`) are centred on the icon.
276
277
  */
277
278
  stackAlign?: IconStackAlign;
@@ -285,16 +286,34 @@ export interface NtdIconProps extends Omit<SVGProps<SVGSVGElement>, 'ref'> {
285
286
  * as a cut), primary on `outline` / `wireframe`.
286
287
  */
287
288
  textColor?: string;
288
- /** Font size of text children in the 24-unit box (1.3.5). Default by length: 12, 10, 8, 6.5. */
289
+ /**
290
+ * Font size of text children in the 24-unit box (1.3.5). Default by length: 9, 7.5, 6, 5 (1.3.6;
291
+ * it was 12, 10, 8, 6.5).
292
+ */
289
293
  textSize?: number;
294
+ /**
295
+ * Turns this icon, when stacked in another, about its own centre — degrees, clockwise (1.3.6).
296
+ * Its own contents and text turn with it.
297
+ */
298
+ stackRotation?: number;
299
+ /**
300
+ * Moves this icon, when stacked in another, from where `stackAlign` puts it — in percent of the
301
+ * parent icon's width, positive to the right (1.3.7). `10` = a tenth of the parent across.
302
+ */
303
+ stackOffsetX?: number;
304
+ /**
305
+ * Moves this icon, when stacked in another, from where `stackAlign` puts it — in percent of the
306
+ * parent icon's height, positive downwards (1.3.7).
307
+ */
308
+ stackOffsetY?: number;
290
309
  /** Accessible title for screen readers */
291
310
  title?: string;
292
311
  }
293
312
  /**
294
313
  * Where a stacked icon sits inside the icon it is a child of — the centre, an edge or a corner
295
- * (1.3.5).
314
+ * (1.3.5), or halfway from the centre to one (`half-…`, 1.3.6).
296
315
  */
297
- export type IconStackAlign = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
316
+ export type IconStackAlign = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'half-top' | 'half-bottom' | 'half-left' | 'half-right' | 'half-top-left' | 'half-top-right' | 'half-bottom-left' | 'half-bottom-right';
298
317
  /**
299
318
  * Props received by icon path renderer functions inside {@link CreateIconOptions.paths}.
300
319
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice2dev/icons",
3
- "version": "1.3.5",
3
+ "version": "1.3.7",
4
4
  "description": "Beautiful, lightweight, multi-color SVG icon library for React with animations",
5
5
  "author": "NiceToDev <contact@nicetodev.com>",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -109,7 +109,7 @@
109
109
  },
110
110
  "devDependencies": {
111
111
  "@chromatic-com/storybook": "^5.3.1",
112
- "@nice2dev/ui-core": "^1.3.5",
112
+ "@nice2dev/ui-core": "^1.3.7",
113
113
  "@rollup/plugin-commonjs": "^29.0.3",
114
114
  "@rollup/plugin-node-resolve": "^16.0.3",
115
115
  "@rollup/plugin-typescript": "^12.3.0",