uikit 3.10.1-dev.6b26facf9 → 3.10.2-dev.c8aa7eda2

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 (52) hide show
  1. package/.eslintrc.json +0 -1
  2. package/CHANGELOG.md +12 -4
  3. package/build/scss.js +4 -4
  4. package/dist/css/uikit-core-rtl.css +1 -1
  5. package/dist/css/uikit-core-rtl.min.css +1 -1
  6. package/dist/css/uikit-core.css +1 -1
  7. package/dist/css/uikit-core.min.css +1 -1
  8. package/dist/css/uikit-rtl.css +1 -1
  9. package/dist/css/uikit-rtl.min.css +1 -1
  10. package/dist/css/uikit.css +1 -1
  11. package/dist/css/uikit.min.css +1 -1
  12. package/dist/js/components/countdown.js +1 -1
  13. package/dist/js/components/countdown.min.js +1 -1
  14. package/dist/js/components/filter.js +1 -1
  15. package/dist/js/components/filter.min.js +1 -1
  16. package/dist/js/components/lightbox-panel.js +1 -1
  17. package/dist/js/components/lightbox-panel.min.js +1 -1
  18. package/dist/js/components/lightbox.js +1 -1
  19. package/dist/js/components/lightbox.min.js +1 -1
  20. package/dist/js/components/notification.js +1 -1
  21. package/dist/js/components/notification.min.js +1 -1
  22. package/dist/js/components/parallax.js +3 -3
  23. package/dist/js/components/parallax.min.js +1 -1
  24. package/dist/js/components/slider-parallax.js +4 -10
  25. package/dist/js/components/slider-parallax.min.js +1 -1
  26. package/dist/js/components/slider.js +1 -1
  27. package/dist/js/components/slider.min.js +1 -1
  28. package/dist/js/components/slideshow-parallax.js +4 -10
  29. package/dist/js/components/slideshow-parallax.min.js +1 -1
  30. package/dist/js/components/slideshow.js +1 -1
  31. package/dist/js/components/slideshow.min.js +1 -1
  32. package/dist/js/components/sortable.js +1 -1
  33. package/dist/js/components/sortable.min.js +1 -1
  34. package/dist/js/components/tooltip.js +3 -3
  35. package/dist/js/components/tooltip.min.js +1 -1
  36. package/dist/js/components/upload.js +1 -1
  37. package/dist/js/components/upload.min.js +1 -1
  38. package/dist/js/uikit-core.js +16 -17
  39. package/dist/js/uikit-core.min.js +1 -1
  40. package/dist/js/uikit-icons.js +1 -1
  41. package/dist/js/uikit-icons.min.js +1 -1
  42. package/dist/js/uikit.js +19 -26
  43. package/dist/js/uikit.min.js +1 -1
  44. package/package.json +4 -4
  45. package/src/js/api/hooks.js +6 -10
  46. package/src/js/components/slider-parallax.js +1 -7
  47. package/src/js/core/navbar.js +1 -1
  48. package/src/js/core/scrollspy.js +1 -1
  49. package/src/js/mixin/parallax.js +2 -2
  50. package/src/js/mixin/position.js +3 -3
  51. package/src/js/util/lang.js +5 -1
  52. package/tests/js/index.js +3 -8
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.10.1-dev.6b26facf9",
5
+ "version": "3.10.2-dev.c8aa7eda2",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -41,8 +41,8 @@
41
41
  "camelcase": "^6.3.0",
42
42
  "clean-css": "^5.2.2",
43
43
  "dateformat": "^5.0.2",
44
- "esbuild": "^0.14.11",
45
- "eslint": "^8.6.0",
44
+ "esbuild": "^0.14.13",
45
+ "eslint": "^8.7.0",
46
46
  "fs-extra": "^10.0.0",
47
47
  "glob": "^7.2.0",
48
48
  "inquirer": "^8.2.0",
@@ -50,7 +50,7 @@
50
50
  "minimist": "^1.2.5",
51
51
  "number-precision": "^1.5.1",
52
52
  "p-limit": "^4.0.0",
53
- "rollup": "^2.63.0",
53
+ "rollup": "^2.66.0",
54
54
  "rollup-plugin-esbuild": "^4.8.2",
55
55
  "rollup-plugin-html": "^0.2.1",
56
56
  "rollup-plugin-modify": "^3.0.0",
@@ -123,23 +123,19 @@ export default function (UIkit) {
123
123
 
124
124
  function runWatches(initial) {
125
125
 
126
- const {$options: {computed}, _computeds} = this;
126
+ const {$options: {computed}} = this;
127
+ const values = assign({}, this._computeds);
128
+ this._computeds = {};
127
129
 
128
130
  for (const key in computed) {
129
-
130
- const hasPrev = hasOwn(_computeds, key);
131
- const prev = _computeds[key];
132
-
133
- delete _computeds[key];
134
-
135
131
  const {watch, immediate} = computed[key];
136
132
  if (watch && (
137
133
  initial && immediate
138
- || hasPrev && !isEqual(prev, this[key])
134
+ || hasOwn(values, key) && !isEqual(values[key], this[key])
139
135
  )) {
140
- watch.call(this, this[key], prev);
136
+ watch.call(this, this[key], values[key]);
141
137
  }
142
-
143
138
  }
139
+
144
140
  }
145
141
  }
