uikit 3.13.8-dev.2fb6bed58 → 3.13.8-dev.6a84a45c4

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 (70) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/dist/css/uikit-core-rtl.css +34 -5
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +34 -5
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +34 -3
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +34 -3
  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 +12 -10
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +12 -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 +12 -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 +36 -79
  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 +72 -82
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +5 -5
  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 +11 -9
  50. package/src/js/mixin/position.js +4 -43
  51. package/src/js/util/position.js +4 -1
  52. package/src/less/components/dropdown.less +11 -1
  53. package/src/less/components/nav.less +22 -0
  54. package/src/less/components/navbar.less +22 -2
  55. package/src/less/theme/dropdown.less +2 -0
  56. package/src/less/theme/nav.less +4 -0
  57. package/src/less/theme/navbar.less +2 -0
  58. package/src/scss/components/dropdown.scss +11 -1
  59. package/src/scss/components/nav.scss +22 -0
  60. package/src/scss/components/navbar.scss +22 -2
  61. package/src/scss/mixins-theme.scss +4 -0
  62. package/src/scss/mixins.scss +4 -0
  63. package/src/scss/theme/dropdown.scss +2 -0
  64. package/src/scss/theme/nav.scss +4 -0
  65. package/src/scss/theme/navbar.scss +2 -0
  66. package/src/scss/variables-theme.scss +5 -1
  67. package/src/scss/variables.scss +5 -1
  68. package/tests/dropdown.html +16 -2
  69. package/tests/nav.html +27 -0
  70. package/tests/navbar.html +18 -4
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.13.8-dev.2fb6bed58 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.13.8-dev.6a84a45c4 | 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() :
@@ -2006,7 +2006,10 @@
2006
2006
  const willFlip =
2007
2007
  !intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
2008
2008
 
2009
- viewport = getIntersectionArea(...viewports, willFlip ? null : boundary);
2009
+ viewport = getIntersectionArea(
2010
+ ...viewports,
2011
+ willFlip || position[prop] > offset(boundary)[prop] ? null : boundary);
2012
+
2010
2013
  const isInStartBoundary = position[start] >= viewport[start];
2011
2014
  const isInEndBoundary = position[end] <= viewport[end];
2012
2015
 
@@ -2888,7 +2891,7 @@
2888
2891
  UIkit.data = '__uikit__';
2889
2892
  UIkit.prefix = 'uk-';
2890
2893
  UIkit.options = {};
2891
- UIkit.version = '3.13.8-dev.2fb6bed58';
2894
+ UIkit.version = '3.13.8-dev.6a84a45c4';
2892
2895
 
2893
2896
  globalAPI(UIkit);
2894
2897
  hooksAPI(UIkit);
