uikit 3.9.2-dev.836238c9b → 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 (67) hide show
  1. package/.eslintrc.json +1 -2
  2. package/CHANGELOG.md +14 -0
  3. package/build/build.js +2 -3
  4. package/build/icons.js +18 -0
  5. package/build/less.js +1 -1
  6. package/build/publishDev.js +6 -8
  7. package/build/scss.js +4 -0
  8. package/build/util.js +31 -21
  9. package/dist/css/uikit-core-rtl.css +6 -3
  10. package/dist/css/uikit-core-rtl.min.css +1 -1
  11. package/dist/css/uikit-core.css +6 -3
  12. package/dist/css/uikit-core.min.css +1 -1
  13. package/dist/css/uikit-rtl.css +6 -3
  14. package/dist/css/uikit-rtl.min.css +1 -1
  15. package/dist/css/uikit.css +6 -3
  16. package/dist/css/uikit.min.css +1 -1
  17. package/dist/js/components/countdown.js +1 -1
  18. package/dist/js/components/countdown.min.js +2 -3
  19. package/dist/js/components/filter.js +1 -1
  20. package/dist/js/components/filter.min.js +2 -3
  21. package/dist/js/components/lightbox-panel.js +1 -1
  22. package/dist/js/components/lightbox-panel.min.js +2 -3
  23. package/dist/js/components/lightbox.js +1 -1
  24. package/dist/js/components/lightbox.min.js +2 -3
  25. package/dist/js/components/notification.js +1 -1
  26. package/dist/js/components/notification.min.js +2 -3
  27. package/dist/js/components/parallax.js +1 -1
  28. package/dist/js/components/parallax.min.js +2 -3
  29. package/dist/js/components/slider-parallax.js +1 -1
  30. package/dist/js/components/slider-parallax.min.js +2 -3
  31. package/dist/js/components/slider.js +1 -1
  32. package/dist/js/components/slider.min.js +2 -3
  33. package/dist/js/components/slideshow-parallax.js +1 -1
  34. package/dist/js/components/slideshow-parallax.min.js +2 -3
  35. package/dist/js/components/slideshow.js +1 -1
  36. package/dist/js/components/slideshow.min.js +2 -3
  37. package/dist/js/components/sortable.js +1 -1
  38. package/dist/js/components/sortable.min.js +2 -3
  39. package/dist/js/components/tooltip.js +1 -1
  40. package/dist/js/components/tooltip.min.js +2 -3
  41. package/dist/js/components/upload.js +1 -1
  42. package/dist/js/components/upload.min.js +2 -3
  43. package/dist/js/uikit-core.js +20 -15
  44. package/dist/js/uikit-core.min.js +2 -3
  45. package/dist/js/uikit-icons.js +1 -1
  46. package/dist/js/uikit-icons.min.js +2 -3
  47. package/dist/js/uikit.js +20 -15
  48. package/dist/js/uikit.min.js +2 -3
  49. package/package.json +7 -7
  50. package/src/js/util/dimensions.js +8 -5
  51. package/src/js/util/style.js +9 -7
  52. package/src/less/components/leader.less +1 -1
  53. package/src/less/components/utility.less +3 -1
  54. package/src/scss/components/card.scss +8 -8
  55. package/src/scss/components/form-range.scss +1 -1
  56. package/src/scss/components/leader.scss +1 -1
  57. package/src/scss/components/modal.scss +2 -2
  58. package/src/scss/components/notification.scss +1 -1
  59. package/src/scss/components/spinner.scss +2 -2
  60. package/src/scss/components/table.scss +2 -2
  61. package/src/scss/components/utility.scss +2 -0
  62. package/src/scss/mixins-theme.scss +3 -3
  63. package/src/scss/mixins.scss +1 -1
  64. package/src/scss/variables-theme.scss +11 -11
  65. package/src/scss/variables.scss +11 -11
  66. package/tests/comment.html +1 -1
  67. package/tests/js/index.js +3 -2
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,19 @@
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
+
9
+ ## 3.9.2 (November 11, 2021)
10
+
11
+ ### Fixed
12
+
13
+ - Fix build scripts for windows users
14
+ - Fix css in Leader component
15
+ - Fix division deprecation warnings in Sass source
16
+
3
17
  ## 3.9.1 (November 10, 2021)
