uikit 3.15.2-dev.07fe5036e → 3.15.3-dev.45f4472ed

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 (57) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/dist/css/uikit-core-rtl.css +2 -2
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +2 -2
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +2 -2
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +2 -2
  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 +102 -109
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +2 -4
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +2 -4
  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 +4 -2
  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 +4 -2
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +90 -96
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +1 -3
  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 +4 -8
  37. package/dist/js/uikit-core.min.js +2 -2
  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 +109 -118
  41. package/dist/js/uikit.min.js +2 -2
  42. package/package.json +7 -7
  43. package/src/js/api/state.js +1 -1
  44. package/src/js/components/filter.js +12 -14
  45. package/src/js/core/cover.js +1 -1
  46. package/src/js/core/scrollspy.js +0 -2
  47. package/src/js/mixin/internal/animate-fade.js +50 -51
  48. package/src/js/mixin/internal/animate-slide.js +52 -57
  49. package/src/js/mixin/slider-reactive.js +2 -0
  50. package/src/js/mixin/slider.js +1 -1
  51. package/src/js/mixin/togglable.js +0 -2
  52. package/src/less/components/nav.less +1 -1
  53. package/src/less/components/navbar.less +2 -1
  54. package/src/scss/components/nav.scss +1 -1
  55. package/src/scss/components/navbar.scss +2 -1
  56. package/src/scss/variables-theme.scss +1 -0
  57. package/src/scss/variables.scss +1 -0
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.15.2-dev.07fe5036e | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.15.3-dev.45f4472ed | 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() :
@@ -2730,7 +2730,7 @@
2730
2730
  function initChildListObserver(component) {
2731
2731
  const { el } = component.$options;
2732
2732
 
2733
- const observer = new MutationObserver(() => component.$emit());
2733
+ const observer = new MutationObserver(() => component._callWatches());
2734
2734
  observer.observe(el, {
2735
2735
  childList: true,
2736
2736
  subtree: true });
@@ -2945,7 +2945,7 @@
2945
2945
  UIkit.data = '__uikit__';
2946
2946
  UIkit.prefix = 'uk-';
2947
2947
  UIkit.options = {};
2948
- UIkit.version = '3.15.2-dev.07fe5036e';
2948
+ UIkit.version = '3.15.3-dev.45f4472ed';
2949
2949
 
2950
2950
  globalAPI(UIkit);
2951
2951
  hooksAPI(UIkit);
@@ -3100,7 +3100,6 @@
3100
3100
  const done = () => {
3101
3101
  removeClass(el, cls);
3102
3102
  trigger(el, show ? 'shown' : 'hidden', [this]);
3103
- this.$update(el);
3104
3103
  };
3105
3104
 
3106
3105
  return promise ?
@@ -3145,7 +3144,6 @@
3145
3144
 
3146
3145
  if (changed) {
3147
3146
  trigger(el, 'toggled', [toggled, this]);
3148
- this.$update(el);
3149
3147
  }
3150
3148
  } } };
3151
3149
 
@@ -3561,7 +3559,7 @@
3561
3559
 
3562
3560
 
3563
3561
  resizeTargets() {
3564
- return [this.$el, parent(this.$el)];
3562
+ return [this.$el, getPositionedParent(this.$el) || parent(this.$el)];
3565
3563
  },
3566
3564
 
3567
3565
  update: {
@@ -6826,8 +6824,6 @@
6826
6824
  trigger(el, inview ? 'inview' : 'outview');
6827
6825
 
6828
6826
  state.inview = inview;
6829
-
6830
- this.$update(el);
6831
6827
  } } };
6832
6828
 
