mirror of
https://github.com/iconify/iconify.git
synced 2024-11-09 23:00:56 +00:00
Add hidden property to IconifyInfo
This commit is contained in:
parent
ef497e029f
commit
4c9e723032
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@iconify/types",
|
||||
"description": "Types for Iconify data",
|
||||
"version": "1.0.10",
|
||||
"version": "1.0.12",
|
||||
"author": "Vjacheslav Trushkin",
|
||||
"license": "(Apache-2.0 OR GPL-2.0)",
|
||||
"main": "./index.js",
|
||||
|
@ -158,6 +158,9 @@ export interface IconifyInfo {
|
||||
// Palette status. True if icons have predefined color scheme, false if icons use currentColor.
|
||||
// Ideally, icon set should not mix icons with and without palette to simplify search.
|
||||
palette?: boolean;
|
||||
|
||||
// If true, icon set should not appear in icon sets list.
|
||||
hidden?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
18
packages/utils/package-lock.json
generated
18
packages/utils/package-lock.json
generated
@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "@iconify/utils",
|
||||
"version": "1.0.13",
|
||||
"version": "1.0.18",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@iconify/utils",
|
||||
"version": "1.0.13",
|
||||
"version": "1.0.18",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@iconify/types": "^1.0.10"
|
||||
"@iconify/types": "^1.0.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify/library-builder": "^1.0.3",
|
||||
@ -723,9 +723,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@iconify/types": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@iconify/types/-/types-1.0.10.tgz",
|
||||
"integrity": "sha512-SN3z6einVeUckDQiE8p4POF7X4hk4/y2+a7a4ogJOCxX5XT6z1zXNN8dwS5O1vloXpc6mkHizRZm2qPnhK6NnQ=="
|
||||
"version": "1.0.12",
|
||||
"resolved": "https://registry.npmjs.org/@iconify/types/-/types-1.0.12.tgz",
|
||||
"integrity": "sha512-6er6wSGF3hgc1JEZqiGpg21CTCjHBYOUwqLmb2Idzkjiw6ogalGP0ZMLVutCzah+0WB4yP+Zd2oVPN8jvJ+Ftg=="
|
||||
},
|
||||
"node_modules/@istanbuljs/load-nyc-config": {
|
||||
"version": "1.1.0",
|
||||
@ -5832,9 +5832,9 @@
|
||||
}
|
||||
},
|
||||
"@iconify/types": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@iconify/types/-/types-1.0.10.tgz",
|
||||
"integrity": "sha512-SN3z6einVeUckDQiE8p4POF7X4hk4/y2+a7a4ogJOCxX5XT6z1zXNN8dwS5O1vloXpc6mkHizRZm2qPnhK6NnQ=="
|
||||
"version": "1.0.12",
|
||||
"resolved": "https://registry.npmjs.org/@iconify/types/-/types-1.0.12.tgz",
|
||||
"integrity": "sha512-6er6wSGF3hgc1JEZqiGpg21CTCjHBYOUwqLmb2Idzkjiw6ogalGP0ZMLVutCzah+0WB4yP+Zd2oVPN8jvJ+Ftg=="
|
||||
},
|
||||
"@istanbuljs/load-nyc-config": {
|
||||
"version": "1.1.0",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "@iconify/utils",
|
||||
"description": "Common functions for working with Iconify icon sets used by various packages.",
|
||||
"author": "Vjacheslav Trushkin",
|
||||
"version": "1.0.18",
|
||||
"version": "1.0.19",
|
||||
"license": "MIT",
|
||||
"bugs": "https://github.com/iconify/iconify/issues",
|
||||
"homepage": "https://iconify.design/",
|
||||
@ -24,7 +24,7 @@
|
||||
"module": "./lib/index.mjs",
|
||||
"exports": {
|
||||
"./*": "./*",
|
||||
".": {
|
||||
"./": {
|
||||
"require": "./lib/index.js",
|
||||
"import": "./lib/index.mjs"
|
||||
},
|
||||
@ -134,7 +134,7 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@iconify/types": "^1.0.10"
|
||||
"@iconify/types": "^1.0.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify/library-builder": "^1.0.3",
|
||||
|
@ -37,6 +37,9 @@ export interface LegacyIconifyInfo {
|
||||
// Category
|
||||
category?: string;
|
||||
palette?: 'Colorless' | 'Colorful';
|
||||
|
||||
// Hidden
|
||||
hidden?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -252,6 +255,11 @@ export function convertIconSetInfo(
|
||||
break;
|
||||
}
|
||||
|
||||
// Hidden
|
||||
if (source.hidden === true) {
|
||||
info.hidden = true;
|
||||
}
|
||||
|
||||
// Parse all old strings
|
||||
Object.keys(source).forEach((key) => {
|
||||
const value = source[key];
|
||||
|
@ -238,6 +238,7 @@ describe('Testing convertIconSetInfo', () => {
|
||||
height: [16, 24],
|
||||
category: 'General',
|
||||
palette: false,
|
||||
hidden: true,
|
||||
};
|
||||
const result = convertIconSetInfo(raw);
|
||||
const expected: IconifyInfo = {
|
||||
@ -258,6 +259,7 @@ describe('Testing convertIconSetInfo', () => {
|
||||
height: [16, 24],
|
||||
category: 'General',
|
||||
palette: false,
|
||||
hidden: true,
|
||||
};
|
||||
expect(result).toEqual(expected);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user