@nice2dev/icons 1.4.1 → 1.4.3

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 (90) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/cjs/NiceIconStacker.js +36 -2
  3. package/dist/cjs/createIcon.js +25 -6
  4. package/dist/cjs/iconParts.js +33 -12
  5. package/dist/cjs/iconValue.js +6 -1
  6. package/dist/cjs/icons/actions.js +86 -122
  7. package/dist/cjs/icons/ai.js +0 -178
  8. package/dist/cjs/icons/business.js +172 -120
  9. package/dist/cjs/icons/ecommerce.js +18 -74
  10. package/dist/cjs/icons/education.js +235 -487
  11. package/dist/cjs/icons/files.js +193 -461
  12. package/dist/cjs/icons/fintech.js +38 -74
  13. package/dist/cjs/icons/food.js +117 -194
  14. package/dist/cjs/icons/fun.js +176 -57
  15. package/dist/cjs/icons/gaming.js +2 -2
  16. package/dist/cjs/icons/health.js +1 -1
  17. package/dist/cjs/icons/index.js +32 -10
  18. package/dist/cjs/icons/legal.js +1 -109
  19. package/dist/cjs/icons/media.js +67 -8
  20. package/dist/cjs/icons/navigation.js +4 -4
  21. package/dist/cjs/icons/omniverk.js +14 -6
  22. package/dist/cjs/icons/realestate.js +99 -98
  23. package/dist/cjs/icons/roman.js +111 -0
  24. package/dist/cjs/icons/science.js +74 -165
  25. package/dist/cjs/icons/shapes.js +58 -39
  26. package/dist/cjs/icons/smarthome.js +18 -16
  27. package/dist/cjs/icons/social.js +22 -20
  28. package/dist/cjs/icons/sports.js +89 -159
  29. package/dist/cjs/icons/sustainability.js +26 -48
  30. package/dist/cjs/icons/travel.js +209 -477
  31. package/dist/cjs/icons/ui.js +140 -240
  32. package/dist/cjs/icons/weather.js +30 -56
  33. package/dist/cjs/index.js +67 -43
  34. package/dist/cjs/stackedIcon.js +19 -0
  35. package/dist/cjs/stacking.js +104 -2
  36. package/dist/esm/NiceIconStacker.js +37 -3
  37. package/dist/esm/createIcon.js +27 -8
  38. package/dist/esm/iconParts.js +33 -12
  39. package/dist/esm/iconValue.js +6 -1
  40. package/dist/esm/icons/actions.js +86 -122
  41. package/dist/esm/icons/ai.js +0 -178
  42. package/dist/esm/icons/business.js +172 -120
  43. package/dist/esm/icons/ecommerce.js +18 -74
  44. package/dist/esm/icons/education.js +236 -488
  45. package/dist/esm/icons/files.js +193 -461
  46. package/dist/esm/icons/fintech.js +38 -74
  47. package/dist/esm/icons/food.js +118 -195
  48. package/dist/esm/icons/fun.js +179 -60
  49. package/dist/esm/icons/gaming.js +2 -2
  50. package/dist/esm/icons/health.js +1 -1
  51. package/dist/esm/icons/index.js +43 -21
  52. package/dist/esm/icons/legal.js +1 -109
  53. package/dist/esm/icons/media.js +67 -8
  54. package/dist/esm/icons/navigation.js +4 -4
  55. package/dist/esm/icons/omniverk.js +15 -7
  56. package/dist/esm/icons/realestate.js +100 -99
  57. package/dist/esm/icons/roman.js +111 -0
  58. package/dist/esm/icons/science.js +74 -165
  59. package/dist/esm/icons/shapes.js +58 -39
  60. package/dist/esm/icons/smarthome.js +18 -16
  61. package/dist/esm/icons/social.js +22 -20
  62. package/dist/esm/icons/sports.js +89 -159
  63. package/dist/esm/icons/sustainability.js +26 -48
  64. package/dist/esm/icons/travel.js +209 -477
  65. package/dist/esm/icons/ui.js +140 -240
  66. package/dist/esm/icons/weather.js +30 -56
  67. package/dist/esm/index.js +45 -21
  68. package/dist/esm/nicetodev-icons.css +1 -1
  69. package/dist/esm/stackedIcon.js +19 -0
  70. package/dist/esm/stacking.js +105 -3
  71. package/dist/types/createIcon.d.ts +14 -1
  72. package/dist/types/iconParts.d.ts +9 -6
  73. package/dist/types/icons/ai.d.ts +0 -4
  74. package/dist/types/icons/business.d.ts +1 -0
  75. package/dist/types/icons/education.d.ts +2 -4
  76. package/dist/types/icons/files.d.ts +3 -1
  77. package/dist/types/icons/fintech.d.ts +1 -1
  78. package/dist/types/icons/fun.d.ts +23 -0
  79. package/dist/types/icons/index.d.ts +14 -12
  80. package/dist/types/icons/legal.d.ts +0 -2
  81. package/dist/types/icons/media.d.ts +1 -0
  82. package/dist/types/icons/realestate.d.ts +17 -1
  83. package/dist/types/icons/roman.d.ts +76 -0
  84. package/dist/types/icons/science.d.ts +0 -2
  85. package/dist/types/icons/ui.d.ts +6 -1
  86. package/dist/types/index.d.ts +2 -1
  87. package/dist/types/stackedIcon.d.ts +11 -0
  88. package/dist/types/stacking.d.ts +48 -1
  89. package/dist/types/types.d.ts +17 -2
  90. package/package.json +2 -2
package/dist/cjs/index.js CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  ;/* empty css */
4
4
  const types = require("./types.js");
5
5
  const createIcon = require("./createIcon.js");
6
+ const stackedIcon = require("./stackedIcon.js");
6
7
  const smilAnimations = require("./smilAnimations.js");
7
8
  const NiceIconPicker = require("./NiceIconPicker.js");
