uikit 3.15.24 → 3.15.25-dev.c6f5a4c4e
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 +7 -0
- package/build/publishDev.js +3 -3
- package/build/release.js +3 -3
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +6 -6
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +5 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +59 -76
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +59 -76
- 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 +2 -2
- 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 +2 -2
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +8 -5
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +2 -7
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +2 -2
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +127 -138
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +5 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +149 -173
- package/dist/js/uikit.min.js +1 -1
- package/package.json +65 -65
- package/src/images/icons/android-robot.svg +6 -0
- package/src/images/icons/android.svg +3 -0
- package/src/images/icons/apple.svg +3 -0
- package/src/images/icons/microsoft.svg +3 -0
- package/src/js/components/countdown.js +5 -5
- package/src/js/components/lightbox-panel.js +6 -18
- package/src/js/components/sortable.js +3 -4
- package/src/js/components/tooltip.js +3 -8
- package/src/js/components/upload.js +1 -1
- package/src/js/core/drop.js +62 -50
- package/src/js/core/navbar.js +11 -29
- package/src/js/mixin/internal/animate-slide.js +5 -0
- package/src/js/mixin/modal.js +52 -58
- package/src/js/mixin/slider-autoplay.js +1 -1
- package/src/js/util/mouse.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.25-dev.c6f5a4c4e | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikittooltip",["uikit-util"],g):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitTooltip=g(s.UIkit.util))})(this,function(s){"use strict";var g={props:{container:Boolean},data:{container:!0},computed:{container({container:o}){return o===!0&&this.$container||o&&s.$(o)}}},O={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"},computed:{hasAnimation({animation:o}){return!!o[0]},hasTransition({animation:o}){return["slide","reveal"].some(t=>s.startsWith(o[0],t))}},methods:{toggleElement(o,t,e){return new Promise(n=>Promise.all(s.toNodes(o).map(r=>{const i=s.isBoolean(t)?t:!this.isToggled(r);if(!s.trigger(r,`before${i?"show":"hide"}`,[this]))return Promise.reject();const h=(s.isFunction(e)?e:e===!1||!this.hasAnimation?S:this.hasTransition?B:I)(r,i,this),a=i?this.clsEnter:this.clsLeave;s.addClass(r,a),s.trigger(r,i?"show":"hide",[this]);const c=()=>{s.removeClass(r,a),s.trigger(r,i?"shown":"hidden",[this])};return h?h.then(c,()=>(s.removeClass(r,a),Promise.reject())):c()})).then(n,s.noop))},isToggled(o=this.$el){return[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 e;this.cls?(e=s.includes(this.cls," ")||t!==s.hasClass(o,this.cls),e&&s.toggleClass(o,this.cls,s.includes(this.cls," ")?void 0:t)):(e=t===o.hidden,e&&(o.hidden=!t)),s.$$("[autofocus]",o).some(n=>s.isVisible(n)?n.focus()||!0:n.blur()),e&&s.trigger(o,"toggled",[t,this])}}};function S(o,t,{_toggle:e}){return s.Animation.cancel(o),s.Transition.cancel(o),e(o,t)}async function B(o,t,{animation:e,duration:n,velocity:r,transition:i,_toggle:h}){var a;const[c="reveal",d="top"]=((a=e[0])==null?void 0:a.split("-"))||[],l=[["left","right"],["top","bottom"]],T=l[s.includes(l[0],d)?0:1],u=T[1]===d,v=["width","height"][l.indexOf(T)],p=`margin-${T[0]}`,$=`margin-${d}`;let m=s.dimensions(o)[v];const F=s.Transition.inProgress(o);await s.Transition.cancel(o),t&&h(o,!0);const N=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",p,$].map(E=>[E,o.style[E]])),w=s.dimensions(o),y=s.toFloat(s.css(o,p)),x=s.toFloat(s.css(o,$)),f=w[v]+x;!F&&!t&&(m+=x);const[b]=s.wrapInner(o,"<div>");s.css(b,{boxSizing:"border-box",height:w.height,width:w.width,...s.css(o,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",$])}),s.css(o,{padding:0,border:0,minWidth:0,minHeight:0,[$]:0,width:w.width,height:w.height,overflow:"hidden",[v]:m});const C=m/f;n=(r*f+n)*(t?1-C:C);const A={[v]:t?f:0};u&&(s.css(o,p,f-m+y),A[p]=t?y:f+y),!u^c==="reveal"&&(s.css(b,p,-f+m),s.Transition.start(b,{[p]:t?0:-f},n,i));try{await s.Transition.start(o,A,n,i)}finally{s.css(o,N),s.unwrap(b.firstChild),t||h(o,!1)}}function I(o,t,e){s.Animation.cancel(o);const{animation:n,duration:r,_toggle:i}=e;return t?(i(o,!0),s.Animation.in(o,n[0],r,e.origin)):s.Animation.out(o,n[1]||n[0],r,e.origin).then(()=>i(o,!1))}var L={props:{pos:String,offset:null,flip:Boolean,shift:Boolean,inset:Boolean},data:{pos:`bottom-${s.isRtl?"right":"left"}`,offset:!1,flip:!0,shift:!0,inset:!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,e){let n=[this.getPositionOffset(o),this.getShiftOffset(o)];const r=[this.flip&&"flip",this.shift&&"shift"],i={element:[this.inset?this.dir:s.flipPosition(this.dir),this.align],target:[this.dir,this.align]};if(this.axis==="y"){for(const l in i)i[l].reverse();n.reverse(),r.reverse()}const[h]=s.scrollParents(o),{scrollTop:a,scrollLeft:c}=h,d=s.dimensions(o);s.css(o,{top:-d.height,left:-d.width}),s.positionAt(o,t,{attach:i,offset:n,boundary:e,placement:r,viewportOffset:this.getViewportOffset(o)}),h.scrollTop=a,h.scrollLeft=c},getPositionOffset(o){return s.toPx(this.offset===!1?s.css(o,"--uk-position-offset"):this.offset,this.axis==="x"?"width":"height",o)*(s.includes(["left","top"],this.dir)?-1:1)*(this.inset?-1:1)},getShiftOffset(o){return this.align==="center"?0:s.toPx(s.css(o,"--uk-position-shift-offset"),this.axis==="y"?"width":"height",o)*(s.includes(["left","top"],this.align)?1:-1)},getViewportOffset(o){return s.toPx(s.css(o,"--uk-position-viewport-offset"))}}},P={mixins:[g,O,L],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.id=`uk-tooltip-${this._uid}`,this._hasTitle=s.hasAttr(this.$el,"title"),s.attr(this.$el,{title:"","aria-describedby":this.id}),_(this.$el)},disconnected(){this.hide(),s.attr(this.$el,"title")||s.attr(this.$el,"title",this._hasTitle?this.title:null)},methods:{show(){this.isToggled(this.tooltip||null)||!this.title||(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))},_show(){this.tooltip=s.append(this.container,`<div id="${this.id}" class="uk-${this.$options.name}" role="tooltip"> <div class="uk-${this.$options.name}-inner">${this.title}</div> </div>`),s.on(this.tooltip,"toggled",(o,t)=>{if(!t)return;const e=()=>this.positionAt(this.tooltip,this.$el);e();const[n,r]=D(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?`${s.flipPosition(n)}-${r}`:`${r}-${s.flipPosition(n)}`;const i=[s.once(document,`keydown ${s.pointerDown}`,this.hide,!1,h=>h.type===s.pointerDown&&!s.within(h.target,this.$el)||h.type==="keydown"&&h.keyCode===27),s.on([document,...s.overflowParents(this.$el)],"scroll",e,{passive:!0})];s.once(this.tooltip,"hide",()=>i.forEach(h=>h()),{self:!0})}),this.toggleElement(this.tooltip,!0)}},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 _(o){s.isFocusable(o)||s.attr(o,"tabindex","0")}function D(o,t,[e,n]){const r=s.offset(o),i=s.offset(t),h=[["left","right"],["top","bottom"]];for(const c of h){if(r[c[0]]>=i[c[1]]){e=c[1];break}if(r[c[1]]<=i[c[0]]){e=c[0];break}}const a=s.includes(h[0],e)?h[1]:h[0];return r[a[0]]===i[a[0]]?n=a[0]:r[a[1]]===i[a[1]]?n=a[1]:n="center",[e,n]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",P),P});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.25-dev.c6f5a4c4e | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
responseType: this.type,
|
|
147
147
|
beforeSend: (env) => {
|
|
148
148
|
const { xhr } = env;
|
|
149
|
-
|
|
149
|
+
uikitUtil.on(xhr.upload, 'progress', this.progress);
|
|
150
150
|
for (const type of ['loadStart', 'load', 'loadEnd', 'abort']) {
|
|
151
151
|
uikitUtil.on(xhr, type.toLowerCase(), this[type]);
|
|
152
152
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.25-dev.c6f5a4c4e | https://www.getuikit.com | (c) 2014 - 2023 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&&!p(this.allow,a.name)){this.fail(this.msgInvalidName.replace("%s",this.allow));return}if(this.mime&&!p(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:d}=h;o.on(d.upload,"progress",this.progress);for(const m of["loadStart","load","loadEnd","abort"])o.on(d,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 p(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.15.
|
|
1
|
+
/*! UIkit 3.15.25-dev.c6f5a4c4e | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -1397,7 +1397,7 @@
|
|
|
1397
1397
|
|
|
1398
1398
|
cancel() {var _this$unbind;
|
|
1399
1399
|
(_this$unbind = this.unbind) == null ? void 0 : _this$unbind.call(this);
|
|
1400
|
-
|
|
1400
|
+
clearInterval(this.interval);
|
|
1401
1401
|
},
|
|
1402
1402
|
|
|
1403
1403
|
movesTo(target) {
|
|
@@ -2977,7 +2977,7 @@
|
|
|
2977
2977
|
UIkit.data = '__uikit__';
|
|
2978
2978
|
UIkit.prefix = 'uk-';
|
|
2979
2979
|
UIkit.options = {};
|
|
2980
|
-
UIkit.version = '3.15.
|
|
2980
|
+
UIkit.version = '3.15.25-dev.c6f5a4c4e';
|
|
2981
2981
|
|
|
2982
2982
|
globalAPI(UIkit);
|
|
2983
2983
|
hooksAPI(UIkit);
|
|
@@ -3899,70 +3899,25 @@
|
|
|
3899
3899
|
self: true,
|
|
3900
3900
|
|
|
3901
3901
|
handler() {
|
|
3902
|
-
once(
|
|
3903
|
-
this.$el,
|
|
3904
|
-
'hide',
|
|
3905
|
-
on(document, 'focusin', (e) => {
|
|
3906
|
-
if (last(active$1) === this && !within(e.target, this.$el)) {
|
|
3907
|
-
this.$el.focus();
|
|
3908
|
-
}
|
|
3909
|
-
}));
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
if (this.overlay) {
|
|
3913
|
-
once(this.$el, 'hidden', preventBackgroundScroll(this.$el), { self: true });
|
|
3914
|
-
}
|
|
3915
|
-
|
|
3916
3902
|
if (this.stack) {
|
|
3917
3903
|
css(this.$el, 'zIndex', toFloat(css(this.$el, 'zIndex')) + active$1.length);
|
|
3918
3904
|
}
|
|
3919
3905
|
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
'hide',
|
|
3926
|
-
on(document, pointerDown, ({ target }) => {
|
|
3927
|
-
if (
|
|
3928
|
-
last(active$1) !== this ||
|
|
3929
|
-
this.overlay && !within(target, this.$el) ||
|
|
3930
|
-
within(target, this.panel))
|
|
3931
|
-
{
|
|
3932
|
-
return;
|
|
3933
|
-
}
|
|
3934
|
-
|
|
3935
|
-
once(
|
|
3936
|
-
document,
|
|
3937
|
-
`${pointerUp} ${pointerCancel} scroll`,
|
|
3938
|
-
({ defaultPrevented, type, target: newTarget }) => {
|
|
3939
|
-
if (
|
|
3940
|
-
!defaultPrevented &&
|
|
3941
|
-
type === pointerUp &&
|
|
3942
|
-
target === newTarget)
|
|
3943
|
-
{
|
|
3944
|
-
this.hide();
|
|
3945
|
-
}
|
|
3946
|
-
},
|
|
3947
|
-
true);
|
|
3906
|
+
const handlers = [
|
|
3907
|
+
this.overlay && preventBackgroundFocus(this),
|
|
3908
|
+
this.overlay && preventBackgroundScroll(this.$el),
|
|
3909
|
+
this.bgClose && listenForBackgroundClose(this),
|
|
3910
|
+
this.escClose && listenForEscClose$1(this)];
|
|
3948
3911
|
|
|
3949
|
-
}),
|
|
3950
|
-
{ self: true });
|
|
3951
3912
|
|
|
3952
|
-
|
|
3913
|
+
once(
|
|
3914
|
+
this.$el,
|
|
3915
|
+
'hidden',
|
|
3916
|
+
() => handlers.forEach((handler) => handler && handler()),
|
|
3917
|
+
{ self: true });
|
|
3953
3918
|
|
|
3954
|
-
if (this.escClose) {
|
|
3955
|
-
once(
|
|
3956
|
-
this.$el,
|
|
3957
|
-
'hide',
|
|
3958
|
-
on(document, 'keydown', (e) => {
|
|
3959
|
-
if (e.keyCode === 27 && last(active$1) === this) {
|
|
3960
|
-
this.hide();
|
|
3961
|
-
}
|
|
3962
|
-
}),
|
|
3963
|
-
{ self: true });
|
|
3964
3919
|
|
|
3965
|
-
|
|
3920
|
+
addClass(document.documentElement, this.clsPage);
|
|
3966
3921
|
}
|
|
3967
3922
|
},
|
|
3968
3923
|
|
|
@@ -4053,6 +4008,45 @@
|
|
|
4053
4008
|
return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
|
|
4054
4009
|
}
|
|
4055
4010
|
|
|
4011
|
+
function preventBackgroundFocus(modal) {
|
|
4012
|
+
return on(document, 'focusin', (e) => {
|
|
4013
|
+
if (last(active$1) === modal && !within(e.target, modal.$el)) {
|
|
4014
|
+
modal.$el.focus();
|
|
4015
|
+
}
|
|
4016
|
+
});
|
|
4017
|
+
}
|
|
4018
|
+
|
|
4019
|
+
function listenForBackgroundClose(modal) {
|
|
4020
|
+
return on(document, pointerDown, ({ target }) => {
|
|
4021
|
+
if (
|
|
4022
|
+
last(active$1) !== modal ||
|
|
4023
|
+
modal.overlay && !within(target, modal.$el) ||
|
|
4024
|
+
within(target, modal.panel))
|
|
4025
|
+
{
|
|
4026
|
+
return;
|
|
4027
|
+
}
|
|
4028
|
+
|
|
4029
|
+
once(
|
|
4030
|
+
document,
|
|
4031
|
+
`${pointerUp} ${pointerCancel} scroll`,
|
|
4032
|
+
({ defaultPrevented, type, target: newTarget }) => {
|
|
4033
|
+
if (!defaultPrevented && type === pointerUp && target === newTarget) {
|
|
4034
|
+
modal.hide();
|
|
4035
|
+
}
|
|
4036
|
+
},
|
|
4037
|
+
true);
|
|
4038
|
+
|
|
4039
|
+
});
|
|
4040
|
+
}
|
|
4041
|
+
|
|
4042
|
+
function listenForEscClose$1(modal) {
|
|
4043
|
+
return on(document, 'keydown', (e) => {
|
|
4044
|
+
if (e.keyCode === 27 && last(active$1) === modal) {
|
|
4045
|
+
modal.hide();
|
|
4046
|
+
}
|
|
4047
|
+
});
|
|
4048
|
+
}
|
|
4049
|
+
|
|
4056
4050
|
let prevented;
|
|
4057
4051
|
function preventBackgroundScroll(el) {
|
|
4058
4052
|
// 'overscroll-behavior: contain' only works consistently if el overflows (Safari)
|
|
@@ -4172,12 +4166,7 @@
|
|
|
4172
4166
|
addClass(this.$el, this.clsDrop);
|
|
4173
4167
|
|
|
4174
4168
|
if (this.toggle && !this.targetEl) {
|
|
4175
|
-
this.targetEl =
|
|
4176
|
-
target: this.$el,
|
|
4177
|
-
mode: this.mode
|
|
4178
|
-
}).$el;
|
|
4179
|
-
attr(this.targetEl, 'aria-haspopup', true);
|
|
4180
|
-
this.lazyload(this.targetEl);
|
|
4169
|
+
this.targetEl = createToggleComponent(this);
|
|
4181
4170
|
}
|
|
4182
4171
|
|
|
4183
4172
|
this._style = (({ width, height }) => ({ width, height }))(this.$el.style);
|
|
@@ -4326,50 +4315,11 @@
|
|
|
4326
4315
|
|
|
4327
4316
|
this.tracker.init();
|
|
4328
4317
|
|
|
4329
|
-
const update = () => this.$emit();
|
|
4330
4318
|
const handlers = [
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
once(
|
|
4336
|
-
document,
|
|
4337
|
-
`${pointerUp} ${pointerCancel} scroll`,
|
|
4338
|
-
({ defaultPrevented, type, target: newTarget }) => {
|
|
4339
|
-
if (
|
|
4340
|
-
!defaultPrevented &&
|
|
4341
|
-
type === pointerUp &&
|
|
4342
|
-
target === newTarget &&
|
|
4343
|
-
!(this.targetEl && within(target, this.targetEl)))
|
|
4344
|
-
{
|
|
4345
|
-
this.hide(false);
|
|
4346
|
-
}
|
|
4347
|
-
},
|
|
4348
|
-
true)),
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
on(document, 'keydown', (e) => {
|
|
4353
|
-
if (e.keyCode === 27) {
|
|
4354
|
-
this.hide(false);
|
|
4355
|
-
}
|
|
4356
|
-
}),
|
|
4357
|
-
|
|
4358
|
-
on(window, 'resize', update),
|
|
4359
|
-
|
|
4360
|
-
(() => {
|
|
4361
|
-
const observer = observeResize(
|
|
4362
|
-
overflowParents(this.$el).concat(this.target),
|
|
4363
|
-
update);
|
|
4364
|
-
|
|
4365
|
-
return () => observer.disconnect();
|
|
4366
|
-
})(),
|
|
4367
|
-
|
|
4368
|
-
this.autoUpdate &&
|
|
4369
|
-
on([document, ...overflowParents(this.$el)], 'scroll', update, {
|
|
4370
|
-
passive: true
|
|
4371
|
-
}),
|
|
4372
|
-
|
|
4319
|
+
listenForBackgroundClick(this),
|
|
4320
|
+
listenForEscClose(this),
|
|
4321
|
+
listenForResize(this),
|
|
4322
|
+
this.autoUpdate && listenForScroll(this),
|
|
4373
4323
|
!this.bgScroll && preventBackgroundScroll(this.$el)];
|
|
4374
4324
|
|
|
4375
4325
|
|
|
@@ -4558,6 +4508,63 @@
|
|
|
4558
4508
|
return offsetViewport(overflowParents(target).find((parent) => within(el, parent)));
|
|
4559
4509
|
}
|
|
4560
4510
|
|
|
4511
|
+
function createToggleComponent(drop) {
|
|
4512
|
+
const { $el } = drop.$create('toggle', query(drop.toggle, drop.$el), {
|
|
4513
|
+
target: drop.$el,
|
|
4514
|
+
mode: drop.mode
|
|
4515
|
+
});
|
|
4516
|
+
attr($el, 'aria-haspopup', true);
|
|
4517
|
+
drop.lazyload($el);
|
|
4518
|
+
|
|
4519
|
+
return $el;
|
|
4520
|
+
}
|
|
4521
|
+
|
|
4522
|
+
function listenForResize(drop) {
|
|
4523
|
+
const update = () => drop.$emit();
|
|
4524
|
+
const off = on(window, 'resize', update);
|
|
4525
|
+
const observer = observeResize(overflowParents(drop.$el).concat(drop.target), update);
|
|
4526
|
+
return () => {
|
|
4527
|
+
observer.disconnect();
|
|
4528
|
+
off();
|
|
4529
|
+
};
|
|
4530
|
+
}
|
|
4531
|
+
|
|
4532
|
+
function listenForScroll(drop) {
|
|
4533
|
+
return on([document, ...overflowParents(drop.$el)], 'scroll', () => drop.$emit(), {
|
|
4534
|
+
passive: true
|
|
4535
|
+
});
|
|
4536
|
+
}
|
|
4537
|
+
|
|
4538
|
+
function listenForEscClose(drop) {
|
|
4539
|
+
return on(document, 'keydown', (e) => {
|
|
4540
|
+
if (e.keyCode === 27) {
|
|
4541
|
+
drop.hide(false);
|
|
4542
|
+
}
|
|
4543
|
+
});
|
|
4544
|
+
}
|
|
4545
|
+
|
|
4546
|
+
function listenForBackgroundClick(drop) {
|
|
4547
|
+
return on(document, pointerDown, ({ target }) => {
|
|
4548
|
+
if (!within(target, drop.$el)) {
|
|
4549
|
+
once(
|
|
4550
|
+
document,
|
|
4551
|
+
`${pointerUp} ${pointerCancel} scroll`,
|
|
4552
|
+
({ defaultPrevented, type, target: newTarget }) => {
|
|
4553
|
+
if (
|
|
4554
|
+
!defaultPrevented &&
|
|
4555
|
+
type === pointerUp &&
|
|
4556
|
+
target === newTarget &&
|
|
4557
|
+
!(drop.targetEl && within(target, drop.targetEl)))
|
|
4558
|
+
{
|
|
4559
|
+
drop.hide(false);
|
|
4560
|
+
}
|
|
4561
|
+
},
|
|
4562
|
+
true);
|
|
4563
|
+
|
|
4564
|
+
}
|
|
4565
|
+
});
|
|
4566
|
+
}
|
|
4567
|
+
|
|
4561
4568
|
var formCustom = {
|
|
4562
4569
|
mixins: [Class],
|
|
4563
4570
|
|
|
@@ -6121,7 +6128,7 @@
|
|
|
6121
6128
|
},
|
|
6122
6129
|
|
|
6123
6130
|
{
|
|
6124
|
-
name: '
|
|
6131
|
+
name: 'show',
|
|
6125
6132
|
|
|
6126
6133
|
el() {
|
|
6127
6134
|
return this.dropContainer;
|
|
@@ -6141,27 +6148,9 @@
|
|
|
6141
6148
|
}
|
|
6142
6149
|
|
|
6143
6150
|
addClass(target, `${this.clsDrop}-dropbar`);
|
|
6144
|
-
}
|
|
6145
|
-
},
|
|
6146
|
-
|
|
6147
|
-
{
|
|
6148
|
-
name: 'show',
|
|
6149
|
-
|
|
6150
|
-
el() {
|
|
6151
|
-
return this.dropContainer;
|
|
6152
|
-
},
|
|
6153
|
-
|
|
6154
|
-
filter() {
|
|
6155
|
-
return this.dropbar;
|
|
6156
|
-
},
|
|
6157
|
-
|
|
6158
|
-
handler({ target }) {
|
|
6159
|
-
if (!this.isDropbarDrop(target)) {
|
|
6160
|
-
return;
|
|
6161
|
-
}
|
|
6162
6151
|
|
|
6163
6152
|
const drop = this.getDropdown(target);
|
|
6164
|
-
|
|
6153
|
+
const adjustHeight = () => {
|
|
6165
6154
|
const targetOffsets = parents(target, `.${this.clsDrop}`).
|
|
6166
6155
|
concat(target).
|
|
6167
6156
|
map((el) => offset(el));
|
|
@@ -6173,7 +6162,9 @@
|
|
|
6173
6162
|
maxBottom - minTop + toFloat(css(target, 'marginBottom')),
|
|
6174
6163
|
target);
|
|
6175
6164
|
|
|
6176
|
-
}
|
|
6165
|
+
};
|
|
6166
|
+
this._observer = observeResize([drop.$el, ...drop.target], adjustHeight);
|
|
6167
|
+
adjustHeight();
|
|
6177
6168
|
}
|
|
6178
6169
|
},
|
|
6179
6170
|
|
|
@@ -6233,29 +6224,27 @@
|
|
|
6233
6224
|
return includes(this.dropdowns, active == null ? void 0 : active.$el) && active;
|
|
6234
6225
|
},
|
|
6235
6226
|
|
|
6236
|
-
transitionTo(newHeight, el) {
|
|
6227
|
+
async transitionTo(newHeight, el) {
|
|
6237
6228
|
const { dropbar } = this;
|
|
6238
6229
|
const oldHeight = height(dropbar);
|
|
6239
6230
|
|
|
6240
6231
|
el = oldHeight < newHeight && el;
|
|
6241
6232
|
|
|
6242
|
-
|
|
6233
|
+
await Transition.cancel([el, dropbar]);
|
|
6243
6234
|
|
|
6235
|
+
css(el, 'clipPath', `polygon(0 0,100% 0,100% ${oldHeight}px,0 ${oldHeight}px)`);
|
|
6244
6236
|
height(dropbar, oldHeight);
|
|
6245
6237
|
|
|
6246
|
-
|
|
6247
|
-
Promise.all([
|
|
6238
|
+
await Promise.all([
|
|
6248
6239
|
Transition.start(dropbar, { height: newHeight }, this.duration),
|
|
6249
6240
|
Transition.start(
|
|
6250
6241
|
el,
|
|
6251
6242
|
{
|
|
6252
6243
|
clipPath: `polygon(0 0,100% 0,100% ${newHeight}px,0 ${newHeight}px)`
|
|
6253
6244
|
},
|
|
6254
|
-
this.duration)
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
catch(noop).
|
|
6258
|
-
then(() => css(el, { clipPath: '' }));
|
|
6245
|
+
this.duration).
|
|
6246
|
+
finally(() => css(el, { clipPath: '' }))]).
|
|
6247
|
+
catch(noop);
|
|
6259
6248
|
},
|
|
6260
6249
|
|
|
6261
6250
|
getDropdown(el) {
|