uikit 3.25.22-dev.d02a9a6 → 3.25.23-dev.0ea1d51
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 +1 -1
- package/build/build.js +1 -2
- 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 +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +4 -7
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +4 -7
- 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 +6 -6
- 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 +5 -10
- 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 +2 -2
- 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 +23 -28
- 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 +26 -36
- 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/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/core/form-custom.js +1 -1
- package/src/js/core/height-match.js +1 -2
- package/src/js/core/img.js +2 -7
- package/src/js/core/switcher.js +1 -1
- package/src/js/mixin/slider-nav.js +1 -1
- package/src/js/mixin/svg.js +1 -1
- package/src/js/util/class.js +1 -1
- package/src/js/util/event.js +1 -5
- package/src/js/util/lang.js +6 -2
- package/src/js/util/player.js +2 -4
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "uikit",
|
|
3
3
|
"title": "UIkit",
|
|
4
4
|
"description": "UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.",
|
|
5
|
-
"version": "3.25.
|
|
5
|
+
"version": "3.25.23-dev.0ea1d51",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/api/app.js
CHANGED
|
@@ -2,12 +2,10 @@ import * as util from 'uikit-util';
|
|
|
2
2
|
import VERSION from 'virtual:version';
|
|
3
3
|
import { init } from './state';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
export default function App(options) {
|
|
6
6
|
init(this, options);
|
|
7
|
-
}
|
|
7
|
+
}
|
|
8
8
|
|
|
9
9
|
App.util = util;
|
|
10
10
|
App.options = {};
|
|
11
11
|
App.version = VERSION;
|
|
12
|
-
|
|
13
|
-
export default App;
|
|
@@ -43,10 +43,8 @@ export function lazyload(options = {}) {
|
|
|
43
43
|
.forEach((el) => removeAttr(el, 'loading'));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
for (const
|
|
47
|
-
|
|
48
|
-
.map(({ target }) => target)) {
|
|
49
|
-
observer.unobserve(el);
|
|
46
|
+
for (const { isIntersecting, target } of entries) {
|
|
47
|
+
isIntersecting && observer.unobserve(target);
|
|
50
48
|
}
|
|
51
49
|
},
|
|
52
50
|
...options,
|
package/src/js/api/props.js
CHANGED
|
@@ -69,8 +69,7 @@ const getAttributes = memoize((id, props) => {
|
|
|
69
69
|
const attributes = Object.keys(props);
|
|
70
70
|
const filter = attributes
|
|
71
71
|
.concat(id)
|
|
72
|
-
.
|
|
73
|
-
.flat();
|
|
72
|
+
.flatMap((key) => [hyphenate(key), `data-${hyphenate(key)}`]);
|
|
74
73
|
return { attributes, filter };
|
|
75
74
|
});
|
|
76
75
|
|
|
@@ -90,7 +90,7 @@ export default {
|
|
|
90
90
|
digits = digits.split('');
|
|
91
91
|
|
|
92
92
|
if (digits.length !== el.children.length) {
|
|
93
|
-
html(el,
|
|
93
|
+
html(el, '<span></span>'.repeat(digits.length));
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
digits.forEach((digit, i) => (el.children[i].textContent = digit));
|
|
@@ -43,7 +43,7 @@ export default {
|
|
|
43
43
|
const value = input.files?.[0]
|
|
44
44
|
? input.files[0].name
|
|
45
45
|
: matches(input, 'select') &&
|
|
46
|
-
(option = $$('option', input).
|
|
46
|
+
(option = $$('option', input).find((el) => el.selected))
|
|
47
47
|
? option.textContent
|
|
48
48
|
: input.value;
|
|
49
49
|
|
|
@@ -20,8 +20,7 @@ export default {
|
|
|
20
20
|
},
|
|
21
21
|
|
|
22
22
|
observe: resize({
|
|
23
|
-
target: ({ $el, elements }) =>
|
|
24
|
-
elements.reduce((elements, el) => elements.concat(el, ...el.children), [$el]),
|
|
23
|
+
target: ({ $el, elements }) => [$el, ...elements.flatMap((el) => [el, ...el.children])],
|
|
25
24
|
}),
|
|
26
25
|
|
|
27
26
|
events: {
|
package/src/js/core/img.js
CHANGED
|
@@ -88,8 +88,7 @@ function setSrcAttrs(el, src) {
|
|
|
88
88
|
const elements = isTag(parentNode, 'picture') ? children(parentNode) : [el];
|
|
89
89
|
elements.forEach((el) => setSourceProps(el, el));
|
|
90
90
|
} else if (src) {
|
|
91
|
-
|
|
92
|
-
if (change) {
|
|
91
|
+
if (!includes(el.style.backgroundImage, src)) {
|
|
93
92
|
css(el, 'backgroundImage', `url(${escape(src)})`);
|
|
94
93
|
trigger(el, createEvent('load', false));
|
|
95
94
|
}
|
|
@@ -145,11 +144,7 @@ function parseSources(sources) {
|
|
|
145
144
|
sources = parseOptions(sources);
|
|
146
145
|
}
|
|
147
146
|
|
|
148
|
-
|
|
149
|
-
sources = [sources];
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
return sources.filter((source) => !isEmpty(source));
|
|
147
|
+
return (isArray(sources) ? sources : [sources]).filter((source) => !isEmpty(source));
|
|
153
148
|
}
|
|
154
149
|
|
|
155
150
|
function isImg(el) {
|
package/src/js/core/switcher.js
CHANGED
|
@@ -35,7 +35,7 @@ export default {
|
|
|
35
35
|
nav: ({ selNav }, $el) => $$(selNav, $el),
|
|
36
36
|
|
|
37
37
|
navChildren() {
|
|
38
|
-
return this.nav.
|
|
38
|
+
return this.nav.flatMap((nav) => children(nav));
|
|
39
39
|
},
|
|
40
40
|
|
|
41
41
|
selNavItem: ({ attrItem }) => `[${attrItem}],[data-${attrItem}]`,
|
package/src/js/mixin/svg.js
CHANGED
|
@@ -104,7 +104,7 @@ export function parseSVG(svg, icon) {
|
|
|
104
104
|
svg = parseSymbols(svg)[icon] || svg;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
return toNodes(fragment(svg)).
|
|
107
|
+
return toNodes(fragment(svg)).find(isElement);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
const symbolRe = /<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g;
|
package/src/js/util/class.js
CHANGED
package/src/js/util/event.js
CHANGED
|
@@ -60,11 +60,7 @@ export function trigger(targets, event, detail) {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
export function createEvent(e, bubbles = true, cancelable = false, detail) {
|
|
63
|
-
|
|
64
|
-
e = new CustomEvent(e, { bubbles, cancelable, detail });
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return e;
|
|
63
|
+
return isString(e) ? new CustomEvent(e, { bubbles, cancelable, detail }) : e;
|
|
68
64
|
}
|
|
69
65
|
|
|
70
66
|
function getArgs(args) {
|
package/src/js/util/lang.js
CHANGED
|
@@ -173,11 +173,15 @@ export function sumBy(array, iteratee) {
|
|
|
173
173
|
|
|
174
174
|
export function uniqueBy(array, prop) {
|
|
175
175
|
const seen = new Set();
|
|
176
|
-
return array.filter(({ [prop]: check }) =>
|
|
176
|
+
return array.filter(({ [prop]: check }) => !seen.has(check) && seen.add(check));
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
export function pick(obj, props) {
|
|
180
|
-
|
|
180
|
+
const result = {};
|
|
181
|
+
for (const prop of props) {
|
|
182
|
+
result[prop] = obj[prop];
|
|
183
|
+
}
|
|
184
|
+
return result;
|
|
181
185
|
}
|
|
182
186
|
|
|
183
187
|
export function clamp(number, min = 0, max = 1) {
|
package/src/js/util/player.js
CHANGED
|
@@ -42,13 +42,11 @@ function isIFrame(el) {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
function isYoutube(el) {
|
|
45
|
-
return
|
|
46
|
-
/\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\/.*/,
|
|
47
|
-
);
|
|
45
|
+
return /\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\//.test(el.src);
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
function isVimeo(el) {
|
|
51
|
-
return
|
|
49
|
+
return /vimeo\.com\/video\/.*/.test(el.src);
|
|
52
50
|
}
|
|
53
51
|
|
|
54
52
|
async function call(el, cmd) {
|