uikit 3.14.4-dev.871ba3c05 → 3.14.4-dev.a02c81d72
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 +17 -0
- package/dist/css/uikit-core-rtl.css +73 -28
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +73 -28
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +70 -29
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +70 -29
- 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 +7 -5
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +110 -11
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +110 -11
- 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 +22 -7
- 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 +22 -7
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +3 -3
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +18 -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 +717 -637
- 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 +1511 -1414
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/images/backgrounds/nav-parent-close.svg +1 -1
- package/src/images/backgrounds/nav-parent-open.svg +1 -1
- package/src/images/backgrounds/navbar-parent-close.svg +3 -0
- package/src/images/backgrounds/navbar-parent-open.svg +3 -0
- package/src/js/components/filter.js +5 -3
- package/src/js/components/sortable.js +2 -3
- package/src/js/core/drop.js +7 -0
- package/src/js/core/height-viewport.js +11 -5
- package/src/js/core/navbar.js +44 -15
- package/src/js/core/offcanvas.js +1 -47
- package/src/js/core/sticky.js +8 -9
- package/src/js/mixin/modal.js +90 -4
- package/src/js/mixin/position.js +24 -7
- package/src/js/mixin/slider-drag.js +20 -8
- package/src/js/util/dimensions.js +6 -6
- package/src/js/util/position.js +1 -0
- package/src/js/util/viewport.js +2 -27
- package/src/less/components/dropdown.less +8 -0
- package/src/less/components/nav.less +22 -4
- package/src/less/components/navbar.less +60 -24
- package/src/less/components/utility.less +12 -3
- package/src/less/theme/nav.less +3 -7
- package/src/less/theme/navbar.less +7 -7
- package/src/scss/components/dropdown.scss +8 -0
- package/src/scss/components/nav.scss +24 -6
- package/src/scss/components/navbar.scss +60 -24
- package/src/scss/components/utility.scss +12 -3
- package/src/scss/mixins-theme.scss +2 -5
- package/src/scss/theme/nav.scss +3 -7
- package/src/scss/theme/navbar.scss +6 -3
- package/src/scss/variables-theme.scss +26 -10
- package/src/scss/variables.scss +26 -8
- package/tests/drop.html +72 -16
- package/tests/dropdown.html +103 -16
- package/tests/navbar.html +2132 -1126
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.4-dev.
|
|
1
|
+
/*! UIkit 3.14.4-dev.a02c81d72 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -1060,13 +1060,13 @@
|
|
|
1060
1060
|
}
|
|
1061
1061
|
|
|
1062
1062
|
function offsetPosition(element) {
|
|
1063
|
-
const offset = [0, 0];
|
|
1064
|
-
|
|
1065
1063
|
element = toNode(element);
|
|
1066
1064
|
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1065
|
+
const offset = [element.offsetTop, element.offsetLeft];
|
|
1066
|
+
|
|
1067
|
+
while (element = element.offsetParent) {
|
|
1068
|
+
offset[0] += element.offsetTop + toFloat(css(element, "borderTopWidth"));
|
|
1069
|
+
offset[1] += element.offsetLeft + toFloat(css(element, "borderLeftWidth"));
|
|
1070
1070
|
|
|
1071
1071
|
if (css(element, 'position') === 'fixed') {
|
|
1072
1072
|
const win = toWindow(element);
|
|
@@ -1074,7 +1074,7 @@
|
|
|
1074
1074
|
offset[1] += win.scrollX;
|
|
1075
1075
|
return offset;
|
|
1076
1076
|
}
|
|
1077
|
-
}
|
|
1077
|
+
}
|
|
1078
1078
|
|
|
1079
1079
|
return offset;
|
|
1080
1080
|
}
|
|
@@ -1293,9 +1293,9 @@
|
|
|
1293
1293
|
const hasTouch = inBrowser && 'ontouchstart' in window;
|
|
1294
1294
|
const hasPointerEvents = inBrowser && window.PointerEvent;
|
|
1295
1295
|
|
|
1296
|
-
const pointerDown = hasPointerEvents ? 'pointerdown' : hasTouch ? 'touchstart' : 'mousedown';
|
|
1297
|
-
const pointerMove = hasPointerEvents ? 'pointermove' : hasTouch ? 'touchmove' : 'mousemove';
|
|
1298
|
-
const pointerUp = hasPointerEvents ? 'pointerup' : hasTouch ? 'touchend' : 'mouseup';
|
|
1296
|
+
const pointerDown$1 = hasPointerEvents ? 'pointerdown' : hasTouch ? 'touchstart' : 'mousedown';
|
|
1297
|
+
const pointerMove$1 = hasPointerEvents ? 'pointermove' : hasTouch ? 'touchmove' : 'mousemove';
|
|
1298
|
+
const pointerUp$1 = hasPointerEvents ? 'pointerup' : hasTouch ? 'touchend' : 'mouseup';
|
|
1299
1299
|
const pointerEnter = hasPointerEvents ? 'pointerenter' : hasTouch ? '' : 'mouseenter';
|
|
1300
1300
|
const pointerLeave = hasPointerEvents ? 'pointerleave' : hasTouch ? '' : 'mouseleave';
|
|
1301
1301
|
const pointerCancel = hasPointerEvents ? 'pointercancel' : 'touchcancel';
|
|
@@ -1795,20 +1795,6 @@
|
|
|
1795
1795
|
|
|
1796
1796
|
}
|
|
1797
1797
|
|
|
1798
|
-
function scrollTop(element, top) {
|
|
1799
|
-
if (isWindow(element) || isDocument(element)) {
|
|
1800
|
-
element = scrollingElement(element);
|
|
1801
|
-
} else {
|
|
1802
|
-
element = toNode(element);
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
if (isUndefined(top)) {
|
|
1806
|
-
return element.scrollTop;
|
|
1807
|
-
} else {
|
|
1808
|
-
element.scrollTop = top;
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
|
|
1812
1798
|
function scrollIntoView(element, _temp) {let { offset: offsetBy = 0 } = _temp === void 0 ? {} : _temp;
|
|
1813
1799
|
const parents = isVisible(element) ? scrollParents(element) : [];
|
|
1814
1800
|
return parents.reduce(
|
|
@@ -1850,7 +1836,7 @@
|
|
|
1850
1836
|
(function step() {
|
|
1851
1837
|
const percent = ease(clamp((Date.now() - start) / duration));
|
|
1852
1838
|
|
|
1853
|
-
scrollTop
|
|
1839
|
+
element.scrollTop = scroll + top * percent;
|
|
1854
1840
|
|
|
1855
1841
|
// scroll more if we have not reached our destination
|
|
1856
1842
|
if (percent === 1) {
|
|
@@ -2106,6 +2092,7 @@
|
|
|
2106
2092
|
return newPos;
|
|
2107
2093
|
}
|
|
2108
2094
|
}
|
|
2095
|
+
continue;
|
|
2109
2096
|
}
|
|
2110
2097
|
|
|
2111
2098
|
// Move
|
|
@@ -2205,9 +2192,9 @@
|
|
|
2205
2192
|
inBrowser: inBrowser,
|
|
2206
2193
|
isRtl: isRtl,
|
|
2207
2194
|
hasTouch: hasTouch,
|
|
2208
|
-
pointerDown: pointerDown,
|
|
2209
|
-
pointerMove: pointerMove,
|
|
2210
|
-
pointerUp: pointerUp,
|
|
2195
|
+
pointerDown: pointerDown$1,
|
|
2196
|
+
pointerMove: pointerMove$1,
|
|
2197
|
+
pointerUp: pointerUp$1,
|
|
2211
2198
|
pointerEnter: pointerEnter,
|
|
2212
2199
|
pointerLeave: pointerLeave,
|
|
2213
2200
|
pointerCancel: pointerCancel,
|
|
@@ -2298,7 +2285,6 @@
|
|
|
2298
2285
|
getCssVar: getCssVar,
|
|
2299
2286
|
propName: propName,
|
|
2300
2287
|
isInView: isInView,
|
|
2301
|
-
scrollTop: scrollTop,
|
|
2302
2288
|
scrollIntoView: scrollIntoView,
|
|
2303
2289
|
scrolledOver: scrolledOver,
|
|
2304
2290
|
scrollParents: scrollParents,
|
|
@@ -2961,7 +2947,7 @@
|
|
|
2961
2947
|
UIkit.data = '__uikit__';
|
|
2962
2948
|
UIkit.prefix = 'uk-';
|
|
2963
2949
|
UIkit.options = {};
|
|
2964
|
-
UIkit.version = '3.14.4-dev.
|
|
2950
|
+
UIkit.version = '3.14.4-dev.a02c81d72';
|
|
2965
2951
|
|
|
2966
2952
|
globalAPI(UIkit);
|
|
2967
2953
|
hooksAPI(UIkit);
|
|
@@ -3698,17 +3684,32 @@
|
|
|
3698
3684
|
offset = offset.reverse();
|
|
3699
3685
|
}
|
|
3700
3686
|
|
|
3687
|
+
const [scrollElement] = scrollParents(element, /auto|scroll/);
|
|
3688
|
+
const { scrollTop, scrollLeft } = scrollElement;
|
|
3689
|
+
|
|
3701
3690
|
// Ensure none positioned element does not generate scrollbars
|
|
3702
3691
|
const elDim = dimensions$1(element);
|
|
3703
3692
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
3704
3693
|
|
|
3705
|
-
|
|
3694
|
+
const args = [
|
|
3695
|
+
element,
|
|
3696
|
+
target,
|
|
3697
|
+
{
|
|
3706
3698
|
attach,
|
|
3707
3699
|
offset,
|
|
3708
3700
|
boundary,
|
|
3709
3701
|
flip: this.flip,
|
|
3710
|
-
viewportOffset: this.getViewportOffset(element) }
|
|
3702
|
+
viewportOffset: this.getViewportOffset(element) }];
|
|
3703
|
+
|
|
3711
3704
|
|
|
3705
|
+
|
|
3706
|
+
trigger(element, 'beforeposition', args);
|
|
3707
|
+
|
|
3708
|
+
positionAt(...args);
|
|
3709
|
+
|
|
3710
|
+
// Restore scroll position
|
|
3711
|
+
scrollElement.scrollTop = scrollTop;
|
|
3712
|
+
scrollElement.scrollLeft = scrollLeft;
|
|
3712
3713
|
},
|
|
3713
3714
|
|
|
3714
3715
|
getPositionOffset(element) {
|
|
@@ -3735,64 +3736,44 @@
|
|
|
3735
3736
|
return toPx(getCssVar('position-viewport-offset', element));
|
|
3736
3737
|
} } };
|
|
3737
3738
|
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
var drop = {
|
|
3741
|
-
mixins: [Container, Lazyload, Position, Togglable],
|
|
3739
|
+
const active$1 = [];
|
|
3742
3740
|
|
|
3743
|
-
|
|
3741
|
+
var Modal = {
|
|
3742
|
+
mixins: [Class, Container, Togglable],
|
|
3744
3743
|
|
|
3745
3744
|
props: {
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
delayHide: Number,
|
|
3752
|
-
display: String,
|
|
3753
|
-
clsDrop: String,
|
|
3754
|
-
animateOut: Boolean },
|
|
3745
|
+
selPanel: String,
|
|
3746
|
+
selClose: String,
|
|
3747
|
+
escClose: Boolean,
|
|
3748
|
+
bgClose: Boolean,
|
|
3749
|
+
stack: Boolean },
|
|
3755
3750
|
|
|
3756
3751
|
|
|
3757
3752
|
data: {
|
|
3758
|
-
mode: ['click', 'hover'],
|
|
3759
|
-
toggle: '- *',
|
|
3760
|
-
boundary: true,
|
|
3761
|
-
boundaryAlign: false,
|
|
3762
|
-
delayShow: 0,
|
|
3763
|
-
delayHide: 800,
|
|
3764
|
-
display: null,
|
|
3765
|
-
clsDrop: false,
|
|
3766
|
-
animation: ['uk-animation-fade'],
|
|
3767
3753
|
cls: 'uk-open',
|
|
3768
|
-
|
|
3769
|
-
|
|
3754
|
+
escClose: true,
|
|
3755
|
+
bgClose: true,
|
|
3756
|
+
overlay: true,
|
|
3757
|
+
stack: false },
|
|
3770
3758
|
|
|
3771
3759
|
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3760
|
+
computed: {
|
|
3761
|
+
panel(_ref, $el) {let { selPanel } = _ref;
|
|
3762
|
+
return $(selPanel, $el);
|
|
3763
|
+
},
|
|
3775
3764
|
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3765
|
+
transitionElement() {
|
|
3766
|
+
return this.panel;
|
|
3767
|
+
},
|
|
3779
3768
|
|
|
3780
|
-
|
|
3781
|
-
|
|
3769
|
+
bgClose(_ref2) {let { bgClose } = _ref2;
|
|
3770
|
+
return bgClose && this.panel;
|
|
3771
|
+
} },
|
|
3782
3772
|
|
|
3783
|
-
if (this.toggle && !this.target) {
|
|
3784
|
-
this.target = this.$create('toggle', query(this.toggle, this.$el), {
|
|
3785
|
-
target: this.$el,
|
|
3786
|
-
mode: this.mode }).
|
|
3787
|
-
$el;
|
|
3788
|
-
attr(this.target, 'aria-haspopup', true);
|
|
3789
|
-
this.lazyload(this.target);
|
|
3790
|
-
}
|
|
3791
|
-
},
|
|
3792
3773
|
|
|
3793
|
-
|
|
3794
|
-
if (this
|
|
3795
|
-
|
|
3774
|
+
beforeDisconnect() {
|
|
3775
|
+
if (includes(active$1, this)) {
|
|
3776
|
+
this.toggleElement(this.$el, false, false);
|
|
3796
3777
|
}
|
|
3797
3778
|
},
|
|
3798
3779
|
|
|
@@ -3801,767 +3782,825 @@
|
|
|
3801
3782
|
name: 'click',
|
|
3802
3783
|
|
|
3803
3784
|
delegate() {
|
|
3804
|
-
return
|
|
3785
|
+
return this.selClose;
|
|
3805
3786
|
},
|
|
3806
3787
|
|
|
3807
3788
|
handler(e) {
|
|
3808
3789
|
e.preventDefault();
|
|
3809
|
-
this.hide(
|
|
3790
|
+
this.hide();
|
|
3810
3791
|
} },
|
|
3811
3792
|
|
|
3812
3793
|
|
|
3813
3794
|
{
|
|
3814
|
-
name: '
|
|
3795
|
+
name: 'toggle',
|
|
3815
3796
|
|
|
3816
|
-
|
|
3817
|
-
return 'a[href^="#"]';
|
|
3818
|
-
},
|
|
3797
|
+
self: true,
|
|
3819
3798
|
|
|
3820
|
-
handler(
|
|
3821
|
-
if (
|
|
3822
|
-
|
|
3799
|
+
handler(e) {
|
|
3800
|
+
if (e.defaultPrevented) {
|
|
3801
|
+
return;
|
|
3823
3802
|
}
|
|
3824
|
-
} },
|
|
3825
3803
|
|
|
3804
|
+
e.preventDefault();
|
|
3826
3805
|
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
handler() {
|
|
3831
|
-
this.hide(false);
|
|
3806
|
+
if (this.isToggled() === includes(active$1, this)) {
|
|
3807
|
+
this.toggle();
|
|
3808
|
+
}
|
|
3832
3809
|
} },
|
|
3833
3810
|
|
|
3834
3811
|
|
|
3835
3812
|
{
|
|
3836
|
-
name: '
|
|
3813
|
+
name: 'beforeshow',
|
|
3837
3814
|
|
|
3838
3815
|
self: true,
|
|
3839
3816
|
|
|
3840
|
-
handler(e
|
|
3841
|
-
|
|
3817
|
+
handler(e) {
|
|
3818
|
+
if (includes(active$1, this)) {
|
|
3819
|
+
return false;
|
|
3820
|
+
}
|
|
3842
3821
|
|
|
3843
|
-
if (this.
|
|
3844
|
-
|
|
3822
|
+
if (!this.stack && active$1.length) {
|
|
3823
|
+
Promise.all(active$1.map((modal) => modal.hide())).then(this.show);
|
|
3824
|
+
e.preventDefault();
|
|
3845
3825
|
} else {
|
|
3846
|
-
|
|
3826
|
+
active$1.push(this);
|
|
3847
3827
|
}
|
|
3848
3828
|
} },
|
|
3849
3829
|
|
|
3850
3830
|
|
|
3851
3831
|
{
|
|
3852
|
-
name: '
|
|
3832
|
+
name: 'show',
|
|
3853
3833
|
|
|
3854
3834
|
self: true,
|
|
3855
3835
|
|
|
3856
|
-
handler(
|
|
3857
|
-
|
|
3858
|
-
this
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3836
|
+
handler() {
|
|
3837
|
+
once(
|
|
3838
|
+
this.$el,
|
|
3839
|
+
'hide',
|
|
3840
|
+
on(document, 'focusin', (e) => {
|
|
3841
|
+
if (last(active$1) === this && !within(e.target, this.$el)) {
|
|
3842
|
+
this.$el.focus();
|
|
3843
|
+
}
|
|
3844
|
+
}));
|
|
3864
3845
|
|
|
3865
|
-
self: true,
|
|
3866
3846
|
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
this.hide();
|
|
3847
|
+
if (this.overlay) {
|
|
3848
|
+
once(this.$el, 'hide', preventOverscroll(this.$el));
|
|
3849
|
+
once(this.$el, 'hide', preventBackgroundScroll());
|
|
3871
3850
|
}
|
|
3872
|
-
} },
|
|
3873
3851
|
|
|
3852
|
+
if (this.stack) {
|
|
3853
|
+
css(this.$el, 'zIndex', toFloat(css(this.$el, 'zIndex')) + active$1.length);
|
|
3854
|
+
}
|
|
3874
3855
|
|
|
3875
|
-
|
|
3876
|
-
name: pointerEnter + " focusin",
|
|
3856
|
+
addClass(document.documentElement, this.clsPage);
|
|
3877
3857
|
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3858
|
+
if (this.bgClose) {
|
|
3859
|
+
once(
|
|
3860
|
+
this.$el,
|
|
3861
|
+
'hide',
|
|
3862
|
+
on(document, pointerDown$1, (_ref3) => {let { target } = _ref3;
|
|
3863
|
+
if (
|
|
3864
|
+
last(active$1) !== this ||
|
|
3865
|
+
this.overlay && !within(target, this.$el) ||
|
|
3866
|
+
within(target, this.panel))
|
|
3867
|
+
{
|
|
3868
|
+
return;
|
|
3869
|
+
}
|
|
3881
3870
|
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3871
|
+
once(
|
|
3872
|
+
document,
|
|
3873
|
+
pointerUp$1 + " " + pointerCancel + " scroll",
|
|
3874
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
3875
|
+
if (
|
|
3876
|
+
!defaultPrevented &&
|
|
3877
|
+
type === pointerUp$1 &&
|
|
3878
|
+
target === newTarget)
|
|
3879
|
+
{
|
|
3880
|
+
this.hide();
|
|
3881
|
+
}
|
|
3882
|
+
},
|
|
3883
|
+
true);
|
|
3887
3884
|
|
|
3885
|
+
}),
|
|
3886
|
+
{ self: true });
|
|
3888
3887
|
|
|
3889
|
-
|
|
3890
|
-
name: pointerLeave + " focusout",
|
|
3888
|
+
}
|
|
3891
3889
|
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3890
|
+
if (this.escClose) {
|
|
3891
|
+
once(
|
|
3892
|
+
this.$el,
|
|
3893
|
+
'hide',
|
|
3894
|
+
on(document, 'keydown', (e) => {
|
|
3895
|
+
if (e.keyCode === 27 && last(active$1) === this) {
|
|
3896
|
+
this.hide();
|
|
3897
|
+
}
|
|
3898
|
+
}),
|
|
3899
|
+
{ self: true });
|
|
3895
3900
|
|
|
3896
|
-
handler(e) {
|
|
3897
|
-
if (!isTouch(e) && e.relatedTarget) {
|
|
3898
|
-
this.hide();
|
|
3899
3901
|
}
|
|
3900
3902
|
} },
|
|
3901
3903
|
|
|
3902
3904
|
|
|
3903
3905
|
{
|
|
3904
|
-
name: '
|
|
3906
|
+
name: 'shown',
|
|
3905
3907
|
|
|
3906
3908
|
self: true,
|
|
3907
3909
|
|
|
3908
|
-
handler(
|
|
3909
|
-
if (!
|
|
3910
|
-
|
|
3910
|
+
handler() {
|
|
3911
|
+
if (!isFocusable(this.$el)) {
|
|
3912
|
+
attr(this.$el, 'tabindex', '-1');
|
|
3911
3913
|
}
|
|
3912
3914
|
|
|
3913
|
-
this
|
|
3914
|
-
|
|
3915
|
+
if (!$(':focus', this.$el)) {
|
|
3916
|
+
this.$el.focus();
|
|
3917
|
+
}
|
|
3915
3918
|
} },
|
|
3916
3919
|
|
|
3917
3920
|
|
|
3918
3921
|
{
|
|
3919
|
-
name: '
|
|
3922
|
+
name: 'hidden',
|
|
3920
3923
|
|
|
3921
3924
|
self: true,
|
|
3922
3925
|
|
|
3923
3926
|
handler() {
|
|
3924
|
-
active$1
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
+
if (includes(active$1, this)) {
|
|
3928
|
+
active$1.splice(active$1.indexOf(this), 1);
|
|
3929
|
+
}
|
|
3927
3930
|
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
pointerDown,
|
|
3932
|
-
(_ref2) => {let { target } = _ref2;return (
|
|
3933
|
-
!within(target, this.$el) &&
|
|
3934
|
-
once(
|
|
3935
|
-
document,
|
|
3936
|
-
pointerUp + " " + pointerCancel + " scroll",
|
|
3937
|
-
(_ref3) => {let { defaultPrevented, type, target: newTarget } = _ref3;
|
|
3938
|
-
if (
|
|
3939
|
-
!defaultPrevented &&
|
|
3940
|
-
type === pointerUp &&
|
|
3941
|
-
target === newTarget &&
|
|
3942
|
-
!(this.target && within(target, this.target)))
|
|
3943
|
-
{
|
|
3944
|
-
this.hide(false);
|
|
3945
|
-
}
|
|
3946
|
-
},
|
|
3947
|
-
true));}),
|
|
3931
|
+
if (!active$1.length) {
|
|
3932
|
+
css(document.body, 'overflowY', '');
|
|
3933
|
+
}
|
|
3948
3934
|
|
|
3935
|
+
css(this.$el, 'zIndex', '');
|
|
3949
3936
|
|
|
3937
|
+
if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
|
|
3938
|
+
removeClass(document.documentElement, this.clsPage);
|
|
3939
|
+
}
|
|
3940
|
+
} }],
|
|
3950
3941
|
|
|
3951
|
-
on(document, 'keydown', (e) => {
|
|
3952
|
-
if (e.keyCode === 27) {
|
|
3953
|
-
this.hide(false);
|
|
3954
|
-
}
|
|
3955
|
-
}),
|
|
3956
3942
|
|
|
3957
|
-
...(this.display === 'static' && this.align !== 'stretch' ?
|
|
3958
|
-
[] :
|
|
3959
|
-
(() => {
|
|
3960
|
-
const handler = () => this.$emit();
|
|
3961
|
-
return [
|
|
3962
|
-
on(window, 'resize', handler),
|
|
3963
|
-
on(document, 'scroll', handler, true),
|
|
3964
|
-
(() => {
|
|
3965
|
-
const observer = observeResize(
|
|
3966
|
-
scrollParents(this.$el),
|
|
3967
|
-
handler);
|
|
3968
3943
|
|
|
3969
|
-
|
|
3970
|
-
|
|
3944
|
+
methods: {
|
|
3945
|
+
toggle() {
|
|
3946
|
+
return this.isToggled() ? this.hide() : this.show();
|
|
3947
|
+
},
|
|
3948
|
+
|
|
3949
|
+
show() {
|
|
3950
|
+
if (this.container && parent(this.$el) !== this.container) {
|
|
3951
|
+
append(this.container, this.$el);
|
|
3952
|
+
return new Promise((resolve) =>
|
|
3953
|
+
requestAnimationFrame(() => this.show().then(resolve)));
|
|
3971
3954
|
|
|
3972
|
-
})())])
|
|
3973
|
-
{
|
|
3974
|
-
once(this.$el, 'hide', handler, { self: true });
|
|
3975
3955
|
}
|
|
3976
|
-
} },
|
|
3977
3956
|
|
|
3957
|
+
return this.toggleElement(this.$el, true, animate(this));
|
|
3958
|
+
},
|
|
3978
3959
|
|
|
3979
|
-
|
|
3980
|
-
|
|
3960
|
+
hide() {
|
|
3961
|
+
return this.toggleElement(this.$el, false, animate(this));
|
|
3962
|
+
} } };
|
|
3981
3963
|
|
|
3982
|
-
self: true,
|
|
3983
3964
|
|
|
3984
|
-
handler() {
|
|
3985
|
-
this.clearTimers();
|
|
3986
|
-
} },
|
|
3987
3965
|
|
|
3966
|
+
function animate(_ref5) {let { transitionElement, _toggle } = _ref5;
|
|
3967
|
+
return (el, show) =>
|
|
3968
|
+
new Promise((resolve, reject) =>
|
|
3969
|
+
once(el, 'show hide', () => {
|
|
3970
|
+
el._reject == null ? void 0 : el._reject();
|
|
3971
|
+
el._reject = reject;
|
|
3988
3972
|
|
|
3989
|
-
|
|
3990
|
-
name: 'hide',
|
|
3973
|
+
_toggle(el, show);
|
|
3991
3974
|
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
return;
|
|
3999
|
-
}
|
|
3975
|
+
const off = once(
|
|
3976
|
+
transitionElement,
|
|
3977
|
+
'transitionstart',
|
|
3978
|
+
() => {
|
|
3979
|
+
once(transitionElement, 'transitionend transitioncancel', resolve, {
|
|
3980
|
+
self: true });
|
|
4000
3981
|
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
3982
|
+
clearTimeout(timer);
|
|
3983
|
+
},
|
|
3984
|
+
{ self: true });
|
|
4004
3985
|
|
|
4005
3986
|
|
|
3987
|
+
const timer = setTimeout(() => {
|
|
3988
|
+
off();
|
|
3989
|
+
resolve();
|
|
3990
|
+
}, toMs(css(transitionElement, 'transitionDuration')));
|
|
3991
|
+
})).
|
|
3992
|
+
then(() => delete el._reject);
|
|
3993
|
+
}
|
|
4006
3994
|
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
this.position();
|
|
4011
|
-
}
|
|
4012
|
-
} },
|
|
3995
|
+
function toMs(time) {
|
|
3996
|
+
return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
|
|
3997
|
+
}
|
|
4013
3998
|
|
|
3999
|
+
function preventOverscroll(el) {
|
|
4000
|
+
if (CSS.supports('overscroll-behavior', 'contain')) {
|
|
4001
|
+
const elements = filterChildren(el, (child) => /auto|scroll/.test(css(child, 'overflow')));
|
|
4002
|
+
css(elements, 'overscrollBehavior', 'contain');
|
|
4003
|
+
return () => css(elements, 'overscrollBehavior', '');
|
|
4004
|
+
}
|
|
4014
4005
|
|
|
4015
|
-
|
|
4016
|
-
show(target, delay) {if (target === void 0) {target = this.target;}if (delay === void 0) {delay = true;}
|
|
4017
|
-
if (this.isToggled() && target && this.target && target !== this.target) {
|
|
4018
|
-
this.hide(false, false);
|
|
4019
|
-
}
|
|
4006
|
+
let startClientY;
|
|
4020
4007
|
|
|
4021
|
-
|
|
4008
|
+
const events = [
|
|
4009
|
+
on(
|
|
4010
|
+
el,
|
|
4011
|
+
'touchstart',
|
|
4012
|
+
(_ref6) => {let { targetTouches } = _ref6;
|
|
4013
|
+
if (targetTouches.length === 1) {
|
|
4014
|
+
startClientY = targetTouches[0].clientY;
|
|
4015
|
+
}
|
|
4016
|
+
},
|
|
4017
|
+
{ passive: true }),
|
|
4022
4018
|
|
|
4023
|
-
this.clearTimers();
|
|
4024
4019
|
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4020
|
+
on(
|
|
4021
|
+
el,
|
|
4022
|
+
'touchmove',
|
|
4023
|
+
(e) => {
|
|
4024
|
+
if (e.targetTouches.length !== 1) {
|
|
4025
|
+
return;
|
|
4026
|
+
}
|
|
4028
4027
|
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
}
|
|
4028
|
+
let [scrollParent] = scrollParents(e.target, /auto|scroll/);
|
|
4029
|
+
if (!within(scrollParent, el)) {
|
|
4030
|
+
scrollParent = el;
|
|
4031
|
+
}
|
|
4034
4032
|
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
prev = active$1;
|
|
4038
|
-
active$1.hide(false, false);
|
|
4039
|
-
}
|
|
4040
|
-
}
|
|
4033
|
+
const clientY = e.targetTouches[0].clientY - startClientY;
|
|
4034
|
+
const { scrollTop, scrollHeight, clientHeight } = scrollParent;
|
|
4041
4035
|
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4036
|
+
if (
|
|
4037
|
+
clientHeight >= scrollHeight ||
|
|
4038
|
+
scrollTop === 0 && clientY > 0 ||
|
|
4039
|
+
scrollHeight - scrollTop <= clientHeight && clientY < 0)
|
|
4040
|
+
{
|
|
4041
|
+
e.cancelable && e.preventDefault();
|
|
4042
|
+
}
|
|
4043
|
+
},
|
|
4044
|
+
{ passive: false })];
|
|
4045
4045
|
|
|
4046
|
-
this.showTimer = setTimeout(
|
|
4047
|
-
() => this.toggleElement(this.$el, true),
|
|
4048
|
-
delay && this.delayShow || 0);
|
|
4049
4046
|
|
|
4050
|
-
},
|
|
4051
4047
|
|
|
4052
|
-
|
|
4053
|
-
|
|
4048
|
+
return () => events.forEach((fn) => fn());
|
|
4049
|
+
}
|
|
4054
4050
|
|
|
4055
|
-
|
|
4051
|
+
function preventBackgroundScroll() {
|
|
4052
|
+
const { body, documentElement } = document;
|
|
4053
|
+
css(body, {
|
|
4054
|
+
overflowY: width(window) > documentElement.clientWidth ? 'scroll' : '',
|
|
4055
|
+
touchAction: 'none' });
|
|
4056
4056
|
|
|
4057
|
-
|
|
4058
|
-
|
|
4057
|
+
css(documentElement, 'overflowY', 'hidden');
|
|
4058
|
+
return () => {
|
|
4059
|
+
css(documentElement, 'overflowY', '');
|
|
4060
|
+
css(body, { overflowY: '', touchAction: '' });
|
|
4061
|
+
};
|
|
4062
|
+
}
|
|
4059
4063
|
|
|
4064
|
+
function filterChildren(el, fn) {
|
|
4065
|
+
const children = [];
|
|
4066
|
+
apply(el, (node) => {
|
|
4067
|
+
if (fn(node)) {
|
|
4068
|
+
children.push(node);
|
|
4069
|
+
}
|
|
4070
|
+
});
|
|
4071
|
+
return children;
|
|
4072
|
+
}
|
|
4060
4073
|
|
|
4061
|
-
|
|
4062
|
-
this.hideTimer = setTimeout(this.hide, 50);
|
|
4063
|
-
} else if (delay && this.delayHide) {
|
|
4064
|
-
this.hideTimer = setTimeout(hide, this.delayHide);
|
|
4065
|
-
} else {
|
|
4066
|
-
hide();
|
|
4067
|
-
}
|
|
4068
|
-
},
|
|
4074
|
+
let active;
|
|
4069
4075
|
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
clearTimeout(this.hideTimer);
|
|
4073
|
-
this.showTimer = null;
|
|
4074
|
-
this.hideTimer = null;
|
|
4075
|
-
this.isDelaying = false;
|
|
4076
|
-
},
|
|
4076
|
+
var drop = {
|
|
4077
|
+
mixins: [Container, Lazyload, Position, Togglable],
|
|
4077
4078
|
|
|
4078
|
-
|
|
4079
|
-
return active$1 === this;
|
|
4080
|
-
},
|
|
4079
|
+
args: 'pos',
|
|
4081
4080
|
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4081
|
+
props: {
|
|
4082
|
+
mode: 'list',
|
|
4083
|
+
toggle: Boolean,
|
|
4084
|
+
boundary: Boolean,
|
|
4085
|
+
boundaryAlign: Boolean,
|
|
4086
|
+
delayShow: Number,
|
|
4087
|
+
delayHide: Number,
|
|
4088
|
+
display: String,
|
|
4089
|
+
clsDrop: String,
|
|
4090
|
+
animateOut: Boolean,
|
|
4091
|
+
bgScroll: Boolean },
|
|
4086
4092
|
|
|
4087
|
-
const boundary = query(this.boundary, this.$el);
|
|
4088
|
-
const target = boundary && this.boundaryAlign ? boundary : this.target;
|
|
4089
|
-
const [scrollParent] = scrollParents(
|
|
4090
|
-
boundary && this.boundaryAlign ? boundary : this.$el);
|
|
4091
4093
|
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4094
|
+
data: {
|
|
4095
|
+
mode: ['click', 'hover'],
|
|
4096
|
+
toggle: '- *',
|
|
4097
|
+
boundary: true,
|
|
4098
|
+
boundaryAlign: false,
|
|
4099
|
+
delayShow: 0,
|
|
4100
|
+
delayHide: 800,
|
|
4101
|
+
display: null,
|
|
4102
|
+
clsDrop: false,
|
|
4103
|
+
animation: ['uk-animation-fade'],
|
|
4104
|
+
cls: 'uk-open',
|
|
4105
|
+
container: false,
|
|
4106
|
+
animateOut: false,
|
|
4107
|
+
bgScroll: true },
|
|
4095
4108
|
|
|
4096
|
-
css(this.$el, 'maxWidth', '');
|
|
4097
|
-
const maxWidth = scrollParentOffset.width - 2 * viewportOffset;
|
|
4098
4109
|
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
this.$el,
|
|
4103
|
-
prop,
|
|
4104
|
-
Math.min(
|
|
4105
|
-
(boundary ? boundaryOffset : offset(this.target))[prop],
|
|
4106
|
-
scrollParentOffset[prop] - 2 * viewportOffset));
|
|
4110
|
+
created() {
|
|
4111
|
+
this.tracker = new MouseTracker();
|
|
4112
|
+
},
|
|
4107
4113
|
|
|
4114
|
+
beforeConnect() {
|
|
4115
|
+
this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
|
|
4116
|
+
},
|
|
4108
4117
|
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
this.display = 'static';
|
|
4118
|
+
connected() {
|
|
4119
|
+
addClass(this.$el, this.clsDrop);
|
|
4112
4120
|
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4121
|
+
if (this.toggle && !this.target) {
|
|
4122
|
+
this.target = this.$create('toggle', query(this.toggle, this.$el), {
|
|
4123
|
+
target: this.$el,
|
|
4124
|
+
mode: this.mode }).
|
|
4125
|
+
$el;
|
|
4126
|
+
attr(this.target, 'aria-haspopup', true);
|
|
4127
|
+
this.lazyload(this.target);
|
|
4128
|
+
}
|
|
4129
|
+
},
|
|
4116
4130
|
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
targetDim.left - viewport.left :
|
|
4123
|
-
viewport.right - targetDim.right) - elOffset,
|
|
4124
|
-
height:
|
|
4125
|
-
this.axis === 'x' ?
|
|
4126
|
-
viewport.height :
|
|
4127
|
-
(this.dir === 'top' ?
|
|
4128
|
-
targetDim.top - viewport.top :
|
|
4129
|
-
viewport.bottom - targetDim.bottom) - elOffset });
|
|
4131
|
+
disconnected() {
|
|
4132
|
+
if (this.isActive()) {
|
|
4133
|
+
active = null;
|
|
4134
|
+
}
|
|
4135
|
+
},
|
|
4130
4136
|
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4137
|
+
events: [
|
|
4138
|
+
{
|
|
4139
|
+
name: 'click',
|
|
4134
4140
|
|
|
4135
|
-
|
|
4141
|
+
delegate() {
|
|
4142
|
+
return "." + this.clsDrop + "-close";
|
|
4143
|
+
},
|
|
4136
4144
|
|
|
4137
|
-
|
|
4138
|
-
|
|
4145
|
+
handler(e) {
|
|
4146
|
+
e.preventDefault();
|
|
4147
|
+
this.hide(false);
|
|
4148
|
+
} },
|
|
4139
4149
|
|
|
4140
4150
|
|
|
4151
|
+
{
|
|
4152
|
+
name: 'click',
|
|
4141
4153
|
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
return result;
|
|
4146
|
-
}
|
|
4154
|
+
delegate() {
|
|
4155
|
+
return 'a[href^="#"]';
|
|
4156
|
+
},
|
|
4147
4157
|
|
|
4148
|
-
|
|
4149
|
-
|
|
4158
|
+
handler(_ref) {let { defaultPrevented, current: { hash } } = _ref;
|
|
4159
|
+
if (!defaultPrevented && hash && !within(hash, this.$el)) {
|
|
4160
|
+
this.hide(false);
|
|
4161
|
+
}
|
|
4162
|
+
} },
|
|
4150
4163
|
|
|
4151
|
-
args: 'target',
|
|
4152
4164
|
|
|
4153
|
-
|
|
4154
|
-
|
|
4165
|
+
{
|
|
4166
|
+
name: 'beforescroll',
|
|
4155
4167
|
|
|
4168
|
+
handler() {
|
|
4169
|
+
this.hide(false);
|
|
4170
|
+
} },
|
|
4156
4171
|
|
|
4157
|
-
data: {
|
|
4158
|
-
target: false },
|
|
4159
4172
|
|
|
4173
|
+
{
|
|
4174
|
+
name: 'toggle',
|
|
4160
4175
|
|
|
4161
|
-
|
|
4162
|
-
input(_, $el) {
|
|
4163
|
-
return $(selInput, $el);
|
|
4164
|
-
},
|
|
4176
|
+
self: true,
|
|
4165
4177
|
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
},
|
|
4178
|
+
handler(e, toggle) {
|
|
4179
|
+
e.preventDefault();
|
|
4169
4180
|
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4181
|
+
if (this.isToggled()) {
|
|
4182
|
+
this.hide(false);
|
|
4183
|
+
} else {
|
|
4184
|
+
this.show(toggle == null ? void 0 : toggle.$el, false);
|
|
4185
|
+
}
|
|
4186
|
+
} },
|
|
4175
4187
|
|
|
4188
|
+
|
|
4189
|
+
{
|
|
4190
|
+
name: 'toggleshow',
|
|
4191
|
+
|
|
4192
|
+
self: true,
|
|
4193
|
+
|
|
4194
|
+
handler(e, toggle) {
|
|
4195
|
+
e.preventDefault();
|
|
4196
|
+
this.show(toggle == null ? void 0 : toggle.$el);
|
|
4176
4197
|
} },
|
|
4177
4198
|
|
|
4178
4199
|
|
|
4179
|
-
|
|
4180
|
-
|
|
4200
|
+
{
|
|
4201
|
+
name: 'togglehide',
|
|
4181
4202
|
|
|
4182
|
-
|
|
4183
|
-
return;
|
|
4184
|
-
}
|
|
4203
|
+
self: true,
|
|
4185
4204
|
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
option = $$('option', input).filter((el) => el.selected)[0]) // eslint-disable-line prefer-destructuring
|
|
4193
|
-
? option.textContent :
|
|
4194
|
-
input.value;
|
|
4205
|
+
handler(e) {
|
|
4206
|
+
e.preventDefault();
|
|
4207
|
+
if (!matches(this.$el, ':focus,:hover')) {
|
|
4208
|
+
this.hide();
|
|
4209
|
+
}
|
|
4210
|
+
} },
|
|
4195
4211
|
|
|
4196
|
-
if (prev !== value) {
|
|
4197
|
-
target[prop] = value;
|
|
4198
|
-
}
|
|
4199
|
-
},
|
|
4200
4212
|
|
|
4201
|
-
events: [
|
|
4202
4213
|
{
|
|
4203
|
-
name:
|
|
4214
|
+
name: pointerEnter + " focusin",
|
|
4204
4215
|
|
|
4205
|
-
|
|
4206
|
-
this
|
|
4216
|
+
filter() {
|
|
4217
|
+
return includes(this.mode, 'hover');
|
|
4218
|
+
},
|
|
4219
|
+
|
|
4220
|
+
handler(e) {
|
|
4221
|
+
if (!isTouch(e)) {
|
|
4222
|
+
this.clearTimers();
|
|
4223
|
+
}
|
|
4207
4224
|
} },
|
|
4208
4225
|
|
|
4209
4226
|
|
|
4210
4227
|
{
|
|
4211
|
-
name:
|
|
4228
|
+
name: pointerLeave + " focusout",
|
|
4212
4229
|
|
|
4213
|
-
|
|
4214
|
-
return
|
|
4230
|
+
filter() {
|
|
4231
|
+
return includes(this.mode, 'hover');
|
|
4215
4232
|
},
|
|
4216
4233
|
|
|
4217
|
-
handler() {
|
|
4218
|
-
|
|
4219
|
-
|
|
4234
|
+
handler(e) {
|
|
4235
|
+
if (!isTouch(e) && e.relatedTarget) {
|
|
4236
|
+
this.hide();
|
|
4237
|
+
}
|
|
4238
|
+
} },
|
|
4220
4239
|
|
|
4221
|
-
var Margin = {
|
|
4222
|
-
mixins: [Resize],
|
|
4223
4240
|
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
firstColumn: Boolean },
|
|
4241
|
+
{
|
|
4242
|
+
name: 'toggled',
|
|
4227
4243
|
|
|
4244
|
+
self: true,
|
|
4228
4245
|
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4246
|
+
handler(e, toggled) {
|
|
4247
|
+
if (!toggled) {
|
|
4248
|
+
return;
|
|
4249
|
+
}
|
|
4232
4250
|
|
|
4251
|
+
this.clearTimers();
|
|
4252
|
+
this.position();
|
|
4253
|
+
} },
|
|
4233
4254
|
|
|
4234
|
-
resizeTargets() {
|
|
4235
|
-
return [this.$el, ...toArray(this.$el.children)];
|
|
4236
|
-
},
|
|
4237
4255
|
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
observeMutation(this.$el, () => this.$reset(), {
|
|
4241
|
-
childList: true }));
|
|
4256
|
+
{
|
|
4257
|
+
name: 'show',
|
|
4242
4258
|
|
|
4259
|
+
self: true,
|
|
4243
4260
|
|
|
4244
|
-
|
|
4261
|
+
handler() {
|
|
4262
|
+
active = this;
|
|
4245
4263
|
|
|
4246
|
-
|
|
4247
|
-
read() {
|
|
4248
|
-
const rows = getRows(this.$el.children);
|
|
4264
|
+
this.tracker.init();
|
|
4249
4265
|
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4266
|
+
for (const handler of [
|
|
4267
|
+
on(
|
|
4268
|
+
document,
|
|
4269
|
+
pointerDown$1,
|
|
4270
|
+
(_ref2) => {let { target } = _ref2;return (
|
|
4271
|
+
!within(target, this.$el) &&
|
|
4272
|
+
once(
|
|
4273
|
+
document,
|
|
4274
|
+
pointerUp$1 + " " + pointerCancel + " scroll",
|
|
4275
|
+
(_ref3) => {let { defaultPrevented, type, target: newTarget } = _ref3;
|
|
4276
|
+
if (
|
|
4277
|
+
!defaultPrevented &&
|
|
4278
|
+
type === pointerUp$1 &&
|
|
4279
|
+
target === newTarget &&
|
|
4280
|
+
!(this.target && within(target, this.target)))
|
|
4281
|
+
{
|
|
4282
|
+
this.hide(false);
|
|
4283
|
+
}
|
|
4284
|
+
},
|
|
4285
|
+
true));}),
|
|
4253
4286
|
|
|
4254
|
-
},
|
|
4255
4287
|
|
|
4256
|
-
write(_ref) {let { columns, rows } = _ref;
|
|
4257
|
-
for (const row of rows) {
|
|
4258
|
-
for (const column of row) {
|
|
4259
|
-
toggleClass(column, this.margin, rows[0] !== row);
|
|
4260
|
-
toggleClass(column, this.firstColumn, columns[0].includes(column));
|
|
4261
|
-
}
|
|
4262
|
-
}
|
|
4263
|
-
},
|
|
4264
4288
|
|
|
4265
|
-
|
|
4289
|
+
on(document, 'keydown', (e) => {
|
|
4290
|
+
if (e.keyCode === 27) {
|
|
4291
|
+
this.hide(false);
|
|
4292
|
+
}
|
|
4293
|
+
}),
|
|
4266
4294
|
|
|
4295
|
+
...(this.bgScroll ?
|
|
4296
|
+
[] :
|
|
4297
|
+
[preventOverscroll(this.$el), preventBackgroundScroll()]),
|
|
4267
4298
|
|
|
4299
|
+
...(this.display === 'static' && this.align !== 'stretch' ?
|
|
4300
|
+
[] :
|
|
4301
|
+
(() => {
|
|
4302
|
+
const handler = () => this.$emit();
|
|
4303
|
+
return [
|
|
4304
|
+
on(window, 'resize', handler),
|
|
4305
|
+
on(document, 'scroll', handler, true),
|
|
4306
|
+
(() => {
|
|
4307
|
+
const observer = observeResize(
|
|
4308
|
+
scrollParents(this.$el),
|
|
4309
|
+
handler);
|
|
4268
4310
|
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
}
|
|
4311
|
+
return () => observer.disconnect();
|
|
4312
|
+
})()];
|
|
4272
4313
|
|
|
4273
|
-
|
|
4274
|
-
|
|
4314
|
+
})())])
|
|
4315
|
+
{
|
|
4316
|
+
once(this.$el, 'hide', handler, { self: true });
|
|
4317
|
+
}
|
|
4318
|
+
} },
|
|
4275
4319
|
|
|
4276
|
-
for (const row of rows) {
|
|
4277
|
-
const sorted = sortBy(row, 'left', 'right');
|
|
4278
|
-
for (let j = 0; j < sorted.length; j++) {
|
|
4279
|
-
columns[j] = columns[j] ? columns[j].concat(sorted[j]) : sorted[j];
|
|
4280
|
-
}
|
|
4281
|
-
}
|
|
4282
4320
|
|
|
4283
|
-
|
|
4284
|
-
|
|
4321
|
+
{
|
|
4322
|
+
name: 'beforehide',
|
|
4285
4323
|
|
|
4286
|
-
|
|
4287
|
-
const sorted = [[]];
|
|
4324
|
+
self: true,
|
|
4288
4325
|
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
}
|
|
4326
|
+
handler() {
|
|
4327
|
+
this.clearTimers();
|
|
4328
|
+
} },
|
|
4293
4329
|
|
|
4294
|
-
let dim = getOffset(el);
|
|
4295
4330
|
|
|
4296
|
-
|
|
4297
|
-
|
|
4331
|
+
{
|
|
4332
|
+
name: 'hide',
|
|
4298
4333
|
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4334
|
+
handler(_ref4) {let { target } = _ref4;
|
|
4335
|
+
if (this.$el !== target) {
|
|
4336
|
+
active =
|
|
4337
|
+
active === null && within(target, this.$el) && this.isToggled() ?
|
|
4338
|
+
this :
|
|
4339
|
+
active;
|
|
4340
|
+
return;
|
|
4302
4341
|
}
|
|
4303
4342
|
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
} else {
|
|
4308
|
-
dim = getOffset(el, true);
|
|
4309
|
-
startDim = getOffset(current[0], true);
|
|
4310
|
-
}
|
|
4343
|
+
active = this.isActive() ? null : active;
|
|
4344
|
+
this.tracker.cancel();
|
|
4345
|
+
} }],
|
|
4311
4346
|
|
|
4312
|
-
if (dim[startProp] >= startDim[endProp] - 1 && dim[startProp] !== startDim[startProp]) {
|
|
4313
|
-
sorted.push([el]);
|
|
4314
|
-
break;
|
|
4315
|
-
}
|
|
4316
4347
|
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4348
|
+
|
|
4349
|
+
update: {
|
|
4350
|
+
write() {
|
|
4351
|
+
if (this.isToggled() && !hasClass(this.$el, this.clsEnter)) {
|
|
4352
|
+
this.position();
|
|
4320
4353
|
}
|
|
4354
|
+
} },
|
|
4321
4355
|
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4356
|
+
|
|
4357
|
+
methods: {
|
|
4358
|
+
show(target, delay) {if (target === void 0) {target = this.target;}if (delay === void 0) {delay = true;}
|
|
4359
|
+
if (this.isToggled() && target && this.target && target !== this.target) {
|
|
4360
|
+
this.hide(false, false);
|
|
4325
4361
|
}
|
|
4326
|
-
}
|
|
4327
|
-
}
|
|
4328
4362
|
|
|
4329
|
-
|
|
4330
|
-
}
|
|
4363
|
+
this.target = target;
|
|
4331
4364
|
|
|
4332
|
-
|
|
4333
|
-
let { offsetTop, offsetLeft, offsetHeight, offsetWidth } = element;
|
|
4365
|
+
this.clearTimers();
|
|
4334
4366
|
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4367
|
+
if (this.isActive()) {
|
|
4368
|
+
return;
|
|
4369
|
+
}
|
|
4338
4370
|
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4371
|
+
if (active) {
|
|
4372
|
+
if (delay && active.isDelaying) {
|
|
4373
|
+
this.showTimer = setTimeout(() => matches(target, ':hover') && this.show(), 10);
|
|
4374
|
+
return;
|
|
4375
|
+
}
|
|
4344
4376
|
|
|
4345
|
-
|
|
4377
|
+
let prev;
|
|
4378
|
+
while (active && prev !== active && !within(this.$el, active.$el)) {
|
|
4379
|
+
prev = active;
|
|
4380
|
+
active.hide(false, false);
|
|
4381
|
+
}
|
|
4382
|
+
}
|
|
4346
4383
|
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
},
|
|
4384
|
+
if (this.container && parent(this.$el) !== this.container) {
|
|
4385
|
+
append(this.container, this.$el);
|
|
4386
|
+
}
|
|
4351
4387
|
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4388
|
+
this.showTimer = setTimeout(
|
|
4389
|
+
() => this.toggleElement(this.$el, true),
|
|
4390
|
+
delay && this.delayShow || 0);
|
|
4355
4391
|
|
|
4392
|
+
},
|
|
4356
4393
|
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
function registerScrollListener(id, listener) {
|
|
4360
|
-
unbindScrollListener =
|
|
4361
|
-
unbindScrollListener ||
|
|
4362
|
-
on(window, 'scroll', () => scrollListeners.forEach((listener) => listener()), {
|
|
4363
|
-
passive: true,
|
|
4364
|
-
capture: true });
|
|
4394
|
+
hide(delay, animate) {if (delay === void 0) {delay = true;}if (animate === void 0) {animate = true;}
|
|
4395
|
+
const hide = () => this.toggleElement(this.$el, false, this.animateOut && animate);
|
|
4365
4396
|
|
|
4397
|
+
this.clearTimers();
|
|
4366
4398
|
|
|
4367
|
-
|
|
4368
|
-
|
|
4399
|
+
this.isDelaying = getPositionedElements(this.$el).some((el) =>
|
|
4400
|
+
this.tracker.movesTo(el));
|
|
4369
4401
|
|
|
4370
|
-
function unregisterScrollListener(id) {
|
|
4371
|
-
scrollListeners.delete(id);
|
|
4372
|
-
if (unbindScrollListener && !scrollListeners.size) {
|
|
4373
|
-
unbindScrollListener();
|
|
4374
|
-
unbindScrollListener = null;
|
|
4375
|
-
}
|
|
4376
|
-
}
|
|
4377
4402
|
|
|
4378
|
-
|
|
4379
|
-
|
|
4403
|
+
if (delay && this.isDelaying) {
|
|
4404
|
+
this.hideTimer = setTimeout(this.hide, 50);
|
|
4405
|
+
} else if (delay && this.delayHide) {
|
|
4406
|
+
this.hideTimer = setTimeout(hide, this.delayHide);
|
|
4407
|
+
} else {
|
|
4408
|
+
hide();
|
|
4409
|
+
}
|
|
4410
|
+
},
|
|
4380
4411
|
|
|
4381
|
-
|
|
4412
|
+
clearTimers() {
|
|
4413
|
+
clearTimeout(this.showTimer);
|
|
4414
|
+
clearTimeout(this.hideTimer);
|
|
4415
|
+
this.showTimer = null;
|
|
4416
|
+
this.hideTimer = null;
|
|
4417
|
+
this.isDelaying = false;
|
|
4418
|
+
},
|
|
4382
4419
|
|
|
4383
|
-
|
|
4420
|
+
isActive() {
|
|
4421
|
+
return active === this;
|
|
4422
|
+
},
|
|
4384
4423
|
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4424
|
+
position() {
|
|
4425
|
+
removeClass(this.$el, this.clsDrop + "-stack");
|
|
4426
|
+
toggleClass(this.$el, this.clsDrop + "-boundary", this.boundaryAlign);
|
|
4427
|
+
toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
|
|
4388
4428
|
|
|
4429
|
+
const boundary = query(this.boundary, this.$el);
|
|
4430
|
+
const target = boundary && this.boundaryAlign ? boundary : this.target;
|
|
4431
|
+
const [scrollParent] = scrollParents(
|
|
4432
|
+
boundary && this.boundaryAlign ? boundary : this.$el);
|
|
4389
4433
|
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
masonry: false,
|
|
4394
|
-
parallax: 0 },
|
|
4434
|
+
const scrollParentOffset = offset(scrollParent);
|
|
4435
|
+
const boundaryOffset = boundary ? offset(boundary) : scrollParentOffset;
|
|
4436
|
+
const viewportOffset = this.getViewportOffset(this.$el);
|
|
4395
4437
|
|
|
4438
|
+
css(this.$el, 'maxWidth', '');
|
|
4439
|
+
const maxWidth = scrollParentOffset.width - 2 * viewportOffset;
|
|
4396
4440
|
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4441
|
+
if (this.align === 'justify') {
|
|
4442
|
+
const prop = this.axis === 'y' ? 'width' : 'height';
|
|
4443
|
+
css(
|
|
4444
|
+
this.$el,
|
|
4445
|
+
prop,
|
|
4446
|
+
Math.min(
|
|
4447
|
+
(boundary ? boundaryOffset : offset(this.target))[prop],
|
|
4448
|
+
scrollParentOffset[prop] - 2 * viewportOffset));
|
|
4400
4449
|
|
|
4401
|
-
update: [
|
|
4402
|
-
{
|
|
4403
|
-
write(_ref) {let { columns } = _ref;
|
|
4404
|
-
toggleClass(this.$el, this.clsStack, columns.length < 2);
|
|
4405
|
-
},
|
|
4406
4450
|
|
|
4407
|
-
|
|
4451
|
+
} else if (this.align === 'stretch') {
|
|
4452
|
+
this.flip = this.axis === 'y' ? 'x' : 'y';
|
|
4453
|
+
this.display = 'static';
|
|
4408
4454
|
|
|
4455
|
+
const viewport = offsetViewport(scrollParent);
|
|
4456
|
+
const targetDim = offset(target);
|
|
4457
|
+
const elOffset = Math.abs(this.getPositionOffset(this.$el)) + viewportOffset;
|
|
4409
4458
|
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4459
|
+
css(this.$el, {
|
|
4460
|
+
width:
|
|
4461
|
+
this.axis === 'y' ?
|
|
4462
|
+
viewport.width :
|
|
4463
|
+
(this.dir === 'left' ?
|
|
4464
|
+
targetDim.left - viewport.left :
|
|
4465
|
+
viewport.right - targetDim.right) - elOffset,
|
|
4466
|
+
height:
|
|
4467
|
+
this.axis === 'x' ?
|
|
4468
|
+
viewport.height :
|
|
4469
|
+
(this.dir === 'top' ?
|
|
4470
|
+
targetDim.top - viewport.top :
|
|
4471
|
+
viewport.bottom - targetDim.bottom) - elOffset });
|
|
4413
4472
|
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
!columns.length ||
|
|
4417
|
-
!this.masonry && !this.parallax ||
|
|
4418
|
-
positionedAbsolute(this.$el))
|
|
4419
|
-
{
|
|
4420
|
-
data.translates = false;
|
|
4421
|
-
return false;
|
|
4473
|
+
} else if (this.$el.offsetWidth > maxWidth) {
|
|
4474
|
+
addClass(this.$el, this.clsDrop + "-stack");
|
|
4422
4475
|
}
|
|
4423
4476
|
|
|
4424
|
-
|
|
4477
|
+
css(this.$el, 'maxWidth', maxWidth);
|
|
4425
4478
|
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
const margin = getMarginTop(nodes, this.margin) * (rows.length - 1);
|
|
4429
|
-
const elHeight = Math.max(...columnHeights) + margin;
|
|
4479
|
+
this.positionAt(this.$el, target, boundary);
|
|
4480
|
+
} } };
|
|
4430
4481
|
|
|
4431
|
-
if (this.masonry) {
|
|
4432
|
-
columns = columns.map((column) => sortBy$1(column, 'offsetTop'));
|
|
4433
|
-
translates = getTranslates(rows, columns);
|
|
4434
|
-
}
|
|
4435
4482
|
|
|
4436
|
-
let padding = Math.abs(this.parallax);
|
|
4437
|
-
if (padding) {
|
|
4438
|
-
padding = columnHeights.reduce(
|
|
4439
|
-
(newPadding, hgt, i) =>
|
|
4440
|
-
Math.max(
|
|
4441
|
-
newPadding,
|
|
4442
|
-
hgt + margin + (i % 2 ? padding : padding / 8) - elHeight),
|
|
4443
4483
|
|
|
4444
|
-
|
|
4484
|
+
function getPositionedElements(el) {
|
|
4485
|
+
const result = [];
|
|
4486
|
+
apply(el, (el) => css(el, 'position') !== 'static' && result.push(el));
|
|
4487
|
+
return result;
|
|
4488
|
+
}
|
|
4445
4489
|
|
|
4446
|
-
|
|
4490
|
+
var formCustom = {
|
|
4491
|
+
mixins: [Class],
|
|
4447
4492
|
|
|
4448
|
-
|
|
4449
|
-
},
|
|
4493
|
+
args: 'target',
|
|
4450
4494
|
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
height !== false && css(this.$el, 'height', height);
|
|
4454
|
-
},
|
|
4495
|
+
props: {
|
|
4496
|
+
target: Boolean },
|
|
4455
4497
|
|
|
4456
|
-
events: ['resize'] },
|
|
4457
4498
|
|
|
4499
|
+
data: {
|
|
4500
|
+
target: false },
|
|
4458
4501
|
|
|
4459
|
-
{
|
|
4460
|
-
read() {
|
|
4461
|
-
if (this.parallax && positionedAbsolute(this.$el)) {
|
|
4462
|
-
return false;
|
|
4463
|
-
}
|
|
4464
4502
|
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4503
|
+
computed: {
|
|
4504
|
+
input(_, $el) {
|
|
4505
|
+
return $(selInput, $el);
|
|
4506
|
+
},
|
|
4469
4507
|
|
|
4508
|
+
state() {
|
|
4509
|
+
return this.input.nextElementSibling;
|
|
4470
4510
|
},
|
|
4471
4511
|
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4512
|
+
target(_ref, $el) {let { target } = _ref;
|
|
4513
|
+
return (
|
|
4514
|
+
target && (
|
|
4515
|
+
target === true && parent(this.input) === $el && this.input.nextElementSibling ||
|
|
4516
|
+
$(target, $el)));
|
|
4476
4517
|
|
|
4477
|
-
|
|
4478
|
-
column.forEach((el, j) =>
|
|
4479
|
-
css(
|
|
4480
|
-
el,
|
|
4481
|
-
'transform',
|
|
4482
|
-
!scrolled && !translates ?
|
|
4483
|
-
'' : "translateY(" + (
|
|
4518
|
+
} },
|
|
4484
4519
|
|
|
4485
|
-
(translates && -translates[i][j]) + (
|
|
4486
|
-
scrolled ? i % 2 ? scrolled : scrolled / 8 : 0)) + "px)")));
|
|
4487
4520
|
|
|
4521
|
+
update() {var _input$files;
|
|
4522
|
+
const { target, input } = this;
|
|
4488
4523
|
|
|
4524
|
+
if (!target) {
|
|
4525
|
+
return;
|
|
4526
|
+
}
|
|
4489
4527
|
|
|
4528
|
+
let option;
|
|
4529
|
+
const prop = isInput(target) ? 'value' : 'textContent';
|
|
4530
|
+
const prev = target[prop];
|
|
4531
|
+
const value = (_input$files = input.files) != null && _input$files[0] ?
|
|
4532
|
+
input.files[0].name :
|
|
4533
|
+
matches(input, 'select') && (
|
|
4534
|
+
option = $$('option', input).filter((el) => el.selected)[0]) // eslint-disable-line prefer-destructuring
|
|
4535
|
+
? option.textContent :
|
|
4536
|
+
input.value;
|
|
4490
4537
|
|
|
4491
|
-
|
|
4538
|
+
if (prev !== value) {
|
|
4539
|
+
target[prop] = value;
|
|
4540
|
+
}
|
|
4541
|
+
},
|
|
4492
4542
|
|
|
4493
|
-
|
|
4543
|
+
events: [
|
|
4544
|
+
{
|
|
4545
|
+
name: 'change',
|
|
4494
4546
|
|
|
4547
|
+
handler() {
|
|
4548
|
+
this.$emit();
|
|
4549
|
+
} },
|
|
4495
4550
|
|
|
4496
4551
|
|
|
4552
|
+
{
|
|
4553
|
+
name: 'reset',
|
|
4497
4554
|
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4555
|
+
el() {
|
|
4556
|
+
return closest(this.$el, 'form');
|
|
4557
|
+
},
|
|
4501
4558
|
|
|
4502
|
-
|
|
4503
|
-
|
|
4559
|
+
handler() {
|
|
4560
|
+
this.$emit();
|
|
4561
|
+
} }] };
|
|
4504
4562
|
|
|
4505
|
-
|
|
4506
|
-
let prev = 0;
|
|
4507
|
-
return elements.map(
|
|
4508
|
-
(element, row) =>
|
|
4509
|
-
prev += row ? rowHeights[row - 1] - elements[row - 1].offsetHeight : 0);
|
|
4510
|
-
|
|
4511
|
-
});
|
|
4512
|
-
}
|
|
4513
|
-
|
|
4514
|
-
function getMarginTop(nodes, cls) {
|
|
4515
|
-
const [node] = nodes.filter((el) => hasClass(el, cls));
|
|
4516
|
-
|
|
4517
|
-
return toFloat(node ? css(node, 'marginTop') : css(nodes[0], 'paddingLeft'));
|
|
4518
|
-
}
|
|
4519
|
-
|
|
4520
|
-
function getColumnHeights(columns) {
|
|
4521
|
-
return columns.map((column) => column.reduce((sum, el) => sum + el.offsetHeight, 0));
|
|
4522
|
-
}
|
|
4523
|
-
|
|
4524
|
-
var heightMatch = {
|
|
4563
|
+
var Margin = {
|
|
4525
4564
|
mixins: [Resize],
|
|
4526
4565
|
|
|
4527
|
-
args: 'target',
|
|
4528
|
-
|
|
4529
4566
|
props: {
|
|
4530
|
-
|
|
4531
|
-
|
|
4567
|
+
margin: String,
|
|
4568
|
+
firstColumn: Boolean },
|
|
4532
4569
|
|
|
4533
4570
|
|
|
4534
4571
|
data: {
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4572
|
+
margin: 'uk-margin-small-top',
|
|
4573
|
+
firstColumn: 'uk-first-column' },
|
|
4538
4574
|
|
|
4539
|
-
computed: {
|
|
4540
|
-
elements: {
|
|
4541
|
-
get(_ref, $el) {let { target } = _ref;
|
|
4542
|
-
return $$(target, $el);
|
|
4543
|
-
},
|
|
4544
4575
|
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4576
|
+
resizeTargets() {
|
|
4577
|
+
return [this.$el, ...toArray(this.$el.children)];
|
|
4578
|
+
},
|
|
4548
4579
|
|
|
4580
|
+
connected() {
|
|
4581
|
+
this.registerObserver(
|
|
4582
|
+
observeMutation(this.$el, () => this.$reset(), {
|
|
4583
|
+
childList: true }));
|
|
4549
4584
|
|
|
4550
4585
|
|
|
4551
|
-
resizeTargets() {
|
|
4552
|
-
return [this.$el, ...this.elements];
|
|
4553
4586
|
},
|
|
4554
4587
|
|
|
4555
4588
|
update: {
|
|
4556
4589
|
read() {
|
|
4590
|
+
const rows = getRows(this.$el.children);
|
|
4591
|
+
|
|
4557
4592
|
return {
|
|
4558
|
-
rows
|
|
4593
|
+
rows,
|
|
4594
|
+
columns: getColumns(rows) };
|
|
4559
4595
|
|
|
4560
4596
|
},
|
|
4561
4597
|
|
|
4562
|
-
write(
|
|
4563
|
-
for (const
|
|
4564
|
-
|
|
4598
|
+
write(_ref) {let { columns, rows } = _ref;
|
|
4599
|
+
for (const row of rows) {
|
|
4600
|
+
for (const column of row) {
|
|
4601
|
+
toggleClass(column, this.margin, rows[0] !== row);
|
|
4602
|
+
toggleClass(column, this.firstColumn, columns[0].includes(column));
|
|
4603
|
+
}
|
|
4565
4604
|
}
|
|
4566
4605
|
},
|
|
4567
4606
|
|
|
@@ -4569,1008 +4608,1066 @@
|
|
|
4569
4608
|
|
|
4570
4609
|
|
|
4571
4610
|
|
|
4572
|
-
function
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
}
|
|
4611
|
+
function getRows(items) {
|
|
4612
|
+
return sortBy(items, 'top', 'bottom');
|
|
4613
|
+
}
|
|
4576
4614
|
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
const max = Math.max(...heights);
|
|
4615
|
+
function getColumns(rows) {
|
|
4616
|
+
const columns = [];
|
|
4580
4617
|
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4618
|
+
for (const row of rows) {
|
|
4619
|
+
const sorted = sortBy(row, 'left', 'right');
|
|
4620
|
+
for (let j = 0; j < sorted.length; j++) {
|
|
4621
|
+
columns[j] = columns[j] ? columns[j].concat(sorted[j]) : sorted[j];
|
|
4622
|
+
}
|
|
4623
|
+
}
|
|
4584
4624
|
|
|
4625
|
+
return isRtl ? columns.reverse() : columns;
|
|
4585
4626
|
}
|
|
4586
4627
|
|
|
4587
|
-
function
|
|
4588
|
-
|
|
4589
|
-
if (!isVisible(element)) {
|
|
4590
|
-
style = element.style.display;
|
|
4591
|
-
css(element, 'display', 'block', 'important');
|
|
4592
|
-
}
|
|
4628
|
+
function sortBy(items, startProp, endProp) {
|
|
4629
|
+
const sorted = [[]];
|
|
4593
4630
|
|
|
4594
|
-
const
|
|
4631
|
+
for (const el of items) {
|
|
4632
|
+
if (!isVisible(el)) {
|
|
4633
|
+
continue;
|
|
4634
|
+
}
|
|
4595
4635
|
|
|
4596
|
-
|
|
4597
|
-
css(element, 'display', style);
|
|
4598
|
-
}
|
|
4636
|
+
let dim = getOffset(el);
|
|
4599
4637
|
|
|
4600
|
-
|
|
4601
|
-
|
|
4638
|
+
for (let i = sorted.length - 1; i >= 0; i--) {
|
|
4639
|
+
const current = sorted[i];
|
|
4602
4640
|
|
|
4603
|
-
|
|
4604
|
-
|
|
4641
|
+
if (!current[0]) {
|
|
4642
|
+
current.push(el);
|
|
4643
|
+
break;
|
|
4644
|
+
}
|
|
4605
4645
|
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4646
|
+
let startDim;
|
|
4647
|
+
if (current[0].offsetParent === el.offsetParent) {
|
|
4648
|
+
startDim = getOffset(current[0]);
|
|
4649
|
+
} else {
|
|
4650
|
+
dim = getOffset(el, true);
|
|
4651
|
+
startDim = getOffset(current[0], true);
|
|
4652
|
+
}
|
|
4611
4653
|
|
|
4654
|
+
if (dim[startProp] >= startDim[endProp] - 1 && dim[startProp] !== startDim[startProp]) {
|
|
4655
|
+
sorted.push([el]);
|
|
4656
|
+
break;
|
|
4657
|
+
}
|
|
4612
4658
|
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
minHeight: 0 },
|
|
4659
|
+
if (dim[endProp] - 1 > startDim[startProp] || dim[startProp] === startDim[startProp]) {
|
|
4660
|
+
current.push(el);
|
|
4661
|
+
break;
|
|
4662
|
+
}
|
|
4618
4663
|
|
|
4664
|
+
if (i === 0) {
|
|
4665
|
+
sorted.unshift([el]);
|
|
4666
|
+
break;
|
|
4667
|
+
}
|
|
4668
|
+
}
|
|
4669
|
+
}
|
|
4619
4670
|
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
return [this.$el, ...scrollParents(this.$el, /auto|scroll/)];
|
|
4623
|
-
},
|
|
4671
|
+
return sorted;
|
|
4672
|
+
}
|
|
4624
4673
|
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
if (!isVisible(this.$el)) {
|
|
4628
|
-
return false;
|
|
4629
|
-
}
|
|
4674
|
+
function getOffset(element, offset) {if (offset === void 0) {offset = false;}
|
|
4675
|
+
let { offsetTop, offsetLeft, offsetHeight, offsetWidth } = element;
|
|
4630
4676
|
|
|
4631
|
-
|
|
4632
|
-
|
|
4677
|
+
if (offset) {
|
|
4678
|
+
[offsetTop, offsetLeft] = offsetPosition(element);
|
|
4679
|
+
}
|
|
4633
4680
|
|
|
4634
|
-
|
|
4635
|
-
|
|
4681
|
+
return {
|
|
4682
|
+
top: offsetTop,
|
|
4683
|
+
left: offsetLeft,
|
|
4684
|
+
bottom: offsetTop + offsetHeight,
|
|
4685
|
+
right: offsetLeft + offsetWidth };
|
|
4636
4686
|
|
|
4637
|
-
|
|
4638
|
-
minHeight = Math.max(
|
|
4639
|
-
viewportHeight - (
|
|
4640
|
-
dimensions$1(scrollElement).height - dimensions$1(this.$el).height) -
|
|
4641
|
-
box,
|
|
4642
|
-
0);
|
|
4687
|
+
}
|
|
4643
4688
|
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4689
|
+
var Scroll = {
|
|
4690
|
+
connected() {
|
|
4691
|
+
registerScrollListener(this._uid, () => this.$emit('scroll'));
|
|
4692
|
+
},
|
|
4648
4693
|
|
|
4694
|
+
disconnected() {
|
|
4695
|
+
unregisterScrollListener(this._uid);
|
|
4696
|
+
} };
|
|
4649
4697
|
|
|
4650
|
-
if (this.offsetTop) {
|
|
4651
|
-
const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
|
|
4652
|
-
minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
|
|
4653
|
-
}
|
|
4654
4698
|
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
}
|
|
4699
|
+
const scrollListeners = new Map();
|
|
4700
|
+
let unbindScrollListener;
|
|
4701
|
+
function registerScrollListener(id, listener) {
|
|
4702
|
+
unbindScrollListener =
|
|
4703
|
+
unbindScrollListener ||
|
|
4704
|
+
on(window, 'scroll', () => scrollListeners.forEach((listener) => listener()), {
|
|
4705
|
+
passive: true,
|
|
4706
|
+
capture: true });
|
|
4664
4707
|
|
|
4665
|
-
minHeight += (box ? " - " + box + "px" : '') + ")";
|
|
4666
|
-
}
|
|
4667
4708
|
|
|
4668
|
-
|
|
4669
|
-
|
|
4709
|
+
scrollListeners.set(id, listener);
|
|
4710
|
+
}
|
|
4670
4711
|
|
|
4671
|
-
|
|
4672
|
-
|
|
4712
|
+
function unregisterScrollListener(id) {
|
|
4713
|
+
scrollListeners.delete(id);
|
|
4714
|
+
if (unbindScrollListener && !scrollListeners.size) {
|
|
4715
|
+
unbindScrollListener();
|
|
4716
|
+
unbindScrollListener = null;
|
|
4717
|
+
}
|
|
4718
|
+
}
|
|
4673
4719
|
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
}
|
|
4677
|
-
},
|
|
4720
|
+
var grid = {
|
|
4721
|
+
extends: Margin,
|
|
4678
4722
|
|
|
4679
|
-
|
|
4723
|
+
mixins: [Class, Scroll],
|
|
4680
4724
|
|
|
4681
|
-
|
|
4682
|
-
args: 'src',
|
|
4725
|
+
name: 'grid',
|
|
4683
4726
|
|
|
4684
4727
|
props: {
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
src: String,
|
|
4688
|
-
style: String,
|
|
4689
|
-
width: Number,
|
|
4690
|
-
height: Number,
|
|
4691
|
-
ratio: Number,
|
|
4692
|
-
class: String,
|
|
4693
|
-
strokeAnimation: Boolean,
|
|
4694
|
-
focusable: Boolean, // IE 11
|
|
4695
|
-
attributes: 'list' },
|
|
4728
|
+
masonry: Boolean,
|
|
4729
|
+
parallax: Number },
|
|
4696
4730
|
|
|
4697
4731
|
|
|
4698
4732
|
data: {
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4733
|
+
margin: 'uk-grid-margin',
|
|
4734
|
+
clsStack: 'uk-grid-stack',
|
|
4735
|
+
masonry: false,
|
|
4736
|
+
parallax: 0 },
|
|
4704
4737
|
|
|
4705
|
-
beforeConnect() {
|
|
4706
|
-
this.class += ' uk-svg';
|
|
4707
|
-
},
|
|
4708
4738
|
|
|
4709
4739
|
connected() {
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
}
|
|
4740
|
+
this.masonry && addClass(this.$el, 'uk-flex-top uk-flex-wrap-top');
|
|
4741
|
+
},
|
|
4713
4742
|
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4743
|
+
update: [
|
|
4744
|
+
{
|
|
4745
|
+
write(_ref) {let { columns } = _ref;
|
|
4746
|
+
toggleClass(this.$el, this.clsStack, columns.length < 2);
|
|
4747
|
+
},
|
|
4717
4748
|
|
|
4718
|
-
|
|
4719
|
-
remove$1(this.svgEl);
|
|
4720
|
-
}
|
|
4749
|
+
events: ['resize'] },
|
|
4721
4750
|
|
|
4722
|
-
this.applyAttributes(svg, el);
|
|
4723
4751
|
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4752
|
+
{
|
|
4753
|
+
read(data) {
|
|
4754
|
+
let { columns, rows } = data;
|
|
4727
4755
|
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4756
|
+
// Filter component makes elements positioned absolute
|
|
4757
|
+
if (
|
|
4758
|
+
!columns.length ||
|
|
4759
|
+
!this.masonry && !this.parallax ||
|
|
4760
|
+
positionedAbsolute(this.$el))
|
|
4761
|
+
{
|
|
4762
|
+
data.translates = false;
|
|
4763
|
+
return false;
|
|
4764
|
+
}
|
|
4737
4765
|
|
|
4738
|
-
|
|
4739
|
-
});
|
|
4740
|
-
}
|
|
4741
|
-
},
|
|
4766
|
+
let translates = false;
|
|
4742
4767
|
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
}
|
|
4768
|
+
const nodes = children(this.$el);
|
|
4769
|
+
const columnHeights = getColumnHeights(columns);
|
|
4770
|
+
const margin = getMarginTop(nodes, this.margin) * (rows.length - 1);
|
|
4771
|
+
const elHeight = Math.max(...columnHeights) + margin;
|
|
4748
4772
|
|
|
4749
|
-
if (
|
|
4750
|
-
|
|
4773
|
+
if (this.masonry) {
|
|
4774
|
+
columns = columns.map((column) => sortBy$1(column, 'offsetTop'));
|
|
4775
|
+
translates = getTranslates(rows, columns);
|
|
4751
4776
|
}
|
|
4752
4777
|
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4778
|
+
let padding = Math.abs(this.parallax);
|
|
4779
|
+
if (padding) {
|
|
4780
|
+
padding = columnHeights.reduce(
|
|
4781
|
+
(newPadding, hgt, i) =>
|
|
4782
|
+
Math.max(
|
|
4783
|
+
newPadding,
|
|
4784
|
+
hgt + margin + (i % 2 ? padding : padding / 8) - elHeight),
|
|
4759
4785
|
|
|
4760
|
-
|
|
4761
|
-
async getSvg() {
|
|
4762
|
-
if (isTag(this.$el, 'img') && !this.$el.complete && this.$el.loading === 'lazy') {
|
|
4763
|
-
return new Promise((resolve) =>
|
|
4764
|
-
once(this.$el, 'load', () => resolve(this.getSvg())));
|
|
4786
|
+
0);
|
|
4765
4787
|
|
|
4766
4788
|
}
|
|
4767
4789
|
|
|
4768
|
-
return
|
|
4790
|
+
return { padding, columns, translates, height: translates ? elHeight : '' };
|
|
4769
4791
|
},
|
|
4770
4792
|
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
}
|
|
4776
|
-
}
|
|
4777
|
-
|
|
4778
|
-
for (const attribute in this.attributes) {
|
|
4779
|
-
const [prop, value] = this.attributes[attribute].split(':', 2);
|
|
4780
|
-
attr(el, prop, value);
|
|
4781
|
-
}
|
|
4793
|
+
write(_ref2) {let { height, padding } = _ref2;
|
|
4794
|
+
css(this.$el, 'paddingBottom', padding || '');
|
|
4795
|
+
height !== false && css(this.$el, 'height', height);
|
|
4796
|
+
},
|
|
4782
4797
|
|
|
4783
|
-
|
|
4784
|
-
removeAttr(el, 'id');
|
|
4785
|
-
}
|
|
4798
|
+
events: ['resize'] },
|
|
4786
4799
|
|
|
4787
|
-
const props = ['width', 'height'];
|
|
4788
|
-
let dimensions = props.map((prop) => this[prop]);
|
|
4789
4800
|
|
|
4790
|
-
|
|
4791
|
-
|
|
4801
|
+
{
|
|
4802
|
+
read() {
|
|
4803
|
+
if (this.parallax && positionedAbsolute(this.$el)) {
|
|
4804
|
+
return false;
|
|
4792
4805
|
}
|
|
4793
4806
|
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4807
|
+
return {
|
|
4808
|
+
scrolled: this.parallax ?
|
|
4809
|
+
scrolledOver(this.$el) * Math.abs(this.parallax) :
|
|
4810
|
+
false };
|
|
4798
4811
|
|
|
4799
|
-
|
|
4800
|
-
} } };
|
|
4812
|
+
},
|
|
4801
4813
|
|
|
4814
|
+
write(_ref3) {let { columns, scrolled, translates } = _ref3;
|
|
4815
|
+
if (scrolled === false && !translates) {
|
|
4816
|
+
return;
|
|
4817
|
+
}
|
|
4802
4818
|
|
|
4819
|
+
columns.forEach((column, i) =>
|
|
4820
|
+
column.forEach((el, j) =>
|
|
4821
|
+
css(
|
|
4822
|
+
el,
|
|
4823
|
+
'transform',
|
|
4824
|
+
!scrolled && !translates ?
|
|
4825
|
+
'' : "translateY(" + (
|
|
4803
4826
|
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
if (startsWith(src, 'data:')) {
|
|
4807
|
-
return decodeURIComponent(src.split(',')[1]);
|
|
4808
|
-
} else {
|
|
4809
|
-
return (await fetch(src)).text();
|
|
4810
|
-
}
|
|
4811
|
-
} else {
|
|
4812
|
-
return Promise.reject();
|
|
4813
|
-
}
|
|
4814
|
-
});
|
|
4827
|
+
(translates && -translates[i][j]) + (
|
|
4828
|
+
scrolled ? i % 2 ? scrolled : scrolled / 8 : 0)) + "px)")));
|
|
4815
4829
|
|
|
4816
|
-
function parseSVG(svg, icon) {var _svg;
|
|
4817
|
-
if (icon && includes(svg, '<symbol')) {
|
|
4818
|
-
svg = parseSymbols(svg, icon) || svg;
|
|
4819
|
-
}
|
|
4820
4830
|
|
|
4821
|
-
svg = $(svg.substr(svg.indexOf('<svg')));
|
|
4822
|
-
return ((_svg = svg) == null ? void 0 : _svg.hasChildNodes()) && svg;
|
|
4823
|
-
}
|
|
4824
4831
|
|
|
4825
|
-
const symbolRe = /<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g;
|
|
4826
|
-
const symbols = {};
|
|
4827
4832
|
|
|
4828
|
-
|
|
4829
|
-
if (!symbols[svg]) {
|
|
4830
|
-
symbols[svg] = {};
|
|
4833
|
+
},
|
|
4831
4834
|
|
|
4832
|
-
|
|
4835
|
+
events: ['scroll', 'resize'] }] };
|
|
4833
4836
|
|
|
4834
|
-
let match;
|
|
4835
|
-
while (match = symbolRe.exec(svg)) {
|
|
4836
|
-
symbols[svg][match[3]] = "<svg xmlns=\"http://www.w3.org/2000/svg\"" + match[1] + "svg>";
|
|
4837
|
-
}
|
|
4838
|
-
}
|
|
4839
4837
|
|
|
4840
|
-
return symbols[svg][icon];
|
|
4841
|
-
}
|
|
4842
4838
|
|
|
4843
|
-
function applyAnimation(el) {
|
|
4844
|
-
const length = getMaxPathLength(el);
|
|
4845
4839
|
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
}
|
|
4840
|
+
function positionedAbsolute(el) {
|
|
4841
|
+
return children(el).some((el) => css(el, 'position') === 'absolute');
|
|
4849
4842
|
}
|
|
4850
4843
|
|
|
4851
|
-
function
|
|
4852
|
-
|
|
4853
|
-
Math.max(
|
|
4854
|
-
0,
|
|
4855
|
-
...$$('[stroke]', el).map((stroke) => {
|
|
4856
|
-
try {
|
|
4857
|
-
return stroke.getTotalLength();
|
|
4858
|
-
} catch (e) {
|
|
4859
|
-
return 0;
|
|
4860
|
-
}
|
|
4861
|
-
})));
|
|
4844
|
+
function getTranslates(rows, columns) {
|
|
4845
|
+
const rowHeights = rows.map((row) => Math.max(...row.map((el) => el.offsetHeight)));
|
|
4862
4846
|
|
|
4847
|
+
return columns.map((elements) => {
|
|
4848
|
+
let prev = 0;
|
|
4849
|
+
return elements.map(
|
|
4850
|
+
(element, row) =>
|
|
4851
|
+
prev += row ? rowHeights[row - 1] - elements[row - 1].offsetHeight : 0);
|
|
4863
4852
|
|
|
4853
|
+
});
|
|
4864
4854
|
}
|
|
4865
4855
|
|
|
4866
|
-
function
|
|
4867
|
-
|
|
4868
|
-
root.hidden = true;
|
|
4869
|
-
|
|
4870
|
-
const next = root.nextElementSibling;
|
|
4871
|
-
return equals(el, next) ? next : after(root, el);
|
|
4872
|
-
}
|
|
4856
|
+
function getMarginTop(nodes, cls) {
|
|
4857
|
+
const [node] = nodes.filter((el) => hasClass(el, cls));
|
|
4873
4858
|
|
|
4874
|
-
|
|
4875
|
-
return equals(el, last) ? last : append(root, el);
|
|
4859
|
+
return toFloat(node ? css(node, 'marginTop') : css(nodes[0], 'paddingLeft'));
|
|
4876
4860
|
}
|
|
4877
4861
|
|
|
4878
|
-
function
|
|
4879
|
-
return
|
|
4862
|
+
function getColumnHeights(columns) {
|
|
4863
|
+
return columns.map((column) => column.reduce((sum, el) => sum + el.offsetHeight, 0));
|
|
4880
4864
|
}
|
|
4881
4865
|
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
el.innerHTML ||
|
|
4885
|
-
new XMLSerializer().serializeToString(el).replace(/<svg.*?>(.*?)<\/svg>/g, '$1')).
|
|
4886
|
-
replace(/\s/g, '');
|
|
4887
|
-
}
|
|
4866
|
+
var heightMatch = {
|
|
4867
|
+
mixins: [Resize],
|
|
4888
4868
|
|
|
4889
|
-
|
|
4869
|
+
args: 'target',
|
|
4890
4870
|
|
|
4891
|
-
|
|
4871
|
+
props: {
|
|
4872
|
+
target: String,
|
|
4873
|
+
row: Boolean },
|
|
4892
4874
|
|
|
4893
|
-
var marker = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"9\" y=\"4\" width=\"1\" height=\"11\"/><rect x=\"4\" y=\"9\" width=\"11\" height=\"1\"/></svg>";
|
|
4894
4875
|
|
|
4895
|
-
|
|
4876
|
+
data: {
|
|
4877
|
+
target: '> *',
|
|
4878
|
+
row: true },
|
|
4896
4879
|
|
|
4897
|
-
var overlayIcon = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"19\" y=\"0\" width=\"1\" height=\"40\"/><rect x=\"0\" y=\"19\" width=\"40\" height=\"1\"/></svg>";
|
|
4898
4880
|
|
|
4899
|
-
|
|
4881
|
+
computed: {
|
|
4882
|
+
elements: {
|
|
4883
|
+
get(_ref, $el) {let { target } = _ref;
|
|
4884
|
+
return $$(target, $el);
|
|
4885
|
+
},
|
|
4900
4886
|
|
|
4901
|
-
|
|
4887
|
+
watch() {
|
|
4888
|
+
this.$reset();
|
|
4889
|
+
} } },
|
|
4902
4890
|
|
|
4903
|
-
var searchIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"9\" cy=\"9\" r=\"7\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M14,14 L18,18 L14,14 Z\"/></svg>";
|
|
4904
4891
|
|
|
4905
|
-
var searchLarge = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.8\" cx=\"17.5\" cy=\"17.5\" r=\"16.5\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.8\" x1=\"38\" y1=\"39\" x2=\"29\" y2=\"30\"/></svg>";
|
|
4906
4892
|
|
|
4907
|
-
|
|
4893
|
+
resizeTargets() {
|
|
4894
|
+
return [this.$el, ...this.elements];
|
|
4895
|
+
},
|
|
4908
4896
|
|
|
4909
|
-
|
|
4897
|
+
update: {
|
|
4898
|
+
read() {
|
|
4899
|
+
return {
|
|
4900
|
+
rows: (this.row ? getRows(this.elements) : [this.elements]).map(match$1) };
|
|
4910
4901
|
|
|
4911
|
-
|
|
4902
|
+
},
|
|
4912
4903
|
|
|
4913
|
-
|
|
4904
|
+
write(_ref2) {let { rows } = _ref2;
|
|
4905
|
+
for (const { heights, elements } of rows) {
|
|
4906
|
+
elements.forEach((el, i) => css(el, 'minHeight', heights[i]));
|
|
4907
|
+
}
|
|
4908
|
+
},
|
|
4914
4909
|
|
|
4915
|
-
|
|
4910
|
+
events: ['resize'] } };
|
|
4916
4911
|
|
|
4917
|
-
var spinner = "<svg width=\"30\" height=\"30\" viewBox=\"0 0 30 30\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" cx=\"15\" cy=\"15\" r=\"14\"/></svg>";
|
|
4918
4912
|
|
|
4919
|
-
var totop = "<svg width=\"18\" height=\"10\" viewBox=\"0 0 18 10\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" points=\"1 9 9 1 17 9 \"/></svg>";
|
|
4920
4913
|
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
'close-icon': closeIcon,
|
|
4926
|
-
'close-large': closeLarge,
|
|
4927
|
-
'navbar-toggle-icon': navbarToggleIcon,
|
|
4928
|
-
'overlay-icon': overlayIcon,
|
|
4929
|
-
'pagination-next': paginationNext,
|
|
4930
|
-
'pagination-previous': paginationPrevious,
|
|
4931
|
-
'search-icon': searchIcon,
|
|
4932
|
-
'search-large': searchLarge,
|
|
4933
|
-
'search-navbar': searchNavbar,
|
|
4934
|
-
'slidenav-next': slidenavNext,
|
|
4935
|
-
'slidenav-next-large': slidenavNextLarge,
|
|
4936
|
-
'slidenav-previous': slidenavPrevious,
|
|
4937
|
-
'slidenav-previous-large': slidenavPreviousLarge };
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
const Icon = {
|
|
4941
|
-
install: install$3,
|
|
4942
|
-
|
|
4943
|
-
extends: SVG,
|
|
4944
|
-
|
|
4945
|
-
args: 'icon',
|
|
4914
|
+
function match$1(elements) {
|
|
4915
|
+
if (elements.length < 2) {
|
|
4916
|
+
return { heights: [''], elements };
|
|
4917
|
+
}
|
|
4946
4918
|
|
|
4947
|
-
|
|
4919
|
+
css(elements, 'minHeight', '');
|
|
4920
|
+
let heights = elements.map(getHeight);
|
|
4921
|
+
const max = Math.max(...heights);
|
|
4948
4922
|
|
|
4949
|
-
|
|
4950
|
-
|
|
4923
|
+
return {
|
|
4924
|
+
heights: elements.map((el, i) => heights[i].toFixed(2) === max.toFixed(2) ? '' : max),
|
|
4925
|
+
elements };
|
|
4951
4926
|
|
|
4927
|
+
}
|
|
4952
4928
|
|
|
4953
|
-
|
|
4929
|
+
function getHeight(element) {
|
|
4930
|
+
let style = false;
|
|
4931
|
+
if (!isVisible(element)) {
|
|
4932
|
+
style = element.style.display;
|
|
4933
|
+
css(element, 'display', 'block', 'important');
|
|
4934
|
+
}
|
|
4954
4935
|
|
|
4955
|
-
|
|
4956
|
-
addClass(this.$el, 'uk-icon');
|
|
4957
|
-
},
|
|
4936
|
+
const height = dimensions$1(element).height - boxModelAdjust(element, 'height', 'content-box');
|
|
4958
4937
|
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4938
|
+
if (style !== false) {
|
|
4939
|
+
css(element, 'display', style);
|
|
4940
|
+
}
|
|
4962
4941
|
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
}
|
|
4942
|
+
return height;
|
|
4943
|
+
}
|
|
4966
4944
|
|
|
4967
|
-
|
|
4968
|
-
|
|
4945
|
+
var heightViewport = {
|
|
4946
|
+
mixins: [Resize],
|
|
4969
4947
|
|
|
4970
|
-
|
|
4971
|
-
|
|
4948
|
+
props: {
|
|
4949
|
+
expand: Boolean,
|
|
4950
|
+
offsetTop: Boolean,
|
|
4951
|
+
offsetBottom: Boolean,
|
|
4952
|
+
minHeight: Number },
|
|
4972
4953
|
|
|
4973
|
-
extends: Icon,
|
|
4974
4954
|
|
|
4975
|
-
data:
|
|
4976
|
-
|
|
4955
|
+
data: {
|
|
4956
|
+
expand: false,
|
|
4957
|
+
offsetTop: false,
|
|
4958
|
+
offsetBottom: false,
|
|
4959
|
+
minHeight: 0 },
|
|
4977
4960
|
|
|
4978
4961
|
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4962
|
+
resizeTargets() {
|
|
4963
|
+
// check for offsetTop change
|
|
4964
|
+
return [this.$el, ...scrollParents(this.$el, /auto|scroll/)];
|
|
4965
|
+
},
|
|
4983
4966
|
|
|
4984
|
-
|
|
4985
|
-
|
|
4967
|
+
update: {
|
|
4968
|
+
read(_ref) {let { minHeight: prev } = _ref;
|
|
4969
|
+
if (!isVisible(this.$el)) {
|
|
4970
|
+
return false;
|
|
4971
|
+
}
|
|
4986
4972
|
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
const icon = this.$props.icon;
|
|
4990
|
-
this.icon = hasClass(this.$el, 'uk-slidenav-large') ? icon + "-large" : icon;
|
|
4991
|
-
} };
|
|
4973
|
+
let minHeight = '';
|
|
4974
|
+
const box = boxModelAdjust(this.$el, 'height', 'content-box');
|
|
4992
4975
|
|
|
4976
|
+
const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
|
|
4977
|
+
const { height: viewportHeight } = offsetViewport(scrollElement);
|
|
4993
4978
|
|
|
4994
|
-
|
|
4995
|
-
|
|
4979
|
+
if (this.expand) {
|
|
4980
|
+
minHeight = Math.max(
|
|
4981
|
+
viewportHeight - (
|
|
4982
|
+
dimensions$1(scrollElement).height - dimensions$1(this.$el).height) -
|
|
4983
|
+
box,
|
|
4984
|
+
0);
|
|
4996
4985
|
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
parents(this.$el, '.uk-search-navbar').length ?
|
|
5002
|
-
'search-navbar' :
|
|
5003
|
-
this.$props.icon;
|
|
5004
|
-
} };
|
|
4986
|
+
} else {
|
|
4987
|
+
const { body, scrollingElement } = document;
|
|
4988
|
+
const isScrollingElement =
|
|
4989
|
+
scrollingElement === scrollElement || body === scrollElement;
|
|
5005
4990
|
|
|
4991
|
+
// on mobile devices (iOS and Android) window.innerHeight !== 100vh
|
|
4992
|
+
minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
|
|
5006
4993
|
|
|
5007
|
-
|
|
5008
|
-
|
|
4994
|
+
if (this.offsetTop) {
|
|
4995
|
+
if (isScrollingElement) {
|
|
4996
|
+
const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
|
|
4997
|
+
minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
|
|
4998
|
+
} else {
|
|
4999
|
+
minHeight += " - " + css(scrollElement, 'paddingTop');
|
|
5000
|
+
}
|
|
5001
|
+
}
|
|
5009
5002
|
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5003
|
+
if (this.offsetBottom === true) {
|
|
5004
|
+
minHeight += " - " + dimensions$1(this.$el.nextElementSibling).height + "px";
|
|
5005
|
+
} else if (isNumeric(this.offsetBottom)) {
|
|
5006
|
+
minHeight += " - " + this.offsetBottom + "vh";
|
|
5007
|
+
} else if (this.offsetBottom && endsWith(this.offsetBottom, 'px')) {
|
|
5008
|
+
minHeight += " - " + toFloat(this.offsetBottom) + "px";
|
|
5009
|
+
} else if (isString(this.offsetBottom)) {
|
|
5010
|
+
minHeight += " - " + dimensions$1(query(this.offsetBottom, this.$el)).height + "px";
|
|
5011
|
+
}
|
|
5013
5012
|
|
|
5013
|
+
minHeight += (box ? " - " + box + "px" : '') + ")";
|
|
5014
|
+
}
|
|
5014
5015
|
|
|
5015
|
-
|
|
5016
|
-
|
|
5016
|
+
return { minHeight, prev };
|
|
5017
|
+
},
|
|
5017
5018
|
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
const icon = await Icon.methods.getSvg.call(this);
|
|
5019
|
+
write(_ref2) {let { minHeight } = _ref2;
|
|
5020
|
+
css(this.$el, { minHeight });
|
|
5021
5021
|
|
|
5022
|
-
if (this.
|
|
5023
|
-
css(
|
|
5022
|
+
if (this.minHeight && toFloat(css(this.$el, 'minHeight')) < this.minHeight) {
|
|
5023
|
+
css(this.$el, 'minHeight', this.minHeight);
|
|
5024
5024
|
}
|
|
5025
|
+
},
|
|
5025
5026
|
|
|
5026
|
-
|
|
5027
|
-
} } };
|
|
5027
|
+
events: ['resize'] } };
|
|
5028
5028
|
|
|
5029
|
+
var SVG = {
|
|
5030
|
+
args: 'src',
|
|
5029
5031
|
|
|
5032
|
+
props: {
|
|
5033
|
+
id: Boolean,
|
|
5034
|
+
icon: String,
|
|
5035
|
+
src: String,
|
|
5036
|
+
style: String,
|
|
5037
|
+
width: Number,
|
|
5038
|
+
height: Number,
|
|
5039
|
+
ratio: Number,
|
|
5040
|
+
class: String,
|
|
5041
|
+
strokeAnimation: Boolean,
|
|
5042
|
+
focusable: Boolean, // IE 11
|
|
5043
|
+
attributes: 'list' },
|
|
5030
5044
|
|
|
5031
|
-
const parsed = {};
|
|
5032
|
-
function install$3(UIkit) {
|
|
5033
|
-
UIkit.icon.add = (name, svg) => {
|
|
5034
|
-
const added = isString(name) ? { [name]: svg } : name;
|
|
5035
|
-
each(added, (svg, name) => {
|
|
5036
|
-
icons[name] = svg;
|
|
5037
|
-
delete parsed[name];
|
|
5038
|
-
});
|
|
5039
5045
|
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5046
|
+
data: {
|
|
5047
|
+
ratio: 1,
|
|
5048
|
+
include: ['style', 'class', 'focusable'],
|
|
5049
|
+
class: '',
|
|
5050
|
+
strokeAnimation: false },
|
|
5045
5051
|
|
|
5046
|
-
}
|
|
5047
|
-
};
|
|
5048
|
-
}
|
|
5049
5052
|
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
}
|
|
5053
|
+
beforeConnect() {
|
|
5054
|
+
this.class += ' uk-svg';
|
|
5055
|
+
},
|
|
5054
5056
|
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5057
|
+
connected() {
|
|
5058
|
+
if (!this.icon && includes(this.src, '#')) {
|
|
5059
|
+
[this.src, this.icon] = this.src.split('#');
|
|
5060
|
+
}
|
|
5058
5061
|
|
|
5059
|
-
|
|
5060
|
-
|
|
5062
|
+
this.svg = this.getSvg().then((el) => {
|
|
5063
|
+
if (this._connected) {
|
|
5064
|
+
const svg = insertSVG(el, this.$el);
|
|
5061
5065
|
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5066
|
+
if (this.svgEl && svg !== this.svgEl) {
|
|
5067
|
+
remove$1(this.svgEl);
|
|
5068
|
+
}
|
|
5065
5069
|
|
|
5066
|
-
|
|
5070
|
+
this.applyAttributes(svg, el);
|
|
5067
5071
|
|
|
5068
|
-
|
|
5069
|
-
|
|
5072
|
+
return this.svgEl = svg;
|
|
5073
|
+
}
|
|
5074
|
+
}, noop);
|
|
5070
5075
|
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5076
|
+
if (this.strokeAnimation) {
|
|
5077
|
+
this.svg.then((el) => {
|
|
5078
|
+
if (this._connected) {
|
|
5079
|
+
applyAnimation(el);
|
|
5080
|
+
this.registerObserver(
|
|
5081
|
+
observeIntersection(el, (records, observer) => {
|
|
5082
|
+
applyAnimation(el);
|
|
5083
|
+
observer.disconnect();
|
|
5084
|
+
}));
|
|
5078
5085
|
|
|
5086
|
+
}
|
|
5087
|
+
});
|
|
5088
|
+
}
|
|
5089
|
+
},
|
|
5079
5090
|
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
target: false,
|
|
5086
|
-
loading: 'lazy' },
|
|
5091
|
+
disconnected() {
|
|
5092
|
+
this.svg.then((svg) => {
|
|
5093
|
+
if (this._connected) {
|
|
5094
|
+
return;
|
|
5095
|
+
}
|
|
5087
5096
|
|
|
5097
|
+
if (isVoidElement(this.$el)) {
|
|
5098
|
+
this.$el.hidden = false;
|
|
5099
|
+
}
|
|
5088
5100
|
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
return;
|
|
5093
|
-
}
|
|
5101
|
+
remove$1(svg);
|
|
5102
|
+
this.svgEl = null;
|
|
5103
|
+
});
|
|
5094
5104
|
|
|
5095
|
-
|
|
5105
|
+
this.svg = null;
|
|
5106
|
+
},
|
|
5096
5107
|
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5108
|
+
methods: {
|
|
5109
|
+
async getSvg() {
|
|
5110
|
+
if (isTag(this.$el, 'img') && !this.$el.complete && this.$el.loading === 'lazy') {
|
|
5111
|
+
return new Promise((resolve) =>
|
|
5112
|
+
once(this.$el, 'load', () => resolve(this.getSvg())));
|
|
5100
5113
|
|
|
5101
|
-
if (target.length === 1) {
|
|
5102
|
-
return;
|
|
5103
5114
|
}
|
|
5104
|
-
}
|
|
5105
|
-
|
|
5106
|
-
ensureSrcAttribute(this.$el);
|
|
5107
5115
|
|
|
5108
|
-
|
|
5109
|
-
observeIntersection(
|
|
5110
|
-
target,
|
|
5111
|
-
(entries, observer) => {
|
|
5112
|
-
this.load();
|
|
5113
|
-
observer.disconnect();
|
|
5116
|
+
return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject('SVG not found.');
|
|
5114
5117
|
},
|
|
5115
|
-
{
|
|
5116
|
-
rootMargin: toPx(this.offsetTop, 'height') + "px " + toPx(
|
|
5117
|
-
this.offsetLeft,
|
|
5118
|
-
'width') + "px" }));
|
|
5119
|
-
|
|
5120
5118
|
|
|
5119
|
+
applyAttributes(el, ref) {
|
|
5120
|
+
for (const prop in this.$options.props) {
|
|
5121
|
+
if (includes(this.include, prop) && prop in this) {
|
|
5122
|
+
attr(el, prop, this[prop]);
|
|
5123
|
+
}
|
|
5124
|
+
}
|
|
5121
5125
|
|
|
5126
|
+
for (const attribute in this.attributes) {
|
|
5127
|
+
const [prop, value] = this.attributes[attribute].split(':', 2);
|
|
5128
|
+
attr(el, prop, value);
|
|
5129
|
+
}
|
|
5122
5130
|
|
|
5123
|
-
|
|
5131
|
+
if (!this.id) {
|
|
5132
|
+
removeAttr(el, 'id');
|
|
5133
|
+
}
|
|
5124
5134
|
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
this._data.image.onload = '';
|
|
5128
|
-
}
|
|
5129
|
-
},
|
|
5135
|
+
const props = ['width', 'height'];
|
|
5136
|
+
let dimensions = props.map((prop) => this[prop]);
|
|
5130
5137
|
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
if (this._data.image) {
|
|
5134
|
-
return this._data.image;
|
|
5138
|
+
if (!dimensions.some((val) => val)) {
|
|
5139
|
+
dimensions = props.map((prop) => attr(ref, prop));
|
|
5135
5140
|
}
|
|
5136
5141
|
|
|
5137
|
-
const
|
|
5138
|
-
|
|
5139
|
-
|
|
5142
|
+
const viewBox = attr(ref, 'viewBox');
|
|
5143
|
+
if (viewBox && !dimensions.some((val) => val)) {
|
|
5144
|
+
dimensions = viewBox.split(' ').slice(2);
|
|
5145
|
+
}
|
|
5140
5146
|
|
|
5141
|
-
|
|
5142
|
-
setSrcAttrs(this.$el, image.currentSrc);
|
|
5143
|
-
return this._data.image = image;
|
|
5147
|
+
dimensions.forEach((val, i) => attr(el, props[i], toFloat(val) * this.ratio || null));
|
|
5144
5148
|
} } };
|
|
5145
5149
|
|
|
5146
5150
|
|
|
5147
5151
|
|
|
5148
|
-
|
|
5149
|
-
if (
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
const change = !includes(el.style.backgroundImage, src);
|
|
5155
|
-
if (change) {
|
|
5156
|
-
css(el, 'backgroundImage', "url(" + escape(src) + ")");
|
|
5157
|
-
trigger(el, createEvent('load', false));
|
|
5152
|
+
const loadSVG = memoize(async (src) => {
|
|
5153
|
+
if (src) {
|
|
5154
|
+
if (startsWith(src, 'data:')) {
|
|
5155
|
+
return decodeURIComponent(src.split(',')[1]);
|
|
5156
|
+
} else {
|
|
5157
|
+
return (await fetch(src)).text();
|
|
5158
5158
|
}
|
|
5159
|
+
} else {
|
|
5160
|
+
return Promise.reject();
|
|
5159
5161
|
}
|
|
5160
|
-
}
|
|
5162
|
+
});
|
|
5161
5163
|
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
});
|
|
5164
|
+
function parseSVG(svg, icon) {var _svg;
|
|
5165
|
+
if (icon && includes(svg, '<symbol')) {
|
|
5166
|
+
svg = parseSymbols(svg, icon) || svg;
|
|
5167
|
+
}
|
|
5168
|
+
|
|
5169
|
+
svg = $(svg.substr(svg.indexOf('<svg')));
|
|
5170
|
+
return ((_svg = svg) == null ? void 0 : _svg.hasChildNodes()) && svg;
|
|
5170
5171
|
}
|
|
5171
5172
|
|
|
5172
|
-
|
|
5173
|
-
|
|
5173
|
+
const symbolRe = /<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g;
|
|
5174
|
+
const symbols = {};
|
|
5174
5175
|
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
setSrcAttrs(el, img.currentSrc);
|
|
5179
|
-
};
|
|
5180
|
-
attr(img, 'src', src);
|
|
5181
|
-
return img;
|
|
5182
|
-
}
|
|
5176
|
+
function parseSymbols(svg, icon) {
|
|
5177
|
+
if (!symbols[svg]) {
|
|
5178
|
+
symbols[svg] = {};
|
|
5183
5179
|
|
|
5184
|
-
|
|
5185
|
-
sources = parseSources(sources);
|
|
5180
|
+
symbolRe.lastIndex = 0;
|
|
5186
5181
|
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
const source = fragment('<source>');
|
|
5191
|
-
attr(source, attrs);
|
|
5192
|
-
append(picture, source);
|
|
5182
|
+
let match;
|
|
5183
|
+
while (match = symbolRe.exec(svg)) {
|
|
5184
|
+
symbols[svg][match[3]] = "<svg xmlns=\"http://www.w3.org/2000/svg\"" + match[1] + "svg>";
|
|
5193
5185
|
}
|
|
5194
|
-
append(picture, img);
|
|
5195
5186
|
}
|
|
5187
|
+
|
|
5188
|
+
return symbols[svg][icon];
|
|
5196
5189
|
}
|
|
5197
5190
|
|
|
5198
|
-
function
|
|
5199
|
-
|
|
5200
|
-
|
|
5191
|
+
function applyAnimation(el) {
|
|
5192
|
+
const length = getMaxPathLength(el);
|
|
5193
|
+
|
|
5194
|
+
if (length) {
|
|
5195
|
+
el.style.setProperty('--uk-animation-stroke', length);
|
|
5201
5196
|
}
|
|
5197
|
+
}
|
|
5202
5198
|
|
|
5203
|
-
|
|
5199
|
+
function getMaxPathLength(el) {
|
|
5200
|
+
return Math.ceil(
|
|
5201
|
+
Math.max(
|
|
5202
|
+
0,
|
|
5203
|
+
...$$('[stroke]', el).map((stroke) => {
|
|
5204
5204
|
try {
|
|
5205
|
-
|
|
5205
|
+
return stroke.getTotalLength();
|
|
5206
5206
|
} catch (e) {
|
|
5207
|
-
|
|
5207
|
+
return 0;
|
|
5208
5208
|
}
|
|
5209
|
-
}
|
|
5210
|
-
sources = parseOptions(sources);
|
|
5211
|
-
}
|
|
5209
|
+
})));
|
|
5212
5210
|
|
|
5213
|
-
if (!isArray(sources)) {
|
|
5214
|
-
sources = [sources];
|
|
5215
|
-
}
|
|
5216
5211
|
|
|
5217
|
-
return sources.filter((source) => !isEmpty(source));
|
|
5218
5212
|
}
|
|
5219
5213
|
|
|
5220
|
-
function
|
|
5221
|
-
if (
|
|
5222
|
-
|
|
5214
|
+
function insertSVG(el, root) {
|
|
5215
|
+
if (isVoidElement(root) || isTag(root, 'canvas')) {
|
|
5216
|
+
root.hidden = true;
|
|
5217
|
+
|
|
5218
|
+
const next = root.nextElementSibling;
|
|
5219
|
+
return equals(el, next) ? next : after(root, el);
|
|
5223
5220
|
}
|
|
5221
|
+
|
|
5222
|
+
const last = root.lastElementChild;
|
|
5223
|
+
return equals(el, last) ? last : append(root, el);
|
|
5224
5224
|
}
|
|
5225
5225
|
|
|
5226
|
-
function
|
|
5227
|
-
return isTag(el, '
|
|
5226
|
+
function equals(el, other) {
|
|
5227
|
+
return isTag(el, 'svg') && isTag(other, 'svg') && innerHTML(el) === innerHTML(other);
|
|
5228
5228
|
}
|
|
5229
5229
|
|
|
5230
|
-
function
|
|
5231
|
-
return
|
|
5230
|
+
function innerHTML(el) {
|
|
5231
|
+
return (
|
|
5232
|
+
el.innerHTML ||
|
|
5233
|
+
new XMLSerializer().serializeToString(el).replace(/<svg.*?>(.*?)<\/svg>/g, '$1')).
|
|
5234
|
+
replace(/\s/g, '');
|
|
5232
5235
|
}
|
|
5233
5236
|
|
|
5234
|
-
var
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
+
var closeIcon = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"1\" y1=\"1\" x2=\"13\" y2=\"13\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"13\" y1=\"1\" x2=\"1\" y2=\"13\"/></svg>";
|
|
5238
|
+
|
|
5239
|
+
var closeLarge = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"1\" y1=\"1\" x2=\"19\" y2=\"19\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"19\" y1=\"1\" x2=\"1\" y2=\"19\"/></svg>";
|
|
5240
|
+
|
|
5241
|
+
var marker = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"9\" y=\"4\" width=\"1\" height=\"11\"/><rect x=\"4\" y=\"9\" width=\"11\" height=\"1\"/></svg>";
|
|
5242
|
+
|
|
5243
|
+
var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect y=\"9\" width=\"20\" height=\"2\"/><rect y=\"3\" width=\"20\" height=\"2\"/><rect y=\"15\" width=\"20\" height=\"2\"/></svg>";
|
|
5244
|
+
|
|
5245
|
+
var overlayIcon = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"19\" y=\"0\" width=\"1\" height=\"40\"/><rect x=\"0\" y=\"19\" width=\"40\" height=\"1\"/></svg>";
|
|
5246
|
+
|
|
5247
|
+
var paginationNext = "<svg width=\"7\" height=\"12\" viewBox=\"0 0 7 12\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" points=\"1 1 6 6 1 11\"/></svg>";
|
|
5248
|
+
|
|
5249
|
+
var paginationPrevious = "<svg width=\"7\" height=\"12\" viewBox=\"0 0 7 12\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" points=\"6 1 1 6 6 11\"/></svg>";
|
|
5250
|
+
|
|
5251
|
+
var searchIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"9\" cy=\"9\" r=\"7\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M14,14 L18,18 L14,14 Z\"/></svg>";
|
|
5252
|
+
|
|
5253
|
+
var searchLarge = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.8\" cx=\"17.5\" cy=\"17.5\" r=\"16.5\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.8\" x1=\"38\" y1=\"39\" x2=\"29\" y2=\"30\"/></svg>";
|
|
5254
|
+
|
|
5255
|
+
var searchNavbar = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"10.5\" cy=\"10.5\" r=\"9.5\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"23\" y1=\"23\" x2=\"17\" y2=\"17\"/></svg>";
|
|
5256
|
+
|
|
5257
|
+
var slidenavNext = "<svg width=\"14\" height=\"24\" viewBox=\"0 0 14 24\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" points=\"1.225,23 12.775,12 1.225,1 \"/></svg>";
|
|
5258
|
+
|
|
5259
|
+
var slidenavNextLarge = "<svg width=\"25\" height=\"40\" viewBox=\"0 0 25 40\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"2\" points=\"4.002,38.547 22.527,20.024 4,1.5 \"/></svg>";
|
|
5260
|
+
|
|
5261
|
+
var slidenavPrevious = "<svg width=\"14\" height=\"24\" viewBox=\"0 0 14 24\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" points=\"12.775,1 1.225,12 12.775,23 \"/></svg>";
|
|
5262
|
+
|
|
5263
|
+
var slidenavPreviousLarge = "<svg width=\"25\" height=\"40\" viewBox=\"0 0 25 40\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"2\" points=\"20.527,1.5 2,20.024 20.525,38.547 \"/></svg>";
|
|
5264
|
+
|
|
5265
|
+
var spinner = "<svg width=\"30\" height=\"30\" viewBox=\"0 0 30 30\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" cx=\"15\" cy=\"15\" r=\"14\"/></svg>";
|
|
5237
5266
|
|
|
5267
|
+
var totop = "<svg width=\"18\" height=\"10\" viewBox=\"0 0 18 10\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" points=\"1 9 9 1 17 9 \"/></svg>";
|
|
5268
|
+
|
|
5269
|
+
const icons = {
|
|
5270
|
+
spinner,
|
|
5271
|
+
totop,
|
|
5272
|
+
marker,
|
|
5273
|
+
'close-icon': closeIcon,
|
|
5274
|
+
'close-large': closeLarge,
|
|
5275
|
+
'navbar-toggle-icon': navbarToggleIcon,
|
|
5276
|
+
'overlay-icon': overlayIcon,
|
|
5277
|
+
'pagination-next': paginationNext,
|
|
5278
|
+
'pagination-previous': paginationPrevious,
|
|
5279
|
+
'search-icon': searchIcon,
|
|
5280
|
+
'search-large': searchLarge,
|
|
5281
|
+
'search-navbar': searchNavbar,
|
|
5282
|
+
'slidenav-next': slidenavNext,
|
|
5283
|
+
'slidenav-next-large': slidenavNextLarge,
|
|
5284
|
+
'slidenav-previous': slidenavPrevious,
|
|
5285
|
+
'slidenav-previous-large': slidenavPreviousLarge };
|
|
5286
|
+
|
|
5287
|
+
|
|
5288
|
+
const Icon = {
|
|
5289
|
+
install: install$3,
|
|
5290
|
+
|
|
5291
|
+
extends: SVG,
|
|
5292
|
+
|
|
5293
|
+
args: 'icon',
|
|
5294
|
+
|
|
5295
|
+
props: ['icon'],
|
|
5238
5296
|
|
|
5239
5297
|
data: {
|
|
5240
|
-
|
|
5298
|
+
include: ['focusable'] },
|
|
5241
5299
|
|
|
5242
5300
|
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
this.mediaObj = window.matchMedia(media);
|
|
5248
|
-
const handler = () => {
|
|
5249
|
-
this.matchMedia = this.mediaObj.matches;
|
|
5250
|
-
trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
|
|
5251
|
-
};
|
|
5252
|
-
this.offMediaObj = on(this.mediaObj, 'change', () => {
|
|
5253
|
-
handler();
|
|
5254
|
-
this.$emit('resize');
|
|
5255
|
-
});
|
|
5256
|
-
handler();
|
|
5257
|
-
}
|
|
5301
|
+
isIcon: true,
|
|
5302
|
+
|
|
5303
|
+
beforeConnect() {
|
|
5304
|
+
addClass(this.$el, 'uk-icon');
|
|
5258
5305
|
},
|
|
5259
5306
|
|
|
5260
|
-
|
|
5261
|
-
(
|
|
5262
|
-
|
|
5307
|
+
methods: {
|
|
5308
|
+
async getSvg() {
|
|
5309
|
+
const icon = getIcon(this.icon);
|
|
5263
5310
|
|
|
5311
|
+
if (!icon) {
|
|
5312
|
+
throw 'Icon not found.';
|
|
5313
|
+
}
|
|
5264
5314
|
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
if (startsWith(value, '@')) {
|
|
5268
|
-
const name = "breakpoint-" + value.substr(1);
|
|
5269
|
-
value = toFloat(getCssVar(name));
|
|
5270
|
-
} else if (isNaN(value)) {
|
|
5271
|
-
return value;
|
|
5272
|
-
}
|
|
5273
|
-
}
|
|
5315
|
+
return icon;
|
|
5316
|
+
} } };
|
|
5274
5317
|
|
|
5275
|
-
|
|
5276
|
-
|
|
5318
|
+
const IconComponent = {
|
|
5319
|
+
args: false,
|
|
5277
5320
|
|
|
5278
|
-
|
|
5279
|
-
mixins: [Class, Media, Resize],
|
|
5321
|
+
extends: Icon,
|
|
5280
5322
|
|
|
5281
|
-
|
|
5282
|
-
|
|
5323
|
+
data: (vm) => ({
|
|
5324
|
+
icon: hyphenate(vm.constructor.options.name) }),
|
|
5325
|
+
|
|
5326
|
+
|
|
5327
|
+
beforeConnect() {
|
|
5328
|
+
addClass(this.$el, this.$name);
|
|
5329
|
+
} };
|
|
5330
|
+
|
|
5331
|
+
|
|
5332
|
+
const Slidenav = {
|
|
5333
|
+
extends: IconComponent,
|
|
5334
|
+
|
|
5335
|
+
beforeConnect() {
|
|
5336
|
+
addClass(this.$el, 'uk-slidenav');
|
|
5337
|
+
const icon = this.$props.icon;
|
|
5338
|
+
this.icon = hasClass(this.$el, 'uk-slidenav-large') ? icon + "-large" : icon;
|
|
5339
|
+
} };
|
|
5283
5340
|
|
|
5284
5341
|
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
clsWrapper: 'uk-leader-fill',
|
|
5288
|
-
clsHide: 'uk-leader-hide',
|
|
5289
|
-
attrFill: 'data-fill' },
|
|
5342
|
+
const Search = {
|
|
5343
|
+
extends: IconComponent,
|
|
5290
5344
|
|
|
5345
|
+
beforeConnect() {
|
|
5346
|
+
this.icon =
|
|
5347
|
+
hasClass(this.$el, 'uk-search-icon') && parents(this.$el, '.uk-search-large').length ?
|
|
5348
|
+
'search-large' :
|
|
5349
|
+
parents(this.$el, '.uk-search-navbar').length ?
|
|
5350
|
+
'search-navbar' :
|
|
5351
|
+
this.$props.icon;
|
|
5352
|
+
} };
|
|
5291
5353
|
|
|
5292
|
-
computed: {
|
|
5293
|
-
fill(_ref) {let { fill } = _ref;
|
|
5294
|
-
return fill || getCssVar('leader-fill-content');
|
|
5295
|
-
} },
|
|
5296
5354
|
|
|
5355
|
+
const Close = {
|
|
5356
|
+
extends: IconComponent,
|
|
5297
5357
|
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
}
|
|
5358
|
+
beforeConnect() {
|
|
5359
|
+
this.icon = "close-" + (hasClass(this.$el, 'uk-close-large') ? 'large' : 'icon');
|
|
5360
|
+
} };
|
|
5301
5361
|
|
|
5302
|
-
disconnected() {
|
|
5303
|
-
unwrap(this.wrapper.childNodes);
|
|
5304
|
-
},
|
|
5305
5362
|
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
const width = Math.trunc(this.$el.offsetWidth / 2);
|
|
5363
|
+
const Spinner = {
|
|
5364
|
+
extends: IconComponent,
|
|
5309
5365
|
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
hide: !this.matchMedia };
|
|
5366
|
+
methods: {
|
|
5367
|
+
async getSvg() {
|
|
5368
|
+
const icon = await Icon.methods.getSvg.call(this);
|
|
5314
5369
|
|
|
5315
|
-
|
|
5370
|
+
if (this.ratio !== 1) {
|
|
5371
|
+
css($('circle', icon), 'strokeWidth', 1 / this.ratio);
|
|
5372
|
+
}
|
|
5316
5373
|
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
attr(this.wrapper, this.attrFill, new Array(width).join(fill));
|
|
5320
|
-
},
|
|
5374
|
+
return icon;
|
|
5375
|
+
} } };
|
|
5321
5376
|
|
|
5322
|
-
events: ['resize'] } };
|
|
5323
5377
|
|
|
5324
|
-
const active = [];
|
|
5325
5378
|
|
|
5326
|
-
|
|
5327
|
-
|
|
5379
|
+
const parsed = {};
|
|
5380
|
+
function install$3(UIkit) {
|
|
5381
|
+
UIkit.icon.add = (name, svg) => {
|
|
5382
|
+
const added = isString(name) ? { [name]: svg } : name;
|
|
5383
|
+
each(added, (svg, name) => {
|
|
5384
|
+
icons[name] = svg;
|
|
5385
|
+
delete parsed[name];
|
|
5386
|
+
});
|
|
5328
5387
|
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
stack: Boolean },
|
|
5388
|
+
if (UIkit._initialized) {
|
|
5389
|
+
apply(document.body, (el) =>
|
|
5390
|
+
each(UIkit.getComponents(el), (cmp) => {
|
|
5391
|
+
cmp.$options.isIcon && cmp.icon in added && cmp.$reset();
|
|
5392
|
+
}));
|
|
5335
5393
|
|
|
5394
|
+
}
|
|
5395
|
+
};
|
|
5396
|
+
}
|
|
5336
5397
|
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
overlay: true,
|
|
5342
|
-
stack: false },
|
|
5398
|
+
function getIcon(icon) {
|
|
5399
|
+
if (!icons[icon]) {
|
|
5400
|
+
return null;
|
|
5401
|
+
}
|
|
5343
5402
|
|
|
5403
|
+
if (!parsed[icon]) {
|
|
5404
|
+
parsed[icon] = $((icons[applyRtl(icon)] || icons[icon]).trim());
|
|
5405
|
+
}
|
|
5344
5406
|
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
return $(selPanel, $el);
|
|
5348
|
-
},
|
|
5407
|
+
return parsed[icon].cloneNode(true);
|
|
5408
|
+
}
|
|
5349
5409
|
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5410
|
+
function applyRtl(icon) {
|
|
5411
|
+
return isRtl ? swap(swap(icon, 'left', 'right'), 'previous', 'next') : icon;
|
|
5412
|
+
}
|
|
5353
5413
|
|
|
5354
|
-
|
|
5355
|
-
return bgClose && this.panel;
|
|
5356
|
-
} },
|
|
5414
|
+
const nativeLazyLoad = inBrowser && 'loading' in HTMLImageElement.prototype;
|
|
5357
5415
|
|
|
5416
|
+
var img = {
|
|
5417
|
+
args: 'dataSrc',
|
|
5358
5418
|
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5419
|
+
props: {
|
|
5420
|
+
dataSrc: String,
|
|
5421
|
+
sources: String,
|
|
5422
|
+
offsetTop: String,
|
|
5423
|
+
offsetLeft: String,
|
|
5424
|
+
target: String,
|
|
5425
|
+
loading: String },
|
|
5364
5426
|
|
|
5365
|
-
events: [
|
|
5366
|
-
{
|
|
5367
|
-
name: 'click',
|
|
5368
5427
|
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5428
|
+
data: {
|
|
5429
|
+
dataSrc: '',
|
|
5430
|
+
sources: false,
|
|
5431
|
+
offsetTop: '50vh',
|
|
5432
|
+
offsetLeft: '50vw',
|
|
5433
|
+
target: false,
|
|
5434
|
+
loading: 'lazy' },
|
|
5372
5435
|
|
|
5373
|
-
handler(e) {
|
|
5374
|
-
e.preventDefault();
|
|
5375
|
-
this.hide();
|
|
5376
|
-
} },
|
|
5377
5436
|
|
|
5437
|
+
connected() {
|
|
5438
|
+
if (this.loading !== 'lazy') {
|
|
5439
|
+
this.load();
|
|
5440
|
+
return;
|
|
5441
|
+
}
|
|
5378
5442
|
|
|
5379
|
-
|
|
5380
|
-
name: 'toggle',
|
|
5443
|
+
const target = [this.$el, ...queryAll(this.$props.target, this.$el)];
|
|
5381
5444
|
|
|
5382
|
-
|
|
5445
|
+
if (nativeLazyLoad && isImg(this.$el)) {
|
|
5446
|
+
this.$el.loading = 'lazy';
|
|
5447
|
+
setSrcAttrs(this.$el);
|
|
5383
5448
|
|
|
5384
|
-
|
|
5385
|
-
if (e.defaultPrevented) {
|
|
5449
|
+
if (target.length === 1) {
|
|
5386
5450
|
return;
|
|
5387
5451
|
}
|
|
5452
|
+
}
|
|
5388
5453
|
|
|
5389
|
-
|
|
5454
|
+
ensureSrcAttribute(this.$el);
|
|
5390
5455
|
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5456
|
+
this.registerObserver(
|
|
5457
|
+
observeIntersection(
|
|
5458
|
+
target,
|
|
5459
|
+
(entries, observer) => {
|
|
5460
|
+
this.load();
|
|
5461
|
+
observer.disconnect();
|
|
5462
|
+
},
|
|
5463
|
+
{
|
|
5464
|
+
rootMargin: toPx(this.offsetTop, 'height') + "px " + toPx(
|
|
5465
|
+
this.offsetLeft,
|
|
5466
|
+
'width') + "px" }));
|
|
5395
5467
|
|
|
5396
5468
|
|
|
5397
|
-
{
|
|
5398
|
-
name: 'beforeshow',
|
|
5399
5469
|
|
|
5400
|
-
self: true,
|
|
5401
5470
|
|
|
5402
|
-
|
|
5403
|
-
if (includes(active, this)) {
|
|
5404
|
-
return false;
|
|
5405
|
-
}
|
|
5471
|
+
},
|
|
5406
5472
|
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
}
|
|
5413
|
-
} },
|
|
5473
|
+
disconnected() {
|
|
5474
|
+
if (this._data.image) {
|
|
5475
|
+
this._data.image.onload = '';
|
|
5476
|
+
}
|
|
5477
|
+
},
|
|
5414
5478
|
|
|
5479
|
+
methods: {
|
|
5480
|
+
load() {
|
|
5481
|
+
if (this._data.image) {
|
|
5482
|
+
return this._data.image;
|
|
5483
|
+
}
|
|
5415
5484
|
|
|
5416
|
-
|
|
5417
|
-
|
|
5485
|
+
const image = isImg(this.$el) ?
|
|
5486
|
+
this.$el :
|
|
5487
|
+
getImageFromElement(this.$el, this.dataSrc, this.sources);
|
|
5418
5488
|
|
|
5419
|
-
|
|
5489
|
+
removeAttr(image, 'loading');
|
|
5490
|
+
setSrcAttrs(this.$el, image.currentSrc);
|
|
5491
|
+
return this._data.image = image;
|
|
5492
|
+
} } };
|
|
5420
5493
|
|
|
5421
|
-
handler() {
|
|
5422
|
-
const docEl = document.documentElement;
|
|
5423
5494
|
|
|
5424
|
-
if (width(window) > docEl.clientWidth && this.overlay) {
|
|
5425
|
-
css(document.body, 'overflowY', 'scroll');
|
|
5426
|
-
}
|
|
5427
5495
|
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5496
|
+
function setSrcAttrs(el, src) {
|
|
5497
|
+
if (isImg(el)) {
|
|
5498
|
+
const parentNode = parent(el);
|
|
5499
|
+
const elements = isPicture(parentNode) ? children(parentNode) : [el];
|
|
5500
|
+
elements.forEach((el) => setSourceProps(el, el));
|
|
5501
|
+
} else if (src) {
|
|
5502
|
+
const change = !includes(el.style.backgroundImage, src);
|
|
5503
|
+
if (change) {
|
|
5504
|
+
css(el, 'backgroundImage', "url(" + escape(src) + ")");
|
|
5505
|
+
trigger(el, createEvent('load', false));
|
|
5506
|
+
}
|
|
5507
|
+
}
|
|
5508
|
+
}
|
|
5431
5509
|
|
|
5432
|
-
|
|
5510
|
+
const srcProps = ['data-src', 'data-srcset', 'sizes'];
|
|
5511
|
+
function setSourceProps(sourceEl, targetEl) {
|
|
5512
|
+
srcProps.forEach((prop) => {
|
|
5513
|
+
const value = data(sourceEl, prop);
|
|
5514
|
+
if (value) {
|
|
5515
|
+
attr(targetEl, prop.replace(/^(data-)+/, ''), value);
|
|
5516
|
+
}
|
|
5517
|
+
});
|
|
5518
|
+
}
|
|
5433
5519
|
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
this.$el,
|
|
5437
|
-
'hide',
|
|
5438
|
-
on(document, pointerDown, (_ref3) => {let { target } = _ref3;
|
|
5439
|
-
if (
|
|
5440
|
-
last(active) !== this ||
|
|
5441
|
-
this.overlay && !within(target, this.$el) ||
|
|
5442
|
-
within(target, this.panel))
|
|
5443
|
-
{
|
|
5444
|
-
return;
|
|
5445
|
-
}
|
|
5520
|
+
function getImageFromElement(el, src, sources) {
|
|
5521
|
+
const img = new Image();
|
|
5446
5522
|
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
{
|
|
5456
|
-
this.hide();
|
|
5457
|
-
}
|
|
5458
|
-
},
|
|
5459
|
-
true);
|
|
5523
|
+
wrapInPicture(img, sources);
|
|
5524
|
+
setSourceProps(el, img);
|
|
5525
|
+
img.onload = () => {
|
|
5526
|
+
setSrcAttrs(el, img.currentSrc);
|
|
5527
|
+
};
|
|
5528
|
+
attr(img, 'src', src);
|
|
5529
|
+
return img;
|
|
5530
|
+
}
|
|
5460
5531
|
|
|
5461
|
-
|
|
5462
|
-
|
|
5532
|
+
function wrapInPicture(img, sources) {
|
|
5533
|
+
sources = parseSources(sources);
|
|
5463
5534
|
|
|
5464
|
-
|
|
5535
|
+
if (sources.length) {
|
|
5536
|
+
const picture = fragment('<picture>');
|
|
5537
|
+
for (const attrs of sources) {
|
|
5538
|
+
const source = fragment('<source>');
|
|
5539
|
+
attr(source, attrs);
|
|
5540
|
+
append(picture, source);
|
|
5541
|
+
}
|
|
5542
|
+
append(picture, img);
|
|
5543
|
+
}
|
|
5544
|
+
}
|
|
5465
5545
|
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
on(document, 'keydown', (e) => {
|
|
5471
|
-
if (e.keyCode === 27 && last(active) === this) {
|
|
5472
|
-
this.hide();
|
|
5473
|
-
}
|
|
5474
|
-
}),
|
|
5475
|
-
{ self: true });
|
|
5546
|
+
function parseSources(sources) {
|
|
5547
|
+
if (!sources) {
|
|
5548
|
+
return [];
|
|
5549
|
+
}
|
|
5476
5550
|
|
|
5477
|
-
|
|
5478
|
-
|
|
5551
|
+
if (startsWith(sources, '[')) {
|
|
5552
|
+
try {
|
|
5553
|
+
sources = JSON.parse(sources);
|
|
5554
|
+
} catch (e) {
|
|
5555
|
+
sources = [];
|
|
5556
|
+
}
|
|
5557
|
+
} else {
|
|
5558
|
+
sources = parseOptions(sources);
|
|
5559
|
+
}
|
|
5479
5560
|
|
|
5561
|
+
if (!isArray(sources)) {
|
|
5562
|
+
sources = [sources];
|
|
5563
|
+
}
|
|
5480
5564
|
|
|
5481
|
-
|
|
5482
|
-
|
|
5565
|
+
return sources.filter((source) => !isEmpty(source));
|
|
5566
|
+
}
|
|
5483
5567
|
|
|
5484
|
-
|
|
5568
|
+
function ensureSrcAttribute(el) {
|
|
5569
|
+
if (isImg(el) && !hasAttr(el, 'src')) {
|
|
5570
|
+
attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
|
|
5571
|
+
}
|
|
5572
|
+
}
|
|
5485
5573
|
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
}
|
|
5574
|
+
function isPicture(el) {
|
|
5575
|
+
return isTag(el, 'picture');
|
|
5576
|
+
}
|
|
5490
5577
|
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
} },
|
|
5578
|
+
function isImg(el) {
|
|
5579
|
+
return isTag(el, 'img');
|
|
5580
|
+
}
|
|
5495
5581
|
|
|
5582
|
+
var Media = {
|
|
5583
|
+
props: {
|
|
5584
|
+
media: Boolean },
|
|
5496
5585
|
|
|
5497
|
-
{
|
|
5498
|
-
name: 'hidden',
|
|
5499
5586
|
|
|
5500
|
-
|
|
5587
|
+
data: {
|
|
5588
|
+
media: false },
|
|
5501
5589
|
|
|
5502
|
-
handler() {
|
|
5503
|
-
if (includes(active, this)) {
|
|
5504
|
-
active.splice(active.indexOf(this), 1);
|
|
5505
|
-
}
|
|
5506
5590
|
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5591
|
+
connected() {
|
|
5592
|
+
const media = toMedia(this.media);
|
|
5593
|
+
this.matchMedia = true;
|
|
5594
|
+
if (media) {
|
|
5595
|
+
this.mediaObj = window.matchMedia(media);
|
|
5596
|
+
const handler = () => {
|
|
5597
|
+
this.matchMedia = this.mediaObj.matches;
|
|
5598
|
+
trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
|
|
5599
|
+
};
|
|
5600
|
+
this.offMediaObj = on(this.mediaObj, 'change', () => {
|
|
5601
|
+
handler();
|
|
5602
|
+
this.$emit('resize');
|
|
5603
|
+
});
|
|
5604
|
+
handler();
|
|
5605
|
+
}
|
|
5606
|
+
},
|
|
5510
5607
|
|
|
5511
|
-
|
|
5608
|
+
disconnected() {var _this$offMediaObj;
|
|
5609
|
+
(_this$offMediaObj = this.offMediaObj) == null ? void 0 : _this$offMediaObj.call(this);
|
|
5610
|
+
} };
|
|
5512
5611
|
|
|
5513
|
-
if (!active.some((modal) => modal.clsPage === this.clsPage)) {
|
|
5514
|
-
removeClass(document.documentElement, this.clsPage);
|
|
5515
|
-
}
|
|
5516
|
-
} }],
|
|
5517
5612
|
|
|
5613
|
+
function toMedia(value) {
|
|
5614
|
+
if (isString(value)) {
|
|
5615
|
+
if (startsWith(value, '@')) {
|
|
5616
|
+
const name = "breakpoint-" + value.substr(1);
|
|
5617
|
+
value = toFloat(getCssVar(name));
|
|
5618
|
+
} else if (isNaN(value)) {
|
|
5619
|
+
return value;
|
|
5620
|
+
}
|
|
5621
|
+
}
|
|
5518
5622
|
|
|
5623
|
+
return value && isNumeric(value) ? "(min-width: " + value + "px)" : '';
|
|
5624
|
+
}
|
|
5519
5625
|
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
return this.isToggled() ? this.hide() : this.show();
|
|
5523
|
-
},
|
|
5626
|
+
var leader = {
|
|
5627
|
+
mixins: [Class, Media, Resize],
|
|
5524
5628
|
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
append(this.container, this.$el);
|
|
5528
|
-
return new Promise((resolve) =>
|
|
5529
|
-
requestAnimationFrame(() => this.show().then(resolve)));
|
|
5629
|
+
props: {
|
|
5630
|
+
fill: String },
|
|
5530
5631
|
|
|
5531
|
-
}
|
|
5532
5632
|
|
|
5533
|
-
|
|
5534
|
-
|
|
5633
|
+
data: {
|
|
5634
|
+
fill: '',
|
|
5635
|
+
clsWrapper: 'uk-leader-fill',
|
|
5636
|
+
clsHide: 'uk-leader-hide',
|
|
5637
|
+
attrFill: 'data-fill' },
|
|
5535
5638
|
|
|
5536
|
-
hide() {
|
|
5537
|
-
return this.toggleElement(this.$el, false, animate(this));
|
|
5538
|
-
} } };
|
|
5539
5639
|
|
|
5640
|
+
computed: {
|
|
5641
|
+
fill(_ref) {let { fill } = _ref;
|
|
5642
|
+
return fill || getCssVar('leader-fill-content');
|
|
5643
|
+
} },
|
|
5540
5644
|
|
|
5541
5645
|
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
once(el, 'show hide', () => {
|
|
5546
|
-
el._reject == null ? void 0 : el._reject();
|
|
5547
|
-
el._reject = reject;
|
|
5646
|
+
connected() {
|
|
5647
|
+
[this.wrapper] = wrapInner(this.$el, "<span class=\"" + this.clsWrapper + "\">");
|
|
5648
|
+
},
|
|
5548
5649
|
|
|
5549
|
-
|
|
5650
|
+
disconnected() {
|
|
5651
|
+
unwrap(this.wrapper.childNodes);
|
|
5652
|
+
},
|
|
5550
5653
|
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
() => {
|
|
5555
|
-
once(transitionElement, 'transitionend transitioncancel', resolve, {
|
|
5556
|
-
self: true });
|
|
5654
|
+
update: {
|
|
5655
|
+
read() {
|
|
5656
|
+
const width = Math.trunc(this.$el.offsetWidth / 2);
|
|
5557
5657
|
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5658
|
+
return {
|
|
5659
|
+
width,
|
|
5660
|
+
fill: this.fill,
|
|
5661
|
+
hide: !this.matchMedia };
|
|
5561
5662
|
|
|
5663
|
+
},
|
|
5562
5664
|
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
},
|
|
5567
|
-
})).
|
|
5568
|
-
then(() => delete el._reject);
|
|
5569
|
-
}
|
|
5665
|
+
write(_ref2) {let { width, fill, hide } = _ref2;
|
|
5666
|
+
toggleClass(this.wrapper, this.clsHide, hide);
|
|
5667
|
+
attr(this.wrapper, this.attrFill, new Array(width).join(fill));
|
|
5668
|
+
},
|
|
5570
5669
|
|
|
5571
|
-
|
|
5572
|
-
return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
|
|
5573
|
-
}
|
|
5670
|
+
events: ['resize'] } };
|
|
5574
5671
|
|
|
5575
5672
|
var modal = {
|
|
5576
5673
|
install: install$2,
|
|
@@ -5821,8 +5918,7 @@
|
|
|
5821
5918
|
{
|
|
5822
5919
|
...this.$props,
|
|
5823
5920
|
boundary: this.boundary,
|
|
5824
|
-
pos: this.pos
|
|
5825
|
-
offset: this.dropbar || this.offset });
|
|
5921
|
+
pos: this.pos });
|
|
5826
5922
|
|
|
5827
5923
|
|
|
5828
5924
|
},
|
|
@@ -5983,8 +6079,8 @@
|
|
|
5983
6079
|
return this.dropbar;
|
|
5984
6080
|
},
|
|
5985
6081
|
|
|
5986
|
-
handler(
|
|
5987
|
-
if (!
|
|
6082
|
+
handler(_ref9) {let { target } = _ref9;
|
|
6083
|
+
if (!this.isDropbarDrop(target)) {
|
|
5988
6084
|
return;
|
|
5989
6085
|
}
|
|
5990
6086
|
|
|
@@ -5992,7 +6088,7 @@
|
|
|
5992
6088
|
after(this.dropbarAnchor || this.$el, this.dropbar);
|
|
5993
6089
|
}
|
|
5994
6090
|
|
|
5995
|
-
addClass(
|
|
6091
|
+
addClass(target, this.clsDrop + "-dropbar");
|
|
5996
6092
|
} },
|
|
5997
6093
|
|
|
5998
6094
|
|
|
@@ -6007,19 +6103,44 @@
|
|
|
6007
6103
|
return this.dropbar;
|
|
6008
6104
|
},
|
|
6009
6105
|
|
|
6010
|
-
handler(
|
|
6011
|
-
if (!
|
|
6106
|
+
handler(_ref10) {let { target } = _ref10;
|
|
6107
|
+
if (!this.isDropbarDrop(target)) {
|
|
6012
6108
|
return;
|
|
6013
6109
|
}
|
|
6014
6110
|
|
|
6015
|
-
this._observer = observeResize(
|
|
6111
|
+
this._observer = observeResize(target, () =>
|
|
6016
6112
|
this.transitionTo(
|
|
6017
|
-
offset(
|
|
6113
|
+
offset(target).bottom -
|
|
6018
6114
|
offset(this.dropbar).top +
|
|
6019
|
-
toFloat(css(
|
|
6020
|
-
|
|
6115
|
+
toFloat(css(target, 'marginBottom')),
|
|
6116
|
+
target));
|
|
6117
|
+
|
|
6118
|
+
|
|
6119
|
+
} },
|
|
6120
|
+
|
|
6121
|
+
|
|
6122
|
+
{
|
|
6123
|
+
name: 'beforeposition',
|
|
6124
|
+
|
|
6125
|
+
el() {
|
|
6126
|
+
return this.dropContainer;
|
|
6127
|
+
},
|
|
6128
|
+
|
|
6129
|
+
filter() {
|
|
6130
|
+
return this.dropbar;
|
|
6131
|
+
},
|
|
6132
|
+
|
|
6133
|
+
handler(e, element, target, options) {
|
|
6134
|
+
if (!this.isDropbarDrop(element)) {
|
|
6135
|
+
return;
|
|
6136
|
+
}
|
|
6021
6137
|
|
|
6138
|
+
const dropbarOffset = offset(this.dropbar);
|
|
6022
6139
|
|
|
6140
|
+
css(element, 'maxWidth', dropbarOffset.width - options.viewportOffset * 2);
|
|
6141
|
+
|
|
6142
|
+
options.offset[1] = dropbarOffset.top - offset(target).bottom;
|
|
6143
|
+
options.viewportOffset += dropbarOffset.left;
|
|
6023
6144
|
} },
|
|
6024
6145
|
|
|
6025
6146
|
|
|
@@ -6034,12 +6155,12 @@
|
|
|
6034
6155
|
return this.dropbar;
|
|
6035
6156
|
},
|
|
6036
6157
|
|
|
6037
|
-
handler(e
|
|
6158
|
+
handler(e) {
|
|
6038
6159
|
const active = this.getActive();
|
|
6039
6160
|
|
|
6040
6161
|
if (
|
|
6041
6162
|
matches(this.dropbar, ':hover') &&
|
|
6042
|
-
(active == null ? void 0 : active.$el) ===
|
|
6163
|
+
(active == null ? void 0 : active.$el) === e.target &&
|
|
6043
6164
|
!this.toggles.some((el) => active.target !== el && matches(el, ':focus')))
|
|
6044
6165
|
{
|
|
6045
6166
|
e.preventDefault();
|
|
@@ -6058,8 +6179,8 @@
|
|
|
6058
6179
|
return this.dropbar;
|
|
6059
6180
|
},
|
|
6060
6181
|
|
|
6061
|
-
handler(
|
|
6062
|
-
if (!
|
|
6182
|
+
handler(_ref11) {let { target } = _ref11;
|
|
6183
|
+
if (!this.isDropbarDrop(target)) {
|
|
6063
6184
|
return;
|
|
6064
6185
|
}
|
|
6065
6186
|
|
|
@@ -6067,7 +6188,7 @@
|
|
|
6067
6188
|
|
|
6068
6189
|
const active = this.getActive();
|
|
6069
6190
|
|
|
6070
|
-
if (!active || (active == null ? void 0 : active.$el) ===
|
|
6191
|
+
if (!active || (active == null ? void 0 : active.$el) === target) {
|
|
6071
6192
|
this.transitionTo(0);
|
|
6072
6193
|
}
|
|
6073
6194
|
} }],
|
|
@@ -6076,7 +6197,7 @@
|
|
|
6076
6197
|
|
|
6077
6198
|
methods: {
|
|
6078
6199
|
getActive() {
|
|
6079
|
-
return active
|
|
6200
|
+
return active && within(active.target, this.$el) && active;
|
|
6080
6201
|
},
|
|
6081
6202
|
|
|
6082
6203
|
transitionTo(newHeight, el) {
|
|
@@ -6106,6 +6227,11 @@
|
|
|
6106
6227
|
|
|
6107
6228
|
getDropdown(el) {
|
|
6108
6229
|
return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown');
|
|
6230
|
+
},
|
|
6231
|
+
|
|
6232
|
+
isDropbarDrop(el) {
|
|
6233
|
+
const drop = this.getDropdown(el);
|
|
6234
|
+
return drop && hasClass(el, this.clsDrop) && drop.align !== 'stretch';
|
|
6109
6235
|
} } };
|
|
6110
6236
|
|
|
6111
6237
|
|
|
@@ -6169,7 +6295,7 @@
|
|
|
6169
6295
|
|
|
6170
6296
|
registerEvent(this, {
|
|
6171
6297
|
el: this.swipeTarget,
|
|
6172
|
-
name: pointerDown,
|
|
6298
|
+
name: pointerDown$1,
|
|
6173
6299
|
passive: true,
|
|
6174
6300
|
handler(e) {
|
|
6175
6301
|
if (!isTouch(e)) {
|
|
@@ -6179,7 +6305,7 @@
|
|
|
6179
6305
|
// Handle Swipe Gesture
|
|
6180
6306
|
const pos = getEventPos(e);
|
|
6181
6307
|
const target = 'tagName' in e.target ? e.target : parent(e.target);
|
|
6182
|
-
once(document, pointerUp + " " + pointerCancel + " scroll", (e) => {
|
|
6308
|
+
once(document, pointerUp$1 + " " + pointerCancel + " scroll", (e) => {
|
|
6183
6309
|
const { x, y } = getEventPos(e);
|
|
6184
6310
|
|
|
6185
6311
|
// swipe
|
|
@@ -6286,22 +6412,6 @@
|
|
|
6286
6412
|
} },
|
|
6287
6413
|
|
|
6288
6414
|
|
|
6289
|
-
{
|
|
6290
|
-
name: 'touchstart',
|
|
6291
|
-
|
|
6292
|
-
passive: true,
|
|
6293
|
-
|
|
6294
|
-
el() {
|
|
6295
|
-
return this.panel;
|
|
6296
|
-
},
|
|
6297
|
-
|
|
6298
|
-
handler(_ref8) {let { targetTouches } = _ref8;
|
|
6299
|
-
if (targetTouches.length === 1) {
|
|
6300
|
-
this.clientY = targetTouches[0].clientY;
|
|
6301
|
-
}
|
|
6302
|
-
} },
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
6415
|
{
|
|
6306
6416
|
name: 'touchmove',
|
|
6307
6417
|
|
|
@@ -6317,33 +6427,6 @@
|
|
|
6317
6427
|
} },
|
|
6318
6428
|
|
|
6319
6429
|
|
|
6320
|
-
{
|
|
6321
|
-
name: 'touchmove',
|
|
6322
|
-
|
|
6323
|
-
passive: false,
|
|
6324
|
-
|
|
6325
|
-
el() {
|
|
6326
|
-
return this.panel;
|
|
6327
|
-
},
|
|
6328
|
-
|
|
6329
|
-
handler(e) {
|
|
6330
|
-
if (e.targetTouches.length !== 1) {
|
|
6331
|
-
return;
|
|
6332
|
-
}
|
|
6333
|
-
|
|
6334
|
-
const clientY = e.targetTouches[0].clientY - this.clientY;
|
|
6335
|
-
const { scrollTop, scrollHeight, clientHeight } = this.panel;
|
|
6336
|
-
|
|
6337
|
-
if (
|
|
6338
|
-
clientHeight >= scrollHeight ||
|
|
6339
|
-
scrollTop === 0 && clientY > 0 ||
|
|
6340
|
-
scrollHeight - scrollTop <= clientHeight && clientY < 0)
|
|
6341
|
-
{
|
|
6342
|
-
e.cancelable && e.preventDefault();
|
|
6343
|
-
}
|
|
6344
|
-
} },
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
6430
|
{
|
|
6348
6431
|
name: 'show',
|
|
6349
6432
|
|
|
@@ -6355,7 +6438,6 @@
|
|
|
6355
6438
|
addClass(parent(this.panel), this.clsMode);
|
|
6356
6439
|
}
|
|
6357
6440
|
|
|
6358
|
-
css(document.documentElement, 'overflowY', this.overlay ? 'hidden' : '');
|
|
6359
6441
|
addClass(document.body, this.clsContainer, this.clsFlip);
|
|
6360
6442
|
css(document.body, 'touch-action', 'pan-y pinch-zoom');
|
|
6361
6443
|
css(this.$el, 'display', 'block');
|
|
@@ -6363,7 +6445,7 @@
|
|
|
6363
6445
|
addClass(
|
|
6364
6446
|
this.panel,
|
|
6365
6447
|
this.clsSidebarAnimation,
|
|
6366
|
-
this.mode
|
|
6448
|
+
this.mode === 'reveal' ? '' : this.clsMode);
|
|
6367
6449
|
|
|
6368
6450
|
|
|
6369
6451
|
height(document.body); // force reflow
|
|
@@ -6400,8 +6482,6 @@
|
|
|
6400
6482
|
removeClass(this.$el, this.clsOverlay);
|
|
6401
6483
|
css(this.$el, 'display', '');
|
|
6402
6484
|
removeClass(document.body, this.clsContainer, this.clsFlip);
|
|
6403
|
-
|
|
6404
|
-
css(document.documentElement, 'overflowY', '');
|
|
6405
6485
|
} },
|
|
6406
6486
|
|
|
6407
6487
|
|
|
@@ -6877,7 +6957,9 @@
|
|
|
6877
6957
|
},
|
|
6878
6958
|
|
|
6879
6959
|
handler() {
|
|
6880
|
-
|
|
6960
|
+
const { scrollingElement } = document;
|
|
6961
|
+
|
|
6962
|
+
if (!location.hash || scrollingElement.scrollTop === 0) {
|
|
6881
6963
|
return;
|
|
6882
6964
|
}
|
|
6883
6965
|
|
|
@@ -6886,13 +6968,11 @@
|
|
|
6886
6968
|
const elOffset = offset(this.$el);
|
|
6887
6969
|
|
|
6888
6970
|
if (this.isFixed && intersectRect(targetOffset, elOffset)) {
|
|
6889
|
-
scrollTop
|
|
6890
|
-
window,
|
|
6971
|
+
scrollingElement.scrollTop =
|
|
6891
6972
|
targetOffset.top -
|
|
6892
6973
|
elOffset.height -
|
|
6893
6974
|
toPx(this.targetOffset, 'height', this.placeholder) -
|
|
6894
|
-
toPx(this.offset, 'height', this.placeholder)
|
|
6895
|
-
|
|
6975
|
+
toPx(this.offset, 'height', this.placeholder);
|
|
6896
6976
|
}
|
|
6897
6977
|
});
|
|
6898
6978
|
} }],
|
|
@@ -6990,7 +7070,7 @@
|
|
|
6990
7070
|
|
|
6991
7071
|
|
|
6992
7072
|
{let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref4;
|
|
6993
|
-
const scroll = scrollTop
|
|
7073
|
+
const scroll = document.scrollingElement.scrollTop;
|
|
6994
7074
|
const dir = prevScroll <= scroll ? 'down' : 'up';
|
|
6995
7075
|
|
|
6996
7076
|
return {
|
|
@@ -7399,7 +7479,7 @@
|
|
|
7399
7479
|
|
|
7400
7480
|
events: [
|
|
7401
7481
|
{
|
|
7402
|
-
name: pointerDown,
|
|
7482
|
+
name: pointerDown$1,
|
|
7403
7483
|
|
|
7404
7484
|
filter() {
|
|
7405
7485
|
return includes(this.mode, 'hover');
|
|
@@ -7417,7 +7497,7 @@
|
|
|
7417
7497
|
trigger(this.$el, 'focus');
|
|
7418
7498
|
once(
|
|
7419
7499
|
document,
|
|
7420
|
-
pointerDown,
|
|
7500
|
+
pointerDown$1,
|
|
7421
7501
|
() => trigger(this.$el, 'blur'),
|
|
7422
7502
|
true,
|
|
7423
7503
|
(e) => !within(e.target, this.$el));
|
|
@@ -8109,7 +8189,7 @@
|
|
|
8109
8189
|
|
|
8110
8190
|
},
|
|
8111
8191
|
|
|
8112
|
-
setState(state, animate) {if (animate === void 0) {animate = true;}
|
|
8192
|
+
async setState(state, animate) {if (animate === void 0) {animate = true;}
|
|
8113
8193
|
state = { filter: { '': '' }, sort: [], ...state };
|
|
8114
8194
|
|
|
8115
8195
|
trigger(this.$el, 'beforeFilter', [this, state]);
|
|
@@ -8118,15 +8198,17 @@
|
|
|
8118
8198
|
toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state)));
|
|
8119
8199
|
|
|
8120
8200
|
|
|
8121
|
-
Promise.all(
|
|
8201
|
+
await Promise.all(
|
|
8122
8202
|
$$(this.target, this.$el).map((target) => {
|
|
8123
8203
|
const filterFn = () => {
|
|
8124
8204
|
applyState(state, target, children(target));
|
|
8125
8205
|
this.$update(this.$el);
|
|
8126
8206
|
};
|
|
8127
8207
|
return animate ? this.animate(filterFn, target) : filterFn();
|
|
8128
|
-
}))
|
|
8129
|
-
|
|
8208
|
+
}));
|
|
8209
|
+
|
|
8210
|
+
|
|
8211
|
+
trigger(this.$el, 'afterFilter', [this]);
|
|
8130
8212
|
},
|
|
8131
8213
|
|
|
8132
8214
|
updateState() {
|
|
@@ -8416,6 +8498,11 @@
|
|
|
8416
8498
|
this.interval && clearInterval(this.interval);
|
|
8417
8499
|
} } };
|
|
8418
8500
|
|
|
8501
|
+
const pointerOptions = { passive: false, capture: true };
|
|
8502
|
+
const pointerDown = 'touchstart mousedown';
|
|
8503
|
+
const pointerMove = 'touchmove mousemove';
|
|
8504
|
+
const pointerUp = 'touchend touchcancel mouseup click input';
|
|
8505
|
+
|
|
8419
8506
|
var SliderDrag = {
|
|
8420
8507
|
props: {
|
|
8421
8508
|
draggable: Boolean },
|
|
@@ -8468,7 +8555,17 @@
|
|
|
8468
8555
|
|
|
8469
8556
|
handler(e) {
|
|
8470
8557
|
e.preventDefault();
|
|
8471
|
-
} }
|
|
8558
|
+
} },
|
|
8559
|
+
|
|
8560
|
+
|
|
8561
|
+
{
|
|
8562
|
+
// iOS workaround for slider stopping if swiping fast
|
|
8563
|
+
name: pointerMove + " " + pointerUp,
|
|
8564
|
+
el() {
|
|
8565
|
+
return this.list;
|
|
8566
|
+
},
|
|
8567
|
+
handler: noop,
|
|
8568
|
+
...pointerOptions }],
|
|
8472
8569
|
|
|
8473
8570
|
|
|
8474
8571
|
|
|
@@ -8490,10 +8587,10 @@
|
|
|
8490
8587
|
this.prevIndex = this.index;
|
|
8491
8588
|
}
|
|
8492
8589
|
|
|
8493
|
-
on(document, pointerMove, this.move,
|
|
8590
|
+
on(document, pointerMove, this.move, pointerOptions);
|
|
8494
8591
|
|
|
8495
8592
|
// 'input' event is triggered by video controls
|
|
8496
|
-
on(document, pointerUp
|
|
8593
|
+
on(document, pointerUp, this.end, pointerOptions);
|
|
8497
8594
|
|
|
8498
8595
|
css(this.list, 'userSelect', 'none');
|
|
8499
8596
|
},
|
|
@@ -8573,8 +8670,8 @@
|
|
|
8573
8670
|
},
|
|
8574
8671
|
|
|
8575
8672
|
end() {
|
|
8576
|
-
off(document, pointerMove, this.move,
|
|
8577
|
-
off(document, pointerUp
|
|
8673
|
+
off(document, pointerMove, this.move, pointerOptions);
|
|
8674
|
+
off(document, pointerUp, this.end, pointerOptions);
|
|
8578
8675
|
|
|
8579
8676
|
if (this.dragging) {
|
|
8580
8677
|
this.dragging = null;
|
|
@@ -8982,7 +9079,7 @@
|
|
|
8982
9079
|
|
|
8983
9080
|
events: [
|
|
8984
9081
|
{
|
|
8985
|
-
name: pointerMove + " " + pointerDown + " keydown",
|
|
9082
|
+
name: pointerMove$1 + " " + pointerDown$1 + " keydown",
|
|
8986
9083
|
|
|
8987
9084
|
handler: 'showControls' },
|
|
8988
9085
|
|
|
@@ -10637,7 +10734,7 @@
|
|
|
10637
10734
|
},
|
|
10638
10735
|
|
|
10639
10736
|
events: {
|
|
10640
|
-
name: pointerDown,
|
|
10737
|
+
name: pointerDown$1,
|
|
10641
10738
|
passive: false,
|
|
10642
10739
|
handler: 'init' },
|
|
10643
10740
|
|
|
@@ -10767,8 +10864,8 @@
|
|
|
10767
10864
|
this.placeholder = placeholder;
|
|
10768
10865
|
this.origin = { target, index: index(placeholder), ...this.pos };
|
|
10769
10866
|
|
|
10770
|
-
on(document, pointerMove, this.move);
|
|
10771
|
-
on(document, pointerUp, this.end);
|
|
10867
|
+
on(document, pointerMove$1, this.move);
|
|
10868
|
+
on(document, pointerUp$1, this.end);
|
|
10772
10869
|
|
|
10773
10870
|
if (!this.threshold) {
|
|
10774
10871
|
this.start(e);
|
|
@@ -10804,8 +10901,8 @@
|
|
|
10804
10901
|
},
|
|
10805
10902
|
|
|
10806
10903
|
end() {
|
|
10807
|
-
off(document, pointerMove, this.move);
|
|
10808
|
-
off(document, pointerUp, this.end);
|
|
10904
|
+
off(document, pointerMove$1, this.move);
|
|
10905
|
+
off(document, pointerUp$1, this.end);
|
|
10809
10906
|
|
|
10810
10907
|
if (!this.drag) {
|
|
10811
10908
|
return;
|
|
@@ -10874,7 +10971,7 @@
|
|
|
10874
10971
|
let last = Date.now();
|
|
10875
10972
|
trackTimer = setInterval(() => {
|
|
10876
10973
|
let { x, y } = pos;
|
|
10877
|
-
y += scrollTop
|
|
10974
|
+
y += document.scrollingElement.scrollTop;
|
|
10878
10975
|
|
|
10879
10976
|
const dist = (Date.now() - last) * 0.3;
|
|
10880
10977
|
last = Date.now();
|
|
@@ -10895,7 +10992,7 @@
|
|
|
10895
10992
|
}
|
|
10896
10993
|
|
|
10897
10994
|
if (scroll > 0 && scroll < scrollHeight - height) {
|
|
10898
|
-
scrollTop
|
|
10995
|
+
scrollEl.scrollTop = scroll;
|
|
10899
10996
|
return true;
|
|
10900
10997
|
}
|
|
10901
10998
|
});
|
|
@@ -11040,11 +11137,11 @@
|
|
|
11040
11137
|
|
|
11041
11138
|
this._unbind = once(
|
|
11042
11139
|
document, "show keydown " +
|
|
11043
|
-
pointerDown,
|
|
11140
|
+
pointerDown$1,
|
|
11044
11141
|
this.hide,
|
|
11045
11142
|
false,
|
|
11046
11143
|
(e) =>
|
|
11047
|
-
e.type === pointerDown && !within(e.target, this.$el) ||
|
|
11144
|
+
e.type === pointerDown$1 && !within(e.target, this.$el) ||
|
|
11048
11145
|
e.type === 'keydown' && e.keyCode === 27 ||
|
|
11049
11146
|
e.type === 'show' && e.detail[0] !== this && e.detail[0].$name === this.$name);
|
|
11050
11147
|
|
|
@@ -11115,7 +11212,7 @@
|
|
|
11115
11212
|
|
|
11116
11213
|
// Clicking a button does not give it focus on all browsers and platforms
|
|
11117
11214
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
|
|
11118
|
-
[pointerDown](e) {
|
|
11215
|
+
[pointerDown$1](e) {
|
|
11119
11216
|
if (isTouch(e)) {
|
|
11120
11217
|
this.show();
|
|
11121
11218
|
}
|