uikit 3.18.4-dev.ae16f4de2 → 3.18.4-dev.b116fc18d
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 +1 -1
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- 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 +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +7 -10
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- 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 +2 -2
- 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 +8 -11
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/slider.js +7 -9
- package/tests/slider.html +5 -10
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.18.4-dev.
|
|
5
|
+
"version": "3.18.4-dev.b116fc18d",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
getIndex,
|
|
12
12
|
hasOwn,
|
|
13
13
|
includes,
|
|
14
|
+
isNumeric,
|
|
14
15
|
isVisible,
|
|
15
16
|
last,
|
|
16
17
|
selFocusable,
|
|
@@ -33,7 +34,7 @@ export default {
|
|
|
33
34
|
props: {
|
|
34
35
|
center: Boolean,
|
|
35
36
|
sets: Boolean,
|
|
36
|
-
|
|
37
|
+
focus: String,
|
|
37
38
|
},
|
|
38
39
|
|
|
39
40
|
data: {
|
|
@@ -43,7 +44,7 @@ export default {
|
|
|
43
44
|
selList: '.uk-slider-items',
|
|
44
45
|
selNav: '.uk-slider-nav',
|
|
45
46
|
clsContainer: 'uk-slider-container',
|
|
46
|
-
|
|
47
|
+
focus: 'all',
|
|
47
48
|
Transitioner,
|
|
48
49
|
},
|
|
49
50
|
|
|
@@ -237,14 +238,11 @@ export default {
|
|
|
237
238
|
},
|
|
238
239
|
|
|
239
240
|
updateActiveClasses(currentIndex = this.index) {
|
|
240
|
-
let actives = this._getTransitioner(
|
|
241
|
+
let actives = this._getTransitioner().getActives();
|
|
241
242
|
|
|
242
|
-
if (this.
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
index += Math.ceil(actives.length / 2) - 1;
|
|
246
|
-
}
|
|
247
|
-
actives = [this.slides[this.getValidIndex(index)]];
|
|
243
|
+
if (isNumeric(this.focus)) {
|
|
244
|
+
const focus = Math.min(actives.length - 1, Number(this.focus));
|
|
245
|
+
actives = [this.slides[this.getValidIndex(currentIndex + focus)]];
|
|
248
246
|
}
|
|
249
247
|
|
|
250
248
|
const activeClasses = [
|
package/tests/slider.html
CHANGED
|
@@ -41,11 +41,6 @@
|
|
|
41
41
|
<option value="0">Single</option>
|
|
42
42
|
<option value="1">Sets</option>
|
|
43
43
|
</select>
|
|
44
|
-
<select id="js-active-switcher" class="uk-select uk-form-width-small" aria-label="Active switcher">
|
|
45
|
-
<option value="">All</option>
|
|
46
|
-
<option value="first">First</option>
|
|
47
|
-
<option value="center">Center</option>
|
|
48
|
-
</select>
|
|
49
44
|
</div>
|
|
50
45
|
|
|
51
46
|
<h2>Content Widths</h2>
|
|
@@ -583,10 +578,10 @@
|
|
|
583
578
|
<td>Slider item to show. 0 based index.</td>
|
|
584
579
|
</tr>
|
|
585
580
|
<tr>
|
|
586
|
-
<td><code>
|
|
587
|
-
<td>String</td>
|
|
588
|
-
<td>all</td>
|
|
589
|
-
<td>Slider item
|
|
581
|
+
<td><code>focus</code></td>
|
|
582
|
+
<td>String, Number</td>
|
|
583
|
+
<td>'all'</td>
|
|
584
|
+
<td>Slider item (0 based index) or all visible items (all) to apply the activated class to.</td>
|
|
590
585
|
</tr>
|
|
591
586
|
<tr>
|
|
592
587
|
<td><code>pause-on-hover</code></td>
|
|
@@ -657,7 +652,7 @@
|
|
|
657
652
|
<script>
|
|
658
653
|
|
|
659
654
|
const {attr, $$, on} = UIkit.util;
|
|
660
|
-
for (const attribute of ['finite', 'center', 'sets'
|
|
655
|
+
for (const attribute of ['finite', 'center', 'sets']) {
|
|
661
656
|
on(`#js-${attribute}-switcher`, 'change', e =>
|
|
662
657
|
attr($$('[uk-slider]'), attribute, e.target.value)
|
|
663
658
|
);
|