8
9
  const NiceIconValue = require("./NiceIconValue.js");
@@ -34,7 +35,6 @@ const devtech = require("./icons/devtech.js");
34
35
  const saas = require("./icons/saas.js");
35
36
  const accessibility = require("./icons/accessibility.js");
36
37
  const files = require("./icons/files.js");
37
- const ui = require("./icons/ui.js");
38
38
  const fintech = require("./icons/fintech.js");
39
39
  const omniverk = require("./icons/omniverk.js");
40
40
  const weather = require("./icons/weather.js");
@@ -46,6 +46,7 @@ const social = require("./icons/social.js");
46
46
  const science = require("./icons/science.js");
47
47
  const legal = require("./icons/legal.js");
48
48
  const education = require("./icons/education.js");
49
+ const ui = require("./icons/ui.js");
49
50
  const business = require("./icons/business.js");
50
51
  const sports = require("./icons/sports.js");
51
52
  const travel = require("./icons/travel.js");
@@ -59,11 +60,13 @@ const gaming = require("./icons/gaming.js");
59
60
  const smarthome = require("./icons/smarthome.js");
60
61
  const input = require("./icons/input.js");
61
62
  const brand = require("./icons/brand.js");
63
+ const roman = require("./icons/roman.js");
62
64
  exports.GRADIENT_PRESETS = types.GRADIENT_PRESETS;
63
65
  exports.SEMANTIC_COLOR_DEFAULTS = types.SEMANTIC_COLOR_DEFAULTS;
64
66
  exports.SEMANTIC_COLOR_VARS = types.SEMANTIC_COLOR_VARS;
65
67
  exports.SIZE_MAP = types.SIZE_MAP;
66
68
  exports.createIcon = createIcon.createIcon;
69
+ exports.stackedIcon = stackedIcon.stackedIcon;
67
70
  exports.NiceSmilAnimationWrapper = smilAnimations.SmilAnimationWrapper;
68
71
  exports.SMIL_ANIMATION_TYPES = smilAnimations.SMIL_ANIMATION_TYPES;
69
72
  exports.SmilAnimationWrapper = smilAnimations.SmilAnimationWrapper;
@@ -195,10 +198,8 @@ exports.NtdBrain = ai.NtdBrain;
195
198
  exports.NtdChatbot = ai.NtdChatbot;
196
199
  exports.NtdDataset = ai.NtdDataset;
197
200
  exports.NtdDeepLearning = ai.NtdDeepLearning;
198
- exports.NtdGradient = ai.NtdGradient;
199
201
  exports.NtdInference = ai.NtdInference;
200
202
  exports.NtdMagicWand = ai.NtdMagicWand;
201
- exports.NtdModel = ai.NtdModel;
202
203
  exports.NtdNeuralNetwork = ai.NtdNeuralNetwork;
203
204
  exports.NtdPrompt = ai.NtdPrompt;
204
205
  exports.NtdRobot = ai.NtdRobot;
@@ -279,7 +280,6 @@ exports.NtdCloud = files.NtdCloud;
279
280
  exports.NtdCloudDownload = files.NtdCloudDownload;
280
281
  exports.NtdCloudUpload = files.NtdCloudUpload;
281
282
  exports.NtdCode = files.NtdCode;
282
- exports.NtdCoffee = files.NtdCoffee;
283
283
  exports.NtdCpu = files.NtdCpu;
284
284
  exports.NtdCreditCard = files.NtdCreditCard;
285
285
  exports.NtdDatabase = files.NtdDatabase;
@@ -298,42 +298,10 @@ exports.NtdPieChart = files.NtdPieChart;
298
298
  exports.NtdShoppingCart = files.NtdShoppingCart;
299
299
  exports.NtdSmartphone = files.NtdSmartphone;
300
300
  exports.NtdTable = files.NtdTable;
301
+ exports.NtdTablet = files.NtdTablet;
301
302
  exports.NtdTarget = files.NtdTarget;
302
303
  exports.NtdTerminal = files.NtdTerminal;
303
304
  exports.NtdTruck = files.NtdTruck;
304
- exports.NtdAdmin = ui.NtdAdmin;
305
- exports.NtdBackspace = ui.NtdBackspace;
306
- exports.NtdBell = ui.NtdBell;
307
- exports.NtdBookmark = ui.NtdBookmark;
308
- exports.NtdCalendar = ui.NtdCalendar;
309
- exports.NtdClock = ui.NtdClock;
310
- exports.NtdCursor = ui.NtdCursor;
311
- exports.NtdError = ui.NtdError;
312
- exports.NtdEye = ui.NtdEye;
313
- exports.NtdEyeOff = ui.NtdEyeOff;
314
- exports.NtdFlag = ui.NtdFlag;
315
- exports.NtdGlobe = ui.NtdGlobe;
316
- exports.NtdHeart = ui.NtdHeart;
317
- exports.NtdHelp = ui.NtdHelp;
318
- exports.NtdHome = ui.NtdHome;
319
- exports.NtdHourglass = ui.NtdHourglass;
320
- exports.NtdInfo = ui.NtdInfo;
321
- exports.NtdMap = ui.NtdMap;
322
- exports.NtdMapPin = ui.NtdMapPin;
323
- exports.NtdMoon = ui.NtdMoon;
324
- exports.NtdPin = ui.NtdPin;
325
- exports.NtdShield = ui.NtdShield;
326
- exports.NtdStar = ui.NtdStar;
327
- exports.NtdSuccess = ui.NtdSuccess;
328
- exports.NtdSun = ui.NtdSun;
329
- exports.NtdTag = ui.NtdTag;
330
- exports.NtdThumbDown = ui.NtdThumbDown;
331
- exports.NtdThumbUp = ui.NtdThumbUp;
332
- exports.NtdUser = ui.NtdUser;
333
- exports.NtdUsers = ui.NtdUsers;
334
- exports.NtdWarning = ui.NtdWarning;
335
- exports.NtdWireframe = ui.NtdWireframe;
336
- exports.NtdWishlist = ui.NtdWishlist;
337
305
  exports.NtdAirdrop = fintech.NtdAirdrop;
