uikit 3.9.2 → 3.9.3-dev.1ffd84b61

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.
Files changed (51) hide show
  1. package/.eslintrc.json +1 -2
  2. package/CHANGELOG.md +6 -0
  3. package/build/publishDev.js +5 -6
  4. package/build/util.js +26 -14
  5. package/dist/css/uikit-core-rtl.css +5 -2
  6. package/dist/css/uikit-core-rtl.min.css +1 -1
  7. package/dist/css/uikit-core.css +5 -2
  8. package/dist/css/uikit-core.min.css +1 -1
  9. package/dist/css/uikit-rtl.css +5 -2
  10. package/dist/css/uikit-rtl.min.css +1 -1
  11. package/dist/css/uikit.css +5 -2
  12. package/dist/css/uikit.min.css +1 -1
  13. package/dist/js/components/countdown.js +1 -1
  14. package/dist/js/components/countdown.min.js +2 -3
  15. package/dist/js/components/filter.js +1 -1
  16. package/dist/js/components/filter.min.js +2 -3
  17. package/dist/js/components/lightbox-panel.js +1 -1
  18. package/dist/js/components/lightbox-panel.min.js +2 -3
  19. package/dist/js/components/lightbox.js +1 -1
  20. package/dist/js/components/lightbox.min.js +2 -3
  21. package/dist/js/components/notification.js +1 -1
  22. package/dist/js/components/notification.min.js +2 -3
  23. package/dist/js/components/parallax.js +1 -1
  24. package/dist/js/components/parallax.min.js +2 -3
  25. package/dist/js/components/slider-parallax.js +1 -1
  26. package/dist/js/components/slider-parallax.min.js +2 -3
  27. package/dist/js/components/slider.js +1 -1
  28. package/dist/js/components/slider.min.js +2 -3
  29. package/dist/js/components/slideshow-parallax.js +1 -1
  30. package/dist/js/components/slideshow-parallax.min.js +2 -3
  31. package/dist/js/components/slideshow.js +1 -1
  32. package/dist/js/components/slideshow.min.js +2 -3
  33. package/dist/js/components/sortable.js +1 -1
  34. package/dist/js/components/sortable.min.js +2 -3
  35. package/dist/js/components/tooltip.js +1 -1
  36. package/dist/js/components/tooltip.min.js +2 -3
  37. package/dist/js/components/upload.js +1 -1
  38. package/dist/js/components/upload.min.js +2 -3
  39. package/dist/js/uikit-core.js +12 -9
  40. package/dist/js/uikit-core.min.js +2 -3
  41. package/dist/js/uikit-icons.js +1 -1
  42. package/dist/js/uikit-icons.min.js +2 -3
  43. package/dist/js/uikit.js +12 -9
  44. package/dist/js/uikit.min.js +2 -3
  45. package/package.json +6 -7
  46. package/src/js/util/dimensions.js +8 -5
  47. package/src/less/components/utility.less +3 -1
  48. package/src/scss/components/utility.scss +2 -0
  49. package/src/scss/mixins-theme.scss +1 -1
  50. package/src/scss/mixins.scss +1 -1
  51. package/tests/comment.html +1 -1
package/.eslintrc.json CHANGED
@@ -2,8 +2,7 @@
2
2
  "root":true,
3
3
  "env": {
4
4
  "es6": true,
5
- "browser": true,
6
- "commonjs": true
5
+ "browser": true
7
6
  },
