uikit 3.15.19-dev.ec3157842 → 3.15.20-dev.8d21874bc

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 (54) hide show
  1. package/CHANGELOG.md +16 -2
  2. package/build/util.js +23 -21
  3. package/dist/css/uikit-core-rtl.css +6 -3
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +6 -3
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +6 -3
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +6 -3
  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 +7 -14
  16. package/dist/js/components/lightbox-panel.min.js +2 -2
  17. package/dist/js/components/lightbox.js +7 -14
  18. package/dist/js/components/lightbox.min.js +2 -2
  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 +7 -14
  26. package/dist/js/components/slider.min.js +2 -2
  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 +7 -14
  30. package/dist/js/components/slideshow.min.js +2 -2
  31. package/dist/js/components/sortable.js +1 -1
  32. package/dist/js/components/sortable.min.js +2 -2
  33. package/dist/js/components/tooltip.js +1 -1
  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 +2 -2
  37. package/dist/js/uikit-core.js +10 -9
  38. package/dist/js/uikit-core.min.js +2 -2
  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 +16 -22
  42. package/dist/js/uikit.min.js +2 -2
  43. package/package.json +1 -1
  44. package/src/js/core/accordion.js +6 -5
  45. package/src/js/core/sticky.js +2 -1
  46. package/src/js/core/svg.js +1 -1
  47. package/src/js/mixin/slider.js +5 -12
  48. package/src/js/util/viewport.js +1 -1
  49. package/src/less/components/sticky.less +4 -1
  50. package/src/less/components/utility.less +1 -1
  51. package/src/scss/components/sticky.scss +4 -1
  52. package/src/scss/components/utility.scss +1 -1
  53. package/tests/dropbar.html +1 -1
  54. package/tests/index.html +1 -1
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "uikit",
3
3
  "title": "UIkit",
4
4
  "description": "UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.",
5
- "version": "3.15.19-dev.ec3157842",
5
+ "version": "3.15.20-dev.8d21874bc",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -6,6 +6,7 @@ import {
6
6
  $$,
7
7
  attr,
8
8
  css,
9
+ dimensions,
9
10
  filter,
10
11
  getIndex,
11
12
  hasClass,
@@ -169,10 +170,10 @@ async function transition(el, show, { content, duration, velocity, transition })
169
170
  await Transition.cancel(wrapper);
170
171
  hide(content, false);
171
172
 
172
- const endHeight = sumBy(
173
- ['height', 'paddingTop', 'paddingBottom', 'marginTop', 'marginBottom'],
174
- (prop) => css(content, prop)
175
- );
173
+ const endHeight =
174
+ sumBy(['marginTop', 'marginBottom'], (prop) => css(content, prop)) +
175
+ dimensions(content).height;
176
+
176
177
  const percent = currentHeight / endHeight;
177
178
  duration = (velocity * endHeight + duration) * (show ? 1 - percent : percent);
178
179
  css(wrapper, 'height', currentHeight);
@@ -188,7 +189,7 @@ async function transition(el, show, { content, duration, velocity, transition })
188
189
  }
189
190
 
