uikit 3.25.23-dev.9fe9bc4 → 3.25.23-dev.cf3d285

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 (53) hide show
  1. package/build/build.js +1 -2
  2. package/build/scss.js +3 -5
  3. package/dist/css/uikit-core-rtl.css +1 -1
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +1 -1
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +1 -1
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +1 -1
  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 +4 -7
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +4 -7
  18. package/dist/js/components/lightbox.min.js +1 -1
  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 +6 -4
  26. package/dist/js/components/slider.min.js +1 -1
  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 +5 -3
  30. package/dist/js/components/slideshow.min.js +1 -1
  31. package/dist/js/components/sortable.js +1 -1
  32. package/dist/js/components/sortable.min.js +1 -1
  33. package/dist/js/components/tooltip.js +6 -4
  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 +1 -1
  37. package/dist/js/uikit-core.js +19 -23
  38. package/dist/js/uikit-core.min.js +1 -1
  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 +24 -26
  42. package/dist/js/uikit.min.js +1 -1
  43. package/package.json +1 -1
  44. package/src/js/api/app.js +2 -4
  45. package/src/js/api/observables.js +3 -3
  46. package/src/js/api/props.js +1 -2
  47. package/src/js/components/slider.js +1 -1
  48. package/src/js/components/tooltip.js +4 -2
  49. package/src/js/core/dropnav.js +1 -1
  50. package/src/js/core/img.js +2 -7
  51. package/src/js/core/overflow-fade.js +6 -5
  52. package/src/js/mixin/modal.js +1 -1
  53. package/src/js/util/event.js +1 -5
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.25.23-dev.9fe9bc4",
5
+ "version": "3.25.23-dev.cf3d285",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
package/src/js/api/app.js CHANGED
@@ -2,12 +2,10 @@ import * as util from 'uikit-util';
2
2
  import VERSION from 'virtual:version';
3
3
  import { init } from './state';
4
4
 
5
- const App = function (options) {
5
+ export default function App(options) {
6
6
  init(this, options);
7
- };
7
+ }
8
8
 
9
9
  App.util = util;
10
10
  App.options = {};
11
11
  App.version = VERSION;
12
-
13
- export default App;
@@ -43,9 +43,9 @@ export function lazyload(options = {}) {
43
43
  .forEach((el) => removeAttr(el, 'loading'));
44
44
  }
45
45
 
46
- entries
47
- .filter(({ isIntersecting }) => isIntersecting)
48
- .forEach(({ target }) => observer.unobserve(target));
46
+ for (const { isIntersecting, target } of entries) {
47
+ isIntersecting && observer.unobserve(target);
48
+ }
49
49
  },
50
50
  ...options,
51
51
  });
@@ -69,8 +69,7 @@ const getAttributes = memoize((id, props) => {
69
69
  const attributes = Object.keys(props);
70
70
  const filter = attributes
71
71
  .concat(id)
72
- .map((key) => [hyphenate(key), `data-${hyphenate(key)}`])
73
- .flat();
72
+ .flatMap((key) => [hyphenate(key), `data-${hyphenate(key)}`]);
74
73
  return { attributes, filter };
75
74
  });
76
75
 
@@ -302,7 +302,7 @@ export default {
302
302
  slides.add(slide);
303
303
  } while (this.length > j && currentLeft > left && currentLeft < right);
304
304
  }
305
- return Array.from(slides);
305
+ return [...slides];
306
306
  },
307
307
 
308
308
  getIndexAt(percent) {
@@ -176,8 +176,10 @@ function getAlignment(el, target, [dir, align]) {
176
176
 
177
177
  function parseProps(options) {
178
178
  const { el, id, data } = options;
179
- return ['delay', 'title'].reduce((obj, key) => ({ [key]: getData(el, key), ...obj }), {
179
+ return {
180
+ title: getData(el, 'title'),
181
+ delay: getData(el, 'delay'),
180
182
  ...parseOptions(getData(el, id), ['title']),
181
183
  ...data,
182
- });
184
+ };
183
185
  }
@@ -79,7 +79,7 @@ export default {
79
79
  dropbar =
80
80
  this._dropbar || query(dropbar, this.$el) || $(`+ .${this.clsDropbar}`, this.$el);
81
81
 
82
- return dropbar ? dropbar : (this._dropbar = $('<div>'));
82
+ return dropbar || (this._dropbar = $('<div>'));
83
83
  },
84
84
 
85
85
  dropContainer(_, $el) {
@@ -88,8 +88,7 @@ function setSrcAttrs(el, src) {
88
88
  const elements = isTag(parentNode, 'picture') ? children(parentNode) : [el];
89
89
  elements.forEach((el) => setSourceProps(el, el));
90
90
  } else if (src) {
91
- const change = !includes(el.style.backgroundImage, src);
92
- if (change) {
91
+ if (!includes(el.style.backgroundImage, src)) {
93
92
  css(el, 'backgroundImage', `url(${escape(src)})`);
94
93
  trigger(el, createEvent('load', false));
95
94
  }
@@ -145,11 +144,7 @@ function parseSources(sources) {
145
144
  sources = parseOptions(sources);
146
145
  }
147
146
 
148
- if (!isArray(sources)) {
149
- sources = [sources];
150
- }
151
-
152
- return sources.filter((source) => !isEmpty(source));
147
+ return (isArray(sources) ? sources : [sources]).filter((source) => !isEmpty(source));
153
148
  }
154
149
 
155
150
  function isImg(el) {
@@ -55,11 +55,12 @@ export default {
55
55
 
56
56
  update: {
57
57
  read() {
58
- const overflow = [];
59
- for (const prop of ['Width', 'Height']) {
60
- overflow.push(this.$el[`scroll${prop}`] - this.$el[`client${prop}`]);
61
- }
62
- return { overflow };
58
+ return {
59
+ overflow: [
60
+ this.$el.scrollWidth - this.$el.clientWidth,
61
+ this.$el.scrollHeight - this.$el.clientHeight,
62
+ ],
63
+ };
63
64
  },
64
65
 
65
66
  write({ overflow }) {
@@ -261,7 +261,7 @@ function animate(el, show, { transitionElement, _toggle }) {
261
261
  }
262
262
 
263
263
  function toMs(time) {
264
- return time ? (endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000) : 0;
264
+ return toFloat(time) * (endsWith(time, 'ms') ? 1 : 1000);
265
265
  }
266
266
 
267
267
  function preventBackgroundFocus(modal) {
@@ -60,11 +60,7 @@ export function trigger(targets, event, detail) {
60
60
  }
61
61
 
62
62
  export function createEvent(e, bubbles = true, cancelable = false, detail) {
63
- if (isString(e)) {
64
- e = new CustomEvent(e, { bubbles, cancelable, detail });
65
- }
66
-
67
- return e;
63
+ return isString(e) ? new CustomEvent(e, { bubbles, cancelable, detail }) : e;
68
64
  }
69
65
 
70
66
  function getArgs(args) {