uikit 3.13.8-dev.62c5f9d37 → 3.13.8-dev.ecda751d3

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 (67) hide show
  1. package/CHANGELOG.md +7 -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 +1 -1
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +1 -1
  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 +1 -1
  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 +18 -55
  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 +54 -58
  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/navbar.js +1 -1
  47. package/src/js/mixin/position.js +4 -43
  48. package/src/js/util/position.js +4 -1
  49. package/src/less/components/dropdown.less +11 -1
  50. package/src/less/components/nav.less +22 -0
  51. package/src/less/components/navbar.less +22 -2
  52. package/src/less/theme/dropdown.less +2 -0
  53. package/src/less/theme/nav.less +4 -0
  54. package/src/less/theme/navbar.less +2 -0
  55. package/src/scss/components/dropdown.scss +11 -1
  56. package/src/scss/components/nav.scss +22 -0
  57. package/src/scss/components/navbar.scss +22 -2
  58. package/src/scss/mixins-theme.scss +4 -0
  59. package/src/scss/mixins.scss +4 -0
  60. package/src/scss/theme/dropdown.scss +2 -0
  61. package/src/scss/theme/nav.scss +4 -0
  62. package/src/scss/theme/navbar.scss +2 -0
  63. package/src/scss/variables-theme.scss +5 -1
  64. package/src/scss/variables.scss +5 -1
  65. package/tests/dropdown.html +16 -2
  66. package/tests/nav.html +27 -0
  67. package/tests/navbar.html +18 -4
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.13.8-dev.62c5f9d37 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.13.8-dev.ecda751d3 | 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.62c5f9d37';
2894
+ UIkit.version = '3.13.8-dev.ecda751d3';
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
 
@@ -5787,7 +5750,7 @@
5787
5750
  return this.dropbar;
5788
5751
  },
5789
5752
 
5790
- handler(_, _ref10) {let { $el, dir } = _ref10;
5753
+ handler(_, _ref10) {let { $el, pos: [dir] = [] } = _ref10;
5791
5754
  if (!hasClass($el, this.clsDrop)) {
5792
5755
  return;
5793
5756
  }
@@ -10769,10 +10732,12 @@
10769
10732
 
10770
10733
  this.positionAt(this.tooltip, this.$el);
10771
10734
 
10735
+ const [dir, align] = getAlignment(this.tooltip, this.$el, this.pos);
10736
+
10772
10737
  this.origin =
10773
- this.getAxis() === 'y' ?
10774
- flipPosition(this.dir) + "-" + this.align :
10775
- this.align + "-" + flipPosition(this.dir);
10738
+ this.axis === 'y' ?
10739
+ flipPosition(dir) + "-" + align :
10740
+ align + "-" + flipPosition(dir);
10776
10741
  });
10777
10742
 
10778
10743
  this.toggleElement(this.tooltip, true);
@@ -10809,6 +10774,37 @@
10809
10774
  }
10810
10775
  }
10811
10776
 
10777
+ function getAlignment(el, target, _ref) {let [dir, align] = _ref;
10778
+ const elOffset = offset(el);
10779
+ const targetOffset = offset(target);
10780
+ const properties = [
10781
+ ['left', 'right'],
10782
+ ['top', 'bottom']];
10783
+
10784
+
10785
+ for (const props of properties) {
10786
+ if (elOffset[props[0]] >= targetOffset[props[1]]) {
10787
+ dir = props[1];
10788
+ break;
10789
+ }
10790
+ if (elOffset[props[1]] <= targetOffset[props[0]]) {
10791
+ dir = props[0];
10792
+ break;
10793
+ }
10794
+ }
10795
+
10796
+ const props = includes(properties[0], dir) ? properties[1] : properties[0];
10797
+ if (elOffset[props[0]] === targetOffset[props[0]]) {
10798
+ align = props[0];
10799
+ } else if (elOffset[props[1]] === targetOffset[props[1]]) {
10800
+ align = props[1];
10801
+ } else {
10802
+ align = 'center';
10803
+ }
10804
+
10805
+ return [dir, align];
10806
+ }
10807
+
10812
10808
  var upload = {
10813
10809
  props: {
10814
10810
  allow: String,