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.
- package/CHANGELOG.md +0 -1
- package/dist/css/uikit-core-rtl.css +4 -6
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +4 -6
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +4 -6
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +4 -6
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1 -1
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +13 -11
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +13 -11
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +13 -11
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -1
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +16 -9
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +28 -19
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/core/icon.js +13 -6
- package/src/js/mixin/parallax.js +11 -9
- package/src/less/components/form-range.less +4 -6
- package/src/scss/components/form-range.scss +4 -6
- 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.
|
|
5
|
+
"version": "3.11.2-dev.a1707d2db",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/core/icon.js
CHANGED
|
@@ -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
|
-
|
|
75
|
+
throw 'Icon not found.';
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
return
|
|
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
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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
|
|
package/src/js/mixin/parallax.js
CHANGED
|
@@ -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
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
-
|
|
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
|
-
|
|
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 =
|
|
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.
|
|
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
|
-
/*
|
|
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.
|
|
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
|
-
/*
|
|
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();}
|
package/tests/parallax.html
CHANGED
|
@@ -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
|
|
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
|
|
61
|
-
<p uk-parallax="x: 200,-200
|
|
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
|
|