Skip to content

Commit 630a58c

Browse files
committed
Version 2.0.0
Some icons got added whereby the total gzipped size is increased by 10kb. This also brings the icons up to date with materialdesignicons.com There have been a few breaking changes: - rdio got removed - readability got removed - burst-mode got removed, you could still use camera-burst instead - stackoverflow got renamed to stack-overflow - flag-outline-variant got renamed to flag-variant-outline - car-convertable got renamed to car-convertible
1 parent e64bef3 commit 630a58c

File tree

137 files changed

+165
-50
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+165
-50
lines changed

docs/bundle.js

Lines changed: 10 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.html

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@
1212
padding: 3em;
1313
font: 15px/1.4 'Helvetica Neue';
1414
font-weight: 300;
15-
-webkit-user-select: none;
1615
background: #eeeded;
16+
user-select: none;
17+
-webkit-user-select: none;
18+
-moz-user-select: none;
19+
-ms-user-select: none;
1720
}
1821

1922
.panel {
@@ -47,7 +50,6 @@
4750
text-align: center;
4851
color: rgba(0, 0, 0, .5);
4952
transition: color 300ms;
50-
-webkit-user-select: all;
5153
}
5254

5355
.icon.hide {
@@ -58,6 +60,10 @@
5860
color: rgb(4, 0, 128);
5961
}
6062

63+
.icon > * {
64+
pointer-events: none;
65+
}
66+
6167
.icon svg {
6268
display: inline-block;
6369
fill: currentColor;
@@ -67,11 +73,16 @@
6773
padding: 0 15px;
6874
}
6975

70-
label {
71-
overflow: hidden;
72-
white-space: nowrap;
76+
.icon input {
7377
display: block;
74-
font-size: 11px;
78+
width: 100%;
79+
outline: none;
80+
border: 0;
81+
text-align: center;
82+
margin-top: -13px;
83+
padding: 0;
84+
background: none;
85+
color: rgba(0, 0, 0, .6);
7586
}
7687
</style>
7788
</head>

docs/index.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ const iconSearch = require('simple-text-search')(iconNames)
44
const icons = require('../index')(paths, 'vendor-prefix')
55
const debounce = require('lodash.debounce')
66

7-
87
function toIcon (name) {
98
return `
109
<div class="icon" name="${name}">
1110
${icons.getIcon(name, `title="${name}"`)}
12-
<label>${name}</label>
11+
<input type="text" value="${name}" autocorrect="false" spellcheck="false"/>
1312
</div>
1413
`
1514
}
@@ -49,10 +48,15 @@ if (typeof window !== 'undefined') {
4948
}), 100)
5049

