uikit 3.15.5-dev.ec9b624fd → 3.15.6-dev.fb448ac28

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 (45) hide show
  1. package/CHANGELOG.md +9 -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 +7 -4
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +7 -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 +7 -4
  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 +7 -4
  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 +22 -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 +28 -11
  41. package/dist/js/uikit.min.js +2 -2
  42. package/package.json +6 -6
  43. package/src/js/core/scrollspy.js +3 -0
  44. package/src/js/core/switcher.js +17 -5
  45. package/src/js/mixin/slider-drag.js +7 -3
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.5-dev.ec9b624fd",
5
+ "version": "3.15.6-dev.fb448ac28",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "homepage": "https://getuikit.com",
36
36
  "devDependencies": {
37
- "@babel/core": "^7.18.10",
37
+ "@babel/core": "^7.18.13",
38
38
  "@babel/preset-env": "^7.18.10",
39
39
  "@rollup/plugin-alias": "^3.1.9",
40
40
  "@rollup/plugin-babel": "^5.3.1",
@@ -43,8 +43,8 @@
43
43
  "camelcase": "^7.0.0",
44
44
  "clean-css": "^5.3.1",
45
45
  "dateformat": "^5.0.3",
46
- "esbuild": "^0.14.53",
47
- "eslint": "^8.21.0",
46
+ "esbuild": "^0.15.5",
47
+ "eslint": "^8.22.0",
48
48
  "eslint-config-prettier": "^8.5.0",
49
49
  "fs-extra": "^10.1.0",
50
50
  "glob": "^8.0.3",
@@ -54,8 +54,8 @@
54
54
  "number-precision": "^1.5.2",
55
55
  "p-limit": "^4.0.0",
56
56
  "prettier": "^2.7.1",
57
- "rollup": "^2.77.2",
58
- "rollup-plugin-esbuild": "^4.9.1",
57
+ "rollup": "^2.78.1",
58
+ "rollup-plugin-esbuild": "^4.9.3",
59
59
  "rollup-plugin-html": "^0.2.1",
60
60
  "rollup-plugin-modify": "^3.0.0",
61
61
  "rtlcss": "^3.5.0",
@@ -151,6 +151,9 @@ export default {
151
151
  trigger(el, inview ? 'inview' : 'outview');
152
152
 
153
153
  state.inview = inview;
154
+
155
+ // change to `visibility: hidden` does not trigger observers
156
+ this.$update(el);
154
157
  },
155
158
  },
156
159
  };
@@ -12,6 +12,7 @@ import {
12
12
  getIndex,
13
13
  hasClass,
14
14
  matches,
15
+ observeMutation,
15
16
  queryAll,
16
17
  ready,
17
18
  toggleClass,
@@ -51,11 +52,22 @@ export default {
51
52
  css(connects, 'touchAction', 'pan-y pinch-zoom');
52
53
  }
53
54
 
54
- const index = this.index();
55
- this.connects.forEach((el) => {
56
- children(el).forEach((child, i) => toggleClass(child, this.cls, i === index));
57
- this.lazyload(this.$el, children(el));
58
- });
55
+ this._observer?.disconnect();
56
+ this.registerObserver(
57
+ (this._observer = observeMutation(
58
+ connects,
59
+ (records) => {
60
+ const index = this.index();
61
+ for (const { target: el } of records) {
62
+ children(el).forEach((child, i) =>
63
+ toggleClass(child, this.cls, i === index)
64
+ );
65
+ this.lazyload(this.$el, children(el));
66
+ }
67
+ },
68
+ { childList: true }
69
+ ))
70
+ );
59
71
  },
60
72
 
61
73
  immediate: true,
@@ -9,6 +9,7 @@ import {
9
9
  off,
10
10
  on,
11
11
  selInput,
12
+ toNodes,
12
13
  trigger,
13
14
  } from 'uikit-util';
14
15
 
@@ -52,7 +53,7 @@ export default {
52
53
  handler(e) {
53
54
  if (
54
55
  !this.draggable ||
55
- (!isTouch(e) && hasTextNodesOnly(e.target)) ||
56
+ (!isTouch(e) && hasSelectableText(e.target)) ||
56
57
  closest(e.target, selInput) ||
57
58
  e.button > 0 ||
58
59
  this.length < 2
@@ -221,6 +222,9 @@ export default {
221
222
  },
222
223
  };
223
224
 
224
- function hasTextNodesOnly(el) {
225
- return !el.children.length && el.childNodes.length;
225
+ function hasSelectableText(el) {
226
+ return (
227
+ css(el, 'userSelect') !== 'none' &&
228
+ toNodes(el.childNodes).some((el) => el.nodeType === 3 && el.textContent.trim())
229
+ );
226
230
  }