uikit 3.14.4-dev.871ba3c05 → 3.14.4-dev.ce706e326

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 (62) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/css/uikit-core-rtl.css +33 -15
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +33 -15
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +30 -15
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +30 -15
  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 +89 -5
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +89 -5
  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 +1 -1
  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 +665 -617
  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 +665 -617
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/core/drop.js +7 -0
  44. package/src/js/core/height-viewport.js +9 -5
  45. package/src/js/core/offcanvas.js +1 -47
  46. package/src/js/mixin/modal.js +90 -4
  47. package/src/js/util/dimensions.js +6 -6
  48. package/src/less/components/nav.less +22 -4
  49. package/src/less/components/navbar.less +8 -11
  50. package/src/less/components/utility.less +12 -3
  51. package/src/less/theme/nav.less +3 -7
  52. package/src/less/theme/navbar.less +3 -1
  53. package/src/scss/components/nav.scss +22 -4
  54. package/src/scss/components/navbar.scss +8 -11
  55. package/src/scss/components/utility.scss +12 -3
  56. package/src/scss/mixins-theme.scss +1 -1
  57. package/src/scss/theme/nav.scss +3 -7
  58. package/src/scss/theme/navbar.scss +3 -1
  59. package/src/scss/variables-theme.scss +10 -4
  60. package/src/scss/variables.scss +10 -3
  61. package/tests/drop.html +6 -0
  62. package/tests/navbar.html +2041 -1267
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.14.4-dev.871ba3c05 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.14.4-dev.ce706e326 | 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() :
@@ -1060,13 +1060,13 @@
1060
1060
  }
1061
1061
 
1062
1062
  function offsetPosition(element) {
1063
- const offset = [0, 0];
1064
-
1065
1063
  element = toNode(element);
1066
1064
 
1067
- do {
1068
- offset[0] += element.offsetTop;
1069
- offset[1] += element.offsetLeft;
1065
+ const offset = [element.offsetTop, element.offsetLeft];
1066
+
1067
+ while (element = element.offsetParent) {
1068
+ offset[0] += element.offsetTop + toFloat(css(element, "borderTopWidth"));
1069
+ offset[1] += element.offsetLeft + toFloat(css(element, "borderLeftWidth"));
1070
1070
 
1071
1071
  if (css(element, 'position') === 'fixed') {
1072
1072
  const win = toWindow(element);
@@ -1074,7 +1074,7 @@
1074
1074
  offset[1] += win.scrollX;
1075
1075
  return offset;
1076
1076
  }
1077
- } while (element = element.offsetParent);
1077
+ }
1078
1078
 
1079
1079
  return offset;
1080
1080
  }
@@ -2961,7 +2961,7 @@
2961
2961
  UIkit.data = '__uikit__';
2962
2962
  UIkit.prefix = 'uk-';
2963
2963
  UIkit.options = {};
2964
- UIkit.version = '3.14.4-dev.871ba3c05';
2964
+ UIkit.version = '3.14.4-dev.ce706e326';
2965
2965
 
2966
2966
  globalAPI(UIkit);
2967
2967
  hooksAPI(UIkit);
@@ -3735,64 +3735,44 @@
3735
3735
  return toPx(getCssVar('position-viewport-offset', element));
3736
3736
  } } };
3737
3737
 
3738
- let active$1;
3739
-
3740
- var drop = {
3741
- mixins: [Container, Lazyload, Position, Togglable],
3738
+ const active$1 = [];
3742
3739
 
3743
- args: 'pos',
3740
+ var Modal = {
3741
+ mixins: [Class, Container, Togglable],
3744
3742
 
3745
3743
  props: {
3746
- mode: 'list',
3747
- toggle: Boolean,
3748
- boundary: Boolean,
3749
- boundaryAlign: Boolean,
3750
- delayShow: Number,
3751
- delayHide: Number,
3752
- display: String,
3753
- clsDrop: String,
3754
- animateOut: Boolean },
3744
+ selPanel: String,
3745
+ selClose: String,
3746
+ escClose: Boolean,
3747
+ bgClose: Boolean,
3748
+ stack: Boolean },
3755
3749
 
3756
3750
 
3757
3751
  data: {
3758
- mode: ['click', 'hover'],
3759
- toggle: '- *',
3760
- boundary: true,
3761
- boundaryAlign: false,
3762
- delayShow: 0,
3763
- delayHide: 800,
3764
- display: null,
3765
- clsDrop: false,
3766
- animation: ['uk-animation-fade'],
3767
3752
  cls: 'uk-open',
3768
- container: false,
3769
- animateOut: false },
3753
+ escClose: true,
3754
+ bgClose: true,
3755
+ overlay: true,
3756
+ stack: false },
3770
3757
 
3771
3758
 
3772
- created() {
3773
- this.tracker = new MouseTracker();
3774
- },
3759
+ computed: {
3760
+ panel(_ref, $el) {let { selPanel } = _ref;
3761
+ return $(selPanel, $el);
3762
+ },
3775
3763
 
3776
- beforeConnect() {
3777
- this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
3778
- },
3764
+ transitionElement() {
3765
+ return this.panel;
3766
+ },
3779
3767
 
3780
- connected() {
3781
- addClass(this.$el, this.clsDrop);
3768
+ bgClose(_ref2) {let { bgClose } = _ref2;
3769
+ return bgClose && this.panel;
3770
+ } },
3782
3771
 
3783
- if (this.toggle && !this.target) {
3784
- this.target = this.$create('toggle', query(this.toggle, this.$el), {
3785
- target: this.$el,
3786
- mode: this.mode }).
3787
- $el;
3788
- attr(this.target, 'aria-haspopup', true);
3789
- this.lazyload(this.target);
3790
- }
3791
- },
3792
3772
 