338
306
  exports.NtdBitcoin = fintech.NtdBitcoin;
339
307
  exports.NtdBlockchain = fintech.NtdBlockchain;
@@ -341,7 +309,7 @@ exports.NtdCryptoWallet = fintech.NtdCryptoWallet;
341
309
  exports.NtdDeFi = fintech.NtdDeFi;
342
310
  exports.NtdEthereum = fintech.NtdEthereum;
343
311
  exports.NtdExchange = fintech.NtdExchange;
344
- exports.NtdGasFee = fintech.NtdGasFee;
312
+ exports.NtdGasPump = fintech.NtdGasPump;
345
313
  exports.NtdLedger = fintech.NtdLedger;
346
314
  exports.NtdMining = fintech.NtdMining;
347
315
  exports.NtdNFT = fintech.NtdNFT;
@@ -421,11 +389,16 @@ exports.NtdMortgage = realestate.NtdMortgage;
421
389
  exports.NtdOfficeBuilding = realestate.NtdOfficeBuilding;
422
390
  exports.NtdPool = realestate.NtdPool;
423
391
  exports.NtdShelfRack = realestate.NtdShelfRack;
392
+ exports.NtdShelfRackFull = realestate.NtdShelfRackFull;
393
+ exports.NtdShelfRackHalf = realestate.NtdShelfRackHalf;
394
+ exports.NtdShelfRackQuarter = realestate.NtdShelfRackQuarter;
395
+ exports.NtdShelfRackThreeQuarters = realestate.NtdShelfRackThreeQuarters;
424
396
  exports.NtdSold = realestate.NtdSold;
425
397
  exports.NtdSquareMeters = realestate.NtdSquareMeters;
426
398
  exports.NtdVilla = realestate.NtdVilla;
427
399
  exports.NtdWarehouse = realestate.NtdWarehouse;
428
400
  exports.realestateIcons = realestate.realestateIcons;
401
+ exports.shelfRackIconFor = realestate.shelfRackIconFor;
429
402
  exports.NtdApple = health.NtdApple;
430
403
  exports.NtdBandaid = health.NtdBandaid;
431
404
  exports.NtdCake = health.NtdCake;
@@ -463,7 +436,6 @@ exports.NtdThumbsDown = social.NtdThumbsDown;
463
436
  exports.NtdThumbsUp = social.NtdThumbsUp;
464
437
  exports.NtdAtom = science.NtdAtom;
465
438
  exports.NtdBeaker = science.NtdBeaker;
466
- exports.NtdDnaScience = science.NtdDna;
467
439
  exports.NtdExperiment = science.NtdExperiment;
468
440
  exports.NtdFlask = science.NtdFlask;
469
441
  exports.NtdHypothesis = science.NtdHypothesis;
@@ -482,7 +454,6 @@ exports.NtdTestTube = science.NtdTestTube;
482
454
  exports.scienceIcons = science.scienceIcons;
483
455
  exports.NtdAudit = legal.NtdAudit;
484
456
  exports.NtdCcpa = legal.NtdCcpa;
485
- exports.NtdCertified = legal.NtdCertified;
486
457
  exports.NtdCompliance = legal.NtdCompliance;
487
458
  exports.NtdContract = legal.NtdContract;
488
459
  exports.NtdCookieConsent = legal.NtdCookieConsent;
@@ -499,8 +470,6 @@ exports.NtdBook = education.NtdBook;
499
470
  exports.NtdBookBookmark = education.NtdBookBookmark;
500
471
  exports.NtdCalculatorEdu = education.NtdCalculator;
501
472
  exports.NtdCertificate = education.NtdCertificate;
502
- exports.NtdDiploma = education.NtdDiploma;
503
- exports.NtdExam = education.NtdExam;
504
473
  exports.NtdFlashcard = education.NtdFlashcard;
505
474
  exports.NtdGraduationCap = education.NtdGraduationCap;
506
475
  exports.NtdNotebook = education.NtdNotebook;
@@ -510,9 +479,46 @@ exports.NtdPen = education.NtdPen;
510
479
  exports.NtdPencil = education.NtdPencil;
511
480
  exports.NtdQuiz = education.NtdQuiz;
512
481
  exports.NtdSchool = education.NtdSchool;
482
+ exports.NtdScroll = education.NtdScroll;
483
+ exports.NtdScrollRolled = education.NtdScrollRolled;
513
484
  exports.NtdUniversity = education.NtdUniversity;
514
485
  exports.NtdWebinar = education.NtdWebinar;
515
486
  exports.educationIcons = education.educationIcons;
487
+ exports.NtdBackspace = ui.NtdBackspace;
488
+ exports.NtdBell = ui.NtdBell;
489
+ exports.NtdBookmark = ui.NtdBookmark;
490
+ exports.NtdCalendar = ui.NtdCalendar;
491
+ exports.NtdCalendarDay = ui.NtdCalendarDay;
492
+ exports.NtdCalendarWeek = ui.NtdCalendarWeek;
493
+ exports.NtdClock = ui.NtdClock;
494
+ exports.NtdCursor = ui.NtdCursor;
495
+ exports.NtdError = ui.NtdError;
496
+ exports.NtdEye = ui.NtdEye;
497
+ exports.NtdEyeOff = ui.NtdEyeOff;
498
+ exports.NtdFlag = ui.NtdFlag;
499
+ exports.NtdGlobe = ui.NtdGlobe;
500
+ exports.NtdHeart = ui.NtdHeart;
501
+ exports.NtdHelp = ui.NtdHelp;
502
+ exports.NtdHome = ui.NtdHome;
503
+ exports.NtdHourglass = ui.NtdHourglass;
504
+ exports.NtdInfo = ui.NtdInfo;
505
+ exports.NtdMap = ui.NtdMap;
506
+ exports.NtdMapPin = ui.NtdMapPin;
507
+ exports.NtdMoon = ui.NtdMoon;
508
+ exports.NtdPin = ui.NtdPin;
509
+ exports.NtdShield = ui.NtdShield;
510
+ exports.NtdStar = ui.NtdStar;
511
+ exports.NtdSuccess = ui.NtdSuccess;
512
+ exports.NtdSun = ui.NtdSun;
513
+ exports.NtdTag = ui.NtdTag;
514
+ exports.NtdThumbDown = ui.NtdThumbDown;
515
+ exports.NtdThumbUp = ui.NtdThumbUp;
516
+ exports.NtdUser = ui.NtdUser;
517
+ exports.NtdUserTie = ui.NtdUserTie;
518
+ exports.NtdUsers = ui.NtdUsers;
519
+ exports.NtdWarning = ui.NtdWarning;
520
+ exports.NtdWireframe = ui.NtdWireframe;
521
+ exports.NtdWishlist = ui.NtdWishlist;
516
522
  exports.NtdBank = business.NtdBank;
