uikit 3.15.24 → 3.15.25-dev.ef4c64c1a
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 +6 -6
- 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 +59 -76
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +59 -76
- 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 +4 -5
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +2 -7
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +2 -2
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +115 -108
- 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 +133 -143
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/countdown.js +5 -5
- package/src/js/components/lightbox-panel.js +6 -18
- package/src/js/components/sortable.js +3 -4
- package/src/js/components/tooltip.js +3 -8
- package/src/js/components/upload.js +1 -1
- package/src/js/core/drop.js +62 -50
- package/src/js/mixin/modal.js +52 -58
- package/src/js/mixin/slider-autoplay.js +1 -1
- package/src/js/util/mouse.js +1 -1
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.25-dev.ef4c64c1a | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -1397,7 +1397,7 @@
|
|
|
1397
1397
|
|
|
1398
1398
|
cancel() {var _this$unbind;
|
|
1399
1399
|
(_this$unbind = this.unbind) == null ? void 0 : _this$unbind.call(this);
|
|
1400
|
-
|
|
1400
|
+
clearInterval(this.interval);
|
|
1401
1401
|
},
|
|
1402
1402
|
|
|
1403
1403
|
movesTo(target) {
|
|
@@ -2977,7 +2977,7 @@
|
|
|
2977
2977
|
UIkit.data = '__uikit__';
|
|
2978
2978
|
UIkit.prefix = 'uk-';
|
|
2979
2979
|
UIkit.options = {};
|
|
2980
|
-
UIkit.version = '3.15.
|
|
2980
|
+
UIkit.version = '3.15.25-dev.ef4c64c1a';
|
|
2981
2981
|
|
|
2982
2982
|
globalAPI(UIkit);
|
|
2983
2983
|
hooksAPI(UIkit);
|
|
@@ -3899,70 +3899,25 @@
|
|
|
3899
3899
|
self: true,
|
|
3900
3900
|
|
|
3901
3901
|
handler() {
|
|
3902
|
-
once(
|
|
3903
|
-
this.$el,
|
|
3904
|
-
'hide',
|
|
3905
|
-
on(document, 'focusin', (e) => {
|
|
3906
|
-
if (last(active$1) === this && !within(e.target, this.$el)) {
|
|
3907
|
-
this.$el.focus();
|
|
3908
|
-
}
|
|
3909
|
-
}));
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
if (this.overlay) {
|
|
3913
|
-
once(this.$el, 'hidden', preventBackgroundScroll(this.$el), { self: true });
|
|
3914
|
-
}
|
|
3915
|
-
|
|
3916
3902
|
if (this.stack) {
|
|
3917
3903
|
css(this.$el, 'zIndex', toFloat(css(this.$el, 'zIndex')) + active$1.length);
|
|
3918
3904
|
}
|
|
3919
3905
|
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
'hide',
|
|
3926
|
-
on(document, pointerDown$1, ({ target }) => {
|
|
3927
|
-
if (
|
|
3928
|
-
last(active$1) !== this ||
|
|
3929
|
-
this.overlay && !within(target, this.$el) ||
|
|
3930
|
-
within(target, this.panel))
|
|
3931
|
-
{
|
|
3932
|
-
return;
|
|
3933
|
-
}
|
|
3934
|
-
|
|
3935
|
-
once(
|
|
3936
|
-
document,
|
|
3937
|
-
`${pointerUp$1} ${pointerCancel} scroll`,
|
|
3938
|
-
({ defaultPrevented, type, target: newTarget }) => {
|
|
3939
|
-
if (
|
|
3940
|
-
!defaultPrevented &&
|
|
3941
|
-
type === pointerUp$1 &&
|
|
3942
|
-
target === newTarget)
|
|
3943
|
-
{
|
|
3944
|
-
this.hide();
|
|
3945
|
-
}
|
|
3946
|
-
},
|
|
3947
|
-
true);
|
|
3906
|
+
const handlers = [
|
|
3907
|
+
this.overlay && preventBackgroundFocus(this),
|
|
3908
|
+
this.overlay && preventBackgroundScroll(this.$el),
|
|
3909
|
+
this.bgClose && listenForBackgroundClose(this),
|
|
3910
|
+
this.escClose && listenForEscClose$1(this)];
|
|
3948
3911
|
|
|
3949
|
-
}),
|
|
3950
|
-
{ self: true });
|
|
3951
3912
|
|
|
3952
|
-
|
|
3913
|
+
once(
|
|
3914
|
+
this.$el,
|
|
3915
|
+
'hidden',
|
|
3916
|
+
() => handlers.forEach((handler) => handler && handler()),
|
|
3917
|
+
{ self: true });
|
|
3953
3918
|
|
|
3954
|
-
if (this.escClose) {
|
|
3955
|
-
once(
|
|
3956
|
-
this.$el,
|
|
3957
|
-
'hide',
|
|
3958
|
-
on(document, 'keydown', (e) => {
|
|
3959
|
-
if (e.keyCode === 27 && last(active$1) === this) {
|
|
3960
|
-
this.hide();
|
|
3961
|
-
}
|
|
3962
|
-
}),
|
|
3963
|
-
{ self: true });
|
|
3964
3919
|
|
|
3965
|
-
|
|
3920
|
+
addClass(document.documentElement, this.clsPage);
|
|
3966
3921
|
}
|
|
3967
3922
|
},
|
|
3968
3923
|
|
|
@@ -4053,6 +4008,45 @@
|
|
|
4053
4008
|
return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
|
|
4054
4009
|
}
|
|
4055
4010
|
|
|
4011
|
+
function preventBackgroundFocus(modal) {
|
|
4012
|
+
return on(document, 'focusin', (e) => {
|
|
4013
|
+
if (last(active$1) === modal && !within(e.target, modal.$el)) {
|
|
4014
|
+
modal.$el.focus();
|
|
4015
|
+
}
|
|
4016
|
+
});
|
|
4017
|
+
}
|
|
4018
|
+
|
|
4019
|
+
function listenForBackgroundClose(modal) {
|
|
4020
|
+
return on(document, pointerDown$1, ({ target }) => {
|
|
4021
|
+
if (
|
|
4022
|
+
last(active$1) !== modal ||
|
|
4023
|
+
modal.overlay && !within(target, modal.$el) ||
|
|
4024
|
+
within(target, modal.panel))
|
|
4025
|
+
{
|
|
4026
|
+
return;
|
|
4027
|
+
}
|
|
4028
|
+
|
|
4029
|
+
once(
|
|
4030
|
+
document,
|
|
4031
|
+
`${pointerUp$1} ${pointerCancel} scroll`,
|
|
4032
|
+
({ defaultPrevented, type, target: newTarget }) => {
|
|
4033
|
+
if (!defaultPrevented && type === pointerUp$1 && target === newTarget) {
|
|
4034
|
+
modal.hide();
|
|
4035
|
+
}
|
|
4036
|
+
},
|
|
4037
|
+
true);
|
|
4038
|
+
|
|
4039
|
+
});
|
|
4040
|
+
}
|
|
4041
|
+
|
|
4042
|
+
function listenForEscClose$1(modal) {
|
|
4043
|
+
return on(document, 'keydown', (e) => {
|
|
4044
|
+
if (e.keyCode === 27 && last(active$1) === modal) {
|
|
4045
|
+
modal.hide();
|
|
4046
|
+
}
|
|
4047
|
+
});
|
|
4048
|
+
}
|
|
4049
|
+
|
|
4056
4050
|
let prevented;
|
|
4057
4051
|
function preventBackgroundScroll(el) {
|
|
4058
4052
|
// 'overscroll-behavior: contain' only works consistently if el overflows (Safari)
|
|
@@ -4172,12 +4166,7 @@
|
|
|
4172
4166
|
addClass(this.$el, this.clsDrop);
|
|
4173
4167
|
|
|
4174
4168
|
if (this.toggle && !this.targetEl) {
|
|
4175
|
-
this.targetEl =
|
|
4176
|
-
target: this.$el,
|
|
4177
|
-
mode: this.mode
|
|
4178
|
-
}).$el;
|
|
4179
|
-
attr(this.targetEl, 'aria-haspopup', true);
|
|
4180
|
-
this.lazyload(this.targetEl);
|
|
4169
|
+
this.targetEl = createToggleComponent(this);
|
|
4181
4170
|
}
|
|
4182
4171
|
|
|
4183
4172
|
this._style = (({ width, height }) => ({ width, height }))(this.$el.style);
|
|
@@ -4326,50 +4315,11 @@
|
|
|
4326
4315
|
|
|
4327
4316
|
this.tracker.init();
|
|
4328
4317
|
|
|
4329
|
-
const update = () => this.$emit();
|
|
4330
4318
|
const handlers = [
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
once(
|
|
4336
|
-
document,
|
|
4337
|
-
`${pointerUp$1} ${pointerCancel} scroll`,
|
|
4338
|
-
({ defaultPrevented, type, target: newTarget }) => {
|
|
4339
|
-
if (
|
|
4340
|
-
!defaultPrevented &&
|
|
4341
|
-
type === pointerUp$1 &&
|
|
4342
|
-
target === newTarget &&
|
|
4343
|
-
!(this.targetEl && within(target, this.targetEl)))
|
|
4344
|
-
{
|
|
4345
|
-
this.hide(false);
|
|
4346
|
-
}
|
|
4347
|
-
},
|
|
4348
|
-
true)),
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
on(document, 'keydown', (e) => {
|
|
4353
|
-
if (e.keyCode === 27) {
|
|
4354
|
-
this.hide(false);
|
|
4355
|
-
}
|
|
4356
|
-
}),
|
|
4357
|
-
|
|
4358
|
-
on(window, 'resize', update),
|
|
4359
|
-
|
|
4360
|
-
(() => {
|
|
4361
|
-
const observer = observeResize(
|
|
4362
|
-
overflowParents(this.$el).concat(this.target),
|
|
4363
|
-
update);
|
|
4364
|
-
|
|
4365
|
-
return () => observer.disconnect();
|
|
4366
|
-
})(),
|
|
4367
|
-
|
|
4368
|
-
this.autoUpdate &&
|
|
4369
|
-
on([document, ...overflowParents(this.$el)], 'scroll', update, {
|
|
4370
|
-
passive: true
|
|
4371
|
-
}),
|
|
4372
|
-
|
|
4319
|
+
listenForBackgroundClick(this),
|
|
4320
|
+
listenForEscClose(this),
|
|
4321
|
+
listenForResize(this),
|
|
4322
|
+
this.autoUpdate && listenForScroll(this),
|
|
4373
4323
|
!this.bgScroll && preventBackgroundScroll(this.$el)];
|
|
4374
4324
|
|
|
4375
4325
|
|
|
@@ -4558,6 +4508,63 @@
|
|
|
4558
4508
|
return offsetViewport(overflowParents(target).find((parent) => within(el, parent)));
|
|
4559
4509
|
}
|
|
4560
4510
|
|
|
4511
|
+
function createToggleComponent(drop) {
|
|
4512
|
+
const { $el } = drop.$create('toggle', query(drop.toggle, drop.$el), {
|
|
4513
|
+
target: drop.$el,
|
|
4514
|
+
mode: drop.mode
|
|
4515
|
+
});
|
|
4516
|
+
attr($el, 'aria-haspopup', true);
|
|
4517
|
+
drop.lazyload($el);
|
|
4518
|
+
|
|
4519
|
+
return $el;
|
|
4520
|
+
}
|
|
4521
|
+
|
|
4522
|
+
function listenForResize(drop) {
|
|
4523
|
+
const update = () => drop.$emit();
|
|
4524
|
+
const off = on(window, 'resize', update);
|
|
4525
|
+
const observer = observeResize(overflowParents(drop.$el).concat(drop.target), update);
|
|
4526
|
+
return () => {
|
|
4527
|
+
observer.disconnect();
|
|
4528
|
+
off();
|
|
4529
|
+
};
|
|
4530
|
+
}
|
|
4531
|
+
|
|
4532
|
+
function listenForScroll(drop) {
|
|
4533
|
+
return on([document, ...overflowParents(drop.$el)], 'scroll', () => drop.$emit(), {
|
|
4534
|
+
passive: true
|
|
4535
|
+
});
|
|
4536
|
+
}
|
|
4537
|
+
|
|
4538
|
+
function listenForEscClose(drop) {
|
|
4539
|
+
return on(document, 'keydown', (e) => {
|
|
4540
|
+
if (e.keyCode === 27) {
|
|
4541
|
+
drop.hide(false);
|
|
4542
|
+
}
|
|
4543
|
+
});
|
|
4544
|
+
}
|
|
4545
|
+
|
|
4546
|
+
function listenForBackgroundClick(drop) {
|
|
4547
|
+
return on(document, pointerDown$1, ({ target }) => {
|
|
4548
|
+
if (!within(target, drop.$el)) {
|
|
4549
|
+
once(
|
|
4550
|
+
document,
|
|
4551
|
+
`${pointerUp$1} ${pointerCancel} scroll`,
|
|
4552
|
+
({ defaultPrevented, type, target: newTarget }) => {
|
|
4553
|
+
if (
|
|
4554
|
+
!defaultPrevented &&
|
|
4555
|
+
type === pointerUp$1 &&
|
|
4556
|
+
target === newTarget &&
|
|
4557
|
+
!(drop.targetEl && within(target, drop.targetEl)))
|
|
4558
|
+
{
|
|
4559
|
+
drop.hide(false);
|
|
4560
|
+
}
|
|
4561
|
+
},
|
|
4562
|
+
true);
|
|
4563
|
+
|
|
4564
|
+
}
|
|
4565
|
+
});
|
|
4566
|
+
}
|
|
4567
|
+
|
|
4561
4568
|
var formCustom = {
|
|
4562
4569
|
mixins: [Class],
|
|
4563
4570
|
|
|
@@ -7919,14 +7926,14 @@
|
|
|
7919
7926
|
};
|
|
7920
7927
|
|
|
7921
7928
|
function getTimeSpan(date) {
|
|
7922
|
-
const total = date - Date.now();
|
|
7929
|
+
const total = (date - Date.now()) / 1000;
|
|
7923
7930
|
|
|
7924
7931
|
return {
|
|
7925
7932
|
total,
|
|
7926
|
-
seconds: total
|
|
7927
|
-
minutes: total /
|
|
7928
|
-
hours: total /
|
|
7929
|
-
days: total /
|
|
7933
|
+
seconds: total % 60,
|
|
7934
|
+
minutes: total / 60 % 60,
|
|
7935
|
+
hours: total / 60 / 60 % 24,
|
|
7936
|
+
days: total / 60 / 60 / 24
|
|
7930
7937
|
};
|
|
7931
7938
|
}
|
|
7932
7939
|
|
|
@@ -8598,7 +8605,7 @@
|
|
|
8598
8605
|
},
|
|
8599
8606
|
|
|
8600
8607
|
stopAutoplay() {
|
|
8601
|
-
|
|
8608
|
+
clearInterval(this.interval);
|
|
8602
8609
|
}
|
|
8603
8610
|
}
|
|
8604
8611
|
};
|
|
@@ -9316,12 +9323,9 @@
|
|
|
9316
9323
|
type === 'image' ||
|
|
9317
9324
|
src.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i))
|
|
9318
9325
|
{
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
|
|
9322
|
-
} catch (e) {
|
|
9323
|
-
this.setError(item);
|
|
9324
|
-
}
|
|
9326
|
+
const img = createEl('img', { src, alt, ...attrs });
|
|
9327
|
+
on(img, 'load', () => this.setItem(item, img));
|
|
9328
|
+
on(img, 'error', () => this.setError(item));
|
|
9325
9329
|
|
|
9326
9330
|
// Video
|
|
9327
9331
|
} else if (type === 'video' || src.match(/\.(mp4|webm|ogv)($|\?)/i)) {
|
|
@@ -9330,17 +9334,11 @@
|
|
|
9330
9334
|
poster,
|
|
9331
9335
|
controls: '',
|
|
9332
9336
|
playsinline: '',
|
|
9333
|
-
'uk-video': `${this.videoAutoplay}
|
|
9337
|
+
'uk-video': `${this.videoAutoplay}`,
|
|
9338
|
+
...attrs
|
|
9334
9339
|
});
|
|
9335
9340
|
|
|
9336
|
-
on(video, 'loadedmetadata', () =>
|
|
9337
|
-
attr(video, {
|
|
9338
|
-
width: video.videoWidth,
|
|
9339
|
-
height: video.videoHeight,
|
|
9340
|
-
...attrs
|
|
9341
|
-
});
|
|
9342
|
-
this.setItem(item, video);
|
|
9343
|
-
});
|
|
9341
|
+
on(video, 'loadedmetadata', () => this.setItem(item, video));
|
|
9344
9342
|
on(video, 'error', () => this.setError(item));
|
|
9345
9343
|
|
|
9346
9344
|
// Iframe
|
|
@@ -9382,9 +9380,7 @@
|
|
|
9382
9380
|
`https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(
|
|
9383
9381
|
src)
|
|
9384
9382
|
}`,
|
|
9385
|
-
{
|
|
9386
|
-
credentials: 'omit'
|
|
9387
|
-
})).
|
|
9383
|
+
{ credentials: 'omit' })).
|
|
9388
9384
|
|
|
9389
9385
|
json();
|
|
9390
9386
|
|
|
@@ -11223,10 +11219,9 @@
|
|
|
11223
11219
|
[placeholderRect.top, placeholderRect.bottom]);
|
|
11224
11220
|
|
|
11225
11221
|
|
|
11226
|
-
const pointerPos = sameRow ?
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
const endProp = sameRow ? 'right' : 'bottom';
|
|
11222
|
+
const [pointerPos, lengthProp, startProp, endProp] = sameRow ?
|
|
11223
|
+
[x, 'width', 'left', 'right'] :
|
|
11224
|
+
[y, 'height', 'top', 'bottom'];
|
|
11230
11225
|
|
|
11231
11226
|
const diff =
|
|
11232
11227
|
placeholderRect[lengthProp] < rect[lengthProp] ?
|
|
@@ -11372,14 +11367,9 @@
|
|
|
11372
11367
|
passive: true
|
|
11373
11368
|
})];
|
|
11374
11369
|
|
|
11375
|
-
once(
|
|
11376
|
-
this.tooltip,
|
|
11377
|
-
'hide',
|
|
11378
|
-
() => handlers.forEach((handler) => handler && handler()),
|
|
11379
|
-
{
|
|
11370
|
+
once(this.tooltip, 'hide', () => handlers.forEach((handler) => handler()), {
|
|
11380
11371
|
self: true
|
|
11381
11372
|
});
|
|
11382
|
-
|
|
11383
11373
|
});
|
|
11384
11374
|
|
|
11385
11375
|
this.toggleElement(this.tooltip, true);
|
|
@@ -11583,7 +11573,7 @@
|
|
|
11583
11573
|
responseType: this.type,
|
|
11584
11574
|
beforeSend: (env) => {
|
|
11585
11575
|
const { xhr } = env;
|
|
11586
|
-
|
|
11576
|
+
on(xhr.upload, 'progress', this.progress);
|
|
11587
11577
|
for (const type of ['loadStart', 'load', 'loadEnd', 'abort']) {
|
|
11588
11578
|
on(xhr, type.toLowerCase(), this[type]);
|
|
11589
11579
|
}
|