uikit 3.11.2-dev.bbaa4362f → 3.11.2-dev.c08a5b5f0
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 +18 -0
- package/build/scss.js +1 -1
- package/dist/css/uikit-core-rtl.css +42 -17
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +42 -17
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +42 -17
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +42 -17
- 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 +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1 -1
- 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 +1 -1
- 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 +36 -1
- 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 +156 -160
- 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 +191 -160
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/component.js +1 -1
- package/src/js/api/state.js +20 -24
- package/src/js/components/slideshow.js +32 -1
- package/src/js/core/drop.js +1 -1
- package/src/js/core/img.js +128 -108
- package/src/js/core/navbar.js +1 -1
- package/src/js/util/options.js +4 -4
- package/src/less/components/flex.less +0 -9
- package/src/less/components/navbar.less +0 -7
- package/src/less/components/utility.less +22 -0
- package/src/scss/components/flex.scss +0 -9
- package/src/scss/components/form.scss +3 -3
- package/src/scss/components/icon.scss +2 -2
- package/src/scss/components/navbar.scss +0 -7
- package/src/scss/components/search.scss +1 -1
- package/src/scss/components/utility.scss +22 -0
- package/src/scss/variables-theme.scss +6 -6
- package/src/scss/variables.scss +6 -6
- package/tests/image.html +33 -37
- package/tests/images/test.avif +0 -0
- package/tests/images/test.webp +0 -0
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.11.2-dev.
|
|
5
|
+
"version": "3.11.2-dev.c08a5b5f0",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/api/component.js
CHANGED
|
@@ -28,7 +28,7 @@ export default function (UIkit) {
|
|
|
28
28
|
|
|
29
29
|
return component.options.functional
|
|
30
30
|
? new component({data: isPlainObject(element) ? element : [...arguments]})
|
|
31
|
-
:
|
|
31
|
+
: element ? $$(element).map(init)[0] : init();
|
|
32
32
|
|
|
33
33
|
function init(element) {
|
|
34
34
|
|
package/src/js/api/state.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {assign, camelize, data as getData, hasOwn, hyphenate, isArray,
|
|
1
|
+
import {assign, camelize, data as getData, hasOwn, hyphenate, isArray, isFunction, isNumeric, isPlainObject, isString, isUndefined, mergeOptions, on, parseOptions, startsWith, toBoolean, toNumber} from 'uikit-util';
|
|
2
2
|
|
|
3
3
|
export default function (UIkit) {
|
|
4
4
|
|
|
@@ -211,11 +211,11 @@ export default function (UIkit) {
|
|
|
211
211
|
on(
|
|
212
212
|
el,
|
|
213
213
|
name,
|
|
214
|
-
|
|
215
|
-
?
|
|
216
|
-
: isString(delegate)
|
|
214
|
+
delegate
|
|
215
|
+
? isString(delegate)
|
|
217
216
|
? delegate
|
|
218
|
-
: delegate.call(component)
|
|
217
|
+
: delegate.call(component)
|
|
218
|
+
: null,
|
|
219
219
|
isString(handler) ? component[handler] : handler.bind(component),
|
|
220
220
|
{passive, capture, self}
|
|
221
221
|
)
|
|
@@ -250,27 +250,23 @@ export default function (UIkit) {
|
|
|
250
250
|
: [value];
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
function normalizeData({data}, {args, props = {}}) {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
assign(data, value);
|
|
259
|
-
} else {
|
|
260
|
-
data[args[index]] = value;
|
|
261
|
-
}
|
|
262
|
-
return data;
|
|
263
|
-
}, {})
|
|
264
|
-
: undefined
|
|
265
|
-
: data;
|
|
266
|
-
|
|
267
|
-
if (data) {
|
|
268
|
-
for (const key in data) {
|
|
269
|
-
if (isUndefined(data[key])) {
|
|
270
|
-
delete data[key];
|
|
253
|
+
function normalizeData({data = {}}, {args = [], props = {}}) {
|
|
254
|
+
if (isArray(data)) {
|
|
255
|
+
data = data.slice(0, args.length).reduce((data, value, index) => {
|
|
256
|
+
if (isPlainObject(value)) {
|
|
257
|
+
assign(data, value);
|
|
271
258
|
} else {
|
|
272
|
-
data[
|
|
259
|
+
data[args[index]] = value;
|
|
273
260
|
}
|
|
261
|
+
return data;
|
|
262
|
+
}, {});
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
for (const key in data) {
|
|
266
|
+
if (isUndefined(data[key])) {
|
|
267
|
+
delete data[key];
|
|
268
|
+
} else if (props[key]) {
|
|
269
|
+
data[key] = coerce(props[key], data[key]);
|
|
274
270
|
}
|
|
275
271
|
}
|
|
276
272
|
|
|
@@ -2,7 +2,7 @@ import Class from '../mixin/class';
|
|
|
2
2
|
import Slideshow from '../mixin/slideshow';
|
|
3
3
|
import Animations from './internal/slideshow-animations';
|
|
4
4
|
import SliderReactive from '../mixin/slider-reactive';
|
|
5
|
-
import {boxModelAdjust, css} from 'uikit-util';
|
|
5
|
+
import {$$, boxModelAdjust, css, isVisible} from 'uikit-util';
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
8
|
|
|
@@ -24,6 +24,29 @@ export default {
|
|
|
24
24
|
Animations
|
|
25
25
|
},
|
|
26
26
|
|
|
27
|
+
connected() {
|
|
28
|
+
if (window.IntersectionObserver) {
|
|
29
|
+
this.observer = new IntersectionObserver(entries => {
|
|
30
|
+
if (entries.some(entry => entry.isIntersecting)) {
|
|
31
|
+
this.preloadSlides();
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
this.observer.observe(this.$el);
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
disconnected() {
|
|
39
|
+
this.observer && this.observer.disconnect();
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
methods: {
|
|
43
|
+
|
|
44
|
+
preloadSlides() {
|
|
45
|
+
[1, -1].forEach(i => removeLazyLoad(this.slides[this.getIndex(this.index + i)]));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
},
|
|
49
|
+
|
|
27
50
|
update: {
|
|
28
51
|
|
|
29
52
|
read() {
|
|
@@ -44,6 +67,10 @@ export default {
|
|
|
44
67
|
height = Math.min(this.maxHeight, height);
|
|
45
68
|
}
|
|
46
69
|
|
|
70
|
+
if (isVisible(this.$el)) {
|
|
71
|
+
this.preloadSlides();
|
|
72
|
+
}
|
|
73
|
+
|
|
47
74
|
return {height: height - boxModelAdjust(this.list, 'height', 'content-box')};
|
|
48
75
|
},
|
|
49
76
|
|
|
@@ -56,3 +83,7 @@ export default {
|
|
|
56
83
|
}
|
|
57
84
|
|
|
58
85
|
};
|
|
86
|
+
|
|
87
|
+
function removeLazyLoad(el) {
|
|
88
|
+
el && $$('img[loading="lazy"]', el).forEach(el => el.loading = '');
|
|
89
|
+
}
|
package/src/js/core/drop.js
CHANGED
package/src/js/core/img.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {createEvent, css,
|
|
1
|
+
import {append, attr, children, createEvent, css, data, escape, fragment, hasAttr, includes, isArray, isEmpty, parent, parseOptions, queryAll, startsWith, toFloat, toPx, trigger} from 'uikit-util';
|
|
2
|
+
|
|
3
|
+
const nativeLazyLoad = 'loading' in HTMLImageElement.prototype;
|
|
4
|
+
const nativeIsIntersecting = 'isIntersecting' in IntersectionObserverEntry.prototype; // Old chromium based browsers (UC Browser) did not implement `isIntersecting`
|
|
2
5
|
|
|
3
6
|
export default {
|
|
4
7
|
|
|
@@ -6,48 +9,24 @@ export default {
|
|
|
6
9
|
|
|
7
10
|
props: {
|
|
8
11
|
dataSrc: String,
|
|
9
|
-
|
|
10
|
-
sizes: String,
|
|
11
|
-
width: Number,
|
|
12
|
-
height: Number,
|
|
12
|
+
sources: String,
|
|
13
13
|
offsetTop: String,
|
|
14
14
|
offsetLeft: String,
|
|
15
|
-
target: String
|
|
15
|
+
target: String,
|
|
16
|
+
loading: String
|
|
16
17
|
},
|
|
17
18
|
|
|
18
19
|
data: {
|
|
19
20
|
dataSrc: '',
|
|
20
|
-
|
|
21
|
-
sizes: false,
|
|
22
|
-
width: false,
|
|
23
|
-
height: false,
|
|
21
|
+
sources: [],
|
|
24
22
|
offsetTop: '50vh',
|
|
25
23
|
offsetLeft: '50vw',
|
|
26
|
-
target: false
|
|
24
|
+
target: false,
|
|
25
|
+
loading: 'lazy'
|
|
27
26
|
},
|
|
28
27
|
|
|
29
28
|
computed: {
|
|
30
29
|
|
|
31
|
-
cacheKey({dataSrc}) {
|
|
32
|
-
return `${this.$name}.${dataSrc}`;
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
width({width, dataWidth}) {
|
|
36
|
-
return width || dataWidth;
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
height({height, dataHeight}) {
|
|
40
|
-
return height || dataHeight;
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
sizes({sizes, dataSizes}) {
|
|
44
|
-
return sizes || dataSizes;
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
isImg(_, $el) {
|
|
48
|
-
return isImg($el);
|
|
49
|
-
},
|
|
50
|
-
|
|
51
30
|
target: {
|
|
52
31
|
|
|
53
32
|
get({target}) {
|
|
@@ -58,71 +37,60 @@ export default {
|
|
|
58
37
|
this.observe();
|
|
59
38
|
}
|
|
60
39
|
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
offsetTop({offsetTop}) {
|
|
64
|
-
return toPx(offsetTop, 'height');
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
offsetLeft({offsetLeft}) {
|
|
68
|
-
return toPx(offsetLeft, 'width');
|
|
69
40
|
}
|
|
70
41
|
|
|
71
42
|
},
|
|
72
43
|
|
|
73
44
|
connected() {
|
|
74
45
|
|
|
75
|
-
if (!window.IntersectionObserver) {
|
|
76
|
-
|
|
46
|
+
if (this.loading !== 'lazy' || !window.IntersectionObserver || !nativeIsIntersecting) {
|
|
47
|
+
this.load();
|
|
77
48
|
return;
|
|
78
49
|
}
|
|
79
50
|
|
|
80
|
-
if (
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
setSrcAttrs(this.$el, getPlaceholderImage(this.width, this.height, this.sizes));
|
|
84
|
-
}
|
|
51
|
+
if (nativeLazyLoad && isImg(this.$el)) {
|
|
52
|
+
this.$el.loading = 'lazy';
|
|
53
|
+
setSrcAttrs(this.$el);
|
|
85
54
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
55
|
+
if (this.target.length === 1) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
89
59
|
|
|
90
|
-
|
|
60
|
+
ensureSrcAttribute(this.$el);
|
|
91
61
|
|
|
62
|
+
const rootMargin = `${toPx(this.offsetTop, 'height')}px ${toPx(this.offsetLeft, 'width')}px`;
|
|
63
|
+
this.observer = new IntersectionObserver(entries => {
|
|
64
|
+
if (entries.some(entry => entry.isIntersecting)) {
|
|
65
|
+
this.load();
|
|
66
|
+
this.observer.disconnect();
|
|
67
|
+
}
|
|
68
|
+
}, {rootMargin});
|
|
69
|
+
this.observe();
|
|
92
70
|
},
|
|
93
71
|
|
|
94
72
|
disconnected() {
|
|
73
|
+
|
|
74
|
+
if (this._data.image) {
|
|
75
|
+
this._data.image.onload = '';
|
|
76
|
+
}
|
|
77
|
+
|
|
95
78
|
this.observer && this.observer.disconnect();
|
|
96
79
|
},
|
|
97
80
|
|
|
98
81
|
update: {
|
|
99
82
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
if (!this.observer) {
|
|
83
|
+
write(store) {
|
|
84
|
+
if (!this.observer || isImg(this.$el)) {
|
|
103
85
|
return false;
|
|
104
86
|
}
|
|
105
|
-
|
|
106
|
-
if (
|
|
107
|
-
this.load(this.observer.takeRecords());
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
if (this.isImg) {
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
image && image.then(img => img && img.currentSrc !== '' && setSrcAttrs(this.$el, currentSrc(img)));
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
write(data) {
|
|
119
|
-
|
|
120
|
-
if (this.dataSrcset && window.devicePixelRatio !== 1) {
|
|
87
|
+
const srcset = data(this.$el, 'data-srcset');
|
|
88
|
+
if (srcset && window.devicePixelRatio !== 1) {
|
|
121
89
|
|
|
122
90
|
const bgSize = css(this.$el, 'backgroundSize');
|
|
123
|
-
if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) ===
|
|
124
|
-
|
|
125
|
-
css(this.$el, 'backgroundSize', `${
|
|
91
|
+
if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) === store.bgSize) {
|
|
92
|
+
store.bgSize = getSourceSize(srcset, data(this.$el, 'sizes'));
|
|
93
|
+
css(this.$el, 'backgroundSize', `${store.bgSize}px`);
|
|
126
94
|
}
|
|
127
95
|
|
|
128
96
|
}
|
|
@@ -135,22 +103,22 @@ export default {
|
|
|
135
103
|
|
|
136
104
|
methods: {
|
|
137
105
|
|
|
138
|
-
load(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
if (!entries.some(entry => isUndefined(entry.isIntersecting) || entry.isIntersecting)) {
|
|
142
|
-
return;
|
|
106
|
+
load() {
|
|
107
|
+
if (this._data.image) {
|
|
108
|
+
return this._data.image;
|
|
143
109
|
}
|
|
144
110
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
111
|
+
const image = isImg(this.$el)
|
|
112
|
+
? this.$el
|
|
113
|
+
: getImageFromElement(
|
|
114
|
+
this.$el,
|
|
115
|
+
this.dataSrc,
|
|
116
|
+
this.sources
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
image.loading = '';
|
|
120
|
+
setSrcAttrs(this.$el, image.currentSrc);
|
|
121
|
+
return this.image = image;
|
|
154
122
|
},
|
|
155
123
|
|
|
156
124
|
observe() {
|
|
@@ -163,13 +131,14 @@ export default {
|
|
|
163
131
|
|
|
164
132
|
};
|
|
165
133
|
|
|
166
|
-
function setSrcAttrs(el, src
|
|
134
|
+
function setSrcAttrs(el, src) {
|
|
167
135
|
|
|
168
136
|
if (isImg(el)) {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
137
|
+
|
|
138
|
+
const parentNode = parent(el);
|
|
139
|
+
const elements = isPicture(parentNode) ? children(parentNode) : [el];
|
|
140
|
+
elements.forEach(el => setSourceProps(el, el));
|
|
141
|
+
|
|
173
142
|
} else if (src) {
|
|
174
143
|
|
|
175
144
|
const change = !includes(el.style.backgroundImage, src);
|
|
@@ -182,13 +151,66 @@ function setSrcAttrs(el, src, srcset, sizes) {
|
|
|
182
151
|
|
|
183
152
|
}
|
|
184
153
|
|
|
185
|
-
|
|
154
|
+
const srcProps = ['data-src', 'data-srcset', 'sizes'];
|
|
155
|
+
function setSourceProps(sourceEl, targetEl) {
|
|
156
|
+
srcProps.forEach(prop => {
|
|
157
|
+
const value = data(sourceEl, prop);
|
|
158
|
+
if (value) {
|
|
159
|
+
attr(targetEl, prop.replace(/^(data-)+/, ''), value);
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function getImageFromElement(el, src, sources) {
|
|
165
|
+
|
|
166
|
+
if (!src) {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const img = new Image();
|
|
171
|
+
|
|
172
|
+
wrapInPicture(img, sources);
|
|
173
|
+
setSourceProps(el, img);
|
|
174
|
+
img.onload = () => setSrcAttrs(el, img.currentSrc);
|
|
175
|
+
attr(img, 'src', src);
|
|
176
|
+
return img;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function wrapInPicture(img, sources) {
|
|
180
|
+
|
|
181
|
+
sources = parseSources(sources);
|
|
182
|
+
|
|
183
|
+
if (sources.length) {
|
|
184
|
+
const picture = fragment('<picture>');
|
|
185
|
+
sources.forEach(attrs => {
|
|
186
|
+
const source = fragment('<source>');
|
|
187
|
+
attr(source, attrs);
|
|
188
|
+
append(picture, source);
|
|
189
|
+
});
|
|
190
|
+
append(picture, img);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function parseSources(sources) {
|
|
195
|
+
if (!sources) {
|
|
196
|
+
return [];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (startsWith(sources, '[')) {
|
|
200
|
+
try {
|
|
201
|
+
sources = JSON.parse(sources);
|
|
202
|
+
} catch (e) {
|
|
203
|
+
sources = [];
|
|
204
|
+
}
|
|
205
|
+
} else {
|
|
206
|
+
sources = parseOptions(sources);
|
|
207
|
+
}
|
|
186
208
|
|
|
187
|
-
if (
|
|
188
|
-
|
|
209
|
+
if (!isArray(sources)) {
|
|
210
|
+
sources = [sources];
|
|
189
211
|
}
|
|
190
212
|
|
|
191
|
-
return
|
|
213
|
+
return sources.filter(source => !isEmpty(source));
|
|
192
214
|
}
|
|
193
215
|
|
|
194
216
|
const sizesRe = /\s*(.*?)\s*(\w+|calc\(.*?\))\s*(?:,|$)/g;
|
|
@@ -228,22 +250,20 @@ function getSourceSize(srcset, sizes) {
|
|
|
228
250
|
return descriptors.filter(size => size >= srcSize)[0] || descriptors.pop() || '';
|
|
229
251
|
}
|
|
230
252
|
|
|
231
|
-
function
|
|
232
|
-
|
|
253
|
+
function ensureSrcAttribute(el) {
|
|
254
|
+
if (isImg(el) && !hasAttr(el, 'src')) {
|
|
255
|
+
attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
|
|
256
|
+
}
|
|
233
257
|
}
|
|
234
258
|
|
|
235
|
-
function
|
|
236
|
-
return el
|
|
259
|
+
function isPicture(el) {
|
|
260
|
+
return isA(el, 'PICTURE');
|
|
237
261
|
}
|
|
238
262
|
|
|
239
|
-
|
|
240
|
-
|
|
263
|
+
function isImg(el) {
|
|
264
|
+
return isA(el, 'IMG');
|
|
265
|
+
}
|
|
241
266
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
storage = window.sessionStorage || {};
|
|
245
|
-
storage[key] = 1;
|
|
246
|
-
delete storage[key];
|
|
247
|
-
} catch (e) {
|
|
248
|
-
storage = {};
|
|
267
|
+
function isA(el, tagName) {
|
|
268
|
+
return el && el.tagName === tagName;
|
|
249
269
|
}
|
package/src/js/core/navbar.js
CHANGED
|
@@ -137,7 +137,7 @@ export default {
|
|
|
137
137
|
|
|
138
138
|
handler({current}) {
|
|
139
139
|
const active = this.getActive();
|
|
140
|
-
if (active && includes(active.mode, 'hover') && active.target && !within(active.target, current) && !active.
|
|
140
|
+
if (active && includes(active.mode, 'hover') && active.target && !within(active.target, current) && !active.isDelaying) {
|
|
141
141
|
active.hide(false);
|
|
142
142
|
}
|
|
143
143
|
}
|
package/src/js/util/options.js
CHANGED
|
@@ -134,9 +134,8 @@ export function parseOptions(options, args = []) {
|
|
|
134
134
|
|
|
135
135
|
try {
|
|
136
136
|
|
|
137
|
-
return
|
|
138
|
-
? {
|
|
139
|
-
: startsWith(options, '{')
|
|
137
|
+
return options
|
|
138
|
+
? startsWith(options, '{')
|
|
140
139
|
? JSON.parse(options)
|
|
141
140
|
: args.length && !includes(options, ':')
|
|
142
141
|
? ({[args[0]]: options})
|
|
@@ -146,7 +145,8 @@ export function parseOptions(options, args = []) {
|
|
|
146
145
|
options[key.trim()] = value.trim();
|
|
147
146
|
}
|
|
148
147
|
return options;
|
|
149
|
-
}, {})
|
|
148
|
+
}, {})
|
|
149
|
+
: {};
|
|
150
150
|
|
|
151
151
|
} catch (e) {
|
|
152
152
|
return {};
|
|
@@ -13,15 +13,6 @@
|
|
|
13
13
|
.uk-flex { display: flex; }
|
|
14
14
|
.uk-flex-inline { display: inline-flex; }
|
|
15
15
|
|
|
16
|
-
/*
|
|
17
|
-
* Remove pseudo elements created by micro clearfix as precaution
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
.uk-flex::before,
|
|
21
|
-
.uk-flex::after,
|
|
22
|
-
.uk-flex-inline::before,
|
|
23
|
-
.uk-flex-inline::after { display: none; }
|
|
24
|
-
|
|
25
16
|
|
|
26
17
|
/* Alignment
|
|
27
18
|
========================================================================== */
|
|
@@ -109,13 +109,6 @@
|
|
|
109
109
|
.uk-navbar-container:not(.uk-navbar-transparent):extend(.uk-light all) when (@navbar-color-mode = light) {}
|
|
110
110
|
.uk-navbar-container:not(.uk-navbar-transparent):extend(.uk-dark all) when (@navbar-color-mode = dark) {}
|
|
111
111
|
|
|
112
|
-
/*
|
|
113
|
-
* Remove pseudo elements created by micro clearfix as precaution (if Container component is used)
|
|
114
|
-
*/
|
|
115
|
-
|
|
116
|
-
.uk-navbar-container > ::before,
|
|
117
|
-
.uk-navbar-container > ::after { display: none !important; }
|
|
118
|
-
|
|
119
112
|
|
|
120
113
|
/* Groups
|
|
121
114
|
========================================================================== */
|
|
@@ -251,6 +251,28 @@
|
|
|
251
251
|
[data-uk-responsive] { max-width: 100%; }
|
|
252
252
|
|
|
253
253
|
|
|
254
|
+
/* Object
|
|
255
|
+
========================================================================== */
|
|
256
|
+
|
|
257
|
+
.uk-object-fit-none { object-fit: none; }
|
|
258
|
+
.uk-object-fit-cover { object-fit: cover; }
|
|
259
|
+
.uk-object-fit-contain { object-fit: contain; }
|
|
260
|
+
|
|
261
|
+
/*
|
|
262
|
+
* Position
|
|
263
|
+
*/
|
|
264
|
+
|
|
265
|
+
.uk-object-top-left { object-position: 0 0; }
|
|
266
|
+
.uk-object-top-center { object-position: 50% 0; }
|
|
267
|
+
.uk-object-top-right { object-position: 100% 0; }
|
|
268
|
+
.uk-object-center-left { object-position: 0 50%; }
|
|
269
|
+
.uk-object-center-center { object-position: 50% 50%; }
|
|
270
|
+
.uk-object-center-right { object-position: 100% 50%; }
|
|
271
|
+
.uk-object-bottom-left { object-position: 0 100%; }
|
|
272
|
+
.uk-object-bottom-center { object-position: 50% 100%; }
|
|
273
|
+
.uk-object-bottom-right { object-position: 100% 100%; }
|
|
274
|
+
|
|
275
|
+
|
|
254
276
|
/* Border
|
|
255
277
|
========================================================================== */
|
|
256
278
|
|
|
@@ -13,15 +13,6 @@
|
|
|
13
13
|
.uk-flex { display: flex; }
|
|
14
14
|
.uk-flex-inline { display: inline-flex; }
|
|
15
15
|
|
|
16
|
-
/*
|
|
17
|
-
* Remove pseudo elements created by micro clearfix as precaution
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
.uk-flex::before,
|
|
21
|
-
.uk-flex::after,
|
|
22
|
-
.uk-flex-inline::before,
|
|
23
|
-
.uk-flex-inline::after { display: none; }
|
|
24
|
-
|
|
25
16
|
|
|
26
17
|
/* Alignment
|
|
27
18
|
========================================================================== */
|
|
@@ -780,7 +780,7 @@ select.uk-form-width-xsmall { width: ($form-width-xsmall + 25px); }
|
|
|
780
780
|
|
|
781
781
|
$inverse-form-background: $inverse-global-muted-background !default;
|
|
782
782
|
$inverse-form-color: $inverse-global-color !default;
|
|
783
|
-
$inverse-form-focus-background:
|
|
783
|
+
$inverse-form-focus-background: fade-in($inverse-form-background, 0.05) !default;
|
|
784
784
|
$inverse-form-focus-color: $inverse-global-color !default;
|
|
785
785
|
$inverse-form-placeholder-color: $inverse-global-muted-color !default;
|
|
786
786
|
|
|
@@ -790,12 +790,12 @@ $inverse-form-datalist-icon-color: $inverse-global-color !default;
|
|
|
790
790
|
|
|
791
791
|
$inverse-form-radio-background: $inverse-global-muted-background !default;
|
|
792
792
|
|
|
793
|
-
$inverse-form-radio-focus-background:
|
|
793
|
+
$inverse-form-radio-focus-background: fade-in($inverse-form-radio-background, 0.05) !default;
|
|
794
794
|
|
|
795
795
|
$inverse-form-radio-checked-background: $inverse-global-primary-background !default;
|
|
796
796
|
$inverse-form-radio-checked-icon-color: $inverse-global-inverse-color !default;
|
|
797
797
|
|
|
798
|
-
$inverse-form-radio-checked-focus-background:
|
|
798
|
+
$inverse-form-radio-checked-focus-background: fade-in($inverse-global-primary-background, 0.1) !default;
|
|
799
799
|
|
|
800
800
|
$inverse-form-icon-color: $inverse-global-muted-color !default;
|
|
801
801
|
$inverse-form-icon-hover-color: $inverse-global-color !default;
|
|
@@ -201,9 +201,9 @@ $inverse-icon-link-hover-color: $inverse-global-color !default;
|
|
|
201
201
|
$inverse-icon-link-active-color: $inverse-global-color !default;
|
|
202
202
|
$inverse-icon-button-background: $inverse-global-muted-background !default;
|
|
203
203
|
$inverse-icon-button-color: $inverse-global-muted-color !default;
|
|
204
|
-
$inverse-icon-button-hover-background:
|
|
204
|
+
$inverse-icon-button-hover-background: fade-in($inverse-icon-button-background, 0.05) !default;
|
|
205
205
|
$inverse-icon-button-hover-color: $inverse-global-color !default;
|
|
206
|
-
$inverse-icon-button-active-background:
|
|
206
|
+
$inverse-icon-button-active-background: fade-in($inverse-icon-button-background, 0.1) !default;
|
|
207
207
|
$inverse-icon-button-active-color: $inverse-global-color !default;
|
|
208
208
|
|
|
209
209
|
|
|
@@ -109,13 +109,6 @@ $navbar-dropbar-z-index: $global-z-index - 20 !default;
|
|
|
109
109
|
@if ( $navbar-color-mode == light ) { .uk-navbar-container:not(.uk-navbar-transparent) { @extend .uk-light !optional;} }
|
|
110
110
|
@if ( $navbar-color-mode == dark ) { .uk-navbar-container:not(.uk-navbar-transparent) { @extend .uk-dark !optional;} }
|
|
111
111
|
|
|
112
|
-
/*
|
|
113
|
-
* Remove pseudo elements created by micro clearfix as precaution (if Container component is used)
|
|
114
|
-
*/
|
|
115
|
-
|
|
116
|
-
.uk-navbar-container > ::before,
|
|
117
|
-
.uk-navbar-container > ::after { display: none !important; }
|
|
118
|
-
|
|
119
112
|
|
|
120
113
|
/* Groups
|
|
121
114
|
========================================================================== */
|
|
@@ -317,7 +317,7 @@ $inverse-search-placeholder-color: $inverse-global-muted-color !def
|
|
|
317
317
|
$inverse-search-icon-color: $inverse-global-muted-color !default;
|
|
318
318
|
|
|
319
319
|
$inverse-search-default-background: $inverse-global-muted-background !default;
|
|
320
|
-
$inverse-search-default-focus-background:
|
|
320
|
+
$inverse-search-default-focus-background: fade-in($inverse-search-default-background, 0.05) !default;
|
|
321
321
|
|
|
322
322
|
$inverse-search-navbar-background: transparent !default;
|
|
323
323
|
|