uikit 3.11.2-dev.93483bd3e → 3.11.2-dev.a1707d2db

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 (47) hide show
  1. package/CHANGELOG.md +0 -1
  2. package/dist/css/uikit-core-rtl.css +4 -6
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +4 -6
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +4 -6
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +4 -6
  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 +1 -1
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +1 -1
  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 +13 -11
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +13 -11
  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 +13 -11
  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 +16 -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 +28 -19
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/core/icon.js +13 -6
  44. package/src/js/mixin/parallax.js +11 -9
  45. package/src/less/components/form-range.less +4 -6
  46. package/src/scss/components/form-range.scss +4 -6
  47. package/tests/parallax.html +3 -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.11.2-dev.93483bd3e",
5
+ "version": "3.11.2-dev.a1707d2db",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -68,14 +68,14 @@ const Icon = {
68
68
  },
69
69
 
70
70
  methods: {
71
- getSvg() {
71
+ async getSvg() {
72
72
  const icon = getIcon(this.icon);
73
73
 
74
74
  if (!icon) {
75
- return Promise.reject('Icon not found.');
75
+ throw 'Icon not found.';
76
76
  }
77
77
 
78
- return Promise.resolve(icon);
78
+ return icon;
79
79
  },
80
80
  },
81
81
  };
@@ -137,9 +137,16 @@ export const Close = {
137
137
  export const Spinner = {
138
138
  extends: IconComponent,
139
139
 
140
- async connected() {
141
- const svg = await this.svg;
142
- svg && this.ratio !== 1 && css($('circle', svg), 'strokeWidth', 1 / this.ratio);
140
+ methods: {
141
+ async getSvg() {
142
+ const icon = await Icon.methods.getSvg.call(this);
143
+
144
+ if (this.ratio !== 1) {
145
+ css($('circle', icon), 'strokeWidth', 1 / this.ratio);
146
+ }
147
+
148
+ return icon;
149
+ },
143
150
  },
144
151
  };
145
152
 
@@ -275,6 +275,7 @@ function toDimensions(image) {
275
275
  function parseStops(stops, fn = toFloat) {
276
276
  const result = [];
277
277
  const { length } = stops;
278
+ let nullIndex = 0;
278
279
  for (let i = 0; i < length; i++) {
279
280
  let [value, percent] = isString(stops[i]) ? stops[i].trim().split(' ') : [stops[i]];
280
281
  value = fn(value);
@@ -296,16 +297,17 @@ function parseStops(stops, fn = toFloat) {
296
297
  }
297
298
 
298
299
  result.push([value, percent]);
299
- }
300
300
 
301
- for (let i = 1; i < result.length - 1; i++) {
302
- if (result[i][1] === null) {
303
- const nextIndex = findIndex(result.slice(i + 1), ([, percent]) => percent !== null) + 1;
304
- const percent = (result[i + nextIndex][1] - result[i - 1][1]) / (nextIndex + 1);
305
- for (let j = 0; j < nextIndex; j++) {
306
- result[i + j][1] = result[i - 1][1] + percent * (j + 1);
301
+ if (percent === null) {
302
+ nullIndex++;
303
+ } else if (nullIndex) {
304
+ const leftPercent = result[i - nullIndex - 1][1];
305
+ const p = (percent - leftPercent) / (nullIndex + 1);
306
+ for (let j = nullIndex; j > 0; j--) {
307
+ result[i - j][1] = leftPercent + p * (nullIndex - j + 1);
307
308
  }
308
- i += nextIndex;
309
+
310
+ nullIndex = 0;
309
311
  }
310
312
  }
311
313
 
@@ -326,7 +328,7 @@ function getValue(stops, percent) {
326
328
  return isNumber(start) ? start + Math.abs(start - end) * p * (start < end ? 1 : -1) : +end;
327
329
  }
328
330
 
329
- const unitRe = /^[\d-]+([^\s]+)/;
331
+ const unitRe = /^-?\d+([^\s]*)/;
330
332
  function getUnit(stops, defaultUnit) {
331
333
  for (const stop of stops) {
332
334
  const match = stop.match?.(unitRe);
@@ -65,22 +65,18 @@
65
65
 
66
66
  /*
67
67
  * Track
68
- * 1. Center thumb vertically in Webkit
69
- * 2. Safari doesn't have a focus state. Using active instead.
68
+ * 1. Safari doesn't have a focus state. Using active instead.
70
69
  */
71
70
 
72
71
  /* Webkit */
73
72
  .uk-range::-webkit-slider-runnable-track {
74
73
  height: @form-range-track-height;
75
74
  background: @form-range-track-background;
76
- /* 1 */
77
- display: flex;
78
- align-items: center;
79
75
  .hook-form-range-track();
80
76
  }
81
77
 
82
78
  .uk-range:focus::-webkit-slider-runnable-track,
83
- /* 2 */
79
+ /* 1 */
84
80
  .uk-range:active::-webkit-slider-runnable-track {
85
81
  background: @form-range-track-focus-background;
86
82
  .hook-form-range-track-focus();
@@ -108,6 +104,7 @@
108
104
  .uk-range::-webkit-slider-thumb {
109
105
  /* 1 */
110
106
  -webkit-appearance: none;
107
+ margin-top: (floor((@form-range-thumb-height / 2)) * -1);
111
108
  /* 2 */
112
109
  height: @form-range-thumb-height;
113
110
  width: @form-range-thumb-width;
@@ -123,6 +120,7 @@
123
120
  /* 2 */
124
121
  height: @form-range-thumb-height;
125
122
  width: @form-range-thumb-width;
123
+ margin-top: (floor((@form-range-thumb-height / 2)) * -1);
126
124
  border-radius: @form-range-thumb-border-radius;
127
125
  background: @form-range-thumb-background;
128
126
  .hook-form-range-thumb();
@@ -65,22 +65,18 @@ $form-range-thumb-background: $global-color !default;
65
65
 
66
66
  /*
67
67
  * Track
68
- * 1. Center thumb vertically in Webkit
69
- * 2. Safari doesn't have a focus state. Using active instead.
68
+ * 1. Safari doesn't have a focus state. Using active instead.
70
69
  */
71
70
 
72
71
  /* Webkit */
73
72
  .uk-range::-webkit-slider-runnable-track {
74
73
  height: $form-range-track-height;
75
74
  background: $form-range-track-background;
76
- /* 1 */
77
- display: flex;
78
- align-items: center;
79
75
  @if(mixin-exists(hook-form-range-track)) {@include hook-form-range-track();}
80
76
  }
81
77
 
82
78
  .uk-range:focus::-webkit-slider-runnable-track,
83
- /* 2 */
79
+ /* 1 */
84
80
  .uk-range:active::-webkit-slider-runnable-track {
85
81
  background: $form-range-track-focus-background;
86
82
  @if(mixin-exists(hook-form-range-track-focus)) {@include hook-form-range-track-focus();}
@@ -108,6 +104,7 @@ $form-range-thumb-background: $global-color !default;
108
104
  .uk-range::-webkit-slider-thumb {
109
105
  /* 1 */
110
106
  -webkit-appearance: none;
107
+ margin-top: (floor(($form-range-thumb-height * 0.5)) * -1);
111
108
  /* 2 */
112
109
  height: $form-range-thumb-height;
113
110
  width: $form-range-thumb-width;
@@ -123,6 +120,7 @@ $form-range-thumb-background: $global-color !default;
123
120
  /* 2 */
124
121
  height: $form-range-thumb-height;
125
122
  width: $form-range-thumb-width;
123
+ margin-top: (floor(($form-range-thumb-height * 0.5)) * -1);
126
124
  border-radius: $form-range-thumb-border-radius;
127
125
  background: $form-range-thumb-background;
128
126
  @if(mixin-exists(hook-form-range-thumb)) {@include hook-form-range-thumb();}
@@ -55,10 +55,10 @@
55
55
 
56
56
  <h2>Stop Positions</h2>
57
57
 
58
- <div id="test-stop-positions" class="uk-height-large uk-background-cover uk-margin uk-overflow-hidden uk-light uk-flex" style="background-image: url('images/dark.jpg');" uk-parallax="bgx: 0,200,0,200">
58
+ <div id="test-stop-positions" class="uk-height-large uk-background-cover uk-margin uk-overflow-hidden uk-light uk-flex" style="background-image: url('images/dark.jpg');" uk-parallax="bgx: 0,50 50%, 200">
59
59
  <div class="uk-width-1-2@m uk-text-center uk-margin-auto uk-margin-auto-vertical">
60
- <h1 uk-parallax="x: -200,200,-200,200; scale: 2,1 10%,2 90%,1;">Headline</h1>
61
- <p uk-parallax="x: 200,-200,200,-200; scale: 1,0 20%,1 50%,0 80%,1">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
60
+ <h1 uk-parallax="x: -200,200 20%,-200 80%,200; scale: 1,1 50%,2;">Headline</h1>
61
+ <p uk-parallax="x: 200,-200 20%,200 80%,-200; scale: 1,1 50%,2">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
62
62
  </div>
63
63
  </div>
64
64