uikit 3.13.2-dev.97384959 → 3.13.2-dev.aa6a91433

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/.eslintrc.json +9 -0
  2. package/CHANGELOG.md +17 -0
  3. package/dist/css/uikit-core-rtl.css +28 -71
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +28 -71
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +28 -71
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +28 -71
  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 +31 -58
  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 +35 -63
  42. package/dist/js/uikit.min.js +1 -1
  43. package/package.json +10 -10
  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 +2 -8
  47. package/src/js/core/responsive.js +1 -1
  48. package/src/js/core/sticky.js +1 -1
  49. package/src/js/core/switcher.js +7 -13
  50. package/src/js/mixin/media.js +4 -4
  51. package/src/js/mixin/position.js +4 -9
  52. package/src/js/util/style.js +8 -15
  53. package/src/less/components/drop.less +1 -10
  54. package/src/less/components/dropdown.less +1 -10
  55. package/src/less/components/navbar.less +11 -22
  56. package/src/less/components/offcanvas.less +19 -1
  57. package/src/less/components/tooltip.less +1 -10
  58. package/src/less/theme/navbar.less +1 -3
  59. package/src/scss/components/drop.scss +1 -10
  60. package/src/scss/components/dropdown.scss +1 -10
  61. package/src/scss/components/navbar.scss +11 -22
  62. package/src/scss/components/offcanvas.scss +19 -1
  63. package/src/scss/components/tooltip.scss +1 -10
  64. package/src/scss/mixins-theme.scss +1 -2
  65. package/src/scss/mixins.scss +0 -1
  66. package/src/scss/theme/navbar.scss +0 -2
  67. package/src/scss/variables-theme.scss +3 -1
  68. package/src/scss/variables.scss +3 -1
  69. package/tests/navbar.html +2 -8
  70. package/tests/search.html +1 -1
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.13.2-dev.97384959 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.13.2-dev.aa6a91433 | 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,7 +767,7 @@
767
767
  property = propName(property);
768
768
 
769
769
  if (isUndefined(value)) {
770
- return getStyle(element, property);
770
+ return toWindow(element).getComputedStyle(element).getPropertyValue(property);
771
771
  } else if (!value && !isNumber(value)) {
772
772
  element.style.removeProperty(property);
773
773
  } else {
@@ -778,10 +778,9 @@
778
778
 
779
779
  }
780
780
  } else if (isArray(property)) {
781
- const styles = getStyles(element);
782
781
  const props = {};
783
782
  for (const prop of property) {
784
- props[prop] = styles[propName(prop)];
783
+ props[prop] = css(element, prop);
785
784
  }
786
785
  return props;
787
786
  } else if (isObject(property)) {
@@ -792,19 +791,9 @@
792
791
  return elements[0];
793
792
  }