@@ -3215,7 +3218,7 @@
3215
3218
  computed: {
3216
3219
  items: {
3217
3220
  get(_ref, $el) {let { targets } = _ref;
3218
- return $$(targets, $el);
3221
+ return $$(targets, $el).filter((el) => $(this.content, el));
3219
3222
  },
3220
3223
 
3221
3224
  watch(items, prev) {
@@ -3502,21 +3505,19 @@
3502
3505
 
3503
3506
  connected() {
3504
3507
  this.pos = this.$props.pos.split('-').concat('center').slice(0, 2);
3505
- this.dir = this.pos[0];
3506
- this.align = this.pos[1];
3508
+ this.axis = includes(['top', 'bottom'], this.pos[0]) ? 'y' : 'x';
3507
3509
  },
3508
3510
 
3509
3511
  methods: {
3510
3512
  positionAt(element, target, boundary) {
3511
3513
  const [dir, align] = this.pos;
3512
- const axis = this.getAxis(dir);
3513
3514
 
3514
3515
  let { offset: offset$1 } = this;
3515
3516
  if (!isNumeric(offset$1)) {
3516
3517
  const node = $(offset$1);
3517
3518
  offset$1 = node ?
3518
- offset(node)[axis === 'x' ? 'left' : 'top'] -
3519
- offset(target)[axis === 'x' ? 'right' : 'bottom'] :
3519
+ offset(node)[this.axis === 'x' ? 'left' : 'top'] -
3520
+ offset(target)[this.axis === 'x' ? 'right' : 'bottom'] :
3520
3521
  0;
3521
3522
  }
3522
3523
  offset$1 = toPx(offset$1) + toPx(getCssVar('position-offset', element));
@@ -3527,7 +3528,7 @@
3527
3528
  target: [dir, align] };
3528
3529
 
3529
3530
 
3530
- if (axis === 'y') {
3531
+ if (this.axis === 'y') {
3531
3532
  for (const prop in attach) {
3532
3533
  attach[prop] = attach[prop].reverse();
3533
3534
  }
@@ -3540,47 +3541,8 @@
3540
3541
  boundary,
3541
3542
  flip: this.flip });
3542
3543
 
3543
-
3544
- [this.dir, this.align] = getAlignment(element, target, this.pos);
3545
- },
3546
-
3547
- getAxis(dir) {if (dir === void 0) {dir = this.dir;}
3548
- return includes(['top', 'bottom'], dir) ? 'y' : 'x';
3549
3544
  } } };
3550
3545
 
3551
-
3552
-
3553
- function getAlignment(el, target, _ref) {let [dir, align] = _ref;
3554
- const elOffset = offset(el);
3555
- const targetOffset = offset(target);
3556
- const properties = [
3557
- ['left', 'right'],
3558
- ['top', 'bottom']];
3559
-
3560
-
3561
- for (const props of properties) {
3562
- if (elOffset[props[0]] >= targetOffset[props[1]]) {
3563
- dir = props[1];
3564
- break;
3565
- }
3566
- if (elOffset[props[1]] <= targetOffset[props[0]]) {
3567
- dir = props[0];
3568
- break;
3569
- }
3570
- }
3571
-
3572
- const props = includes(properties[0], dir) ? properties[1] : properties[0];
3573
- if (elOffset[props[0]] === targetOffset[props[0]]) {
3574
- align = props[0];
3575
- } else if (elOffset[props[1]] === targetOffset[props[1]]) {
3576
- align = props[1];
3577
- } else {
3578
- align = 'center';
3579
- }
3580
-
3581
- return [dir, align];
3582
- }
3583
-
3584
3546
  let active$1;
3585
3547
 
3586
3548
  var drop = {
@@ -3915,17 +3877,18 @@
3915
3877
  const boundaryOffset = offset(boundary);
3916
3878
  const targetOffset = offset(this.target);
3917
3879
  const alignTo = this.boundaryAlign ? boundaryOffset : targetOffset;
3880
+ const prop = this.axis === 'y' ? 'width' : 'height';
3881
+
3882
+ css(this.$el, "max-" + prop, '');
3918
3883
 
3919
3884
  if (this.pos[1] === 'justify') {
3920
- const prop = this.getAxis() === 'y' ? 'width' : 'height';
3921
3885
  css(this.$el, prop, alignTo[prop]);
3922
- } else if (
3923
- this.$el.offsetWidth >
3924
- Math.max(boundaryOffset.right - alignTo.left, alignTo.right - boundaryOffset.left))
3925
- {
3886
+ } else if (this.$el.offsetWidth > boundaryOffset.width) {
3926
3887
  addClass(this.$el, this.clsDrop + "-stack");
3927
3888
  }
3928
3889
 
3890
+ css(this.$el, "max-" + prop, boundaryOffset[prop]);
3891
+
3929
3892
  this.positionAt(this.$el, this.boundaryAlign ? boundary : this.target, boundary);
3930
3893
  } } };
3931
3894
 
@@ -4367,22 +4330,14 @@
4367
4330
  return { heights: [''], elements };
4368
4331
  }
4369
4332
 
4333
+ css(elements, 'minHeight', '');
4370
4334
  let heights = elements.map(getHeight);
4371
- let max = Math.max(...heights);
4372
- const hasMinHeight = elements.some((el) => el.style.minHeight);
4373
- const hasShrunk = elements.some((el, i) => !el.style.minHeight && heights[i] < max);
4374
-
4375
- if (hasMinHeight && hasShrunk) {
4376
- css(elements, 'minHeight', '');
4377
- heights = elements.map(getHeight);
4378
- max = Math.max(...heights);
4379
- }
4380
-
4381
- heights = elements.map((el, i) =>
4382
- heights[i] === max && toFloat(el.style.minHeight).toFixed(2) !== max.toFixed(2) ? '' : max);
4335
+ const max = Math.max(...heights);
4383
4336
 
