uikit 3.14.4-dev.ca199f7a7 → 3.14.4-dev.dbd727038
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 +9 -0
- package/dist/css/uikit-core-rtl.css +73 -17
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +73 -17
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +73 -18
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +73 -18
- 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 +27 -20
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +27 -20
- 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 +98 -66
- 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 +151 -102
- 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/components/navbar-parent-icon.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/icon.js +2 -0
- package/src/js/core/index.js +1 -0
- package/src/js/core/navbar.js +44 -15
- package/src/js/core/sticky.js +8 -9
- 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/navbar.less +95 -14
- package/src/less/components/utility.less +12 -3
- package/src/less/theme/navbar.less +4 -6
- package/src/scss/components/dropdown.scss +8 -0
- package/src/scss/components/nav.scss +2 -2
- package/src/scss/components/navbar.scss +83 -14
- package/src/scss/components/utility.scss +12 -3
- package/src/scss/mixins-theme.scss +13 -4
- package/src/scss/mixins.scss +12 -0
- package/src/scss/theme/navbar.scss +3 -2
- package/src/scss/variables-theme.scss +18 -6
- package/src/scss/variables.scss +18 -5
- package/tests/drop.html +66 -16
- package/tests/dropdown.html +103 -16
- package/tests/index.html +1 -1
- package/tests/nav.html +12 -79
- package/tests/navbar.html +283 -56
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.14.4-dev.
|
|
1
|
+
/*! UIkit 3.14.4-dev.dbd727038 | 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.dbd727038 | 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.dbd727038 | 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.dbd727038 | 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.dbd727038';
|
|
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) {
|
|
@@ -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) {
|
|
@@ -5233,6 +5232,8 @@
|
|
|
5233
5232
|
|
|
5234
5233
|
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>";
|
|
5235
5234
|
|
|
5235
|
+
var navbarParentIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 3.5 6 8.5 11 3.5\"/></svg>";
|
|
5236
|
+
|
|
5236
5237
|
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>";
|
|
5237
5238
|
|
|
5238
5239
|
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>";
|
|
@@ -5265,6 +5266,7 @@
|
|
|
5265
5266
|
marker,
|
|
5266
5267
|
'close-icon': closeIcon,
|
|
5267
5268
|
'close-large': closeLarge,
|
|
5269
|
+
'navbar-parent-icon': navbarParentIcon,
|
|
5268
5270
|
'navbar-toggle-icon': navbarToggleIcon,
|
|
5269
5271
|
'overlay-icon': overlayIcon,
|
|
5270
5272
|
'pagination-next': paginationNext,
|
|
@@ -5911,8 +5913,7 @@
|
|
|
5911
5913
|
{
|
|
5912
5914
|
...this.$props,
|
|
5913
5915
|
boundary: this.boundary,
|
|
5914
|
-
pos: this.pos
|
|
5915
|
-
offset: this.dropbar || this.offset });
|
|
5916
|
+
pos: this.pos });
|
|
5916
5917
|
|
|
5917
5918
|
|
|
5918
5919
|
},
|
|
@@ -6073,8 +6074,8 @@
|
|
|
6073
6074
|
return this.dropbar;
|
|
6074
6075
|
},
|
|
6075
6076
|
|
|
6076
|
-
handler(
|
|
6077
|
-
if (!
|
|
6077
|
+
handler(_ref9) {let { target } = _ref9;
|
|
6078
|
+
if (!this.isDropbarDrop(target)) {
|
|
6078
6079
|
return;
|
|
6079
6080
|
}
|
|
6080
6081
|
|
|
@@ -6082,7 +6083,7 @@
|
|
|
6082
6083
|
after(this.dropbarAnchor || this.$el, this.dropbar);
|
|
6083
6084
|
}
|
|
6084
6085
|
|
|
6085
|
-
addClass(
|
|
6086
|
+
addClass(target, this.clsDrop + "-dropbar");
|
|
6086
6087
|
} },
|
|
6087
6088
|
|
|
6088
6089
|
|
|
@@ -6097,22 +6098,47 @@
|
|
|
6097
6098
|
return this.dropbar;
|
|
6098
6099
|
},
|
|
6099
6100
|
|
|
6100
|
-
handler(
|
|
6101
|
-
if (!
|
|
6101
|
+
handler(_ref10) {let { target } = _ref10;
|
|
6102
|
+
if (!this.isDropbarDrop(target)) {
|
|
6102
6103
|
return;
|
|
6103
6104
|
}
|
|
6104
6105
|
|
|
6105
|
-
this._observer = observeResize(
|
|
6106
|
+
this._observer = observeResize(target, () =>
|
|
6106
6107
|
this.transitionTo(
|
|
6107
|
-
offset(
|
|
6108
|
+
offset(target).bottom -
|
|
6108
6109
|
offset(this.dropbar).top +
|
|
6109
|
-
toFloat(css(
|
|
6110
|
-
|
|
6110
|
+
toFloat(css(target, 'marginBottom')),
|
|
6111
|
+
target));
|
|
6111
6112
|
|
|
6112
6113
|
|
|
6113
6114
|
} },
|
|
6114
6115
|
|
|
6115
6116
|
|
|
6117
|
+
{
|
|
6118
|
+
name: 'beforeposition',
|
|
6119
|
+
|
|
6120
|
+
el() {
|
|
6121
|
+
return this.dropContainer;
|
|
6122
|
+
},
|
|
6123
|
+
|
|
6124
|
+
filter() {
|
|
6125
|
+
return this.dropbar;
|
|
6126
|
+
},
|
|
6127
|
+
|
|
6128
|
+
handler(e, element, target, options) {
|
|
6129
|
+
if (!this.isDropbarDrop(element)) {
|
|
6130
|
+
return;
|
|
6131
|
+
}
|
|
6132
|
+
|
|
6133
|
+
const dropbarOffset = offset(this.dropbar);
|
|
6134
|
+
|
|
6135
|
+
css(element, 'maxWidth', dropbarOffset.width - options.viewportOffset * 2);
|
|
6136
|
+
|
|
6137
|
+
options.offset[1] = dropbarOffset.top - offset(target).bottom;
|
|
6138
|
+
options.viewportOffset += dropbarOffset.left;
|
|
6139
|
+
} },
|
|
6140
|
+
|
|
6141
|
+
|
|
6116
6142
|
{
|
|
6117
6143
|
name: 'beforehide',
|
|
6118
6144
|
|
|
@@ -6124,12 +6150,12 @@
|
|
|
6124
6150
|
return this.dropbar;
|
|
6125
6151
|
},
|
|
6126
6152
|
|
|
6127
|
-
handler(e
|
|
6153
|
+
handler(e) {
|
|
6128
6154
|
const active = this.getActive();
|
|
6129
6155
|
|
|
6130
6156
|
if (
|
|
6131
6157
|
matches(this.dropbar, ':hover') &&
|
|
6132
|
-
(active == null ? void 0 : active.$el) ===
|
|
6158
|
+
(active == null ? void 0 : active.$el) === e.target &&
|
|
6133
6159
|
!this.toggles.some((el) => active.target !== el && matches(el, ':focus')))
|
|
6134
6160
|
{
|
|
6135
6161
|
e.preventDefault();
|
|
@@ -6148,8 +6174,8 @@
|
|
|
6148
6174
|
return this.dropbar;
|
|
6149
6175
|
},
|
|
6150
6176
|
|
|
6151
|
-
handler(
|
|
6152
|
-
if (!
|
|
6177
|
+
handler(_ref11) {let { target } = _ref11;
|
|
6178
|
+
if (!this.isDropbarDrop(target)) {
|
|
6153
6179
|
return;
|
|
6154
6180
|
}
|
|
6155
6181
|
|
|
@@ -6157,7 +6183,7 @@
|
|
|
6157
6183
|
|
|
6158
6184
|
const active = this.getActive();
|
|
6159
6185
|
|
|
6160
|
-
if (!active || (active == null ? void 0 : active.$el) ===
|
|
6186
|
+
if (!active || (active == null ? void 0 : active.$el) === target) {
|
|
6161
6187
|
this.transitionTo(0);
|
|
6162
6188
|
}
|
|
6163
6189
|
} }],
|
|
@@ -6196,6 +6222,11 @@
|
|
|
6196
6222
|
|
|
6197
6223
|
getDropdown(el) {
|
|
6198
6224
|
return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown');
|
|
6225
|
+
},
|
|
6226
|
+
|
|
6227
|
+
isDropbarDrop(el) {
|
|
6228
|
+
const drop = this.getDropdown(el);
|
|
6229
|
+
return drop && hasClass(el, this.clsDrop) && drop.align !== 'stretch';
|
|
6199
6230
|
} } };
|
|
6200
6231
|
|
|
6201
6232
|
|
|
@@ -6921,7 +6952,9 @@
|
|
|
6921
6952
|
},
|
|
6922
6953
|
|
|
6923
6954
|
handler() {
|
|
6924
|
-
|
|
6955
|
+
const { scrollingElement } = document;
|
|
6956
|
+
|
|
6957
|
+
if (!location.hash || scrollingElement.scrollTop === 0) {
|
|
6925
6958
|
return;
|
|
6926
6959
|
}
|
|
6927
6960
|
|
|
@@ -6930,13 +6963,11 @@
|
|
|
6930
6963
|
const elOffset = offset(this.$el);
|
|
6931
6964
|
|
|
6932
6965
|
if (this.isFixed && intersectRect(targetOffset, elOffset)) {
|
|
6933
|
-
scrollTop
|
|
6934
|
-
window,
|
|
6966
|
+
scrollingElement.scrollTop =
|
|
6935
6967
|
targetOffset.top -
|
|
6936
6968
|
elOffset.height -
|
|
6937
6969
|
toPx(this.targetOffset, 'height', this.placeholder) -
|
|
6938
|
-
toPx(this.offset, 'height', this.placeholder)
|
|
6939
|
-
|
|
6970
|
+
toPx(this.offset, 'height', this.placeholder);
|
|
6940
6971
|
}
|
|
6941
6972
|
});
|
|
6942
6973
|
} }],
|
|
@@ -7034,7 +7065,7 @@
|
|
|
7034
7065
|
|
|
7035
7066
|
|
|
7036
7067
|
{let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref4;
|
|
7037
|
-
const scroll = scrollTop
|
|
7068
|
+
const scroll = document.scrollingElement.scrollTop;
|
|
7038
7069
|
const dir = prevScroll <= scroll ? 'down' : 'up';
|
|
7039
7070
|
|
|
7040
7071
|
return {
|
|
@@ -7664,6 +7695,7 @@
|
|
|
7664
7695
|
SlidenavPrevious: Slidenav,
|
|
7665
7696
|
SearchIcon: Search,
|
|
7666
7697
|
Marker: IconComponent,
|
|
7698
|
+
NavbarParentIcon: IconComponent,
|
|
7667
7699
|
NavbarToggleIcon: IconComponent,
|
|
7668
7700
|
OverlayIcon: IconComponent,
|
|
7669
7701
|
PaginationNext: IconComponent,
|