517
523
  exports.NtdBarcode = business.NtdBarcode;
518
524
  exports.NtdBriefcase = business.NtdBriefcase;
@@ -525,6 +531,7 @@ exports.NtdDollar = business.NtdDollar;
525
531
  exports.NtdInvoice = business.NtdInvoice;
526
532
  exports.NtdInvoiceDoc = business.NtdInvoiceDoc;
527
533
  exports.NtdKanban = business.NtdKanban;
534
+ exports.NtdMarket = business.NtdMarket;
528
535
  exports.NtdMilestone = business.NtdMilestone;
529
536
  exports.NtdPercent = business.NtdPercent;
530
537
  exports.NtdPiggyBank = business.NtdPiggyBank;
@@ -569,7 +576,7 @@ exports.NtdBeer = food.NtdBeer;
569
576
  exports.NtdBurger = food.NtdBurger;
570
577
  exports.NtdChefHat = food.NtdChefHat;
571
578
  exports.NtdCocktail = food.NtdCocktail;
572
- exports.NtdCoffeeFood = food.NtdCoffee;
579
+ exports.NtdCoffee = food.NtdCoffee;
573
580
  exports.NtdCookingPan = food.NtdCookingPan;
574
581
  exports.NtdForkKnife = food.NtdForkKnife;
575
582
  exports.NtdHotdog = food.NtdHotdog;
@@ -601,6 +608,7 @@ exports.NtdBluetooth = media.NtdBluetooth;
601
608
  exports.NtdBrush = media.NtdBrush;
602
609
  exports.NtdCamera = media.NtdCamera;
603
610
  exports.NtdChat = media.NtdChat;
611
+ exports.NtdEyeDropper = media.NtdEyeDropper;
604
612
  exports.NtdImage = media.NtdImage;
605
613
  exports.NtdInbox = media.NtdInbox;
606
614
  exports.NtdMail = media.NtdMail;
@@ -667,6 +675,12 @@ exports.NtdZoomIn = actions.NtdZoomIn;
667
675
  exports.NtdZoomOut = actions.NtdZoomOut;
668
676
  exports.NtdCrown = fun.NtdCrown;
669
677
  exports.NtdDice = fun.NtdDice;
678
+ exports.NtdDicePips1 = fun.NtdDicePips1;
679
+ exports.NtdDicePips2 = fun.NtdDicePips2;
680
+ exports.NtdDicePips3 = fun.NtdDicePips3;
681
+ exports.NtdDicePips4 = fun.NtdDicePips4;
682
+ exports.NtdDicePips5 = fun.NtdDicePips5;
683
+ exports.NtdDicePips6 = fun.NtdDicePips6;
670
684
  exports.NtdDumpsterFire = fun.NtdDumpsterFire;
671
685
  exports.NtdGamepadOldschool = fun.NtdGamepadOldschool;
672
686
  exports.NtdGhost = fun.NtdGhost;
@@ -680,6 +694,7 @@ exports.NtdSmile = fun.NtdSmile;
680
694
  exports.NtdSmiley = fun.NtdSmiley;
681
695
  exports.NtdTrophy = fun.NtdTrophy;
682
696
  exports.NtdZap = fun.NtdZap;
697
+ exports.dicePipsIconFor = fun.dicePipsIconFor;
683
698
  exports.NtdDiceGaming = gaming.NtdDice;
684
699
  exports.NtdDiscord = gaming.NtdDiscord;
685
700
  exports.NtdGamepad = gaming.NtdGamepad;
@@ -758,3 +773,12 @@ exports.NtdRemoteOk = input.NtdRemoteOk;
758
773
  exports.NtdNiceToDev = brand.NtdNiceToDev;
759
774
  exports.NtdOmniVerk = brand.NtdOmniVerk;
760
775
  exports.NtdOmniVerkAnimated = brand.NtdOmniVerkAnimated;
776
+ exports.NtdRomanC = roman.NtdRomanC;
777
+ exports.NtdRomanD = roman.NtdRomanD;
778
+ exports.NtdRomanI = roman.NtdRomanI;
779
+ exports.NtdRomanL = roman.NtdRomanL;
780
+ exports.NtdRomanM = roman.NtdRomanM;
781
+ exports.NtdRomanV = roman.NtdRomanV;
782
+ exports.NtdRomanX = roman.NtdRomanX;
783
+ exports.romanNumeralIcons = roman.romanNumeralIcons;
784
+ exports.toRomanNumeral = roman.toRomanNumeral;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const React = require("react");
5
+ const stacking = require("./stacking.js");
6
+ function stackedIcon(displayName, base, layers) {
7
+ const Base = base;
8
+ const Icon = React.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(Base, { ref, ...props, children: [
9
+ layers,
10
+ children
11
+ ] }));
12
+ Icon.displayName = displayName;
13
+ const marks = Icon;
14
+ marks[stacking.NTD_ICON_MARK] = true;
15
+ marks[stacking.PERFECT_STACK] = stacking.perfectStackOf(base);
16
+ marks[stacking.SERIES_WIDTH] = stacking.seriesWidthOf(base);
17
+ return Icon;
18
+ }
19
+ exports.stackedIcon = stackedIcon;
@@ -16,7 +16,7 @@ function isFilledVariant(variant) {
16
16
  return !LINE_VARIANTS.has(variant);
17
17
  }
