uikit 3.13.8-dev.bd666a112 → 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 (52) hide show
  1. package/CHANGELOG.md +4 -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 +41 -49
  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 +79 -106
  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 +115 -109
  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/components/tooltip.js +38 -3
  45. package/src/js/core/accordion.js +1 -1
  46. package/src/js/core/drop.js +6 -5
  47. package/src/js/core/height-match.js +7 -15
  48. package/src/js/core/navbar.js +1 -1
  49. package/src/js/core/scrollspy.js +45 -26
  50. package/src/js/core/sticky.js +2 -2
  51. package/src/js/mixin/media.js +12 -9
  52. package/src/js/mixin/position.js +4 -43
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.13.8-dev.bd666a112 | 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.bd666a112';
2894
+ UIkit.version = '3.13.8-dev.efe195e41';
2895
2895
 
2896
2896
  globalAPI(UIkit);
2897
2897
  hooksAPI(UIkit);
@@ -3218,7 +3218,7 @@
3218
3218
  computed: {
3219
3219
  items: {
3220
3220
  get(_ref, $el) {let { targets } = _ref;
3221
- return $$(targets, $el);
3221
+ return $$(targets, $el).filter((el) => $(this.content, el));
3222
3222
  },
3223
3223
 
3224
3224
  watch(items, prev) {
@@ -3505,21 +3505,19 @@
3505
3505
 
3506
3506
  connected() {
3507
3507
  this.pos = this.$props.pos.split('-').concat('center').slice(0, 2);
3508
- this.dir = this.pos[0];
3509
- this.align = this.pos[1];
3508
+ this.axis = includes(['top', 'bottom'], this.pos[0]) ? 'y' : 'x';
3510
3509
  },
3511
3510
 
3512
3511
  methods: {
3513
3512
  positionAt(element, target, boundary) {
3514
3513
  const [dir, align] = this.pos;
3515
- const axis = this.getAxis(dir);
3516
3514
 
3517
3515
  let { offset: offset$1 } = this;
3518
3516
  if (!isNumeric(offset$1)) {
3519
3517
  const node = $(offset$1);
3520
3518
  offset$1 = node ?
3521
- offset(node)[axis === 'x' ? 'left' : 'top'] -
3522
- offset(target)[axis === 'x' ? 'right' : 'bottom'] :
3519
+ offset(node)[this.axis === 'x' ? 'left' : 'top'] -
3520
+ offset(target)[this.axis === 'x' ? 'right' : 'bottom'] :
3523
3521
  0;
3524
3522
  }
3525
3523
  offset$1 = toPx(offset$1) + toPx(getCssVar('position-offset', element));
@@ -3530,7 +3528,7 @@
3530
3528
  target: [dir, align] };
3531
3529
 
3532
3530
 
3533
- if (axis === 'y') {
3531
+ if (this.axis === 'y') {
3534
3532
  for (const prop in attach) {
3535
3533
  attach[prop] = attach[prop].reverse();
3536
3534
  }
@@ -3543,47 +3541,8 @@
3543
3541
  boundary,
3544
3542
  flip: this.flip });
3545
3543
 
3546
-
3547
- [this.dir, this.align] = getAlignment(element, target, this.pos);
3548
- },
3549
-
3550
- getAxis(dir) {if (dir === void 0) {dir = this.dir;}
3551
- return includes(['top', 'bottom'], dir) ? 'y' : 'x';
3552
3544
  } } };
3553
3545
 
3554
-
3555
-
3556
- function getAlignment(el, target, _ref) {let [dir, align] = _ref;
3557
- const elOffset = offset(el);
3558
- const targetOffset = offset(target);
3559
- const properties = [
3560
- ['left', 'right'],
3561
- ['top', 'bottom']];
3562
-
3563
-
3564
- for (const props of properties) {
3565
- if (elOffset[props[0]] >= targetOffset[props[1]]) {
3566
- dir = props[1];
3567
- break;
3568
- }
3569
- if (elOffset[props[1]] <= targetOffset[props[0]]) {
3570
- dir = props[0];
3571
- break;
3572
- }
3573
- }
3574
-
3575
- const props = includes(properties[0], dir) ? properties[1] : properties[0];
3576
- if (elOffset[props[0]] === targetOffset[props[0]]) {
3577
- align = props[0];
3578
- } else if (elOffset[props[1]] === targetOffset[props[1]]) {
3579
- align = props[1];
3580
- } else {
3581
- align = 'center';
3582
- }
3583
-
3584
- return [dir, align];
3585
- }
3586
-
3587
3546
  let active$1;
3588
3547
 
3589
3548
  var drop = {
@@ -3918,17 +3877,18 @@
3918
3877
  const boundaryOffset = offset(boundary);
3919
3878
  const targetOffset = offset(this.target);
3920
3879
  const alignTo = this.boundaryAlign ? boundaryOffset : targetOffset;
3880
+ const prop = this.axis === 'y' ? 'width' : 'height';
3881
+
3882
+ css(this.$el, "max-" + prop, '');
3921
3883
 
3922
3884
  if (this.pos[1] === 'justify') {
3923
- const prop = this.getAxis() === 'y' ? 'width' : 'height';
3924
3885
  css(this.$el, prop, alignTo[prop]);
3925
- } else if (
3926
- this.$el.offsetWidth >
3927
- Math.max(boundaryOffset.right - alignTo.left, alignTo.right - boundaryOffset.left))
3928
- {
3886
+ } else if (this.$el.offsetWidth > boundaryOffset.width) {
3929
3887
  addClass(this.$el, this.clsDrop + "-stack");
3930
3888
  }
3931
3889
 
3890
+ css(this.$el, "max-" + prop, boundaryOffset[prop]);
3891
+
3932
3892
  this.positionAt(this.$el, this.boundaryAlign ? boundary : this.target, boundary);
3933
3893
  } } };
