uikit 3.19.5-dev.21fa5c45d → 3.19.5-dev.520984f53
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/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 +1 -1
- 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 +55 -55
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +55 -55
- 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 +10 -5
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +10 -5
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +11 -7
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +10 -5
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +11 -6
- 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 +1 -1
- 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 +25 -18
- 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 +27 -20
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/boot.js +6 -7
- package/src/js/api/component.js +4 -4
- package/src/js/components/slider.js +1 -1
- package/src/js/core/inverse.js +4 -2
- package/src/js/mixin/slider.js +0 -3
- package/src/js/mixin/slideshow.js +3 -0
- package/src/js/util/lang.js +1 -1
- package/src/js/util/selector.js +8 -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.19.5-dev.
|
|
5
|
+
"version": "3.19.5-dev.520984f53",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/api/boot.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { apply, hasAttr, inBrowser,
|
|
1
|
+
import { apply, hasAttr, inBrowser, startsWith, trigger } from 'uikit-util';
|
|
2
2
|
import { components, createComponent, getComponent, getComponents } from './component';
|
|
3
3
|
import { callConnected, callDisconnected } from './hooks';
|
|
4
4
|
|
|
@@ -53,16 +53,15 @@ function applyAttributeMutation({ target, attributeName }) {
|
|
|
53
53
|
if (name) {
|
|
54
54
|
if (hasAttr(target, attributeName)) {
|
|
55
55
|
createComponent(name, target);
|
|
56
|
-
|
|
56
|
+
} else {
|
|
57
|
+
getComponent(target, name)?.$destroy();
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
-
getComponent(target, name)?.$destroy();
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
61
|
|
|
63
62
|
function connect(node) {
|
|
64
63
|
const components = getComponents(node);
|
|
65
|
-
for (const name in
|
|
64
|
+
for (const name in components) {
|
|
66
65
|
callConnected(components[name]);
|
|
67
66
|
}
|
|
68
67
|
|
|
@@ -74,7 +73,7 @@ function connect(node) {
|
|
|
74
73
|
|
|
75
74
|
function disconnect(node) {
|
|
76
75
|
const components = getComponents(node);
|
|
77
|
-
for (const name in
|
|
76
|
+
for (const name in components) {
|
|
78
77
|
callDisconnected(components[name]);
|
|
79
78
|
}
|
|
80
79
|
}
|
|
@@ -85,5 +84,5 @@ function getComponentName(attribute) {
|
|
|
85
84
|
}
|
|
86
85
|
|
|
87
86
|
const cmp = components[attribute];
|
|
88
|
-
return cmp && (
|
|
87
|
+
return cmp && (cmp.options || cmp).name;
|
|
89
88
|
}
|
package/src/js/api/component.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { camelize, findAll, hyphenate, isEmpty, isPlainObject } from 'uikit-util';
|
|
2
2
|
import App from './app';
|
|
3
3
|
|
|
4
4
|
const PREFIX = 'uk-';
|
|
@@ -10,7 +10,7 @@ export function component(name, options) {
|
|
|
10
10
|
const id = PREFIX + hyphenate(name);
|
|
11
11
|
|
|
12
12
|
if (!options) {
|
|
13
|
-
if (
|
|
13
|
+
if (!components[id].options) {
|
|
14
14
|
components[id] = App.extend(components[id]);
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -21,7 +21,7 @@ export function component(name, options) {
|
|
|
21
21
|
|
|
22
22
|
App[name] = (element, data) => createComponent(name, element, data);
|
|
23
23
|
|
|
24
|
-
const opt =
|
|
24
|
+
const opt = options.options ?? { ...options };
|
|
25
25
|
|
|
26
26
|
opt.id = id;
|
|
27
27
|
opt.name = name;
|
|
@@ -41,7 +41,7 @@ export function createComponent(name, element, data, ...args) {
|
|
|
41
41
|
return Component.options.functional
|
|
42
42
|
? new Component({ data: isPlainObject(element) ? element : [element, data, ...args] })
|
|
43
43
|
: element
|
|
44
|
-
?
|
|
44
|
+
? findAll(element).map(init)[0]
|
|
45
45
|
: init();
|
|
46
46
|
|
|
47
47
|
function init(element) {
|
package/src/js/core/inverse.js
CHANGED
|
@@ -18,9 +18,11 @@ export default {
|
|
|
18
18
|
|
|
19
19
|
observe: [
|
|
20
20
|
intersection({
|
|
21
|
-
handler(
|
|
22
|
-
this.isIntersecting = isIntersecting;
|
|
21
|
+
handler(entries) {
|
|
22
|
+
this.isIntersecting = entries.some(({ isIntersecting }) => isIntersecting);
|
|
23
|
+
this.$emit();
|
|
23
24
|
},
|
|
25
|
+
target: ({ target }) => target,
|
|
24
26
|
args: { intersecting: false },
|
|
25
27
|
}),
|
|
26
28
|
mutation({
|
package/src/js/mixin/slider.js
CHANGED
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
removeClass,
|
|
11
11
|
trigger,
|
|
12
12
|
} from 'uikit-util';
|
|
13
|
-
import { resize } from '../api/observables';
|
|
14
13
|
import I18n from './i18n';
|
|
15
14
|
import SliderAutoplay from './slider-autoplay';
|
|
16
15
|
import SliderDrag from './slider-drag';
|
|
@@ -80,8 +79,6 @@ export default {
|
|
|
80
79
|
},
|
|
81
80
|
},
|
|
82
81
|
|
|
83
|
-
observe: resize(),
|
|
84
|
-
|
|
85
82
|
events: {
|
|
86
83
|
itemshow({ target }) {
|
|
87
84
|
addClass(target, this.clsEnter, this.clsSlideActive);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { addClass, removeClass } from 'uikit-util';
|
|
2
|
+
import { resize } from '../api/observables.js';
|
|
2
3
|
import Animations from './internal/slideshow-animations';
|
|
3
4
|
import Transitioner from './internal/slideshow-transitioner';
|
|
4
5
|
import Slider from './slider.js';
|
|
@@ -27,6 +28,8 @@ export default {
|
|
|
27
28
|
},
|
|
28
29
|
},
|
|
29
30
|
|
|
31
|
+
observe: resize(),
|
|
32
|
+
|
|
30
33
|
events: {
|
|
31
34
|
beforeitemshow({ target }) {
|
|
32
35
|
addClass(target, this.clsActive);
|
package/src/js/util/lang.js
CHANGED
package/src/js/util/selector.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { attr } from './attr';
|
|
2
|
-
import { index, matches
|
|
2
|
+
import { index, matches } from './filter';
|
|
3
3
|
import { isDocument, isString, memoize, toNode, toNodes } from './lang';
|
|
4
4
|
|
|
5
5
|
export function query(selector, context) {
|
|
@@ -33,7 +33,7 @@ const parseSelector = memoize((selector) => {
|
|
|
33
33
|
let isContextSelector = false;
|
|
34
34
|
|
|
35
35
|
const selectors = [];
|
|
36
|
-
for (let sel of selector.match(splitSelectorRe)) {
|
|
36
|
+
for (let sel of selector.match(splitSelectorRe) ?? []) {
|
|
37
37
|
sel = sel.replace(trailingCommaRe, '').trim();
|
|
38
38
|
if (sel[0] === '>') {
|
|
39
39
|
sel = `:scope ${sel}`;
|
|
@@ -67,7 +67,7 @@ function _query(selector, context = document, queryFn) {
|
|
|
67
67
|
|
|
68
68
|
if (sel[0] === '!') {
|
|
69
69
|
const selectors = sel.substr(1).trim().split(' ');
|
|
70
|
-
ctx =
|
|
70
|
+
ctx = context.parentElement.closest(selectors[0]);
|
|
71
71
|
sel = selectors.slice(1).join(' ').trim();
|
|
72
72
|
if (!sel.length && isSingle) {
|
|
73
73
|
return ctx;
|
|
@@ -83,7 +83,11 @@ function _query(selector, context = document, queryFn) {
|
|
|
83
83
|
return ctx;
|
|
84
84
|
}
|
|
85
85
|
} else if (sel[0] === '~' || (sel[0] === '+' && isSingle)) {
|
|
86
|
-
return _doQuery(
|
|
86
|
+
return _doQuery(
|
|
87
|
+
ctx.parentElement,
|
|
88
|
+
queryFn,
|
|
89
|
+
`:scope :nth-child(${index(ctx) + 1}) ${sel}`,
|
|
90
|
+
);
|
|
87
91
|
}
|
|
88
92
|
|
|
89
93
|
if (ctx) {
|