Skip to content

Commit

Permalink
chore: cleaner css for icon, update utils and tailwind plugin, update…
Browse files Browse the repository at this point in the history
… dependencies
  • Loading branch information
cyberalien committed Jun 6, 2023
1 parent 00d825d commit 7bec945
Show file tree
Hide file tree
Showing 17 changed files with 2,943 additions and 1,387 deletions.
14 changes: 7 additions & 7 deletions components/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@
"@iconify/types": "workspace:^"
},
"devDependencies": {
"@babel/preset-env": "^7.21.4",
"@babel/preset-react": "^7.18.6",
"@babel/preset-env": "^7.22.4",
"@babel/preset-react": "^7.22.3",
"@iconify/core": "workspace:^",
"@iconify/utils": "workspace:^",
"@microsoft/api-extractor": "^7.34.4",
"@rollup/plugin-node-resolve": "^15.0.1",
"@types/react": "^18.0.31",
"@microsoft/api-extractor": "^7.35.1",
"@rollup/plugin-node-resolve": "^15.1.0",
"@types/react": "^18.2.8",
"babel-jest": "^29.5.0",
"jest": "^29.5.0",
"react": "^18.2.0",
"react-test-renderer": "^18.2.0",
"rimraf": "^4.4.1",
"rollup": "^3.20.2",
"typescript": "^5.0.3"
"rollup": "^3.23.1",
"typescript": "^5.1.3"
},
"peerDependencies": {
"react": ">=16"
Expand Down
18 changes: 9 additions & 9 deletions components/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@
"devDependencies": {
"@iconify/core": "workspace:^",
"@iconify/utils": "workspace:^",
"@microsoft/api-extractor": "^7.34.4",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-typescript": "^11.0.0",
"@sveltejs/vite-plugin-svelte": "^2.0.4",
"@microsoft/api-extractor": "^7.35.1",
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-typescript": "^11.1.1",
"@sveltejs/vite-plugin-svelte": "^2.4.1",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/svelte": "^3.2.2",
"@tsconfig/svelte": "^4.0.1",
"@types/jest": "^29.5.0",
"@types/node": "^18.15.11",
"@types/jest": "^29.5.2",
"@types/node": "^18.16.16",
"rimraf": "^4.4.1",
"rollup": "^3.20.2",
"rollup-plugin-svelte": "^7.1.4",
"rollup": "^3.23.1",
"rollup-plugin-svelte": "^7.1.5",
"svelte": "3.58.0",
"svelte-preprocess": "^5.0.3",
"svelte-preprocess": "^5.0.4",
"vitest": "^0.29.8"
},
"peerDependencies": {
Expand Down
22 changes: 11 additions & 11 deletions components/svg-framework/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,21 @@
"devDependencies": {
"@iconify/core": "workspace:^",
"@iconify/utils": "workspace:^",
"@microsoft/api-extractor": "^7.34.4",
"@rollup/plugin-node-resolve": "^15.0.1",
"@microsoft/api-extractor": "^7.35.1",
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/plugin-terser": "^0.4.0",
"@types/jest": "^29.5.0",
"@rollup/plugin-terser": "^0.4.3",
"@types/jest": "^29.5.2",
"@types/jsdom": "^21.1.1",
"@types/node": "^18.15.11",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@types/node": "^18.16.16",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"cross-env": "^7.0.3",
"eslint": "^8.37.0",
"eslint": "^8.42.0",
"jest": "^29.5.0",
"jsdom": "^21.1.1",
"jsdom": "^21.1.2",
"rimraf": "^4.4.1",
"rollup": "^3.20.2",
"ts-jest": "^29.0.5",
"typescript": "^5.0.3"
"rollup": "^3.23.1",
"ts-jest": "^29.1.0",
"typescript": "^5.1.3"
}
}
18 changes: 9 additions & 9 deletions components/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@
"@iconify/types": "workspace:^"
},
"devDependencies": {
"@babel/preset-env": "^7.21.4",
"@babel/preset-env": "^7.22.4",
"@iconify/core": "workspace:^",
"@iconify/utils": "workspace:^",
"@microsoft/api-extractor": "^7.34.4",
"@rollup/plugin-node-resolve": "^15.0.1",
"@types/jest": "^29.5.0",
"@vitejs/plugin-vue": "^4.1.0",
"@microsoft/api-extractor": "^7.35.1",
"@rollup/plugin-node-resolve": "^15.1.0",
"@types/jest": "^29.5.2",
"@vitejs/plugin-vue": "^4.2.3",
"@vue/test-utils": "^2.3.2",
"jsdom": "^21.1.1",
"rollup": "^3.20.2",
"typescript": "^5.0.3",
"jsdom": "^21.1.2",
"rollup": "^3.23.1",
"typescript": "^5.1.3",
"vitest": "^0.29.8",
"vue": "^3.2.47"
"vue": "^3.3.4"
},
"peerDependencies": {
"vue": ">=3"
Expand Down
12 changes: 6 additions & 6 deletions components/vue2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@
"@iconify/types": "workspace:^"
},
"devDependencies": {
"@babel/preset-env": "^7.21.4",
"@babel/preset-env": "^7.22.4",
"@iconify/core": "workspace:^",
"@iconify/utils": "workspace:^",
"@microsoft/api-extractor": "^7.34.4",
"@microsoft/api-extractor": "^7.35.1",
"@rollup/plugin-node-resolve": "^13.3.0",
"@types/jest": "^29.5.0",
"@vue/test-utils": "^1.3.4",
"@vue/vue2-jest": "^29.2.3",
"@types/jest": "^29.5.2",
"@vue/test-utils": "^1.3.6",
"@vue/vue2-jest": "^29.2.4",
"babel-jest": "^29.5.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"rollup": "^2.79.1",
"typescript": "^5.0.3",
"typescript": "^5.1.3",
"vue": "^2.7.14",
"vue-template-compiler": "^2.7.14"
},
Expand Down
22 changes: 11 additions & 11 deletions iconify-icon/icon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,21 @@
"devDependencies": {
"@iconify/core": "workspace:^",
"@iconify/utils": "workspace:^",
"@microsoft/api-extractor": "^7.34.4",
"@rollup/plugin-node-resolve": "^15.0.1",
"@microsoft/api-extractor": "^7.35.1",
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/plugin-terser": "^0.4.0",
"@types/jest": "^29.5.0",
"@rollup/plugin-terser": "^0.4.3",
"@types/jest": "^29.5.2",
"@types/jsdom": "^21.1.1",
"@types/node": "^18.15.11",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@types/node": "^18.16.16",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"cross-env": "^7.0.3",
"eslint": "^8.37.0",
"eslint": "^8.42.0",
"jest": "^29.5.0",
"jsdom": "^21.1.1",
"jsdom": "^21.1.2",
"rimraf": "^4.4.1",
"rollup": "^3.20.2",
"ts-jest": "^29.0.5",
"typescript": "^5.0.3"
"rollup": "^3.23.1",
"ts-jest": "^29.1.0",
"typescript": "^5.1.3"
}
}
4 changes: 2 additions & 2 deletions iconify-icon/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
"iconify-icon": "workspace:^"
},
"devDependencies": {
"@types/react": "^18.0.31",
"@types/react": "^18.2.8",
"@types/react-test-renderer": "^18.0.0",
"@vitejs/plugin-react": "^3.1.0",
"jest": "^29.5.0",
"react": "^18.2.0",
"react-test-renderer": "^18.2.0",
"rimraf": "^4.4.1",
"tsup": "^6.7.0",
"typescript": "^5.0.3",
"typescript": "^5.1.3",
"vitest": "^0.29.8"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions iconify-icon/solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
},
"devDependencies": {
"rimraf": "^4.4.1",
"solid-js": "^1.7.1",
"typescript": "^5.0.3"
"solid-js": "^1.7.6",
"typescript": "^5.1.3"
},
"peerDependencies": {
"solid-js": ">=1"
Expand Down
10 changes: 5 additions & 5 deletions packages/api-redundancy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
"directory": "packages/api-redundancy"
},
"devDependencies": {
"@types/jest": "^29.5.0",
"@types/node": "^18.15.11",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@typescript-eslint/parser": "^5.57.0",
"@types/jest": "^29.5.2",
"@types/node": "^18.16.16",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",
"cross-env": "^7.0.3",
"eslint": "^8.37.0",
"eslint": "^8.42.0",
"tsup": "^6.7.0",
"vitest": "^0.29.8"
}
Expand Down
14 changes: 7 additions & 7 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,16 @@
"@iconify/utils": "workspace:^"
},
"devDependencies": {
"@types/jest": "^29.5.0",
"@types/node": "^18.15.11",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"cross-fetch": "^3.1.5",
"eslint": "^8.37.0",
"@types/jest": "^29.5.2",
"@types/node": "^18.16.16",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"cross-fetch": "^3.1.6",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"rimraf": "^4.4.1",
"typescript": "^5.0.3",
"unbuild": "^1.2.0",
"typescript": "^5.1.3",
"unbuild": "^1.2.1",
"vitest": "^0.29.8"
}
}
20 changes: 10 additions & 10 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"description": "Common functions for working with Iconify icon sets used by various packages.",
"author": "Vjacheslav Trushkin",
"version": "2.1.5",
"version": "2.1.6",
"license": "MIT",
"bugs": "https://github.com/iconify/iconify/issues",
"homepage": "https://iconify.design/docs/libraries/utils/",
Expand Down Expand Up @@ -374,24 +374,24 @@
],
"dependencies": {
"@antfu/install-pkg": "^0.1.1",
"@antfu/utils": "^0.7.2",
"@antfu/utils": "^0.7.4",
"@iconify/types": "workspace:^",
"debug": "^4.3.4",
"kolorist": "^1.7.0",
"kolorist": "^1.8.0",
"local-pkg": "^0.4.3"
},
"devDependencies": {
"@iconify-json/flat-color-icons": "^1.1.6",
"@types/debug": "^4.1.7",
"@types/jest": "^29.5.0",
"@types/node": "^18.15.11",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"eslint": "^8.37.0",
"@types/debug": "^4.1.8",
"@types/jest": "^29.5.2",
"@types/node": "^18.16.16",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"rimraf": "^4.4.1",
"typescript": "^5.0.3",
"unbuild": "^1.2.0",
"typescript": "^5.1.3",
"unbuild": "^1.2.1",
"vitest": "^0.29.8"
}
}
6 changes: 4 additions & 2 deletions packages/utils/src/css/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,21 @@ export function getCommonCSSRules(

switch (options.mode) {
case 'background':
result['background'] = 'no-repeat center / 100%';
if (varName) {
result['background-image'] = 'var(--' + varName + ')';
}
result['background-repeat'] = 'no-repeat';
result['background-size'] = '100% 100%';
break;

case 'mask':
result['background-color'] = 'currentColor';
result['mask'] = result['-webkit-mask'] = 'no-repeat center / 100%';
if (varName) {
result['mask-image'] = result['-webkit-mask-image'] =
'var(--' + varName + ')';
}
result['mask-repeat'] = result['-webkit-mask-repeat'] = 'no-repeat';
result['mask-size'] = result['-webkit-mask-size'] = '100% 100%';
break;
}

Expand Down
21 changes: 14 additions & 7 deletions packages/utils/tests/icon-to-css-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ describe('Testing CSS for icon', () => {
display: inline-block;
width: 1.5em;
height: 1em;
background: no-repeat center / 100%;
background-repeat: no-repeat;
background-size: 100% 100%;
background-image: ${expectedURL};
}
`);
Expand Down Expand Up @@ -50,7 +51,8 @@ describe('Testing CSS for icon', () => {
width: 1em;
height: 1em;
content: '';
background: no-repeat center / 100%;
background-repeat: no-repeat;
background-size: 100% 100%;
background-image: ${expectedURL};
}
`);
Expand All @@ -76,10 +78,12 @@ describe('Testing CSS for icon', () => {
width: 1em;
height: 1em;
background-color: currentColor;
-webkit-mask: no-repeat center / 100%;
mask: no-repeat center / 100%;
-webkit-mask-image: var(--svg);
mask-image: var(--svg);
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-mask-size: 100% 100%;
mask-size: 100% 100%;
--svg: ${expectedURL};
}
`);
Expand All @@ -105,7 +109,8 @@ describe('Testing CSS for icon', () => {
display: inline-block;
width: 1em;
height: 1em;
background: no-repeat center / 100%;
background-repeat: no-repeat;
background-size: 100% 100%;
background-image: ${expectedURL};
}
`);
Expand All @@ -130,8 +135,10 @@ describe('Testing CSS for icon', () => {
width: 1em;
height: 1em;
background-color: currentColor;
-webkit-mask: no-repeat center / 100%;
mask: no-repeat center / 100%;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-mask-size: 100% 100%;
mask-size: 100% 100%;
-webkit-mask-image: ${expectedURL};
mask-image: ${expectedURL};
}
Expand Down

0 comments on commit 7bec945

Please sign in to comment.