install simple-icons and add a few brand icons (recommendation from team at lucide)
This commit is contained in:
@@ -12,6 +12,7 @@ const umbracoSvgDirectory = `${moduleDirectory}/svgs`;
|
||||
const iconMapJson = `${moduleDirectory}/icon-dictionary.json`;
|
||||
|
||||
const lucideSvgDirectory = 'node_modules/lucide-static/icons';
|
||||
const simpleIconsSvgDirectory = 'node_modules/simple-icons/icons';
|
||||
|
||||
const run = async () => {
|
||||
var icons = await collectDictionaryIcons();
|
||||
@@ -50,8 +51,39 @@ const collectDictionaryIcons = async () => {
|
||||
};
|
||||
|
||||
icons.push(icon);
|
||||
} catch(e) {
|
||||
console.log(`Could not load file: '${path}'`);
|
||||
} catch (e) {
|
||||
console.log(`[Lucide] Could not load file: '${path}'`);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// SimpleIcons:
|
||||
fileJSON.simpleIcons.forEach((iconDef) => {
|
||||
if (iconDef.file && iconDef.name) {
|
||||
const path = simpleIconsSvgDirectory + "/" + iconDef.file;
|
||||
|
||||
try {
|
||||
const rawData = readFileSync(path);
|
||||
let svg = rawData.toString()
|
||||
const iconFileName = iconDef.name;
|
||||
|
||||
// SimpleIcons need to use fill="currentColor"
|
||||
const pattern = /fill=/g;
|
||||
if (!pattern.test(svg)) {
|
||||
svg = svg.replace(/<path/g, '<path fill="currentColor"');
|
||||
}
|
||||
|
||||
const icon = {
|
||||
name: iconDef.name,
|
||||
legacy: iconDef.legacy,
|
||||
fileName: iconFileName,
|
||||
svg,
|
||||
output: `${iconsOutputDirectory}/${iconFileName}.js`,
|
||||
};
|
||||
|
||||
icons.push(icon);
|
||||
} catch (e) {
|
||||
console.log(`[SimpleIcons] Could not load file: '${path}'`);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
14
src/Umbraco.Web.UI.Client/package-lock.json
generated
14
src/Umbraco.Web.UI.Client/package-lock.json
generated
@@ -72,6 +72,7 @@
|
||||
"rollup-plugin-esbuild": "^6.1.0",
|
||||
"rollup-plugin-import-css": "^3.4.0",
|
||||
"rollup-plugin-web-worker-loader": "^1.6.1",
|
||||
"simple-icons": "^11.11.0",
|
||||
"storybook": "^7.6.17",
|
||||
"tiny-glob": "^0.2.9",
|
||||
"tsc-alias": "^1.8.8",
|
||||
@@ -18487,6 +18488,19 @@
|
||||
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/simple-icons": {
|
||||
"version": "11.11.0",
|
||||
"resolved": "https://registry.npmjs.org/simple-icons/-/simple-icons-11.11.0.tgz",
|
||||
"integrity": "sha512-jF4FvxqJ5LGRgScMy6IWHYBuKG7SImwzsTDKHhmAB2RQVKEqvGWI8qmAHWYPKEGM8/oRA/VvKTVIbWdg7YPRsg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.12.18"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/simple-icons"
|
||||
}
|
||||
},
|
||||
"node_modules/sisteransi": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
|
||||
|
||||
@@ -226,6 +226,7 @@
|
||||
"rollup-plugin-import-css": "^3.4.0",
|
||||
"rollup-plugin-web-worker-loader": "^1.6.1",
|
||||
"storybook": "^7.6.17",
|
||||
"simple-icons": "^11.11.0",
|
||||
"tiny-glob": "^0.2.9",
|
||||
"tsc-alias": "^1.8.8",
|
||||
"typedoc": "^0.25.10",
|
||||
|
||||
@@ -1486,7 +1486,7 @@
|
||||
{
|
||||
"name": "icon-newspaper-alt",
|
||||
"file": "newspaper.svg",
|
||||
"legacy":true
|
||||
"legacy": true
|
||||
},
|
||||
{
|
||||
"name": "icon-newspaper",
|
||||
@@ -1737,22 +1737,22 @@
|
||||
{
|
||||
"name": "icon-price-dollar",
|
||||
"file": "badge-dollar-sign.svg",
|
||||
"legacy":true
|
||||
"legacy": true
|
||||
},
|
||||
{
|
||||
"name": "icon-price-euro",
|
||||
"file": "badge-euro.svg",
|
||||
"legacy":true
|
||||
"legacy": true
|
||||
},
|
||||
{
|
||||
"name": "icon-price-pound",
|
||||
"file": "badge-pound-sterling.svg",
|
||||
"legacy":true
|
||||
"legacy": true
|
||||
},
|
||||
{
|
||||
"name": "icon-price-yen",
|
||||
"file": "badge-japanese-yen",
|
||||
"legacy":true
|
||||
"legacy": true
|
||||
},
|
||||
{
|
||||
"name": "icon-print",
|
||||
@@ -2429,10 +2429,6 @@
|
||||
"name": "icon-zoom-in",
|
||||
"file": "zoom-in.svg"
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
"name": "icon-zoom-out",
|
||||
"file": "zoom-out.svg"
|
||||
@@ -2446,6 +2442,52 @@
|
||||
"file": "database.svg"
|
||||
}
|
||||
],
|
||||
"simpleIcons": [
|
||||
{
|
||||
"name": "icon-azure",
|
||||
"file": "microsoftazure.svg"
|
||||
},
|
||||
{
|
||||
"name": "icon-facebook",
|
||||
"file": "facebook.svg"
|
||||
},
|
||||
{
|
||||
"name": "icon-gitbook",
|
||||
"file": "gitbook.svg"
|
||||
},
|
||||
{
|
||||
"name": "icon-github",
|
||||
"file": "github.svg"
|
||||
},
|
||||
{
|
||||
"name": "icon-gitlab",
|
||||
"file": "gitlab.svg"
|
||||
},
|
||||
{
|
||||
"name": "icon-google",
|
||||
"file": "google.svg"
|
||||
},
|
||||
{
|
||||
"name": "icon-linkedin",
|
||||
"file": "linkedin.svg"
|
||||
},
|
||||
{
|
||||
"name": "icon-mastodon",
|
||||
"file": "mastodon.svg"
|
||||
},
|
||||
{
|
||||
"name": "icon-microsoft",
|
||||
"file": "microsoft.svg"
|
||||
},
|
||||
{
|
||||
"name": "icon-twitter",
|
||||
"file": "twitter.svg"
|
||||
},
|
||||
{
|
||||
"name": "icon-twitter-x",
|
||||
"file": "x.svg"
|
||||
}
|
||||
],
|
||||
"umbraco": [
|
||||
{
|
||||
"name": "icon-umbraco",
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export default `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Microsoft Azure</title><path fill="currentColor" d="M22.379 23.343a1.62 1.62 0 0 0 1.536-2.14v.002L17.35 1.76A1.62 1.62 0 0 0 15.816.657H8.184A1.62 1.62 0 0 0 6.65 1.76L.086 21.204a1.62 1.62 0 0 0 1.536 2.139h4.741a1.62 1.62 0 0 0 1.535-1.103l.977-2.892 4.947 3.675c.28.208.618.32.966.32m-3.084-12.531 3.624 10.739a.54.54 0 0 1-.51.713v-.001h-.03a.54.54 0 0 1-.322-.106l-9.287-6.9h4.853m6.313 7.006c.116-.326.13-.694.007-1.058L9.79 1.76a1.722 1.722 0 0 0-.007-.02h6.034a.54.54 0 0 1 .512.366l6.562 19.445a.54.54 0 0 1-.338.684"/></svg>`;
|
||||
@@ -0,0 +1 @@
|
||||
export default `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Facebook</title><path fill="currentColor" d="M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z"/></svg>`;
|
||||
@@ -0,0 +1 @@
|
||||
export default `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitBook</title><path fill="currentColor" d="M12.513 1.097c-.645 0-1.233.34-2.407 1.017L3.675 5.82A7.233 7.233 0 0 0 0 12.063v.236a7.233 7.233 0 0 0 3.667 6.238L7.69 20.86c2.354 1.36 3.531 2.042 4.824 2.042 1.292.001 2.47-.678 4.825-2.038l4.251-2.453c1.177-.68 1.764-1.02 2.087-1.579.323-.56.324-1.24.323-2.6v-2.63a1.04 1.04 0 0 0-1.558-.903l-8.728 5.024c-.587.337-.88.507-1.201.507-.323 0-.616-.168-1.204-.506l-5.904-3.393c-.297-.171-.446-.256-.565-.271a.603.603 0 0 0-.634.368c-.045.111-.045.282-.043.625.002.252 0 .378.025.494.053.259.189.493.387.667.089.077.198.14.416.266l6.315 3.65c.589.34.884.51 1.207.51.324 0 .617-.17 1.206-.509l7.74-4.469c.202-.116.302-.172.377-.13.075.044.075.16.075.392v1.193c0 .34.001.51-.08.649-.08.14-.227.224-.522.394l-6.382 3.685c-1.178.68-1.767 1.02-2.413 1.02-.646 0-1.236-.34-2.412-1.022l-5.97-3.452-.043-.025a4.106 4.106 0 0 1-2.031-3.52V11.7c0-.801.427-1.541 1.12-1.944a1.979 1.979 0 0 1 1.982-.001l4.946 2.858c1.174.679 1.762 1.019 2.407 1.02.645 0 1.233-.34 2.41-1.017l7.482-4.306a1.091 1.091 0 0 0 0-1.891L14.92 2.11c-1.175-.675-1.762-1.013-2.406-1.013Z"/></svg>`;
|
||||
@@ -0,0 +1 @@
|
||||
export default `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub</title><path fill="currentColor" d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>`;
|
||||
@@ -0,0 +1 @@
|
||||
export default `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitLab</title><path fill="currentColor" d="m23.6004 9.5927-.0337-.0862L20.3.9814a.851.851 0 0 0-.3362-.405.8748.8748 0 0 0-.9997.0539.8748.8748 0 0 0-.29.4399l-2.2055 6.748H7.5375l-2.2057-6.748a.8573.8573 0 0 0-.29-.4412.8748.8748 0 0 0-.9997-.0537.8585.8585 0 0 0-.3362.4049L.4332 9.5015l-.0325.0862a6.0657 6.0657 0 0 0 2.0119 7.0105l.0113.0087.03.0213 4.976 3.7264 2.462 1.8633 1.4995 1.1321a1.0085 1.0085 0 0 0 1.2197 0l1.4995-1.1321 2.4619-1.8633 5.006-3.7489.0125-.01a6.0682 6.0682 0 0 0 2.0094-7.003z"/></svg>`;
|
||||
@@ -0,0 +1 @@
|
||||
export default `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Google</title><path fill="currentColor" d="M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z"/></svg>`;
|
||||
@@ -0,0 +1 @@
|
||||
export default `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>LinkedIn</title><path fill="currentColor" d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>`;
|
||||
@@ -0,0 +1 @@
|
||||
export default `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Mastodon</title><path fill="currentColor" d="M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z"/></svg>`;
|
||||
@@ -0,0 +1 @@
|
||||
export default `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Microsoft</title><path fill="currentColor" d="M0 0v11.408h11.408V0zm12.594 0v11.408H24V0zM0 12.594V24h11.408V12.594zm12.594 0V24H24V12.594z"/></svg>`;
|
||||
@@ -0,0 +1 @@
|
||||
export default `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>X</title><path fill="currentColor" d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"/></svg>`;
|
||||
@@ -0,0 +1 @@
|
||||
export default `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Twitter</title><path fill="currentColor" d="M21.543 7.104c.015.211.015.423.015.636 0 6.507-4.954 14.01-14.01 14.01v-.003A13.94 13.94 0 0 1 0 19.539a9.88 9.88 0 0 0 7.287-2.041 4.93 4.93 0 0 1-4.6-3.42 4.916 4.916 0 0 0 2.223-.084A4.926 4.926 0 0 1 .96 9.167v-.062a4.887 4.887 0 0 0 2.235.616A4.928 4.928 0 0 1 1.67 3.148 13.98 13.98 0 0 0 11.82 8.292a4.929 4.929 0 0 1 8.39-4.49 9.868 9.868 0 0 0 3.128-1.196 4.941 4.941 0 0 1-2.165 2.724A9.828 9.828 0 0 0 24 4.555a10.019 10.019 0 0 1-2.457 2.549z"/></svg>`;
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,5 @@
|
||||
<svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path
|
||||
d="M15.3499 5.5498C13.7681 5.5498 12.4786 6.81785 12.4504 8.39633L12.4223 9.97138C12.4164 10.3027 12.143 10.5665 11.8117 10.5606C11.7881 10.5602 11.7646 10.5584 11.7413 10.5552L10.1805 10.3423C8.12699 10.0623 6.15883 9.11711 4.27072 7.54387C3.67275 10.8535 4.84 13.147 7.65342 14.9157L9.40041 16.014C9.68095 16.1904 9.7654 16.5608 9.58903 16.8413C9.54861 16.9056 9.49636 16.9616 9.43504 17.0064L7.84338 18.1693C8.78973 18.2288 9.68938 18.1873 10.435 18.0385C15.1526 17.097 18.2897 13.5468 18.2897 7.69084C18.2897 7.21275 17.2774 5.5498 15.3499 5.5498ZM10.4507 8.36066C10.4983 5.69559 12.6735 3.5498 15.3499 3.5498C16.7132 3.5498 17.9465 4.10658 18.8348 5.00515C19.5462 4.9998 20.1514 5.17966 21.5035 4.35943C21.1693 5.9998 21.0034 6.71177 20.2897 7.69084C20.2897 15.3324 15.5926 19.0487 10.8264 19.9998C7.5587 20.6519 2.80646 19.5812 1.44531 18.1584C2.13874 18.1051 4.95928 17.8018 6.58895 16.6089C5.20994 15.6984 -0.278631 12.4679 3.32772 3.78617C5.02119 5.76283 6.73797 7.10831 8.47807 7.82262C9.63548 8.29774 9.91978 8.28825 10.4507 8.36066Z">
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
Reference in New Issue
Block a user