uikit 3.15.18-dev.9cbbb510d → 3.15.19-dev.699ab5a7f
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/build/util.js +4 -4
- package/dist/css/uikit-core-rtl.css +5 -2
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +5 -2
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +5 -2
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +5 -2
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +2 -2
- package/dist/js/components/countdown.min.js +2 -1
- package/dist/js/components/filter.js +22 -30
- package/dist/js/components/filter.min.js +2 -1
- package/dist/js/components/lightbox-panel.js +75 -96
- package/dist/js/components/lightbox-panel.min.js +2 -1
- package/dist/js/components/lightbox.js +78 -99
- package/dist/js/components/lightbox.min.js +2 -1
- package/dist/js/components/notification.js +11 -14
- package/dist/js/components/notification.min.js +2 -1
- package/dist/js/components/parallax.js +24 -26
- package/dist/js/components/parallax.min.js +2 -1
- package/dist/js/components/slider-parallax.js +19 -20
- package/dist/js/components/slider-parallax.min.js +2 -1
- package/dist/js/components/slider.js +95 -51
- package/dist/js/components/slider.min.js +2 -1
- package/dist/js/components/slideshow-parallax.js +19 -20
- package/dist/js/components/slideshow-parallax.min.js +2 -1
- package/dist/js/components/slideshow.js +35 -42
- package/dist/js/components/slideshow.min.js +2 -1
- package/dist/js/components/sortable.js +12 -18
- package/dist/js/components/sortable.min.js +2 -1
- package/dist/js/components/tooltip.js +25 -30
- package/dist/js/components/tooltip.min.js +2 -1
- package/dist/js/components/upload.js +7 -7
- package/dist/js/components/upload.min.js +2 -1
- package/dist/js/uikit-core.js +277 -330
- package/dist/js/uikit-core.min.js +2 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +2 -1
- package/dist/js/uikit.js +470 -503
- package/dist/js/uikit.min.js +2 -1
- package/package.json +2 -2
- package/src/js/components/lightbox-panel.js +3 -5
- package/src/js/components/slider.js +62 -7
- package/src/js/core/accordion.js +5 -4
- package/src/js/core/sticky.js +6 -7
- package/src/js/mixin/slider-drag.js +1 -1
- package/src/js/mixin/slider.js +2 -7
- package/src/js/util/attr.js +1 -6
- package/src/less/components/sticky.less +4 -1
- package/src/scss/components/sticky.scss +4 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.19-dev.699ab5a7f | 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,2 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.19-dev.699ab5a7f | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
|
+
(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.19-dev.699ab5a7f | 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 };
|
|
@@ -86,11 +86,8 @@
|
|
|
86
86
|
|
|
87
87
|
await Promise.all(
|
|
88
88
|
getTransitionNodes(target).map(
|
|
89
|
-
(child, i) =>
|
|
90
|
-
|
|
91
|
-
setTimeout(
|
|
92
|
-
() =>
|
|
93
|
-
uikitUtil.Transition.start(child, propsOut, duration / 2, 'ease').then(
|
|
89
|
+
(child, i) => new Promise((resolve) => setTimeout(
|
|
90
|
+
() => uikitUtil.Transition.start(child, propsOut, duration / 2, 'ease').then(
|
|
94
91
|
resolve),
|
|
95
92
|
|
|
96
93
|
i * stagger))));
|
|
@@ -169,16 +166,14 @@
|
|
|
169
166
|
uikitUtil.children(target).
|
|
170
167
|
filter(uikitUtil.Transition.inProgress).
|
|
171
168
|
map(
|
|
172
|
-
(el) =>
|
|
173
|
-
new Promise((resolve) => uikitUtil.once(el, 'transitionend transitioncanceled', resolve))));
|
|
169
|
+
(el) => new Promise((resolve) => uikitUtil.once(el, 'transitionend transitioncanceled', resolve))));
|
|
174
170
|
|
|
175
171
|
|
|
176
172
|
}
|
|
177
173
|
|
|
178
174
|
function getTransitionNodes(target) {
|
|
179
175
|
return getRows(uikitUtil.children(target)).reduce(
|
|
180
|
-
(nodes, row) =>
|
|
181
|
-
nodes.concat(
|
|
176
|
+
(nodes, row) => nodes.concat(
|
|
182
177
|
uikitUtil.sortBy(
|
|
183
178
|
row.filter((el) => uikitUtil.isInView(el)),
|
|
184
179
|
'offsetLeft')),
|
|
@@ -268,8 +263,7 @@
|
|
|
268
263
|
}
|
|
269
264
|
|
|
270
265
|
function getTransitionProps(target, nodes, currentProps) {
|
|
271
|
-
const propsTo = nodes.map((el, i) =>
|
|
272
|
-
uikitUtil.parent(el) && i in currentProps ?
|
|
266
|
+
const propsTo = nodes.map((el, i) => uikitUtil.parent(el) && i in currentProps ?
|
|
273
267
|
currentProps[i] ?
|
|
274
268
|
uikitUtil.isVisible(el) ?
|
|
275
269
|
getPositionWithMargin(el) :
|
|
@@ -337,13 +331,13 @@
|
|
|
337
331
|
},
|
|
338
332
|
|
|
339
333
|
methods: {
|
|
340
|
-
animate(action, target
|
|
334
|
+
animate(action, target = this.$el) {
|
|
341
335
|
const name = this.animation;
|
|
342
336
|
const animationFn =
|
|
343
337
|
name === 'fade' ?
|
|
344
338
|
fade :
|
|
345
339
|
name === 'delayed-fade' ?
|
|
346
|
-
|
|
340
|
+
(...args) => fade(...args, 40) :
|
|
347
341
|
name ?
|
|
348
342
|
slide :
|
|
349
343
|
() => {
|
|
@@ -376,8 +370,8 @@
|
|
|
376
370
|
|
|
377
371
|
computed: {
|
|
378
372
|
toggles: {
|
|
379
|
-
get(
|
|
380
|
-
return uikitUtil.$$(
|
|
373
|
+
get({ attrItem }, $el) {
|
|
374
|
+
return uikitUtil.$$(`[${attrItem}],[data-${attrItem}]`, $el);
|
|
381
375
|
},
|
|
382
376
|
|
|
383
377
|
watch() {
|
|
@@ -393,8 +387,8 @@
|
|
|
393
387
|
},
|
|
394
388
|
|
|
395
389
|
children: {
|
|
396
|
-
get(
|
|
397
|
-
return uikitUtil.$$(target
|
|
390
|
+
get({ target }, $el) {
|
|
391
|
+
return uikitUtil.$$(`${target} > *`, $el);
|
|
398
392
|
},
|
|
399
393
|
|
|
400
394
|
watch(list, old) {
|
|
@@ -412,7 +406,7 @@
|
|
|
412
406
|
name: 'click',
|
|
413
407
|
|
|
414
408
|
delegate() {
|
|
415
|
-
return
|
|
409
|
+
return `[${this.attrItem}],[data-${this.attrItem}]`;
|
|
416
410
|
},
|
|
417
411
|
|
|
418
412
|
handler(e) {
|
|
@@ -441,13 +435,12 @@
|
|
|
441
435
|
});
|
|
442
436
|
},
|
|
443
437
|
|
|
444
|
-
async setState(state, animate
|
|
438
|
+
async setState(state, animate = true) {
|
|
445
439
|
state = { filter: { '': '' }, sort: [], ...state };
|
|
446
440
|
|
|
447
441
|
uikitUtil.trigger(this.$el, 'beforeFilter', [this, state]);
|
|
448
442
|
|
|
449
|
-
this.toggles.forEach((el) =>
|
|
450
|
-
uikitUtil.toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state)));
|
|
443
|
+
this.toggles.forEach((el) => uikitUtil.toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state)));
|
|
451
444
|
|
|
452
445
|
|
|
453
446
|
await Promise.all(
|
|
@@ -521,9 +514,9 @@
|
|
|
521
514
|
|
|
522
515
|
function matchFilter(
|
|
523
516
|
el,
|
|
524
|
-
attr,
|
|
525
|
-
|
|
526
|
-
{
|
|
517
|
+
attr,
|
|
518
|
+
{ filter: stateFilter = { '': '' }, sort: [stateSort, stateOrder] })
|
|
519
|
+
{
|
|
527
520
|
const { filter = '', group = '', sort, order = 'asc' } = getFilter(el, attr);
|
|
528
521
|
|
|
529
522
|
return uikitUtil.isUndefined(sort) ?
|
|
@@ -536,7 +529,7 @@
|
|
|
536
529
|
return listA.length === listB.length && listA.every((el) => listB.includes(el));
|
|
537
530
|
}
|
|
538
531
|
|
|
539
|
-
function getSelector(
|
|
532
|
+
function getSelector({ filter }) {
|
|
540
533
|
let selector = '';
|
|
541
534
|
uikitUtil.each(filter, (value) => selector += value || '');
|
|
542
535
|
return selector;
|
|
@@ -544,8 +537,7 @@
|
|
|
544
537
|
|
|
545
538
|
function sortItems(nodes, sort, order) {
|
|
546
539
|
return [...nodes].sort(
|
|
547
|
-
(a, b) =>
|
|
548
|
-
uikitUtil.data(a, sort).localeCompare(uikitUtil.data(b, sort), undefined, { numeric: true }) * (
|
|
540
|
+
(a, b) => uikitUtil.data(a, sort).localeCompare(uikitUtil.data(b, sort), undefined, { numeric: true }) * (
|
|
549
541
|
order === 'asc' || -1));
|
|
550
542
|
|
|
551
543
|
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.19-dev.699ab5a7f | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
|
+
(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});
|