uikit 3.15.17-dev.fa9261722 → 3.15.18-dev.014d8e608
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/build/util.js +2 -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 +2 -2
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +15 -15
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +77 -84
- package/dist/js/components/lightbox-panel.min.js +9 -1
- package/dist/js/components/lightbox.js +80 -87
- package/dist/js/components/lightbox.min.js +9 -1
- package/dist/js/components/notification.js +14 -14
- package/dist/js/components/notification.min.js +4 -1
- package/dist/js/components/parallax.js +22 -22
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +18 -18
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +93 -45
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +18 -18
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +33 -38
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +7 -7
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +24 -24
- package/dist/js/components/tooltip.min.js +3 -1
- package/dist/js/components/upload.js +7 -7
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +303 -282
- package/dist/js/uikit-core.min.js +21 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +499 -432
- package/dist/js/uikit.min.js +34 -1
- package/package.json +1 -1
- package/src/js/components/lightbox-panel.js +3 -5
- package/src/js/components/slider.js +62 -7
- package/src/js/core/sticky.js +26 -9
- package/src/js/mixin/slider-drag.js +1 -1
- package/src/js/mixin/slider.js +2 -7
- package/src/js/util/viewport.js +4 -0
- package/tests/tooltip.html +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.18-dev.014d8e608 | 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')) :
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
|
|
84
84
|
let digits = String(Math.trunc(timespan[unit]));
|
|
85
85
|
|
|
86
|
-
digits = digits.length < 2 ?
|
|
86
|
+
digits = digits.length < 2 ? `0${digits}` : digits;
|
|
87
87
|
|
|
88
88
|
if (el.textContent !== digits) {
|
|
89
89
|
digits = digits.split('');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.18-dev.014d8e608 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitcountdown",["uikit-util"],s):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitCountdown=s(e.UIkit.util))})(this,function(e){"use strict";var s={connected(){e.addClass(this.$el,this.$options.id)}};const a=["days","hours","minutes","seconds"];var d={mixins:[s],props:{date:String,clsWrapper:String},data:{date:"",clsWrapper:".uk-countdown-%unit%"},connected(){this.date=Date.parse(this.$props.date),this.start()},disconnected(){this.stop()},events:[{name:"visibilitychange",el(){return document},handler(){document.hidden?this.stop():this.start()}}],methods:{start(){this.stop(),this.update(),this.timer=setInterval(this.update,1e3)},stop(){clearInterval(this.timer)},update(){const n=r(this.date);(!this.date||n.total<=0)&&(this.stop(),n.days=n.hours=n.minutes=n.seconds=0);for(const i of a){const o=e.$(this.clsWrapper.replace("%unit%",i),this.$el);if(!o)continue;let t=String(Math.trunc(n[i]));t=t.length<2?`0${t}`:t,o.textContent!==t&&(t=t.split(""),t.length!==o.children.length&&e.html(o,t.map(()=>"<span></span>").join("")),t.forEach((u,h)=>o.children[h].textContent=u))}}}};function r(n){const i=n-Date.now();return{total:i,seconds:i/1e3%60,minutes:i/1e3/60%60,hours:i/1e3/60/60%24,days:i/1e3/60/60/24}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("countdown",d),d});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.18-dev.014d8e608 | 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')) :
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
return sorted;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
function getOffset(element, offset
|
|
59
|
+
function getOffset(element, offset = false) {
|
|
60
60
|
let { offsetTop, offsetLeft, offsetHeight, offsetWidth } = element;
|
|
61
61
|
|
|
62
62
|
if (offset) {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
const clsLeave = 'uk-transition-leave';
|
|
75
75
|
const clsEnter = 'uk-transition-enter';
|
|
76
76
|
|
|
77
|
-
function fade(action, target, duration, stagger
|
|
77
|
+
function fade(action, target, duration, stagger = 0) {
|
|
78
78
|
const index = transitionIndex(target, true);
|
|
79
79
|
const propsIn = { opacity: 1 };
|
|
80
80
|
const propsOut = { opacity: 0 };
|
|
@@ -337,13 +337,13 @@
|
|
|
337
337
|
},
|
|
338
338
|
|
|
339
339
|
methods: {
|
|
340
|
-
animate(action, target
|
|
340
|
+
animate(action, target = this.$el) {
|
|
341
341
|
const name = this.animation;
|
|
342
342
|
const animationFn =
|
|
343
343
|
name === 'fade' ?
|
|
344
344
|
fade :
|
|
345
345
|
name === 'delayed-fade' ?
|
|
346
|
-
|
|
346
|
+
(...args) => fade(...args, 40) :
|
|
347
347
|
name ?
|
|
348
348
|
slide :
|
|
349
349
|
() => {
|
|
@@ -376,8 +376,8 @@
|
|
|
376
376
|
|
|
377
377
|
computed: {
|
|
378
378
|
toggles: {
|
|
379
|
-
get(
|
|
380
|
-
return uikitUtil.$$(
|
|
379
|
+
get({ attrItem }, $el) {
|
|
380
|
+
return uikitUtil.$$(`[${attrItem}],[data-${attrItem}]`, $el);
|
|
381
381
|
},
|
|
382
382
|
|
|
383
383
|
watch() {
|
|
@@ -393,8 +393,8 @@
|
|
|
393
393
|
},
|
|
394
394
|
|
|
395
395
|
children: {
|
|
396
|
-
get(
|
|
397
|
-
return uikitUtil.$$(target
|
|
396
|
+
get({ target }, $el) {
|
|
397
|
+
return uikitUtil.$$(`${target} > *`, $el);
|
|
398
398
|
},
|
|
399
399
|
|
|
400
400
|
watch(list, old) {
|
|
@@ -412,7 +412,7 @@
|
|
|
412
412
|
name: 'click',
|
|
413
413
|
|
|
414
414
|
delegate() {
|
|
415
|
-
return
|
|
415
|
+
return `[${this.attrItem}],[data-${this.attrItem}]`;
|
|
416
416
|
},
|
|
417
417
|
|
|
418
418
|
handler(e) {
|
|
@@ -441,7 +441,7 @@
|
|
|
441
441
|
});
|
|
442
442
|
},
|
|
443
443
|
|
|
444
|
-
async setState(state, animate
|
|
444
|
+
async setState(state, animate = true) {
|
|
445
445
|
state = { filter: { '': '' }, sort: [], ...state };
|
|
446
446
|
|
|
447
447
|
uikitUtil.trigger(this.$el, 'beforeFilter', [this, state]);
|
|
@@ -521,9 +521,9 @@
|
|
|
521
521
|
|
|
522
522
|
function matchFilter(
|
|
523
523
|
el,
|
|
524
|
-
attr,
|
|
525
|
-
|
|
526
|
-
{
|
|
524
|
+
attr,
|
|
525
|
+
{ filter: stateFilter = { '': '' }, sort: [stateSort, stateOrder] })
|
|
526
|
+
{
|
|
527
527
|
const { filter = '', group = '', sort, order = 'asc' } = getFilter(el, attr);
|
|
528
528
|
|
|
529
529
|
return uikitUtil.isUndefined(sort) ?
|
|
@@ -536,7 +536,7 @@
|
|
|
536
536
|
return listA.length === listB.length && listA.every((el) => listB.includes(el));
|
|
537
537
|
}
|
|
538
538
|
|
|
539
|
-
function getSelector(
|
|
539
|
+
function getSelector({ filter }) {
|
|
540
540
|
let selector = '';
|
|
541
541
|
uikitUtil.each(filter, (value) => selector += value || '');
|
|
542
542
|
return selector;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.18-dev.014d8e608 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(n,y){typeof exports=="object"&&typeof module<"u"?module.exports=y(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitfilter",["uikit-util"],y):(n=typeof globalThis<"u"?globalThis:n||self,n.UIkitFilter=y(n.UIkit.util))})(this,function(n){"use strict";function y(s){return q(s,"top","bottom")}function q(s,e,o){const t=[[]];for(const r of s){if(!n.isVisible(r))continue;let a=u(r);for(let c=t.length-1;c>=0;c--){const f=t[c];if(!f[0]){f.push(r);break}let h;if(f[0].offsetParent===r.offsetParent?h=u(f[0]):(a=u(r,!0),h=u(f[0],!0)),a[e]>=h[o]-1&&a[e]!==h[e]){t.push([r]);break}if(a[o]-1>h[e]||a[e]===h[e]){f.push(r);break}if(c===0){t.unshift([r]);break}}}return t}function u(s,e=!1){let{offsetTop:o,offsetLeft:t,offsetHeight:r,offsetWidth:a}=s;return e&&([o,t]=n.offsetPosition(s)),{top:o,left:t,bottom:o+r,right:t+a}}const g="uk-transition-leave",v="uk-transition-enter";function T(s,e,o,t=0){const r=w(e,!0),a={opacity:1},c={opacity:0},f=i=>()=>r===w(e)?i():Promise.reject(),h=f(async()=>{n.addClass(e,g),await Promise.all(I(e).map((i,l)=>new Promise(d=>setTimeout(()=>n.Transition.start(i,c,o/2,"ease").then(d),l*t)))),n.removeClass(e,g)}),m=f(async()=>{const i=n.height(e);n.addClass(e,v),s(),n.css(n.children(e),{opacity:0}),await A();const l=n.children(e),d=n.height(e);n.css(e,"alignContent","flex-start"),n.height(e,i);const p=I(e);n.css(l,c);const x=p.map(async(R,G)=>{await L(G*t),await n.Transition.start(R,a,o/2,"ease")});i!==d&&x.push(n.Transition.start(e,{height:d},o/2+p.length*t,"ease")),await Promise.all(x).then(()=>{n.removeClass(e,v),r===w(e)&&(n.css(e,{height:"",alignContent:""}),n.css(l,{opacity:""}),delete e.dataset.transition)})});return n.hasClass(e,g)?$(e).then(m):n.hasClass(e,v)?$(e).then(h).then(m):h().then(m)}function w(s,e){return e&&(s.dataset.transition=1+w(s)),n.toNumber(s.dataset.transition)||0}function $(s){return Promise.all(n.children(s).filter(n.Transition.inProgress).map(e=>new Promise(o=>n.once(e,"transitionend transitioncanceled",o))))}function I(s){return y(n.children(s)).reduce((e,o)=>e.concat(n.sortBy(o.filter(t=>n.isInView(t)),"offsetLeft")),[])}function A(){return new Promise(s=>requestAnimationFrame(s))}function L(s){return new Promise(e=>setTimeout(e,s))}async function V(s,e,o){await b();let t=n.children(e);const r=t.map(d=>P(d,!0)),a={...n.css(e,["height","padding"]),display:"block"};await Promise.all(t.concat(e).map(n.Transition.cancel)),s(),t=t.concat(n.children(e).filter(d=>!n.includes(t,d))),await Promise.resolve(),n.fastdom.flush();const c=n.attr(e,"style"),f=n.css(e,["height","padding"]),[h,m]=B(e,t,r),i=t.map(d=>({style:n.attr(d,"style")}));t.forEach((d,p)=>m[p]&&n.css(d,m[p])),n.css(e,a),await b();const l=t.map((d,p)=>n.parent(d)===e&&n.Transition.start(d,h[p],o,"ease")).concat(n.Transition.start(e,f,o,"ease"));try{await Promise.all(l),t.forEach((d,p)=>{n.attr(d,i[p]),n.parent(d)===e&&n.css(d,"display",h[p].opacity===0?"none":"")}),n.attr(e,"style",c)}catch{n.attr(t,"style",""),N(e,a)}}function P(s,e){const o=n.css(s,"zIndex");return n.isVisible(s)?{display:"",opacity:e?n.css(s,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?n.index(s):o,...S(s)}:!1}function B(s,e,o){const t=e.map((a,c)=>n.parent(a)&&c in o?o[c]?n.isVisible(a)?S(a):{opacity:0}:{opacity:n.isVisible(a)?1:0}:!1),r=t.map((a,c)=>{const f=n.parent(e[c])===s&&(o[c]||P(e[c]));if(!f)return!1;if(!a)delete f.opacity;else if(!("opacity"in a)){const{opacity:h}=f;h%1?a.opacity=1:delete f.opacity}return f});return[t,r]}function N(s,e){for(const o in e)n.css(s,o,"")}function S(s){const{height:e,width:o}=n.offset(s);return{height:e,width:o,transform:"",...n.position(s),...n.css(s,["marginTop","marginLeft"])}}function b(){return new Promise(s=>requestAnimationFrame(s))}var z={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(s,e=this.$el){const o=this.animation;return(o==="fade"?T:o==="delayed-fade"?(...r)=>T(...r,40):o?V:()=>(s(),Promise.resolve()))(s,e,this.duration).catch(n.noop)}}},F={mixins:[z],args:"target",props:{target:Boolean,selActive:Boolean},data:{target:null,selActive:!1,attrItem:"uk-filter-control",cls:"uk-active",duration:250},computed:{toggles:{get({attrItem:s},e){return n.$$(`[${s}],[data-${s}]`,e)},watch(){if(this.updateState(),this.selActive!==!1){const s=n.$$(this.selActive,this.$el);this.toggles.forEach(e=>n.toggleClass(e,this.cls,n.includes(s,e)))}},immediate:!0},children:{get({target:s},e){return n.$$(`${s} > *`,e)},watch(s,e){e&&!D(s,e)&&this.updateState()},immediate:!0}},events:[{name:"click",delegate(){return`[${this.attrItem}],[data-${this.attrItem}]`},handler(s){s.preventDefault(),this.apply(s.current)}}],methods:{apply(s){const e=this.getState(),o=E(s,this.attrItem,this.getState());H(e,o)||this.setState(o)},getState(){return this.toggles.filter(s=>n.hasClass(s,this.cls)).reduce((s,e)=>E(e,this.attrItem,s),{filter:{"":""},sort:[]})},async setState(s,e=!0){s={filter:{"":""},sort:[],...s},n.trigger(this.$el,"beforeFilter",[this,s]),this.toggles.forEach(o=>n.toggleClass(o,this.cls,!!j(o,this.attrItem,s))),await Promise.all(n.$$(this.target,this.$el).map(o=>{const t=()=>{O(s,o,n.children(o)),this.$update(this.$el)};return e?this.animate(t,o):t()})),n.trigger(this.$el,"afterFilter",[this])},updateState(){n.fastdom.write(()=>this.setState(this.getState(),!1))}}};function C(s,e){return n.parseOptions(n.data(s,e),["filter"])}function H(s,e){return["filter","sort"].every(o=>n.isEqual(s[o],e[o]))}function O(s,e,o){const t=W(s);o.forEach(c=>n.css(c,"display",t&&!n.matches(c,t)?"none":""));const[r,a]=s.sort;if(r){const c=M(o,r,a);n.isEqual(c,o)||n.append(e,c)}}function E(s,e,o){const{filter:t,group:r,sort:a,order:c="asc"}=C(s,e);return(t||n.isUndefined(a))&&(r?t?(delete o.filter[""],o.filter[r]=t):(delete o.filter[r],(n.isEmpty(o.filter)||""in o.filter)&&(o.filter={"":t||""})):o.filter={"":t||""}),n.isUndefined(a)||(o.sort=[a,c]),o}function j(s,e,{filter:o={"":""},sort:[t,r]}){const{filter:a="",group:c="",sort:f,order:h="asc"}=C(s,e);return n.isUndefined(f)?c in o&&a===o[c]||!a&&c&&!(c in o)&&!o[""]:t===f&&r===h}function D(s,e){return s.length===e.length&&s.every(o=>e.includes(o))}function W({filter:s}){let e="";return n.each(s,o=>e+=o||""),e}function M(s,e,o){return[...s].sort((t,r)=>n.data(t,e).localeCompare(n.data(r,e),void 0,{numeric:!0})*(o==="asc"||-1))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("filter",F),F});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.18-dev.014d8e608 | 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')) :
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
return Math.abs(uikitUtil.css(el, 'transform').split(',')[4] / el.offsetWidth) || 0;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
function translate(value
|
|
32
|
+
function translate(value = 0, unit = '%') {
|
|
33
33
|
value += value ? unit : '';
|
|
34
|
-
return
|
|
34
|
+
return `translate3d(${value}, 0, 0)`;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
function scale3d(value) {
|
|
38
|
-
return
|
|
38
|
+
return `scale3d(${value}, ${value}, 1)`;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
var Animations = {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
},
|
|
86
86
|
|
|
87
87
|
computed: {
|
|
88
|
-
container(
|
|
88
|
+
container({ container }) {
|
|
89
89
|
return container === true && this.$container || container && uikitUtil.$(container);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -119,11 +119,11 @@
|
|
|
119
119
|
},
|
|
120
120
|
|
|
121
121
|
computed: {
|
|
122
|
-
hasAnimation(
|
|
122
|
+
hasAnimation({ animation }) {
|
|
123
123
|
return !!animation[0];
|
|
124
124
|
},
|
|
125
125
|
|
|
126
|
-
hasTransition(
|
|
126
|
+
hasTransition({ animation }) {
|
|
127
127
|
return ['slide', 'reveal'].some((transition) => uikitUtil.startsWith(animation[0], transition));
|
|
128
128
|
}
|
|
129
129
|
},
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
uikitUtil.toNodes(targets).map((el) => {
|
|
136
136
|
const show = uikitUtil.isBoolean(toggle) ? toggle : !this.isToggled(el);
|
|
137
137
|
|
|
138
|
-
if (!uikitUtil.trigger(el,
|
|
138
|
+
if (!uikitUtil.trigger(el, `before${show ? 'show' : 'hide'}`, [this])) {
|
|
139
139
|
return Promise.reject();
|
|
140
140
|
}
|
|
141
141
|
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
|
|
172
172
|
},
|
|
173
173
|
|
|
174
|
-
isToggled(el
|
|
174
|
+
isToggled(el = this.$el) {
|
|
175
175
|
[el] = uikitUtil.toNodes(el);
|
|
176
176
|
return uikitUtil.hasClass(el, this.clsEnter) ?
|
|
177
177
|
true :
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
}
|
|
208
208
|
};
|
|
209
209
|
|
|
210
|
-
function toggleInstant(el, show,
|
|
210
|
+
function toggleInstant(el, show, { _toggle }) {
|
|
211
211
|
uikitUtil.Animation.cancel(el);
|
|
212
212
|
uikitUtil.Transition.cancel(el);
|
|
213
213
|
return _toggle(el, show);
|
|
@@ -215,9 +215,9 @@
|
|
|
215
215
|
|
|
216
216
|
async function toggleTransition(
|
|
217
217
|
el,
|
|
218
|
-
show,
|
|
219
|
-
|
|
220
|
-
{var _animation$;
|
|
218
|
+
show,
|
|
219
|
+
{ animation, duration, velocity, transition, _toggle })
|
|
220
|
+
{var _animation$;
|
|
221
221
|
const [mode = 'reveal', startProp = 'top'] = ((_animation$ = animation[0]) == null ? void 0 : _animation$.split('-')) || [];
|
|
222
222
|
|
|
223
223
|
const dirs = [
|
|
@@ -228,8 +228,8 @@
|
|
|
228
228
|
const end = dir[1] === startProp;
|
|
229
229
|
const props = ['width', 'height'];
|
|
230
230
|
const dimProp = props[dirs.indexOf(dir)];
|
|
231
|
-
const marginProp =
|
|
232
|
-
const marginStartProp =
|
|
231
|
+
const marginProp = `margin-${dir[0]}`;
|
|
232
|
+
const marginStartProp = `margin-${startProp}`;
|
|
233
233
|
|
|
234
234
|
let currentDim = uikitUtil.dimensions(el)[dimProp];
|
|
235
235
|
|
|
@@ -356,7 +356,7 @@
|
|
|
356
356
|
},
|
|
357
357
|
|
|
358
358
|
computed: {
|
|
359
|
-
panel(
|
|
359
|
+
panel({ selPanel }, $el) {
|
|
360
360
|
return uikitUtil.$(selPanel, $el);
|
|
361
361
|
},
|
|
362
362
|
|
|
@@ -364,7 +364,7 @@
|
|
|
364
364
|
return this.panel;
|
|
365
365
|
},
|
|
366
366
|
|
|
367
|
-
bgClose(
|
|
367
|
+
bgClose({ bgClose }) {
|
|
368
368
|
return bgClose && this.panel;
|
|
369
369
|
}
|
|
370
370
|
},
|
|
@@ -380,7 +380,7 @@
|
|
|
380
380
|
name: 'click',
|
|
381
381
|
|
|
382
382
|
delegate() {
|
|
383
|
-
return this.selClose
|
|
383
|
+
return `${this.selClose},a[href*="#"]`;
|
|
384
384
|
},
|
|
385
385
|
|
|
386
386
|
handler(e) {
|
|
@@ -469,7 +469,7 @@
|
|
|
469
469
|
uikitUtil.once(
|
|
470
470
|
this.$el,
|
|
471
471
|
'hide',
|
|
472
|
-
uikitUtil.on(document, uikitUtil.pointerDown, (
|
|
472
|
+
uikitUtil.on(document, uikitUtil.pointerDown, ({ target }) => {
|
|
473
473
|
if (
|
|
474
474
|
uikitUtil.last(active) !== this ||
|
|
475
475
|
this.overlay && !uikitUtil.within(target, this.$el) ||
|
|
@@ -480,8 +480,8 @@
|
|
|
480
480
|
|
|
481
481
|
uikitUtil.once(
|
|
482
482
|
document,
|
|
483
|
-
uikitUtil.pointerUp
|
|
484
|
-
(
|
|
483
|
+
`${uikitUtil.pointerUp} ${uikitUtil.pointerCancel} scroll`,
|
|
484
|
+
({ defaultPrevented, type, target: newTarget }) => {
|
|
485
485
|
if (
|
|
486
486
|
!defaultPrevented &&
|
|
487
487
|
type === uikitUtil.pointerUp &&
|
|
@@ -569,7 +569,7 @@
|
|
|
569
569
|
}
|
|
570
570
|
};
|
|
571
571
|
|
|
572
|
-
function animate(el, show,
|
|
572
|
+
function animate(el, show, { transitionElement, _toggle }) {
|
|
573
573
|
return new Promise((resolve, reject) =>
|
|
574
574
|
uikitUtil.once(el, 'show hide', () => {
|
|
575
575
|
el._reject == null ? void 0 : el._reject();
|
|
@@ -617,7 +617,7 @@
|
|
|
617
617
|
uikitUtil.on(
|
|
618
618
|
el,
|
|
619
619
|
'touchstart',
|
|
620
|
-
(
|
|
620
|
+
({ targetTouches }) => {
|
|
621
621
|
if (targetTouches.length === 1) {
|
|
622
622
|
startClientY = targetTouches[0].clientY;
|
|
623
623
|
}
|
|
@@ -689,7 +689,7 @@
|
|
|
689
689
|
return ['origin', 'pathname', 'search'].every((part) => a[part] === location[part]);
|
|
690
690
|
}
|
|
691
691
|
|
|
692
|
-
function Transitioner(prev, next, dir,
|
|
692
|
+
function Transitioner(prev, next, dir, { animation, easing }) {
|
|
693
693
|
const { percent, translate, show = uikitUtil.noop } = animation;
|
|
694
694
|
const props = show(dir);
|
|
695
695
|
const deferred = new uikitUtil.Deferred();
|
|
@@ -697,7 +697,7 @@
|
|
|
697
697
|
return {
|
|
698
698
|
dir,
|
|
699
699
|
|
|
700
|
-
show(duration, percent, linear) {
|
|
700
|
+
show(duration, percent = 0, linear) {
|
|
701
701
|
const timing = linear ? 'linear' : easing;
|
|
702
702
|
duration -= Math.round(duration * uikitUtil.clamp(percent, -1, 1));
|
|
703
703
|
|
|
@@ -727,7 +727,7 @@
|
|
|
727
727
|
}
|
|
728
728
|
},
|
|
729
729
|
|
|
730
|
-
forward(duration, percent
|
|
730
|
+
forward(duration, percent = this.percent()) {
|
|
731
731
|
uikitUtil.Transition.cancel([next, prev]);
|
|
732
732
|
return this.show(duration, percent, true);
|
|
733
733
|
},
|
|
@@ -870,7 +870,7 @@
|
|
|
870
870
|
passive: true,
|
|
871
871
|
|
|
872
872
|
delegate() {
|
|
873
|
-
return this.
|
|
873
|
+
return `${this.selList} > *`;
|
|
874
874
|
},
|
|
875
875
|
|
|
876
876
|
handler(e) {
|
|
@@ -1058,12 +1058,12 @@
|
|
|
1058
1058
|
},
|
|
1059
1059
|
|
|
1060
1060
|
computed: {
|
|
1061
|
-
nav(
|
|
1061
|
+
nav({ selNav }, $el) {
|
|
1062
1062
|
return uikitUtil.$(selNav, $el);
|
|
1063
1063
|
},
|
|
1064
1064
|
|
|
1065
|
-
selNavItem(
|
|
1066
|
-
return
|
|
1065
|
+
selNavItem({ attrItem }) {
|
|
1066
|
+
return `[${attrItem}],[data-${attrItem}]`;
|
|
1067
1067
|
},
|
|
1068
1068
|
|
|
1069
1069
|
navItems(_, $el) {
|
|
@@ -1077,7 +1077,7 @@
|
|
|
1077
1077
|
uikitUtil.html(
|
|
1078
1078
|
this.nav,
|
|
1079
1079
|
this.slides.
|
|
1080
|
-
map((_, i) =>
|
|
1080
|
+
map((_, i) => `<li ${this.attrItem}="${i}"><a href></a></li>`).
|
|
1081
1081
|
join(''));
|
|
1082
1082
|
|
|
1083
1083
|
}
|
|
@@ -1136,8 +1136,7 @@
|
|
|
1136
1136
|
easing: String,
|
|
1137
1137
|
index: Number,
|
|
1138
1138
|
finite: Boolean,
|
|
1139
|
-
velocity: Number
|
|
1140
|
-
selSlides: String
|
|
1139
|
+
velocity: Number
|
|
1141
1140
|
},
|
|
1142
1141
|
|
|
1143
1142
|
data: () => ({
|
|
@@ -1165,11 +1164,11 @@
|
|
|
1165
1164
|
},
|
|
1166
1165
|
|
|
1167
1166
|
computed: {
|
|
1168
|
-
duration(
|
|
1167
|
+
duration({ velocity }, $el) {
|
|
1169
1168
|
return speedUp($el.offsetWidth / velocity);
|
|
1170
1169
|
},
|
|
1171
1170
|
|
|
1172
|
-
list(
|
|
1171
|
+
list({ selList }, $el) {
|
|
1173
1172
|
return uikitUtil.$(selList, $el);
|
|
1174
1173
|
},
|
|
1175
1174
|
|
|
@@ -1177,13 +1176,9 @@
|
|
|
1177
1176
|
return this.length - 1;
|
|
1178
1177
|
},
|
|
1179
1178
|
|
|
1180
|
-
selSlides(_ref3) {let { selList, selSlides } = _ref3;
|
|
1181
|
-
return selList + " " + (selSlides || '> *');
|
|
1182
|
-
},
|
|
1183
|
-
|
|
1184
1179
|
slides: {
|
|
1185
1180
|
get() {
|
|
1186
|
-
return uikitUtil
|
|
1181
|
+
return uikitUtil.children(this.list);
|
|
1187
1182
|
},
|
|
1188
1183
|
|
|
1189
1184
|
watch() {
|
|
@@ -1197,7 +1192,7 @@
|
|
|
1197
1192
|
},
|
|
1198
1193
|
|
|
1199
1194
|
methods: {
|
|
1200
|
-
show(index, force
|
|
1195
|
+
show(index, force = false) {
|
|
1201
1196
|
if (this.dragging || !this.length) {
|
|
1202
1197
|
return;
|
|
1203
1198
|
}
|
|
@@ -1268,11 +1263,11 @@
|
|
|
1268
1263
|
return promise;
|
|
1269
1264
|
},
|
|
1270
1265
|
|
|
1271
|
-
getIndex(index
|
|
1266
|
+
getIndex(index = this.index, prev = this.index) {
|
|
1272
1267
|
return uikitUtil.clamp(uikitUtil.getIndex(index, this.slides, prev, this.finite), 0, this.maxIndex);
|
|
1273
1268
|
},
|
|
1274
1269
|
|
|
1275
|
-
getValidIndex(index
|
|
1270
|
+
getValidIndex(index = this.index, prevIndex = this.prevIndex) {
|
|
1276
1271
|
return this.getIndex(index, prevIndex);
|
|
1277
1272
|
},
|
|
1278
1273
|
|
|
@@ -1302,18 +1297,18 @@
|
|
|
1302
1297
|
return this._getTransitioner(prev, prev !== next && next).getDistance();
|
|
1303
1298
|
},
|
|
1304
1299
|
|
|
1305
|
-
_translate(percent, prev
|
|
1300
|
+
_translate(percent, prev = this.prevIndex, next = this.index) {
|
|
1306
1301
|
const transitioner = this._getTransitioner(prev !== next ? prev : false, next);
|
|
1307
1302
|
transitioner.translate(percent);
|
|
1308
1303
|
return transitioner;
|
|
1309
1304
|
},
|
|
1310
1305
|
|
|
1311
1306
|
_getTransitioner(
|
|
1312
|
-
prev,
|
|
1313
|
-
next,
|
|
1314
|
-
dir,
|
|
1315
|
-
options)
|
|
1316
|
-
{
|
|
1307
|
+
prev = this.prevIndex,
|
|
1308
|
+
next = this.index,
|
|
1309
|
+
dir = this.dir || 1,
|
|
1310
|
+
options = this.transitionOptions)
|
|
1311
|
+
{
|
|
1317
1312
|
return new this.Transitioner(
|
|
1318
1313
|
uikitUtil.isNumber(prev) ? this.slides[prev] : prev,
|
|
1319
1314
|
uikitUtil.isNumber(next) ? this.slides[next] : next,
|
|
@@ -1347,7 +1342,7 @@
|
|
|
1347
1342
|
},
|
|
1348
1343
|
|
|
1349
1344
|
computed: {
|
|
1350
|
-
animation(
|
|
1345
|
+
animation({ animation, Animations }) {
|
|
1351
1346
|
return { ...(Animations[animation] || Animations.slide), name: animation };
|
|
1352
1347
|
},
|
|
1353
1348
|
|
|
@@ -1357,15 +1352,15 @@
|
|
|
1357
1352
|
},
|
|
1358
1353
|
|
|
1359
1354
|
events: {
|
|
1360
|
-
beforeitemshow(
|
|
1355
|
+
beforeitemshow({ target }) {
|
|
1361
1356
|
uikitUtil.addClass(target, this.clsActive);
|
|
1362
1357
|
},
|
|
1363
1358
|
|
|
1364
|
-
itemshown(
|
|
1359
|
+
itemshown({ target }) {
|
|
1365
1360
|
uikitUtil.addClass(target, this.clsActivated);
|
|
1366
1361
|
},
|
|
1367
1362
|
|
|
1368
|
-
itemhidden(
|
|
1363
|
+
itemhidden({ target }) {
|
|
1369
1364
|
uikitUtil.removeClass(target, this.clsActive, this.clsActivated);
|
|
1370
1365
|
}
|
|
1371
1366
|
}
|
|
@@ -1397,15 +1392,15 @@
|
|
|
1397
1392
|
pauseOnHover: false,
|
|
1398
1393
|
velocity: 2,
|
|
1399
1394
|
Animations,
|
|
1400
|
-
template:
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1395
|
+
template: `<div class="uk-lightbox uk-overflow-hidden">
|
|
1396
|
+
<ul class="uk-lightbox-items"></ul>
|
|
1397
|
+
<div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque">
|
|
1398
|
+
<button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button>
|
|
1399
|
+
</div>
|
|
1400
|
+
<a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a>
|
|
1401
|
+
<a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a>
|
|
1402
|
+
<div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div>
|
|
1403
|
+
</div>`
|
|
1409
1404
|
}),
|
|
1410
1405
|
|
|
1411
1406
|
created() {
|
|
@@ -1417,14 +1412,14 @@
|
|
|
1417
1412
|
},
|
|
1418
1413
|
|
|
1419
1414
|
computed: {
|
|
1420
|
-
caption(
|
|
1415
|
+
caption({ selCaption }, $el) {
|
|
1421
1416
|
return uikitUtil.$(selCaption, $el);
|
|
1422
1417
|
}
|
|
1423
1418
|
},
|
|
1424
1419
|
|
|
1425
1420
|
events: [
|
|
1426
1421
|
{
|
|
1427
|
-
name: uikitUtil.pointerMove
|
|
1422
|
+
name: `${uikitUtil.pointerMove} ${uikitUtil.pointerDown} keydown`,
|
|
1428
1423
|
|
|
1429
1424
|
handler: 'showControls'
|
|
1430
1425
|
},
|
|
@@ -1435,15 +1430,13 @@
|
|
|
1435
1430
|
self: true,
|
|
1436
1431
|
|
|
1437
1432
|
delegate() {
|
|
1438
|
-
return this.
|
|
1433
|
+
return `${this.selList} > *`;
|
|
1439
1434
|
},
|
|
1440
1435
|
|
|
1441
1436
|
handler(e) {
|
|
1442
|
-
if (e.defaultPrevented) {
|
|
1443
|
-
|
|
1437
|
+
if (!e.defaultPrevented) {
|
|
1438
|
+
this.hide();
|
|
1444
1439
|
}
|
|
1445
|
-
|
|
1446
|
-
this.hide();
|
|
1447
1440
|
}
|
|
1448
1441
|
},
|
|
1449
1442
|
|
|
@@ -1560,7 +1553,7 @@
|
|
|
1560
1553
|
allowfullscreen: '',
|
|
1561
1554
|
style: 'max-width: 100%; box-sizing: border-box;',
|
|
1562
1555
|
'uk-responsive': '',
|
|
1563
|
-
'uk-video':
|
|
1556
|
+
'uk-video': `${this.videoAutoplay}`
|
|
1564
1557
|
};
|
|
1565
1558
|
|
|
1566
1559
|
// Image
|
|
@@ -1582,7 +1575,7 @@
|
|
|
1582
1575
|
poster,
|
|
1583
1576
|
controls: '',
|
|
1584
1577
|
playsinline: '',
|
|
1585
|
-
'uk-video':
|
|
1578
|
+
'uk-video': `${this.videoAutoplay}`
|
|
1586
1579
|
});
|
|
1587
1580
|
|
|
1588
1581
|
uikitUtil.on(video, 'loadedmetadata', () => {
|
|
@@ -1616,9 +1609,9 @@
|
|
|
1616
1609
|
this.setItem(
|
|
1617
1610
|
item,
|
|
1618
1611
|
createEl('iframe', {
|
|
1619
|
-
src:
|
|
1620
|
-
|
|
1621
|
-
|
|
1612
|
+
src: `https://www.youtube${matches[1] || ''}.com/embed/${matches[2]}${
|
|
1613
|
+
matches[3] ? `?${matches[3]}` : ''
|
|
1614
|
+
}`,
|
|
1622
1615
|
width: 1920,
|
|
1623
1616
|
height: 1080,
|
|
1624
1617
|
...iframeAttrs,
|
|
@@ -1630,10 +1623,10 @@
|
|
|
1630
1623
|
} else if (matches = src.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/)) {
|
|
1631
1624
|
try {
|
|
1632
1625
|
const { height, width } = await (
|
|
1633
|
-
await fetch(
|
|
1634
|
-
encodeURI(
|
|
1635
|
-
|
|
1636
|
-
|
|
1626
|
+
await fetch(
|
|
1627
|
+
`https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(
|
|
1628
|
+
src)
|
|
1629
|
+
}`,
|
|
1637
1630
|
{
|
|
1638
1631
|
credentials: 'omit'
|
|
1639
1632
|
})).
|
|
@@ -1643,9 +1636,9 @@
|
|
|
1643
1636
|
this.setItem(
|
|
1644
1637
|
item,
|
|
1645
1638
|
createEl('iframe', {
|
|
1646
|
-
src:
|
|
1647
|
-
|
|
1648
|
-
|
|
1639
|
+
src: `https://player.vimeo.com/video/${matches[1]}${
|
|
1640
|
+
matches[2] ? `?${matches[2]}` : ''
|
|
1641
|
+
}`,
|
|
1649
1642
|
width,
|
|
1650
1643
|
height,
|
|
1651
1644
|
...iframeAttrs,
|
|
@@ -1661,7 +1654,7 @@
|
|
|
1661
1654
|
|
|
1662
1655
|
|
|
1663
1656
|
methods: {
|
|
1664
|
-
loadItem(index
|
|
1657
|
+
loadItem(index = this.index) {
|
|
1665
1658
|
const item = this.getItem(index);
|
|
1666
1659
|
|
|
1667
1660
|
if (!this.getSlide(item).childElementCount) {
|
|
@@ -1669,7 +1662,7 @@
|
|
|
1669
1662
|
}
|
|
1670
1663
|
},
|
|
1671
1664
|
|
|
1672
|
-
getItem(index
|
|
1665
|
+
getItem(index = this.index) {
|
|
1673
1666
|
return this.items[uikitUtil.getIndex(index, this.slides)];
|
|
1674
1667
|
},
|
|
1675
1668
|
|
|
@@ -1699,7 +1692,7 @@
|
|
|
1699
1692
|
};
|
|
1700
1693
|
|
|
1701
1694
|
function createEl(tag, attrs) {
|
|
1702
|
-
const el = uikitUtil.fragment(
|
|
1695
|
+
const el = uikitUtil.fragment(`<${tag}>`);
|
|
1703
1696
|
uikitUtil.attr(el, attrs);
|
|
1704
1697
|
return el;
|
|
1705
1698
|
}
|