6833
6829
  var scrollspyNav = {
@@ -7875,10 +7871,10 @@
7875
7871
 
7876
7872
  const wrapIndexFn = (fn) => () => index === transitionIndex(target) ? fn() : Promise.reject();
7877
7873
 
7878
- const leaveFn = wrapIndexFn(() => {
7874
+ const leaveFn = wrapIndexFn(async () => {
7879
7875
  addClass(target, clsLeave);
7880
7876
 
7881
- return Promise.all(
7877
+ await Promise.all(
7882
7878
  getTransitionNodes(target).map(
7883
7879
  (child, i) =>
7884
7880
  new Promise((resolve) =>
@@ -7887,14 +7883,16 @@
7887
7883
  Transition.start(child, propsOut, duration / 2, 'ease').then(
7888
7884
  resolve),
7889
7885
 
7890
- i * stagger)))).
7886
+ i * stagger))));
7887
+
7891
7888
 
7892
7889
 
7893
7890
 
7894
- then(() => removeClass(target, clsLeave));
7891
+
7892
+ removeClass(target, clsLeave);
7895
7893
  });
7896
7894
 
7897
- const enterFn = wrapIndexFn(() => {
7895
+ const enterFn = wrapIndexFn(async () => {
7898
7896
  const oldHeight = height(target);
7899
7897
 
7900
7898
  addClass(target, clsEnter);
@@ -7903,53 +7901,42 @@
7903
7901
  css(children(target), { opacity: 0 });
7904
7902
 
7905
7903
  // Ensure UIkit updates have propagated
7906
- return new Promise((resolve) =>
7907
- requestAnimationFrame(() => {
7908
- const nodes = children(target);
7909
- const newHeight = height(target);
7910
-
7911
- // Ensure Grid cells do not stretch when height is applied
7912
- css(target, 'alignContent', 'flex-start');
7913
- height(target, oldHeight);
7914
-
7915
- const transitionNodes = getTransitionNodes(target);
7916
- css(nodes, propsOut);
7917
-
7918
- const transitions = transitionNodes.map(
7919
- (child, i) =>
7920
- new Promise((resolve) =>
7921
- setTimeout(
7922
- () =>
7923
- Transition.start(child, propsIn, duration / 2, 'ease').then(
7924
- resolve),
7925
-
7926
- i * stagger)));
7904
+ await awaitFrame$1();
7927
7905
 
7906
+ const nodes = children(target);
7907
+ const newHeight = height(target);
7928
7908
 
7909
+ // Ensure Grid cells do not stretch when height is applied
7910
+ css(target, 'alignContent', 'flex-start');
7911
+ height(target, oldHeight);
7929
7912
 
7913
+ const transitionNodes = getTransitionNodes(target);
7914
+ css(nodes, propsOut);
7930
7915
 
7931
- if (oldHeight !== newHeight) {
7932
- transitions.push(
7933
- Transition.start(
7934
- target,
7935
- { height: newHeight },
7936
- duration / 2 + transitionNodes.length * stagger,
7937
- 'ease'));
7916
+ const transitions = transitionNodes.map(async (child, i) => {
7917
+ await awaitTimeout(i * stagger);
7918
+ await Transition.start(child, propsIn, duration / 2, 'ease');
7919
+ });
7938
7920
 
7921
+ if (oldHeight !== newHeight) {
7922
+ transitions.push(
7923
+ Transition.start(
7924
+ target,
7925
+ { height: newHeight },
7926
+ duration / 2 + transitionNodes.length * stagger,
7927
+ 'ease'));
7939
7928
 
7940
- }
7941
7929
 
7942
- Promise.all(transitions).then(() => {
7943
- removeClass(target, clsEnter);
7944
- if (index === transitionIndex(target)) {
7945
- css(target, { height: '', alignContent: '' });
7946
- css(nodes, { opacity: '' });
7947
- delete target.dataset.transition;
7948
- }
7949
- resolve();
7950
- });
7951
- }));
7930
+ }
7952
7931
 
7932
+ await Promise.all(transitions).then(() => {
7933
+ removeClass(target, clsEnter);
7934
+ if (index === transitionIndex(target)) {
7935
+ css(target, { height: '', alignContent: '' });
7936
+ css(nodes, { opacity: '' });
7937
+ delete target.dataset.transition;
7938
+ }
7939
+ });
7953
7940
  });
7954
7941
 
7955
7942
  return hasClass(target, clsLeave) ?
@@ -7991,63 +7978,62 @@
7991
7978
 
7992
7979
  }
7993
7980
 
7994
- function slide (action, target, duration) {
7995
- return new Promise((resolve) =>
7996
- requestAnimationFrame(() => {
7997
- let nodes = children(target);
7981
+ function awaitFrame$1() {
7982
+ return new Promise((resolve) => requestAnimationFrame(resolve));
7983
+ }
7998
7984
 
7999
- // Get current state
8000
- const currentProps = nodes.map((el) => getProps(el, true));
8001
- const targetProps = css(target, ['height', 'padding']);
7985
+ function awaitTimeout(timeout) {
7986
+ return new Promise((resolve) => setTimeout(resolve, timeout));
7987
+ }
8002
7988
 
8003
- // Cancel previous animations
8004
- Transition.cancel(target);
8005
- nodes.forEach(Transition.cancel);
8006
- reset(target);
7989
+ async function slide (action, target, duration) {
7990
+ await awaitFrame();
8007
7991
 
8008
- // Adding, sorting, removing nodes
8009
- action();
7992
+ let nodes = children(target);
8010
7993
 
8011
- // Find new nodes
8012
- nodes = nodes.concat(children(target).filter((el) => !includes(nodes, el)));
8013
-
8014
- // Wait for update to propagate
8015
- Promise.resolve().then(() => {
8016
- // Force update
8017
- fastdom.flush();
8018
-
8019
- // Get new state
8020
- const targetPropsTo = css(target, ['height', 'padding']);
8021
- const [propsTo, propsFrom] = getTransitionProps(target, nodes, currentProps);
8022
-
8023
- // Reset to previous state
8024
- nodes.forEach((el, i) => propsFrom[i] && css(el, propsFrom[i]));
8025
- css(target, { display: 'block', ...targetProps });
8026
-
8027
- // Start transitions on next frame
8028
- requestAnimationFrame(() => {
8029
- const transitions = nodes.
8030
- map(
8031
- (el, i) =>
8032
- parent(el) === target &&
8033
- Transition.start(el, propsTo[i], duration, 'ease')).
8034
-
8035
- concat(Transition.start(target, targetPropsTo, duration, 'ease'));
8036
-
8037
- Promise.all(transitions).
8038
- then(() => {
8039
- nodes.forEach(
8040
- (el, i) =>
8041
- parent(el) === target &&
8042
- css(el, 'display', propsTo[i].opacity === 0 ? 'none' : ''));
8043
-
8044
- reset(target);
8045
- }, noop).
8046
- then(resolve);
8047
- });
8048
- });
8049
- }));
7994
+ // Get current state
7995
+ const currentProps = nodes.map((el) => getProps(el, true));
7996
+ const targetProps = css(target, ['height', 'padding']);
7997
+
7998
+ // Cancel previous animations
7999
+ Transition.cancel(target);
8000
+ nodes.forEach(Transition.cancel);
8001
+ reset(target);
8002
+
8003
+ // Adding, sorting, removing nodes
8004
+ action();
8005
+
8006
+ // Find new nodes
8007
+ nodes = nodes.concat(children(target).filter((el) => !includes(nodes, el)));
8050
8008
 
8009
+ // Wait for update to propagate
8010
+ await Promise.resolve();
8011
+
8012
+ // Force update
8013
+ fastdom.flush();
8014
+
8015
+ // Get new state
8016
+ const targetPropsTo = css(target, ['height', 'padding']);
8017
+ const [propsTo, propsFrom] = getTransitionProps(target, nodes, currentProps);
8018
+
8019
+ // Reset to previous state
8020
+ nodes.forEach((el, i) => propsFrom[i] && css(el, propsFrom[i]));
8021
+ css(target, { display: 'block', ...targetProps });
8022
+
8023
+ // Start transitions on next frame
8024
+ await awaitFrame();
8025
+
8026
+ const transitions = nodes.
8027
+ map((el, i) => parent(el) === target && Transition.start(el, propsTo[i], duration, 'ease')).
8028
+ concat(Transition.start(target, targetPropsTo, duration, 'ease'));
8029
+
8030
+ await Promise.all(transitions).then(() => {
8031
+ nodes.forEach(
8032
+ (el, i) =>
8033
+ parent(el) === target && css(el, 'display', propsTo[i].opacity === 0 ? 'none' : ''));
8034
+
8035
+ reset(target);
8036
+ }, noop);
8051
8037
  }
8052
8038
 
8053
8039
  function getProps(el, opacity) {
@@ -8126,6 +8112,10 @@
8126
8112
  return { top, left, height, width, marginLeft, marginTop, transform: '' };
8127
8113
  }
8128
8114
 
8115
+ function awaitFrame() {
8116
+ return new Promise((resolve) => requestAnimationFrame(resolve));
8117
+ }
8118
+
8129
8119
  var Animate = {
8130
8120
  props: {
8131
8121
  duration: Number,
@@ -8183,7 +8173,7 @@
8183
8173
  },
8184
8174
 
8185
8175
  watch() {
8186
- this.updateState();
8176
+ this.$emit();
8187
8177
 
8188
8178
  if (this.selActive !== false) {
8189
8179
  const actives = $$(this.selActive, this.$el);
@@ -8201,7 +8191,7 @@
8201
8191
 
8202
8192
  watch(list, old) {
8203
8193
  if (old && !isEqualList(list, old)) {
8204
- this.updateState();
8194
+ this.$emit();
8205
8195
  }
8206
8196
  },
8207
8197
 
@@ -8209,6 +8199,12 @@
8209
8199
 
8210
8200
 
8211
8201
 
8202
+ update: {
8203
+ write() {
8204
+ this.setState(this.getState(), false);
8205
+ } },
8206
+
8207
+
8212
8208
  events: [
8213
8209
  {
8214
8210
  name: 'click',
@@ -8248,25 +8244,18 @@
8248
8244
 
8249
8245
  trigger(this.$el, 'beforeFilter', [this, state]);
8250
8246
 
8251
- this.toggles.forEach((el) =>
8252
- toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state)));
8253
-
8247
+ for (const el of this.toggles) {
8248
+ toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state));
8249
+ }
8254
8250
 
8255
8251
  await Promise.all(
8256
8252
  $$(this.target, this.$el).map((target) => {
8257
- const filterFn = () => {
8258
- applyState(state, target, children(target));
8259
- this.$update(this.$el);
8260
- };
8253
+ const filterFn = () => applyState(state, target, children(target));
8261
8254
  return animate ? this.animate(filterFn, target) : filterFn();
8262
8255
  }));
8263
8256
 
8264
8257
 
8265
8258
  trigger(this.$el, 'afterFilter', [this]);
8266
- },
8267
-
8268
- updateState() {
8269
- fastdom.write(() => this.setState(this.getState(), false));
8270
8259
  } } };
8271
8260
 
8272
8261
 
@@ -8898,7 +8887,7 @@
8898
8887
  },
8899
8888
 
8900
8889
  watch() {
8901
- this.$reset();
8890
+ this.$emit('resize');
8902
8891
  } },
8903
8892
 
8904
8893
 
@@ -10081,6 +10070,8 @@
10081
10070
 
10082
10071
  if (!~this.prevIndex || this.index !== index) {
10083
10072
  this.show(index);
10073
+ } else {
10074
+ this._translate(1, this.prevIndex, this.index);
10084
10075
  }
10085
10076
  },
10086
10077