5150
wrapper.addEventListener('click', function (evt) {
51+
if (!evt.target || evt.target.className !== 'icon') return
52+
53+
const el = evt.target.querySelector('input')
54+
const name = el.value
55+
el.select()
56+
5257
try {
53-
var success = document.execCommand('copy')
54-
var name = window.getSelection().baseNode.data
55-
console.log(`Copied the icon ${name} into the clipboard`)
58+
document.execCommand('copy')
59+
console.log(`Copied the icon '${name}' into the clipboard`)
5660
} catch (err) {
5761
return console.error('Copy is not supported', err)
5862
}

download.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ fs.mkdir('./paths', function (err) {
3939
var mainPackageId = init.packages[0].id
4040
getMdiApi('/package/' + mainPackageId, function(data) {
4141
var paths = data.icons.reduce(function (all, icon) {
42+
if (icon.name === 'package') icon.name = 'package-regular'
4243
all[icon.name] = icon.data
4344
return all
4445
}, {})
@@ -47,7 +48,7 @@ fs.mkdir('./paths', function (err) {
4748
fs.writeFile(join(__dirname, 'paths.json'), json, function (err) {
4849
if (err) throw err
4950

50-
const promises = data.icons.map((icon) => writeFile(join(__dirname, 'paths', `${icon.name}.json`), `"${icon.data}"`))
51+
const promises = Object.keys(paths).map((icon) => writeFile(join(__dirname, 'paths', `${icon}.json`), `"${paths[icon]}"`))
5152
Promise.all(promises).then(() => process.exit(0))
5253
})
5354
})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "material-design-icons-svg",
3-
"version": "1.1.2",
3+
"version": "2.0.0",
44
"description": "Material design icons svgs from materialdesignicons.com",
55
"scripts": {
66
"download": "rm -Rf paths.json ./paths && node download.js && mv paths/package.json paths/package-regular.json"

paths.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"M13.5,5A3.5,3.5 0 0,0 10,8.5A3.5,3.5 0 0,0 13.5,12C14.25,12 14.94,11.76 15.5,11.36C16.07,11.76 16.76,12 17.5,12A3.5,3.5 0 0,0 21,8.5A3.5,3.5 0 0,0 17.5,5C16.76,5 16.08,5.25 15.5,5.65C14.95,5.24 14.25,5 13.5,5M13.5,6.5A2,2 0 0,1 15.5,8.5A2,2 0 0,1 13.5,10.5A2,2 0 0,1 11.5,8.5A2,2 0 0,1 13.5,6.5M17.5,6.5A2,2 0 0,1 19.5,8.5A2,2 0 0,1 17.5,10.5C17.14,10.5 16.81,10.4 16.5,10.23C16.82,9.72 17,9.13 17,8.5C17,7.87 16.82,7.28 16.5,6.77C16.81,6.6 17.14,6.5 17.5,6.5M3,8V11H0V13H3V16H5V13H8V11H5V8H3M13.5,13C11.33,13 7,14.08 7,16.25V19H24V16.25C24,14.08 19.67,13 17.5,13C16.95,13 16.25,13.08 15.5,13.22C14.78,13.08 14.07,13 13.5,13M13.5,14.5C15.94,14.5 18.5,15.71 18.5,16.25V17.5H8.5V16.25C8.5,15.71 11.06,14.5 13.5,14.5M19.08,14.66C20.93,15 22.5,15.83 22.5,16.25V17.5H20V16.25C20,15.63 19.64,15.1 19.08,14.66Z"

paths/account-plus-outline.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"M15,4A4,4 0 0,0 11,8A4,4 0 0,0 15,12A4,4 0 0,0 19,8A4,4 0 0,0 15,4M15,5.9C16.16,5.9 17.1,6.84 17.1,8C17.1,9.16 16.16,10.1 15,10.1A2.1,2.1 0 0,1 12.9,8A2.1,2.1 0 0,1 15,5.9M4,7V10H1V12H4V15H6V12H9V10H6V7H4M15,13C12.33,13 7,14.33 7,17V20H23V17C23,14.33 17.67,13 15,13M15,14.9C17.97,14.9 21.1,16.36 21.1,17V18.1H8.9V17C8.9,16.36 12,14.9 15,14.9Z"

paths/allo.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"M22,12V21C22,21.5 21.76,21.82 21.3,21.96C20.85,22.1 20.5,21.97 20.2,21.56L18.66,19.45C16.78,21.14 14.56,22 12,22C9.25,22 6.9,21 4.95,19.05C3,17.1 2,14.75 2,12C2,9.25 3,6.9 4.95,4.95C6.9,3 9.25,2 12,2C14.75,2 17.1,3 19.05,4.95C21,6.9 22,9.25 22,12Z"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"M12.5,19.5V3.47H14.53V19.5H12.5M9.5,19.5V3.47H11.53V19.5H9.5M4.5,7.5L8.53,11.5L4.5,15.47V12.47H1.5V10.5H4.5V7.5M19.5,15.47L15.5,11.5L19.5,7.5V10.5H22.5V12.47H19.5V15.47Z"

0 commit comments

Comments
 (0)