uikit 3.16.24 → 3.16.25-dev.12f581d90
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/.eslintrc.json +0 -9
- package/.prettierrc.json +3 -4
- package/build/build.js +2 -2
- package/build/less.js +2 -2
- package/build/prefix.js +3 -3
- package/build/release.js +7 -7
- package/build/scope.js +3 -3
- package/build/scss.js +9 -9
- package/build/util.js +11 -11
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +2 -2
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +18 -18
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +351 -350
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +353 -352
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +6 -6
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +69 -69
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +37 -37
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +222 -224
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +37 -37
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +300 -302
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +2 -2
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +95 -95
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +2 -2
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +453 -450
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +6837 -6836
- package/dist/js/uikit.min.js +1 -1
- package/package.json +8 -7
- package/src/js/api/app.js +1 -1
- package/src/js/api/boot.js +2 -2
- package/src/js/api/component.js +1 -1
- package/src/js/api/computed.js +2 -2
- package/src/js/api/events.js +2 -2
- package/src/js/api/global.js +3 -3
- package/src/js/api/hooks.js +4 -4
- package/src/js/api/instance.js +3 -3
- package/src/js/api/log.js +1 -1
- package/src/js/api/observables.js +1 -1
- package/src/js/api/observer.js +2 -2
- package/src/js/api/options.js +2 -2
- package/src/js/api/props.js +2 -2
- package/src/js/api/state.js +2 -2
- package/src/js/components/countdown.js +1 -1
- package/src/js/components/filter.js +5 -5
- package/src/js/components/internal/lightbox-animations.js +1 -1
- package/src/js/components/internal/slider-transitioner.js +6 -6
- package/src/js/components/internal/slideshow-animations.js +1 -1
- package/src/js/components/lightbox-panel.js +10 -10
- package/src/js/components/lightbox.js +2 -2
- package/src/js/components/notification.js +4 -4
- package/src/js/components/parallax.js +3 -3
- package/src/js/components/slider-parallax.js +1 -1
- package/src/js/components/slider.js +12 -12
- package/src/js/components/slideshow.js +3 -3
- package/src/js/components/sortable.js +4 -4
- package/src/js/components/tooltip.js +6 -6
- package/src/js/components/upload.js +4 -4
- package/src/js/core/accordion.js +8 -8
- package/src/js/core/alert.js +2 -2
- package/src/js/core/cover.js +1 -1
- package/src/js/core/drop.js +12 -12
- package/src/js/core/dropnav.js +7 -7
- package/src/js/core/form-custom.js +1 -1
- package/src/js/core/grid.js +9 -9
- package/src/js/core/height-match.js +2 -2
- package/src/js/core/height-viewport.js +1 -1
- package/src/js/core/icon.js +23 -23
- package/src/js/core/img.js +2 -2
- package/src/js/core/index.js +16 -14
- package/src/js/core/leader.js +2 -2
- package/src/js/core/modal.js +7 -7
- package/src/js/core/navbar.js +4 -4
- package/src/js/core/offcanvas.js +3 -3
- package/src/js/core/overflow-auto.js +3 -3
- package/src/js/core/responsive.js +3 -3
- package/src/js/core/scrollspy-nav.js +1 -1
- package/src/js/core/scrollspy.js +1 -1
- package/src/js/core/sticky.js +11 -11
- package/src/js/core/svg.js +4 -4
- package/src/js/core/switcher.js +7 -7
- package/src/js/core/tab.js +2 -2
- package/src/js/core/toggle.js +5 -5
- package/src/js/core/video.js +1 -1
- package/src/js/mixin/animate.js +1 -1
- package/src/js/mixin/i18n.js +1 -1
- package/src/js/mixin/internal/animate-fade.js +14 -14
- package/src/js/mixin/internal/animate-slide.js +1 -1
- package/src/js/mixin/internal/scroll.js +1 -1
- package/src/js/mixin/modal.js +15 -12
- package/src/js/mixin/parallax.js +2 -2
- package/src/js/mixin/position.js +2 -2
- package/src/js/mixin/slider-drag.js +1 -1
- package/src/js/mixin/slider-nav.js +8 -9
- package/src/js/mixin/slider.js +9 -9
- package/src/js/mixin/slideshow.js +1 -1
- package/src/js/mixin/togglable.js +4 -4
- package/src/js/uikit-core.js +2 -2
- package/src/js/uikit.js +2 -2
- package/src/js/util/animation.js +8 -8
- package/src/js/util/class.js +1 -1
- package/src/js/util/dimensions.js +5 -5
- package/src/js/util/dom.js +3 -3
- package/src/js/util/event.js +3 -3
- package/src/js/util/filter.js +1 -1
- package/src/js/util/lang.js +4 -4
- package/src/js/util/observer.js +2 -2
- package/src/js/util/player.js +1 -1
- package/src/js/util/position.js +5 -5
- package/src/js/util/selector.js +1 -1
- package/src/js/util/style.js +1 -1
- package/src/js/util/svg.js +2 -2
- package/src/js/util/viewport.js +6 -6
- package/tests/js/index.js +7 -7
package/.eslintrc.json
CHANGED
package/.prettierrc.json
CHANGED
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
"tabWidth": 4,
|
|
3
3
|
"printWidth": 100,
|
|
4
4
|
"singleQuote": true,
|
|
5
|
+
"plugins": ["prettier-plugin-organize-imports"],
|
|
5
6
|
"overrides": [
|
|
6
7
|
{
|
|
7
|
-
"files":
|
|
8
|
-
"options": {
|
|
9
|
-
"tabWidth": 2
|
|
10
|
-
}
|
|
8
|
+
"files": "*.yml",
|
|
9
|
+
"options": { "tabWidth": 2 }
|
|
11
10
|
}
|
|
12
11
|
]
|
|
13
12
|
}
|
package/build/build.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import camelize from 'camelcase';
|
|
2
2
|
import { glob } from 'glob';
|
|
3
3
|
import pLimit from 'p-limit';
|
|
4
|
-
import
|
|
4
|
+
import path from 'path';
|
|
5
5
|
import { args, compile, icons } from './util.js';
|
|
6
6
|
|
|
7
7
|
const limit = pLimit(Number(process.env.cpus || 2));
|
package/build/less.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
1
|
import { glob } from 'glob';
|
|
2
|
+
import path from 'path';
|
|
3
3
|
import rtlcss from 'rtlcss';
|
|
4
4
|
import { args, banner, minify, pathExists, read, readJson, renderLess, write } from './util.js';
|
|
5
5
|
|
|
@@ -82,7 +82,7 @@ async function compile(file, dist, develop, rtl) {
|
|
|
82
82
|
root.prepend(postcss.comment({ text: 'rtl:begin:rename' }));
|
|
83
83
|
root.append(postcss.comment({ text: 'rtl:end:rename' }));
|
|
84
84
|
},
|
|
85
|
-
}
|
|
85
|
+
},
|
|
86
86
|
);
|
|
87
87
|
}
|
|
88
88
|
|
package/build/prefix.js
CHANGED
|
@@ -28,7 +28,7 @@ await replacePrefix(currentPrefix, prefix);
|
|
|
28
28
|
|
|
29
29
|
async function findExistingPrefix() {
|
|
30
30
|
return (await read('dist/css/uikit.css')).match(
|
|
31
|
-
new RegExp(`(${validClassName.source})(-[a-z]+)?-grid`)
|
|
31
|
+
new RegExp(`(${validClassName.source})(-[a-z]+)?-grid`),
|
|
32
32
|
)?.[1];
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -60,7 +60,7 @@ async function getPrefix() {
|
|
|
60
60
|
async function replacePrefix(from, to) {
|
|
61
61
|
for (const file of await glob('dist/**/*.css')) {
|
|
62
62
|
await replaceInFile(file, (data) =>
|
|
63
|
-
data.replace(new RegExp(`${from}-${/([a-z\d-]+)/.source}`, 'g'), `${to}-$1`)
|
|
63
|
+
data.replace(new RegExp(`${from}-${/([a-z\d-]+)/.source}`, 'g'), `${to}-$1`),
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -68,7 +68,7 @@ async function replacePrefix(from, to) {
|
|
|
68
68
|
await replaceInFile(file, (data) =>
|
|
69
69
|
data
|
|
70
70
|
.replace(new RegExp(`${from}-`, 'g'), `${to}-`)
|
|
71
|
-
.replace(new RegExp(`(${from})?UIkit`, 'g'), `${to === 'uk' ? '' : to}UIkit`)
|
|
71
|
+
.replace(new RegExp(`(${from})?UIkit`, 'g'), `${to === 'uk' ? '' : to}UIkit`),
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
74
|
}
|
package/build/release.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import archiver from 'archiver';
|
|
2
|
+
import dateFormat from 'dateformat/lib/dateformat.js';
|
|
2
3
|
import { $ } from 'execa';
|
|
4
|
+
import fs from 'fs';
|
|
3
5
|
import { glob } from 'glob';
|
|
4
|
-
import semver from 'semver';
|
|
5
|
-
import archiver from 'archiver';
|
|
6
6
|
import inquirer from 'inquirer';
|
|
7
|
-
import
|
|
7
|
+
import semver from 'semver';
|
|
8
8
|
import { args, getVersion, logFile, read, replaceInFile } from './util.js';
|
|
9
9
|
|
|
10
10
|
const $$ = $({ stdio: 'inherit' });
|
|
@@ -55,11 +55,11 @@ function raiseVersion(version) {
|
|
|
55
55
|
replaceInFile('CHANGELOG.md', (data) =>
|
|
56
56
|
data.replace(
|
|
57
57
|
/^##\s*WIP/m,
|
|
58
|
-
`## ${versionFormat(version)} (${dateFormat(Date.now(), 'mmmm d, yyyy')})
|
|
59
|
-
)
|
|
58
|
+
`## ${versionFormat(version)} (${dateFormat(Date.now(), 'mmmm d, yyyy')})`,
|
|
59
|
+
),
|
|
60
60
|
),
|
|
61
61
|
replaceInFile('.github/ISSUE_TEMPLATE/bug-report.md', (data) =>
|
|
62
|
-
data.replace(prevVersion, version)
|
|
62
|
+
data.replace(prevVersion, version),
|
|
63
63
|
),
|
|
64
64
|
]);
|
|
65
65
|
}
|
package/build/scope.js
CHANGED
|
@@ -67,9 +67,9 @@ async function scope(files, scope) {
|
|
|
67
67
|
output.replace(
|
|
68
68
|
new RegExp(
|
|
69
69
|
`.${scope}\\s((\\.(uk-(drag|modal-page|offcanvas-page|offcanvas-flip)))|html|:root)`,
|
|
70
|
-
'g'
|
|
70
|
+
'g',
|
|
71
71
|
),
|
|
72
|
-
'$1'
|
|
72
|
+
'$1',
|
|
73
73
|
) // unescape
|
|
74
74
|
}`;
|
|
75
75
|
});
|
|
@@ -88,7 +88,7 @@ async function cleanup(files, scope) {
|
|
|
88
88
|
(data) =>
|
|
89
89
|
data
|
|
90
90
|
.replace(currentScopeRe, '') // remove scope comment
|
|
91
|
-
.replace(new RegExp(` *${string} ({[\\s\\S]*?})?`, 'g'), '') // replace classes
|
|
91
|
+
.replace(new RegExp(` *${string} ({[\\s\\S]*?})?`, 'g'), ''), // replace classes
|
|
92
92
|
);
|
|
93
93
|
}
|
|
94
94
|
}
|
package/build/scss.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { glob } from 'glob';
|
|
2
2
|
import NP from 'number-precision';
|
|
3
|
-
import { read, write } from './util.js';
|
|
4
3
|
import path from 'path';
|
|
4
|
+
import { read, write } from './util.js';
|
|
5
5
|
|
|
6
6
|
NP.enableBoundaryChecking(false);
|
|
7
7
|
|
|
@@ -21,7 +21,7 @@ for (const file of (await glob('src/less/**/*.less')).sort()) {
|
|
|
21
21
|
.replace(/@/g, '$') // convert variables
|
|
22
22
|
.replace(
|
|
23
23
|
/(:[^'"]*?\([^'"]+?)\s*\/\s*([0-9.-]+)\)/g,
|
|
24
|
-
(exp, m1, m2) => `${m1} * ${NP.round(1 / parseFloat(m2), 5)})
|
|
24
|
+
(exp, m1, m2) => `${m1} * ${NP.round(1 / parseFloat(m2), 5)})`,
|
|
25
25
|
)
|
|
26
26
|
.replace(/--uk-[^\s]+: (\$[^\s]+);/g, (exp, name) => exp.replace(name, `#{${name}}`))
|
|
27
27
|
.replace(/\\\$/g, '\\@') // revert classes using the @ symbol
|
|
@@ -41,19 +41,19 @@ for (const file of (await glob('src/less/**/*.less')).sort()) {
|
|
|
41
41
|
.replace(/\.svg-fill/g, '@include svg-fill') // include svg-fill mixin
|
|
42
42
|
.replace(
|
|
43
43
|
/(.*):extend\((\.[\w\\@-]*) all\) when \((\$[\w-]*) = ([\w]+)\) {}/g,
|
|
44
|
-
'@if ( $3 == $4 ) { $1 { @extend $2 !optional;} }'
|
|
44
|
+
'@if ( $3 == $4 ) { $1 { @extend $2 !optional;} }',
|
|
45
45
|
) // update conditional extend and add !optional to ignore warnings
|
|
46
46
|
.replace(
|
|
47
47
|
/(\.[\w\\@-]+)\s*when\s*\((\$[\w-]*)\s*=\s*(\w+)\)\s*{\s*@if\(mixin-exists\(([\w-]*)\)\) {@include\s([\w-]*)\(\);\s*}\s*}/g,
|
|
48
|
-
'@if ($2 == $3) { $1 { @if (mixin-exists($4)) {@include $4();}}}'
|
|
48
|
+
'@if ($2 == $3) { $1 { @if (mixin-exists($4)) {@include $4();}}}',
|
|
49
49
|
) // update conditional hook
|
|
50
50
|
.replace(
|
|
51
51
|
/([.:][\w\\@-]+(?: ?[.:][\w\\@-]+)*)\s*when\s*\(([$@][\w-]*)\s*=\s*([$@]?[\w-]+)\)\s*({\s*.*?\s*})/gms,
|
|
52
|
-
'@if ($2 == $3) {\n$1 $4\n}'
|
|
52
|
+
'@if ($2 == $3) {\n$1 $4\n}',
|
|
53
53
|
)
|
|
54
54
|
.replace(
|
|
55
55
|
/([.:][\w\\@-]+(?: ?[.:][\w\\@-]+)*)\s*when\s+not\s*\(([$@][\w-]*)\s*=\s*([$@]?[\w-]+)\)\s*({\s*.*?\s*})/gs,
|
|
56
|
-
'@if ($2 != $3) {\n$1 $4\n}'
|
|
56
|
+
'@if ($2 != $3) {\n$1 $4\n}',
|
|
57
57
|
) // replace conditionals
|
|
58
58
|
.replace(/\${/g, '#{$') // string literals: from: /~"(.*)"/g, to: '#{"$1"}'
|
|
59
59
|
.replace(/[^(](-\$[\w-]*)/g, ' ($1)') // surround negative variables with brackets
|
|
@@ -80,7 +80,7 @@ for (const file of (await glob('src/less/**/*.less')).sort()) {
|
|
|
80
80
|
/* add uikit-mixins and uikit-variables include to the uikit.scss file and change order, to load theme files first */
|
|
81
81
|
source = source.replace(
|
|
82
82
|
/\/\/ Core\n\/\//g,
|
|
83
|
-
'// Theme\n//\n\n@import "theme/_import.scss";'
|
|
83
|
+
'// Theme\n//\n\n@import "theme/_import.scss";',
|
|
84
84
|
);
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -110,7 +110,7 @@ for (const [vars, file] of [
|
|
|
110
110
|
]) {
|
|
111
111
|
const variables = Object.keys(vars).reduce(
|
|
112
112
|
(dependencies, key) => resolveDependencies(vars, key, dependencies),
|
|
113
|
-
new Set()
|
|
113
|
+
new Set(),
|
|
114
114
|
);
|
|
115
115
|
await write(`src/scss/${file}.scss`, Array.from(variables).join('\n'));
|
|
116
116
|
}
|
|
@@ -147,7 +147,7 @@ function getMixinsFromFile(file, source) {
|
|
|
147
147
|
|
|
148
148
|
/* Step 2: get all mixins */
|
|
149
149
|
for (const [match, mixin] of source.matchAll(
|
|
150
|
-
/@mixin ([\w-]*)\s*\(.*\)\s*{(\n\s+[\w\W]+?(?=\n})\n| [^\n]+)}/g
|
|
150
|
+
/@mixin ([\w-]*)\s*\(.*\)\s*{(\n\s+[\w\W]+?(?=\n})\n| [^\n]+)}/g,
|
|
151
151
|
)) {
|
|
152
152
|
themeMixins[mixin] = match;
|
|
153
153
|
if (!file.includes('theme/')) {
|
package/build/util.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import alias from '@rollup/plugin-alias';
|
|
2
|
+
import replace from '@rollup/plugin-replace';
|
|
3
|
+
import CleanCSS from 'clean-css';
|
|
4
4
|
import fs from 'fs-extra';
|
|
5
|
-
import pLimit from 'p-limit';
|
|
6
5
|
import { glob } from 'glob';
|
|
6
|
+
import less from 'less';
|
|
7
7
|
import minimist from 'minimist';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import modify from 'rollup-plugin-modify';
|
|
11
|
-
import replace from '@rollup/plugin-replace';
|
|
8
|
+
import pLimit from 'p-limit';
|
|
9
|
+
import path from 'path';
|
|
12
10
|
import { rollup, watch as rollupWatch } from 'rollup';
|
|
13
11
|
import { default as esbuild, minify as esbuildMinify } from 'rollup-plugin-esbuild';
|
|
12
|
+
import modify from 'rollup-plugin-modify';
|
|
13
|
+
import svgo from 'svgo';
|
|
14
14
|
|
|
15
15
|
const limit = pLimit(Number(process.env.cpus || 2));
|
|
16
16
|
|
|
@@ -57,7 +57,7 @@ export async function minify(file) {
|
|
|
57
57
|
keepSpecialComments: 0,
|
|
58
58
|
rebase: false,
|
|
59
59
|
returnPromise: true,
|
|
60
|
-
}).minify([file])
|
|
60
|
+
}).minify([file]),
|
|
61
61
|
);
|
|
62
62
|
|
|
63
63
|
await write(`${path.join(path.dirname(file), path.basename(file, '.css'))}.min.css`, styles);
|
|
@@ -178,7 +178,7 @@ export async function compile(file, dest, { external, globals, name, aliases, re
|
|
|
178
178
|
export async function icons(src) {
|
|
179
179
|
const files = await glob(src);
|
|
180
180
|
const icons = await Promise.all(
|
|
181
|
-
files.map((file) => limit(async () => optimizeSvg(await read(file))))
|
|
181
|
+
files.map((file) => limit(async () => optimizeSvg(await read(file)))),
|
|
182
182
|
);
|
|
183
183
|
|
|
184
184
|
return JSON.stringify(
|
|
@@ -187,7 +187,7 @@ export async function icons(src) {
|
|
|
187
187
|
return result;
|
|
188
188
|
}, {}),
|
|
189
189
|
null,
|
|
190
|
-
' '
|
|
190
|
+
' ',
|
|
191
191
|
);
|
|
192
192
|
}
|
|
193
193
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.25-dev.12f581d90 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
/* ========================================================================
|
|
3
3
|
Component: Base
|
|
4
4
|
========================================================================== */
|