uikit 3.14.4-dev.10a07fe5a → 3.14.4-dev.4bd89c5ca
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 +12 -0
- package/dist/css/uikit-core-rtl.css +120 -20
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +120 -20
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +117 -21
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +117 -21
- 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 +28 -21
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +28 -21
- 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 +23 -16
- 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 +95 -67
- 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 +148 -103
- 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/height-viewport.js +11 -5
- package/src/js/core/navbar.js +44 -15
- package/src/js/core/sticky.js +8 -9
- package/src/js/mixin/modal.js +1 -1
- package/src/js/mixin/position.js +24 -7
- package/src/js/mixin/slider-drag.js +20 -8
- package/src/js/mixin/togglable.js +8 -17
- 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 +106 -15
- package/src/less/components/utility.less +12 -3
- package/src/less/theme/nav.less +3 -7
- package/src/less/theme/navbar.less +12 -6
- package/src/scss/components/dropdown.scss +8 -0
- package/src/scss/components/nav.scss +24 -6
- package/src/scss/components/navbar.scss +82 -15
- package/src/scss/components/utility.scss +12 -3
- package/src/scss/mixins-theme.scss +26 -5
- package/src/scss/mixins.scss +24 -0
- package/src/scss/theme/nav.scss +3 -7
- package/src/scss/theme/navbar.scss +11 -2
- package/src/scss/variables-theme.scss +29 -9
- package/src/scss/variables.scss +29 -7
- package/tests/drop.html +66 -16
- package/tests/dropdown.html +103 -16
- package/tests/navbar.html +2135 -1129
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.4-dev.
|
|
1
|
+
/*! UIkit 3.14.4-dev.4bd89c5ca | 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.4bd89c5ca';
|
|
2965
2951
|
|
|
2966
2952
|
globalAPI(UIkit);
|
|
2967
2953
|
hooksAPI(UIkit);
|
|
@@ -3259,7 +3245,7 @@
|
|
|
3259
3245
|
|
|
3260
3246
|
Transition.cancel(el);
|
|
3261
3247
|
|
|
3262
|
-
const [scrollElement] = scrollParents(el);
|
|
3248
|
+
const [scrollElement] = scrollParents(el.offsetParent);
|
|
3263
3249
|
css(scrollElement, 'overflowX', 'hidden');
|
|
3264
3250
|
|
|
3265
3251
|
if (!isToggled(el)) {
|
|
@@ -3270,17 +3256,11 @@
|
|
|
3270
3256
|
duration = velocity * width + duration;
|
|
3271
3257
|
|
|
3272
3258
|
const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
|
|
3273
|
-
const offsetEl = offset(el);
|
|
3274
|
-
const useClipPath = right ?
|
|
3275
|
-
offsetEl.right < scrollElement.clientWidth :
|
|
3276
|
-
Math.round(offsetEl.left) > 0;
|
|
3277
3259
|
|
|
3278
3260
|
css(el, {
|
|
3279
|
-
clipPath:
|
|
3280
|
-
right ? "polygon(0 0," +
|
|
3261
|
+
clipPath: right ? "polygon(0 0," +
|
|
3281
3262
|
percent + "% 0," + percent + "% 100%,0 100%)" : "polygon(" + (
|
|
3282
|
-
100 - percent) + "% 0,100% 0,100% 100%," + (100 - percent) + "% 100%)"
|
|
3283
|
-
'',
|
|
3263
|
+
100 - percent) + "% 0,100% 0,100% 100%," + (100 - percent) + "% 100%)",
|
|
3284
3264
|
marginLeft: (100 - percent) * (right ? 1 : -1) / 100 * width });
|
|
3285
3265
|
|
|
3286
3266
|
|
|
@@ -3289,7 +3269,7 @@
|
|
|
3289
3269
|
Transition.start(
|
|
3290
3270
|
el,
|
|
3291
3271
|
{
|
|
3292
|
-
clipPath:
|
|
3272
|
+
clipPath: "polygon(0 0,100% 0,100% 100%,0 100%)",
|
|
3293
3273
|
marginLeft: 0 },
|
|
3294
3274
|
|
|
3295
3275
|
duration * (1 - percent / 100),
|
|
@@ -3298,11 +3278,9 @@
|
|
|
3298
3278
|
Transition.start(
|
|
3299
3279
|
el,
|
|
3300
3280
|
{
|
|
3301
|
-
clipPath:
|
|
3302
|
-
right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)" :
|
|
3281
|
+
clipPath: right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)",
|
|
3303
3282
|
|
|
3304
3283
|
|
|
3305
|
-
'',
|
|
3306
3284
|
marginLeft: (right ? 1 : -1) * width },
|
|
3307
3285
|
|
|
3308
3286
|
duration * (percent / 100),
|
|
@@ -3698,17 +3676,32 @@
|
|
|
3698
3676
|
offset = offset.reverse();
|
|
3699
3677
|
}
|
|
3700
3678
|
|
|
3679
|
+
const [scrollElement] = scrollParents(element, /auto|scroll/);
|
|
3680
|
+
const { scrollTop, scrollLeft } = scrollElement;
|
|
3681
|
+
|
|
3701
3682
|
// Ensure none positioned element does not generate scrollbars
|
|
3702
3683
|
const elDim = dimensions$1(element);
|
|
3703
3684
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
3704
3685
|
|
|
3705
|
-
|
|
3686
|
+
const args = [
|
|
3687
|
+
element,
|
|
3688
|
+
target,
|
|
3689
|
+
{
|
|
3706
3690
|
attach,
|
|
3707
3691
|
offset,
|
|
3708
3692
|
boundary,
|
|
3709
3693
|
flip: this.flip,
|
|
3710
|
-
viewportOffset: this.getViewportOffset(element) }
|
|
3694
|
+
viewportOffset: this.getViewportOffset(element) }];
|
|
3695
|
+
|
|
3711
3696
|
|
|
3697
|
+
|
|
3698
|
+
trigger(element, 'beforeposition', args);
|
|
3699
|
+
|
|
3700
|
+
positionAt(...args);
|
|
3701
|
+
|
|
3702
|
+
// Restore scroll position
|
|
3703
|
+
scrollElement.scrollTop = scrollTop;
|
|
3704
|
+
scrollElement.scrollLeft = scrollLeft;
|
|
3712
3705
|
},
|
|
3713
3706
|
|
|
3714
3707
|
getPositionOffset(element) {
|
|
@@ -3837,7 +3830,7 @@
|
|
|
3837
3830
|
this.$el,
|
|
3838
3831
|
'hide',
|
|
3839
3832
|
on(document, 'focusin', (e) => {
|
|
3840
|
-
if (!within(e.target, this
|
|
3833
|
+
if (last(active$1) === this && !within(e.target, this.$el)) {
|
|
3841
3834
|
this.$el.focus();
|
|
3842
3835
|
}
|
|
3843
3836
|
}));
|
|
@@ -3858,7 +3851,7 @@
|
|
|
3858
3851
|
once(
|
|
3859
3852
|
this.$el,
|
|
3860
3853
|
'hide',
|
|
3861
|
-
on(document, pointerDown, (_ref3) => {let { target } = _ref3;
|
|
3854
|
+
on(document, pointerDown$1, (_ref3) => {let { target } = _ref3;
|
|
3862
3855
|
if (
|
|
3863
3856
|
last(active$1) !== this ||
|
|
3864
3857
|
this.overlay && !within(target, this.$el) ||
|
|
@@ -3869,11 +3862,11 @@
|
|
|
3869
3862
|
|
|
3870
3863
|
once(
|
|
3871
3864
|
document,
|
|
3872
|
-
pointerUp + " " + pointerCancel + " scroll",
|
|
3865
|
+
pointerUp$1 + " " + pointerCancel + " scroll",
|
|
3873
3866
|
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
3874
3867
|
if (
|
|
3875
3868
|
!defaultPrevented &&
|
|
3876
|
-
type === pointerUp &&
|
|
3869
|
+
type === pointerUp$1 &&
|
|
3877
3870
|
target === newTarget)
|
|
3878
3871
|
{
|
|
3879
3872
|
this.hide();
|
|
@@ -4265,16 +4258,16 @@
|
|
|
4265
4258
|
for (const handler of [
|
|
4266
4259
|
on(
|
|
4267
4260
|
document,
|
|
4268
|
-
pointerDown,
|
|
4261
|
+
pointerDown$1,
|
|
4269
4262
|
(_ref2) => {let { target } = _ref2;return (
|
|
4270
4263
|
!within(target, this.$el) &&
|
|
4271
4264
|
once(
|
|
4272
4265
|
document,
|
|
4273
|
-
pointerUp + " " + pointerCancel + " scroll",
|
|
4266
|
+
pointerUp$1 + " " + pointerCancel + " scroll",
|
|
4274
4267
|
(_ref3) => {let { defaultPrevented, type, target: newTarget } = _ref3;
|
|
4275
4268
|
if (
|
|
4276
4269
|
!defaultPrevented &&
|
|
4277
|
-
type === pointerUp &&
|
|
4270
|
+
type === pointerUp$1 &&
|
|
4278
4271
|
target === newTarget &&
|
|
4279
4272
|
!(this.target && within(target, this.target)))
|
|
4280
4273
|
{
|
|
@@ -4983,14 +4976,20 @@
|
|
|
4983
4976
|
0);
|
|
4984
4977
|
|
|
4985
4978
|
} else {
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4979
|
+
const { body, scrollingElement } = document;
|
|
4980
|
+
const isScrollingElement =
|
|
4981
|
+
scrollingElement === scrollElement || body === scrollElement;
|
|
4989
4982
|
|
|
4983
|
+
// on mobile devices (iOS and Android) window.innerHeight !== 100vh
|
|
4984
|
+
minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
|
|
4990
4985
|
|
|
4991
4986
|
if (this.offsetTop) {
|
|
4992
|
-
|
|
4993
|
-
|
|
4987
|
+
if (isScrollingElement) {
|
|
4988
|
+
const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
|
|
4989
|
+
minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
|
|
4990
|
+
} else {
|
|
4991
|
+
minHeight += " - " + css(scrollElement, 'paddingTop');
|
|
4992
|
+
}
|
|
4994
4993
|
}
|
|
4995
4994
|
|
|
4996
4995
|
if (this.offsetBottom === true) {
|
|
@@ -5911,8 +5910,7 @@
|
|
|
5911
5910
|
{
|
|
5912
5911
|
...this.$props,
|
|
5913
5912
|
boundary: this.boundary,
|
|
5914
|
-
pos: this.pos
|
|
5915
|
-
offset: this.dropbar || this.offset });
|
|
5913
|
+
pos: this.pos });
|
|
5916
5914
|
|
|
5917
5915
|
|
|
5918
5916
|
},
|
|
@@ -6073,8 +6071,8 @@
|
|
|
6073
6071
|
return this.dropbar;
|
|
6074
6072
|
},
|
|
6075
6073
|
|
|
6076
|
-
handler(
|
|
6077
|
-
if (!
|
|
6074
|
+
handler(_ref9) {let { target } = _ref9;
|
|
6075
|
+
if (!this.isDropbarDrop(target)) {
|
|
6078
6076
|
return;
|
|
6079
6077
|
}
|
|
6080
6078
|
|
|
@@ -6082,7 +6080,7 @@
|
|
|
6082
6080
|
after(this.dropbarAnchor || this.$el, this.dropbar);
|
|
6083
6081
|
}
|
|
6084
6082
|
|
|
6085
|
-
addClass(
|
|
6083
|
+
addClass(target, this.clsDrop + "-dropbar");
|
|
6086
6084
|
} },
|
|
6087
6085
|
|
|
6088
6086
|
|
|
@@ -6097,22 +6095,47 @@
|
|
|
6097
6095
|
return this.dropbar;
|
|
6098
6096
|
},
|
|
6099
6097
|
|
|
6100
|
-
handler(
|
|
6101
|
-
if (!
|
|
6098
|
+
handler(_ref10) {let { target } = _ref10;
|
|
6099
|
+
if (!this.isDropbarDrop(target)) {
|
|
6102
6100
|
return;
|
|
6103
6101
|
}
|
|
6104
6102
|
|
|
6105
|
-
this._observer = observeResize(
|
|
6103
|
+
this._observer = observeResize(target, () =>
|
|
6106
6104
|
this.transitionTo(
|
|
6107
|
-
offset(
|
|
6105
|
+
offset(target).bottom -
|
|
6108
6106
|
offset(this.dropbar).top +
|
|
6109
|
-
toFloat(css(
|
|
6110
|
-
|
|
6107
|
+
toFloat(css(target, 'marginBottom')),
|
|
6108
|
+
target));
|
|
6111
6109
|
|
|
6112
6110
|
|
|
6113
6111
|
} },
|
|
6114
6112
|
|
|
6115
6113
|
|
|
6114
|
+
{
|
|
6115
|
+
name: 'beforeposition',
|
|
6116
|
+
|
|
6117
|
+
el() {
|
|
6118
|
+
return this.dropContainer;
|
|
6119
|
+
},
|
|
6120
|
+
|
|
6121
|
+
filter() {
|
|
6122
|
+
return this.dropbar;
|
|
6123
|
+
},
|
|
6124
|
+
|
|
6125
|
+
handler(e, element, target, options) {
|
|
6126
|
+
if (!this.isDropbarDrop(element)) {
|
|
6127
|
+
return;
|
|
6128
|
+
}
|
|
6129
|
+
|
|
6130
|
+
const dropbarOffset = offset(this.dropbar);
|
|
6131
|
+
|
|
6132
|
+
css(element, 'maxWidth', dropbarOffset.width - options.viewportOffset * 2);
|
|
6133
|
+
|
|
6134
|
+
options.offset[1] = dropbarOffset.top - offset(target).bottom;
|
|
6135
|
+
options.viewportOffset += dropbarOffset.left;
|
|
6136
|
+
} },
|
|
6137
|
+
|
|
6138
|
+
|
|
6116
6139
|
{
|
|
6117
6140
|
name: 'beforehide',
|
|
6118
6141
|
|
|
@@ -6124,12 +6147,12 @@
|
|
|
6124
6147
|
return this.dropbar;
|
|
6125
6148
|
},
|
|
6126
6149
|
|
|
6127
|
-
handler(e
|
|
6150
|
+
handler(e) {
|
|
6128
6151
|
const active = this.getActive();
|
|
6129
6152
|
|
|
6130
6153
|
if (
|
|
6131
6154
|
matches(this.dropbar, ':hover') &&
|
|
6132
|
-
(active == null ? void 0 : active.$el) ===
|
|
6155
|
+
(active == null ? void 0 : active.$el) === e.target &&
|
|
6133
6156
|
!this.toggles.some((el) => active.target !== el && matches(el, ':focus')))
|
|
6134
6157
|
{
|
|
6135
6158
|
e.preventDefault();
|
|
@@ -6148,8 +6171,8 @@
|
|
|
6148
6171
|
return this.dropbar;
|
|
6149
6172
|
},
|
|
6150
6173
|
|
|
6151
|
-
handler(
|
|
6152
|
-
if (!
|
|
6174
|
+
handler(_ref11) {let { target } = _ref11;
|
|
6175
|
+
if (!this.isDropbarDrop(target)) {
|
|
6153
6176
|
return;
|
|
6154
6177
|
}
|
|
6155
6178
|
|
|
@@ -6157,7 +6180,7 @@
|
|
|
6157
6180
|
|
|
6158
6181
|
const active = this.getActive();
|
|
6159
6182
|
|
|
6160
|
-
if (!active || (active == null ? void 0 : active.$el) ===
|
|
6183
|
+
if (!active || (active == null ? void 0 : active.$el) === target) {
|
|
6161
6184
|
this.transitionTo(0);
|
|
6162
6185
|
}
|
|
6163
6186
|
} }],
|
|
@@ -6196,6 +6219,11 @@
|
|
|
6196
6219
|
|
|
6197
6220
|
getDropdown(el) {
|
|
6198
6221
|
return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown');
|
|
6222
|
+
},
|
|
6223
|
+
|
|
6224
|
+
isDropbarDrop(el) {
|
|
6225
|
+
const drop = this.getDropdown(el);
|
|
6226
|
+
return drop && hasClass(el, this.clsDrop) && drop.align !== 'stretch';
|
|
6199
6227
|
} } };
|
|
6200
6228
|
|
|
6201
6229
|
|
|
@@ -6259,7 +6287,7 @@
|
|
|
6259
6287
|
|
|
6260
6288
|
registerEvent(this, {
|
|
6261
6289
|
el: this.swipeTarget,
|
|
6262
|
-
name: pointerDown,
|
|
6290
|
+
name: pointerDown$1,
|
|
6263
6291
|
passive: true,
|
|
6264
6292
|
handler(e) {
|
|
6265
6293
|
if (!isTouch(e)) {
|
|
@@ -6269,7 +6297,7 @@
|
|
|
6269
6297
|
// Handle Swipe Gesture
|
|
6270
6298
|
const pos = getEventPos(e);
|
|
6271
6299
|
const target = 'tagName' in e.target ? e.target : parent(e.target);
|
|
6272
|
-
once(document, pointerUp + " " + pointerCancel + " scroll", (e) => {
|
|
6300
|
+
once(document, pointerUp$1 + " " + pointerCancel + " scroll", (e) => {
|
|
6273
6301
|
const { x, y } = getEventPos(e);
|
|
6274
6302
|
|
|
6275
6303
|
// swipe
|
|
@@ -6921,7 +6949,9 @@
|
|
|
6921
6949
|
},
|
|
6922
6950
|
|
|
6923
6951
|
handler() {
|
|
6924
|
-
|
|
6952
|
+
const { scrollingElement } = document;
|
|
6953
|
+
|
|
6954
|
+
if (!location.hash || scrollingElement.scrollTop === 0) {
|
|
6925
6955
|
return;
|
|
6926
6956
|
}
|
|
6927
6957
|
|
|
@@ -6930,13 +6960,11 @@
|
|
|
6930
6960
|
const elOffset = offset(this.$el);
|
|
6931
6961
|
|
|
6932
6962
|
if (this.isFixed && intersectRect(targetOffset, elOffset)) {
|
|
6933
|
-
scrollTop
|
|
6934
|
-
window,
|
|
6963
|
+
scrollingElement.scrollTop =
|
|
6935
6964
|
targetOffset.top -
|
|
6936
6965
|
elOffset.height -
|
|
6937
6966
|
toPx(this.targetOffset, 'height', this.placeholder) -
|
|
6938
|
-
toPx(this.offset, 'height', this.placeholder)
|
|
6939
|
-
|
|
6967
|
+
toPx(this.offset, 'height', this.placeholder);
|
|
6940
6968
|
}
|
|
6941
6969
|
});
|
|
6942
6970
|
} }],
|
|
@@ -7034,7 +7062,7 @@
|
|
|
7034
7062
|
|
|
7035
7063
|
|
|
7036
7064
|
{let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref4;
|
|
7037
|
-
const scroll = scrollTop
|
|
7065
|
+
const scroll = document.scrollingElement.scrollTop;
|
|
7038
7066
|
const dir = prevScroll <= scroll ? 'down' : 'up';
|
|
7039
7067
|
|
|
7040
7068
|
return {
|
|
@@ -7443,7 +7471,7 @@
|
|
|
7443
7471
|
|
|
7444
7472
|
events: [
|
|
7445
7473
|
{
|
|
7446
|
-
name: pointerDown,
|
|
7474
|
+
name: pointerDown$1,
|
|
7447
7475
|
|
|
7448
7476
|
filter() {
|
|
7449
7477
|
return includes(this.mode, 'hover');
|
|
@@ -7461,7 +7489,7 @@
|
|
|
7461
7489
|
trigger(this.$el, 'focus');
|
|
7462
7490
|
once(
|
|
7463
7491
|
document,
|
|
7464
|
-
pointerDown,
|
|
7492
|
+
pointerDown$1,
|
|
7465
7493
|
() => trigger(this.$el, 'blur'),
|
|
7466
7494
|
true,
|
|
7467
7495
|
(e) => !within(e.target, this.$el));
|
|
@@ -8153,7 +8181,7 @@
|
|
|
8153
8181
|
|
|
8154
8182
|
},
|
|
8155
8183
|
|
|
8156
|
-
setState(state, animate) {if (animate === void 0) {animate = true;}
|
|
8184
|
+
async setState(state, animate) {if (animate === void 0) {animate = true;}
|
|
8157
8185
|
state = { filter: { '': '' }, sort: [], ...state };
|
|
8158
8186
|
|
|
8159
8187
|
trigger(this.$el, 'beforeFilter', [this, state]);
|
|
@@ -8162,15 +8190,17 @@
|
|
|
8162
8190
|
toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state)));
|
|
8163
8191
|
|
|
8164
8192
|
|
|
8165
|
-
Promise.all(
|
|
8193
|
+
await Promise.all(
|
|
8166
8194
|
$$(this.target, this.$el).map((target) => {
|
|
8167
8195
|
const filterFn = () => {
|
|
8168
8196
|
applyState(state, target, children(target));
|
|
8169
8197
|
this.$update(this.$el);
|
|
8170
8198
|
};
|
|
8171
8199
|
return animate ? this.animate(filterFn, target) : filterFn();
|
|
8172
|
-
}))
|
|
8173
|
-
|
|
8200
|
+
}));
|
|
8201
|
+
|
|
8202
|
+
|
|
8203
|
+
trigger(this.$el, 'afterFilter', [this]);
|
|
8174
8204
|
},
|
|
8175
8205
|
|
|
8176
8206
|
updateState() {
|
|
@@ -8460,6 +8490,11 @@
|
|
|
8460
8490
|
this.interval && clearInterval(this.interval);
|
|
8461
8491
|
} } };
|
|
8462
8492
|
|
|
8493
|
+
const pointerOptions = { passive: false, capture: true };
|
|
8494
|
+
const pointerDown = 'touchstart mousedown';
|
|
8495
|
+
const pointerMove = 'touchmove mousemove';
|
|
8496
|
+
const pointerUp = 'touchend touchcancel mouseup click input';
|
|
8497
|
+
|
|
8463
8498
|
var SliderDrag = {
|
|
8464
8499
|
props: {
|
|
8465
8500
|
draggable: Boolean },
|
|
@@ -8512,7 +8547,17 @@
|
|
|
8512
8547
|
|
|
8513
8548
|
handler(e) {
|
|
8514
8549
|
e.preventDefault();
|
|
8515
|
-
} }
|
|
8550
|
+
} },
|
|
8551
|
+
|
|
8552
|
+
|
|
8553
|
+
{
|
|
8554
|
+
// iOS workaround for slider stopping if swiping fast
|
|
8555
|
+
name: pointerMove + " " + pointerUp,
|
|
8556
|
+
el() {
|
|
8557
|
+
return this.list;
|
|
8558
|
+
},
|
|
8559
|
+
handler: noop,
|
|
8560
|
+
...pointerOptions }],
|
|
8516
8561
|
|
|
8517
8562
|
|
|
8518
8563
|
|
|
@@ -8534,10 +8579,10 @@
|
|
|
8534
8579
|
this.prevIndex = this.index;
|
|
8535
8580
|
}
|
|
8536
8581
|
|
|
8537
|
-
on(document, pointerMove, this.move,
|
|
8582
|
+
on(document, pointerMove, this.move, pointerOptions);
|
|
8538
8583
|
|
|
8539
8584
|
// 'input' event is triggered by video controls
|
|
8540
|
-
on(document, pointerUp
|
|
8585
|
+
on(document, pointerUp, this.end, pointerOptions);
|
|
8541
8586
|
|
|
8542
8587
|
css(this.list, 'userSelect', 'none');
|
|
8543
8588
|
},
|
|
@@ -8617,8 +8662,8 @@
|
|
|
8617
8662
|
},
|
|
8618
8663
|
|
|
8619
8664
|
end() {
|
|
8620
|
-
off(document, pointerMove, this.move,
|
|
8621
|
-
off(document, pointerUp
|
|
8665
|
+
off(document, pointerMove, this.move, pointerOptions);
|
|
8666
|
+
off(document, pointerUp, this.end, pointerOptions);
|
|
8622
8667
|
|
|
8623
8668
|
if (this.dragging) {
|
|
8624
8669
|
this.dragging = null;
|
|
@@ -9026,7 +9071,7 @@
|
|
|
9026
9071
|
|
|
9027
9072
|
events: [
|
|
9028
9073
|
{
|
|
9029
|
-
name: pointerMove + " " + pointerDown + " keydown",
|
|
9074
|
+
name: pointerMove$1 + " " + pointerDown$1 + " keydown",
|
|
9030
9075
|
|
|
9031
9076
|
handler: 'showControls' },
|
|
9032
9077
|
|
|
@@ -10681,7 +10726,7 @@
|
|
|
10681
10726
|
},
|
|
10682
10727
|
|
|
10683
10728
|
events: {
|
|
10684
|
-
name: pointerDown,
|
|
10729
|
+
name: pointerDown$1,
|
|
10685
10730
|
passive: false,
|
|
10686
10731
|
handler: 'init' },
|
|
10687
10732
|
|
|
@@ -10811,8 +10856,8 @@
|
|
|
10811
10856
|
this.placeholder = placeholder;
|
|
10812
10857
|
this.origin = { target, index: index(placeholder), ...this.pos };
|
|
10813
10858
|
|
|
10814
|
-
on(document, pointerMove, this.move);
|
|
10815
|
-
on(document, pointerUp, this.end);
|
|
10859
|
+
on(document, pointerMove$1, this.move);
|
|
10860
|
+
on(document, pointerUp$1, this.end);
|
|
10816
10861
|
|
|
10817
10862
|
if (!this.threshold) {
|
|
10818
10863
|
this.start(e);
|
|
@@ -10848,8 +10893,8 @@
|
|
|
10848
10893
|
},
|
|
10849
10894
|
|
|
10850
10895
|
end() {
|
|
10851
|
-
off(document, pointerMove, this.move);
|
|
10852
|
-
off(document, pointerUp, this.end);
|
|
10896
|
+
off(document, pointerMove$1, this.move);
|
|
10897
|
+
off(document, pointerUp$1, this.end);
|
|
10853
10898
|
|
|
10854
10899
|
if (!this.drag) {
|
|
10855
10900
|
return;
|
|
@@ -10918,7 +10963,7 @@
|
|
|
10918
10963
|
let last = Date.now();
|
|
10919
10964
|
trackTimer = setInterval(() => {
|
|
10920
10965
|
let { x, y } = pos;
|
|
10921
|
-
y += scrollTop
|
|
10966
|
+
y += document.scrollingElement.scrollTop;
|
|
10922
10967
|
|
|
10923
10968
|
const dist = (Date.now() - last) * 0.3;
|
|
10924
10969
|
last = Date.now();
|
|
@@ -10939,7 +10984,7 @@
|
|
|
10939
10984
|
}
|
|
10940
10985
|
|
|
10941
10986
|
if (scroll > 0 && scroll < scrollHeight - height) {
|
|
10942
|
-
scrollTop
|
|
10987
|
+
scrollEl.scrollTop = scroll;
|
|
10943
10988
|
return true;
|
|
10944
10989
|
}
|
|
10945
10990
|
});
|
|
@@ -11084,11 +11129,11 @@
|
|
|
11084
11129
|
|
|
11085
11130
|
this._unbind = once(
|
|
11086
11131
|
document, "show keydown " +
|
|
11087
|
-
pointerDown,
|
|
11132
|
+
pointerDown$1,
|
|
11088
11133
|
this.hide,
|
|
11089
11134
|
false,
|
|
11090
11135
|
(e) =>
|
|
11091
|
-
e.type === pointerDown && !within(e.target, this.$el) ||
|
|
11136
|
+
e.type === pointerDown$1 && !within(e.target, this.$el) ||
|
|
11092
11137
|
e.type === 'keydown' && e.keyCode === 27 ||
|
|
11093
11138
|
e.type === 'show' && e.detail[0] !== this && e.detail[0].$name === this.$name);
|
|
11094
11139
|
|
|
@@ -11159,7 +11204,7 @@
|
|
|
11159
11204
|
|
|
11160
11205
|
// Clicking a button does not give it focus on all browsers and platforms
|
|
11161
11206
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
|
|
11162
|
-
[pointerDown](e) {
|
|
11207
|
+
[pointerDown$1](e) {
|
|
11163
11208
|
if (isTouch(e)) {
|
|
11164
11209
|
this.show();
|
|
11165
11210
|
}
|