3934
3894
 
@@ -4370,22 +4330,14 @@
4370
4330
  return { heights: [''], elements };
4371
4331
  }
4372
4332
 
4333
+ css(elements, 'minHeight', '');
4373
4334
  let heights = elements.map(getHeight);
4374
- let max = Math.max(...heights);
4375
- const hasMinHeight = elements.some((el) => el.style.minHeight);
4376
- const hasShrunk = elements.some((el, i) => !el.style.minHeight && heights[i] < max);
4377
-
4378
- if (hasMinHeight && hasShrunk) {
4379
- css(elements, 'minHeight', '');
4380
- heights = elements.map(getHeight);
4381
- max = Math.max(...heights);
4382
- }
4383
-
4384
- heights = elements.map((el, i) =>
4385
- heights[i] === max && toFloat(el.style.minHeight).toFixed(2) !== max.toFixed(2) ? '' : max);
4335
+ const max = Math.max(...heights);
4386
4336
 
4337
+ return {
4338
+ heights: elements.map((el, i) => heights[i].toFixed(2) === max.toFixed(2) ? '' : max),
4339
+ elements };
4387
4340
 
4388
- return { heights, elements };
4389
4341
  }
4390
4342
 
4391
4343
  function getHeight(element) {
@@ -5042,16 +4994,19 @@
5042
4994
 
5043
4995
  connected() {
5044
4996
  const media = toMedia(this.media);
5045
- this.mediaObj = window.matchMedia(media);
5046
- const handler = () => {
5047
- this.matchMedia = this.mediaObj.matches;
5048
- trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
5049
- };
5050
- 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
+ });
5051
5008
  handler();
5052
- this.$emit('resize');
5053
- });
5054
- handler();
5009
+ }
5055
5010
  },
5056
5011
 
5057
5012
  disconnected() {var _this$offMediaObj;
@@ -5790,7 +5745,7 @@
5790
5745
  return this.dropbar;
5791
5746
  },
5792
5747
 
