diff --git a/.svglintrc.js b/.svglintrc.js new file mode 100644 index 00000000..53f3338a --- /dev/null +++ b/.svglintrc.js @@ -0,0 +1,45 @@ +module.exports = { + rules: { + elm: { + svg: 1, + 'svg > style': 0, + 'g > :only-child': 0, + }, + attr: [ + { + 'rule::selector': 'svg', + viewBox: true, + version: false, + id: false, + 'data-name': false, + class: false, + style: false, + xmlns: 'http://www.w3.org/2000/svg', + fill: false, + 'xmlns:dc': false, + 'xmlns:cc': false, + 'xmlns:rdf': false, + 'xmlns:svg': false, + 'xml:space': false, + 'xmlns:sodipodi': false, + 'xmlns:inkscape': false, + x: false, + y: false, + }, + { + 'rule::selector': 'svg g', + style: false, + fill: false, + id: false, + class: false, + }, + { + 'rule::selector': 'svg path', + style: false, + fill: false, + 'fill-opacity': false, + class: false, + }, + ], + }, +}; diff --git a/libs/icons/src/lib/png/business.png b/libs/icons/src/lib/png/business.png deleted file mode 100644 index ff9f2948..00000000 Binary files a/libs/icons/src/lib/png/business.png and /dev/null differ diff --git a/libs/icons/src/lib/png/consumer.png b/libs/icons/src/lib/png/consumer.png deleted file mode 100644 index c695cd70..00000000 Binary files a/libs/icons/src/lib/png/consumer.png and /dev/null differ diff --git a/libs/icons/src/lib/png/country.png b/libs/icons/src/lib/png/country.png deleted file mode 100644 index 556972a9..00000000 Binary files a/libs/icons/src/lib/png/country.png and /dev/null differ diff --git a/libs/icons/src/lib/png/culture.png b/libs/icons/src/lib/png/culture.png deleted file mode 100644 index e1c27302..00000000 Binary files a/libs/icons/src/lib/png/culture.png and /dev/null differ diff --git a/libs/icons/src/lib/png/disability.png b/libs/icons/src/lib/png/disability.png deleted file mode 100644 index 6ac94fe3..00000000 Binary files a/libs/icons/src/lib/png/disability.png and /dev/null differ diff --git a/libs/icons/src/lib/png/documents.png b/libs/icons/src/lib/png/documents.png deleted file mode 100644 index db16af2e..00000000 Binary files a/libs/icons/src/lib/png/documents.png and /dev/null differ diff --git a/libs/icons/src/lib/png/education.png b/libs/icons/src/lib/png/education.png deleted file mode 100644 index 2fae7b85..00000000 Binary files a/libs/icons/src/lib/png/education.png and /dev/null differ diff --git a/libs/icons/src/lib/png/error.png b/libs/icons/src/lib/png/error.png deleted file mode 100644 index a838b72b..00000000 Binary files a/libs/icons/src/lib/png/error.png and /dev/null differ diff --git a/libs/icons/src/lib/png/family.png b/libs/icons/src/lib/png/family.png deleted file mode 100644 index f63c771e..00000000 Binary files a/libs/icons/src/lib/png/family.png and /dev/null differ diff --git a/libs/icons/src/lib/png/grants.png b/libs/icons/src/lib/png/grants.png deleted file mode 100644 index 6976f4f5..00000000 Binary files a/libs/icons/src/lib/png/grants.png and /dev/null differ diff --git a/libs/icons/src/lib/png/healthcare.png b/libs/icons/src/lib/png/healthcare.png deleted file mode 100644 index d09e118e..00000000 Binary files a/libs/icons/src/lib/png/healthcare.png and /dev/null differ diff --git a/libs/icons/src/lib/png/home.png b/libs/icons/src/lib/png/home.png deleted file mode 100644 index 5b3b43bb..00000000 Binary files a/libs/icons/src/lib/png/home.png and /dev/null differ diff --git a/libs/icons/src/lib/png/justice.png b/libs/icons/src/lib/png/justice.png deleted file mode 100644 index 1a155e10..00000000 Binary files a/libs/icons/src/lib/png/justice.png and /dev/null differ diff --git a/libs/icons/src/lib/png/language.png b/libs/icons/src/lib/png/language.png deleted file mode 100644 index 558b6289..00000000 Binary files a/libs/icons/src/lib/png/language.png and /dev/null differ diff --git a/libs/icons/src/lib/png/menu-icon.png b/libs/icons/src/lib/png/menu-icon.png deleted file mode 100644 index 238cfd66..00000000 Binary files a/libs/icons/src/lib/png/menu-icon.png and /dev/null differ diff --git a/libs/icons/src/lib/png/money.png b/libs/icons/src/lib/png/money.png deleted file mode 100644 index 48752331..00000000 Binary files a/libs/icons/src/lib/png/money.png and /dev/null differ diff --git a/libs/icons/src/lib/png/my-data.png b/libs/icons/src/lib/png/my-data.png deleted file mode 100644 index 203a50fd..00000000 Binary files a/libs/icons/src/lib/png/my-data.png and /dev/null differ diff --git a/libs/icons/src/lib/png/security.png b/libs/icons/src/lib/png/security.png deleted file mode 100644 index 72ceb1a2..00000000 Binary files a/libs/icons/src/lib/png/security.png and /dev/null differ diff --git a/libs/icons/src/lib/png/special-req.png b/libs/icons/src/lib/png/special-req.png deleted file mode 100644 index a8a19023..00000000 Binary files a/libs/icons/src/lib/png/special-req.png and /dev/null differ diff --git a/libs/icons/src/lib/png/success.png b/libs/icons/src/lib/png/success.png deleted file mode 100644 index be3b87aa..00000000 Binary files a/libs/icons/src/lib/png/success.png and /dev/null differ diff --git a/libs/icons/src/lib/png/traffic.png b/libs/icons/src/lib/png/traffic.png deleted file mode 100644 index a7ecfa04..00000000 Binary files a/libs/icons/src/lib/png/traffic.png and /dev/null differ diff --git a/libs/icons/src/lib/png/warning.png b/libs/icons/src/lib/png/warning.png deleted file mode 100644 index 6305a39c..00000000 Binary files a/libs/icons/src/lib/png/warning.png and /dev/null differ diff --git a/libs/icons/src/lib/png/work.png b/libs/icons/src/lib/png/work.png deleted file mode 100644 index 9bcfabd5..00000000 Binary files a/libs/icons/src/lib/png/work.png and /dev/null differ diff --git a/libs/icons/src/lib/png/x-icon.png b/libs/icons/src/lib/png/x-icon.png deleted file mode 100644 index c8598b61..00000000 Binary files a/libs/icons/src/lib/png/x-icon.png and /dev/null differ diff --git a/libs/icons/src/lib/svg/action.svg b/libs/icons/src/lib/svg/action.svg index 102e3464..0e94a322 100644 --- a/libs/icons/src/lib/svg/action.svg +++ b/libs/icons/src/lib/svg/action.svg @@ -1,3 +1,3 @@ - - + + diff --git a/libs/icons/src/lib/svg/arrow-down-alt.svg b/libs/icons/src/lib/svg/arrow-down-alt.svg index fcb09452..b81e42f9 100644 --- a/libs/icons/src/lib/svg/arrow-down-alt.svg +++ b/libs/icons/src/lib/svg/arrow-down-alt.svg @@ -1,6 +1,3 @@ - - + + diff --git a/libs/icons/src/lib/svg/arrow-down.svg b/libs/icons/src/lib/svg/arrow-down.svg index e31f9ab1..e7aeab41 100644 --- a/libs/icons/src/lib/svg/arrow-down.svg +++ b/libs/icons/src/lib/svg/arrow-down.svg @@ -1,3 +1,3 @@ - - + + diff --git a/libs/icons/src/lib/svg/arrow-up-alt.svg b/libs/icons/src/lib/svg/arrow-up-alt.svg index 4cc9425a..caf073de 100644 --- a/libs/icons/src/lib/svg/arrow-up-alt.svg +++ b/libs/icons/src/lib/svg/arrow-up-alt.svg @@ -1,6 +1,3 @@ - - + + diff --git a/libs/icons/src/lib/svg/arrow-up.svg b/libs/icons/src/lib/svg/arrow-up.svg index bfa12f5e..ca54bf04 100644 --- a/libs/icons/src/lib/svg/arrow-up.svg +++ b/libs/icons/src/lib/svg/arrow-up.svg @@ -1,8 +1,3 @@ - - + + diff --git a/libs/icons/src/lib/svg/call.svg b/libs/icons/src/lib/svg/call.svg index d32c5329..44f75464 100644 --- a/libs/icons/src/lib/svg/call.svg +++ b/libs/icons/src/lib/svg/call.svg @@ -1,5 +1,3 @@ - - - + diff --git a/libs/icons/src/lib/svg/check-circle-outline.svg b/libs/icons/src/lib/svg/check-circle-outline.svg index 34b002a0..f2233a13 100644 --- a/libs/icons/src/lib/svg/check-circle-outline.svg +++ b/libs/icons/src/lib/svg/check-circle-outline.svg @@ -1,4 +1,4 @@ - - - + + + diff --git a/libs/icons/src/lib/svg/edit.svg b/libs/icons/src/lib/svg/edit.svg index 7baaa1cd..646d38eb 100644 --- a/libs/icons/src/lib/svg/edit.svg +++ b/libs/icons/src/lib/svg/edit.svg @@ -1,11 +1,8 @@ - - - - - - - - - - + + + diff --git a/libs/icons/src/lib/svg/email.svg b/libs/icons/src/lib/svg/email.svg index 699d9897..568e0d40 100644 --- a/libs/icons/src/lib/svg/email.svg +++ b/libs/icons/src/lib/svg/email.svg @@ -1,5 +1,3 @@ - - - + diff --git a/libs/icons/src/lib/svg/error-outline.svg b/libs/icons/src/lib/svg/error-outline.svg index e209b3e5..0bcf0ffa 100644 --- a/libs/icons/src/lib/svg/error-outline.svg +++ b/libs/icons/src/lib/svg/error-outline.svg @@ -1,4 +1,6 @@ - - - + + + + diff --git a/libs/icons/src/lib/svg/happy-face.svg b/libs/icons/src/lib/svg/happy-face.svg index 9589385f..80fc2405 100644 --- a/libs/icons/src/lib/svg/happy-face.svg +++ b/libs/icons/src/lib/svg/happy-face.svg @@ -1,5 +1,5 @@ - - - + + + diff --git a/libs/icons/src/lib/svg/info.svg b/libs/icons/src/lib/svg/info.svg index 6ec81a32..027fe7f2 100644 --- a/libs/icons/src/lib/svg/info.svg +++ b/libs/icons/src/lib/svg/info.svg @@ -1,3 +1,3 @@ - + diff --git a/libs/icons/src/lib/svg/location.svg b/libs/icons/src/lib/svg/location.svg index b73de42e..deaa60c6 100644 --- a/libs/icons/src/lib/svg/location.svg +++ b/libs/icons/src/lib/svg/location.svg @@ -1,5 +1,3 @@ - - - + diff --git a/libs/icons/src/lib/svg/sad-face.svg b/libs/icons/src/lib/svg/sad-face.svg index a30ec84d..1506c730 100644 --- a/libs/icons/src/lib/svg/sad-face.svg +++ b/libs/icons/src/lib/svg/sad-face.svg @@ -1,5 +1,5 @@ - - - + + + diff --git a/libs/icons/src/lib/svg/screen-share.svg b/libs/icons/src/lib/svg/screen-share.svg index 585b7fbb..1926b388 100644 --- a/libs/icons/src/lib/svg/screen-share.svg +++ b/libs/icons/src/lib/svg/screen-share.svg @@ -1,5 +1,3 @@ - - - + diff --git a/libs/icons/src/lib/svg/sort.svg b/libs/icons/src/lib/svg/sort.svg index ad948314..2a45eb41 100644 --- a/libs/icons/src/lib/svg/sort.svg +++ b/libs/icons/src/lib/svg/sort.svg @@ -1,4 +1,4 @@ - - - + + + diff --git a/libs/icons/src/lib/svg/user.svg b/libs/icons/src/lib/svg/user.svg index 3f3030d4..936e004c 100644 --- a/libs/icons/src/lib/svg/user.svg +++ b/libs/icons/src/lib/svg/user.svg @@ -1,3 +1,3 @@ - - + + diff --git a/libs/icons/src/lib/svg/veera.svg b/libs/icons/src/lib/svg/veera.svg deleted file mode 100644 index c12bae58..00000000 --- a/libs/icons/src/lib/svg/veera.svg +++ /dev/null @@ -1 +0,0 @@ -veera-logo \ No newline at end of file diff --git a/libs/icons/src/lib/svg/warning-amber.svg b/libs/icons/src/lib/svg/warning-amber.svg index a5e7de94..80c9a932 100644 --- a/libs/icons/src/lib/svg/warning-amber.svg +++ b/libs/icons/src/lib/svg/warning-amber.svg @@ -1,14 +1,6 @@ - - - - - - - - - - - - + + + + diff --git a/libs/storybook/.storybook/theme.js b/libs/storybook/.storybook/theme.js index 74fda6c1..3818a1c7 100644 --- a/libs/storybook/.storybook/theme.js +++ b/libs/storybook/.storybook/theme.js @@ -1,5 +1,5 @@ import { create } from '@storybook/theming'; -import logo from '../../icons/src/lib/svg/logo.svg'; +import logo from '../src/lib/assets/images/logo.svg'; export default create({ base: 'light', diff --git a/libs/icons/src/lib/svg/logo.svg b/libs/storybook/src/lib/assets/images/logo.svg similarity index 100% rename from libs/icons/src/lib/svg/logo.svg rename to libs/storybook/src/lib/assets/images/logo.svg diff --git a/libs/storybook/src/lib/stories/icons-list.stories.mdx b/libs/storybook/src/lib/stories/icons-list.stories.mdx index e943f0fd..efe4d803 100644 --- a/libs/storybook/src/lib/stories/icons-list.stories.mdx +++ b/libs/storybook/src/lib/stories/icons-list.stories.mdx @@ -1,17 +1,25 @@ import {Meta, Story} from '@storybook/addon-docs'; import { storybookIconsNames } from '../../../../ui/src/lib/icons/storybook-icons'; - + - - {{ - props: {icons: storybookIconsNames}, - template: ` - - - - - - `, - }} +export const Template = (args) => ({ props: { ...args, icons: storybookIconsNames }, template: ` + + + + + +` }) + +Switch to *Canvas* tab for a full-screen view. + + + { Template.bind({}) } diff --git a/libs/storybook/src/lib/stories/icons.stories.mdx b/libs/storybook/src/lib/stories/icons.stories.mdx index 13760ada..d55b0080 100644 --- a/libs/storybook/src/lib/stories/icons.stories.mdx +++ b/libs/storybook/src/lib/stories/icons.stories.mdx @@ -14,9 +14,9 @@ import iconsPkg from '/libs/icons/package.json' }} -1. Install the library +1. Install the library: ``` npm i --save @ria/veera-icons ``` -2. Check the usage page for examples +2. Check the usage page for examples. diff --git a/package-lock.json b/package-lock.json index 3ce43a93..80379d3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -81,6 +81,7 @@ "react": "17.0.2", "react-dom": "17.0.2", "storybook-addon-pseudo-states": "^1.15.1", + "svglint": "^2.2.0", "ts-jest": "27.1.5", "ts-node": "10.9.1", "typescript": "~4.7.2", @@ -26100,6 +26101,12 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -28116,6 +28123,22 @@ "devOptional": true, "license": "MIT" }, + "node_modules/fast-xml-parser": { + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz", + "integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==", + "dev": true, + "dependencies": { + "strnum": "^1.0.4" + }, + "bin": { + "xml2js": "cli.js" + }, + "funding": { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + }, "node_modules/fastq": { "version": "1.14.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.14.0.tgz", @@ -47030,6 +47053,12 @@ "node": ">=0.10.0" } }, + "node_modules/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", + "dev": true + }, "node_modules/strong-log-transformer": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz", @@ -47439,6 +47468,522 @@ "node": ">=4.2.0" } }, + "node_modules/svglint": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/svglint/-/svglint-2.2.0.tgz", + "integrity": "sha512-0Cd0Mi87QPU+VT0TGXNtLPRFOtT5b92APGmrI7iHfUqTQSquRaIDHm1rbU6J9aHCNSVitKgPVaGMCV9ykwJiiQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1", + "chalk": "^5.0.0", + "cheerio": "^1.0.0-rc.6", + "fast-xml-parser": "^3.12.13", + "glob": "^7.1.2", + "htmlparser2": "^3.9.1", + "log-update": "^5.0.0", + "meow": "^10.1.1", + "strip-ansi": "^7.0.0" + }, + "bin": { + "svglint": "bin/cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || ^16.0.0 || >=18.0.0" + } + }, + "node_modules/svglint/node_modules/ansi-escapes": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-5.0.0.tgz", + "integrity": "sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==", + "dev": true, + "dependencies": { + "type-fest": "^1.0.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/svglint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/svglint/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/camelcase-keys": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz", + "integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==", + "dev": true, + "dependencies": { + "camelcase": "^6.3.0", + "map-obj": "^4.1.0", + "quick-lru": "^5.1.1", + "type-fest": "^1.2.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/chalk": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", + "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/svglint/node_modules/cli-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "dev": true, + "dependencies": { + "restore-cursor": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/decamelize": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz", + "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "dependencies": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + } + }, + "node_modules/svglint/node_modules/dom-serializer/node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/svglint/node_modules/dom-serializer/node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/svglint/node_modules/domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "node_modules/svglint/node_modules/domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "dev": true, + "dependencies": { + "domelementtype": "1" + } + }, + "node_modules/svglint/node_modules/domutils": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "dev": true, + "dependencies": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "node_modules/svglint/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/svglint/node_modules/entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + }, + "node_modules/svglint/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/svglint/node_modules/htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "dev": true, + "dependencies": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, + "node_modules/svglint/node_modules/indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/log-update": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-5.0.1.tgz", + "integrity": "sha512-5UtUDQ/6edw4ofyljDNcOVJQ4c7OjDro4h3y8e1GQL5iYElYclVHJ3zeWchylvMaKnDbDilC8irOVyexnA/Slw==", + "dev": true, + "dependencies": { + "ansi-escapes": "^5.0.0", + "cli-cursor": "^4.0.0", + "slice-ansi": "^5.0.0", + "strip-ansi": "^7.0.1", + "wrap-ansi": "^8.0.1" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/meow": { + "version": "10.1.5", + "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.5.tgz", + "integrity": "sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==", + "dev": true, + "dependencies": { + "@types/minimist": "^1.2.2", + "camelcase-keys": "^7.0.0", + "decamelize": "^5.0.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.2", + "read-pkg-up": "^8.0.0", + "redent": "^4.0.0", + "trim-newlines": "^4.0.2", + "type-fest": "^1.2.2", + "yargs-parser": "^20.2.9" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/svglint/node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/read-pkg": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz", + "integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^3.0.2", + "parse-json": "^5.2.0", + "type-fest": "^1.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/read-pkg-up": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz", + "integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==", + "dev": true, + "dependencies": { + "find-up": "^5.0.0", + "read-pkg": "^6.0.0", + "type-fest": "^1.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/redent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz", + "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==", + "dev": true, + "dependencies": { + "indent-string": "^5.0.0", + "strip-indent": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/restore-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/slice-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/svglint/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/svglint/node_modules/strip-ansi/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/svglint/node_modules/strip-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz", + "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==", + "dev": true, + "dependencies": { + "min-indent": "^1.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/trim-newlines": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.0.2.tgz", + "integrity": "sha512-GJtWyq9InR/2HRiLZgpIKv+ufIKrVrvjQWEj7PxAXNc5dwbNJkqhAUoAGgzRmULAnoOM5EIpveYd3J2VeSAIew==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/wrap-ansi": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz", + "integrity": "sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/svglint/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/svgo": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", diff --git a/package.json b/package.json index e6482560..259ce0b3 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "build": "nx build", "test": "nx test", "lint:all": "nx workspace-lint && nx run-many --target=lint --all", + "lint:svg": "svglint ./libs/icons/src/lib/svg/*.svg --ci", "affected:lint": "nx affected:lint --fix --parallel --uncommitted", "workspace-lint": "nx workspace-lint --uncommitted", "storybook:compodoc": "npx compodoc -p ./tsconfig.compodoc.json -e json -d ./libs/storybook/.storybook --disableLifeCycleHooks --disableInternal", @@ -98,6 +99,7 @@ "react": "17.0.2", "react-dom": "17.0.2", "storybook-addon-pseudo-states": "^1.15.1", + "svglint": "^2.2.0", "ts-jest": "27.1.5", "ts-node": "10.9.1", "typescript": "~4.7.2",