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
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.14.4-dev.
|
|
1
|
+
/*! UIkit 3.14.4-dev.4bd89c5ca | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,l){typeof exports=="object"&&typeof module<"u"?module.exports=l(require("uikit-util")):typeof define=="function"&&define.amd?define("uikittooltip",["uikit-util"],l):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitTooltip=l(s.UIkit.util))})(this,function(s){"use strict";var l={props:{container:Boolean},data:{container:!0},computed:{container(o){let{container:t}=o;return t===!0&&this.$container||t&&s.$(t)}}},b={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",maxHeight:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:"",boxShadow:""},hideProps:{overflow:"hidden",maxHeight:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0,boxShadow:"none"}},computed:{hasAnimation(o){let{animation:t}=o;return!!t[0]},hasTransition(o){let{animation:t}=o;return s.startsWith(t[0],"slide")}},methods:{toggleElement(o,t,r){return new Promise(n=>Promise.all(s.toNodes(o).map(a=>{const i=s.isBoolean(t)?t:!this.isToggled(a);if(!s.trigger(a,"before"+(i?"show":"hide"),[this]))return Promise.reject();const c=(s.isFunction(r)?r:r===!1||!this.hasAnimation?y(this):this.hasTransition?P(this):x(this))(a,i),h=i?this.clsEnter:this.clsLeave;s.addClass(a,h),s.trigger(a,i?"show":"hide",[this]);const e=()=>{s.removeClass(a,h),s.trigger(a,i?"shown":"hidden",[this]),this.$update(a)};return c?c.then(e,()=>(s.removeClass(a,h),Promise.reject())):e()})).then(n,s.noop))},isToggled(o){return o===void 0&&(o=this.$el),[o]=s.toNodes(o),s.hasClass(o,this.clsEnter)?!0:s.hasClass(o,this.clsLeave)?!1:this.cls?s.hasClass(o,this.cls.split(" ")[0]):s.isVisible(o)},_toggle(o,t){if(!o)return;t=Boolean(t);let r;this.cls?(r=s.includes(this.cls," ")||t!==s.hasClass(o,this.cls),r&&s.toggleClass(o,this.cls,s.includes(this.cls," ")?void 0:t)):(r=t===o.hidden,r&&(o.hidden=!t)),s.$$("[autofocus]",o).some(n=>s.isVisible(n)?n.focus()||!0:n.blur()),r&&(s.trigger(o,"toggled",[t,this]),this.$update(o))}}};function y(o){let{_toggle:t}=o;return(r,n)=>(s.Animation.cancel(r),s.Transition.cancel(r),t(r,n))}function P(o){switch(o.animation[0]){case"slide-left":return T(o);case"slide-right":return T(o,!0)}return u(o)}function u(o){let{isToggled:t,duration:r,velocity:n,initProps:a,hideProps:i,transition:c,_toggle:h}=o;return(e,f)=>{const g=s.Transition.inProgress(e),m=!g&&e.hasChildNodes()?s.toFloat(s.css(e.firstElementChild,"marginTop"))+s.toFloat(s.css(e.lastElementChild,"marginBottom")):0,d=s.isVisible(e)?s.toFloat(s.css(e,"height"))+m:0,p=g?s.css(e,Object.keys(a)):f?i:a;s.Transition.cancel(e),t(e)||h(e,!0),s.css(e,"maxHeight",""),s.fastdom.flush();const w=s.toFloat(s.css(e,"height"))+m;return r=n*w+r,s.css(e,{...p,maxHeight:d}),(f?s.Transition.start(e,{...a,overflow:"hidden",maxHeight:w},r*(1-d/w),c):s.Transition.start(e,i,r*(d/w),c).then(()=>h(e,!1))).then(()=>s.css(e,a))}}function T(o,t){let{isToggled:r,duration:n,velocity:a,transition:i,_toggle:c}=o;return(h,e)=>{const f=s.isVisible(h),g=s.toFloat(s.css(h,"marginLeft"));s.Transition.cancel(h);const[m]=s.scrollParents(h.offsetParent);s.css(m,"overflowX","hidden"),r(h)||c(h,!0);const d=s.toFloat(s.css(h,"width"));n=a*d+n;const p=f?(d+g*(t?-1:1))/d*100:0;return s.css(h,{clipPath:t?"polygon(0 0,"+p+"% 0,"+p+"% 100%,0 100%)":"polygon("+(100-p)+"% 0,100% 0,100% 100%,"+(100-p)+"% 100%)",marginLeft:(100-p)*(t?1:-1)/100*d}),(e?s.Transition.start(h,{clipPath:"polygon(0 0,100% 0,100% 100%,0 100%)",marginLeft:0},n*(1-p/100),i):s.Transition.start(h,{clipPath:t?"polygon(0 0,0 0,0 100%,0 100%)":"polygon(100% 0,100% 0,100% 100%,100% 100%)",marginLeft:(t?1:-1)*d},n*(p/100),i).then(()=>c(h,!1))).then(()=>{s.css(m,"overflowX",""),s.css(h,{clipPath:"",marginLeft:""})})}}function x(o){return(t,r)=>{s.Animation.cancel(t);const{animation:n,duration:a,_toggle:i}=o;return r?(i(t,!0),s.Animation.in(t,n[0],a,o.origin)):s.Animation.out(t,n[1]||n[0],a,o.origin).then(()=>i(t,!1))}}var $={props:{pos:String,offset:null,flip:Boolean},data:{pos:"bottom-"+(s.isRtl?"right":"left"),flip:!0,offset:!1},connected(){this.pos=this.$props.pos.split("-").concat("center").slice(0,2),[this.dir,this.align]=this.pos,this.axis=s.includes(["top","bottom"],this.dir)?"y":"x"},methods:{positionAt(o,t,r){let n=[this.getPositionOffset(o),this.getShiftOffset(o)];const a={element:[s.flipPosition(this.dir),this.align],target:[this.dir,this.align]};if(this.axis==="y"){for(const g in a)a[g]=a[g].reverse();n=n.reverse()}const[i]=s.scrollParents(o,/auto|scroll/),{scrollTop:c,scrollLeft:h}=i,e=s.dimensions(o);s.css(o,{top:-e.height,left:-e.width});const f=[o,t,{attach:a,offset:n,boundary:r,flip:this.flip,viewportOffset:this.getViewportOffset(o)}];s.trigger(o,"beforeposition",f),s.positionAt(...f),i.scrollTop=c,i.scrollLeft=h},getPositionOffset(o){return s.toPx(this.offset===!1?s.getCssVar("position-offset",o):this.offset,this.axis==="x"?"width":"height",o)*(s.includes(["left","top"],this.dir)?-1:1)},getShiftOffset(o){return s.includes(["center","justify","stretch"],this.align)?0:s.toPx(s.getCssVar("position-shift-offset",o),this.axis==="y"?"width":"height",o)*(s.includes(["left","top"],this.align)?1:-1)},getViewportOffset(o){return s.toPx(s.getCssVar("position-viewport-offset",o))}}},v={mixins:[l,b,$],args:"title",props:{delay:Number,title:String},data:{pos:"top",title:"",delay:0,animation:["uk-animation-scale-up"],duration:100,cls:"uk-active"},beforeConnect(){this._hasTitle=s.hasAttr(this.$el,"title"),s.attr(this.$el,"title",""),this.updateAria(!1),C(this.$el)},disconnected(){this.hide(),s.attr(this.$el,"title",this._hasTitle?this.title:null)},methods:{show(){this.isToggled(this.tooltip||null)||!this.title||(this._unbind=s.once(document,"show keydown "+s.pointerDown,this.hide,!1,o=>o.type===s.pointerDown&&!s.within(o.target,this.$el)||o.type==="keydown"&&o.keyCode===27||o.type==="show"&&o.detail[0]!==this&&o.detail[0].$name===this.$name),clearTimeout(this.showTimer),this.showTimer=setTimeout(this._show,this.delay))},async hide(){s.matches(this.$el,"input:focus")||(clearTimeout(this.showTimer),this.isToggled(this.tooltip||null)&&(await this.toggleElement(this.tooltip,!1,!1),s.remove(this.tooltip),this.tooltip=null,this._unbind()))},_show(){this.tooltip=s.append(this.container,'<div class="uk-'+this.$options.name+'"> <div class="uk-'+this.$options.name+'-inner">'+this.title+"</div> </div>"),s.on(this.tooltip,"toggled",(o,t)=>{if(this.updateAria(t),!t)return;this.positionAt(this.tooltip,this.$el);const[r,n]=A(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?s.flipPosition(r)+"-"+n:n+"-"+s.flipPosition(r)}),this.toggleElement(this.tooltip,!0)},updateAria(o){s.attr(this.$el,"aria-expanded",o)}},events:{focus:"show",blur:"hide",[s.pointerEnter+" "+s.pointerLeave](o){s.isTouch(o)||this[o.type===s.pointerEnter?"show":"hide"]()},[s.pointerDown](o){s.isTouch(o)&&this.show()}}};function C(o){s.isFocusable(o)||s.attr(o,"tabindex","0")}function A(o,t,r){let[n,a]=r;const i=s.offset(o),c=s.offset(t),h=[["left","right"],["top","bottom"]];for(const f of h){if(i[f[0]]>=c[f[1]]){n=f[1];break}if(i[f[1]]<=c[f[0]]){n=f[0];break}}const e=s.includes(h[0],n)?h[1]:h[0];return i[e[0]]===c[e[0]]?a=e[0]:i[e[1]]===c[e[1]]?a=e[1]:a="center",[n,a]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",v),v});
|
|
@@ -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(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.14.4-dev.
|
|
1
|
+
/*! UIkit 3.14.4-dev.4bd89c5ca | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(o,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitupload",["uikit-util"],n):(o=typeof globalThis<"u"?globalThis:o||self,o.UIkitUpload=n(o.UIkit.util))})(this,function(o){"use strict";var n={props:{allow:String,clsDragover:String,concurrent:Number,maxSize:Number,method:String,mime:String,msgInvalidMime:String,msgInvalidName:String,msgInvalidSize:String,multiple:Boolean,name:String,params:Object,type:String,url:String},data:{allow:!1,clsDragover:"uk-dragover",concurrent:1,maxSize:0,method:"POST",mime:!1,msgInvalidMime:"Invalid File Type: %s",msgInvalidName:"Invalid File Name: %s",msgInvalidSize:"Invalid File Size: %s Kilobytes Max",multiple:!1,name:"files[]",params:{},type:"",url:"",abort:o.noop,beforeAll:o.noop,beforeSend:o.noop,complete:o.noop,completeAll:o.noop,error:o.noop,fail:o.noop,load:o.noop,loadEnd:o.noop,loadStart:o.noop,progress:o.noop},events:{change(e){!o.matches(e.target,'input[type="file"]')||(e.preventDefault(),e.target.files&&this.upload(e.target.files),e.target.value="")},drop(e){i(e);const t=e.dataTransfer;!(t!=null&&t.files)||(o.removeClass(this.$el,this.clsDragover),this.upload(t.files))},dragenter(e){i(e)},dragover(e){i(e),o.addClass(this.$el,this.clsDragover)},dragleave(e){i(e),o.removeClass(this.$el,this.clsDragover)}},methods:{async upload(e){if(e=o.toArray(e),!e.length)return;o.trigger(this.$el,"upload",[e]);for(const a of e){if(this.maxSize&&this.maxSize*1e3<a.size){this.fail(this.msgInvalidSize.replace("%s",this.maxSize));return}if(this.allow&&!d(this.allow,a.name)){this.fail(this.msgInvalidName.replace("%s",this.allow));return}if(this.mime&&!d(this.mime,a.type)){this.fail(this.msgInvalidMime.replace("%s",this.mime));return}}this.multiple||(e=e.slice(0,1)),this.beforeAll(this,e);const t=c(e,this.concurrent),s=async a=>{const l=new FormData;a.forEach(r=>l.append(this.name,r));for(const r in this.params)l.append(r,this.params[r]);try{const r=await o.ajax(this.url,{data:l,method:this.method,responseType:this.type,beforeSend:h=>{const{xhr:p}=h;p.upload&&o.on(p.upload,"progress",this.progress);for(const m of["loadStart","load","loadEnd","abort"])o.on(p,m.toLowerCase(),this[m]);return this.beforeSend(h)}});this.complete(r),t.length?await s(t.shift()):this.completeAll(r)}catch(r){this.error(r)}};await s(t.shift())}}};function d(e,t){return t.match(new RegExp("^"+e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$","i"))}function c(e,t){const s=[];for(let a=0;a<e.length;a+=t)s.push(e.slice(a,a+t));return s}function i(e){e.preventDefault(),e.stopPropagation()}return typeof window<"u"&&window.UIkit&&window.UIkit.component("upload",n),n});
|
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() :
|
|
@@ -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
|
}
|
|
@@ -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
|
|
@@ -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(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
|
+
|
|
3696
|
+
|
|
3697
|
+
|
|
3698
|
+
trigger(element, 'beforeposition', args);
|
|
3699
|
+
|
|
3700
|
+
positionAt(...args);
|
|
3711
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
|
}));
|
|
@@ -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
|
|
|
@@ -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 {
|