uikit 3.17.7 → 3.17.9-dev.4104d2f00
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 +13 -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 +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 +10 -2
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +10 -2
- 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 +2 -2
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +2 -2
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +10 -2
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +2 -2
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +10 -2
- 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 +10 -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 +13 -7
- 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 +13 -7
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/instance.js +5 -2
- package/src/js/api/props.js +20 -4
- package/src/js/util/lang.js +1 -1
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.17.
|
|
5
|
+
"version": "3.17.9-dev.4104d2f00",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/api/instance.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { remove, within } from 'uikit-util';
|
|
2
2
|
import { attachToElement, createComponent, detachFromElement, getComponent } from './component';
|
|
3
3
|
import { update } from './global';
|
|
4
4
|
import { callConnected, callDisconnected, callHook } from './hooks';
|
|
@@ -60,6 +60,7 @@ export default function (App) {
|
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
const ids = Object.create(null);
|
|
63
64
|
export function generateId(instance, el = instance.$el, postfix = '') {
|
|
64
65
|
if (el.id) {
|
|
65
66
|
return el.id;
|
|
@@ -67,9 +68,11 @@ export function generateId(instance, el = instance.$el, postfix = '') {
|
|
|
67
68
|
|
|
68
69
|
let id = `${instance.$options.id}-${instance._uid}${postfix}`;
|
|
69
70
|
|
|
70
|
-
if (
|
|
71
|
+
if (ids[id]) {
|
|
71
72
|
id = generateId(instance, el, `${postfix}-2`);
|
|
72
73
|
}
|
|
73
74
|
|
|
75
|
+
ids[id] = true;
|
|
76
|
+
|
|
74
77
|
return id;
|
|
75
78
|
}
|
package/src/js/api/props.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
camelize,
|
|
3
|
+
data as getData,
|
|
4
|
+
hasOwn,
|
|
5
|
+
hyphenate,
|
|
6
|
+
isUndefined,
|
|
7
|
+
memoize,
|
|
8
|
+
startsWith,
|
|
9
|
+
} from 'uikit-util';
|
|
2
10
|
import { registerObserver } from './observer';
|
|
3
11
|
import { coerce, parseOptions } from './options';
|
|
4
12
|
|
|
@@ -60,6 +68,15 @@ function notIn(options, key) {
|
|
|
60
68
|
return options.every((arr) => !arr || !hasOwn(arr, key));
|
|
61
69
|
}
|
|
62
70
|
|
|
71
|
+
const getAttributes = memoize((id, props) => {
|
|
72
|
+
const attributes = Object.keys(props);
|
|
73
|
+
const filter = attributes
|
|
74
|
+
.concat(id)
|
|
75
|
+
.map((key) => [hyphenate(key), `data-${hyphenate(key)}`])
|
|
76
|
+
.flat();
|
|
77
|
+
return { attributes, filter };
|
|
78
|
+
});
|
|
79
|
+
|
|
63
80
|
export function initPropsObserver(instance) {
|
|
64
81
|
const { $options, $props } = instance;
|
|
65
82
|
const { id, props, el } = $options;
|
|
@@ -68,8 +85,7 @@ export function initPropsObserver(instance) {
|
|
|
68
85
|
return;
|
|
69
86
|
}
|
|
70
87
|
|
|
71
|
-
const attributes =
|
|
72
|
-
const filter = attributes.map((key) => hyphenate(key)).concat(id);
|
|
88
|
+
const { attributes, filter } = getAttributes(id, props);
|
|
73
89
|
|
|
74
90
|
const observer = new MutationObserver((records) => {
|
|
75
91
|
const data = getProps($options);
|
|
@@ -87,7 +103,7 @@ export function initPropsObserver(instance) {
|
|
|
87
103
|
|
|
88
104
|
observer.observe(el, {
|
|
89
105
|
attributes: true,
|
|
90
|
-
attributeFilter: filter
|
|
106
|
+
attributeFilter: filter,
|
|
91
107
|
});
|
|
92
108
|
|
|
93
109
|
registerObserver(instance, observer);
|
package/src/js/util/lang.js
CHANGED
|
@@ -276,5 +276,5 @@ export function getIndex(i, elements, current = 0, finite = false) {
|
|
|
276
276
|
|
|
277
277
|
export function memoize(fn) {
|
|
278
278
|
const cache = Object.create(null);
|
|
279
|
-
return (key) => cache[key] || (cache[key] = fn(key));
|
|
279
|
+
return (key, ...args) => cache[key] || (cache[key] = fn(key, ...args));
|
|
280
280
|
}
|