uikit 3.11.2-dev.c7ed3c19b → 3.11.2-dev.d8c101f07

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 (62) 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 +1 -1
  10. package/dist/js/components/countdown.min.js +1 -1
  11. package/dist/js/components/filter.js +6 -8
  12. package/dist/js/components/filter.min.js +1 -1
  13. package/dist/js/components/lightbox-panel.js +26 -55
  14. package/dist/js/components/lightbox-panel.min.js +1 -1
  15. package/dist/js/components/lightbox.js +27 -57
  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 +4 -11
  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 +8 -14
  28. package/dist/js/components/slideshow.min.js +1 -1
  29. package/dist/js/components/sortable.js +5 -7
  30. package/dist/js/components/sortable.min.js +1 -1
  31. package/dist/js/components/tooltip.js +2 -2
  32. package/dist/js/components/tooltip.min.js +1 -1
  33. package/dist/js/components/upload.js +1 -1
  34. package/dist/js/components/upload.min.js +1 -1
  35. package/dist/js/uikit-core.js +20 -27
  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 +54 -92
  40. package/dist/js/uikit.min.js +1 -1
  41. package/package.json +1 -1
  42. package/src/js/api/component.js +2 -11
  43. package/src/js/api/hooks.js +1 -1
  44. package/src/js/api/state.js +1 -1
  45. package/src/js/components/filter.js +2 -3
  46. package/src/js/components/internal/lightbox-animations.js +4 -3
  47. package/src/js/components/internal/slideshow-animations.js +4 -3
  48. package/src/js/components/lightbox-panel.js +34 -58
  49. package/src/js/components/lightbox.js +1 -2
  50. package/src/js/components/sortable.js +1 -1
  51. package/src/js/core/alert.js +1 -2
  52. package/src/js/core/modal.js +1 -2
  53. package/src/js/core/navbar.js +3 -3
  54. package/src/js/mixin/internal/animate-slide.js +9 -12
  55. package/src/js/mixin/slider.js +8 -16
  56. package/src/js/mixin/slideshow.js +2 -2
  57. package/src/js/mixin/togglable.js +1 -2
  58. package/src/js/util/ajax.js +9 -12
  59. package/src/js/util/animation.js +7 -12
  60. package/src/js/util/lang.js +1 -1
  61. package/src/js/util/options.js +2 -11
  62. package/src/js/util/player.js +2 -2
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.11.2-dev.c7ed3c19b | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.11.2-dev.d8c101f07 | 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() :
@@ -224,7 +224,7 @@
224
224
  },
225
225
 
226
226
  contain(dimensions, maxDimensions) {
227
- dimensions = assign({}, dimensions);
227
+ dimensions = { ...dimensions };
228
228
 
229
229
  each(
230
230
  dimensions,
@@ -670,17 +670,14 @@
670
670
  }
671
671
 
672
672
  function ajax(url, options) {
673
- const env = assign(
674
- {
673
+ const env = {
675
674
  data: null,
676
675
  method: 'GET',
677
676
  headers: {},
678
677
  xhr: new XMLHttpRequest(),
679
678
  beforeSend: noop,
680
- responseType: '' },
681
-
682
- options);
683
-
679
+ responseType: '',
680
+ ...options };
684
681
 
685
682
  return Promise.resolve().
686
683
  then(() => env.beforeSend(env)).
@@ -914,16 +911,11 @@
914
911
 
915
912
 
916
913
  addClass(element, 'uk-transition');
917
- css(
918
- element,
919
- assign(
920
- {
914
+ css(element, {
921
915
  transitionProperty: Object.keys(props).map(propName).join(','),
922
916
  transitionDuration: duration + "ms",
923
- transitionTimingFunction: timing },
924
-
925
- props));
926
-
917
+ transitionTimingFunction: timing,
918
+ ...props });
927
919
 
928
920
  })));
929
921
 
@@ -1506,7 +1498,7 @@
1506
1498
 
1507
1499
  // extend strategy
1508
1500
  strats.computed = strats.methods = function (parentVal, childVal) {
1509
- return childVal ? parentVal ? assign({}, parentVal, childVal) : childVal : parentVal;
1501
+ return childVal ? parentVal ? { ...parentVal, ...childVal } : childVal : parentVal;
1510
1502
  };
1511
1503
 
1512
1504
  // data strategy
@@ -1670,7 +1662,7 @@
1670
1662
 
