@vaadin/vaadin-lumo-styles 23.1.0-alpha3 → 23.1.0-beta2

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 CHANGED
@@ -34,7 +34,7 @@ function createCopyright() {
34
34
 
35
35
  function createIconset(folder, filenames, idPrefix = '') {
36
36
  let output = `<svg xmlns="http://www.w3.org/2000/svg">\n<defs>\n`;
37
- filenames.forEach(function (filename) {
37
+ filenames.forEach((filename) => {
38
38
  // Skip non-svg files
39
39
  if (filename.indexOf('.svg') === -1) {
40
40
  return;
@@ -59,39 +59,39 @@ function createIconset(folder, filenames, idPrefix = '') {
59
59
  return output;
60
60
  }
61
61
 
62
- gulp.task('icons', async function () {
62
+ gulp.task('icons', async () => {
63
63
  const folder = 'icons/svg/';
64
64
  let glyphs;
65
65
 
66
66
  // Optimize the source files
67
67
  gulp
68
- .src(folder + '*.svg')
68
+ .src(`${folder}*.svg`)
69
69
  .pipe(
70
70
  svgmin({
71
71
  plugins: [
72
72
  {
73
- removeTitle: true
73
+ removeTitle: true,
74
74
  },
75
75
  {
76
- removeViewBox: false
76
+ removeViewBox: false,
77
77
  },
78
78
  {
79
79
  cleanupNumericValues: {
80
- floatPrecision: 6
81
- }
80
+ floatPrecision: 6,
81
+ },
82
82
  },
83
83
  {
84
84
  convertPathData: {
85
- floatPrecision: 6
86
- }
87
- }
88
- ]
89
- })
85
+ floatPrecision: 6,
86
+ },
87
+ },
88
+ ],
89
+ }),
90
90
  )
91
91
  .pipe(gulp.dest(folder))
92
- .on('finish', function () {
93
- // iron-iconset-svg
94
- fs.readdir(folder, function (err, filenames) {
92
+ .on('finish', () => {
93
+ // Iron-iconset-svg
94
+ fs.readdir(folder, (err, filenames) => {
95
95
  if (err) {
96
96
  console.error(err);
97
97
  return;
@@ -109,7 +109,7 @@ $_documentContainer.innerHTML = \`<iron-iconset-svg size="1000" name="lumo">
109
109
  ${createIconset(folder, filenames)}
110
110
  </iron-iconset-svg>\`;\n\ndocument.head.appendChild($_documentContainer.content);\n`;
111
111
 
112
- fs.writeFile('iconset.js', ironIcons, function (err) {
112
+ fs.writeFile('iconset.js', ironIcons, (err) => {
113
113
  if (err) {
114
114
  return console.error(err);
115
115
  }
@@ -125,22 +125,22 @@ $_documentContainer.innerHTML = \`<vaadin-iconset name="lumo" size="1000">
125
125
  ${createIconset(folder, filenames, 'lumo:')}
126
126
  </vaadin-iconset>\`;\n\ndocument.head.appendChild($_documentContainer.content);\n`;
127
127
 
128
- fs.writeFile('vaadin-iconset.js', vaadinIcons, function (err) {
128
+ fs.writeFile('vaadin-iconset.js', vaadinIcons, (err) => {
129
129
  if (err) {
130
130
  return console.error(err);
131
131
  }
132
132
  });
133
133
  });
134
134
 
135
- // icon font
135
+ // Icon font
136
136
  gulp
137
- .src(folder + '*.svg')
137
+ .src(`${folder}*.svg`)
138
138
  .pipe(
139
139
  sort({
140
- comparator: function (file1, file2) {
140
+ comparator(file1, file2) {
141
141
  return sortIconFilesNormalized(file1.relative, file2.relative);
142
- }
143
- })
142
+ },
143
+ }),
144
144
  )
145
145
  .pipe(
146
146
  iconfont({
@@ -151,15 +151,15 @@ ${createIconset(folder, filenames, 'lumo:')}
151
151
  descent: 150,
152
152
  fixedWidth: true,
153
153
  normalize: true,
154
- timestamp: 1 // Truthy!
155
- })
154
+ timestamp: 1, // Truthy!
155
+ }),
156
156
  )
157
- .on('glyphs', function (glyphData) {
157
+ .on('glyphs', (glyphData) => {
158
158
  // Store for later use
159
159
  glyphs = glyphData;
160
160
  })
161
161
  .pipe(gulp.dest('.'))
162
- .on('finish', function () {
162
+ .on('finish', () => {
163
163
  // Generate base64 version of the font
164
164
  const lumoIconsWoff = fs.readFileSync('lumo-icons.woff');
165
165
 
@@ -183,7 +183,7 @@ $_documentContainer.innerHTML = \`
183
183
  `;
184
184
  glyphs.forEach((g) => {
185
185
  const name = g.name.replace(/\s/g, '-').toLowerCase();
186
- const unicode = '\\\\' + g.unicode[0].charCodeAt(0).toString(16);
186
+ const unicode = `\\\\${g.unicode[0].charCodeAt(0).toString(16)}`;
187
187
  output += ` --lumo-icons-${name}: "${unicode}";\n`;
188
188
  });
189
189
  output += ` }
@@ -192,21 +192,21 @@ $_documentContainer.innerHTML = \`
192
192
 
193
193
  document.head.appendChild($_documentContainer.content);
194
194
  `;
195
- fs.writeFile('font-icons.js', output, function (err) {
195
+ fs.writeFile('font-icons.js', output, (err) => {
196
196
  if (err) {
197
197
  return console.error(err);
198
198
  }
199
199
  });
200
200
 
201
201
  const list = glyphs.map((g) => g.name);
202
- fs.writeFile('test/glyphs.json', JSON.stringify(list, null, 2), function (err) {
202
+ fs.writeFile('test/glyphs.json', JSON.stringify(list, null, 2), (err) => {
203
203
  if (err) {
204
204
  return console.error(err);
205
205
  }
206
206
  });
207
207
 
208
208
  // Cleanup
209
- fs.unlink('lumo-icons.woff', function (err) {
209
+ fs.unlink('lumo-icons.woff', (err) => {
210
210
  if (err) {
211
211
  return console.error(err);
212
212
  }
package/iconset.js CHANGED
@@ -6,6 +6,10 @@
6
6
  import '@polymer/iron-iconset-svg/iron-iconset-svg.js';
7
7
  import './version.js';
8
8
 
9
+ console.warn(
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
+ );
12
+
9
13
  const $_documentContainer = document.createElement('template');
10
14
 
11
15
  $_documentContainer.innerHTML = `<iron-iconset-svg size="1000" name="lumo">
@@ -143,7 +143,7 @@ const inputField = css`
143
143
  const inputFieldShared = [requiredField, fieldButton, helper, inputField];
144
144
 
145
145
  registerStyles('', inputFieldShared, {
146
- moduleId: 'lumo-input-field-shared-styles'
146
+ moduleId: 'lumo-input-field-shared-styles',
147
147
  });
148
148
 
149
149
  export { inputField, inputFieldShared };
@@ -40,10 +40,9 @@ const requiredField = css`
40
40
  padding-top: var(--lumo-space-m);
41
41
  }
42
42
 
43
- [part='required-indicator']::after {
43
+ :host([required]) [part='required-indicator']::after {
44
44
  content: var(--lumo-required-field-indicator, '•');
45
45
  transition: opacity 0.2s;
46
- opacity: 0;
47
46
  color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));
48
47
  position: absolute;
49
48
  right: 0;
@@ -51,10 +50,6 @@ const requiredField = css`
51
50
  text-align: center;
52
51
  }
53
52
 
54
- :host([required]:not([has-value])) [part='required-indicator']::after {
55
- opacity: 1;
56
- }
57
-
58
53
  :host([invalid]) [part='required-indicator']::after {
59
54
  color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));
60
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/vaadin-lumo-styles",
3
- "version": "23.1.0-alpha3",
3
+ "version": "23.1.0-beta2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -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.1.0-alpha3",
46
- "@vaadin/vaadin-themable-mixin": "23.1.0-alpha3"
45
+ "@vaadin/icon": "23.1.0-beta2",
46
+ "@vaadin/vaadin-themable-mixin": "23.1.0-beta2"
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": "8c9e64e8dfa158dd52a9bf6da351ff038c88ca85"
55
+ "gitHead": "f11f9245a0b5e6bf912725a501c27c24b74e7c8d"
56
56
  }
package/version.js CHANGED
@@ -5,7 +5,7 @@
5
5
  */
6
6
  class Lumo extends HTMLElement {
7
7
  static get version() {
8
- return '23.1.0-alpha3';
8
+ return '23.1.0-beta2';
9
9
  }
10
10
  }
11
11