@nice2dev/icons 1.3.3 → 1.3.5

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 (60) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/README.md +43 -4
  3. package/dist/cjs/NiceIconStacker.js +120 -0
  4. package/dist/cjs/client.js +3 -0
  5. package/dist/cjs/createIcon.js +25 -4
  6. package/dist/cjs/figmaExport.js +1 -0
  7. package/dist/cjs/iconParts.js +6 -5
  8. package/dist/cjs/icons/actions.js +36 -7
  9. package/dist/cjs/icons/ai.js +3 -0
  10. package/dist/cjs/icons/business.js +8 -7
  11. package/dist/cjs/icons/education.js +18 -14
  12. package/dist/cjs/icons/files.js +34 -15
  13. package/dist/cjs/icons/index.js +3 -2
  14. package/dist/cjs/icons/media.js +41 -15
  15. package/dist/cjs/icons/navigation.js +8 -6
  16. package/dist/cjs/icons/realestate.js +5 -2
  17. package/dist/cjs/icons/shapes.js +18 -14
  18. package/dist/cjs/icons/sustainability.js +2 -11
  19. package/dist/cjs/icons/travel.js +15 -14
  20. package/dist/cjs/icons/ui.js +47 -6
  21. package/dist/cjs/icons/weather.js +3 -0
  22. package/dist/cjs/index.js +6 -2
  23. package/dist/cjs/nicetodev-icons.css +1 -1
  24. package/dist/cjs/stacking.js +100 -0
  25. package/dist/esm/NiceIconStacker.js +117 -0
  26. package/dist/esm/client.js +1 -0
  27. package/dist/esm/createIcon.js +26 -5
  28. package/dist/esm/figmaExport.js +1 -0
  29. package/dist/esm/iconParts.js +6 -5
  30. package/dist/esm/icons/actions.js +36 -7
  31. package/dist/esm/icons/ai.js +3 -1
  32. package/dist/esm/icons/business.js +9 -8
  33. package/dist/esm/icons/education.js +18 -14
  34. package/dist/esm/icons/files.js +34 -15
  35. package/dist/esm/icons/index.js +5 -5
  36. package/dist/esm/icons/media.js +41 -15
  37. package/dist/esm/icons/navigation.js +8 -6
  38. package/dist/esm/icons/realestate.js +5 -2
  39. package/dist/esm/icons/shapes.js +19 -14
  40. package/dist/esm/icons/sustainability.js +2 -10
  41. package/dist/esm/icons/travel.js +15 -14
  42. package/dist/esm/icons/ui.js +47 -7
  43. package/dist/esm/icons/weather.js +3 -1
  44. package/dist/esm/index.js +6 -5
  45. package/dist/esm/nicetodev-icons.css +1 -1
  46. package/dist/esm/stacking.js +92 -0
  47. package/dist/types/NiceIconStacker.d.ts +50 -0
  48. package/dist/types/client.d.ts +2 -0
  49. package/dist/types/createIcon.d.ts +5 -0
  50. package/dist/types/iconParts.d.ts +2 -1
  51. package/dist/types/icons/ai.d.ts +2 -0
  52. package/dist/types/icons/index.d.ts +5 -5
  53. package/dist/types/icons/shapes.d.ts +0 -1
  54. package/dist/types/icons/sustainability.d.ts +0 -1
  55. package/dist/types/icons/ui.d.ts +1 -0
  56. package/dist/types/icons/weather.d.ts +2 -0
  57. package/dist/types/index.d.ts +3 -1
  58. package/dist/types/stacking.d.ts +41 -0
  59. package/dist/types/types.d.ts +31 -3
  60. package/package.json +2 -2