18
18
  function defaultStackSize(align) {
19
- return align === "center" ? 0.6 : 0.5;
19
+ return isSeriesAlign(align) ? 1 : align === "center" ? 0.6 : 0.5;
20
20
  }
21
21
  function stackPlacement(align, size) {
22
22
  const far = 24 - size;
@@ -46,12 +46,15 @@ function renderStackChildren(children, ctx) {
46
46
  return null;
47
47
  }
48
48
  const cutout = ctx.variant === "cutout";
49
- const filled = isFilledVariant(ctx.variant);
49
+ const filled = isFilledVariant(ctx.variant) && (!ctx.perfect.filled || ctx.perfect.filled.includes(ctx.variant));
50
50
  const insidePrimary = cutout ? ctx.tileColor : filled ? ctx.accentColor : ctx.primaryColor;
51
51
  const insideAccent = filled && !cutout ? ctx.primaryColor : ctx.accentColor;
52
52
  const text = items.filter((c) => typeof c === "string" || typeof c === "number").join("");
53
53
  const { perfect } = ctx;
54
54
  const layers = items.map((child, i) => {
55
+ if (isNtdIconElement(child) && isSeriesAlign(child.props.stackAlign)) {
56
+ return null;
57
+ }
55
58
  if (isNtdIconElement(child)) {
56
59
  const p = child.props;
57
60
  const align = p.stackAlign ?? "perfect";
@@ -106,15 +109,114 @@ function renderStackChildren(children, ctx) {
106
109
  ] });
107
110
  return cutout ? /* @__PURE__ */ jsxRuntime.jsx("g", { transform: CUTOUT_SHAPE, children: content }) : content;
108
111
  }
112
+ function isSeriesAlign(align) {
113
+ return typeof align === "string" && align.startsWith("next-");
114
+ }
115
+ const SERIES_WIDTH = "seriesWidth";
116
+ function seriesWidthOf(icon) {
117
+ const w = icon && (typeof icon === "object" || typeof icon === "function") ? icon[SERIES_WIDTH] : void 0;
118
+ return typeof w === "number" && w > 0 ? w : 24;
119
+ }
120
+ function layoutStackSeries(children, parentWidth = 24) {
121
+ const series = React.Children.toArray(children).filter(
122
+ (c) => isNtdIconElement(c) && isSeriesAlign(c.props.stackAlign)
123
+ );
124
+ if (series.length === 0) {
125
+ return null;
126
+ }
127
+ const bearing = (24 - parentWidth) / 2;
128
+ let right = 12 + parentWidth / 2;
129
+ let left = 12 - parentWidth / 2;
130
+ let down = 24;
131
+ let up = 0;
132
+ const items = series.map((child) => {
133
+ const p = child.props;
134
+ const scale = p.stackSize ?? 1;
135
+ const size = thousandth(24 * scale);
136
+ const advance = thousandth(seriesWidthOf(child.type) * scale);
137
+ let x;
138
+ let y;
139
+ switch (p.stackAlign) {
140
+ case "next-left":
141
+ left -= advance;
142
+ x = left - (size - advance) / 2;
143
+ y = 12 - size / 2;
144
+ break;
145
+ case "next-up":
146
+ up -= size;
147
+ x = 12 - size / 2;
148
+ y = up;
149
+ break;
150
+ case "next-down":
151
+ x = 12 - size / 2;
152
+ y = down;
153
+ down += size;
154
+ break;
155
+ default:
156
+ x = right - (size - advance) / 2;
157
+ y = 12 - size / 2;
158
+ right += advance;
159
+ }
160
+ return {
161
+ child,
162
+ x: stackOffset(thousandth(x), p.stackOffsetX),
163
+ y: stackOffset(thousandth(y), p.stackOffsetY),
164
+ size
165
+ };
166
+ });
167
+ const across = series.some(
168
+ (c) => c.props.stackAlign === "next-left" || c.props.stackAlign === "next-right"
169
+ );
170
+ let minX = across ? left - bearing : 0;
171
+ let maxX = across ? right + bearing : 24;
172
+ let minY = up;
173
+ let maxY = down;
174
+ for (const { child, x, y, size } of items) {
175
+ if (child.props.stackAlign === "next-left" || child.props.stackAlign === "next-right") {
176
+ minY = Math.min(minY, y);
177
+ maxY = Math.max(maxY, y + size);
178
+ } else {
179
+ minX = Math.min(minX, x);
180
+ maxX = Math.max(maxX, x + size);
181
+ }
182
+ }
183
+ return {
184
+ items,
185
+ box: [thousandth(minX), thousandth(minY), thousandth(maxX - minX), thousandth(maxY - minY)]
186
+ };
187
+ }
188
+ function renderStackSeries(layout, ctx) {
189
+ return layout.items.map(({ child, x, y, size }, i) => {
190
+ const p = child.props;
191
+ const icon = React.cloneElement(child, {
192
+ key: child.key ?? `series-${i}`,
193
+ x,
194
+ y,
195
+ size,
196
+ variant: p.variant ?? ctx.variant,
197
+ primaryColor: p.primaryColor ?? ctx.primaryColor,
198
+ secondaryColor: p.secondaryColor ?? ctx.secondaryColor,
199
+ accentColor: p.accentColor ?? ctx.accentColor,
200
+ strokeWidth: p.strokeWidth ?? ctx.strokeWidth
201
+ });
202
+ const turn = p.stackRotation ? `rotate(${p.stackRotation} ${x + size / 2} ${y + size / 2})` : void 0;
203
+ return turn ? /* @__PURE__ */ jsxRuntime.jsx("g", { transform: turn, children: icon }, child.key ?? `series-${i}`) : icon;
204
+ });
205
+ }
109
206
  exports.BOX_PERFECT_STACK = BOX_PERFECT_STACK;
110
207
  exports.NTD_ICON_MARK = NTD_ICON_MARK;
111
208
  exports.PERFECT_STACK = PERFECT_STACK;
209
+ exports.SERIES_WIDTH = SERIES_WIDTH;
112
210
  exports.defaultStackSize = defaultStackSize;
113
211
  exports.defaultTextSize = defaultTextSize;
114
212
  exports.isCornerBadge = isCornerBadge;
115
213
  exports.isFilledVariant = isFilledVariant;
116
214
  exports.isNtdIconElement = isNtdIconElement;
215
+ exports.isSeriesAlign = isSeriesAlign;
216
+ exports.layoutStackSeries = layoutStackSeries;
117
217
  exports.perfectStackOf = perfectStackOf;
118
218
  exports.renderStackChildren = renderStackChildren;
219
+ exports.renderStackSeries = renderStackSeries;
220
+ exports.seriesWidthOf = seriesWidthOf;
119
221
  exports.stackOffset = stackOffset;
120
222
  exports.stackPlacement = stackPlacement;
@@ -2,7 +2,7 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { useNiceTranslation, useControllableState, useRovingFocus } from "@nice2dev/ui-core";
3
3
  import React, { forwardRef, useState, useRef, useCallback, useMemo, useImperativeHandle } from "react";
4
4
  import { NtdPlus, NtdTrash, NtdCheck, NtdCopy } from "./icons/actions.js";
5
- import { NtdClose } from "./icons/navigation.js";
5
+ import { NtdClose, NtdArrowLeft, NtdArrowUp, NtdArrowDown, NtdArrowRight } from "./icons/navigation.js";
6
6
  import { niceIconStackCode, iconDisplayName, stackParentId, stackChildrenOf, isValidTextBinding, renderIconStack, addStackLayer, removeStackLayer } from "./iconStack.js";
7
7
  import { perfectStackOf, BOX_PERFECT_STACK, defaultStackSize, defaultTextSize } from "./stacking.js";
8
8
  /* empty css */
@@ -25,6 +25,12 @@ const PAD = [
25
25
  { align: "bottom", row: 5, col: 3 },
26
26
  { align: "bottom-right", row: 5, col: 5 }
27
27
  ];
28
+ const SERIES = [
29
+ { align: "next-left", Arrow: NtdArrowLeft },
30
+ { align: "next-up", Arrow: NtdArrowUp },
31
+ { align: "next-down", Arrow: NtdArrowDown },
32
+ { align: "next-right", Arrow: NtdArrowRight }
33
+ ];
28
34
  function alignNames(t) {
29
35
  return {
30
36
  perfect: t("iconStacker.align.perfect", "Auto"),
@@ -50,7 +56,11 @@ function alignNames(t) {
50
56
  "half-bottom-right": t(
51
57
  "iconStacker.align.half-bottom-right",
52
58
  "Halfway to the bottom-right corner"
53
- )
59
+ ),
60
+ "next-right": t("iconStacker.align.next-right", "Next, to the right"),
61
+ "next-left": t("iconStacker.align.next-left", "Next, to the left"),
62
+ "next-up": t("iconStacker.align.next-up", "Next, above"),
63
+ "next-down": t("iconStacker.align.next-down", "Next, below")
54
64
  };
55
65
  }
56
66
  const STAGE_SIZE = 64;
@@ -379,7 +389,31 @@ const NiceIconStacker = forwardRef(
379
389
  onClick: () => update(edited.id, { align: a })
380
390
  },
381
391
  a
382
- )) })
392
+ )) }),
393
+ /* @__PURE__ */ jsx(
394
+ "span",
395
+ {
396
+ className: "nice-icon-stacker__pad-series",
397
+ title: t(
398
+ "iconStacker.align.seriesHint",
399
+ "Beside the icon, in its colours and size"
400
+ ),
401
+ children: SERIES.map(({ align: a, Arrow }) => /* @__PURE__ */ jsx(
402
+ "button",
403
+ {
404
+ type: "button",
405
+ role: "radio",
406
+ "aria-checked": align === a,
407
+ "aria-label": alignName(a),
408
+ title: alignName(a),
409
+ className: "nice-icon-stacker__pad-next",
410
+ onClick: () => update(edited.id, { align: a }),
411
+ children: /* @__PURE__ */ jsx(Arrow, { size: 14, primaryColor: "currentColor" })
412
+ },
413
+ a
414
+ ))
415
+ }
416
+ )
383
417
  ]