4
18
 
5
19
  ### Changed
package/build/build.js CHANGED
@@ -1,12 +1,11 @@
1
1
  import camelize from 'camelcase';
2
2
  import {basename, resolve} from 'path';
3
- import {__dirname, args, compile, glob, icons} from './util.js';
3
+ import {args, compile, glob, icons} from './util.js';
4
4
 
5
5
  const bundles = getBundleTasks();
6
6
  const components = await getComponentTasks();
7
7
 
8
8
  if (args.h || args.help) {
9
-
10
9
  console.log(`
11
10
  usage:
12
11
 
@@ -74,7 +73,7 @@ async function getComponentTasks() {
74
73
  name,
75
74
  external: ['uikit', 'uikit-util'],
76
75
  globals: {uikit: 'UIkit', 'uikit-util': 'UIkit.util'},
77
- aliases: {component: resolve(__dirname, '../src/js/components', name)},
76
+ aliases: {component: resolve('src/js/components', name)},
78
77
  replaces: {NAME: `'${camelize(name)}'`}
79
78
  });
80
79
 
package/build/icons.js CHANGED
@@ -1,5 +1,23 @@
1
1
  import {args, compile, glob, icons} from './util.js';
2
2
 
3
+ if (args.h || args.help) {
4
+ console.log(`
5
+
6
+ Builds additional custom uikit icons found in './custom/*/icons'
7
+
8
+ usage:
9
+
10
+ icons.js [custom|name]
11
+
12
+ -c|--custom
13
+ Specify custom folder to look for icons (default: './custom/*/icons')
14
+ -n|--name
15
+ Specify name regex to match against folder (default: '([a-z]+)/icons$')
16
+
17
+ `);
18
+ process.exit(0);
19
+ }
20
+
3
21
  const path = args.c || args.custom || 'custom/*/icons';
4
22
  const match = args.n || args.name || '([a-z]+)/icons$';
5
23
 
package/build/less.js CHANGED
@@ -1,6 +1,6 @@
1
- import {basename} from 'path';
2
1
  import rtlcss from 'rtlcss';
3
2
  import postcss from 'postcss';
3
+ import {basename} from 'path';
4
4
  import {args, banner, glob, minify, pathExists, read, readJson, renderLess, write} from './util.js';
5
5
 
6
6
  const {rtl} = args;
@@ -1,34 +1,32 @@
1
1
  import semver from 'semver';
2
- import {resolve} from 'path';
3
- import {__dirname, args, getVersion, run} from './util.js';
2
+ import {args, getVersion, run} from './util.js';
4
3
 
5
4
  const {inc} = semver;
6
5
 
7
6
  // default exec options
8
- const options = {cwd: resolve(`${__dirname}/..`), encoding: 'utf8'};
9
7
  if (args.f || args.force || await isDevCommit()) {
10
8
 
11
9
  // increase version patch number
12
10
  const version = inc(await getVersion(), 'patch');
13
11
 
14
12
  // get current git hash
15
- const hash = (await run('git rev-parse --short HEAD', options)).trim();
13
+ const hash = (await run('git rev-parse --short HEAD')).trim();
16
14
 
17
15
  // set version of package.json
18
- 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`);
19
17
 
20
18
  // create dist files
21
- await run('yarn compile && yarn compile-rtl && yarn build-scss', {...options, stdio: 'inherit'});
19
+ await run('yarn compile && yarn compile-rtl && yarn build-scss');
22
20
 
23
21
  // publish to dev tag
24
- await run('npm publish --tag dev', options);
22
+ await run('npm publish --tag dev');
25
23
 
26
24
  }
27
25
 
