uikit 3.13.2-dev.13a8eb3ff → 3.13.2-dev.9467fe2c3

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 (61) hide show
  1. package/.eslintrc.json +9 -0
  2. package/CHANGELOG.md +8 -0
  3. package/dist/css/uikit-core-rtl.css +15 -63
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +15 -63
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +15 -63
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +15 -63
  10. package/dist/css/uikit.min.css +1 -1
  11. package/dist/js/components/countdown.js +1 -1
  12. package/dist/js/components/countdown.min.js +1 -1
  13. package/dist/js/components/filter.js +1 -1
  14. package/dist/js/components/filter.min.js +1 -1
  15. package/dist/js/components/lightbox-panel.js +1 -1
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +1 -1
  18. package/dist/js/components/lightbox.min.js +1 -1
  19. package/dist/js/components/notification.js +1 -1
  20. package/dist/js/components/notification.min.js +1 -1
  21. package/dist/js/components/parallax.js +1 -1
  22. package/dist/js/components/parallax.min.js +1 -1
  23. package/dist/js/components/slider-parallax.js +1 -1
  24. package/dist/js/components/slider-parallax.min.js +1 -1
  25. package/dist/js/components/slider.js +1 -1
  26. package/dist/js/components/slider.min.js +1 -1
  27. package/dist/js/components/slideshow-parallax.js +1 -1
  28. package/dist/js/components/slideshow-parallax.min.js +1 -1
  29. package/dist/js/components/slideshow.js +1 -1
  30. package/dist/js/components/slideshow.min.js +1 -1
  31. package/dist/js/components/sortable.js +1 -1
  32. package/dist/js/components/sortable.min.js +1 -1
  33. package/dist/js/components/tooltip.js +9 -15
  34. package/dist/js/components/tooltip.min.js +1 -1
  35. package/dist/js/components/upload.js +1 -1
  36. package/dist/js/components/upload.min.js +1 -1
  37. package/dist/js/uikit-core.js +39 -48
  38. package/dist/js/uikit-core.min.js +1 -1
  39. package/dist/js/uikit-icons.js +1 -1
  40. package/dist/js/uikit-icons.min.js +1 -1
  41. package/dist/js/uikit.js +43 -53
  42. package/dist/js/uikit.min.js +1 -1
  43. package/package.json +1 -1
  44. package/src/js/components/tooltip.js +2 -3
  45. package/src/js/core/drop.js +7 -10
  46. package/src/js/core/navbar.js +10 -5
  47. package/src/js/core/sticky.js +1 -1
  48. package/src/js/core/video.js +1 -1
  49. package/src/js/mixin/media.js +4 -4
  50. package/src/js/mixin/position.js +4 -9
  51. package/src/js/util/style.js +13 -19
  52. package/src/less/components/drop.less +3 -11
  53. package/src/less/components/dropdown.less +3 -11
  54. package/src/less/components/navbar.less +11 -12
  55. package/src/less/components/tooltip.less +2 -11
  56. package/src/scss/components/drop.scss +3 -11
  57. package/src/scss/components/dropdown.scss +3 -11
  58. package/src/scss/components/navbar.scss +11 -12
  59. package/src/scss/components/tooltip.scss +2 -11
  60. package/src/scss/variables-theme.scss +5 -4
  61. package/src/scss/variables.scss +5 -4
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.13.2-dev.13a8eb3ff | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.13.2-dev.9467fe2c3 | 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() :
@@ -767,21 +767,22 @@
767
767
  property = propName(property);
768
768
 
769
769
  if (isUndefined(value)) {
770
- return getStyle(element, property);
771
- } else if (!value && !isNumber(value)) {
772
- element.style.removeProperty(property);
770
+ return getComputedStyle(element).getPropertyValue(property);
773
771
  } else {
774
772
  element.style.setProperty(
775
773
  property,
776
- isNumeric(value) && !cssNumber[property] ? value + "px" : value,
774
+ isNumeric(value) && !cssNumber[property] ?
775
+ value + "px" :
776
+ value || isNumber(value) ?
777
+ value :
778
+ '',
777
779
  priority);
778
780
 
779
781
  }
780
782
  } else if (isArray(property)) {
781
- const styles = getStyles(element);
782
783
  const props = {};
783
784
  for (const prop of property) {
784
- props[prop] = styles[propName(prop)];
785
+ props[prop] = css(element, prop);
785
786
  }
786
787
  return props;
787
788
  } else if (isObject(property)) {
@@ -792,19 +793,9 @@
792
793
  return elements[0];
793
794
  }
794
795
 