5793
- handler(_, _ref10) {let { $el, dir } = _ref10;
5748
+ handler(_, _ref10) {let { $el, pos: [dir] = [] } = _ref10;
5794
5749
  if (!hasClass($el, this.clsDrop)) {
5795
5750
  return;
5796
5751
  }
@@ -6335,7 +6290,6 @@
6335
6290
  return document.getElementById(decodeURIComponent(el.hash).substring(1));
6336
6291
  }
6337
6292
 
6338
- const stateKey = '_ukScrollspy';
6339
6293
  var scrollspy = {
6340
6294
  mixins: [Scroll],
6341
6295
 
@@ -6368,43 +6322,64 @@
6368
6322
  return target ? $$(target, $el) : [$el];
6369
6323
  },
6370
6324
 
6371
- watch(elements) {
6325
+ watch(elements, prev) {
6372
6326
  if (this.hidden) {
6373
6327
  css(filter(elements, ":not(." + this.inViewClass + ")"), 'visibility', 'hidden');
6374
6328
  }
6329
+
6330
+ if (prev) {
6331
+ this.$reset();
6332
+ }
6375
6333
  },
6376
6334
 
6377
6335
  immediate: true } },
6378
6336
 
6379
6337
 
6380
6338
 
6381
- disconnected() {
6382
- for (const el of this.elements) {var _el$stateKey;
6383
- removeClass(el, this.inViewClass, ((_el$stateKey = el[stateKey]) == null ? void 0 : _el$stateKey.cls) || '');
6384
- delete el[stateKey];
6385
- }
6386
- },
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 });
6387
6350
 
6388
- update: [
6389
- {
6390
- read() {
6391
- for (const el of this.elements) {
6392
- if (!el[stateKey]) {
6393
- el[stateKey] = { cls: data(el, 'uk-scrollspy-class') || this.cls };
6394
6351
  }
6395
6352
 
6396
- if (!this.repeat && el[stateKey].show) {
6353
+ const state = elements.get(el);
6354
+ if (!this.repeat && state.show) {
6397
6355
  continue;
6398
6356
  }
6399
6357
 
6400
- el[stateKey].show = isInView(el, this.offsetTop, this.offsetLeft);
6358
+ state.show = isIntersecting;
6401
6359
  }
6360
+
6361
+ this.$emit();
6402
6362
  },
6363
+ {
6364
+ rootMargin: toPx(this.offsetTop, 'height') - 1 + "px " + (
6365
+ toPx(this.offsetLeft, 'width') - 1) + "px" },
6403
6366
 
6404
- write(data) {
6405
- for (const el of this.elements) {
6406
- const state = el[stateKey];
6407
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()) {
6408
6383
  if (state.show && !state.inview && !state.queued) {
6409
6384
  state.queued = true;
6410
6385
 
@@ -6421,15 +6396,13 @@
6421
6396
  this.toggle(el, false);
6422
6397
  }
6423
6398
  }
6424
- },
6425
-
6426
- events: ['scroll', 'resize'] }],
6399
+ } }],
6427
6400
 
6428
6401
 
6429
6402
 
6430
6403
  methods: {
6431
6404
  toggle(el, inview) {
6432
- const state = el[stateKey];
6405
+ const state = this._data.elements.get(el);
6433
6406
 
6434
6407
  state.off == null ? void 0 : state.off();
6435
6408
 
@@ -6652,13 +6625,13 @@
6652
6625
  return false;
6653
6626
  }
6654
6627
 
6655
- const hide = this.isActive && types.has('resize');
6628
+ const hide = this.active && types.has('resize');
6656
6629
  if (hide) {
6657
6630
  css(this.selTarget, 'transition', '0s');
6658
6631
  this.hide();
6659
6632
  }
6660
6633
 
6661
- if (!this.isActive) {
6634
+ if (!this.active) {
6662
6635
  height$1 = offset(this.$el).height;
6663
6636
  margin = css(this.$el, 'margin');
6664
6637
  }