190
191
  function keepScrollPosition(el) {
191
- const scrollParent = scrollParents(el)[0];
192
+ const [scrollParent] = scrollParents(el, /auto|scroll/, true);
192
193
  let frame;
193
194
  (function scroll() {
194
195
  frame = requestAnimationFrame(() => {
@@ -217,7 +217,8 @@ export default {
217
217
  Math.min(
218
218
  maxScrollHeight,
219
219
  parseProp('!*', this.$el, 0, true) - elHeight - offset + overflow
220
- );
220
+ ) &&
221
+ css(parent(this.$el), 'overflowY') === 'visible';
221
222
 
222
223
  return {
223
224
  start,
@@ -65,7 +65,7 @@ export default {
65
65
 
66
66
  if (this.strokeAnimation) {
67
67
  this.svg.then((el) => {
68
- if (this._connected) {
68
+ if (this._connected && el) {
69
69
  applyAnimation(el);
70
70
  this.registerObserver(
71
71
  observeIntersection(el, (records, observer) => {
@@ -97,7 +97,7 @@ export default {
97
97
 
98
98
  if (!force && stack.length > 1) {
99
99
  if (stack.length === 2) {
100
- this._transitioner.forward(Math.min(this.duration, 200));
100
+ this._transitioner?.forward(Math.min(this.duration, 200));
101
101
  }
102
102
 
103
103
  return;
@@ -130,17 +130,10 @@ export default {
130
130
  prev && trigger(prev, 'itemhidden', [this]);
131
131
  trigger(next, 'itemshown', [this]);
132
132
 
133
- return new Promise((resolve) => {
134
- requestAnimationFrame(() => {
135
- stack.shift();
136
- if (stack.length) {
137
- this.show(stack.shift(), true);
138
- } else {
139
- this._transitioner = null;
140
- }
141
- resolve();
142
- });
143
- });
133
+ stack.shift();
134
+ this._transitioner = null;
135
+
136
+ requestAnimationFrame(() => stack.length && this.show(stack.shift(), true));
144
137
  });
145
138
 
146
139
  prev && trigger(prev, 'itemhide', [this]);
@@ -25,7 +25,7 @@ export function isInView(element, offsetTop = 0, offsetLeft = 0) {
25
25
  }
26
26
 
27
27
  export function scrollIntoView(element, { offset: offsetBy = 0 } = {}) {
28
- const parents = isVisible(element) ? scrollParents(element) : [];
28
+ const parents = isVisible(element) ? scrollParents(element, /auto|scroll|hidden/) : [];
29
29
  return parents.reduce(
30
30
  (fn, scrollElement, i) => {
31
31
  const { scrollTop, scrollHeight, offsetHeight } = scrollElement;
@@ -25,6 +25,8 @@
25
25
 
26
26
  /*
27
27
  * 1. Create position context so it's t the same like when fixed.
28
+ * 2. Create stacking context already when not sticky to have the same context
29
+ * for position set to `sticky` and `relative`
28
30
  * 2. More robust if padding and border are used and the sticky height is transitioned
29
31
  */
30
32
 
@@ -32,6 +34,8 @@
32
34
  /* 1 */
33
35
  position: relative;
34
36
  /* 2 */
37
+ z-index: @sticky-z-index;
38
+ /* 3 */
35
39
  box-sizing: border-box;
36
40
  }
37
41
 
@@ -40,7 +44,6 @@
40
44
  */
41
45
 
42
46
  .uk-sticky-fixed {
43
- z-index: @sticky-z-index;
44
47
  margin: 0 !important;
45
48
  /* 1 */
46
49
  -webkit-backface-visibility: hidden;
@@ -268,7 +268,7 @@
268
268
  .uk-object-none { object-fit: none; }
269
269
  .uk-object-scale-down { object-fit: scale-down; }
270
270
 
271
- /*
271
+ /*
272
272
  * Position
273
273
  */
274
274
 
@@ -25,6 +25,8 @@ $sticky-reverse-animation-duration: 0.2s !default;
25
25
 
26
26
  /*
27
27
  * 1. Create position context so it's t the same like when fixed.
28
+ * 2. Create stacking context already when not sticky to have the same context
29
+ * for position set to `sticky` and `relative`
28
30
  * 2. More robust if padding and border are used and the sticky height is transitioned
29
31
  */
30
32
 
@@ -32,6 +34,8 @@ $sticky-reverse-animation-duration: 0.2s !default;
32
34
  /* 1 */
33
35
  position: relative;
34
36
  /* 2 */
37
+ z-index: $sticky-z-index;
38
+ /* 3 */
35
39
  box-sizing: border-box;
36
40
  }
37
41
 
@@ -40,7 +44,6 @@ $sticky-reverse-animation-duration: 0.2s !default;
40
44
  */
41
45
 
42
46
  .uk-sticky-fixed {
43
- z-index: $sticky-z-index;
44
47
  margin: 0 !important;
45
48
  /* 1 */
46
49
  -webkit-backface-visibility: hidden;
@@ -268,7 +268,7 @@ $dragover-box-shadow: 0 0 20px rgba(100,100,100,0.3)
268
268
  .uk-object-none { object-fit: none; }
269
269
  .uk-object-scale-down { object-fit: scale-down; }
270
270
 
271
- /*
271
+ /*
272
272
  * Position
273
273
  */
274
274
 
@@ -426,7 +426,7 @@
426
426
  <li class="uk-nav-divider"></li>
427
427
  <li><a href="#"><span class="uk-margin-small-right" uk-icon="icon: trash"></span> Item</a></li>
428
428
  </ul>
429
-
429
+
430
430
  </div>
431
431
  </li>
432
432
  </ul>
package/tests/index.html CHANGED
@@ -429,7 +429,7 @@
429
429
  <div class="uk-margin-small">
430
430
  <label class="uk-form-label" for="form-input-states">States</label>
431
431
  <input id="form-input-states" class="uk-input" type="text" placeholder=":disabled" disabled>
432
-
432
+
433
433
  </div>
434
434
 
435
435
  <div class="uk-margin-small">