uikit 3.23.12 → 3.23.13-dev.e2ca1857a

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 (44) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/css/uikit-core-rtl.css +1 -1
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +1 -1
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +1 -1
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +1 -1
  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 +8 -2
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +8 -2
  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 +25 -9
  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 +25 -9
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/core/scrollspy-nav.js +18 -8
  44. package/src/js/mixin/modal.js +8 -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.23.12",
5
+ "version": "3.23.13-dev.e2ca1857a",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -4,7 +4,6 @@ import {
4
4
  getCoveringElement,
5
5
  getTargetedElement,
6
6
  hasClass,
7
- isSameSiteAnchor,
8
7
  isVisible,
9
8
  offset,
10
9
  offsetViewport,
@@ -32,7 +31,20 @@ export default {
32
31
  },
33
32
 
34
33
  computed: {
35
- links: ({ target }, $el) => $$(target, $el).filter(isSameSiteAnchor),
34
+ links: {
35
+ get({ target }, $el) {
36
+ return $$(target, $el).filter(getTargetedElement);
37
+ },
38
+ observe: () => '*',
39
+ },
40
+
41
+ targets() {
42
+ return this.links.map((el) => getTargetedElement(el));
43
+ },
44
+
45
+ elements({ closest }) {
46
+ return this.links.map((el) => el.closest(closest || '*'));
47
+ },
36
48
  },
37
49
 
38
50
  watch: {
@@ -48,9 +60,7 @@ export default {
48
60
  update: [
49
61
  {
50
62
  read() {
51
- const links = this.links.filter(getTargetedElement);
52
- const targets = links.map(getTargetedElement);
53
-
63
+ const { targets } = this;
54
64
  const { length } = targets;
55
65
 
56
66
  if (!length || !isVisible(this.$el)) {
@@ -79,11 +89,11 @@ export default {
79
89
  }
80
90
  }
81
91
 
82
- return { active, links };
92
+ return { active };
83
93
  },
84
94
 
85
- write({ active, links }) {
86
- const elements = links.map((el) => el.closest(this.closest || '*'));
95
+ write({ active }) {
96
+ const { elements } = this;
87
97
  const changed = active !== false && !hasClass(elements[active], this.cls);
88
98
 
89
99
  this.links.forEach((el) => el.blur());
@@ -22,6 +22,7 @@ import { preventBackgroundScroll } from '../util/scroll';
22
22
  import Class from './class';
23
23
  import Container from './container';
24
24
  import { maybeDefaultPreventClick } from './event';
25
+ import { storeScrollPosition } from './position';
25
26
  import Togglable from './togglable';
26
27
 
27
28
  const active = [];
@@ -193,7 +194,13 @@ export default {
193
194
  if (!active.some((modal) => modal.clsPage === this.clsPage)) {
194
195
  removeClass(document.documentElement, this.clsPage);
195
196
 
196
- queueMicrotask(() => isFocusable(target) && target.focus());
197
+ queueMicrotask(() => {
198
+ if (isFocusable(target)) {
199
+ const restoreScrollPosition = storeScrollPosition(target);
200
+ target.focus();
201
+ restoreScrollPosition();
202
+ }
203
+ });
197
204
  }
198
205
 
199
206
  setAriaExpanded(target, false);