1671
1663
  function post(el, cmd) {
1672
1664
  try {
1673
- el.contentWindow.postMessage(JSON.stringify(assign({ event: 'command' }, cmd)), '*');
1665
+ el.contentWindow.postMessage(JSON.stringify({ event: 'command', ...cmd }), '*');
1674
1666
  } catch (e) {
1675
1667
  // noop
1676
1668
  }
@@ -2344,7 +2336,7 @@
2344
2336
  const {
2345
2337
  $options: { computed } } =
2346
2338
  this;
2347
- const values = assign({}, this._computeds);
2339
+ const values = { ...this._computeds };
2348
2340
  this._computeds = {};
2349
2341
 
2350
2342
  for (const key in computed) {
@@ -2529,7 +2521,7 @@
2529
2521
  el = isFunction(el) ? el.call(component) : el || component.$el;
2530
2522
 
2531
2523
  if (isArray(el)) {
2532
- el.forEach((el) => registerEvent(component, assign({}, event, { el }), key));
2524
+ el.forEach((el) => registerEvent(component, { ...event, el }, key));
2533
2525
  return;
2534
2526
  }
2535
2527
 
@@ -2763,7 +2755,7 @@
2763
2755
  }
2764
2756
  };
2765
2757
 
2766
- const opt = isPlainObject(options) ? assign({}, options) : options.options;
2758
+ const opt = isPlainObject(options) ? { ...options } : options.options;
2767
2759
 
2768
2760
  opt.name = name;
2769
2761
 
@@ -2816,7 +2808,7 @@
2816
2808
  UIkit.data = '__uikit__';
2817
2809
  UIkit.prefix = 'uk-';
2818
2810
  UIkit.options = {};
2819
- UIkit.version = '3.11.2-dev.c7ed3c19b';
2811
+ UIkit.version = '3.11.2-dev.d8c101f07';
2820
2812
 
2821
2813
  globalAPI(UIkit);
2822
2814
  hooksAPI(UIkit);
@@ -3139,7 +3131,7 @@
3139
3131
  show ?
3140
3132
  Transition.start(
3141
3133
  el,
3142
- assign({}, initProps, { overflow: 'hidden', height: endHeight }),
3134
+ { ...initProps, overflow: 'hidden', height: endHeight },
3143
3135
  Math.round(duration * (1 - currentHeight / endHeight)),
3144
3136
  transition) :
3145
3137
 
@@ -3311,7 +3303,7 @@
3311
3303
  animation: [true],
3312
3304
  selClose: '.uk-alert-close',
3313
3305
  duration: 150,
3314
- hideProps: assign({ opacity: 0 }, Togglable.data.hideProps) },
3306
+ hideProps: { opacity: 0, ...Togglable.data.hideProps } },
3315
3307
 
3316
3308
 
3317
3309
  events: [
@@ -5459,7 +5451,7 @@
5459
5451
 
5460
5452
 
5461
5453
  function openDialog(tmpl, options, hideFn, submitFn) {
5462
- options = assign({ bgClose: false, escClose: true, labels: modal.labels }, options);
5454
+ options = { bgClose: false, escClose: true, labels: modal.labels, ...options };
5463
5455
 
5464
5456
  const dialog = modal.dialog(tmpl(options), options);
5465
5457
  const deferred = new Deferred();
@@ -5588,10 +5580,11 @@
5588
5580
  this.$create(
5589
5581
  'drop',
5590
5582
  dropdowns.filter((el) => !this.getDropdown(el)),
5591
- assign({}, this.$props, {
5583
+ {
5584
+ ...this.$props,
5592
5585
  boundary: this.boundary,
5593
5586
  pos: this.pos,
5594
- offset: this.dropbar || this.offset }));
5587
+ offset: this.dropbar || this.offset });
5595
5588
 
5596
5589
 
5597
5590
  },
@@ -7551,7 +7544,7 @@
7551
7544
 
7552
7545
  // Reset to previous state
7553
7546
  nodes.forEach((el, i) => propsFrom[i] && css(el, propsFrom[i]));
7554
- css(target, assign({ display: 'block' }, targetProps));
7547
+ css(target, { display: 'block', ...targetProps });
7555
7548
 
7556
7549
  // Start transitions on next frame
7557
7550
  requestAnimationFrame(() => {
@@ -7583,15 +7576,13 @@
7583
7576
  const zIndex = css(el, 'zIndex');
7584
7577
 
7585
7578
  return isVisible(el) ?
7586
- assign(
7587
7579
  {
7588
7580
  display: '',
7589
7581
  opacity: opacity ? css(el, 'opacity') : '0',
7590
7582
  pointerEvents: 'none',
7591
7583
  position: 'absolute',
7592
- zIndex: zIndex === 'auto' ? index(el) : zIndex },
7593
-
7594
- getPositionWithMargin(el)) :
7584
+ zIndex: zIndex === 'auto' ? index(el) : zIndex,
7585
+ ...getPositionWithMargin(el) } :
7595
7586
 
7596
7587
  false;
7597
7588
  }