384
418
  }
385
419
  ),
@@ -1,10 +1,10 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { forwardRef, useId, useState, useSyncExternalStore } from "react";
2
+ import { forwardRef, useId, useState, Children, useSyncExternalStore } from "react";
3
3
  import { durationScale, stillTree, motionTree, animationScale } from "./animationSpeed.js";
4
4
  import { useStillMotion } from "./reducedMotion.js";
5
5
  import { sharpenTree, roundTree, wireTree, MINI_SCALE } from "./sharpen.js";
6
6
  import { generateSmilAnimation } from "./smilAnimations.js";
7
- import { BOX_PERFECT_STACK, renderStackChildren, NTD_ICON_MARK, PERFECT_STACK } from "./stacking.js";
7
+ import { BOX_PERFECT_STACK, isNtdIconElement, isSeriesAlign, renderStackChildren, layoutStackSeries, renderStackSeries, NTD_ICON_MARK, PERFECT_STACK, SERIES_WIDTH } from "./stacking.js";
8
8
  import { SIZE_MAP, SEMANTIC_COLOR_VARS, SEMANTIC_COLOR_DEFAULTS, GRADIENT_PRESETS } from "./types.js";
9
9
  const hasMatchMedia = () => typeof window !== "undefined" && typeof window.matchMedia === "function";