@@ -19,6 +19,8 @@ export { AnimationController, InteractiveIcon, useAnimationSequence, createAnima
19
19
  export type { AnimationStep, AnimationSequenceConfig, AnimationPlaybackState, AnimationTrigger, InteractiveAnimationConfig, AnimationControllerHandle, AnimationControllerProps, InteractiveIconProps, } from './animationControls';
20
20
  export { NiceIconPicker } from './NiceIconPicker';
21
21
  export type { NiceIconPickerProps, NiceIconPickerHandle, IconPickerEntry } from './NiceIconPicker';
22
+ export { NiceIconStacker, niceIconStackCode } from './NiceIconStacker';
23
+ export type { NiceIconStackerProps, NiceIconStackLayer } from './NiceIconStacker';
22
24
  export { NtdIconMorph, NtdPathMorph, NtdMorphPair, useMorphState } from './NtdIconMorph';
23
25
  export type { NtdIconMorphProps, NtdPathMorphProps, NtdMorphPairProps, MorphTrigger, } from './NtdIconMorph';
24
26
  export { NtdBadge, NtdStatusDot, NtdIconOverlay, NtdIconStack } from './NtdIconBadge';
@@ -68,5 +68,10 @@ export interface CreateIconOptions {
68
68
  /** Vivid variant — colorful multi-fill using primaryColor & secondaryColor as dominant hues. Falls back to solid if not defined. */
69
69
  vivid?: IconPathRenderer;
70
70
  };
71
+ /**
72
+ * The icon's visual centre, where text children are centred (1.3.5). Default `[12, 12]`; set it
73
+ * for a shape whose middle lies elsewhere (a star, a heart, a triangle).
74
+ */
75
+ textCenter?: readonly [number, number];
71
76
  }
72
77
  export declare function createIcon(options: CreateIconOptions): import("react").ForwardRefExoticComponent<NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
