@vaadin/vaadin-lumo-styles 23.2.0-dev.53560527d → 23.2.0
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/README.md +1 -1
- package/badge.d.ts +1 -1
- package/color.d.ts +1 -1
- package/font-icons.js +3 -3
- package/iconset.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/loader.d.ts +3 -0
- package/mixins/loader.js +52 -0
- 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 +6 -6
- package/presets/compact.js +3 -3
- package/sizing.d.ts +1 -1
- package/spacing.d.ts +1 -1
- package/style.d.ts +1 -1
- package/typography.d.ts +1 -1
- package/user-colors.d.ts +1 -1
- package/utility.d.ts +1 -1
- package/vaadin-iconset.js +3 -3
- package/version.js +1 -1
- package/gulpfile.js +0 -216
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
Lumo contains foundational styles – typography, colors, visual style, sizing & spacing and icons – that components and applications can use to achieve a consistent visual design.
|
|
11
11
|
|
|
12
|
-
[Documentation ↗](https://vaadin.com/docs/latest/
|
|
12
|
+
[Documentation ↗](https://vaadin.com/docs/latest/styling/lumo)
|
|
13
13
|
|
|
14
14
|
## License
|
|
15
15
|
|
package/badge.d.ts
CHANGED
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: 'lumo-icons';
|
|
@@ -63,4 +63,4 @@ $_documentContainer.innerHTML = `
|
|
|
63
63
|
</style>
|
|
64
64
|
`;
|
|
65
65
|
|
|
66
|
-
document.head.appendChild(
|
|
66
|
+
document.head.appendChild(template.content);
|
package/iconset.js
CHANGED
|
@@ -10,9 +10,9 @@ console.warn(
|
|
|
10
10
|
`WARNING: Since Vaadin 23.1, using <iron-icon> is deprecated. Please use <vaadin-icon> and '@vaadin/vaadin-lumo-styles/vaadin-iconset.js' instead.`,
|
|
11
11
|
);
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const template = document.createElement('template');
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
template.innerHTML = `<iron-iconset-svg size="1000" name="lumo">
|
|
16
16
|
<svg xmlns="http://www.w3.org/2000/svg">
|
|
17
17
|
<defs>
|
|
18
18
|
<g id="align-center"><path d="M167 217c0-18 17-33 38-34H795c21 0 38 15 38 34 0 18-17 33-38 33H205C184 250 167 235 167 217z m83 191c0-18 13-33 29-33H721c16 0 29 15 29 33 0 18-13 33-29 34H279C263 442 250 427 250 408zM250 792c0-18 13-33 29-34H721c16 0 29 15 29 34s-13 33-29 33H279C263 825 250 810 250 792z m-83-192c0-18 17-33 38-33H795c21 0 38 15 38 33s-17 33-38 33H205C184 633 167 618 167 600z" fill-rule="evenodd" clip-rule="evenodd"></path></g>
|
|
@@ -61,4 +61,4 @@ $_documentContainer.innerHTML = `<iron-iconset-svg size="1000" name="lumo">
|
|
|
61
61
|
</svg>
|
|
62
62
|
</iron-iconset-svg>`;
|
|
63
63
|
|
|
64
|
-
document.head.appendChild(
|
|
64
|
+
document.head.appendChild(template.content);
|
package/mixins/field-button.d.ts
CHANGED
package/mixins/helper.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import { CSSResult } from 'lit';
|
|
6
|
+
import type { CSSResult } from 'lit';
|
|
7
7
|
|
|
8
8
|
export const inputField: CSSResult;
|
|
9
9
|
|
package/mixins/loader.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2022 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import '../color.js';
|
|
7
|
+
import '../sizing.js';
|
|
8
|
+
import { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
9
|
+
|
|
10
|
+
const loader = css`
|
|
11
|
+
[part~='loader'] {
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
width: var(--lumo-icon-size-s);
|
|
14
|
+
height: var(--lumo-icon-size-s);
|
|
15
|
+
border: 2px solid transparent;
|
|
16
|
+
border-color: var(--lumo-primary-color-10pct) var(--lumo-primary-color-10pct) var(--lumo-primary-color)
|
|
17
|
+
var(--lumo-primary-color);
|
|
18
|
+
border-radius: calc(0.5 * var(--lumo-icon-size-s));
|
|
19
|
+
opacity: 0;
|
|
20
|
+
pointer-events: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host(:not([loading])) [part~='loader'] {
|
|
24
|
+
display: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host([loading]) [part~='loader'] {
|
|
28
|
+
animation: 1s linear infinite lumo-loader-rotate, 0.3s 0.1s lumo-loader-fade-in both;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes lumo-loader-fade-in {
|
|
32
|
+
0% {
|
|
33
|
+
opacity: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
100% {
|
|
37
|
+
opacity: 1;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@keyframes lumo-loader-rotate {
|
|
42
|
+
0% {
|
|
43
|
+
transform: rotate(0deg);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
100% {
|
|
47
|
+
transform: rotate(360deg);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
export { loader };
|
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-lumo-styles",
|
|
3
|
-
"version": "23.2.0
|
|
3
|
+
"version": "23.2.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"author": "Vaadin Ltd",
|
|
15
15
|
"homepage": "https://vaadin.com/components",
|
|
16
16
|
"bugs": {
|
|
17
|
-
"url": "https://github.com/vaadin/
|
|
17
|
+
"url": "https://github.com/vaadin/web-components/issues"
|
|
18
18
|
},
|
|
19
19
|
"main": "all-imports.js",
|
|
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",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"@polymer/iron-icon": "^3.0.0",
|
|
43
43
|
"@polymer/iron-iconset-svg": "^3.0.0",
|
|
44
44
|
"@polymer/polymer": "^3.0.0",
|
|
45
|
-
"@vaadin/icon": "23.2.0
|
|
46
|
-
"@vaadin/vaadin-themable-mixin": "23.2.0
|
|
45
|
+
"@vaadin/icon": "^23.2.0",
|
|
46
|
+
"@vaadin/vaadin-themable-mixin": "^23.2.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"gulp": "^4.0.2",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"gulp-sort": "^2.0.0",
|
|
53
53
|
"gulp-svgmin": "^4.1.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "8b1f5941f26ac41ca038e75e24c8584e331bc7a8"
|
|
56
56
|
}
|
package/presets/compact.js
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import '../sizing.js';
|
|
7
7
|
import '../spacing.js';
|
|
8
|
-
const
|
|
8
|
+
const template = document.createElement('template');
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
template.innerHTML = `
|
|
11
11
|
<style>
|
|
12
12
|
/* Use a stronger selector so that imports added later do not override the property values */
|
|
13
13
|
html:not(div) {
|
|
@@ -37,4 +37,4 @@ $_documentContainer.innerHTML = `
|
|
|
37
37
|
</style>
|
|
38
38
|
`;
|
|
39
39
|
|
|
40
|
-
document.head.appendChild(
|
|
40
|
+
document.head.appendChild(template.content);
|
package/sizing.d.ts
CHANGED
package/spacing.d.ts
CHANGED
package/style.d.ts
CHANGED
package/typography.d.ts
CHANGED
package/user-colors.d.ts
CHANGED
package/utility.d.ts
CHANGED
package/vaadin-iconset.js
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
import '@vaadin/icon/vaadin-iconset.js';
|
|
7
7
|
import './version.js';
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const template = document.createElement('template');
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
template.innerHTML = `<vaadin-iconset name="lumo" size="1000">
|
|
12
12
|
<svg xmlns="http://www.w3.org/2000/svg">
|
|
13
13
|
<defs>
|
|
14
14
|
<g id="lumo:align-center"><path d="M167 217c0-18 17-33 38-34H795c21 0 38 15 38 34 0 18-17 33-38 33H205C184 250 167 235 167 217z m83 191c0-18 13-33 29-33H721c16 0 29 15 29 33 0 18-13 33-29 34H279C263 442 250 427 250 408zM250 792c0-18 13-33 29-34H721c16 0 29 15 29 34s-13 33-29 33H279C263 825 250 810 250 792z m-83-192c0-18 17-33 38-33H795c21 0 38 15 38 33s-17 33-38 33H205C184 633 167 618 167 600z" fill-rule="evenodd" clip-rule="evenodd"></path></g>
|
|
@@ -57,4 +57,4 @@ $_documentContainer.innerHTML = `<vaadin-iconset name="lumo" size="1000">
|
|
|
57
57
|
</svg>
|
|
58
58
|
</vaadin-iconset>`;
|
|
59
59
|
|
|
60
|
-
document.head.appendChild(
|
|
60
|
+
document.head.appendChild(template.content);
|
package/version.js
CHANGED
package/gulpfile.js
DELETED
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
/* eslint-env node */
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
const gulp = require('gulp');
|
|
5
|
-
const sort = require('gulp-sort');
|
|
6
|
-
const iconfont = require('gulp-iconfont');
|
|
7
|
-
const fs = require('fs');
|
|
8
|
-
const svgpath = require('svgpath');
|
|
9
|
-
const svgmin = require('gulp-svgmin');
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Normalize file sort order across platforms (OS X vs Linux, maybe others).
|
|
13
|
-
*
|
|
14
|
-
* Before: `[..., 'eye-disabled', 'eye', ...]`
|
|
15
|
-
* After: `[..., 'eye', 'eye-disabled', ...]`
|
|
16
|
-
*
|
|
17
|
-
* Order of appearance impacts assigned Unicode codepoints, and sometimes build diffs.
|
|
18
|
-
*
|
|
19
|
-
* @see https://github.com/nfroidure/svgicons2svgfont/pull/82
|
|
20
|
-
* @see https://github.com/nfroidure/svgicons2svgfont/blob/master/src/filesorter.js
|
|
21
|
-
* @see http://support.ecisolutions.com/doc-ddms/help/reportsmenu/ascii_sort_order_chart.htm
|
|
22
|
-
*/
|
|
23
|
-
function sortIconFilesNormalized(file1, file2) {
|
|
24
|
-
return file1.replace(/-/g, '~').localeCompare(file2.replace(/-/g, '~'), 'en-US');
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function createCopyright() {
|
|
28
|
-
return `/**
|
|
29
|
-
* @license
|
|
30
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
31
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
32
|
-
*/`;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function createIconset(folder, filenames, idPrefix = '') {
|
|
36
|
-
let output = `<svg xmlns="http://www.w3.org/2000/svg">\n<defs>\n`;
|
|
37
|
-
filenames.forEach((filename) => {
|
|
38
|
-
// Skip non-svg files
|
|
39
|
-
if (filename.indexOf('.svg') === -1) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const content = fs.readFileSync(folder + filename, 'utf-8');
|
|
44
|
-
const path = content.match(/<path( fill-rule="evenodd" clip-rule="evenodd")* d="([^"]*)"/);
|
|
45
|
-
if (path) {
|
|
46
|
-
const newPath = new svgpath(path[2])
|
|
47
|
-
.scale(1000 / 24, 1000 / 24)
|
|
48
|
-
.round(0)
|
|
49
|
-
.toString();
|
|
50
|
-
const name = filename.replace('.svg', '').replace(/\s/g, '-').toLowerCase();
|
|
51
|
-
const attrs = path[1] !== undefined ? path[1] : '';
|
|
52
|
-
output += `<g id="${idPrefix}${name}"><path d="${newPath}"${attrs}></path></g>\n`;
|
|
53
|
-
} else {
|
|
54
|
-
throw new Error(`Unexpected SVG content: ${filename}`);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
output += `</defs>\n</svg>`;
|
|
59
|
-
return output;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
gulp.task('icons', async () => {
|
|
63
|
-
const folder = 'icons/svg/';
|
|
64
|
-
let glyphs;
|
|
65
|
-
|
|
66
|
-
// Optimize the source files
|
|
67
|
-
gulp
|
|
68
|
-
.src(`${folder}*.svg`)
|
|
69
|
-
.pipe(
|
|
70
|
-
svgmin({
|
|
71
|
-
plugins: [
|
|
72
|
-
{
|
|
73
|
-
removeTitle: true,
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
removeViewBox: false,
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
cleanupNumericValues: {
|
|
80
|
-
floatPrecision: 6,
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
convertPathData: {
|
|
85
|
-
floatPrecision: 6,
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
}),
|
|
90
|
-
)
|
|
91
|
-
.pipe(gulp.dest(folder))
|
|
92
|
-
.on('finish', () => {
|
|
93
|
-
// Iron-iconset-svg
|
|
94
|
-
fs.readdir(folder, (err, filenames) => {
|
|
95
|
-
if (err) {
|
|
96
|
-
console.error(err);
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
filenames.sort(sortIconFilesNormalized);
|
|
101
|
-
|
|
102
|
-
const ironIcons = `${createCopyright()}
|
|
103
|
-
import '@polymer/iron-iconset-svg/iron-iconset-svg.js';
|
|
104
|
-
import './version.js';
|
|
105
|
-
|
|
106
|
-
const $_documentContainer = document.createElement('template');
|
|
107
|
-
|
|
108
|
-
$_documentContainer.innerHTML = \`<iron-iconset-svg size="1000" name="lumo">
|
|
109
|
-
${createIconset(folder, filenames)}
|
|
110
|
-
</iron-iconset-svg>\`;\n\ndocument.head.appendChild($_documentContainer.content);\n`;
|
|
111
|
-
|
|
112
|
-
fs.writeFile('iconset.js', ironIcons, (err) => {
|
|
113
|
-
if (err) {
|
|
114
|
-
return console.error(err);
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
const vaadinIcons = `${createCopyright()}
|
|
119
|
-
import '@vaadin/icon/vaadin-iconset.js';
|
|
120
|
-
import './version.js';
|
|
121
|
-
|
|
122
|
-
const $_documentContainer = document.createElement('template');
|
|
123
|
-
|
|
124
|
-
$_documentContainer.innerHTML = \`<vaadin-iconset name="lumo" size="1000">
|
|
125
|
-
${createIconset(folder, filenames, 'lumo:')}
|
|
126
|
-
</vaadin-iconset>\`;\n\ndocument.head.appendChild($_documentContainer.content);\n`;
|
|
127
|
-
|
|
128
|
-
fs.writeFile('vaadin-iconset.js', vaadinIcons, (err) => {
|
|
129
|
-
if (err) {
|
|
130
|
-
return console.error(err);
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
// Icon font
|
|
136
|
-
gulp
|
|
137
|
-
.src(`${folder}*.svg`)
|
|
138
|
-
.pipe(
|
|
139
|
-
sort({
|
|
140
|
-
comparator(file1, file2) {
|
|
141
|
-
return sortIconFilesNormalized(file1.relative, file2.relative);
|
|
142
|
-
},
|
|
143
|
-
}),
|
|
144
|
-
)
|
|
145
|
-
.pipe(
|
|
146
|
-
iconfont({
|
|
147
|
-
fontName: 'lumo-icons',
|
|
148
|
-
formats: ['woff'],
|
|
149
|
-
fontHeight: 1000,
|
|
150
|
-
ascent: 850,
|
|
151
|
-
descent: 150,
|
|
152
|
-
fixedWidth: true,
|
|
153
|
-
normalize: true,
|
|
154
|
-
timestamp: 1, // Truthy!
|
|
155
|
-
}),
|
|
156
|
-
)
|
|
157
|
-
.on('glyphs', (glyphData) => {
|
|
158
|
-
// Store for later use
|
|
159
|
-
glyphs = glyphData;
|
|
160
|
-
})
|
|
161
|
-
.pipe(gulp.dest('.'))
|
|
162
|
-
.on('finish', () => {
|
|
163
|
-
// Generate base64 version of the font
|
|
164
|
-
const lumoIconsWoff = fs.readFileSync('lumo-icons.woff');
|
|
165
|
-
|
|
166
|
-
// Write the output to font-icons.js
|
|
167
|
-
let output = createCopyright();
|
|
168
|
-
output += `
|
|
169
|
-
import './version.js';
|
|
170
|
-
|
|
171
|
-
const $_documentContainer = document.createElement('template');
|
|
172
|
-
|
|
173
|
-
$_documentContainer.innerHTML = \`
|
|
174
|
-
<style>
|
|
175
|
-
@font-face {
|
|
176
|
-
font-family: 'lumo-icons';
|
|
177
|
-
src: url(data:application/font-woff;charset=utf-8;base64,${lumoIconsWoff.toString('base64')}) format('woff');
|
|
178
|
-
font-weight: normal;
|
|
179
|
-
font-style: normal;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
html {
|
|
183
|
-
`;
|
|
184
|
-
glyphs.forEach((g) => {
|
|
185
|
-
const name = g.name.replace(/\s/g, '-').toLowerCase();
|
|
186
|
-
const unicode = `\\\\${g.unicode[0].charCodeAt(0).toString(16)}`;
|
|
187
|
-
output += ` --lumo-icons-${name}: "${unicode}";\n`;
|
|
188
|
-
});
|
|
189
|
-
output += ` }
|
|
190
|
-
</style>
|
|
191
|
-
\`;
|
|
192
|
-
|
|
193
|
-
document.head.appendChild($_documentContainer.content);
|
|
194
|
-
`;
|
|
195
|
-
fs.writeFile('font-icons.js', output, (err) => {
|
|
196
|
-
if (err) {
|
|
197
|
-
return console.error(err);
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
const list = glyphs.map((g) => g.name);
|
|
202
|
-
fs.writeFile('test/glyphs.json', JSON.stringify(list, null, 2), (err) => {
|
|
203
|
-
if (err) {
|
|
204
|
-
return console.error(err);
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
// Cleanup
|
|
209
|
-
fs.unlink('lumo-icons.woff', (err) => {
|
|
210
|
-
if (err) {
|
|
211
|
-
return console.error(err);
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
});
|
|
215
|
-
});
|
|
216
|
-
});
|