4337
+ return {
4338
+ heights: elements.map((el, i) => heights[i].toFixed(2) === max.toFixed(2) ? '' : max),
4339
+ elements };
4384
4340
 
4385
- return { heights, elements };
4386
4341
  }
4387
4342
 
4388
4343
  function getHeight(element) {
@@ -5039,16 +4994,18 @@
5039
4994
 
5040
4995
  connected() {
5041
4996
  const media = toMedia(this.media);
5042
- this.mediaObj = window.matchMedia(media);
5043
- const handler = () => {
5044
- this.matchMedia = this.mediaObj.matches;
5045
- trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
5046
- };
5047
- this.offMediaObj = on(this.mediaObj, 'change', () => {
4997
+ if (media) {
4998
+ this.mediaObj = window.matchMedia(media);
4999
+ const handler = () => {
5000
+ this.matchMedia = this.mediaObj.matches;
5001
+ trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
5002
+ };
5003
+ this.offMediaObj = on(this.mediaObj, 'change', () => {
5004
+ handler();
5005
+ this.$emit('resize');
5006
+ });
5048
5007
  handler();
5049
- this.$emit('resize');
5050
- });
5051
- handler();
5008
+ }
5052
5009
  },
5053
5010
 
5054
5011
  disconnected() {var _this$offMediaObj;
@@ -5787,7 +5744,7 @@
5787
5744
  return this.dropbar;
5788
5745
  },
5789
5746
 
5790
- handler(_, _ref10) {let { $el, dir } = _ref10;
5747
+ handler(_, _ref10) {let { $el, pos: [dir] = [] } = _ref10;
5791
5748
  if (!hasClass($el, this.clsDrop)) {
5792
5749
  return;
5793
5750
  }
@@ -6649,13 +6606,13 @@
6649
6606
  return false;
6650
6607
  }
6651
6608
 
6652
- const hide = this.isActive && types.has('resize');
6609
+ const hide = this.active && types.has('resize');
6653
6610
  if (hide) {
6654
6611
  css(this.selTarget, 'transition', '0s');
6655
6612
  this.hide();
6656
6613
  }
6657
6614
 
6658
- if (!this.isActive) {
6615
+ if (!this.active) {
6659
6616
  height$1 = offset(this.$el).height;
6660
6617
  margin = css(this.$el, 'margin');
6661
6618
  }
@@ -10769,10 +10726,12 @@
10769
10726
 
10770
10727
  this.positionAt(this.tooltip, this.$el);
10771
10728
 
10729
+ const [dir, align] = getAlignment(this.tooltip, this.$el, this.pos);
10730
+
10772
10731
  this.origin =
10773
- this.getAxis() === 'y' ?
10774
- flipPosition(this.dir) + "-" + this.align :
10775
- this.align + "-" + flipPosition(this.dir);
10732
+ this.axis === 'y' ?
10733
+ flipPosition(dir) + "-" + align :
10734
+ align + "-" + flipPosition(dir);
10776
10735
  });
10777
10736
 
10778
10737
  this.toggleElement(this.tooltip, true);
@@ -10809,6 +10768,37 @@
10809
10768
  }
10810
10769
  }
10811
10770
 
10771
+ function getAlignment(el, target, _ref) {let [dir, align] = _ref;
10772
+ const elOffset = offset(el);
10773
+ const targetOffset = offset(target);
10774
+ const properties = [
10775
+ ['left', 'right'],
10776
+ ['top', 'bottom']];
10777
+
10778
+
10779
+ for (const props of properties) {
10780
+ if (elOffset[props[0]] >= targetOffset[props[1]]) {
10781
+ dir = props[1];
10782
+ break;
10783
+ }
10784
+ if (elOffset[props[1]] <= targetOffset[props[0]]) {
10785
+ dir = props[0];
10786
+ break;
10787
+ }
10788
+ }
10789
+
10790
+ const props = includes(properties[0], dir) ? properties[1] : properties[0];
10791
+ if (elOffset[props[0]] === targetOffset[props[0]]) {
10792
+ align = props[0];
10793
+ } else if (elOffset[props[1]] === targetOffset[props[1]]) {
10794
+ align = props[1];
10795
+ } else {
10796
+ align = 'center';
10797
+ }
10798
+
10799
+ return [dir, align];
10800
+ }
10801
+
10812
10802
  var upload = {
10813
10803
  props: {
10814
10804
  allow: String,