uikit 3.15.24 → 3.15.25-dev.ef4c64c1a

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.
Files changed (50) hide show
  1. package/dist/css/uikit-core-rtl.css +1 -1
  2. package/dist/css/uikit-core-rtl.min.css +1 -1
  3. package/dist/css/uikit-core.css +1 -1
  4. package/dist/css/uikit-core.min.css +1 -1
  5. package/dist/css/uikit-rtl.css +1 -1
  6. package/dist/css/uikit-rtl.min.css +1 -1
  7. package/dist/css/uikit.css +1 -1
  8. package/dist/css/uikit.min.css +1 -1
  9. package/dist/js/components/countdown.js +6 -6
  10. package/dist/js/components/countdown.min.js +1 -1
  11. package/dist/js/components/filter.js +1 -1
  12. package/dist/js/components/filter.min.js +1 -1
  13. package/dist/js/components/lightbox-panel.js +59 -76
  14. package/dist/js/components/lightbox-panel.min.js +1 -1
  15. package/dist/js/components/lightbox.js +59 -76
  16. package/dist/js/components/lightbox.min.js +1 -1
  17. package/dist/js/components/notification.js +1 -1
  18. package/dist/js/components/notification.min.js +1 -1
  19. package/dist/js/components/parallax.js +1 -1
  20. package/dist/js/components/parallax.min.js +1 -1
  21. package/dist/js/components/slider-parallax.js +1 -1
  22. package/dist/js/components/slider-parallax.min.js +1 -1
  23. package/dist/js/components/slider.js +2 -2
  24. package/dist/js/components/slider.min.js +1 -1
  25. package/dist/js/components/slideshow-parallax.js +1 -1
  26. package/dist/js/components/slideshow-parallax.min.js +1 -1
  27. package/dist/js/components/slideshow.js +2 -2
  28. package/dist/js/components/slideshow.min.js +1 -1
  29. package/dist/js/components/sortable.js +4 -5
  30. package/dist/js/components/sortable.min.js +1 -1
  31. package/dist/js/components/tooltip.js +2 -7
  32. package/dist/js/components/tooltip.min.js +1 -1
  33. package/dist/js/components/upload.js +2 -2
  34. package/dist/js/components/upload.min.js +1 -1
  35. package/dist/js/uikit-core.js +115 -108
  36. package/dist/js/uikit-core.min.js +1 -1
  37. package/dist/js/uikit-icons.js +1 -1
  38. package/dist/js/uikit-icons.min.js +1 -1
  39. package/dist/js/uikit.js +133 -143
  40. package/dist/js/uikit.min.js +1 -1
  41. package/package.json +1 -1
  42. package/src/js/components/countdown.js +5 -5
  43. package/src/js/components/lightbox-panel.js +6 -18
  44. package/src/js/components/sortable.js +3 -4
  45. package/src/js/components/tooltip.js +3 -8
  46. package/src/js/components/upload.js +1 -1
  47. package/src/js/core/drop.js +62 -50
  48. package/src/js/mixin/modal.js +52 -58
  49. package/src/js/mixin/slider-autoplay.js +1 -1
  50. package/src/js/util/mouse.js +1 -1
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.15.24 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
1
+ /*! UIkit 3.15.25-dev.ef4c64c1a | 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
- xhr.upload && uikitUtil.on(xhr.upload, 'progress', this.progress);
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.24 | 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&&!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});
1
+ /*! UIkit 3.15.25-dev.ef4c64c1a | 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});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.15.24 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
1
+ /*! UIkit 3.15.25-dev.ef4c64c1a | 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
- this.interval && clearInterval(this.interval);
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.24';
2980
+ UIkit.version = '3.15.25-dev.ef4c64c1a';
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
- addClass(document.documentElement, this.clsPage);
3921
-
3922
- if (this.bgClose) {
3923
- once(
3924
- this.$el,
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 = this.$create('toggle', query(this.toggle, this.$el), {
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
- on(
4332
- document,
4333
- pointerDown,
4334
- ({ target }) => !within(target, this.$el) &&
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