uikit 3.14.0 → 3.14.1-dev.49070546c

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 (46) hide show
  1. package/CHANGELOG.md +16 -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 +19 -5
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +19 -5
  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 +2 -2
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +2 -2
  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 +2 -2
  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 +20 -6
  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 +43 -13
  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 +44 -14
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/core/accordion.js +21 -5
  44. package/src/js/mixin/parallax.js +1 -1
  45. package/src/js/mixin/position.js +1 -1
  46. package/src/js/mixin/togglable.js +16 -2
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.14.0",
5
+ "version": "3.14.1-dev.49070546c",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -28,7 +28,6 @@ export default {
28
28
  multiple: Boolean,
29
29
  toggle: String,
30
30
  content: String,
31
- transition: String,
32
31
  offset: Number,
33
32
  },
34
33
 
@@ -41,19 +40,16 @@ export default {
41
40
  clsOpen: 'uk-open',
42
41
  toggle: '> .uk-accordion-title',
43
42
  content: '> .uk-accordion-content',
44
- transition: 'ease',
45
43
  offset: 0,
46
44
  },
47
45
 
48
46
  computed: {
49
47
  items: {
50
48
  get({ targets }, $el) {
51
- return $$(targets, $el).filter((el) => $(this.content, el));
49
+ return $$(targets, $el);
52
50
  },
53
51
 
54
52
  watch(items, prev) {
55
- items.forEach((el) => hide($(this.content, el), !hasClass(el, this.clsOpen)));
56
-
57
53
  if (prev || hasClass(items, this.clsOpen)) {
58
54
  return;
59
55
  }
@@ -73,6 +69,26 @@ export default {
73
69
  toggles({ toggle }) {
74
70
  return this.items.map((item) => $(toggle, item));
75
71
  },
72
+
73
+ contents: {
74
+ get({ content }) {
75
+ return this.items.map((item) => $(content, item));
76
+ },
77
+
78
+ watch(items) {
79
+ for (const el of items) {
80
+ hide(
81
+ el,
82
+ !hasClass(
83
+ this.items.find((item) => item.contains(el)),
84
+ this.clsOpen
85
+ )
86
+ );
87
+ }
88
+ },
89
+
90
+ immediate: true,
91
+ },
76
92
  },
77
93
 
78
94
  connected() {
@@ -333,7 +333,7 @@ function getValue(stops, percent) {
333
333
  return isNumber(start) ? start + Math.abs(start - end) * p * (start < end ? 1 : -1) : +end;
334
334
  }
335
335
 
336
- const unitRe = /^-?\d+([^\s]*)/;
336
+ const unitRe = /^-?\d+(\S*)/;
337
337
  function getUnit(stops, defaultUnit) {
338
338
  for (const stop of stops) {
339
339
  const match = stop.match?.(unitRe);
@@ -60,7 +60,7 @@ export default {
60
60
  attach,
61
61
  offset,
62
62
  boundary,
63
- viewportPadding: this.viewportPadding,
63
+ viewportPadding: this.boundaryAlign ? 0 : this.viewportPadding,
64
64
  flip: this.flip,
65
65
  });
66
66
  },
@@ -24,6 +24,7 @@ export default {
24
24
  cls: Boolean,
25
25
  animation: 'list',
26
26
  duration: Number,
27
+ velocity: Number,
27
28
  origin: String,
28
29
  transition: String,
29
30
  },
@@ -32,8 +33,9 @@ export default {
32
33
  cls: false,
33
34
  animation: [false],
34
35
  duration: 200,
36
+ velocity: 0.2,
35
37
  origin: false,
36
- transition: 'linear',
38
+ transition: 'ease',
37
39
  clsEnter: 'uk-togglabe-enter',
38
40
  clsLeave: 'uk-togglabe-leave',
39
41
 
@@ -44,6 +46,7 @@ export default {
44
46
  paddingBottom: '',
45
47
  marginTop: '',
46
48
  marginBottom: '',
49
+ boxShadow: '',
47
50
  },
48
51
 
49
52
  hideProps: {
@@ -53,6 +56,7 @@ export default {
53
56
  paddingBottom: 0,
54
57
  marginTop: 0,
55
58
  marginBottom: 0,
59
+ boxShadow: 'none',
56
60
  },
57
61
  },
58
62
 
@@ -147,7 +151,15 @@ export default {
147
151
  },
148
152
  };
149
153
 
150
- export function toggleHeight({ isToggled, duration, initProps, hideProps, transition, _toggle }) {
154
+ export function toggleHeight({
155
+ isToggled,
156
+ duration,
157
+ velocity,
158
+ initProps,
159
+ hideProps,
160
+ transition,
161
+ _toggle,
162
+ }) {
151
163
  return (el, show) => {
152
164
  const inProgress = Transition.inProgress(el);
153
165
  const inner = el.hasChildNodes()
@@ -168,6 +180,8 @@ export function toggleHeight({ isToggled, duration, initProps, hideProps, transi
168
180
  fastdom.flush();
169
181
 
170
182
  const endHeight = height(el) + (inProgress ? 0 : inner);
183
+ duration = velocity * el.offsetHeight + duration;
184
+
171
185
  height(el, currentHeight);
172
186
 
173
187
  return (