@@ -7775,7 +7766,7 @@
7775
7766
  },
7776
7767
 
7777
7768
  setState(state, animate) {if (animate === void 0) {animate = true;}
7778
- state = assign({ filter: { '': '' }, sort: [] }, state);
7769
+ state = { filter: { '': '' }, sort: [], ...state };
7779
7770
 
7780
7771
  trigger(this.$el, 'beforeFilter', [this, state]);
7781
7772
 
@@ -7875,7 +7866,7 @@
7875
7866
  }
7876
7867
 
7877
7868
  function sortItems(nodes, sort, order) {
7878
- return assign([], nodes).sort(
7869
+ return [...nodes].sort(
7879
7870
  (a, b) =>
7880
7871
  data(a, sort).localeCompare(data(b, sort), undefined, { numeric: true }) * (
7881
7872
  order === 'asc' || -1));
@@ -7914,7 +7905,8 @@
7914
7905
  return "scale3d(" + value + ", " + value + ", 1)";
7915
7906
  }
7916
7907
 
7917
- var Animations$1 = assign({}, Animations$2, {
7908
+ var Animations$1 = {
7909
+ ...Animations$2,
7918
7910
  fade: {
7919
7911
  show() {
7920
7912
  return [{ opacity: 0 }, { opacity: 1 }];
@@ -7946,7 +7938,7 @@
7946
7938
  { opacity: 1 - percent, transform: scale3d(1 - 0.2 * percent) },
7947
7939
  { opacity: percent, transform: scale3d(1 - 0.2 + 0.2 * percent) }];
7948
7940
 
7949
- } } });
7941
+ } } };
7950
7942
 
7951
7943
  function Transitioner$1(prev, next, dir, _ref) {let { animation, easing } = _ref;
7952
7944
  const { percent, translate, show = noop } = animation;
@@ -8507,20 +8499,13 @@
8507
8499
  },
8508
8500
 