794
793
 
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
794
  const propertyRe = /^\s*(["'])?(.*?)\1\s*$/;
804
- function getCssVar(name) {
805
- return getStyles(document.documentElement).
806
- getPropertyValue("--uk-" + name).
807
- replace(propertyRe, '$2');
795
+ function getCssVar(name, element) {if (element === void 0) {element = document.documentElement;}
796
+ return css(element, "--uk-" + name).replace(propertyRe, '$2');
808
797
  }
809
798
 
810
799
  // https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty
@@ -813,6 +802,10 @@
813
802
  const cssPrefixes = ['webkit', 'moz'];
814
803
 
815
804
  function vendorPropName(name) {
805
+ if (name[0] === '-') {
806
+ return name;
807
+ }
808
+
816
809
  name = hyphenate(name);
817
810
 
818
811
  const { style } = document.documentElement;
@@ -2894,7 +2887,7 @@
2894
2887
  UIkit.data = '__uikit__';
2895
2888
  UIkit.prefix = 'uk-';
2896
2889
  UIkit.options = {};
2897
- UIkit.version = '3.13.2-dev.97384959';
2890
+ UIkit.version = '3.13.2-dev.aa6a91433';
2898
2891
 
2899
2892
  globalAPI(UIkit);
2900
2893
  hooksAPI(UIkit);
@@ -3497,15 +3490,13 @@
3497
3490
  props: {
3498
3491
  pos: String,
3499
3492
  offset: null,
3500
- flip: Boolean,
3501
- clsPos: String },
3493
+ flip: Boolean },
3502
3494
 
3503
3495
 
3504
3496
  data: {
3505
3497
  pos: "bottom-" + (isRtl ? 'right' : 'left'),
3506
3498
  flip: true,
3507
- offset: false,
3508
- clsPos: '' },
3499
+ offset: false },
3509
3500
 
3510
3501
 
3511
3502
  connected() {
@@ -3516,13 +3507,11 @@
3516
3507
 
3517
3508
  methods: {
3518
3509
  positionAt(element, target, boundary) {
3519
- removeClasses(element, this.clsPos + "-(top|bottom|left|right)(-[a-z]+)?");
3520
-
3521
- let { offset: offset$1 } = this;
3522
3510
  const axis = this.getAxis();
3523
3511
  const dir = this.pos[0];
3524
3512
  const align = this.pos[1];
3525
3513
 
3514
+ let { offset: offset$1 } = this;
3526
3515
  if (!isNumeric(offset$1)) {
3527
3516
  const node = $(offset$1);
3528
3517
  offset$1 = node ?
@@ -3530,6 +3519,7 @@
3530
3519
  offset(target)[axis === 'x' ? 'right' : 'bottom'] :
3531
3520
  0;
3532
3521
  }
3522
+ offset$1 += toPx(getCssVar('position-margin-offset', this.$el));
3533
3523
 
3534
3524
  const { x, y } = positionAt(
3535
3525
  element,
@@ -3546,8 +3536,6 @@
3546
3536
 
3547
3537
  this.dir = axis === 'x' ? x : y;
3548
3538
  this.align = axis === 'x' ? y : x;
3549
-
3550
- toggleClass(element, this.clsPos + "-" + this.dir + "-" + this.align, this.offset === false);
3551
3539
  },
3552
3540
 
3553
3541
  getAxis() {
@@ -3589,7 +3577,7 @@
3589
3577
  },
3590
3578
 
3591
3579
  connected() {
3592
- this.clsPos = this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
3580
+ this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
3593
3581
  addClass(this.$el, this.clsDrop);
3594
3582
 
3595
3583
  if (this.toggle && !this.target) {
@@ -3655,7 +3643,7 @@
3655
3643
  if (this.isToggled()) {
3656
3644
  this.hide(false);
3657
3645
  } else {
3658
- this.show(toggle.$el, false);
3646
+ this.show(toggle == null ? void 0 : toggle.$el, false);
3659
3647
  }
3660
3648
  } },
3661
3649
 
@@ -3667,7 +3655,7 @@
3667
3655
 
3668
3656
  handler(e, toggle) {
3669
3657
  e.preventDefault();
3670
- this.show(toggle.$el);
3658
+ this.show(toggle == null ? void 0 : toggle.$el);
3671
3659
  } },
3672
3660
 
3673
3661
 
@@ -3878,23 +3866,20 @@
3878
3866
  },
3879
3867
 
3880
3868
  position() {
3881
- const boundary = this.boundary === true ? window : query(this.boundary, this.$el);
3869
+ const boundary = query(this.boundary, this.$el) || window;
3882
3870
  removeClass(this.$el, this.clsDrop + "-stack");
3883
3871
  toggleClass(this.$el, this.clsDrop + "-boundary", this.boundaryAlign);
3884
3872
 
3885
3873
  const boundaryOffset = offset(boundary);
3886
- const alignTo = this.boundaryAlign ? boundaryOffset : offset(this.target);
3874
+ const targetOffset = offset(this.target);
3875
+ const alignTo = this.boundaryAlign ? boundaryOffset : targetOffset;
3887
3876
 
3888
3877
  if (this.align === 'justify') {
3889
3878
  const prop = this.getAxis() === 'y' ? 'width' : 'height';
3890
3879
  css(this.$el, prop, alignTo[prop]);
3891
3880
  } else if (
3892
- boundary &&
3893
3881
  this.$el.offsetWidth >
3894
- Math.max(
3895
- boundaryOffset.right - alignTo.left,
3896
- alignTo.right - boundaryOffset.left))
3897
-
3882
+ Math.max(boundaryOffset.right - alignTo.left, alignTo.right - boundaryOffset.left))
3898
3883
  {
3899
3884
  addClass(this.$el, this.clsDrop + "-stack");
3900
3885
  }
@@ -5556,7 +5541,6 @@
5556
5541
  delayShow: Number,
5557
5542
  delayHide: Number,
5558
5543
  dropbar: Boolean,
5559
- dropbarMode: String,
5560
5544
  dropbarAnchor: Boolean,
5561
5545
  duration: Number },
5562
5546
 
@@ -5573,7 +5557,6 @@
5573
5557
  flip: 'x',
5574
5558
  boundary: true,
5575
5559
  dropbar: false,
5576
- dropbarMode: 'slide',
5577
5560
  dropbarAnchor: false,
5578
5561
  duration: 200,
5579
5562
  forceHeight: true,
@@ -5582,8 +5565,8 @@
5582
5565
 
5583
5566
 
5584
5567
  computed: {
5585
- boundary(_ref, $el) {let { boundary, boundaryAlign } = _ref;
5586
- return boundary === true || boundaryAlign ? $el : boundary;
5568
+ boundary(_ref, $el) {let { boundary } = _ref;
5569
+ return boundary === true ? $el : boundary;
5587
5570
  },
5588
5571
 
5589
5572
  dropbarAnchor(_ref2, $el) {let { dropbarAnchor } = _ref2;
@@ -5813,10 +5796,6 @@
5813
5796
  return;
5814
5797
  }
5815
5798
 
5816
- if (this.dropbarMode === 'slide') {
5817
- addClass(this.dropbar, 'uk-navbar-dropbar-slide');
5818
- }
5819
-
5820
5799
  this.clsDrop && addClass($el, this.clsDrop + "-dropbar");
5821
5800
 
5822
5801
  if (dir === 'bottom') {
@@ -6289,7 +6268,7 @@
6289
6268
  events: ['resize'] } };
6290
6269
 
6291
6270
  var responsive = {
6292
- mixin: [Resize],
6271
+ mixins: [Resize],
6293
6272
 
6294
6273
  props: ['width', 'height'],
6295
6274
 
@@ -7057,27 +7036,21 @@
7057
7036
 
7058
7037
  show(item) {
7059
7038
  const prev = this.index();
7060
- const next = getIndex(
7061
- this.children[getIndex(item, this.toggles, prev)],
7062
- children(this.$el));
7063
-
7064
-
7065
- if (prev === next) {
7066
- return;
7067
- }
7068
-
7039
+ const next = getIndex(item, this.toggles, prev);
7040
+ const active = getIndex(this.children[next], children(this.$el));
7069
7041
  children(this.$el).forEach((child, i) => {
7070
- toggleClass(child, this.cls, next === i);
7071
- attr(this.toggles[i], 'aria-expanded', next === i);
7042
+ toggleClass(child, this.cls, active === i);
7043
+ attr(this.toggles[i], 'aria-expanded', active === i);
7072
7044
  });
7073
7045
 
7046
+ const animate = prev >= 0 && prev !== next;
7074
7047
  this.connects.forEach(async (_ref4) => {let { children } = _ref4;
7075
7048
  await this.toggleElement(
7076
7049
  toNodes(children).filter((child) => hasClass(child, this.cls)),
7077
7050
  false,
7078
- prev >= 0);
7051
+ animate);
7079
7052
 
7080
- await this.toggleElement(children[next], true, prev >= 0);
7053
+ await this.toggleElement(children[active], true, animate);
7081
7054
  });
7082
7055
  } } };
7083
7056
 
@@ -10732,8 +10705,7 @@
10732
10705
  delay: 0,
10733
10706
  animation: ['uk-animation-scale-up'],
10734
10707
  duration: 100,
10735
- cls: 'uk-active',
10736
- clsPos: 'uk-tooltip' },
10708
+ cls: 'uk-active' },
10737
10709
 
10738
10710
 
10739
10711
  beforeConnect() {
@@ -10788,9 +10760,9 @@
10788
10760
 
10789
10761
  _show() {
10790
10762
  this.tooltip = append(
10791
- this.container, "<div class=\"" +
10792
- this.clsPos + "\"> <div class=\"" +
10793
- this.clsPos + "-inner\">" + this.title + "</div> </div>");
10763
+ this.container, "<div class=\"uk-" +
10764
+ this.$options.name + "\"> <div class=\"uk-" +
10765
+ this.$options.name + "-inner\">" + this.title + "</div> </div>");
10794
10766
 
10795
10767
 
10796
10768