@nice2dev/icons 1.3.4 → 1.3.6
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.
- package/CHANGELOG.md +70 -0
- package/README.md +48 -0
- package/dist/cjs/NiceIconStacker.js +184 -0
- package/dist/cjs/client.js +7 -0
- package/dist/cjs/createIcon.js +21 -3
- package/dist/cjs/iconStack.js +111 -0
- package/dist/cjs/icons/actions.js +25 -4
- package/dist/cjs/icons/ai.js +3 -0
- package/dist/cjs/icons/files.js +24 -7
- package/dist/cjs/icons/index.js +2 -2
- package/dist/cjs/icons/shapes.js +2 -10
- package/dist/cjs/icons/sustainability.js +2 -11
- package/dist/cjs/icons/ui.js +6 -0
- package/dist/cjs/icons/weather.js +3 -0
- package/dist/cjs/index.js +9 -2
- package/dist/cjs/nicetodev-icons.css +1 -1
- package/dist/cjs/stacking.js +117 -0
- package/dist/esm/NiceIconStacker.js +181 -0
- package/dist/esm/client.js +2 -0
- package/dist/esm/createIcon.js +23 -5
- package/dist/esm/iconParts.js +1 -1
- package/dist/esm/iconStack.js +104 -0
- package/dist/esm/icons/actions.js +25 -4
- package/dist/esm/icons/ai.js +3 -1
- package/dist/esm/icons/business.js +1 -1
- package/dist/esm/icons/files.js +26 -9
- package/dist/esm/icons/index.js +4 -4
- package/dist/esm/icons/media.js +1 -1
- package/dist/esm/icons/shapes.js +3 -10
- package/dist/esm/icons/sustainability.js +2 -10
- package/dist/esm/icons/ui.js +6 -0
- package/dist/esm/icons/weather.js +3 -1
- package/dist/esm/index.js +6 -4
- package/dist/esm/nicetodev-icons.css +1 -1
- package/dist/esm/smilAnimations.js +1 -1
- package/dist/esm/stacking.js +108 -0
- package/dist/types/NiceIconStacker.d.ts +40 -0
- package/dist/types/client.d.ts +4 -0
- package/dist/types/createIcon.d.ts +5 -0
- package/dist/types/iconStack.d.ts +77 -0
- package/dist/types/icons/ai.d.ts +2 -0
- package/dist/types/icons/index.d.ts +4 -4
- package/dist/types/icons/shapes.d.ts +0 -1
- package/dist/types/icons/sustainability.d.ts +0 -1
- package/dist/types/icons/weather.d.ts +2 -0
- package/dist/types/index.d.ts +5 -1
- package/dist/types/stacking.d.ts +49 -0
- package/dist/types/types.d.ts +32 -0
- package/package.json +2 -2
|
@@ -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
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,
|
|
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,
|
|
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>>;
|
|
@@ -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>>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -47,13 +47,17 @@
|
|
|
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 } from './NiceIconStacker';
|
|
58
|
+
export { NiceIconStack, niceIconStackCode, renderIconStack, isValidTextBinding } from './iconStack';
|
|
59
|
+
export type { NiceIconStackProps, NiceIconResolver, RenderIconStackOptions } from './iconStack';
|
|
60
|
+
export type { NiceIconStackerProps, NiceIconStackerHandle, NiceIconStackLayer, } from './NiceIconStacker';
|
|
57
61
|
export { AnimationController as NiceAnimationController, AnimationController, InteractiveIcon as NiceInteractiveIcon, InteractiveIcon, useAnimationSequence, createAnimationSequence, createHoverAnimation, createClickAnimation, createVisibilityAnimation, PRESET_SEQUENCES, PRESET_INTERACTIONS, } from './animationControls';
|
|
58
62
|
export type { AnimationStep, AnimationSequenceConfig, AnimationPlaybackState, AnimationTrigger, InteractiveAnimationConfig, AnimationControllerHandle, AnimationControllerProps, InteractiveIconProps, } from './animationControls';
|
|
59
63
|
export { exportIconToFigmaNode, exportIconToSvgString, exportIconToDataUrl, generateFigmaPluginManifest, downloadIconAsSvg, downloadIconAsPng, copyIconToClipboard, batchExportIcons, } from './figmaExport';
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
/**
|
|
16
|
+
* Top-left corner of a stacked icon `size` units big inside the 24-unit box. A `half-…` position is
|
|
17
|
+
* halfway between the centre and the edge or corner it names (1.3.6).
|
|
18
|
+
*/
|
|
19
|
+
export declare function stackPlacement(align: IconStackAlign, size: number): [number, number];
|
|
20
|
+
/** A corner badge — a full corner; `half-` corners sit inside the parent like its centre. */
|
|
21
|
+
export declare function isCornerBadge(align: IconStackAlign): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Font size of text children by length: one character 9, two 7.5, three 6, more 5 (1.3.6 — three
|
|
24
|
+
* quarters of the first sizes, so a number sits inside a star or a circle with room round it).
|
|
25
|
+
*/
|
|
26
|
+
export declare function defaultTextSize(length: number): number;
|
|
27
|
+
export interface StackContext {
|
|
28
|
+
variant: IconVariant;
|
|
29
|
+
/** The parent's primary as drawn (a gradient's `url(#…)` included). */
|
|
30
|
+
primaryColor: string;
|
|
31
|
+
accentColor: string;
|
|
32
|
+
/** The cutout variant's tile colour — what fills the cut shape's surroundings. */
|
|
33
|
+
tileColor: string;
|
|
34
|
+
strokeWidth: number;
|
|
35
|
+
/** Where text is centred — the icon's visual centre. */
|
|
36
|
+
textCenter: readonly [number, number];
|
|
37
|
+
textColor?: string;
|
|
38
|
+
textSize?: number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The children of an icon, drawn into it. Colours given on a child win; otherwise:
|
|
42
|
+
* - content inside — centred, at an edge or halfway out — is cut out of a filled parent: an icon child takes
|
|
43
|
+
* the parent's accent as its primary (and the parent's primary as its accent, so its own text
|
|
44
|
+
* and details read), text the accent; on `outline` / `wireframe` it stays in the parent's
|
|
45
|
+
* colours; in a cutout it takes the tile's colour, drawn solid in the cut;
|
|
46
|
+
* - a corner badge keeps the parent's colours and sits on a disc of the accent colour a little
|
|
47
|
+
* larger than itself — a gap cut into the parent where they overlap, unseen beyond it.
|
|
48
|
+
*/
|
|
49
|
+
export declare function renderStackChildren(children: ReactNode, ctx: StackContext): ReactNode;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -269,9 +269,41 @@ export interface NtdIconProps extends Omit<SVGProps<SVGSVGElement>, 'ref'> {
|
|
|
269
269
|
* @example `transformOrigin="top left"`
|
|
270
270
|
*/
|
|
271
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'`; `half-…`
|
|
275
|
+
* positions sit halfway from the centre to that edge or corner (1.3.6). Text children
|
|
276
|
+
* (`<NtdStar>1</NtdStar>`) are centred on the icon.
|
|
277
|
+
*/
|
|
278
|
+
stackAlign?: IconStackAlign;
|
|
279
|
+
/**
|
|
280
|
+
* This icon's size as a share of the icon it is stacked in (1.3.5). Default `0.6` centred, `0.5`
|
|
281
|
+
* at an edge or a corner.
|
|
282
|
+
*/
|
|
283
|
+
stackSize?: number;
|
|
284
|
+
/**
|
|
285
|
+
* Colour of text children (1.3.5). Default: the accent colour on a filled variant (the text reads
|
|
286
|
+
* as a cut), primary on `outline` / `wireframe`.
|
|
287
|
+
*/
|
|
288
|
+
textColor?: string;
|
|
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
|
+
*/
|
|
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;
|
|
272
299
|
/** Accessible title for screen readers */
|
|
273
300
|
title?: string;
|
|
274
301
|
}
|
|
302
|
+
/**
|
|
303
|
+
* Where a stacked icon sits inside the icon it is a child of — the centre, an edge or a corner
|
|
304
|
+
* (1.3.5), or halfway from the centre to one (`half-…`, 1.3.6).
|
|
305
|
+
*/
|
|
306
|
+
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';
|
|
275
307
|
/**
|
|
276
308
|
* Props received by icon path renderer functions inside {@link CreateIconOptions.paths}.
|
|
277
309
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice2dev/icons",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
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.
|
|
112
|
+
"@nice2dev/ui-core": "^1.3.6",
|
|
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",
|