8509
8501
  _show(prev, next, force) {
8510
- this._transitioner = this._getTransitioner(
8511
- prev,
8512
- next,
8513
- this.dir,
8514
- assign(
8515
- {
8502
+ this._transitioner = this._getTransitioner(prev, next, this.dir, {
8516
8503
  easing: force ?
8517
8504
  next.offsetWidth < 600 ?
8518
8505
  'cubic-bezier(0.25, 0.46, 0.45, 0.94)' /* easeOutQuad */ :
8519
8506
  'cubic-bezier(0.165, 0.84, 0.44, 1)' /* easeOutQuart */ :
8520
- this.easing },
8521
-
8522
- this.transitionOptions));
8523
-
8507
+ this.easing,
8508
+ ...this.transitionOptions });
8524
8509
 
8525
8510
 
8526
8511
  if (!force && !prev) {
@@ -8585,7 +8570,7 @@
8585
8570
 
8586
8571
  computed: {
8587
8572
  animation(_ref) {let { animation, Animations } = _ref;
8588
- return assign(Animations[animation] || Animations.slide, { name: animation });
8573
+ return { ...(Animations[animation] || Animations.slide), name: animation };
8589
8574
  },
8590
8575
 
8591
8576
  transitionOptions() {
@@ -8808,28 +8793,20 @@
8808
8793
  if (type === 'image' || src.match(/\.(avif|jpe?g|a?png|gif|svg|webp)($|\?)/i)) {
8809
8794
  try {
8810
8795
  const { width, height } = await getImage(src, attrs.srcset, attrs.size);
8811
- this.setItem(
8812
- item,
8813
- createEl('img', assign({ src, width, height, alt }, attrs)));
8814
-
8796
+ this.setItem(item, createEl('img', { src, width, height, alt, ...attrs }));
8815
8797
  } catch (e) {
8816
8798
  this.setError(item);
8817
8799
  }
8818
8800
 
8819
8801
  // Video
8820
8802
  } else if (type === 'video' || src.match(/\.(mp4|webm|ogv)($|\?)/i)) {
8821
- const video = createEl(
8822
- 'video',
8823
- assign(
8824
- {
8803
+ const video = createEl('video', {
8825
8804
  src,
8826
8805
  poster,
8827
8806
  controls: '',
8828
8807
  playsinline: '',
8829
- 'uk-video': "" + this.videoAutoplay },
8830
-
8831
- attrs));
8832
-
8808
+ 'uk-video': "" + this.videoAutoplay,
8809
+ ...attrs });
8833
8810
 
8834
8811
 
8835
8812
  on(video, 'loadedmetadata', () => {
@@ -8842,17 +8819,12 @@
8842
8819
  } else if (type === 'iframe' || src.match(/\.(html|php)($|\?)/i)) {
8843
8820
  this.setItem(
8844
8821
  item,
8845
- createEl(
8846
- 'iframe',
8847
- assign(
8848
- {
8822
+ createEl('iframe', {
8849
8823
  src,
8850
8824
  frameborder: '0',
8851
8825
  allowfullscreen: '',
8852
- class: 'uk-lightbox-iframe' },
8853
-
8854
- attrs)));
8855
-
8826
+ class: 'uk-lightbox-iframe',
8827
+ ...attrs }));
8856
8828
 
8857
8829
 
8858
8830
 
@@ -8864,19 +8836,14 @@
8864
8836
  {
8865
8837
  this.setItem(
8866
8838
  item,
8867
- createEl(
8868
- 'iframe',
8869
- assign(
8870
- {
8871
- src: "https://www.youtube" + (matches[1] || '') + ".com/embed/" +
8872
- matches[2] + (
8839
+ createEl('iframe', {
8840
+ src: "https://www.youtube" + (matches[1] || '') + ".com/embed/" + matches[2] + (
8873
8841
  matches[3] ? "?" + matches[3] : ''),
8874
- width: 1920,
8875
- height: 1080 },
8876
-
8877
- iframeAttrs,
8878
- attrs)));
8879
8842
 
8843
+ width: 1920,
8844
+ height: 1080,
8845
+ ...iframeAttrs,
8846
+ ...attrs }));
8880
8847
 
8881
8848
 
8882
8849
 
@@ -8896,19 +8863,14 @@
8896
8863
 
8897
8864
  this.setItem(
8898
8865
  item,
8899
- createEl(
8900
- 'iframe',
8901
- assign(
8902
- {
8866
+ createEl('iframe', {
8903
8867
  src: "https://player.vimeo.com/video/" + matches[1] + (
8904
8868
  matches[2] ? "?" + matches[2] : ''),
8905
8869
 
8906
8870
  width,
8907
- height },
8908
-
8909
- iframeAttrs,
8910
- attrs)));
8911
-
8871
+ height,
8872
+ ...iframeAttrs,
8873
+ ...attrs }));
8912
8874
 
8913
8875
 
8914
8876
  } catch (e) {
@@ -9010,8 +8972,7 @@
9010
8972
  index = findIndex(items, (_ref2) => {let { source: src } = _ref2;return source === src;});
9011
8973
  }
9012
8974
 
9013
- this.panel =
9014
- this.panel || this.$create('lightboxPanel', assign({}, this.$props, { items }));
8975
+ this.panel = this.panel || this.$create('lightboxPanel', { ...this.$props, items });
9015
8976
 
9016
8977
  on(this.panel.$el, 'hidden', () => this.panel = false);
9017
8978
 
@@ -10047,7 +10008,8 @@
10047
10008
  return isIn(type) ^ dir < 0 ? percent : 1 - percent;
10048
10009
  }
10049
10010
 
10050
- var Animations = assign({}, Animations$2, {
10011
+ var Animations = {
10012
+ ...Animations$2,
10051
10013
  fade: {
10052
10014
  show() {
10053
10015
  return [{ opacity: 0, zIndex: 0 }, { zIndex: -1 }];
@@ -10136,7 +10098,7 @@
10136
10098
  { transform: translate(-30 * percent), zIndex: -1 },
10137
10099
  { transform: translate(100 * (1 - percent)), zIndex: 0 }];
10138
10100
 
10139
- } } });
10101
+ } } };
10140
10102
 
10141
10103
  var slideshow = {
10142
10104
  mixins: [Class, Slideshow, SliderReactive],
@@ -10355,7 +10317,7 @@
10355
10317
 
10356
10318
  this.touched = new Set([this]);
10357
10319
  this.placeholder = placeholder;
10358
- this.origin = assign({ target, index: index(placeholder) }, this.pos);
10320
+ this.origin = { target, index: index(placeholder), ...this.pos };
10359
10321
 
10360
10322
  on(document, pointerMove, this.move);
10361
10323
  on(document, pointerUp, this.end);