uikit 3.15.7-dev.3ec9925a1 → 3.15.7-dev.70998e579
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 +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 +2 -2
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +2 -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 +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 +2 -2
- 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 +2 -2
- 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 +4 -3
- 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 +24 -20
- package/dist/js/uikit-core.min.js +2 -2
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +27 -22
- package/dist/js/uikit.min.js +2 -2
- package/package.json +1 -1
- package/src/js/api/component.js +0 -1
- package/src/js/api/instance.js +11 -6
- package/src/js/api/state.js +11 -11
- package/src/js/components/tooltip.js +3 -2
- package/src/js/core/icon.js +1 -1
- package/src/js/mixin/class.js +2 -2
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.15.7-dev.
|
|
5
|
+
"version": "3.15.7-dev.70998e579",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/api/component.js
CHANGED
package/src/js/api/instance.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isEmpty, remove, within } from 'uikit-util';
|
|
1
|
+
import { hyphenate, isEmpty, memoize, remove, within } from 'uikit-util';
|
|
2
2
|
|
|
3
3
|
export default function (UIkit) {
|
|
4
4
|
const DATA = UIkit.data;
|
|
@@ -66,9 +66,14 @@ export default function (UIkit) {
|
|
|
66
66
|
|
|
67
67
|
UIkit.prototype.$getComponent = UIkit.getComponent;
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
const componentName = memoize((name) => UIkit.prefix + hyphenate(name));
|
|
70
|
+
Object.defineProperties(UIkit.prototype, {
|
|
71
|
+
$container: Object.getOwnPropertyDescriptor(UIkit, 'container'),
|
|
72
|
+
|
|
73
|
+
$name: {
|
|
74
|
+
get() {
|
|
75
|
+
return componentName(this.$options.name);
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
});
|
|
74
79
|
}
|
package/src/js/api/state.js
CHANGED
|
@@ -73,7 +73,7 @@ export default function (UIkit) {
|
|
|
73
73
|
UIkit.prototype._initProps = function (props) {
|
|
74
74
|
let key;
|
|
75
75
|
|
|
76
|
-
props = props || getProps(this.$options);
|
|
76
|
+
props = props || getProps(this.$options, this.$name);
|
|
77
77
|
|
|
78
78
|
for (key in props) {
|
|
79
79
|
if (!isUndefined(props[key])) {
|
|
@@ -124,9 +124,9 @@ export default function (UIkit) {
|
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
function getProps(opts) {
|
|
127
|
+
function getProps(opts, name) {
|
|
128
128
|
const data = {};
|
|
129
|
-
const { args = [], props = {}, el
|
|
129
|
+
const { args = [], props = {}, el } = opts;
|
|
130
130
|
|
|
131
131
|
if (!props) {
|
|
132
132
|
return data;
|
|
@@ -149,7 +149,7 @@ function getProps(opts) {
|
|
|
149
149
|
data[key] = value;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
const options = parseOptions(getData(el,
|
|
152
|
+
const options = parseOptions(getData(el, name), args);
|
|
153
153
|
|
|
154
154
|
for (const key in options) {
|
|
155
155
|
const prop = camelize(key);
|
|
@@ -277,24 +277,24 @@ function initChildListObserver(component) {
|
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
function initPropsObserver(component) {
|
|
280
|
-
const { $options, $props } = component;
|
|
281
|
-
const {
|
|
280
|
+
const { $name, $options, $props } = component;
|
|
281
|
+
const { attrs, props, el } = $options;
|
|
282
282
|
|
|
283
283
|
if (!props || attrs === false) {
|
|
284
284
|
return;
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
const attributes = isArray(attrs) ? attrs : Object.keys(props);
|
|
288
|
-
const filter = attributes.map((key) => hyphenate(key)).concat(
|
|
288
|
+
const filter = attributes.map((key) => hyphenate(key)).concat($name);
|
|
289
289
|
|
|
290
290
|
const observer = new MutationObserver((records) => {
|
|
291
|
-
const data = getProps($options);
|
|
291
|
+
const data = getProps($options, $name);
|
|
292
292
|
if (
|
|
293
293
|
records.some(({ attributeName }) => {
|
|
294
294
|
const prop = attributeName.replace('data-', '');
|
|
295
|
-
return (
|
|
296
|
-
|
|
297
|
-
);
|
|
295
|
+
return (
|
|
296
|
+
prop === $name ? attributes : [camelize(prop), camelize(attributeName)]
|
|
297
|
+
).some((prop) => !isUndefined(data[prop]) && data[prop] !== $props[prop]);
|
|
298
298
|
})
|
|
299
299
|
) {
|
|
300
300
|
component.$reset();
|
|
@@ -59,12 +59,13 @@ export default {
|
|
|
59
59
|
|
|
60
60
|
this._unbind = once(
|
|
61
61
|
document,
|
|
62
|
-
`keydown ${pointerDown}`,
|
|
62
|
+
`show keydown ${pointerDown}`,
|
|
63
63
|
this.hide,
|
|
64
64
|
false,
|
|
65
65
|
(e) =>
|
|
66
66
|
(e.type === pointerDown && !within(e.target, this.$el)) ||
|
|
67
|
-
(e.type === 'keydown' && e.keyCode === 27)
|
|
67
|
+
(e.type === 'keydown' && e.keyCode === 27) ||
|
|
68
|
+
(e.type === 'show' && e.detail[0] !== this && e.detail[0].$name === this.$name)
|
|
68
69
|
);
|
|
69
70
|
|
|
70
71
|
clearTimeout(this.showTimer);
|
package/src/js/core/icon.js
CHANGED
package/src/js/mixin/class.js
CHANGED