@vaadin/vaadin-material-styles 23.1.0-alpha3 → 23.1.0-alpha4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/gulpfile.js +23 -23
- package/mixins/input-field-shared.js +1 -1
- package/package.json +3 -3
- package/version.js +1 -1
package/gulpfile.js
CHANGED
|
@@ -23,46 +23,46 @@ function sortIconFilesNormalized(file1, file2) {
|
|
|
23
23
|
return file1.replace(/-/g, '~').localeCompare(file2.replace(/-/g, '~'), 'en-US');
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
gulp.task('icons', async
|
|
26
|
+
gulp.task('icons', async () => {
|
|
27
27
|
const folder = 'icons/svg/';
|
|
28
28
|
let glyphs;
|
|
29
29
|
|
|
30
30
|
// Optimize the source files
|
|
31
31
|
gulp
|
|
32
|
-
.src(folder
|
|
32
|
+
.src(`${folder}*.svg`)
|
|
33
33
|
.pipe(
|
|
34
34
|
svgmin({
|
|
35
35
|
plugins: [
|
|
36
36
|
{
|
|
37
|
-
removeTitle: true
|
|
37
|
+
removeTitle: true,
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
|
-
removeViewBox: false
|
|
40
|
+
removeViewBox: false,
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
cleanupNumericValues: {
|
|
44
|
-
floatPrecision: 6
|
|
45
|
-
}
|
|
44
|
+
floatPrecision: 6,
|
|
45
|
+
},
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
convertPathData: {
|
|
49
|
-
floatPrecision: 6
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
})
|
|
49
|
+
floatPrecision: 6,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
}),
|
|
54
54
|
)
|
|
55
55
|
.pipe(gulp.dest(folder))
|
|
56
|
-
.on('finish',
|
|
56
|
+
.on('finish', () => {
|
|
57
57
|
// icon font
|
|
58
58
|
gulp
|
|
59
|
-
.src(folder
|
|
59
|
+
.src(`${folder}*.svg`)
|
|
60
60
|
.pipe(
|
|
61
61
|
sort({
|
|
62
62
|
comparator: function (file1, file2) {
|
|
63
63
|
return sortIconFilesNormalized(file1.relative, file2.relative);
|
|
64
|
-
}
|
|
65
|
-
})
|
|
64
|
+
},
|
|
65
|
+
}),
|
|
66
66
|
)
|
|
67
67
|
.pipe(
|
|
68
68
|
iconfont({
|
|
@@ -71,15 +71,15 @@ gulp.task('icons', async function () {
|
|
|
71
71
|
fontHeight: 2400,
|
|
72
72
|
descent: 400,
|
|
73
73
|
normalize: true,
|
|
74
|
-
timestamp: 1 // Truthy!
|
|
75
|
-
})
|
|
74
|
+
timestamp: 1, // Truthy!
|
|
75
|
+
}),
|
|
76
76
|
)
|
|
77
|
-
.on('glyphs',
|
|
77
|
+
.on('glyphs', (glyphData) => {
|
|
78
78
|
// Store for later use
|
|
79
79
|
glyphs = glyphData;
|
|
80
80
|
})
|
|
81
81
|
.pipe(gulp.dest('.'))
|
|
82
|
-
.on('finish',
|
|
82
|
+
.on('finish', () => {
|
|
83
83
|
// Generate base64 version of the font
|
|
84
84
|
const materialIconsWoff = fs.readFileSync('material-icons.woff');
|
|
85
85
|
// Write the output to font-icons.js
|
|
@@ -105,7 +105,7 @@ $_documentContainer.innerHTML = \`
|
|
|
105
105
|
`;
|
|
106
106
|
glyphs.forEach((g) => {
|
|
107
107
|
const name = g.name.replace(/\s/g, '-').toLowerCase();
|
|
108
|
-
const unicode =
|
|
108
|
+
const unicode = `\\\\${g.unicode[0].charCodeAt(0).toString(16)}`;
|
|
109
109
|
output += ` --material-icons-${name}: "${unicode}";\n`;
|
|
110
110
|
});
|
|
111
111
|
output += ` }
|
|
@@ -114,21 +114,21 @@ $_documentContainer.innerHTML = \`
|
|
|
114
114
|
|
|
115
115
|
document.head.appendChild($_documentContainer.content);
|
|
116
116
|
`;
|
|
117
|
-
fs.writeFile('font-icons.js', output,
|
|
117
|
+
fs.writeFile('font-icons.js', output, (err) => {
|
|
118
118
|
if (err) {
|
|
119
119
|
return console.error(err);
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
122
|
|
|
123
123
|
const list = glyphs.map((g) => g.name);
|
|
124
|
-
fs.writeFile('test/glyphs.json', JSON.stringify(list, null, 2),
|
|
124
|
+
fs.writeFile('test/glyphs.json', JSON.stringify(list, null, 2), (err) => {
|
|
125
125
|
if (err) {
|
|
126
126
|
return console.error(err);
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
129
|
|
|
130
130
|
// Cleanup
|
|
131
|
-
fs.unlink('material-icons.woff',
|
|
131
|
+
fs.unlink('material-icons.woff', (err) => {
|
|
132
132
|
if (err) {
|
|
133
133
|
return console.error(err);
|
|
134
134
|
}
|
|
@@ -189,7 +189,7 @@ const inputField = css`
|
|
|
189
189
|
const inputFieldShared = [requiredField, fieldButton, helper, inputField];
|
|
190
190
|
|
|
191
191
|
registerStyles('', inputFieldShared, {
|
|
192
|
-
moduleId: 'material-input-field-shared-styles'
|
|
192
|
+
moduleId: 'material-input-field-shared-styles',
|
|
193
193
|
});
|
|
194
194
|
|
|
195
195
|
export { inputField, inputFieldShared };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/vaadin-material-styles",
|
|
3
|
-
"version": "23.1.0-
|
|
3
|
+
"version": "23.1.0-alpha4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@polymer/polymer": "^3.0.0",
|
|
42
|
-
"@vaadin/vaadin-themable-mixin": "23.1.0-
|
|
42
|
+
"@vaadin/vaadin-themable-mixin": "23.1.0-alpha4"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"gulp": "^4.0.2",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"gulp-sort": "^2.0.0",
|
|
49
49
|
"gulp-svgmin": "^4.1.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "aacdb7fe09811894751f0378ff7fb66071892c71"
|
|
52
52
|
}
|