3793
- disconnected() {
3794
- if (this.isActive()) {
3795
- active$1 = null;
3773
+ beforeDisconnect() {
3774
+ if (includes(active$1, this)) {
3775
+ this.toggleElement(this.$el, false, false);
3796
3776
  }
3797
3777
  },
3798
3778
 
@@ -3801,34 +3781,12 @@
3801
3781
  name: 'click',
3802
3782
 
3803
3783
  delegate() {
3804
- return "." + this.clsDrop + "-close";
3784
+ return this.selClose;
3805
3785
  },
3806
3786
 
3807
3787
  handler(e) {
3808
3788
  e.preventDefault();
3809
- this.hide(false);
3810
- } },
3811
-
3812
-
3813
- {
3814
- name: 'click',
3815
-
3816
- delegate() {
3817
- return 'a[href^="#"]';
3818
- },
3819
-
3820
- handler(_ref) {let { defaultPrevented, current: { hash } } = _ref;
3821
- if (!defaultPrevented && hash && !within(hash, this.$el)) {
3822
- this.hide(false);
3823
- }
3824
- } },
3825
-
3826
-
3827
- {
3828
- name: 'beforescroll',
3829
-
3830
- handler() {
3831
- this.hide(false);
3789
+ this.hide();
3832
3790
  } },
3833
3791
 
3834
3792
 
@@ -3837,170 +3795,553 @@
3837
3795
 
3838
3796
  self: true,
3839
3797
 
3840
- handler(e, toggle) {
3841
- e.preventDefault();
3842
-
3843
- if (this.isToggled()) {
3844
- this.hide(false);
3845
- } else {
3846
- this.show(toggle == null ? void 0 : toggle.$el, false);
3798
+ handler(e) {
3799
+ if (e.defaultPrevented) {
3800
+ return;
3847
3801
  }
3848
- } },
3849
3802
 
3850
-
3851
- {
3852
- name: 'toggleshow',
3853
-
3854
- self: true,
3855
-
3856
- handler(e, toggle) {
3857
3803
  e.preventDefault();
3858
- this.show(toggle == null ? void 0 : toggle.$el);
3859
- } },
3860
-
3861
-
3862
- {
3863
- name: 'togglehide',
3864
-
3865
- self: true,
3866
3804
 
3867
- handler(e) {
3868
- e.preventDefault();
3869
- if (!matches(this.$el, ':focus,:hover')) {
3870
- this.hide();
3805
+ if (this.isToggled() === includes(active$1, this)) {
3806
+ this.toggle();
3871
3807
  }
3872
3808
  } },
3873
3809
 
3874
3810
 
3875
3811
  {
3876
- name: pointerEnter + " focusin",
3812
+ name: 'beforeshow',
3877
3813
 
3878
- filter() {
3879
- return includes(this.mode, 'hover');
3880
- },
3814
+ self: true,
3881
3815
 
3882
3816
  handler(e) {
3883
- if (!isTouch(e)) {
3884
- this.clearTimers();
3817
+ if (includes(active$1, this)) {
3818
+ return false;
3885
3819
  }
3886
- } },
3887
-
3888
-
3889
- {
3890
- name: pointerLeave + " focusout",
3891
-
3892
- filter() {
3893
- return includes(this.mode, 'hover');
3894
- },
3895
3820
 
3896
- handler(e) {
3897
- if (!isTouch(e) && e.relatedTarget) {
3898
- this.hide();
3821
+ if (!this.stack && active$1.length) {
3822
+ Promise.all(active$1.map((modal) => modal.hide())).then(this.show);
3823
+ e.preventDefault();
3824
+ } else {
3825
+ active$1.push(this);
3899
3826
  }
3900
3827
  } },
3901
3828
 
3902
3829
 
3903
3830
  {
3904
- name: 'toggled',
3831
+ name: 'show',
3905
3832
 
3906
3833
  self: true,
3907
3834
 
3908
- handler(e, toggled) {
3909
- if (!toggled) {
3910
- return;
3911
- }
3912
-
3913
- this.clearTimers();
3914
- this.position();
3915
- } },
3835
+ handler() {
3836
+ once(
3837
+ this.$el,
3838
+ 'hide',
3839
+ on(document, 'focusin', (e) => {
3840
+ if (last(active$1) === this && !within(e.target, this.$el)) {
3841
+ this.$el.focus();
3842
+ }
3843
+ }));
3916
3844
 
3917
3845
 
3918
- {
3919
- name: 'show',
3846
+ if (this.overlay) {
3847
+ once(this.$el, 'hide', preventOverscroll(this.$el));
3848
+ once(this.$el, 'hide', preventBackgroundScroll());
3849
+ }
3920
3850
 
3921
- self: true,
3851
+ if (this.stack) {
3852
+ css(this.$el, 'zIndex', toFloat(css(this.$el, 'zIndex')) + active$1.length);
3853
+ }
3922
3854
 
3923
- handler() {
3924
- active$1 = this;
3855
+ addClass(document.documentElement, this.clsPage);
3925
3856
 
3926
- this.tracker.init();
3857
+ if (this.bgClose) {
3858
+ once(
3859
+ this.$el,
3860
+ 'hide',
3861
+ on(document, pointerDown, (_ref3) => {let { target } = _ref3;
3862
+ if (
3863
+ last(active$1) !== this ||
3864
+ this.overlay && !within(target, this.$el) ||
3865
+ within(target, this.panel))
3866
+ {
3867
+ return;
3868
+ }
3927
3869
 
3928
- for (const handler of [
3929
- on(
3930
- document,
3931
- pointerDown,
3932
- (_ref2) => {let { target } = _ref2;return (
3933
- !within(target, this.$el) &&
3934
3870
  once(
3935
3871
  document,
3936
3872
  pointerUp + " " + pointerCancel + " scroll",
3937
- (_ref3) => {let { defaultPrevented, type, target: newTarget } = _ref3;
3873
+ (_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
3938
3874
  if (
3939
3875
  !defaultPrevented &&
3940
3876
  type === pointerUp &&
3941
- target === newTarget &&
3942
- !(this.target && within(target, this.target)))
3877
+ target === newTarget)
3943
3878
  {
3944
- this.hide(false);
3879
+ this.hide();
3945
3880
  }
3946
3881
  },
3947
- true));}),
3948
-
3949
-
3882
+ true);
3950
3883
 
3951
- on(document, 'keydown', (e) => {
3952
- if (e.keyCode === 27) {
3953
- this.hide(false);
3954
- }
3955
- }),
3884
+ }),
3885
+ { self: true });
3956
3886
 
3957
- ...(this.display === 'static' && this.align !== 'stretch' ?
3958
- [] :
3959
- (() => {
3960
- const handler = () => this.$emit();
3961
- return [
3962
- on(window, 'resize', handler),
3963
- on(document, 'scroll', handler, true),
3964
- (() => {
3965
- const observer = observeResize(
3966
- scrollParents(this.$el),
3967
- handler);
3887
+ }
3968
3888
 
3969
- return () => observer.disconnect();
3970
- })()];
3889
+ if (this.escClose) {
3890
+ once(
3891
+ this.$el,
3892
+ 'hide',
3893
+ on(document, 'keydown', (e) => {
3894
+ if (e.keyCode === 27 && last(active$1) === this) {
3895
+ this.hide();
3896
+ }
3897
+ }),
3898
+ { self: true });
3971
3899
 
3972
- })())])
3973
- {
3974
- once(this.$el, 'hide', handler, { self: true });
3975
3900
  }
3976
3901
  } },
3977
3902
 
3978
3903
 
3979
3904
  {
3980
- name: 'beforehide',
3905
+ name: 'shown',
3981
3906
 
3982
3907
  self: true,
3983
3908
 
3984
3909
  handler() {
3985
- this.clearTimers();
3910
+ if (!isFocusable(this.$el)) {
3911
+ attr(this.$el, 'tabindex', '-1');
3912
+ }
3913
+
3914
+ if (!$(':focus', this.$el)) {
3915
+ this.$el.focus();
3916
+ }
3986
3917
  } },
3987
3918
 
3988
3919
 
3989
3920
  {
3990
- name: 'hide',
3921
+ name: 'hidden',
3991
3922
 
3992
- handler(_ref4) {let { target } = _ref4;
3993
- if (this.$el !== target) {
3994
- active$1 =
3995
- active$1 === null && within(target, this.$el) && this.isToggled() ?
3996
- this :
3997
- active$1;
3998
- return;
3999
- }
3923
+ self: true,
4000
3924
 
4001
- active$1 = this.isActive() ? null : active$1;
4002
- this.tracker.cancel();
4003
- } }],
3925
+ handler() {
3926
+ if (includes(active$1, this)) {
3927
+ active$1.splice(active$1.indexOf(this), 1);
3928
+ }
3929
+
3930
+ if (!active$1.length) {
3931
+ css(document.body, 'overflowY', '');
3932
+ }
3933
+
3934
+ css(this.$el, 'zIndex', '');
3935
+
3936
+ if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
3937
+ removeClass(document.documentElement, this.clsPage);
3938
+ }
3939
+ } }],
3940
+
3941
+
3942
+
3943
+ methods: {
3944
+ toggle() {
3945
+ return this.isToggled() ? this.hide() : this.show();
3946
+ },
3947
+
3948
+ show() {
3949
+ if (this.container && parent(this.$el) !== this.container) {
3950
+ append(this.container, this.$el);
3951
+ return new Promise((resolve) =>
3952
+ requestAnimationFrame(() => this.show().then(resolve)));
3953
+
3954
+ }
3955
+
3956
+ return this.toggleElement(this.$el, true, animate(this));
3957
+ },
3958
+
3959
+ hide() {
3960
+ return this.toggleElement(this.$el, false, animate(this));
3961
+ } } };
3962
+
3963
+
3964
+
3965
+ function animate(_ref5) {let { transitionElement, _toggle } = _ref5;
3966
+ return (el, show) =>
3967
+ new Promise((resolve, reject) =>
3968
+ once(el, 'show hide', () => {
3969
+ el._reject == null ? void 0 : el._reject();
3970
+ el._reject = reject;
3971
+
3972
+ _toggle(el, show);
3973
+
3974
+ const off = once(
3975
+ transitionElement,
3976
+ 'transitionstart',
3977
+ () => {
3978
+ once(transitionElement, 'transitionend transitioncancel', resolve, {
3979
+ self: true });
3980
+
3981
+ clearTimeout(timer);
3982
+ },
3983
+ { self: true });
3984
+
3985
+
3986
+ const timer = setTimeout(() => {
3987
+ off();
3988
+ resolve();
3989
+ }, toMs(css(transitionElement, 'transitionDuration')));
3990
+ })).
3991
+ then(() => delete el._reject);
3992
+ }
3993
+
3994
+ function toMs(time) {
3995
+ return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
3996
+ }
3997
+
3998
+ function preventOverscroll(el) {
3999
+ if (CSS.supports('overscroll-behavior', 'contain')) {
4000
+ const elements = filterChildren(el, (child) => /auto|scroll/.test(css(child, 'overflow')));
4001
+ css(elements, 'overscrollBehavior', 'contain');
4002
+ return () => css(elements, 'overscrollBehavior', '');
4003
+ }
4004
+
4005
+ let startClientY;
4006
+
4007
+ const events = [
4008
+ on(
4009
+ el,
4010
+ 'touchstart',
4011
+ (_ref6) => {let { targetTouches } = _ref6;
4012
+ if (targetTouches.length === 1) {
4013
+ startClientY = targetTouches[0].clientY;
4014
+ }
4015
+ },
4016
+ { passive: true }),
4017
+
4018
+
4019
+ on(
4020
+ el,
4021
+ 'touchmove',
4022
+ (e) => {
4023
+ if (e.targetTouches.length !== 1) {
4024
+ return;
4025
+ }
4026
+
4027
+ let [scrollParent] = scrollParents(e.target, /auto|scroll/);
4028
+ if (!within(scrollParent, el)) {
4029
+ scrollParent = el;
4030
+ }
4031
+
4032
+ const clientY = e.targetTouches[0].clientY - startClientY;
4033
+ const { scrollTop, scrollHeight, clientHeight } = scrollParent;
4034
+
4035
+ if (
4036
+ clientHeight >= scrollHeight ||
4037
+ scrollTop === 0 && clientY > 0 ||
4038
+ scrollHeight - scrollTop <= clientHeight && clientY < 0)
4039
+ {
4040
+ e.cancelable && e.preventDefault();
4041
+ }
4042
+ },
4043
+ { passive: false })];
4044
+
4045
+
4046
+
4047
+ return () => events.forEach((fn) => fn());
4048
+ }
4049
+
4050
+ function preventBackgroundScroll() {
4051
+ const { body, documentElement } = document;
4052
+ css(body, {
4053
+ overflowY: width(window) > documentElement.clientWidth ? 'scroll' : '',
4054
+ touchAction: 'none' });
4055
+
4056
+ css(documentElement, 'overflowY', 'hidden');
4057
+ return () => {
4058
+ css(documentElement, 'overflowY', '');
4059
+ css(body, { overflowY: '', touchAction: '' });
4060
+ };
4061
+ }
4062
+
4063
+ function filterChildren(el, fn) {
4064
+ const children = [];
4065
+ apply(el, (node) => {
4066
+ if (fn(node)) {
4067
+ children.push(node);
4068
+ }
4069
+ });
4070
+ return children;
4071
+ }
4072
+
4073
+ let active;
4074
+
4075
+ var drop = {
4076
+ mixins: [Container, Lazyload, Position, Togglable],
4077
+
4078
+ args: 'pos',
4079
+
4080
+ props: {
4081
+ mode: 'list',
4082
+ toggle: Boolean,
4083
+ boundary: Boolean,
4084
+ boundaryAlign: Boolean,
4085
+ delayShow: Number,
4086
+ delayHide: Number,
4087
+ display: String,
4088
+ clsDrop: String,
4089
+ animateOut: Boolean,
4090
+ bgScroll: Boolean },
4091
+
4092
+
4093
+ data: {
4094
+ mode: ['click', 'hover'],
4095
+ toggle: '- *',
4096
+ boundary: true,
4097
+ boundaryAlign: false,
4098
+ delayShow: 0,
4099
+ delayHide: 800,
4100
+ display: null,
4101
+ clsDrop: false,
4102
+ animation: ['uk-animation-fade'],
4103
+ cls: 'uk-open',
4104
+ container: false,
4105
+ animateOut: false,
4106
+ bgScroll: true },
4107
+
4108
+
4109
+ created() {
4110
+ this.tracker = new MouseTracker();
4111
+ },
4112
+
4113
+ beforeConnect() {
4114
+ this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
4115
+ },
4116
+
4117
+ connected() {
4118
+ addClass(this.$el, this.clsDrop);
4119
+
4120
+ if (this.toggle && !this.target) {
4121
+ this.target = this.$create('toggle', query(this.toggle, this.$el), {
4122
+ target: this.$el,
4123
+ mode: this.mode }).
4124
+ $el;
4125
+ attr(this.target, 'aria-haspopup', true);
4126
+ this.lazyload(this.target);
4127
+ }
4128
+ },
4129
+
4130
+ disconnected() {
4131
+ if (this.isActive()) {
4132
+ active = null;
4133
+ }
4134
+ },
4135
+
4136
+ events: [
4137
+ {
4138
+ name: 'click',
4139
+
4140
+ delegate() {
4141
+ return "." + this.clsDrop + "-close";
4142
+ },
4143
+
4144
+ handler(e) {
4145
+ e.preventDefault();
4146
+ this.hide(false);
4147
+ } },
4148
+
4149
+
4150
+ {
4151
+ name: 'click',
4152
+
4153
+ delegate() {
4154
+ return 'a[href^="#"]';
4155
+ },
4156
+
4157
+ handler(_ref) {let { defaultPrevented, current: { hash } } = _ref;
4158
+ if (!defaultPrevented && hash && !within(hash, this.$el)) {
4159
+ this.hide(false);
4160
+ }
4161
+ } },
4162
+
4163
+
4164
+ {
4165
+ name: 'beforescroll',
4166
+
4167
+ handler() {
4168
+ this.hide(false);
4169
+ } },
4170
+
4171
+
4172
+ {
4173
+ name: 'toggle',
4174
+
4175
+ self: true,
4176
+
4177
+ handler(e, toggle) {
4178
+ e.preventDefault();
4179
+
4180
+ if (this.isToggled()) {
4181
+ this.hide(false);
4182
+ } else {
4183
+ this.show(toggle == null ? void 0 : toggle.$el, false);
4184
+ }
4185
+ } },
4186
+
4187
+
4188
+ {
4189
+ name: 'toggleshow',
4190
+
4191
+ self: true,
4192
+
4193
+ handler(e, toggle) {
4194
+ e.preventDefault();
4195
+ this.show(toggle == null ? void 0 : toggle.$el);
4196
+ } },
4197
+
4198
+
4199
+ {
4200
+ name: 'togglehide',
4201
+
4202
+ self: true,
4203
+
4204
+ handler(e) {
4205
+ e.preventDefault();
4206
+ if (!matches(this.$el, ':focus,:hover')) {
4207
+ this.hide();
4208
+ }
4209
+ } },
4210
+
4211
+
4212
+ {
4213
+ name: pointerEnter + " focusin",
4214
+
4215
+ filter() {
4216
+ return includes(this.mode, 'hover');
4217
+ },
4218
+
4219
+ handler(e) {
4220
+ if (!isTouch(e)) {
4221
+ this.clearTimers();
4222
+ }
4223
+ } },
4224
+
4225
+
4226
+ {
4227
+ name: pointerLeave + " focusout",
4228
+
4229
+ filter() {
4230
+ return includes(this.mode, 'hover');
4231
+ },
4232
+
4233
+ handler(e) {
4234
+ if (!isTouch(e) && e.relatedTarget) {
4235
+ this.hide();
4236
+ }
4237
+ } },
4238
+
4239
+
4240
+ {
4241
+ name: 'toggled',
4242
+
4243
+ self: true,
4244
+
4245
+ handler(e, toggled) {
4246
+ if (!toggled) {
4247
+ return;
4248
+ }
4249
+
4250
+ this.clearTimers();
4251
+ this.position();
4252
+ } },
4253
+
4254
+
4255
+ {
4256
+ name: 'show',
4257
+
4258
+ self: true,
4259
+
4260
+ handler() {
4261
+ active = this;
4262
+
4263
+ this.tracker.init();
4264
+
4265
+ for (const handler of [
4266
+ on(
4267
+ document,
4268
+ pointerDown,
4269
+ (_ref2) => {let { target } = _ref2;return (
4270
+ !within(target, this.$el) &&
4271
+ once(
4272
+ document,
4273
+ pointerUp + " " + pointerCancel + " scroll",
4274
+ (_ref3) => {let { defaultPrevented, type, target: newTarget } = _ref3;
4275
+ if (
4276
+ !defaultPrevented &&
4277
+ type === pointerUp &&
4278
+ target === newTarget &&
4279
+ !(this.target && within(target, this.target)))
4280
+ {
4281
+ this.hide(false);
4282
+ }
4283
+ },
4284
+ true));}),
4285
+
4286
+
4287
+
4288
+ on(document, 'keydown', (e) => {
4289
+ if (e.keyCode === 27) {
4290
+ this.hide(false);
4291
+ }
4292
+ }),
4293
+
4294
+ ...(this.bgScroll ?
4295
+ [] :
4296
+ [preventOverscroll(this.$el), preventBackgroundScroll()]),
4297
+
4298
+ ...(this.display === 'static' && this.align !== 'stretch' ?
4299
+ [] :
4300
+ (() => {
4301
+ const handler = () => this.$emit();
4302
+ return [
4303
+ on(window, 'resize', handler),
4304
+ on(document, 'scroll', handler, true),
4305
+ (() => {
4306
+ const observer = observeResize(
4307
+ scrollParents(this.$el),
4308
+ handler);
4309
+
4310
+ return () => observer.disconnect();
4311
+ })()];
4312
+
4313
+ })())])
4314
+ {
4315
+ once(this.$el, 'hide', handler, { self: true });
4316
+ }
4317
+ } },
4318
+
4319
+
4320
+ {
4321
+ name: 'beforehide',
4322
+
4323
+ self: true,
4324
+
4325
+ handler() {
4326
+ this.clearTimers();
4327
+ } },
4328
+
4329
+
4330
+ {
4331
+ name: 'hide',
4332
+
4333
+ handler(_ref4) {let { target } = _ref4;
4334
+ if (this.$el !== target) {
4335
+ active =
4336
+ active === null && within(target, this.$el) && this.isToggled() ?
4337
+ this :
4338
+ active;
4339
+ return;
4340
+ }
4341
+
4342
+ active = this.isActive() ? null : active;
4343
+ this.tracker.cancel();
4344
+ } }],
4004
4345
 
4005
4346
 
4006
4347
 
@@ -4026,16 +4367,16 @@
4026
4367
  return;
4027
4368
  }
4028
4369
 
4029
- if (active$1) {
4030
- if (delay && active$1.isDelaying) {
4370
+ if (active) {
4371
+ if (delay && active.isDelaying) {
4031
4372
  this.showTimer = setTimeout(() => matches(target, ':hover') && this.show(), 10);
4032
4373
  return;
4033
4374
  }
4034
4375
 
4035
4376
  let prev;
4036
- while (active$1 && prev !== active$1 && !within(this.$el, active$1.$el)) {
4037
- prev = active$1;
4038
- active$1.hide(false, false);
4377
+ while (active && prev !== active && !within(this.$el, active.$el)) {
4378
+ prev = active;
4379
+ active.hide(false, false);
4039
4380
  }
4040
4381
  }
4041
4382
 
@@ -4076,7 +4417,7 @@
4076
4417
  },
4077
4418
 
4078
4419
  isActive() {
4079
- return active$1 === this;
4420
+ return active === this;
4080
4421
  },
4081
4422
 
4082
4423
  position() {
@@ -4642,14 +4983,18 @@
4642
4983
  0);
4643
4984
 
4644
4985
  } else {
4645
- // on mobile devices (iOS and Android) window.innerHeight !== 100vh
4646
- minHeight = "calc(" + (
4647
- document.scrollingElement === scrollElement ? '100vh' : viewportHeight + "px");
4986
+ const isScrollingElement = document.scrollingElement === scrollElement;
4648
4987
 
4988
+ // on mobile devices (iOS and Android) window.innerHeight !== 100vh
4989
+ minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
4649
4990
 
4650
4991
  if (this.offsetTop) {
4651
- const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
4652
- minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
4992
+ if (isScrollingElement) {
4993
+ const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
4994
+ minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
4995
+ } else {
4996
+ minHeight += " - " + css(scrollElement, 'paddingTop');
4997
+ }
4653
4998
  }
4654
4999
 
4655
5000
  if (this.offsetBottom === true) {
@@ -5163,414 +5508,163 @@
5163
5508
  function setSourceProps(sourceEl, targetEl) {
5164
5509
  srcProps.forEach((prop) => {
5165
5510
  const value = data(sourceEl, prop);
5166
- if (value) {
5167
- attr(targetEl, prop.replace(/^(data-)+/, ''), value);
5168
- }
5169
- });
5170
- }
5171
-
5172
- function getImageFromElement(el, src, sources) {
5173
- const img = new Image();
5174
-
5175
- wrapInPicture(img, sources);
5176
- setSourceProps(el, img);
5177
- img.onload = () => {
5178
- setSrcAttrs(el, img.currentSrc);
5179
- };
5180
- attr(img, 'src', src);
5181
- return img;
5182
- }
5183
-
5184
- function wrapInPicture(img, sources) {
5185
- sources = parseSources(sources);
5186
-
5187
- if (sources.length) {
5188
- const picture = fragment('<picture>');
5189
- for (const attrs of sources) {
5190
- const source = fragment('<source>');
5191
- attr(source, attrs);
5192
- append(picture, source);
5193
- }
5194
- append(picture, img);
5195
- }
5196
- }
5197
-
5198
- function parseSources(sources) {
5199
- if (!sources) {
5200
- return [];
5201
- }
5202
-
5203
- if (startsWith(sources, '[')) {
5204
- try {
5205
- sources = JSON.parse(sources);
5206
- } catch (e) {
5207
- sources = [];
5208
- }
5209
- } else {
5210
- sources = parseOptions(sources);
5211
- }
5212
-
5213
- if (!isArray(sources)) {
5214
- sources = [sources];
5215
- }
5216
-
5217
- return sources.filter((source) => !isEmpty(source));
5218
- }
5219
-
5220
- function ensureSrcAttribute(el) {
5221
- if (isImg(el) && !hasAttr(el, 'src')) {
5222
- attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
5223
- }
5224
- }
5225
-
5226
- function isPicture(el) {
5227
- return isTag(el, 'picture');
5228
- }
5229
-
5230
- function isImg(el) {
5231
- return isTag(el, 'img');
5232
- }
5233
-
5234
- var Media = {
5235
- props: {
5236
- media: Boolean },
5237
-
5238
-
5239
- data: {
5240
- media: false },
5241
-
5242
-
5243
- connected() {
5244
- const media = toMedia(this.media);
5245
- this.matchMedia = true;
5246
- if (media) {
5247
- this.mediaObj = window.matchMedia(media);
5248
- const handler = () => {
5249
- this.matchMedia = this.mediaObj.matches;
5250
- trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
5251
- };
5252
- this.offMediaObj = on(this.mediaObj, 'change', () => {
5253
- handler();
5254
- this.$emit('resize');
5255
- });
5256
- handler();
5257
- }
5258
- },
5259
-
5260
- disconnected() {var _this$offMediaObj;
5261
- (_this$offMediaObj = this.offMediaObj) == null ? void 0 : _this$offMediaObj.call(this);
5262
- } };
5263
-
5264
-
5265
- function toMedia(value) {
5266
- if (isString(value)) {
5267
- if (startsWith(value, '@')) {
5268
- const name = "breakpoint-" + value.substr(1);
5269
- value = toFloat(getCssVar(name));
5270
- } else if (isNaN(value)) {
5271
- return value;
5272
- }
5273
- }
5274
-
5275
- return value && isNumeric(value) ? "(min-width: " + value + "px)" : '';
5276
- }
5277
-
5278
- var leader = {
5279
- mixins: [Class, Media, Resize],
5280
-
5281
- props: {
5282
- fill: String },
5283
-
5284
-
5285
- data: {
5286
- fill: '',
5287
- clsWrapper: 'uk-leader-fill',
5288
- clsHide: 'uk-leader-hide',
5289
- attrFill: 'data-fill' },
5290
-
5291
-
5292
- computed: {
5293
- fill(_ref) {let { fill } = _ref;
5294
- return fill || getCssVar('leader-fill-content');
5295
- } },
5296
-
5297
-
5298
- connected() {
5299
- [this.wrapper] = wrapInner(this.$el, "<span class=\"" + this.clsWrapper + "\">");
5300
- },
5301
-
5302
- disconnected() {
5303
- unwrap(this.wrapper.childNodes);
5304
- },
5305
-
5306
- update: {
5307
- read() {
5308
- const width = Math.trunc(this.$el.offsetWidth / 2);
5309
-
5310
- return {
5311
- width,
5312
- fill: this.fill,
5313
- hide: !this.matchMedia };
5314
-
5315
- },
5316
-
5317
- write(_ref2) {let { width, fill, hide } = _ref2;
5318
- toggleClass(this.wrapper, this.clsHide, hide);
5319
- attr(this.wrapper, this.attrFill, new Array(width).join(fill));
5320
- },
5321
-
5322
- events: ['resize'] } };
5323
-
5324
- const active = [];
5325
-
5326
- var Modal = {
5327
- mixins: [Class, Container, Togglable],
5328
-
5329
- props: {
5330
- selPanel: String,
5331
- selClose: String,
5332
- escClose: Boolean,
5333
- bgClose: Boolean,
5334
- stack: Boolean },
5335
-
5336
-
5337
- data: {
5338
- cls: 'uk-open',
5339
- escClose: true,
5340
- bgClose: true,
5341
- overlay: true,
5342
- stack: false },
5343
-
5344
-
5345
- computed: {
5346
- panel(_ref, $el) {let { selPanel } = _ref;
5347
- return $(selPanel, $el);
5348
- },
5349
-
5350
- transitionElement() {
5351
- return this.panel;
5352
- },
5353
-
5354
- bgClose(_ref2) {let { bgClose } = _ref2;
5355
- return bgClose && this.panel;
5356
- } },
5357
-
5358
-
5359
- beforeDisconnect() {
5360
- if (includes(active, this)) {
5361
- this.toggleElement(this.$el, false, false);
5362
- }
5363
- },
5364
-
5365
- events: [
5366
- {
5367
- name: 'click',
5368
-
5369
- delegate() {
5370
- return this.selClose;
5371
- },
5372
-
5373
- handler(e) {
5374
- e.preventDefault();
5375
- this.hide();
5376
- } },
5377
-
5378
-
5379
- {
5380
- name: 'toggle',
5381
-
5382
- self: true,
5383
-
5384
- handler(e) {
5385
- if (e.defaultPrevented) {
5386
- return;
5387
- }
5388
-
5389
- e.preventDefault();
5390
-
5391
- if (this.isToggled() === includes(active, this)) {
5392
- this.toggle();
5393
- }
5394
- } },
5395
-
5396
-
5397
- {
5398
- name: 'beforeshow',
5399
-
5400
- self: true,
5401
-
5402
- handler(e) {
5403
- if (includes(active, this)) {
5404
- return false;
5405
- }
5406
-
5407
- if (!this.stack && active.length) {
5408
- Promise.all(active.map((modal) => modal.hide())).then(this.show);
5409
- e.preventDefault();
5410
- } else {
5411
- active.push(this);
5412
- }
5413
- } },
5414
-
5415
-
5416
- {
5417
- name: 'show',
5418
-
5419
- self: true,
5420
-
5421
- handler() {
5422
- const docEl = document.documentElement;
5423
-
5424
- if (width(window) > docEl.clientWidth && this.overlay) {
5425
- css(document.body, 'overflowY', 'scroll');
5426
- }
5427
-
5428
- if (this.stack) {
5429
- css(this.$el, 'zIndex', toFloat(css(this.$el, 'zIndex')) + active.length);
5430
- }
5511
+ if (value) {
5512
+ attr(targetEl, prop.replace(/^(data-)+/, ''), value);
5513
+ }
5514
+ });
5515
+ }
5431
5516
 
5432
- addClass(docEl, this.clsPage);
5517
+ function getImageFromElement(el, src, sources) {
5518
+ const img = new Image();
5433
5519
 
5434
- if (this.bgClose) {
5435
- once(
5436
- this.$el,
5437
- 'hide',
5438
- on(document, pointerDown, (_ref3) => {let { target } = _ref3;
5439
- if (
5440
- last(active) !== this ||
5441
- this.overlay && !within(target, this.$el) ||
5442
- within(target, this.panel))
5443
- {
5444
- return;
5445
- }
5520
+ wrapInPicture(img, sources);
5521
+ setSourceProps(el, img);
5522
+ img.onload = () => {
5523
+ setSrcAttrs(el, img.currentSrc);
5524
+ };
5525
+ attr(img, 'src', src);
5526
+ return img;
5527
+ }
5446
5528
 
5447
- once(
5448
- document,
5449
- pointerUp + " " + pointerCancel + " scroll",
5450
- (_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
5451
- if (
5452
- !defaultPrevented &&
5453
- type === pointerUp &&
5454
- target === newTarget)
5455
- {
5456
- this.hide();
5457
- }
5458
- },
5459
- true);
5529
+ function wrapInPicture(img, sources) {
5530
+ sources = parseSources(sources);
5460
5531
 
5461
- }),
5462
- { self: true });
5532
+ if (sources.length) {
5533
+ const picture = fragment('<picture>');
5534
+ for (const attrs of sources) {
5535
+ const source = fragment('<source>');
5536
+ attr(source, attrs);
5537
+ append(picture, source);
5538
+ }
5539
+ append(picture, img);
5540
+ }
5541
+ }
5463
5542
 
5464
- }
5543
+ function parseSources(sources) {
5544
+ if (!sources) {
5545
+ return [];
5546
+ }
5465
5547
 
5466
- if (this.escClose) {
5467
- once(
5468
- this.$el,
5469
- 'hide',
5470
- on(document, 'keydown', (e) => {
5471
- if (e.keyCode === 27 && last(active) === this) {
5472
- this.hide();
5473
- }
5474
- }),
5475
- { self: true });
5548
+ if (startsWith(sources, '[')) {
5549
+ try {
5550
+ sources = JSON.parse(sources);
5551
+ } catch (e) {
5552
+ sources = [];
5553
+ }
5554
+ } else {
5555
+ sources = parseOptions(sources);
5556
+ }
5476
5557
 
5477
- }
5478
- } },
5558
+ if (!isArray(sources)) {
5559
+ sources = [sources];
5560
+ }
5479
5561
 
5562
+ return sources.filter((source) => !isEmpty(source));
5563
+ }
5480
5564
 
5481
- {
5482
- name: 'shown',
5565
+ function ensureSrcAttribute(el) {
5566
+ if (isImg(el) && !hasAttr(el, 'src')) {
5567
+ attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
5568
+ }
5569
+ }
5483
5570
 
5484
- self: true,
5571
+ function isPicture(el) {
5572
+ return isTag(el, 'picture');
5573
+ }
5485
5574
 
5486
- handler() {
5487
- if (!isFocusable(this.$el)) {
5488
- attr(this.$el, 'tabindex', '-1');
5489
- }
5575
+ function isImg(el) {
5576
+ return isTag(el, 'img');
5577
+ }
5490
5578
 
5491
- if (!$(':focus', this.$el)) {
5492
- this.$el.focus();
5493
- }
5494
- } },
5579
+ var Media = {
5580
+ props: {
5581
+ media: Boolean },
5495
5582
 
5496
5583
 
5497
- {
5498
- name: 'hidden',
5584
+ data: {
5585
+ media: false },
5499
5586
 
5500
- self: true,
5501
5587
 
5502
- handler() {
5503
- if (includes(active, this)) {
5504
- active.splice(active.indexOf(this), 1);
5505
- }
5588
+ connected() {
5589
+ const media = toMedia(this.media);
5590
+ this.matchMedia = true;
5591
+ if (media) {
5592
+ this.mediaObj = window.matchMedia(media);
5593
+ const handler = () => {
5594
+ this.matchMedia = this.mediaObj.matches;
5595
+ trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
5596
+ };
5597
+ this.offMediaObj = on(this.mediaObj, 'change', () => {
5598
+ handler();
5599
+ this.$emit('resize');
5600
+ });
5601
+ handler();
5602
+ }
5603
+ },
5506
5604
 
5507
- if (!active.length) {
5508
- css(document.body, 'overflowY', '');
5509
- }
5605
+ disconnected() {var _this$offMediaObj;
5606
+ (_this$offMediaObj = this.offMediaObj) == null ? void 0 : _this$offMediaObj.call(this);
5607
+ } };
5510
5608
 
5511
- css(this.$el, 'zIndex', '');
5512
5609
 
5513
- if (!active.some((modal) => modal.clsPage === this.clsPage)) {
5514
- removeClass(document.documentElement, this.clsPage);
5515
- }
5516
- } }],
5610
+ function toMedia(value) {
5611
+ if (isString(value)) {
5612
+ if (startsWith(value, '@')) {
5613
+ const name = "breakpoint-" + value.substr(1);
5614
+ value = toFloat(getCssVar(name));
5615
+ } else if (isNaN(value)) {
5616
+ return value;
5617
+ }
5618
+ }
5517
5619
 
5620
+ return value && isNumeric(value) ? "(min-width: " + value + "px)" : '';
5621
+ }
5518
5622
 
5623
+ var leader = {
5624
+ mixins: [Class, Media, Resize],
5519
5625
 
5520
- methods: {
5521
- toggle() {
5522
- return this.isToggled() ? this.hide() : this.show();
5523
- },
5626
+ props: {
5627
+ fill: String },
5524
5628
 
5525
- show() {
5526
- if (this.container && parent(this.$el) !== this.container) {
5527
- append(this.container, this.$el);
5528
- return new Promise((resolve) =>
5529
- requestAnimationFrame(() => this.show().then(resolve)));
5530
5629
 
5531
- }
5630
+ data: {
5631
+ fill: '',
5632
+ clsWrapper: 'uk-leader-fill',
5633
+ clsHide: 'uk-leader-hide',
5634
+ attrFill: 'data-fill' },
5532
5635
 
5533
- return this.toggleElement(this.$el, true, animate(this));
5534
- },
5535
5636
 
5536
- hide() {
5537
- return this.toggleElement(this.$el, false, animate(this));
5538
- } } };
5637
+ computed: {
5638
+ fill(_ref) {let { fill } = _ref;
5639
+ return fill || getCssVar('leader-fill-content');
5640
+ } },
5539
5641
 
5540
5642
 
5643
+ connected() {
5644
+ [this.wrapper] = wrapInner(this.$el, "<span class=\"" + this.clsWrapper + "\">");
5645
+ },
5541
5646
 
5542
- function animate(_ref5) {let { transitionElement, _toggle } = _ref5;
5543
- return (el, show) =>
5544
- new Promise((resolve, reject) =>
5545
- once(el, 'show hide', () => {
5546
- el._reject == null ? void 0 : el._reject();
5547
- el._reject = reject;
5647
+ disconnected() {
5648
+ unwrap(this.wrapper.childNodes);
5649
+ },
5548
5650
 
5549
- _toggle(el, show);
5651
+ update: {
5652
+ read() {
5653
+ const width = Math.trunc(this.$el.offsetWidth / 2);
5550
5654
 
5551
- const off = once(
5552
- transitionElement,
5553
- 'transitionstart',
5554
- () => {
5555
- once(transitionElement, 'transitionend transitioncancel', resolve, {
5556
- self: true });
5655
+ return {
5656
+ width,
5657
+ fill: this.fill,
5658
+ hide: !this.matchMedia };
5557
5659
 
5558
- clearTimeout(timer);
5559
5660
  },
5560
- { self: true });
5561
-
5562
5661
 
5563
- const timer = setTimeout(() => {
5564
- off();
5565
- resolve();
5566
- }, toMs(css(transitionElement, 'transitionDuration')));
5567
- })).
5568
- then(() => delete el._reject);
5569
- }
5662
+ write(_ref2) {let { width, fill, hide } = _ref2;
5663
+ toggleClass(this.wrapper, this.clsHide, hide);
5664
+ attr(this.wrapper, this.attrFill, new Array(width).join(fill));
5665
+ },
5570
5666
 
5571
- function toMs(time) {
5572
- return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
5573
- }
5667
+ events: ['resize'] } };
5574
5668
 
5575
5669
  var modal = {
5576
5670
  install,
@@ -6076,7 +6170,7 @@
6076
6170
 
6077
6171
  methods: {
6078
6172
  getActive() {
6079
- return active$1 && within(active$1.target, this.$el) && active$1;
6173
+ return active && within(active.target, this.$el) && active;
6080
6174
  },
6081
6175
 
6082
6176
  transitionTo(newHeight, el) {
@@ -6286,22 +6380,6 @@
6286
6380
  } },
6287
6381
 
6288
6382
 
6289
- {
6290
- name: 'touchstart',
6291
-
6292
- passive: true,
6293
-
6294
- el() {
6295
- return this.panel;
6296
- },
6297
-
6298
- handler(_ref8) {let { targetTouches } = _ref8;
6299
- if (targetTouches.length === 1) {
6300
- this.clientY = targetTouches[0].clientY;
6301
- }
6302
- } },
6303
-
6304
-
6305
6383
  {
6306
6384
  name: 'touchmove',
6307
6385
 
@@ -6317,33 +6395,6 @@
6317
6395
  } },
6318
6396
 
6319
6397
 
6320
- {
6321
- name: 'touchmove',
6322
-
6323
- passive: false,
6324
-
6325
- el() {
6326
- return this.panel;
6327
- },
6328
-
6329
- handler(e) {
6330
- if (e.targetTouches.length !== 1) {
6331
- return;
6332
- }
6333
-
6334
- const clientY = e.targetTouches[0].clientY - this.clientY;
6335
- const { scrollTop, scrollHeight, clientHeight } = this.panel;
6336
-
6337
- if (
6338
- clientHeight >= scrollHeight ||
6339
- scrollTop === 0 && clientY > 0 ||
6340
- scrollHeight - scrollTop <= clientHeight && clientY < 0)
6341
- {
6342
- e.cancelable && e.preventDefault();
6343
- }
6344
- } },
6345
-
6346
-
6347
6398
  {
6348
6399
  name: 'show',
6349
6400
 
@@ -6355,7 +6406,6 @@
6355
6406
  addClass(parent(this.panel), this.clsMode);
6356
6407
  }
6357
6408
 
6358
- css(document.documentElement, 'overflowY', this.overlay ? 'hidden' : '');
6359
6409
  addClass(document.body, this.clsContainer, this.clsFlip);
6360
6410
  css(document.body, 'touch-action', 'pan-y pinch-zoom');
6361
6411
  css(this.$el, 'display', 'block');
@@ -6363,7 +6413,7 @@
6363
6413
  addClass(
6364
6414
  this.panel,
6365
6415
  this.clsSidebarAnimation,
6366
- this.mode !== 'reveal' ? this.clsMode : '');
6416
+ this.mode === 'reveal' ? '' : this.clsMode);
6367
6417
 
6368
6418
 
6369
6419
  height(document.body); // force reflow
@@ -6400,8 +6450,6 @@
6400
6450
  removeClass(this.$el, this.clsOverlay);
6401
6451
  css(this.$el, 'display', '');
6402
6452
  removeClass(document.body, this.clsContainer, this.clsFlip);
6403
-
6404
- css(document.documentElement, 'overflowY', '');
6405
6453
  } },
6406
6454
 
6407
6455