795
- function getStyles(element, pseudoElt) {
796
- return toWindow(element).getComputedStyle(element, pseudoElt);
797
- }
798
-
799
- function getStyle(element, property, pseudoElt) {
800
- return getStyles(element, pseudoElt)[property];
801
- }
802
-
803
796
  const propertyRe = /^\s*(["'])?(.*?)\1\s*$/;
804
- function getCssVar(name) {
805
- return getStyles(document.documentElement).
806
- getPropertyValue("--uk-" + name).
807
- replace(propertyRe, '$2');
797
+ function getCssVar(name, element) {if (element === void 0) {element = document.documentElement;}
798
+ return css(element, "--uk-" + name).replace(propertyRe, '$2');
808
799
  }
809
800
 
810
801
  // https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty
@@ -813,6 +804,10 @@
813
804
  const cssPrefixes = ['webkit', 'moz'];
814
805
 
815
806
  function vendorPropName(name) {
807
+ if (name[0] === '-') {
808
+ return name;
809
+ }
810
+
816
811
  name = hyphenate(name);
817
812
 
818
813
  const { style } = document.documentElement;
@@ -2894,7 +2889,7 @@
2894
2889
  UIkit.data = '__uikit__';
2895
2890
  UIkit.prefix = 'uk-';
2896
2891
  UIkit.options = {};
2897
- UIkit.version = '3.13.2-dev.13a8eb3ff';
2892
+ UIkit.version = '3.13.2-dev.9467fe2c3';
2898
2893
 
2899
2894
  globalAPI(UIkit);
2900
2895
  hooksAPI(UIkit);
@@ -3386,7 +3381,7 @@
3386
3381
  mute(this.$el);
3387
3382
  }
3388
3383
 
3389
- this.registerObserver(observeIntersection(this.$el, () => this.$emit('scroll'), {}, false));
3384
+ this.registerObserver(observeIntersection(this.$el, () => this.$emit(), {}, false));
3390
3385
  },
3391
3386
 
3392
3387
  update: {
@@ -3497,15 +3492,13 @@
3497
3492
  props: {
3498
3493
  pos: String,
3499
3494
  offset: null,
3500
- flip: Boolean,
3501
- clsPos: String },
3495
+ flip: Boolean },
3502
3496
 
3503
3497
 
3504
3498
  data: {
3505
3499
  pos: "bottom-" + (isRtl ? 'right' : 'left'),
3506
3500
  flip: true,
3507
- offset: false,
3508
- clsPos: '' },
3501
+ offset: false },
3509
3502
 
3510
3503
 
3511
3504
  connected() {
@@ -3516,13 +3509,11 @@
3516
3509
 
3517
3510
  methods: {
3518
3511
  positionAt(element, target, boundary) {
3519
- removeClasses(element, this.clsPos + "-(top|bottom|left|right)(-[a-z]+)?");
3520
-
3521
- let { offset: offset$1 } = this;
3522
3512
  const axis = this.getAxis();
3523
3513
  const dir = this.pos[0];
3524
3514
  const align = this.pos[1];
3525
3515
 
3516
+ let { offset: offset$1 } = this;
3526
3517
  if (!isNumeric(offset$1)) {
3527
3518
  const node = $(offset$1);
3528
3519
  offset$1 = node ?
@@ -3530,6 +3521,7 @@
3530
3521
  offset(target)[axis === 'x' ? 'right' : 'bottom'] :
3531
3522
  0;
3532
3523
  }
3524
+ offset$1 += toPx(getCssVar('position-margin-offset', element));
3533
3525
 
3534
3526
  const { x, y } = positionAt(
3535
3527
  element,
@@ -3546,8 +3538,6 @@
3546
3538
 
3547
3539
  this.dir = axis === 'x' ? x : y;
3548
3540
  this.align = axis === 'x' ? y : x;
3549
-
3550
- toggleClass(element, this.clsPos + "-" + this.dir + "-" + this.align, this.offset === false);
3551
3541
  },
3552
3542
 
3553
3543
  getAxis() {
@@ -3589,7 +3579,7 @@
3589
3579
  },
3590
3580
 
3591
3581
  connected() {
3592
- this.clsPos = this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
3582
+ this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
3593
3583
  addClass(this.$el, this.clsDrop);
3594
3584
 
3595
3585
  if (this.toggle && !this.target) {
@@ -3655,7 +3645,7 @@
3655
3645
  if (this.isToggled()) {
3656
3646
  this.hide(false);
3657
3647
  } else {
3658
- this.show(toggle.$el, false);
3648
+ this.show(toggle == null ? void 0 : toggle.$el, false);
3659
3649
  }
3660
3650
  } },
3661
3651
 
@@ -3667,7 +3657,7 @@
3667
3657
 
3668
3658
  handler(e, toggle) {
3669
3659
  e.preventDefault();
3670
- this.show(toggle.$el);
3660
+ this.show(toggle == null ? void 0 : toggle.$el);
3671
3661
  } },
3672
3662
 
3673
3663
 
@@ -3878,23 +3868,20 @@
3878
3868
  },
3879
3869
 
3880
3870
  position() {
3881
- const boundary = this.boundary === true ? window : query(this.boundary, this.$el);
3871
+ const boundary = query(this.boundary, this.$el) || window;
3882
3872
  removeClass(this.$el, this.clsDrop + "-stack");
3883
3873
  toggleClass(this.$el, this.clsDrop + "-boundary", this.boundaryAlign);
3884
3874
 
3885
3875
  const boundaryOffset = offset(boundary);
3886
- const alignTo = this.boundaryAlign ? boundaryOffset : offset(this.target);
3876
+ const targetOffset = offset(this.target);
3877
+ const alignTo = this.boundaryAlign ? boundaryOffset : targetOffset;
3887
3878
 
3888
3879
  if (this.align === 'justify') {
3889
3880
  const prop = this.getAxis() === 'y' ? 'width' : 'height';
3890
3881
  css(this.$el, prop, alignTo[prop]);
3891
3882
  } else if (
3892
- boundary &&
3893
3883
  this.$el.offsetWidth >
3894
- Math.max(
3895
- boundaryOffset.right - alignTo.left,
3896
- alignTo.right - boundaryOffset.left))
3897
-
3884
+ Math.max(boundaryOffset.right - alignTo.left, alignTo.right - boundaryOffset.left))
3898
3885
  {
3899
3886
  addClass(this.$el, this.clsDrop + "-stack");
3900
3887
  }
@@ -5788,10 +5775,16 @@
5788
5775
  return this.dropbar;
5789
5776
  },
5790
5777
 
5791
- handler() {
5778
+ handler(_, _ref9) {let { $el } = _ref9;
5779
+ if (!hasClass($el, this.clsDrop)) {
5780
+ return;
5781
+ }
5782
+
5792
5783
  if (!parent(this.dropbar)) {
5793
5784
  after(this.dropbarAnchor || this.$el, this.dropbar);
5794
5785
  }
5786
+
5787
+ addClass($el, this.clsDrop + "-dropbar");
5795
5788
  } },
5796
5789
 
5797
5790
 
@@ -5806,17 +5799,15 @@
5806
5799
  return this.dropbar;
5807
5800
  },