10
10
  function getColorScheme() {
@@ -180,8 +180,10 @@ function createIcon(options) {
180
180
  x: options.perfectStackX ?? textCenter[0],
181
181
  y: options.perfectStackY ?? textCenter[1],
182
182
  rotation: options.perfectStackRotation ?? BOX_PERFECT_STACK.rotation,
183
- size: options.perfectStackSize ?? BOX_PERFECT_STACK.size
183
+ size: options.perfectStackSize ?? BOX_PERFECT_STACK.size,
184
+ filled: options.perfectStackFilled
184
185
  };
186
+ const seriesWidth = options.seriesWidth ?? 24;
185
187
  const Icon = forwardRef(
186
188
  ({
187
189
  size = "md",
@@ -262,7 +264,11 @@ function createIcon(options) {
262
264
  strokeWidth: effectiveStrokeWidth,
263
265
  strokeLinecap,
264
266
  strokeLinejoin,
265
- uid
267
+ uid,
268
+ // content stacked inside (not a series beside it) — renderers may leave details out (1.4.3)
269
+ stacked: Children.toArray(children).some(
270
+ (c) => !(isNtdIconElement(c) && isSeriesAlign(c.props.stackAlign))
271
+ )
266
272
  };
267
273
  const renderer = variant === "wireframe" ? paths.solid : variant === "duotone" && !paths.duotone ? solidDuotone : paths[variant] ?? (variant === "sharp" ? paths.solid : void 0) ?? (variant === "rounded" ? paths.solid : void 0) ?? (variant === "mini" ? paths.solid : void 0) ?? (variant === "3d" ? paths.solid : void 0) ?? (variant === "vivid" ? paths.solid : void 0) ?? paths.solid;
268
274
  const is3d = variant === "3d";
@@ -332,6 +338,17 @@ function createIcon(options) {
332
338
  paced,
333
339
  stacked
334
340
  ] }) : paced;
341
+ const series = viewBox === "0 0 24 24" ? layoutStackSeries(children, seriesWidth) : null;
342
+ const seriesLayer = series ? renderStackSeries(series, {
343
+ variant,
344
+ primaryColor: effectivePrimary,
345
+ secondaryColor: resolvedSecondary,
346
+ accentColor: resolvedAccent,
347
+ strokeWidth
348
+ }) : null;
349
+ const svgViewBox = series ? series.box.join(" ") : viewBox;
350
+ const svgWidth = series ? Math.round(1e3 * (resolvedSize * series.box[2] / 24)) / 1e3 : resolvedSize;
351
+ const svgHeight = series ? Math.round(1e3 * (resolvedSize * series.box[3] / 24)) / 1e3 : resolvedSize;
335
352
  const iconContent = variant === "mini" ? /* @__PURE__ */ jsx(
336
353
  "g",
337
354
  {
@@ -344,9 +361,9 @@ function createIcon(options) {
344
361
  {
345
362
  ref,
346
363
  xmlns: "http://www.w3.org/2000/svg",
347
- viewBox,
348
- width: resolvedSize,
349
- height: resolvedSize,
364
+ viewBox: svgViewBox,
365
+ width: svgWidth,
366
+ height: svgHeight,
350
367
  fill: "none",
351
368
  strokeLinecap,
352
369
  strokeLinejoin,
@@ -400,7 +417,8 @@ function createIcon(options) {
400
417
  ) : /* @__PURE__ */ jsxs("g", { filter: is3d ? `url(#${filterId})` : void 0, children: [
401
418
  iconContent,
402
419
  smilAnimationElements
403
- ] }) : is3d ? /* @__PURE__ */ jsx("g", { filter: `url(#${filterId})`, children: iconContent }) : iconContent
420
+ ] }) : is3d ? /* @__PURE__ */ jsx("g", { filter: `url(#${filterId})`, children: iconContent }) : iconContent,
421
+ seriesLayer
404
422
  ]
405
423
  },
406
424
  `${playKey ?? ""}:${replays}`
@@ -410,6 +428,7 @@ function createIcon(options) {
410
428
  Icon.displayName = displayName;
411
429
  Icon[NTD_ICON_MARK] = true;
412
430
  Icon[PERFECT_STACK] = perfect;
431
+ Icon[SERIES_WIDTH] = seriesWidth;
413
432
  return Icon;
414
433
  }
415
434
  export {
@@ -21,9 +21,8 @@ function within(uid, name, shape, content) {
21
21
  /* @__PURE__ */ jsx("g", { clipPath: `url(#${id})`, children: content })
22
22
  ] });
23
23
  }
24
- const CUTLERY_FORK = "M1 3H1.6V7H2.2V3H2.8V7H3.4V3H4V7.2C4 8.4 3.4 9.1 3 9.3V20.5A0.5 0.5 0 0 1 2 20.5V9.3C1.6 9.1 1 8.4 1 7.2Z";
25
- const CUTLERY_KNIFE = "M20.2 3C22.4 4.2 23 8.2 22.6 12.6H21.9V20.4A0.75 0.75 0 0 1 20.4 20.4V12.6H20.2Z";
26
- const CUTLERY_FORK_LINES = "M1.3 3V6.8C1.3 8.2 2.5 8.9 2.5 9.4M3.7 3V6.8C3.7 8.2 2.5 8.9 2.5 9.4M2.5 3V20.6";
24
+ const CUTLERY_FORK = "M0.4 3H0.9V7H1.37V3H1.87V7H2.33V3H2.83V7H3.3V3H3.8V7.3C3.8 8.6 3.1 9.3 2.7 9.6V20.4A0.6 0.6 0 0 1 1.5 20.4V9.6C1.1 9.3 0.4 8.6 0.4 7.3Z";
25
+ const CUTLERY_KNIFE = "M21 3C23.3 4.2 24 8.2 23.6 12.6H22.7V20.35A0.85 0.85 0 0 1 21 20.35Z";
27
26
  const BELL = "M18 8A6 6 0 006 8c0 7-3 9-3 9h18s-3-2-3-9z";