28
26
  async function isDevCommit() {
29
27
 
30
28
  // check for changes to publish (%B: raw body (unwrapped subject and body)
31
- const message = await run('git log -1 --pretty=%B', options);
29
+ const message = await run('git log -1 --pretty=%B');
32
30
 
33
31
  const type = message.match(/^(revert: )?(feat|fix|polish|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{1,50}/);
34
32
 
package/build/scss.js CHANGED
@@ -1,5 +1,8 @@
1
+ import NP from 'number-precision';
1
2
  import {glob, read, write} from './util.js';
2
3
 
4
+ NP.enableBoundaryChecking(false);
5
+
3
6
  const themeMixins = {};
4
7
  const coreMixins = {};
5
8
  const themeVar = {};
@@ -78,6 +81,7 @@ for (const file of await glob('src/less/**/*.less')) {
78
81
  let scssData = data.replace(/\/less\//g, '/scss/') // change less/ dir to scss/ on imports
79
82
  .replace(/\.less/g, '.scss') // change .less extensions to .scss on imports
80
83
  .replace(/@/g, '$') // convert variables
84
+ .replace(/(:[^'"]*?\([^'"]+?)\s*\/\s*([0-9.-]+)\)/g, (exp, m1, m2) => `${m1} * ${NP.round(1 / parseFloat(m2), 5)})`)
81
85
  .replace(/--uk-[^\s]+: (\$[^\s]+);/g, (exp, name) => exp.replace(name, `#{${name}}`))
82
86
  .replace(/\\\$/g, '\\@') // revert classes using the @ symbol
83
87
  .replace(/ e\(/g, ' unquote(') // convert escape function
package/build/util.js CHANGED
@@ -1,9 +1,8 @@
1
1
  import less from 'less';
2
- import {URL} from 'url';
3
2
  import fs from 'fs-extra';
3
+ import pLimit from 'p-limit';
4
4
  import postcss from 'postcss';
5
5
  import globImport from 'glob';
6
- import {rollup, watch as rollupWatch} from 'rollup';
7
6
  import {optimize} from 'svgo';
8
7
  import {promisify} from 'util';
9
8
  import minimist from 'minimist';
@@ -12,15 +11,17 @@ import html from 'rollup-plugin-html';
12
11
  import buble from '@rollup/plugin-buble';
13
12
  import alias from '@rollup/plugin-alias';
14
13
  import modify from 'rollup-plugin-modify';
15
- import {uglify} from 'rollup-plugin-uglify';
14
+ import {terser} from 'rollup-plugin-terser';
16
15
  import replace from '@rollup/plugin-replace';
17
- import {basename, dirname, resolve} from 'path';
16
+ import {basename, dirname, join} from 'path';
18
17
  import {exec as execImport} from 'child_process';
18
+ import {rollup, watch as rollupWatch} from 'rollup';
19
+
20
+ const limit = pLimit(Number(process.env.cpus || 2));
19
21
 
20
22
  export const exec = promisify(execImport);
21
23
  export const glob = promisify(globImport);
22
24
  export const {pathExists, readJson} = fs;
23
- export const __dirname = new URL('.', import.meta.url).pathname;
24
25
 
25
26
  export const banner = `/*! UIkit ${await getVersion()} | https://www.getuikit.com | (c) 2014 - ${new Date().getFullYear()} YOOtheme | MIT License */\n`;
26
27
  export const validClassName = /[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/;
@@ -55,26 +56,26 @@ export async function write(dest, data) {
55
56
 
56
57
  export async function logFile(file) {
57
58
  const data = await read(file);
58
- console.log(`${cyan(resolve(file))} ${getSize(data)}`);
59
+ console.log(`${cyan(file)} ${getSize(data)}`);
59
60
  }
60
61
 
61
62
  export async function minify(file) {
62
63
 
63
- const {styles} = await new CleanCSS({
64
+ const {styles} = await limit(() => new CleanCSS({
64
65
  advanced: false,
65
66
  keepSpecialComments: 0,
66
67
  rebase: false,
67
68
  returnPromise: true
68
- }).minify([file]);
69
+ }).minify([file]));
69
70
 
70
- await write(`${resolve(dirname(file), basename(file, '.css'))}.min.css`, styles);
71
+ await write(`${join(dirname(file), basename(file, '.css'))}.min.css`, styles);
71
72
 
72
73
  return styles;
73
74
 
74
75
  }
75
76
 
76
- export async function renderLess(data, options) {
77
- return postcss()
77
+ export function renderLess(data, options) {
78
+ return limit(async () => postcss()
78
79
  .use({
79
80
  postcssPlugin: 'calc',
80
81
  Once(root) {
@@ -91,7 +92,8 @@ export async function renderLess(data, options) {
91
92
  }
92
93
  })
93
94
  .process((await less.render(data, options)).css)
94
- .css;
95
+ .css
96
+ );
95
97
  }
96
98
 
97
99
  export async function compile(file, dest, {external, globals, name, aliases, replaces} = {}) {
@@ -151,7 +153,7 @@ export async function compile(file, dest, {external, globals, name, aliases, rep
151
153
  output.push({
152
154
  ...outputOptions,
153
155
  file: `${dest}.min.js`,
154
- plugins: [minify ? uglify({output: {preamble: banner}}) : undefined]
156
+ plugins: [minify ? terser() : undefined]
155
157
  });
156
158
  }
157
159
 
@@ -159,12 +161,15 @@ export async function compile(file, dest, {external, globals, name, aliases, rep
159
161
  const bundle = await rollup(inputOptions);
160
162
 
161
163
  for (const options of output) {
162
- await bundle.write(options);
164
+ await limit(() => bundle.write(options));
163
165
  logFile(options.file);
164
166
  }
165
167
 
166
168
  await bundle.close();
167
169
  } else {
170
+
171
+ console.log('UIkit is watching the files...');
172
+
168
173
  const watcher = rollupWatch({
169
174
  ...inputOptions,
170
175
  output
@@ -212,9 +217,13 @@ export async function icons(src) {
212
217
  };
213
218
 
214
219
  const files = await glob(src, {nosort: true});
215
- const icons = await Promise.all(files.map(async file =>
216
- (await optimize(await read(file), options)).data
217
- ));
220
+ const icons = await Promise.all(
221
+ files.map(file =>
222
+ limit(async () =>
223
+ (await optimize(await read(file), options)).data
224
+ )
225
+ )
226
+ );
218
227
 
219
228
  return JSON.stringify(files.reduce((result, file, i) => {
220
229
  result[basename(file, '.svg')] = icons[i];
@@ -223,10 +232,11 @@ export async function icons(src) {
223
232
 
224
233
  }
225
234
 
226
- export async function run(cmd) {
227
- const {stdout, stderr} = await exec(cmd);
235
+ export async function run(cmd, options) {
236
+ const {stdout, stderr} = await limit(() => exec(cmd, options));
228
237
 
229
- stderr && console.error(stderr.trim());
238
+ stdout && console.log(stdout.trim());
239
+ stderr && console.log(stderr.trim());
230
240
 
231
241
  return stdout;
232
242
  }
@@ -236,7 +246,7 @@ export function ucfirst(str) {
236
246
  }
237
247
 
238
248
  export async function getVersion() {
239
- return (await readJson(resolve(__dirname, '../package.json'))).version;
249
+ return (await readJson('package.json')).version;
240
250
  }
241
251
 
242
252
  export async function replaceInFile(file, fn) {
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.9.2-dev.836238c9b | 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
  ========================================================================== */
@@ -4068,7 +4068,7 @@ select.uk-form-width-xsmall {
4068
4068
  content: '.';
4069
4069
  }
4070
4070
  :root {
4071
- --uk-leader-fill-content: .;
4071
+ --uk-leader-fill-content: '.';
4072
4072
  }
4073
4073
  /* ========================================================================
4074
4074
  Component: Notification
@@ -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