5808
5801
 
5809
- handler(_, _ref9) {let { $el, dir } = _ref9;
5802
+ handler(_, _ref10) {let { $el, dir } = _ref10;
5810
5803
  if (!hasClass($el, this.clsDrop)) {
5811
5804
  return;
5812
5805
  }
5813
5806
 
5814
- this.clsDrop && addClass($el, this.clsDrop + "-dropbar");
5815
-
5816
5807
  if (dir === 'bottom') {
5817
5808
  this.transitionTo(
5818
- $el.offsetHeight +
5819
- toFloat(css($el, 'marginTop')) +
5809
+ offset($el).bottom -
5810
+ offset(this.dropbar).top +
5820
5811
  toFloat(css($el, 'marginBottom')),
5821
5812
  $el);
5822
5813
 
@@ -5835,7 +5826,7 @@
5835
5826
  return this.dropbar;
5836
5827
  },
5837
5828
 
5838
- handler(e, _ref10) {let { $el } = _ref10;
5829
+ handler(e, _ref11) {let { $el } = _ref11;
5839
5830
  const active = this.getActive();
5840
5831
 
5841
5832
  if (
@@ -5859,7 +5850,7 @@
5859
5850
  return this.dropbar;
5860
5851
  },
5861
5852
 
5862
- handler(_, _ref11) {let { $el } = _ref11;
5853
+ handler(_, _ref12) {let { $el } = _ref12;
5863
5854
  if (!hasClass($el, this.clsDrop)) {
5864
5855
  return;
5865
5856
  }
@@ -10720,8 +10711,7 @@
10720
10711
  delay: 0,
10721
10712
  animation: ['uk-animation-scale-up'],
10722
10713
  duration: 100,
10723
- cls: 'uk-active',
10724
- clsPos: 'uk-tooltip' },
10714
+ cls: 'uk-active' },
10725
10715
 
10726
10716
 
10727
10717
  beforeConnect() {
@@ -10776,9 +10766,9 @@
10776
10766
 
10777
10767
  _show() {
10778
10768
  this.tooltip = append(
10779
- this.container, "<div class=\"" +
10780
- this.clsPos + "\"> <div class=\"" +
10781
- this.clsPos + "-inner\">" + this.title + "</div> </div>");
10769
+ this.container, "<div class=\"uk-" +
10770
+ this.$options.name + "\"> <div class=\"uk-" +
10771
+ this.$options.name + "-inner\">" + this.title + "</div> </div>");
10782
10772
 
10783
10773
 
10784
10774