uikit 3.25.23-dev.2ad20f7 → 3.25.23-dev.9ebc131
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/CHANGELOG.md +4 -0
- package/build/build.js +1 -2
- package/build/scss.js +83 -54
- 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 +4 -4
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +326 -37
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +326 -37
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +195 -195
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +4 -9
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +6 -4
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +110 -102
- 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 +109 -104
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/app.js +2 -4
- package/src/js/api/component.js +12 -8
- package/src/js/api/observables.js +2 -4
- package/src/js/api/props.js +1 -2
- package/src/js/components/countdown.js +1 -1
- package/src/js/components/slider.js +1 -1
- package/src/js/components/slideshow.js +0 -5
- package/src/js/components/tooltip.js +4 -2
- package/src/js/core/accordion.js +11 -7
- package/src/js/core/drop.js +10 -32
- package/src/js/core/dropnav.js +1 -1
- package/src/js/core/form-custom.js +1 -1
- package/src/js/core/img.js +2 -7
- package/src/js/core/overflow-fade.js +6 -5
- package/src/js/mixin/event.js +31 -0
- package/src/js/mixin/modal.js +26 -34
- package/src/js/mixin/svg.js +1 -1
- package/src/js/util/event.js +1 -5
package/CHANGELOG.md
CHANGED
package/build/build.js
CHANGED
|
@@ -9,8 +9,7 @@ const bundles = getBundleTasks();
|
|
|
9
9
|
const components = await getComponentTasks();
|
|
10
10
|
const buildAll =
|
|
11
11
|
args.all ||
|
|
12
|
-
!Object.keys(args).
|
|
13
|
-
.length;
|
|
12
|
+
!Object.keys(args).some((name) => !['d', 'debug', 'nominify', 'watch', '_'].includes(name));
|
|
14
13
|
|
|
15
14
|
if (args.h || args.help) {
|
|
16
15
|
console.log(`
|
package/build/scss.js
CHANGED
|
@@ -13,55 +13,7 @@ await emptyDir('src/scss');
|
|
|
13
13
|
for (const file of (await glob('src/less/**/*.less'))
|
|
14
14
|
.sort()
|
|
15
15
|
.sort((a, b) => a.endsWith('/inverse.less') - b.endsWith('/inverse.less'))) {
|
|
16
|
-
|
|
17
|
-
let source = (await read(file))
|
|
18
|
-
.replace(/\/less\//g, '/scss/') // change less/ dir to scss/ on imports
|
|
19
|
-
.replace(/\.less/g, '.scss') // change .less extensions to .scss on imports
|
|
20
|
-
.replace(/@(?!property)/g, '$') // convert variables
|
|
21
|
-
.replace(
|
|
22
|
-
/(:[^'"]*?\([^'"]+?)\s*\/\s*([0-9.-]+)\)/g,
|
|
23
|
-
(exp, m1, m2) => `${m1} * ${round(1 / parseFloat(m2), 5)})`,
|
|
24
|
-
)
|
|
25
|
-
.replace(/--uk-\S+: (\$\S+);/g, (exp, name) => exp.replace(name, `#{${name}}`))
|
|
26
|
-
.replace(/\\\$/g, '\\@') // revert classes using the @ symbol
|
|
27
|
-
.replace(/ e\(/g, ' unquote(') // convert escape function
|
|
28
|
-
.replace(/\.([\w-]*)\s*\((.*)\)\s*{/g, '@mixin $1($2){') // hook -> mixins
|
|
29
|
-
.replace(/(\$[\w-]*)\s*:(.*);/g, '$1: $2 !default;') // make variables optional
|
|
30
|
-
.replace(/@mixin ([\w-]*)\s*\((.*)\)\s*{\s*}/g, '// @mixin $1($2){}') // comment empty mixins
|
|
31
|
-
.replace(/\.(hook[a-zA-Z\-\d]+)(\(\))?;/g, '@if(mixin-exists($1)) {@include $1();}') // hook calls surrounded by a mixin-exists
|
|
32
|
-
.replace(/\$(import|supports|media|font-face|page|keyframes|-moz-document)/g, '@$1') // replace valid '@' statements
|
|
33
|
-
.replace(/tint\((\$[\w-]+),\s([^)]*)\)/g, 'mix(white, $1, $2)') // replace Less function tint with mix
|
|
34
|
-
.replace(/fade\((\$[\w-]*), ([0-9]+)%\)/g, (match, p1, p2) => {
|
|
35
|
-
return `rgba(${p1}, ${p2 / 100})`;
|
|
36
|
-
}) // replace Less function fade with rgba
|
|
37
|
-
.replace(/spin\((\$[\w-]*), ([0-9]+)\)/g, (match, p1, p2) => {
|
|
38
|
-
return `adjust-hue(${p1}, ${p2})`;
|
|
39
|
-
}) // replace Less function spin with adjust-hue
|
|
40
|
-
.replace(/fade(in|out)\((\$[\w-]*), ([0-9]+)%\)/g, (match, p1, p2, p3) => {
|
|
41
|
-
return `fade-${p1}(${p2}, ${p3 / 100})`;
|
|
42
|
-
}) // replace Less function fadeout with fade-out
|
|
43
|
-
.replace(/\.svg-fill/g, '@include svg-fill') // include svg-fill mixin
|
|
44
|
-
.replace(
|
|
45
|
-
/(.*):extend\((\.[\w\\@-]*) all\) when \((\$[\w-]*) = (\w+)\) {}/g,
|
|
46
|
-
'@if ( $3 == $4 ) { $1 { @extend $2 !optional;} }',
|
|
47
|
-
) // update conditional extend and add !optional to ignore warnings
|
|
48
|
-
.replace(
|
|
49
|
-
/(\.[\w\\@-]+)\s*when\s*\((\$[\w-]*)\s*=\s*(\w+)\)\s*{\s*@if\(mixin-exists\(([\w-]*)\)\) {@include\s([\w-]*)\(\);\s*}\s*}/g,
|
|
50
|
-
'@if ($2 == $3) { $1 { @if (mixin-exists($4)) {@include $4();}}}',
|
|
51
|
-
) // update conditional hook
|
|
52
|
-
.replace(
|
|
53
|
-
/([.:][\w\\@-]+(?: ?[.:][\w\\@-]+)*)\s*when\s*\(([$@][\w-]*)\s*=\s*([$@]?[\w-]+)\)\s*({\s*.*?\s*})/gms,
|
|
54
|
-
'@if ($2 == $3) {\n$1 $4\n}',
|
|
55
|
-
)
|
|
56
|
-
.replace(
|
|
57
|
-
/([.:][\w\\@-]+(?: ?[.:][\w\\@-]+)*)\s*when\s+not\s*\(([$@][\w-]*)\s*=\s*([$@]?[\w-]+)\)\s*({\s*.*?\s*})/gs,
|
|
58
|
-
'@if ($2 != $3) {\n$1 $4\n}',
|
|
59
|
-
) // replace conditionals
|
|
60
|
-
.replace(/\${/g, '#{$') // string literals: from: /~"(.*)"/g, to: '#{"$1"}'
|
|
61
|
-
.replace(/[^(](-\$[\w-]*)/g, ' ($1)') // surround negative variables with brackets
|
|
62
|
-
.replace(/(--[\w-]+:\s*)~'([^']+)'/g, '$1$2') // string literals in custom properties
|
|
63
|
-
.replace(/~('[^']+')/g, 'unquote($1)') // string literals: for real
|
|
64
|
-
.replace(/(\w+)&/g, '&:is($1)'); // replace parent selector & when not at beginning of selector
|
|
16
|
+
let source = convertLessToSass(await read(file));
|
|
65
17
|
|
|
66
18
|
/* File name of the current file */
|
|
67
19
|
const filename = path.basename(file, '.less');
|
|
@@ -104,6 +56,85 @@ for (const file of (await glob('src/less/**/*.less'))
|
|
|
104
56
|
);
|
|
105
57
|
}
|
|
106
58
|
}
|
|
59
|
+
function convertLessToSass(source) {
|
|
60
|
+
source = rewriteImportsAndVariables(source);
|
|
61
|
+
source = rewriteMathAndEscapes(source);
|
|
62
|
+
source = rewriteMixinsAndHooks(source);
|
|
63
|
+
source = rewriteSassFunctions(source);
|
|
64
|
+
source = rewriteConditionals(source);
|
|
65
|
+
return rewriteStringLiterals(source);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function rewriteImportsAndVariables(source) {
|
|
69
|
+
return source
|
|
70
|
+
.replace(/\/less\//g, '/scss/')
|
|
71
|
+
.replace(/\.less/g, '.scss')
|
|
72
|
+
.replace(/@(?!property)/g, '$');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function rewriteMathAndEscapes(source) {
|
|
76
|
+
return source
|
|
77
|
+
.replace(
|
|
78
|
+
/(:[^'"]*?\([^'"]+?)\s*\/\s*([0-9.-]+)\)/g,
|
|
79
|
+
(exp, m1, m2) => `${m1} * ${round(1 / parseFloat(m2), 5)})`,
|
|
80
|
+
)
|
|
81
|
+
.replace(/--uk-\S+: (\$\S+);/g, (exp, name) => exp.replace(name, `#{${name}}`))
|
|
82
|
+
.replace(/\\\$/g, '\\@')
|
|
83
|
+
.replace(/ e\(/g, ' unquote(');
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function rewriteMixinsAndHooks(source) {
|
|
87
|
+
return source
|
|
88
|
+
.replace(/\.([\w-]*)\s*\((.*)\)\s*{/g, '@mixin $1($2){')
|
|
89
|
+
.replace(/(\$[\w-]*)\s*:(.*);/g, '$1: $2 !default;')
|
|
90
|
+
.replace(/@mixin ([\w-]*)\s*\((.*)\)\s*{\s*}/g, '// @mixin $1($2){}')
|
|
91
|
+
.replace(/\.(hook[a-zA-Z\-\d]+)(\(\))?;/g, '@if(mixin-exists($1)) {@include $1();}')
|
|
92
|
+
.replace(/\$(import|supports|media|font-face|page|keyframes|-moz-document)/g, '@$1')
|
|
93
|
+
.replace(/\.svg-fill/g, '@include svg-fill');
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function rewriteSassFunctions(source) {
|
|
97
|
+
return source
|
|
98
|
+
.replace(/tint\((\$[\w-]+),\s([^)]*)\)/g, 'mix(white, $1, $2)')
|
|
99
|
+
.replace(/fade\((\$[\w-]*), ([0-9]+)%\)/g, (match, p1, p2) => {
|
|
100
|
+
return `rgba(${p1}, ${p2 / 100})`;
|
|
101
|
+
})
|
|
102
|
+
.replace(/spin\((\$[\w-]*), ([0-9]+)\)/g, (match, p1, p2) => {
|
|
103
|
+
return `adjust-hue(${p1}, ${p2})`;
|
|
104
|
+
})
|
|
105
|
+
.replace(/fade(in|out)\((\$[\w-]*), ([0-9]+)%\)/g, (match, p1, p2, p3) => {
|
|
106
|
+
return `fade-${p1}(${p2}, ${p3 / 100})`;
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function rewriteConditionals(source) {
|
|
111
|
+
return source
|
|
112
|
+
.replace(
|
|
113
|
+
/(.*):extend\((\.[\w\\@-]*) all\) when \((\$[\w-]*) = (\w+)\) {}/g,
|
|
114
|
+
'@if ( $3 == $4 ) { $1 { @extend $2 !optional;} }',
|
|
115
|
+
)
|
|
116
|
+
.replace(
|
|
117
|
+
/(\.[\w\\@-]+)\s*when\s*\((\$[\w-]*)\s*=\s*(\w+)\)\s*{\s*@if\(mixin-exists\(([\w-]*)\)\) {@include\s([\w-]*)\(\);\s*}\s*}/g,
|
|
118
|
+
'@if ($2 == $3) { $1 { @if (mixin-exists($4)) {@include $4();}}}',
|
|
119
|
+
)
|
|
120
|
+
.replace(
|
|
121
|
+
/([.:][\w\\@-]+(?: ?[.:][\w\\@-]+)*)\s*when\s*\(([$@][\w-]*)\s*=\s*([$@]?[\w-]+)\)\s*({\s*.*?\s*})/gms,
|
|
122
|
+
'@if ($2 == $3) {\n$1 $4\n}',
|
|
123
|
+
)
|
|
124
|
+
.replace(
|
|
125
|
+
/([.:][\w\\@-]+(?: ?[.:][\w\\@-]+)*)\s*when\s+not\s*\(([$@][\w-]*)\s*=\s*([$@]?[\w-]+)\)\s*({\s*.*?\s*})/gs,
|
|
126
|
+
'@if ($2 != $3) {\n$1 $4\n}',
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function rewriteStringLiterals(source) {
|
|
131
|
+
return source
|
|
132
|
+
.replace(/\${/g, '#{$')
|
|
133
|
+
.replace(/[^(](-\$[\w-]*)/g, ' ($1)')
|
|
134
|
+
.replace(/(--[\w-]+:\s*)~'([^']+)'/g, '$1$2')
|
|
135
|
+
.replace(/~('[^']+')/g, 'unquote($1)')
|
|
136
|
+
.replace(/(\w+)&/g, '&:is($1)');
|
|
137
|
+
}
|
|
107
138
|
|
|
108
139
|
/* write mixins files */
|
|
109
140
|
for (const [vars, file] of [
|
|
@@ -124,7 +155,7 @@ for (const [vars, file] of [
|
|
|
124
155
|
(dependencies, key) => resolveDependencies(vars, key, dependencies),
|
|
125
156
|
new Set(),
|
|
126
157
|
);
|
|
127
|
-
await write(`src/scss/${file}.scss`, useSassModules(
|
|
158
|
+
await write(`src/scss/${file}.scss`, useSassModules([...variables].join('\n')));
|
|
128
159
|
}
|
|
129
160
|
|
|
130
161
|
/*
|
|
@@ -154,9 +185,7 @@ function useSassModules(source) {
|
|
|
154
185
|
}
|
|
155
186
|
|
|
156
187
|
return modules.size
|
|
157
|
-
? `${
|
|
158
|
-
.map((module) => `@use "sass:${module}";`)
|
|
159
|
-
.join('\n')}\n\n${source}`
|
|
188
|
+
? `${[...modules].map((module) => `@use "sass:${module}";`).join('\n')}\n\n${source}`
|
|
160
189
|
: source;
|
|
161
190
|
}
|
|
162
191
|
|
|
@@ -230,7 +259,7 @@ async function getVariablesFromFile(file, source) {
|
|
|
230
259
|
|
|
231
260
|
/* if it's not an SVG add the variable and search for its dependencies */
|
|
232
261
|
} else {
|
|
233
|
-
dependencies = Array.from(value.matchAll(/\$[\w-]+/g)
|
|
262
|
+
dependencies = Array.from(value.matchAll(/\$[\w-]+/g), ([value]) => value);
|
|
234
263
|
}
|
|
235
264
|
|
|
236
265
|
themeVariables[name] = { value: `${value};`, dependencies };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.25.23-dev.
|
|
1
|
+
/*! UIkit 3.25.23-dev.9ebc131 | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */
|
|
2
2
|
/* ========================================================================
|
|
3
3
|
Component: Base
|
|
4
4
|
========================================================================== */
|