@@ -19,7 +19,8 @@ export declare function detailColor({ variant, secondaryColor, accentColor }: Ic
19
19
  export declare function within(uid: string | undefined, name: string, shape: ReactNode, content: ReactNode): ReactNode;
20
20
  /**
21
21
  * NtdBell and NtdBellRing, so the two share one bell; `ringing` adds the ring marks. Duotone and
22
- * vivid are fills only: the bell primary, the clapper (and the marks) secondary.
22
+ * vivid are fills only: the bell primary, the clapper secondary. The marks are primary on the solid
23
+ * bell, secondary in duotone and in the accent colour in vivid.
23
24
  */
24
25
  export declare function bellIcon(displayName: string, ringing: boolean): ReturnType<typeof createIcon>;
25
26
  /**
@@ -22,6 +22,8 @@ export declare const NtdModel: import("react").ForwardRefExoticComponent<import(
22
22
  export declare const NtdTraining: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
23
23
  export declare const NtdInference: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
24
24
  export declare const NtdSparkle: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
25
+ /** @deprecated The same four-pointed star as {@link NtdSparkle} — use that. */
26
+ export declare const NtdStar4: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
25
27
  export declare const NtdMagicWand: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
26
28
  export declare const NtdPrompt: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
27
29
  export declare const aiIcons: {
@@ -1,14 +1,14 @@
1
1
  export { NtdArrowUp, NtdArrowDown, NtdArrowLeft, NtdArrowRight, NtdChevronUp, NtdChevronDown, NtdChevronLeft, NtdChevronRight, NtdMenu, NtdClose, NtdMoreHorizontal, NtdMoreVertical, NtdExternalLink, NtdRefresh, } from './navigation';
2
2
  export { NtdSearch, NtdEdit, NtdEditDetail, NtdTrash, NtdSave, NtdDownload, NtdUpload, NtdShare, NtdCopy, NtdClipboard, NtdPlus, NtdMinus, NtdCheck, NtdFilter, NtdSort, NtdPrint, NtdZoomIn, NtdZoomOut, NtdUndo, NtdRedo, NtdReply, NtdLink, NtdSettings, NtdLogIn, NtdLogOut, NtdLock, NtdUnlock, NtdGroup, NtdUngroup, } from './actions';
3
- export { NtdHome, NtdUser, NtdAdmin, NtdUsers, NtdHeart, NtdStar, NtdBell, NtdEye, NtdEyeOff, NtdInfo, NtdWarning, NtdError, NtdSuccess, NtdHelp, NtdClock, NtdCalendar, NtdTag, NtdBackspace, NtdBookmark, NtdFlag, NtdThumbUp, NtdThumbDown, NtdShield, NtdGlobe, NtdMap, NtdPin, NtdSun, NtdMoon, NtdCursor, NtdWireframe, } from './ui';
4
- export { NtdRecycle, NtdCompost, NtdTrashSort, NtdSolarPanel, NtdWindTurbine, NtdEvCharger, NtdHydropower, NtdCarbonFootprint, NtdCo2, NtdNetZero, NtdEcoFriendly, NtdOrganic, NtdBiodegradable, NtdPlantTree, NtdWildlife, sustainabilityIcons, } from './sustainability';
3
+ export { NtdHome, NtdUser, NtdAdmin, NtdUsers, NtdHeart, NtdStar, NtdBell, NtdEye, NtdEyeOff, NtdInfo, NtdWarning, NtdError, NtdSuccess, NtdHelp, NtdClock, NtdHourglass, NtdCalendar, NtdTag, NtdBackspace, NtdBookmark, NtdFlag, NtdThumbUp, NtdThumbDown, NtdShield, NtdGlobe, NtdMap, NtdPin, NtdSun, NtdMoon, NtdCursor, NtdWireframe, } from './ui';
4
+ export { NtdRecycle, NtdCompost, NtdTrashSort, NtdSolarPanel, NtdWindTurbine, NtdEvCharger, NtdCarbonFootprint, NtdCo2, NtdNetZero, NtdEcoFriendly, NtdOrganic, NtdBiodegradable, NtdPlantTree, NtdWildlife, sustainabilityIcons, } from './sustainability';
5
5
  export { NtdAccessibility, NtdWheelchair, NtdBlind, NtdDeaf, NtdSignLanguage, NtdBraille, NtdAudioDescription, NtdClosedCaptions, NtdDyslexia, NtdEasyRead, NtdScreenReader, NtdHearingAid, NtdAssistiveTech, accessibilityIcons, } from './accessibility';
6
6
  export { NtdContract, NtdLegalDocument, NtdTermsOfService, NtdPrivacyPolicy, NtdGdpr, NtdCcpa, NtdCookieConsent, NtdCopyright, NtdTrademark, NtdPatent, NtdCompliance, NtdCertified, NtdAudit, legalIcons, } from './legal';
7
7
  export { NtdPlay, NtdPause, NtdStop, NtdSkipForward, NtdSkipBack, NtdVolume, NtdVolumeMute, NtdImage, NtdCamera, NtdVideo, NtdMicrophone, NtdMicrophoneOff, NtdMusic, NtdMail, NtdInbox, NtdPhone, NtdChat, NtdSend, NtdNotification, NtdWifi, NtdBluetooth, NtdPalette, NtdBrush, NtdPenTool, NtdSpline, } from './media';
8
8
  export { NtdFile, NtdFileText, NtdFolder, NtdFolderOpen, NtdArchive, NtdDatabase, NtdCloud, NtdCloudUpload, NtdCloudDownload, NtdTerminal, NtdCode, NtdGit, NtdPackage, NtdLayers, NtdGrid, NtdList, NtdTable, NtdSmartphone, NtdMonitor, NtdCpu, NtdKey, NtdAward, NtdCoffee, NtdCart, NtdShoppingCart, NtdCreditCard, NtdPieChart, NtdBarChart, NtdActivity, NtdTarget, NtdTruck, } from './files';
9
9
  export { NtdDumpsterFire, NtdRocket, NtdGamepadOldschool, NtdPuzzle, NtdPartyPopper, NtdTrophy, NtdCrown, NtdDice, NtdSmile, NtdSmiley, NtdSad, NtdSkull, NtdGhost, NtdLightning, NtdZap, } from './fun';
10
- export { NtdSunrise, NtdSunset, NtdRain, NtdSnow, NtdThunderstorm, NtdWind, NtdDroplet, NtdThermometer, NtdUmbrella, NtdLeaf, NtdFlower, NtdTree, NtdMountain, NtdWave, NtdFire, NtdSnowflake, NtdCompass, NtdAnchor, NtdFeather, NtdBug, } from './weather';
11
- export { NtdArrowUpCircle, NtdArrowDownCircle, NtdArrowLeftCircle, NtdArrowRightCircle, NtdSquare, NtdCircle, NtdTriangle, NtdHexagon, NtdOctagon, NtdDiamond, NtdPentagon, NtdCross, NtdStar4, NtdCornerUpLeft, NtdCornerUpRight, NtdCornerDownLeft, NtdCornerDownRight, NtdMaximize, NtdMinimize, NtdMove, NtdRepeat, NtdShuffle, NtdPoint, NtdSegment, NtdPerpendicular, NtdParallel, NtdMidpoint, NtdAngleBisector, } from './shapes';
10
+ export { NtdSunrise, NtdSunset, NtdRain, NtdSnow, NtdThunderstorm, NtdWind, NtdDroplet, NtdHydropower, NtdThermometer, NtdUmbrella, NtdLeaf, NtdFlower, NtdTree, NtdMountain, NtdWave, NtdFire, NtdSnowflake, NtdCompass, NtdAnchor, NtdFeather, NtdBug, } from './weather';
11
+ export { NtdArrowUpCircle, NtdArrowDownCircle, NtdArrowLeftCircle, NtdArrowRightCircle, NtdSquare, NtdCircle, NtdTriangle, NtdHexagon, NtdOctagon, NtdDiamond, NtdPentagon, NtdCross, NtdCornerUpLeft, NtdCornerUpRight, NtdCornerDownLeft, NtdCornerDownRight, NtdMaximize, NtdMinimize, NtdMove, NtdRepeat, NtdShuffle, NtdPoint, NtdSegment, NtdPerpendicular, NtdParallel, NtdMidpoint, NtdAngleBisector, } from './shapes';
12
12
  export { NtdBriefcase, NtdDollar, NtdWallet, NtdReceipt, NtdBank, NtdTrendUp, NtdTrendDown, NtdPercent, NtdInvoice, NtdInvoiceDoc, NtdStore, NtdBarcode, NtdCalculator, NtdPresentation, NtdClipboardCheck, NtdPiggyBank, NtdCoins, NtdKanban, NtdMilestone, } from './business';
13
13
  export { NtdAtSign, NtdPhoneOff, NtdBubble, NtdThumbsUp, NtdThumbsDown, NtdBellRing, NtdMegaphone, NtdQrCode, } from './social';
14
14
  export { NtdBrackets, NtdServer, NtdGitBranch, NtdGitCommit, NtdGitMerge, NtdBattery, NtdSlash, NtdHash, NtdBugDev, NtdBlueprint, NtdPrototype, NtdComponent, NtdNodes, NtdFlow, NtdAIBrain, NtdNeural, NtdForge, NtdPipeline, NtdDeploy, NtdGateway, NtdDataMesh, NtdFeatureFlag, NtdViteLogo, NtdBunLogo, NtdDenoLogo, NtdTauriLogo, NtdSvelteLogo, NtdNextJsLogo, NtdAstroLogo, NtdQwikLogo, NtdSolidJsLogo, } from './devtech';
@@ -19,7 +19,7 @@ export { NtdSmartBulb, NtdThermostat, NtdSmartCamera, NtdDoorbell, NtdMotionSens
19
19
  export { NtdApple, NtdPizza, NtdGlass, NtdHeartPulse, NtdPill, NtdSyringe, NtdStethoscope, NtdWeight, NtdBandaid, NtdCake, NtdEgg, NtdHamburger, NtdDna, } from './health';
20
20
  export { NtdNiceToDev, NtdOmniVerk, NtdOmniVerkLogo, NtdOmniVerkSpinner, NtdOmniVerkBadge, NtdOmniVerkWatermark, NtdOmniVerkAnimated, } from './brand';
21
21
  export { NtdGamepad, NtdGamepadController, NtdJoystick, NtdVrHeadset, NtdTrophy as NtdTrophyGaming, NtdLeaderboard, NtdHealthBar, NtdXpBar, NtdStar as NtdStarGaming, NtdTwitch, NtdYoutubeLive, NtdDiscord, NtdDice as NtdDiceGaming, NtdSword, NtdShield as NtdShieldGaming, NtdPotion, gamingIcons, } from './gaming';
22
- export { NtdNeuralNetwork, NtdBrain, NtdDeepLearning, NtdChatbot, NtdRobot, NtdVoiceAssistant as NtdAIAssistant, NtdTensor, NtdGradient, NtdDataset, NtdModel, NtdTraining, NtdInference, NtdSparkle, NtdMagicWand, NtdPrompt, aiIcons, } from './ai';
22
+ export { NtdNeuralNetwork, NtdBrain, NtdDeepLearning, NtdChatbot, NtdRobot, NtdVoiceAssistant as NtdAIAssistant, NtdTensor, NtdGradient, NtdDataset, NtdModel, NtdTraining, NtdInference, NtdSparkle, NtdStar4, NtdMagicWand, NtdPrompt, aiIcons, } from './ai';
23
23
  export { NtdGraduationCap, NtdDiploma, NtdSchool, NtdUniversity, NtdBook, NtdBookBookmark, NtdOpenBook, NtdNotebook, NtdPencil, NtdPen, NtdOnlineCourse, NtdWebinar, NtdCertificate, NtdQuiz, NtdExam, NtdFlashcard, NtdBackpack, NtdCalculator as NtdCalculatorEdu, educationIcons, } from './education';
24
24
  export { NtdBeaker, NtdFlask, NtdTestTube, NtdPetriDish, NtdMicroscope, NtdDna as NtdDnaScience, NtdAtom, NtdMolecule, NtdPeriodictable, NtdMagnet, NtdTelescope, NtdPlanet, NtdRocket as NtdRocketScience, NtdResearch, NtdHypothesis, NtdExperiment, scienceIcons, } from './science';
25
25
  export { NtdHouse as NtdHouseRealEstate, NtdApartment, NtdCondo, NtdVilla, NtdOfficeBuilding, NtdWarehouse, NtdKey as NtdKeyRealEstate, NtdFloorPlan, NtdSquareMeters, NtdBedroom, NtdBathroom, NtdGarage, NtdPool, NtdForSale, NtdForRent, NtdSold, NtdMortgage, realestateIcons, } from './realestate';
@@ -10,7 +10,6 @@ export declare const NtdOctagon: import("react").ForwardRefExoticComponent<impor
10
10
  export declare const NtdDiamond: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
11
11
  export declare const NtdPentagon: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
12
12
  export declare const NtdCross: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
13
- export declare const NtdStar4: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
14
13
  export declare const NtdCornerUpLeft: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
15
14
  export declare const NtdCornerUpRight: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
16
15
  export declare const NtdCornerDownLeft: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
@@ -15,7 +15,6 @@ export declare const NtdTrashSort: import("react").ForwardRefExoticComponent<imp
15
15
  export declare const NtdSolarPanel: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
16
16
  export declare const NtdWindTurbine: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
17
17
  export declare const NtdEvCharger: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
18
- export declare const NtdHydropower: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
19
18
  export declare const NtdCarbonFootprint: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
20
19
  export declare const NtdCo2: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
21
20
  export declare const NtdNetZero: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
@@ -13,6 +13,7 @@ export declare const NtdError: import("react").ForwardRefExoticComponent<import(
13
13
  export declare const NtdSuccess: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
14
14
  export declare const NtdHelp: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
15
15
  export declare const NtdClock: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
16
+ export declare const NtdHourglass: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
16
17
  export declare const NtdCalendar: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
17
18
  export declare const NtdTag: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
18
19
  /** The backspace key: a key shape pointing left with a cross inside (delete the last character). */
@@ -12,6 +12,8 @@ export declare const NtdWind: import("react").ForwardRefExoticComponent<import("
12
12
  * arc was what made it look round and fat.
13
13
  */
14
14
  export declare const NtdDroplet: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
15
+ /** @deprecated The same drop as {@link NtdDroplet} — use that. */
16
+ export declare const NtdHydropower: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
15
17
  export declare const NtdThermometer: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
16
18
  export declare const NtdUmbrella: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
17
19
  export declare const NtdLeaf: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
@@ -47,13 +47,15 @@
47
47
  * @module @nicetodev/icons
48
48
  */
49
49
  import './animations.css';
50
- export type { IconSize, IconVariant, IconAnimation, CutoutShape, GradientPreset, GradientType, GradientAnimation, SemanticColor, NtdIconProps, IconRenderProps, } from './types';
50
+ export type { IconSize, IconVariant, IconAnimation, CutoutShape, GradientPreset, GradientType, GradientAnimation, SemanticColor, NtdIconProps, IconRenderProps, IconStackAlign, } from './types';
51
51
  export { SIZE_MAP, GRADIENT_PRESETS, SEMANTIC_COLOR_DEFAULTS, SEMANTIC_COLOR_VARS } from './types';
52
52
  export { createIcon } from './createIcon';
53
53
  export { generateSmilAnimation, SmilAnimationWrapper as NiceSmilAnimationWrapper, SmilAnimationWrapper, createSmilAnimationDef, isSmilSupported, SMIL_ANIMATION_TYPES, } from './smilAnimations';
54
54
  export type { SmilAnimationType, SmilAnimationConfig, SmilAnimationWrapperProps, } from './smilAnimations';
55
55
  export { NiceIconPicker } from './NiceIconPicker';
56
56
  export type { NiceIconPickerProps, NiceIconPickerHandle, IconPickerEntry } from './NiceIconPicker';
57
+ export { NiceIconStacker, niceIconStackCode } from './NiceIconStacker';
58
+ export type { NiceIconStackerProps, NiceIconStackLayer } from './NiceIconStacker';
57
59
  export { AnimationController as NiceAnimationController, AnimationController, InteractiveIcon as NiceInteractiveIcon, InteractiveIcon, useAnimationSequence, createAnimationSequence, createHoverAnimation, createClickAnimation, createVisibilityAnimation, PRESET_SEQUENCES, PRESET_INTERACTIONS, } from './animationControls';
58
60
  export type { AnimationStep, AnimationSequenceConfig, AnimationPlaybackState, AnimationTrigger, InteractiveAnimationConfig, AnimationControllerHandle, AnimationControllerProps, InteractiveIconProps, } from './animationControls';
59
61
  export { exportIconToFigmaNode, exportIconToSvgString, exportIconToDataUrl, generateFigmaPluginManifest, downloadIconAsSvg, downloadIconAsPng, copyIconToClipboard, batchExportIcons, } from './figmaExport';
@@ -0,0 +1,41 @@
1
+ import { type ReactElement, type ReactNode } from 'react';
2
+ import type { IconStackAlign, IconVariant, NtdIconProps } from './types';
3
+ /**
4
+ * Icons stacked by nesting (1.3.5): `<NtdSquare><NtdStar stackAlign="center">1</NtdStar></NtdSquare>`.
5
+ * An icon draws its children inside its own `<svg>` — an icon child as a nested `<svg>` placed by
6
+ * its `stackAlign` / `stackSize`, text centred on the icon, anything else as it is. So the stack
7
+ * is one SVG: it exports and copies like any icon.
8
+ */
9
+ /** Set on every component createIcon makes, so a parent icon tells its icon children apart. */
10
+ export declare const NTD_ICON_MARK = "ntdIcon";
11
+ export declare function isNtdIconElement(node: ReactNode): node is ReactElement<NtdIconProps>;
12
+ export declare function isFilledVariant(variant: IconVariant): boolean;
13
+ /** Default share of the parent: centred children larger, edge and corner badges smaller. */
14
+ export declare function defaultStackSize(align: IconStackAlign): number;
15
+ /** Top-left corner of a stacked icon `size` units big inside the 24-unit box. */
16
+ export declare function stackPlacement(align: IconStackAlign, size: number): [number, number];
17
+ /** Font size of text children by length: one character 12, two 10, three 8, more 6.5. */
18
+ export declare function defaultTextSize(length: number): number;
19
+ export interface StackContext {
20
+ variant: IconVariant;
21
+ /** The parent's primary as drawn (a gradient's `url(#…)` included). */
22
+ primaryColor: string;
23
+ accentColor: string;
24
+ /** The cutout variant's tile colour — what fills the cut shape's surroundings. */
25
+ tileColor: string;
26
+ strokeWidth: number;
27
+ /** Where text is centred — the icon's visual centre. */
28
+ textCenter: readonly [number, number];
29
+ textColor?: string;
30
+ textSize?: number;
31
+ }
32
+ /**
33
+ * The children of an icon, drawn into it. Colours given on a child win; otherwise:
34
+ * - content inside — centred or at an edge — is cut out of a filled parent: an icon child takes
35
+ * the parent's accent as its primary (and the parent's primary as its accent, so its own text
36
+ * and details read), text the accent; on `outline` / `wireframe` it stays in the parent's
37
+ * colours; in a cutout it takes the tile's colour, drawn solid in the cut;
38
+ * - a corner badge keeps the parent's colours and sits on a disc of the accent colour a little
39
+ * larger than itself — a gap cut into the parent where they overlap, unseen beyond it.
40
+ */
41
+ export declare function renderStackChildren(children: ReactNode, ctx: StackContext): ReactNode;
@@ -71,7 +71,7 @@ export type CutoutShape = 'rounded-square' | 'circle' | 'square' | 'hexagon' | '
71
71
  * Each value maps to a `.ntd-anim-{name}` CSS class defined in `animations.css`.
72
72
  *
73
73
  * **Categories:**
74
- * - **Core transforms:** spin, pulse, bounce, shake, float, flip, glow, wiggle, etc.
74
+ * - **Core transforms:** spin, pulse, bounce, shake, float, flip, glow, wiggle, turn, etc.
75
75
  * - **Entrances (one-shot):** fade-in, slide-up, drop, rise, roll-in, vortex, meteor, etc.
76
76
  * - **Exits (one-shot):** scale-out, fold, dissolve.
77
77
  * - **Organic / natural:** breathe, drift, orbit, sway, tilt, pendulum, levitate, etc.
@@ -86,7 +86,9 @@ export type CutoutShape = 'rounded-square' | 'circle' | 'square' | 'hexagon' | '
86
86
  * <NtdBell animation="shake" animationDuration="0.5s" />
87
87
  * ```
88
88
  */
89
- export type IconAnimation = 'spin' | 'spin-reverse' | 'pulse' | 'bounce' | 'shake' | 'float' | 'flip' | 'glow' | 'wiggle' | 'rubber' | 'swing' | 'tada' | 'heartbeat' | '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' | 'scale-out' | 'fold' | 'dissolve' | 'breathe' | 'drift' | 'orbit' | 'sway' | 'tilt' | 'rock' | 'pendulum' | 'levitate' | 'flap' | 'skate' | 'jello' | 'pop' | 'squeeze' | 'crush' | 'stretch' | 'stomp' | 'snap' | 'twist' | 'dash' | 'surge' | 'flash' | 'blink' | 'flicker' | 'vibrate' | 'tremble' | 'glitch' | 'neon' | 'earthquake' | 'wobble' | 'spiral' | 'warp' | 'morph' | 'zoom-pulse' | 'ripple' | 'radar' | 'ping' | 'implode' | 'explode' | 'scatter' | 'rotate-x' | 'draw-loop';
89
+ export type IconAnimation = 'spin' | 'spin-reverse' | 'pulse' | 'bounce' | 'shake' | 'float' | 'flip' | 'glow' | 'wiggle' | 'rubber' | 'swing' | 'tada' | 'heartbeat'
90
+ /** Turns the icon upside down, holds, turns it back and holds; NtdHourglass pours its sand. */
91
+ | 'turn' | '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' | 'scale-out' | 'fold' | 'dissolve' | 'breathe' | 'drift' | 'orbit' | 'sway' | 'tilt' | 'rock' | 'pendulum' | 'levitate' | 'flap' | 'skate' | 'jello' | 'pop' | 'squeeze' | 'crush' | 'stretch' | 'stomp' | 'snap' | 'twist' | 'dash' | 'surge' | 'flash' | 'blink' | 'flicker' | 'vibrate' | 'tremble' | 'glitch' | 'neon' | 'earthquake' | 'wobble' | 'spiral' | 'warp' | 'morph' | 'zoom-pulse' | 'ripple' | 'radar' | 'ping' | 'implode' | 'explode' | 'scatter' | 'rotate-x' | 'draw-loop';
90
92
  /**
91
93
  * Named gradient presets.
92
94
  *
@@ -209,7 +211,10 @@ export interface NtdIconProps extends Omit<SVGProps<SVGSVGElement>, 'ref'> {
209
211
  strokeLinejoin?: 'round' | 'miter' | 'bevel';
210
212
  /** CSS animation to apply */
211
213
  animation?: IconAnimation;
212
- /** Animation duration override (CSS value) */
214
+ /**
215
+ * Animation duration override (CSS value). Also set as `--ntd-anim-duration`, so the parts an
216
+ * icon animates inside itself (NtdHourglass's sand under `turn`) keep in step.
217
+ */
213
218
  animationDuration?: string;
214
219
  /** SMIL animation to apply (SVG-native, no CSS required) */
215
220
  smilAnimation?: SmilAnimationType;
@@ -264,9 +269,32 @@ export interface NtdIconProps extends Omit<SVGProps<SVGSVGElement>, 'ref'> {
264
269
  * @example `transformOrigin="top left"`
265
270
  */
266
271
  transformOrigin?: string;
272
+ /**
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
275
+ * (`<NtdStar>1</NtdStar>`) are centred on the icon.
276
+ */
277
+ stackAlign?: IconStackAlign;
278
+ /**
279
+ * This icon's size as a share of the icon it is stacked in (1.3.5). Default `0.6` centred, `0.5`
280
+ * at an edge or a corner.
281
+ */
282
+ stackSize?: number;
283
+ /**
284
+ * Colour of text children (1.3.5). Default: the accent colour on a filled variant (the text reads
285
+ * as a cut), primary on `outline` / `wireframe`.
286
+ */
287
+ 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
+ textSize?: number;
267
290
  /** Accessible title for screen readers */
268
291
  title?: string;
269
292
  }
293
+ /**
294
+ * Where a stacked icon sits inside the icon it is a child of — the centre, an edge or a corner
295
+ * (1.3.5).
296
+ */
297
+ export type IconStackAlign = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
270
298
  /**
271
299
  * Props received by icon path renderer functions inside {@link CreateIconOptions.paths}.
272
300
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice2dev/icons",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
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.3",
112
+ "@nice2dev/ui-core": "^1.3.5",
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",