8
7
  "extends": [
9
8
  "eslint:recommended"
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## WIP
4
+
5
+ ### Fixed
6
+
7
+ - Fix logo image alignment if logo line-height is larger than the image
8
+
3
9
  ## 3.9.2 (November 11, 2021)
4
10
 
5
11
  ### Fixed
@@ -4,30 +4,29 @@ import {args, getVersion, run} from './util.js';
4
4
  const {inc} = semver;
5
5
 
6
6
  // default exec options
7
- const options = {encoding: 'utf8'};
8
7
  if (args.f || args.force || await isDevCommit()) {
9
8
 
10
9
  // increase version patch number
11
10
  const version = inc(await getVersion(), 'patch');
12
11
 
13
12
  // get current git hash
14
- const hash = (await run('git rev-parse --short HEAD', options)).trim();
13
+ const hash = (await run('git rev-parse --short HEAD')).trim();
15
14
 
16
15
  // set version of package.json
17
- await run(`npm version ${version}-dev.${hash} --git-tag-version false`, {...options, stdio: 'inherit'});
16
+ await run(`npm version ${version}-dev.${hash} --git-tag-version false`);
18
17
 
19
18
  // create dist files
20
- await run('yarn compile && yarn compile-rtl && yarn build-scss', {...options, stdio: 'inherit'});
19
+ await run('yarn compile && yarn compile-rtl && yarn build-scss');
21
20
 
22
21
  // publish to dev tag
23
- await run('npm publish --tag dev', options);
22
+ await run('npm publish --tag dev');
24
23
 
25
24
  }
26
25
 
27
26
  async function isDevCommit() {
28
27
 
29
28
  // check for changes to publish (%B: raw body (unwrapped subject and body)
30
- const message = await run('git log -1 --pretty=%B', options);
29
+ const message = await run('git log -1 --pretty=%B');
31
30
 
32
31
  const type = message.match(/^(revert: )?(feat|fix|polish|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{1,50}/);
33
32
 
package/build/util.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import less from 'less';
2
2
  import fs from 'fs-extra';
3
+ import pLimit from 'p-limit';
3
4
  import postcss from 'postcss';
4
5
  import globImport from 'glob';
5
6
  import {optimize} from 'svgo';
@@ -10,12 +11,14 @@ import html from 'rollup-plugin-html';
10
11
  import buble from '@rollup/plugin-buble';
11
12
  import alias from '@rollup/plugin-alias';
12
13
  import modify from 'rollup-plugin-modify';
13
- import {uglify} from 'rollup-plugin-uglify';
14
+ import {terser} from 'rollup-plugin-terser';
14
15
  import replace from '@rollup/plugin-replace';
15
16
  import {basename, dirname, join} from 'path';
16
17
  import {exec as execImport} from 'child_process';
17
18
  import {rollup, watch as rollupWatch} from 'rollup';
18
19
 
20
+ const limit = pLimit(Number(process.env.cpus || 2));
21
+
19
22
  export const exec = promisify(execImport);
20
23
  export const glob = promisify(globImport);
21
24
  export const {pathExists, readJson} = fs;
@@ -58,12 +61,12 @@ export async function logFile(file) {
58
61
 
59
62
  export async function minify(file) {
60
63
 
61
- const {styles} = await new CleanCSS({
64
+ const {styles} = await limit(() => new CleanCSS({
62
65
  advanced: false,
63
66
  keepSpecialComments: 0,
64
67
  rebase: false,
65
68
  returnPromise: true
66
- }).minify([file]);
69
+ }).minify([file]));
67
70
 
68
71
  await write(`${join(dirname(file), basename(file, '.css'))}.min.css`, styles);
69
72
 
@@ -71,8 +74,8 @@ export async function minify(file) {
71
74
 
72
75
  }
73
76
 
74
- export async function renderLess(data, options) {
75
- return postcss()
77
+ export function renderLess(data, options) {
78
+ return limit(async () => postcss()
76
79
  .use({
77
80
  postcssPlugin: 'calc',
78
81
  Once(root) {
@@ -89,7 +92,8 @@ export async function renderLess(data, options) {
89
92
  }
90
93
  })
91
94
  .process((await less.render(data, options)).css)
92
- .css;
95
+ .css
96
+ );
93
97
  }
94
98
 
95
99
  export async function compile(file, dest, {external, globals, name, aliases, replaces} = {}) {
@@ -149,7 +153,7 @@ export async function compile(file, dest, {external, globals, name, aliases, rep
149
153
  output.push({
150
154
  ...outputOptions,
151
155
  file: `${dest}.min.js`,
152
- plugins: [minify ? uglify({output: {preamble: banner}}) : undefined]
156
+ plugins: [minify ? terser() : undefined]
153
157
  });
154
158
  }
155
159
 
@@ -157,12 +161,15 @@ export async function compile(file, dest, {external, globals, name, aliases, rep
157
161
  const bundle = await rollup(inputOptions);
158
162
 
159
163
  for (const options of output) {
160
- await bundle.write(options);
164
+ await limit(() => bundle.write(options));
161
165
  logFile(options.file);
162
166
  }
163
167
 
164
168
  await bundle.close();
165
169
  } else {
170
+
171
+ console.log('UIkit is watching the files...');
172
+
166
173
  const watcher = rollupWatch({
167
174
  ...inputOptions,
168
175
  output
@@ -210,9 +217,13 @@ export async function icons(src) {
210
217
  };
211
218
 
212
219
  const files = await glob(src, {nosort: true});
213
- const icons = await Promise.all(files.map(async file =>
214
- (await optimize(await read(file), options)).data
215
- ));
220
+ const icons = await Promise.all(
221
+ files.map(file =>
222
+ limit(async () =>
223
+ (await optimize(await read(file), options)).data
224
+ )
225
+ )
226
+ );
216
227
 
217
228
  return JSON.stringify(files.reduce((result, file, i) => {
218
229
  result[basename(file, '.svg')] = icons[i];
@@ -221,10 +232,11 @@ export async function icons(src) {
221
232
 
222
233
  }
223
234
 
224
- export async function run(cmd) {
225
- const {stdout, stderr} = await exec(cmd);
235
+ export async function run(cmd, options) {
236
+ const {stdout, stderr} = await limit(() => exec(cmd, options));
226
237
 
227
- stderr && console.error(stderr.trim());
238
+ stdout && console.log(stdout.trim());
239
+ stderr && console.log(stderr.trim());
228
240
 
229
241
  return stdout;
230
242
  }
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.9.2 | https://www.getuikit.com | (c) 2014 - 2021 YOOtheme | MIT License */
1
+ /*! UIkit 3.9.3-dev.1ffd84b61 | https://www.getuikit.com | (c) 2014 - 2021 YOOtheme | MIT License */
2
2
  /* ========================================================================
3
3
  Component: Base
4
4
  ========================================================================== */
@@ -7730,6 +7730,9 @@ iframe.uk-cover {
7730
7730
  /* 1 */
7731
7731
  text-decoration: none;
7732
7732
  }
7733
+ .uk-logo > :where(img, svg, video) {
7734
+ display: block;
7735
+ }
7733
7736
  .uk-logo-inverse {
7734
7737
  display: none;
7735
7738
  }
@@ -11567,7 +11570,7 @@ iframe.uk-cover {
11567
11570
  .uk-card-secondary > :not([class*='uk-card-media']) .uk-logo-inverse,
11568
11571
  .uk-overlay-primary .uk-logo-inverse,
11569
11572
  .uk-offcanvas-bar .uk-logo-inverse {
11570
- display: inline;
11573
+ display: block;
11571
11574
  }
11572
11575
  /* ========================================================================
11573
11576
  Component: Print