uikit 3.13.8-dev.bd666a112 → 3.13.8-dev.e0d437090

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/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 +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 +33 -78
  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 +69 -81
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/components/tooltip.js +38 -3
  44. package/src/js/core/accordion.js +1 -1
  45. package/src/js/core/drop.js +6 -5
  46. package/src/js/core/height-match.js +7 -15
  47. package/src/js/core/navbar.js +1 -1
  48. package/src/js/core/sticky.js +2 -2
  49. package/src/js/mixin/media.js +12 -9
  50. package/src/js/mixin/position.js +4 -43
package/dist/js/uikit.js CHANGED
@@ -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.e0d437090 | 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() :
@@ -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.e0d437090';
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
  }
@@ -6652,13 +6607,13 @@
6652
6607
  return false;
6653
6608
  }
6654
6609
 
6655
- const hide = this.isActive && types.has('resize');
6610
+ const hide = this.active && types.has('resize');
6656
6611
  if (hide) {
6657
6612
  css(this.selTarget, 'transition', '0s');
6658
6613
  this.hide();
6659
6614
  }
6660
6615
 
6661
- if (!this.isActive) {
6616
+ if (!this.active) {
6662
6617
  height$1 = offset(this.$el).height;
6663
6618
  margin = css(this.$el, 'margin');
6664
6619
  }
@@ -10772,10 +10727,12 @@
10772
10727
 
10773
10728
  this.positionAt(this.tooltip, this.$el);
10774
10729
 
10730
+ const [dir, align] = getAlignment(this.tooltip, this.$el, this.pos);
10731
+
10775
10732
  this.origin =
10776
- this.getAxis() === 'y' ?
10777
- flipPosition(this.dir) + "-" + this.align :
10778
- this.align + "-" + flipPosition(this.dir);
10733
+ this.axis === 'y' ?
10734
+ flipPosition(dir) + "-" + align :
10735
+ align + "-" + flipPosition(dir);
10779
10736
  });
10780
10737
 
10781
10738
  this.toggleElement(this.tooltip, true);
@@ -10812,6 +10769,37 @@
10812
10769
  }
10813
10770
  }
10814
10771
 
10772
+ function getAlignment(el, target, _ref) {let [dir, align] = _ref;
10773
+ const elOffset = offset(el);
10774
+ const targetOffset = offset(target);
10775
+ const properties = [
10776
+ ['left', 'right'],
10777
+ ['top', 'bottom']];
10778
+
10779
+
10780
+ for (const props of properties) {
10781
+ if (elOffset[props[0]] >= targetOffset[props[1]]) {
10782
+ dir = props[1];
10783
+ break;
10784
+ }
10785
+ if (elOffset[props[1]] <= targetOffset[props[0]]) {
10786
+ dir = props[0];
10787
+ break;
10788
+ }
10789
+ }
10790
+
10791
+ const props = includes(properties[0], dir) ? properties[1] : properties[0];
10792
+ if (elOffset[props[0]] === targetOffset[props[0]]) {
10793
+ align = props[0];
10794
+ } else if (elOffset[props[1]] === targetOffset[props[1]]) {
10795
+ align = props[1];
10796
+ } else {
10797
+ align = 'center';
10798
+ }
10799
+
10800
+ return [dir, align];
10801
+ }
10802
+
10815
10803
  var upload = {
10816
10804
  props: {
10817
10805
  allow: String,