uikit 3.14.4-dev.310965bc8 → 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 +6 -0
- package/dist/css/uikit-core-rtl.css +93 -14
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +93 -14
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +93 -15
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +93 -15
- 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 +6 -14
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +6 -14
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +1 -1
- 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 +16 -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 +73 -58
- 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 +81 -64
- 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 +3 -1
- package/src/js/core/navbar.js +44 -15
- package/src/js/core/sticky.js +8 -9
- package/src/js/mixin/position.js +16 -7
- package/src/js/mixin/togglable.js +8 -17
- package/src/js/util/position.js +1 -2
- package/src/js/util/viewport.js +2 -27
- package/src/less/components/dropdown.less +8 -0
- package/src/less/components/navbar.less +106 -14
- package/src/less/theme/navbar.less +12 -6
- package/src/scss/components/dropdown.scss +8 -0
- package/src/scss/components/nav.scss +2 -2
- package/src/scss/components/navbar.scss +82 -14
- package/src/scss/mixins-theme.scss +25 -4
- package/src/scss/mixins.scss +24 -0
- package/src/scss/theme/navbar.scss +11 -2
- package/src/scss/variables-theme.scss +21 -6
- package/src/scss/variables.scss +21 -5
- package/tests/drop.html +66 -16
- package/tests/dropdown.html +103 -16
- package/tests/navbar.html +285 -53
package/dist/js/uikit-core.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() :
|
|
@@ -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) {
|
|
@@ -2105,9 +2091,8 @@
|
|
|
2105
2091
|
if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
|
|
2106
2092
|
return newPos;
|
|
2107
2093
|
}
|
|
2108
|
-
|
|
2109
|
-
continue;
|
|
2110
2094
|
}
|
|
2095
|
+
continue;
|
|
2111
2096
|
}
|
|
2112
2097
|
|
|
2113
2098
|
// Move
|
|
@@ -2300,7 +2285,6 @@
|
|
|
2300
2285
|
getCssVar: getCssVar,
|
|
2301
2286
|
propName: propName,
|
|
2302
2287
|
isInView: isInView,
|
|
2303
|
-
scrollTop: scrollTop,
|
|
2304
2288
|
scrollIntoView: scrollIntoView,
|
|
2305
2289
|
scrolledOver: scrolledOver,
|
|
2306
2290
|
scrollParents: scrollParents,
|
|
@@ -2963,7 +2947,7 @@
|
|
|
2963
2947
|
UIkit.data = '__uikit__';
|
|
2964
2948
|
UIkit.prefix = 'uk-';
|
|
2965
2949
|
UIkit.options = {};
|
|
2966
|
-
UIkit.version = '3.14.4-dev.
|
|
2950
|
+
UIkit.version = '3.14.4-dev.4bd89c5ca';
|
|
2967
2951
|
|
|
2968
2952
|
globalAPI(UIkit);
|
|
2969
2953
|
hooksAPI(UIkit);
|
|
@@ -3261,7 +3245,7 @@
|
|
|
3261
3245
|
|
|
3262
3246
|
Transition.cancel(el);
|
|
3263
3247
|
|
|
3264
|
-
const [scrollElement] = scrollParents(el);
|
|
3248
|
+
const [scrollElement] = scrollParents(el.offsetParent);
|
|
3265
3249
|
css(scrollElement, 'overflowX', 'hidden');
|
|
3266
3250
|
|
|
3267
3251
|
if (!isToggled(el)) {
|
|
@@ -3272,17 +3256,11 @@
|
|
|
3272
3256
|
duration = velocity * width + duration;
|
|
3273
3257
|
|
|
3274
3258
|
const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
|
|
3275
|
-
const offsetEl = offset(el);
|
|
3276
|
-
const useClipPath = right ?
|
|
3277
|
-
offsetEl.right < scrollElement.clientWidth :
|
|
3278
|
-
Math.round(offsetEl.left) > 0;
|
|
3279
3259
|
|
|
3280
3260
|
css(el, {
|
|
3281
|
-
clipPath:
|
|
3282
|
-
right ? "polygon(0 0," +
|
|
3261
|
+
clipPath: right ? "polygon(0 0," +
|
|
3283
3262
|
percent + "% 0," + percent + "% 100%,0 100%)" : "polygon(" + (
|
|
3284
|
-
100 - percent) + "% 0,100% 0,100% 100%," + (100 - percent) + "% 100%)"
|
|
3285
|
-
'',
|
|
3263
|
+
100 - percent) + "% 0,100% 0,100% 100%," + (100 - percent) + "% 100%)",
|
|
3286
3264
|
marginLeft: (100 - percent) * (right ? 1 : -1) / 100 * width });
|
|
3287
3265
|
|
|
3288
3266
|
|
|
@@ -3291,7 +3269,7 @@
|
|
|
3291
3269
|
Transition.start(
|
|
3292
3270
|
el,
|
|
3293
3271
|
{
|
|
3294
|
-
clipPath:
|
|
3272
|
+
clipPath: "polygon(0 0,100% 0,100% 100%,0 100%)",
|
|
3295
3273
|
marginLeft: 0 },
|
|
3296
3274
|
|
|
3297
3275
|
duration * (1 - percent / 100),
|
|
@@ -3300,11 +3278,9 @@
|
|
|
3300
3278
|
Transition.start(
|
|
3301
3279
|
el,
|
|
3302
3280
|
{
|
|
3303
|
-
clipPath:
|
|
3304
|
-
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%)",
|
|
3305
3282
|
|
|
3306
3283
|
|
|
3307
|
-
'',
|
|
3308
3284
|
marginLeft: (right ? 1 : -1) * width },
|
|
3309
3285
|
|
|
3310
3286
|
duration * (percent / 100),
|
|
@@ -3707,13 +3683,21 @@
|
|
|
3707
3683
|
const elDim = dimensions(element);
|
|
3708
3684
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
3709
3685
|
|
|
3710
|
-
|
|
3686
|
+
const args = [
|
|
3687
|
+
element,
|
|
3688
|
+
target,
|
|
3689
|
+
{
|
|
3711
3690
|
attach,
|
|
3712
3691
|
offset,
|
|
3713
3692
|
boundary,
|
|
3714
3693
|
flip: this.flip,
|
|
3715
|
-
viewportOffset: this.getViewportOffset(element) }
|
|
3694
|
+
viewportOffset: this.getViewportOffset(element) }];
|
|
3695
|
+
|
|
3696
|
+
|
|
3697
|
+
|
|
3698
|
+
trigger(element, 'beforeposition', args);
|
|
3716
3699
|
|
|
3700
|
+
positionAt(...args);
|
|
3717
3701
|
|
|
3718
3702
|
// Restore scroll position
|
|
3719
3703
|
scrollElement.scrollTop = scrollTop;
|
|
@@ -4992,7 +4976,9 @@
|
|
|
4992
4976
|
0);
|
|
4993
4977
|
|
|
4994
4978
|
} else {
|
|
4995
|
-
const
|
|
4979
|
+
const { body, scrollingElement } = document;
|
|
4980
|
+
const isScrollingElement =
|
|
4981
|
+
scrollingElement === scrollElement || body === scrollElement;
|
|
4996
4982
|
|
|
4997
4983
|
// on mobile devices (iOS and Android) window.innerHeight !== 100vh
|
|
4998
4984
|
minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
|
|
@@ -5924,8 +5910,7 @@
|
|
|
5924
5910
|
{
|
|
5925
5911
|
...this.$props,
|
|
5926
5912
|
boundary: this.boundary,
|
|
5927
|
-
pos: this.pos
|
|
5928
|
-
offset: this.dropbar || this.offset });
|
|
5913
|
+
pos: this.pos });
|
|
5929
5914
|
|
|
5930
5915
|
|
|
5931
5916
|
},
|
|
@@ -6086,8 +6071,8 @@
|
|
|
6086
6071
|
return this.dropbar;
|
|
6087
6072
|
},
|
|
6088
6073
|
|
|
6089
|
-
handler(
|
|
6090
|
-
if (!
|
|
6074
|
+
handler(_ref9) {let { target } = _ref9;
|
|
6075
|
+
if (!this.isDropbarDrop(target)) {
|
|
6091
6076
|
return;
|
|
6092
6077
|
}
|
|
6093
6078
|
|
|
@@ -6095,7 +6080,7 @@
|
|
|
6095
6080
|
after(this.dropbarAnchor || this.$el, this.dropbar);
|
|
6096
6081
|
}
|
|
6097
6082
|
|
|
6098
|
-
addClass(
|
|
6083
|
+
addClass(target, this.clsDrop + "-dropbar");
|
|
6099
6084
|
} },
|
|
6100
6085
|
|
|
6101
6086
|
|
|
@@ -6110,19 +6095,44 @@
|
|
|
6110
6095
|
return this.dropbar;
|
|
6111
6096
|
},
|
|
6112
6097
|
|
|
6113
|
-
handler(
|
|
6114
|
-
if (!
|
|
6098
|
+
handler(_ref10) {let { target } = _ref10;
|
|
6099
|
+
if (!this.isDropbarDrop(target)) {
|
|
6115
6100
|
return;
|
|
6116
6101
|
}
|
|
6117
6102
|
|
|
6118
|
-
this._observer = observeResize(
|
|
6103
|
+
this._observer = observeResize(target, () =>
|
|
6119
6104
|
this.transitionTo(
|
|
6120
|
-
offset(
|
|
6105
|
+
offset(target).bottom -
|
|
6121
6106
|
offset(this.dropbar).top +
|
|
6122
|
-
toFloat(css(
|
|
6123
|
-
|
|
6107
|
+
toFloat(css(target, 'marginBottom')),
|
|
6108
|
+
target));
|
|
6109
|
+
|
|
6110
|
+
|
|
6111
|
+
} },
|
|
6112
|
+
|
|
6124
6113
|
|
|
6114
|
+
{
|
|
6115
|
+
name: 'beforeposition',
|
|
6116
|
+
|
|
6117
|
+
el() {
|
|
6118
|
+
return this.dropContainer;
|
|
6119
|
+
},
|
|
6125
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;
|
|
6126
6136
|
} },
|
|
6127
6137
|
|
|
6128
6138
|
|
|
@@ -6137,12 +6147,12 @@
|
|
|
6137
6147
|
return this.dropbar;
|
|
6138
6148
|
},
|
|
6139
6149
|
|
|
6140
|
-
handler(e
|
|
6150
|
+
handler(e) {
|
|
6141
6151
|
const active = this.getActive();
|
|
6142
6152
|
|
|
6143
6153
|
if (
|
|
6144
6154
|
matches(this.dropbar, ':hover') &&
|
|
6145
|
-
(active == null ? void 0 : active.$el) ===
|
|
6155
|
+
(active == null ? void 0 : active.$el) === e.target &&
|
|
6146
6156
|
!this.toggles.some((el) => active.target !== el && matches(el, ':focus')))
|
|
6147
6157
|
{
|
|
6148
6158
|
e.preventDefault();
|
|
@@ -6161,8 +6171,8 @@
|
|
|
6161
6171
|
return this.dropbar;
|
|
6162
6172
|
},
|
|
6163
6173
|
|
|
6164
|
-
handler(
|
|
6165
|
-
if (!
|
|
6174
|
+
handler(_ref11) {let { target } = _ref11;
|
|
6175
|
+
if (!this.isDropbarDrop(target)) {
|
|
6166
6176
|
return;
|
|
6167
6177
|
}
|
|
6168
6178
|
|
|
@@ -6170,7 +6180,7 @@
|
|
|
6170
6180
|
|
|
6171
6181
|
const active = this.getActive();
|
|
6172
6182
|
|
|
6173
|
-
if (!active || (active == null ? void 0 : active.$el) ===
|
|
6183
|
+
if (!active || (active == null ? void 0 : active.$el) === target) {
|
|
6174
6184
|
this.transitionTo(0);
|
|
6175
6185
|
}
|
|
6176
6186
|
} }],
|
|
@@ -6209,6 +6219,11 @@
|
|
|
6209
6219
|
|
|
6210
6220
|
getDropdown(el) {
|
|
6211
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';
|
|
6212
6227
|
} } };
|
|
6213
6228
|
|
|
6214
6229
|
|
|
@@ -6934,7 +6949,9 @@
|
|
|
6934
6949
|
},
|
|
6935
6950
|
|
|
6936
6951
|
handler() {
|
|
6937
|
-
|
|
6952
|
+
const { scrollingElement } = document;
|
|
6953
|
+
|
|
6954
|
+
if (!location.hash || scrollingElement.scrollTop === 0) {
|
|
6938
6955
|
return;
|
|
6939
6956
|
}
|
|
6940
6957
|
|
|
@@ -6943,13 +6960,11 @@
|
|
|
6943
6960
|
const elOffset = offset(this.$el);
|
|
6944
6961
|
|
|
6945
6962
|
if (this.isFixed && intersectRect(targetOffset, elOffset)) {
|
|
6946
|
-
scrollTop
|
|
6947
|
-
window,
|
|
6963
|
+
scrollingElement.scrollTop =
|
|
6948
6964
|
targetOffset.top -
|
|
6949
6965
|
elOffset.height -
|
|
6950
6966
|
toPx(this.targetOffset, 'height', this.placeholder) -
|
|
6951
|
-
toPx(this.offset, 'height', this.placeholder)
|
|
6952
|
-
|
|
6967
|
+
toPx(this.offset, 'height', this.placeholder);
|
|
6953
6968
|
}
|
|
6954
6969
|
});
|
|
6955
6970
|
} }],
|
|
@@ -7047,7 +7062,7 @@
|
|
|
7047
7062
|
|
|
7048
7063
|
|
|
7049
7064
|
{let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref4;
|
|
7050
|
-
const scroll = scrollTop
|
|
7065
|
+
const scroll = document.scrollingElement.scrollTop;
|
|
7051
7066
|
const dir = prevScroll <= scroll ? 'down' : 'up';
|
|
7052
7067
|
|
|
7053
7068
|
return {
|