uikit 3.15.18 → 3.15.19-dev.818a491d5

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 (48) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/css/uikit-core-rtl.css +5 -2
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +5 -2
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +5 -2
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +5 -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 +1 -1
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +1 -1
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +1 -1
  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 +9 -14
  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 +9 -14
  41. package/dist/js/uikit.min.js +2 -2
  42. package/package.json +1 -1
  43. package/src/js/core/accordion.js +6 -5
  44. package/src/js/core/svg.js +1 -1
  45. package/src/js/util/attr.js +1 -6
  46. package/src/js/util/viewport.js +1 -1
  47. package/src/less/components/sticky.less +4 -1
  48. package/src/scss/components/sticky.scss +4 -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.18",
5
+ "version": "3.15.19-dev.818a491d5",
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(() => {
@@ -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) => {
@@ -30,12 +30,7 @@ export function hasAttr(element, name) {
30
30
  }
31
31
 
32
32
  export function removeAttr(element, name) {
33
- const elements = toNodes(element);
34
- for (const attribute of name.split(' ')) {
35
- for (const element of elements) {
36
- element.removeAttribute(attribute);
37
- }
38
- }
33
+ toNodes(element).forEach((element) => element.removeAttribute(name));
39
34
  }
40
35
 
41
36
  export function data(element, attribute) {
@@ -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;
@@ -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;