uikit 3.13.8-dev.ecda751d3 → 3.13.8-dev.efe195e41

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 (47) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/dist/css/uikit-core-rtl.css +1 -1
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +1 -1
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +1 -1
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +1 -1
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +1 -1
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +1 -1
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +1 -1
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +1 -1
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +1 -1
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +13 -10
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +13 -10
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +1 -1
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +13 -10
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +1 -1
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +1 -1
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +1 -1
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +1 -1
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +67 -54
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +1 -1
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +67 -54
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/api/hooks.js +1 -1
  44. package/src/js/core/height-match.js +7 -15
  45. package/src/js/core/scrollspy.js +45 -26
  46. package/src/js/core/sticky.js +2 -2
  47. package/src/js/mixin/media.js +12 -9
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.13.8-dev.ecda751d3 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.13.8-dev.efe195e41 | 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() :
@@ -1740,11 +1740,11 @@
1740
1740
  }
1741
1741
  }
1742
1742
 
1743
- const stateKey$1 = '_ukPlayer';
1743
+ const stateKey = '_ukPlayer';
1744
1744
  let counter = 0;
1745
1745
  function enableApi(el) {
1746
- if (el[stateKey$1]) {
1747
- return el[stateKey$1];
1746
+ if (el[stateKey]) {
1747
+ return el[stateKey];
1748
1748
  }
1749
1749
 
1750
1750
  const youtube = isYoutube(el);
@@ -1753,7 +1753,7 @@
1753
1753
  const id = ++counter;
1754
1754
  let poller;
1755
1755
 
1756
- return el[stateKey$1] = new Promise((resolve) => {
1756
+ return el[stateKey] = new Promise((resolve) => {
1757
1757
  youtube &&
1758
1758
  once(el, 'load', () => {
1759
1759
  const listener = () => post(el, { event: 'listening', id });
@@ -2411,7 +2411,7 @@
2411
2411
  const {
2412
2412
  $options: { computed } } =
2413
2413
  this;
2414
- const values = { ...this._computed };
2414
+ const values = { ...(initial ? {} : this._computed) };
2415
2415
  this._computed = {};
2416
2416
 
2417
2417
  for (const key in computed) {
@@ -2891,7 +2891,7 @@
2891
2891
  UIkit.data = '__uikit__';
2892
2892
  UIkit.prefix = 'uk-';
2893
2893
  UIkit.options = {};
2894
- UIkit.version = '3.13.8-dev.ecda751d3';
2894
+ UIkit.version = '3.13.8-dev.efe195e41';
2895
2895
 
2896
2896
  globalAPI(UIkit);
2897
2897
  hooksAPI(UIkit);
@@ -4330,22 +4330,14 @@
4330
4330
  return { heights: [''], elements };
4331
4331
  }
4332
4332
 
4333
+ css(elements, 'minHeight', '');
4333
4334
  let heights = elements.map(getHeight);
4334
- let max = Math.max(...heights);
4335
- const hasMinHeight = elements.some((el) => el.style.minHeight);
4336
- const hasShrunk = elements.some((el, i) => !el.style.minHeight && heights[i] < max);
4337
-
4338
- if (hasMinHeight && hasShrunk) {
4339
- css(elements, 'minHeight', '');
4340
- heights = elements.map(getHeight);
4341
- max = Math.max(...heights);
4342
- }
4343
-
4344
- heights = elements.map((el, i) =>
4345
- heights[i] === max && toFloat(el.style.minHeight).toFixed(2) !== max.toFixed(2) ? '' : max);
4335
+ const max = Math.max(...heights);
4346
4336
 
4337
+ return {
4338
+ heights: elements.map((el, i) => heights[i].toFixed(2) === max.toFixed(2) ? '' : max),
4339
+ elements };
4347
4340
 
4348
- return { heights, elements };
4349
4341
  }
4350
4342
 
4351
4343
  function getHeight(element) {
@@ -5002,16 +4994,19 @@
5002
4994
 
5003
4995
  connected() {
5004
4996
  const media = toMedia(this.media);
5005
- this.mediaObj = window.matchMedia(media);
5006
- const handler = () => {
5007
- this.matchMedia = this.mediaObj.matches;
5008
- trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
5009
- };
5010
- this.offMediaObj = on(this.mediaObj, 'change', () => {
4997
+ this.matchMedia = true;
4998
+ if (media) {
4999
+ this.mediaObj = window.matchMedia(media);
5000
+ const handler = () => {
5001
+ this.matchMedia = this.mediaObj.matches;
5002
+ trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
5003
+ };
5004
+ this.offMediaObj = on(this.mediaObj, 'change', () => {
5005
+ handler();
5006
+ this.$emit('resize');
5007
+ });
5011
5008
  handler();
5012
- this.$emit('resize');
5013
- });
5014
- handler();
5009
+ }
5015
5010
  },
5016
5011
 
5017
5012
  disconnected() {var _this$offMediaObj;
@@ -6295,7 +6290,6 @@
6295
6290
  return document.getElementById(decodeURIComponent(el.hash).substring(1));
6296
6291
  }
6297
6292
 
6298
- const stateKey = '_ukScrollspy';
6299
6293
  var scrollspy = {
6300
6294
  mixins: [Scroll],
6301
6295
 
@@ -6328,43 +6322,64 @@
6328
6322
  return target ? $$(target, $el) : [$el];
6329
6323
  },
6330
6324
 
6331
- watch(elements) {
6325
+ watch(elements, prev) {
6332
6326
  if (this.hidden) {
6333
6327
  css(filter$1(elements, ":not(." + this.inViewClass + ")"), 'visibility', 'hidden');
6334
6328
  }
6329
+
6330
+ if (prev) {
6331
+ this.$reset();
6332
+ }
6335
6333
  },
6336
6334
 
6337
6335
  immediate: true } },
6338
6336
 
6339
6337
 
6340
6338
 
6341
- disconnected() {
6342
- for (const el of this.elements) {var _el$stateKey;
6343
- removeClass(el, this.inViewClass, ((_el$stateKey = el[stateKey]) == null ? void 0 : _el$stateKey.cls) || '');
6344
- delete el[stateKey];
6345
- }
6346
- },
6339
+ connected() {
6340
+ this._data.elements = new Map();
6341
+ this.registerObserver(
6342
+ observeIntersection(
6343
+ this.elements,
6344
+ (records) => {
6345
+ const elements = this._data.elements;
6346
+ for (const { target: el, isIntersecting } of records) {
6347
+ if (!elements.has(el)) {
6348
+ elements.set(el, {
6349
+ cls: data(el, 'uk-scrollspy-class') || this.cls });
6347
6350
 
6348
- update: [
6349
- {
6350
- read() {
6351
- for (const el of this.elements) {
6352
- if (!el[stateKey]) {
6353
- el[stateKey] = { cls: data(el, 'uk-scrollspy-class') || this.cls };
6354
6351
  }
6355
6352
 
6356
- if (!this.repeat && el[stateKey].show) {
6353
+ const state = elements.get(el);
6354
+ if (!this.repeat && state.show) {
6357
6355
  continue;
6358
6356
  }
6359
6357
 
6360
- el[stateKey].show = isInView(el, this.offsetTop, this.offsetLeft);
6358
+ state.show = isIntersecting;
6361
6359
  }
6360
+
6361
+ this.$emit();
6362
6362
  },
6363
+ {
6364
+ rootMargin: toPx(this.offsetTop, 'height') - 1 + "px " + (
6365
+ toPx(this.offsetLeft, 'width') - 1) + "px" },
6363
6366
 
6364
- write(data) {
6365
- for (const el of this.elements) {
6366
- const state = el[stateKey];
6367
6367
 
6368
+ false));
6369
+
6370
+
6371
+ },
6372
+
6373
+ disconnected() {
6374
+ for (const [el, state] of this._data.elements.entries()) {
6375
+ removeClass(el, this.inViewClass, (state == null ? void 0 : state.cls) || '');
6376
+ }
6377
+ },
6378
+
6379
+ update: [
6380
+ {
6381
+ write(data) {
6382
+ for (const [el, state] of data.elements.entries()) {
6368
6383
  if (state.show && !state.inview && !state.queued) {
6369
6384
  state.queued = true;
6370
6385
 
@@ -6381,15 +6396,13 @@
6381
6396
  this.toggle(el, false);
6382
6397
  }
6383
6398
  }
6384
- },
6385
-
6386
- events: ['scroll', 'resize'] }],
6399
+ } }],
6387
6400
 
6388
6401
 
6389
6402
 
6390
6403
  methods: {
6391
6404
  toggle(el, inview) {
6392
- const state = el[stateKey];
6405
+ const state = this._data.elements.get(el);
6393
6406
 
6394
6407
  state.off == null ? void 0 : state.off();
6395
6408
 
@@ -6612,13 +6625,13 @@
6612
6625
  return false;
6613
6626
  }
6614
6627
 
6615
- const hide = this.isActive && types.has('resize');
6628
+ const hide = this.active && types.has('resize');
6616
6629
  if (hide) {
6617
6630
  css(this.selTarget, 'transition', '0s');
6618
6631
  this.hide();
6619
6632
  }
6620
6633
 
6621
- if (!this.isActive) {
6634
+ if (!this.active) {
6622
6635
  height$1 = offset(this.$el).height;
6623
6636
  margin = css(this.$el, 'margin');
6624
6637
  }