@vaadin/vaadin-material-styles 23.2.0-alpha2 → 23.2.0-alpha5
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/color.d.ts +1 -1
- package/font-icons.js +3 -3
- package/mixins/field-button.d.ts +1 -1
- package/mixins/helper.d.ts +1 -1
- package/mixins/input-field-shared.d.ts +1 -1
- package/mixins/menu-overlay.d.ts +1 -1
- package/mixins/overlay.d.ts +1 -1
- package/mixins/required-field.d.ts +1 -1
- package/package.json +4 -4
- package/shadow.d.ts +1 -1
- package/typography.d.ts +1 -1
- package/user-colors.d.ts +1 -1
- package/version.js +1 -1
- package/gulpfile.js +0 -138
package/color.d.ts
CHANGED
package/font-icons.js
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import './version.js';
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const template = document.createElement('template');
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
template.innerHTML = `
|
|
11
11
|
<style>
|
|
12
12
|
@font-face {
|
|
13
13
|
font-family: 'material-icons';
|
|
@@ -36,4 +36,4 @@ $_documentContainer.innerHTML = `
|
|
|
36
36
|
</style>
|
|
37
37
|
`;
|
|
38
38
|
|
|
39
|
-
document.head.appendChild(
|
|
39
|
+
document.head.appendChild(template.content);
|
package/mixins/field-button.d.ts
CHANGED
package/mixins/helper.d.ts
CHANGED
package/mixins/menu-overlay.d.ts
CHANGED
package/mixins/overlay.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/vaadin-material-styles",
|
|
3
|
-
"version": "23.2.0-
|
|
3
|
+
"version": "23.2.0-alpha5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"module": "all-imports.js",
|
|
21
21
|
"type": "module",
|
|
22
22
|
"scripts": {
|
|
23
|
-
"icons": "gulp icons"
|
|
23
|
+
"icons": "gulp icons --gulpfile gulpfile.cjs"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"*.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@polymer/polymer": "^3.0.0",
|
|
42
|
-
"@vaadin/vaadin-themable-mixin": "23.2.0-
|
|
42
|
+
"@vaadin/vaadin-themable-mixin": "23.2.0-alpha5"
|
|
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": "c6247fd741d61096d75a71feda4a1faf88b6f0ce"
|
|
52
52
|
}
|
package/shadow.d.ts
CHANGED
package/typography.d.ts
CHANGED
package/user-colors.d.ts
CHANGED
package/version.js
CHANGED
package/gulpfile.js
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
/* eslint-env node */
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
const gulp = require('gulp');
|
|
5
|
-
const iconfont = require('gulp-iconfont');
|
|
6
|
-
const fs = require('fs');
|
|
7
|
-
const svgmin = require('gulp-svgmin');
|
|
8
|
-
const sort = require('gulp-sort');
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Normalize file sort order across platforms (OS X vs Linux, maybe others).
|
|
12
|
-
*
|
|
13
|
-
* Before: `[..., 'eye-disabled', 'eye', ...]`
|
|
14
|
-
* After: `[..., 'eye', 'eye-disabled', ...]`
|
|
15
|
-
*
|
|
16
|
-
* Order of appearance impacts assigned Unicode codepoints, and sometimes build diffs.
|
|
17
|
-
*
|
|
18
|
-
* @see https://github.com/nfroidure/svgicons2svgfont/pull/82
|
|
19
|
-
* @see https://github.com/nfroidure/svgicons2svgfont/blob/master/src/filesorter.js
|
|
20
|
-
* @see http://support.ecisolutions.com/doc-ddms/help/reportsmenu/ascii_sort_order_chart.htm
|
|
21
|
-
*/
|
|
22
|
-
function sortIconFilesNormalized(file1, file2) {
|
|
23
|
-
return file1.replace(/-/g, '~').localeCompare(file2.replace(/-/g, '~'), 'en-US');
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
gulp.task('icons', async () => {
|
|
27
|
-
const folder = 'icons/svg/';
|
|
28
|
-
let glyphs;
|
|
29
|
-
|
|
30
|
-
// Optimize the source files
|
|
31
|
-
gulp
|
|
32
|
-
.src(`${folder}*.svg`)
|
|
33
|
-
.pipe(
|
|
34
|
-
svgmin({
|
|
35
|
-
plugins: [
|
|
36
|
-
{
|
|
37
|
-
removeTitle: true,
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
removeViewBox: false,
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
cleanupNumericValues: {
|
|
44
|
-
floatPrecision: 6,
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
convertPathData: {
|
|
49
|
-
floatPrecision: 6,
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
}),
|
|
54
|
-
)
|
|
55
|
-
.pipe(gulp.dest(folder))
|
|
56
|
-
.on('finish', () => {
|
|
57
|
-
// Icon font
|
|
58
|
-
gulp
|
|
59
|
-
.src(`${folder}*.svg`)
|
|
60
|
-
.pipe(
|
|
61
|
-
sort({
|
|
62
|
-
comparator(file1, file2) {
|
|
63
|
-
return sortIconFilesNormalized(file1.relative, file2.relative);
|
|
64
|
-
},
|
|
65
|
-
}),
|
|
66
|
-
)
|
|
67
|
-
.pipe(
|
|
68
|
-
iconfont({
|
|
69
|
-
fontName: 'material-icons',
|
|
70
|
-
formats: ['woff'],
|
|
71
|
-
fontHeight: 2400,
|
|
72
|
-
descent: 400,
|
|
73
|
-
normalize: true,
|
|
74
|
-
timestamp: 1, // Truthy!
|
|
75
|
-
}),
|
|
76
|
-
)
|
|
77
|
-
.on('glyphs', (glyphData) => {
|
|
78
|
-
// Store for later use
|
|
79
|
-
glyphs = glyphData;
|
|
80
|
-
})
|
|
81
|
-
.pipe(gulp.dest('.'))
|
|
82
|
-
.on('finish', () => {
|
|
83
|
-
// Generate base64 version of the font
|
|
84
|
-
const materialIconsWoff = fs.readFileSync('material-icons.woff');
|
|
85
|
-
// Write the output to font-icons.js
|
|
86
|
-
let output = `/**
|
|
87
|
-
* @license
|
|
88
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
89
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
90
|
-
*/
|
|
91
|
-
import './version.js';
|
|
92
|
-
|
|
93
|
-
const $_documentContainer = document.createElement('template');
|
|
94
|
-
|
|
95
|
-
$_documentContainer.innerHTML = \`
|
|
96
|
-
<style>
|
|
97
|
-
@font-face {
|
|
98
|
-
font-family: 'material-icons';
|
|
99
|
-
src: url(data:application/font-woff;charset=utf-8;base64,${materialIconsWoff.toString('base64')}) format('woff');
|
|
100
|
-
font-weight: normal;
|
|
101
|
-
font-style: normal;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
html {
|
|
105
|
-
`;
|
|
106
|
-
glyphs.forEach((g) => {
|
|
107
|
-
const name = g.name.replace(/\s/g, '-').toLowerCase();
|
|
108
|
-
const unicode = `\\\\${g.unicode[0].charCodeAt(0).toString(16)}`;
|
|
109
|
-
output += ` --material-icons-${name}: "${unicode}";\n`;
|
|
110
|
-
});
|
|
111
|
-
output += ` }
|
|
112
|
-
</style>
|
|
113
|
-
\`;
|
|
114
|
-
|
|
115
|
-
document.head.appendChild($_documentContainer.content);
|
|
116
|
-
`;
|
|
117
|
-
fs.writeFile('font-icons.js', output, (err) => {
|
|
118
|
-
if (err) {
|
|
119
|
-
return console.error(err);
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
const list = glyphs.map((g) => g.name);
|
|
124
|
-
fs.writeFile('test/glyphs.json', JSON.stringify(list, null, 2), (err) => {
|
|
125
|
-
if (err) {
|
|
126
|
-
return console.error(err);
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
// Cleanup
|
|
131
|
-
fs.unlink('material-icons.woff', (err) => {
|
|
132
|
-
if (err) {
|
|
133
|
-
return console.error(err);
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
});
|
|
138
|
-
});
|