@nice2dev/icons 1.2.1 → 1.2.2
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 +39 -0
- package/dist/cjs/NiceDesktopIconExporter.js +7 -3
- package/dist/cjs/NiceFaviconGenerator.js +6 -2
- package/dist/cjs/NiceIconPicker.js +20 -10
- package/dist/cjs/NiceIconPreview.js +3 -1
- package/dist/cjs/NiceIconSetCreator.js +7 -2
- package/dist/cjs/NtdIconBadge.js +18 -3
- package/dist/cjs/NtdIconMorph.js +3 -1
- package/dist/cjs/design-tokens.js +2 -0
- package/dist/cjs/iconMetadata.js +4 -0
- package/dist/cjs/icons/actions.js +22 -0
- package/dist/cjs/icons/index.js +8 -0
- package/dist/cjs/icons/shapes.js +67 -0
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/nicetodev-icons.css +1 -1
- package/dist/cjs/resolver.js +9 -0
- package/dist/cjs/utilities.js +4 -2
- package/dist/esm/NiceDesktopIconExporter.js +7 -3
- package/dist/esm/NiceFaviconGenerator.js +6 -2
- package/dist/esm/NiceIconPicker.js +20 -10
- package/dist/esm/NiceIconPreview.js +3 -1
- package/dist/esm/NiceIconSetCreator.js +7 -2
- package/dist/esm/NtdIconBadge.js +18 -3
- package/dist/esm/NtdIconMorph.js +3 -1
- package/dist/esm/design-tokens.js +2 -0
- package/dist/esm/iconMetadata.js +4 -0
- package/dist/esm/icons/actions.js +21 -1
- package/dist/esm/icons/index.js +2 -2
- package/dist/esm/icons/shapes.js +62 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/nicetodev-icons.css +1 -1
- package/dist/esm/resolver.js +9 -0
- package/dist/esm/utilities.js +4 -2
- package/dist/types/design-tokens.d.ts +2 -0
- package/dist/types/icons/actions.d.ts +2 -0
- package/dist/types/icons/index.d.ts +2 -2
- package/dist/types/icons/shapes.d.ts +6 -0
- package/package.json +3 -1
package/dist/esm/resolver.js
CHANGED
|
@@ -130,6 +130,15 @@ const NAME_MAP = {
|
|
|
130
130
|
package: 'NtdPackage',
|
|
131
131
|
layers: 'NtdLayers',
|
|
132
132
|
grid: 'NtdGrid',
|
|
133
|
+
// 1.2.2: geometry tools and object grouping (built-ins of the same names in ui-core)
|
|
134
|
+
point: 'NtdPoint',
|
|
135
|
+
segment: 'NtdSegment',
|
|
136
|
+
perpendicular: 'NtdPerpendicular',
|
|
137
|
+
parallel: 'NtdParallel',
|
|
138
|
+
midpoint: 'NtdMidpoint',
|
|
139
|
+
'angle-bisector': 'NtdAngleBisector',
|
|
140
|
+
group: 'NtdGroup',
|
|
141
|
+
ungroup: 'NtdUngroup',
|
|
133
142
|
list: 'NtdList',
|
|
134
143
|
table: 'NtdTable',
|
|
135
144
|
monitor: 'NtdMonitor',
|
package/dist/esm/utilities.js
CHANGED
|
@@ -334,16 +334,18 @@ function isValidIconName(name) {
|
|
|
334
334
|
function useBatchIcons(configs) {
|
|
335
335
|
const [icons, setIcons] = useState(new Map());
|
|
336
336
|
const [isLoading, setIsLoading] = useState(true);
|
|
337
|
+
// the names, not the array: a new array of the same icons must not reload them
|
|
338
|
+
const namesKey = configs.map((c) => c.name).join(',');
|
|
337
339
|
useEffect(() => {
|
|
338
340
|
const loadIcons = async () => {
|
|
339
341
|
setIsLoading(true);
|
|
340
|
-
const names =
|
|
342
|
+
const names = namesKey ? namesKey.split(',') : [];
|
|
341
343
|
const loadedIcons = await preloadIcons(names);
|
|
342
344
|
setIcons(loadedIcons);
|
|
343
345
|
setIsLoading(false);
|
|
344
346
|
};
|
|
345
347
|
loadIcons();
|
|
346
|
-
}, [
|
|
348
|
+
}, [namesKey]);
|
|
347
349
|
const renderIcon = useCallback((name, additionalProps) => {
|
|
348
350
|
const Icon = icons.get(name);
|
|
349
351
|
const config = configs.find((c) => c.name === name);
|
|
@@ -24,3 +24,5 @@ export declare const NtdLogIn: import("react").ForwardRefExoticComponent<import(
|
|
|
24
24
|
export declare const NtdLogOut: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
25
25
|
export declare const NtdLock: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
26
26
|
export declare const NtdUnlock: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
27
|
+
export declare const NtdGroup: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
28
|
+
export declare const NtdUngroup: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { NtdArrowUp, NtdArrowDown, NtdArrowLeft, NtdArrowRight, NtdChevronUp, NtdChevronDown, NtdChevronLeft, NtdChevronRight, NtdMenu, NtdClose, NtdMoreHorizontal, NtdMoreVertical, NtdExternalLink, NtdRefresh, } from './navigation';
|
|
2
|
-
export { NtdSearch, NtdEdit, NtdTrash, NtdSave, NtdDownload, NtdUpload, NtdShare, NtdCopy, NtdClipboard, NtdPlus, NtdMinus, NtdCheck, NtdFilter, NtdSort, NtdPrint, NtdZoomIn, NtdZoomOut, NtdUndo, NtdRedo, NtdReply, NtdLink, NtdSettings, NtdLogIn, NtdLogOut, NtdLock, NtdUnlock, } from './actions';
|
|
2
|
+
export { NtdSearch, NtdEdit, 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, 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
4
|
export { NtdRecycle, NtdCompost, NtdTrashSort, NtdSolarPanel, NtdWindTurbine, NtdEvCharger, NtdHydropower, 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';
|
|
@@ -8,7 +8,7 @@ export { NtdPlay, NtdPause, NtdStop, NtdSkipForward, NtdSkipBack, NtdVolume, Ntd
|
|
|
8
8
|
export { NtdFile, NtdFileText, NtdFolder, NtdFolderOpen, NtdArchive, NtdDatabase, NtdCloud, NtdCloudUpload, NtdCloudDownload, NtdTerminal, NtdCode, NtdGit, NtdPackage, NtdLayers, NtdGrid, NtdList, NtdTable, NtdSmartphone, NtdMonitor, NtdCpu, NtdZap, NtdKey, NtdAward, NtdCoffee, NtdCart, NtdCreditCard, NtdPieChart, NtdBarChart, NtdActivity, NtdTarget, NtdTruck, } from './files';
|
|
9
9
|
export { NtdDumpsterFire, NtdRocket, NtdGamepad, NtdPuzzle, NtdPartyPopper, NtdTrophy, NtdCrown, NtdDice, NtdSmiley, NtdSad, NtdSkull, NtdGhost, NtdLightning, } from './fun';
|
|
10
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, } from './shapes';
|
|
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';
|
|
12
12
|
export { NtdBriefcase, NtdDollar, NtdWallet, NtdReceipt, NtdBank, NtdTrendUp, NtdTrendDown, NtdPercent, NtdInvoice, 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';
|
|
@@ -20,3 +20,9 @@ export declare const NtdMinimize: import("react").ForwardRefExoticComponent<impo
|
|
|
20
20
|
export declare const NtdMove: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
21
21
|
export declare const NtdRepeat: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
22
22
|
export declare const NtdShuffle: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
23
|
+
export declare const NtdPoint: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
24
|
+
export declare const NtdSegment: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
25
|
+
export declare const NtdPerpendicular: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
26
|
+
export declare const NtdParallel: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
27
|
+
export declare const NtdMidpoint: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
28
|
+
export declare const NtdAngleBisector: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice2dev/icons",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
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",
|
|
@@ -103,11 +103,13 @@
|
|
|
103
103
|
"nicetodev"
|
|
104
104
|
],
|
|
105
105
|
"peerDependencies": {
|
|
106
|
+
"@nice2dev/ui-core": "^1.2.0",
|
|
106
107
|
"react": ">=17.0.0",
|
|
107
108
|
"react-dom": ">=17.0.0"
|
|
108
109
|
},
|
|
109
110
|
"devDependencies": {
|
|
110
111
|
"@chromatic-com/storybook": "^5.3.1",
|
|
112
|
+
"@nice2dev/ui-core": "^1.2.2",
|
|
111
113
|
"@rollup/plugin-commonjs": "^29.0.3",
|
|
112
114
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
113
115
|
"@rollup/plugin-typescript": "^12.3.0",
|