uikit 3.11.1 → 3.11.2-dev.03e47c2ff
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/.eslintrc.json +4 -49
- package/.prettierignore +14 -0
- package/.prettierrc.json +13 -0
- package/.webstorm.js +3 -3
- package/CHANGELOG.md +59 -17
- package/build/.eslintrc.json +1 -3
- package/build/build.js +26 -28
- package/build/icons.js +7 -11
- package/build/less.js +48 -36
- package/build/package.json +2 -2
- package/build/prefix.js +21 -18
- package/build/publishDev.js +6 -8
- package/build/release.js +20 -17
- package/build/scope.js +21 -11
- package/build/scss.js +72 -39
- package/build/util.js +71 -62
- package/build/wrapper/icons.js +0 -2
- package/dist/css/uikit-core-rtl.css +127 -201
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +127 -201
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +129 -207
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +129 -207
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +88 -133
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +408 -439
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +1098 -1316
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1144 -1393
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +94 -114
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +345 -362
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +343 -350
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +768 -843
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +343 -350
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +645 -793
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +587 -621
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +324 -356
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +155 -167
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +5430 -6690
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +7 -9
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +8143 -9784
- package/dist/js/uikit.min.js +1 -1
- package/jsconfig.json +1 -1
- package/package.json +64 -60
- package/src/js/api/boot.js +25 -32
- package/src/js/api/component.js +15 -28
- package/src/js/api/global.js +6 -12
- package/src/js/api/hooks.js +14 -33
- package/src/js/api/instance.js +7 -15
- package/src/js/api/state.js +79 -100
- package/src/js/components/countdown.js +24 -50
- package/src/js/components/filter.js +70 -66
- package/src/js/components/index.js +13 -13
- package/src/js/components/internal/lightbox-animations.js +14 -25
- package/src/js/components/internal/slider-preload.js +37 -0
- package/src/js/components/internal/slider-transitioner.js +66 -45
- package/src/js/components/internal/slideshow-animations.js +46 -64
- package/src/js/components/lightbox-panel.js +107 -105
- package/src/js/components/lightbox.js +17 -39
- package/src/js/components/notification.js +49 -43
- package/src/js/components/parallax.js +21 -46
- package/src/js/components/slider-parallax.js +13 -23
- package/src/js/components/slider.js +95 -64
- package/src/js/components/slideshow-parallax.js +1 -1
- package/src/js/components/slideshow.js +15 -13
- package/src/js/components/sortable.js +126 -108
- package/src/js/components/tooltip.js +41 -31
- package/src/js/components/upload.js +52 -63
- package/src/js/core/accordion.js +53 -48
- package/src/js/core/alert.js +9 -17
- package/src/js/core/core.js +74 -53
- package/src/js/core/cover.js +11 -15
- package/src/js/core/drop.js +107 -93
- package/src/js/core/form-custom.js +20 -25
- package/src/js/core/gif.js +3 -7
- package/src/js/core/grid.js +57 -58
- package/src/js/core/height-match.js +16 -29
- package/src/js/core/height-viewport.js +29 -36
- package/src/js/core/icon.js +47 -52
- package/src/js/core/img.js +156 -138
- package/src/js/core/index.js +39 -39
- package/src/js/core/leader.js +9 -18
- package/src/js/core/margin.js +21 -37
- package/src/js/core/modal.js +49 -36
- package/src/js/core/nav.js +2 -4
- package/src/js/core/navbar.js +113 -85
- package/src/js/core/offcanvas.js +49 -53
- package/src/js/core/overflow-auto.js +13 -17
- package/src/js/core/responsive.js +14 -12
- package/src/js/core/scroll.js +10 -20
- package/src/js/core/scrollspy-nav.js +34 -31
- package/src/js/core/scrollspy.js +37 -54
- package/src/js/core/sticky.js +194 -123
- package/src/js/core/svg.js +68 -83
- package/src/js/core/switcher.js +47 -46
- package/src/js/core/tab.js +7 -10
- package/src/js/core/toggle.js +66 -67
- package/src/js/core/video.js +11 -22
- package/src/js/mixin/animate.js +19 -20
- package/src/js/mixin/class.js +2 -4
- package/src/js/mixin/container.js +7 -11
- package/src/js/mixin/internal/animate-fade.js +73 -30
- package/src/js/mixin/internal/animate-slide.js +58 -41
- package/src/js/mixin/internal/slideshow-animations.js +7 -14
- package/src/js/mixin/internal/slideshow-transitioner.js +10 -17
- package/src/js/mixin/media.js +5 -10
- package/src/js/mixin/modal.js +89 -66
- package/src/js/mixin/parallax.js +175 -121
- package/src/js/mixin/position.js +26 -20
- package/src/js/mixin/slider-autoplay.js +12 -21
- package/src/js/mixin/slider-drag.js +64 -65
- package/src/js/mixin/slider-nav.js +26 -35
- package/src/js/mixin/slider-reactive.js +2 -8
- package/src/js/mixin/slider.js +48 -55
- package/src/js/mixin/slideshow.js +13 -19
- package/src/js/mixin/togglable.js +89 -63
- package/src/js/uikit-core.js +2 -4
- package/src/js/uikit.js +2 -4
- package/src/js/util/ajax.js +25 -40
- package/src/js/util/animation.js +77 -75
- package/src/js/util/attr.js +17 -21
- package/src/js/util/class.js +14 -52
- package/src/js/util/dimensions.js +78 -49
- package/src/js/util/dom.js +39 -66
- package/src/js/util/env.js +7 -12
- package/src/js/util/event.js +60 -59
- package/src/js/util/fastdom.js +3 -8
- package/src/js/util/filter.js +17 -34
- package/src/js/util/index.js +0 -1
- package/src/js/util/lang.js +82 -121
- package/src/js/util/mouse.js +19 -17
- package/src/js/util/options.js +35 -49
- package/src/js/util/player.js +41 -36
- package/src/js/util/position.js +54 -46
- package/src/js/util/selector.js +43 -58
- package/src/js/util/style.js +39 -49
- package/src/js/util/viewport.js +81 -66
- package/src/less/components/base.less +10 -33
- package/src/less/components/flex.less +0 -9
- package/src/less/components/form-range.less +48 -95
- package/src/less/components/form.less +0 -1
- package/src/less/components/height.less +3 -0
- package/src/less/components/leader.less +0 -1
- package/src/less/components/lightbox.less +0 -1
- package/src/less/components/modal.less +3 -7
- package/src/less/components/navbar.less +0 -7
- package/src/less/components/progress.less +14 -36
- package/src/less/components/slider.less +0 -3
- package/src/less/components/slideshow.less +0 -3
- package/src/less/components/text.less +16 -32
- package/src/less/components/utility.less +22 -0
- package/src/scss/components/base.scss +10 -33
- package/src/scss/components/flex.scss +0 -9
- package/src/scss/components/form-range.scss +48 -95
- package/src/scss/components/form.scss +3 -4
- package/src/scss/components/height.scss +3 -0
- package/src/scss/components/icon.scss +2 -2
- package/src/scss/components/leader.scss +0 -1
- package/src/scss/components/lightbox.scss +0 -1
- package/src/scss/components/modal.scss +3 -7
- package/src/scss/components/navbar.scss +0 -7
- package/src/scss/components/progress.scss +14 -36
- package/src/scss/components/search.scss +1 -1
- package/src/scss/components/slider.scss +0 -3
- package/src/scss/components/slideshow.scss +0 -3
- package/src/scss/components/text.scss +16 -32
- package/src/scss/components/utility.scss +22 -0
- package/src/scss/mixins-theme.scss +1 -1
- package/src/scss/mixins.scss +1 -1
- package/src/scss/variables-theme.scss +9 -9
- package/src/scss/variables.scss +9 -9
- package/tests/align.html +10 -10
- package/tests/animation.html +2 -2
- package/tests/article.html +2 -2
- package/tests/base.html +3 -3
- package/tests/card.html +10 -10
- package/tests/column.html +3 -3
- package/tests/comment.html +9 -9
- package/tests/dotnav.html +3 -3
- package/tests/image.html +296 -64
- package/tests/images/image-type.avif +0 -0
- package/tests/images/image-type.jpeg +0 -0
- package/tests/images/image-type.webp +0 -0
- package/tests/index.html +8 -8
- package/tests/js/index.js +114 -85
- package/tests/lightbox.html +10 -10
- package/tests/marker.html +2 -2
- package/tests/modal.html +8 -9
- package/tests/navbar.html +2 -2
- package/tests/overlay.html +7 -7
- package/tests/parallax.html +14 -5
- package/tests/position.html +12 -12
- package/tests/slidenav.html +12 -12
- package/tests/slider.html +20 -20
- package/tests/sortable.html +1 -1
- package/tests/sticky-parallax.html +86 -98
- package/tests/sticky.html +56 -24
- package/tests/svg.html +6 -6
- package/tests/table.html +11 -11
- package/tests/thumbnav.html +12 -12
- package/tests/transition.html +30 -30
- package/tests/utility.html +33 -33
- package/tests/video.html +1 -1
- package/tests/width.html +1 -1
- package/src/js/mixin/flex-bug.js +0 -56
- package/src/js/util/promise.js +0 -191
- package/tests/images/animated.gif +0 -0
package/src/js/util/promise.js
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
/* global setImmediate */
|
|
2
|
-
import {inBrowser} from './env';
|
|
3
|
-
import {isFunction, isObject} from './lang';
|
|
4
|
-
|
|
5
|
-
export const Promise = inBrowser && window.Promise || PromiseFn;
|
|
6
|
-
|
|
7
|
-
export class Deferred {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.promise = new Promise((resolve, reject) => {
|
|
10
|
-
this.reject = reject;
|
|
11
|
-
this.resolve = resolve;
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis)
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
const RESOLVED = 0;
|
|
21
|
-
const REJECTED = 1;
|
|
22
|
-
const PENDING = 2;
|
|
23
|
-
|
|
24
|
-
const async = inBrowser && window.setImmediate || setTimeout;
|
|
25
|
-
|
|
26
|
-
function PromiseFn(executor) {
|
|
27
|
-
|
|
28
|
-
this.state = PENDING;
|
|
29
|
-
this.value = undefined;
|
|
30
|
-
this.deferred = [];
|
|
31
|
-
|
|
32
|
-
const promise = this;
|
|
33
|
-
|
|
34
|
-
try {
|
|
35
|
-
executor(
|
|
36
|
-
x => {
|
|
37
|
-
promise.resolve(x);
|
|
38
|
-
},
|
|
39
|
-
r => {
|
|
40
|
-
promise.reject(r);
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
} catch (e) {
|
|
44
|
-
promise.reject(e);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
PromiseFn.reject = function (r) {
|
|
49
|
-
return new PromiseFn((resolve, reject) => {
|
|
50
|
-
reject(r);
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
PromiseFn.resolve = function (x) {
|
|
55
|
-
return new PromiseFn((resolve, reject) => {
|
|
56
|
-
resolve(x);
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
PromiseFn.all = function all(iterable) {
|
|
61
|
-
return new PromiseFn((resolve, reject) => {
|
|
62
|
-
const result = [];
|
|
63
|
-
let count = 0;
|
|
64
|
-
|
|
65
|
-
if (iterable.length === 0) {
|
|
66
|
-
resolve(result);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function resolver(i) {
|
|
70
|
-
return function (x) {
|
|
71
|
-
result[i] = x;
|
|
72
|
-
count += 1;
|
|
73
|
-
|
|
74
|
-
if (count === iterable.length) {
|
|
75
|
-
resolve(result);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
for (let i = 0; i < iterable.length; i += 1) {
|
|
81
|
-
PromiseFn.resolve(iterable[i]).then(resolver(i), reject);
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
PromiseFn.race = function race(iterable) {
|
|
87
|
-
return new PromiseFn((resolve, reject) => {
|
|
88
|
-
for (let i = 0; i < iterable.length; i += 1) {
|
|
89
|
-
PromiseFn.resolve(iterable[i]).then(resolve, reject);
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
const p = PromiseFn.prototype;
|
|
95
|
-
|
|
96
|
-
p.resolve = function resolve(x) {
|
|
97
|
-
const promise = this;
|
|
98
|
-
|
|
99
|
-
if (promise.state === PENDING) {
|
|
100
|
-
if (x === promise) {
|
|
101
|
-
throw new TypeError('Promise settled with itself.');
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
let called = false;
|
|
105
|
-
|
|
106
|
-
try {
|
|
107
|
-
const then = x && x.then;
|
|
108
|
-
|
|
109
|
-
if (x !== null && isObject(x) && isFunction(then)) {
|
|
110
|
-
then.call(
|
|
111
|
-
x,
|
|
112
|
-
x => {
|
|
113
|
-
if (!called) {
|
|
114
|
-
promise.resolve(x);
|
|
115
|
-
}
|
|
116
|
-
called = true;
|
|
117
|
-
},
|
|
118
|
-
r => {
|
|
119
|
-
if (!called) {
|
|
120
|
-
promise.reject(r);
|
|
121
|
-
}
|
|
122
|
-
called = true;
|
|
123
|
-
}
|
|
124
|
-
);
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
} catch (e) {
|
|
128
|
-
if (!called) {
|
|
129
|
-
promise.reject(e);
|
|
130
|
-
}
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
promise.state = RESOLVED;
|
|
135
|
-
promise.value = x;
|
|
136
|
-
promise.notify();
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
p.reject = function reject(reason) {
|
|
141
|
-
const promise = this;
|
|
142
|
-
|
|
143
|
-
if (promise.state === PENDING) {
|
|
144
|
-
if (reason === promise) {
|
|
145
|
-
throw new TypeError('Promise settled with itself.');
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
promise.state = REJECTED;
|
|
149
|
-
promise.value = reason;
|
|
150
|
-
promise.notify();
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
p.notify = function notify() {
|
|
155
|
-
async(() => {
|
|
156
|
-
if (this.state !== PENDING) {
|
|
157
|
-
while (this.deferred.length) {
|
|
158
|
-
const [onResolved, onRejected, resolve, reject] = this.deferred.shift();
|
|
159
|
-
|
|
160
|
-
try {
|
|
161
|
-
if (this.state === RESOLVED) {
|
|
162
|
-
if (isFunction(onResolved)) {
|
|
163
|
-
resolve(onResolved.call(undefined, this.value));
|
|
164
|
-
} else {
|
|
165
|
-
resolve(this.value);
|
|
166
|
-
}
|
|
167
|
-
} else if (this.state === REJECTED) {
|
|
168
|
-
if (isFunction(onRejected)) {
|
|
169
|
-
resolve(onRejected.call(undefined, this.value));
|
|
170
|
-
} else {
|
|
171
|
-
reject(this.value);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
} catch (e) {
|
|
175
|
-
reject(e);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
p.then = function then(onResolved, onRejected) {
|
|
183
|
-
return new PromiseFn((resolve, reject) => {
|
|
184
|
-
this.deferred.push([onResolved, onRejected, resolve, reject]);
|
|
185
|
-
this.notify();
|
|
186
|
-
});
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
p.catch = function (onRejected) {
|
|
190
|
-
return this.then(undefined, onRejected);
|
|
191
|
-
};
|
|
Binary file
|