@@ -86,11 +86,5 @@ function getCurrentPercent(type, dir, percent) {
86
86
 
87
87
  percent /= 2;
88
88
 
89
- return !isIn(type)
90
- ? dir < 0
91
- ? percent
92
- : 1 - percent
93
- : dir < 0
94
- ? 1 - percent
95
- : percent;
89
+ return isIn(type) ^ dir < 0 ? percent : 1 - percent;
96
90
  }
@@ -28,7 +28,7 @@ export default {
28
28
 
29
29
  data: {
30
30
  dropdown: navItem,
31
- align: !isRtl ? 'left' : 'right',
31
+ align: isRtl ? 'right' : 'left',
32
32
  clsDrop: 'uk-navbar-dropdown',
33
33
  mode: undefined,
34
34
  offset: undefined,
@@ -16,7 +16,7 @@ export default {
16
16
  },
17
17
 
18
18
  data: () => ({
19
- cls: false,
19
+ cls: '',
20
20
  target: false,
21
21
  hidden: true,
22
22
  offsetTop: 0,
@@ -57,7 +57,7 @@ export default {
57
57
  } else if (startsWith(prop, 'bg')) {
58
58
 
59
59
  const attr = prop === 'bgy' ? 'height' : 'width';
60
- steps = steps.map(step => toPx(step, attr, this.$el));
60
+ steps = steps.map(step => toPx(step, attr, $el));
61
61
 
62
62
  css($el, `background-position-${prop[2]}`, '');
63
63
  bgPos = css($el, 'backgroundPosition').split(' ')[prop[2] === 'x' ? 0 : 1]; // IE 11 can't read background-position-[x|y]
@@ -91,7 +91,7 @@ export default {
91
91
  return props;
92
92
  }
93
93
 
94
- const length = getMaxPathLength(this.$el);
94
+ const length = getMaxPathLength($el);
95
95
  css($el, 'strokeDasharray', length);
96
96
 
97
97
  if (unit === '%') {
@@ -1,4 +1,4 @@
1
- import {$, flipPosition, offset as getOffset, includes, isNumeric, isRtl, positionAt, removeClasses, toggleClass} from 'uikit-util';
1
+ import {$, flipPosition, offset as getOffset, isNumeric, isRtl, positionAt, removeClasses, toggleClass} from 'uikit-util';
2
2
 
3
3
  export default {
4
4
 
@@ -10,7 +10,7 @@ export default {
10
10
  },
11
11
 
12
12
  data: {
13
- pos: `bottom-${!isRtl ? 'left' : 'right'}`,
13
+ pos: `bottom-${isRtl ? 'right' : 'left'}`,
14
14
  flip: true,
15
15
  offset: false,
16
16
  clsPos: ''
@@ -19,7 +19,7 @@ export default {
19
19
  computed: {
20
20
 
21
21
  pos({pos}) {
22
- return (pos + (!includes(pos, '-') ? '-center' : '')).split('-');
22
+ return pos.split('-').concat('center').slice(0, 2);
23
23
  },
24
24
 
25
25
  dir() {
@@ -138,7 +138,7 @@ export function toBoolean(value) {
138
138
 
139
139
  export function toNumber(value) {
140
140
  const number = Number(value);
141
- return !isNaN(number) ? number : false;
141
+ return isNaN(number) ? false : number;
142
142
  }
143
143
 
144
144
  export function toFloat(value) {
@@ -300,6 +300,10 @@ export function getIndex(i, elements, current = 0, finite = false) {
300
300
 
301
301
  const {length} = elements;
302
302
 
303
+ if (!length) {
304
+ return -1;
305
+ }
306
+
303
307
  i = isNumeric(i)
304
308
  ? toNumber(i)
305
309
  : i === 'next'
package/tests/js/index.js CHANGED
@@ -1,10 +1,5 @@
1
1
  /* global UIkit, TESTS */
2
- import {on} from '../../src/js/util/event';
3
- import {css} from '../../src/js/util/style';
4
- import {ucfirst} from '../../src/js/util/lang';
5
- import {prepend} from '../../src/js/util/dom';
6
- import {addClass, removeClass} from '../../src/js/util/class';
7
- import {fastdom} from '../../src/js/util/fastdom';
2
+ import {addClass, css, fastdom, on, prepend, removeClass, ucfirst} from 'uikit-util';
8
3
 
9
4
  const tests = TESTS;
10
5
  const storage = window.sessionStorage;
@@ -105,7 +100,7 @@ on(window, 'load', () => setTimeout(() => fastdom.write(() => {
105
100
 
106
101
  if ($inverse.value) {
107
102
 
108
- removeClass(document.querySelectorAll('*'), [
103
+ removeClass(document.querySelectorAll('*'),
109
104
  'uk-navbar-container',
110
105
  'uk-card-default',
111
106
  'uk-card-muted',
@@ -121,7 +116,7 @@ on(window, 'load', () => setTimeout(() => fastdom.write(() => {
121
116
  'uk-section-secondary',
122
117
  'uk-overlay-default',
123
118
  'uk-overlay-primary'
124
- ]);
119
+ );
125
120
 
126
121
  css(docEl, 'background', $inverse.value === 'dark' ? '#fff' : '#222');
127
122
  addClass($body, `uk-${$inverse.value}`);