28
27
  const BELL_CLAPPER = "M9 18.5h6a3 3 0 01-6 0z";
29
28
  const BELL_CLAPPER_LINE = "M9 19a3 3 0 006 0";
@@ -61,6 +60,7 @@ const PAPER_FOLD = "M12 2v6a2 2 0 002 2h6z";
61
60
  const PAPER_FOLD_LINE = "M12 2v8h8";
62
61
  const PAPER_SHARP = "M12 2H4v20h16V10z";
63
62
  const PAPER_FOLD_SHARP = "M12 2v8h8z";
63
+ const PAPER_FOLD_EDGE = "M12 2v6a2 2 0 002 2h6";
64
64
  function paperIcon(displayName, text = "") {
65
65
  return createIcon({
66
66
  displayName,
@@ -69,9 +69,20 @@ function paperIcon(displayName, text = "") {
69
69
  perfectStackY: 14,
70
70
  perfectStackSize: 0.5,
71
71
  paths: {
72
- solid: ({ primaryColor, secondaryColor, accentColor, accentOpacity }) => /* @__PURE__ */ jsxs(Fragment, { children: [
72
+ solid: ({ primaryColor, accentColor, accentOpacity, strokeWidth }) => /* @__PURE__ */ jsxs(Fragment, { children: [
73
73
  /* @__PURE__ */ jsx("path", { d: PAPER, fill: primaryColor }),
74
- /* @__PURE__ */ jsx("path", { d: PAPER_FOLD, fill: secondaryColor }),
74
+ /* @__PURE__ */ jsx("path", { d: PAPER_FOLD, fill: primaryColor }),
75
+ /* @__PURE__ */ jsx(
76
+ "path",
77
+ {
78
+ d: PAPER_FOLD_EDGE,
79
+ stroke: accentColor,
80
+ strokeOpacity: accentOpacity,
81
+ strokeWidth,
82
+ strokeLinecap: "butt",
83
+ fill: "none"
84
+ }
85
+ ),
75
86
  text && /* @__PURE__ */ jsx(
76
87
  "path",
77
88
  {
@@ -85,9 +96,21 @@ function paperIcon(displayName, text = "") {
85
96
  )
86
97
  ] }),
87
98
  // square at every corner, the fold included — the derived `sharp` keeps a path's arcs round
88
- sharp: ({ primaryColor, secondaryColor, accentColor, accentOpacity }) => /* @__PURE__ */ jsxs(Fragment, { children: [
99
+ sharp: ({ primaryColor, accentColor, accentOpacity, strokeWidth }) => /* @__PURE__ */ jsxs(Fragment, { children: [
89
100
  /* @__PURE__ */ jsx("path", { d: PAPER_SHARP, fill: primaryColor }),
90
- /* @__PURE__ */ jsx("path", { d: PAPER_FOLD_SHARP, fill: secondaryColor }),
101
+ /* @__PURE__ */ jsx("path", { d: PAPER_FOLD_SHARP, fill: primaryColor }),
102
+ /* @__PURE__ */ jsx(
103
+ "path",
104
+ {
105
+ d: PAPER_FOLD_LINE,
106
+ stroke: accentColor,
107
+ strokeOpacity: accentOpacity,
108
+ strokeWidth,
109
+ strokeLinecap: "butt",
110
+ strokeLinejoin: "miter",
111
+ fill: "none"
112
+ }
113
+ ),
91
114
  text && /* @__PURE__ */ jsx(
92
115
  "path",
93
116
  {
@@ -109,16 +132,15 @@ function paperIcon(displayName, text = "") {
109
132
  }
110
133
  ),
111
134
  // duotone (1.3.8): createIcon's default — the solid page, its writing in secondary like the fold
112
- vivid: ({ primaryColor, secondaryColor }) => /* @__PURE__ */ jsxs(Fragment, { children: [
135
+ vivid: ({ primaryColor, secondaryColor, accentColor, accentOpacity }) => /* @__PURE__ */ jsxs(Fragment, { children: [
113
136
  /* @__PURE__ */ jsx("path", { d: PAPER, fill: primaryColor }),
114
- /* @__PURE__ */ jsx("path", { d: PAPER, fill: "white", opacity: "0.1" }),
115
137
  /* @__PURE__ */ jsx("path", { d: PAPER_FOLD, fill: secondaryColor }),
116
138
  text && /* @__PURE__ */ jsx(
117
139
  "path",
118
140
  {
119
141
  d: text,
120
- stroke: "white",
121
- strokeOpacity: "0.9",
142
+ stroke: accentColor,
143
+ strokeOpacity: accentOpacity,
122
144
  strokeWidth: "1.5",
123
145
  strokeLinecap: "round",
124
146
  fill: "none"
@@ -130,7 +152,6 @@ function paperIcon(displayName, text = "") {
130
152
  }
131
153
  export {
132
154
  CUTLERY_FORK,
133
- CUTLERY_FORK_LINES,
134
155
  CUTLERY_KNIFE,
135
156
  bellIcon,
136
157
  detailColor,
@@ -29,7 +29,12 @@ const ALIGN_CODE = {
29
29
  "half-top-left": "htl",
30
30
  "half-top-right": "htr",
31
31
  "half-bottom-left": "hbl",
32
- "half-bottom-right": "hbr"
32
+ "half-bottom-right": "hbr",
33
+ // a series beside the icon (1.4.3)
34
+ "next-right": "nr",
35
+ "next-left": "nl",
36
+ "next-up": "nu",
37
+ "next-down": "nd"
33
38
  };
34
39
  function reverse(codes) {
35
40
  const map = /* @__PURE__ */ new Map();