uikit 3.25.26 → 3.25.27-dev.2d5695a
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/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 +16 -12
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +16 -12
- 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 +15 -2
- 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 +15 -2
- 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 +29 -29
- 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 +31 -40
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/lightbox-panel.js +2 -13
- package/src/js/core/dropnav.js +10 -29
- package/src/js/core/switcher.js +6 -13
- package/src/js/mixin/slider-nav.js +2 -12
- package/src/js/util/keys.js +14 -0
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.25.
|
|
5
|
+
"version": "3.25.27-dev.2d5695a",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import { wrapInPicture } from '../core/img';
|
|
25
25
|
import Modal from '../mixin/modal';
|
|
26
26
|
import Slideshow from '../mixin/slideshow';
|
|
27
|
-
import {
|
|
27
|
+
import { getNavigationIndex } from '../util/keys';
|
|
28
28
|
import Animations from './internal/lightbox-animations';
|
|
29
29
|
|
|
30
30
|
export default {
|
|
@@ -212,18 +212,7 @@ export default {
|
|
|
212
212
|
return;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
if (keyCode === keyMap.LEFT) {
|
|
218
|
-
i = 'previous';
|
|
219
|
-
} else if (keyCode === keyMap.RIGHT) {
|
|
220
|
-
i = 'next';
|
|
221
|
-
} else if (keyCode === keyMap.HOME) {
|
|
222
|
-
i = 0;
|
|
223
|
-
} else if (keyCode === keyMap.END) {
|
|
224
|
-
i = 'last';
|
|
225
|
-
}
|
|
226
|
-
|
|
215
|
+
const i = getNavigationIndex(keyCode);
|
|
227
216
|
if (~i) {
|
|
228
217
|
this.show(i);
|
|
229
218
|
}
|
package/src/js/core/dropnav.js
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from 'uikit-util';
|
|
30
30
|
import Class from '../mixin/class';
|
|
31
31
|
import Container from '../mixin/container';
|
|
32
|
-
import { keyMap } from '../util/keys';
|
|
32
|
+
import { getNavigationIndex, keyMap } from '../util/keys';
|
|
33
33
|
import { active } from './drop';
|
|
34
34
|
|
|
35
35
|
export default {
|
|
@@ -200,20 +200,7 @@ export default {
|
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
const active = this.getActive();
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
if (keyCode === keyMap.HOME) {
|
|
206
|
-
next = 0;
|
|
207
|
-
} else if (keyCode === keyMap.END) {
|
|
208
|
-
next = 'last';
|
|
209
|
-
} else if (keyCode === keyMap.UP) {
|
|
210
|
-
next = 'previous';
|
|
211
|
-
} else if (keyCode === keyMap.DOWN) {
|
|
212
|
-
next = 'next';
|
|
213
|
-
} else if (keyCode === keyMap.ESC) {
|
|
214
|
-
active.targetEl?.focus();
|
|
215
|
-
}
|
|
216
|
-
|
|
203
|
+
const next = getNavigationIndex(keyCode, keyMap.UP, keyMap.DOWN);
|
|
217
204
|
if (~next) {
|
|
218
205
|
e.preventDefault();
|
|
219
206
|
const elements = $$(selFocusable, current);
|
|
@@ -227,6 +214,10 @@ export default {
|
|
|
227
214
|
return;
|
|
228
215
|
}
|
|
229
216
|
|
|
217
|
+
if (keyCode === keyMap.ESC) {
|
|
218
|
+
active.targetEl?.focus();
|
|
219
|
+
}
|
|
220
|
+
|
|
230
221
|
handleNavItemNavigation(e, this.items, active);
|
|
231
222
|
},
|
|
232
223
|
},
|
|
@@ -417,25 +408,15 @@ export default {
|
|
|
417
408
|
|
|
418
409
|
function handleNavItemNavigation(e, toggles, active) {
|
|
419
410
|
const { current, keyCode } = e;
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
if (keyCode === keyMap.HOME) {
|
|
423
|
-
next = 0;
|
|
424
|
-
} else if (keyCode === keyMap.END) {
|
|
425
|
-
next = 'last';
|
|
426
|
-
} else if (keyCode === keyMap.LEFT) {
|
|
427
|
-
next = 'previous';
|
|
428
|
-
} else if (keyCode === keyMap.RIGHT) {
|
|
429
|
-
next = 'next';
|
|
430
|
-
} else if (keyCode === keyMap.TAB) {
|
|
431
|
-
active.targetEl?.focus();
|
|
432
|
-
active.hide?.(false);
|
|
433
|
-
}
|
|
411
|
+
const next = getNavigationIndex(keyCode);
|
|
434
412
|
|
|
435
413
|
if (~next) {
|
|
436
414
|
e.preventDefault();
|
|
437
415
|
active.hide?.(false);
|
|
438
416
|
toggles[getIndex(next, toggles, toggles.indexOf(active.targetEl || current))].focus();
|
|
417
|
+
} else if (keyCode === keyMap.TAB) {
|
|
418
|
+
active.targetEl?.focus();
|
|
419
|
+
active.hide?.(false);
|
|
439
420
|
}
|
|
440
421
|
}
|
|
441
422
|
|
package/src/js/core/switcher.js
CHANGED
|
@@ -19,7 +19,7 @@ import { generateId } from '../api/instance';
|
|
|
19
19
|
import { lazyload, swipe } from '../api/observables';
|
|
20
20
|
import { maybeDefaultPreventClick } from '../mixin/event';
|
|
21
21
|
import Togglable from '../mixin/togglable';
|
|
22
|
-
import { keyMap } from '../util/keys';
|
|
22
|
+
import { getNavigationIndex, keyMap } from '../util/keys';
|
|
23
23
|
|
|
24
24
|
const selDisabled = '.uk-disabled *, .uk-disabled, [disabled]';
|
|
25
25
|
|
|
@@ -126,18 +126,11 @@ export default {
|
|
|
126
126
|
const { current, keyCode } = e;
|
|
127
127
|
const isVertical = matches(this.$el, this.selVertical);
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
keyCode
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
: (keyCode === keyMap.LEFT && !isVertical) ||
|
|
135
|
-
(keyCode === keyMap.UP && isVertical)
|
|
136
|
-
? 'previous'
|
|
137
|
-
: (keyCode === keyMap.RIGHT && !isVertical) ||
|
|
138
|
-
(keyCode === keyMap.DOWN && isVertical)
|
|
139
|
-
? 'next'
|
|
140
|
-
: -1;
|
|
129
|
+
const i = getNavigationIndex(
|
|
130
|
+
keyCode,
|
|
131
|
+
isVertical ? keyMap.UP : keyMap.LEFT,
|
|
132
|
+
isVertical ? keyMap.DOWN : keyMap.RIGHT,
|
|
133
|
+
);
|
|
141
134
|
|
|
142
135
|
if (~i) {
|
|
143
136
|
e.preventDefault();
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
toggleClass,
|
|
16
16
|
} from 'uikit-util';
|
|
17
17
|
import { generateId } from '../api/instance';
|
|
18
|
-
import { keyMap } from '../util/keys';
|
|
18
|
+
import { getNavigationIndex, keyMap } from '../util/keys';
|
|
19
19
|
import { maybeDefaultPreventClick } from './event';
|
|
20
20
|
|
|
21
21
|
export default {
|
|
@@ -175,17 +175,7 @@ export default {
|
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
|
|
179
|
-
keyCode === keyMap.HOME
|
|
180
|
-
? 0
|
|
181
|
-
: keyCode === keyMap.END
|
|
182
|
-
? 'last'
|
|
183
|
-
: keyCode === keyMap.LEFT
|
|
184
|
-
? 'previous'
|
|
185
|
-
: keyCode === keyMap.RIGHT
|
|
186
|
-
? 'next'
|
|
187
|
-
: -1;
|
|
188
|
-
|
|
178
|
+
const i = getNavigationIndex(keyCode);
|
|
189
179
|
if (~i) {
|
|
190
180
|
e.preventDefault();
|
|
191
181
|
this.show(i);
|
package/src/js/util/keys.js
CHANGED
|
@@ -10,3 +10,17 @@ export const keyMap = {
|
|
|
10
10
|
RIGHT: 39,
|
|
11
11
|
DOWN: 40,
|
|
12
12
|
};
|
|
13
|
+
|
|
14
|
+
export function getNavigationIndex(keyCode, previousKey = keyMap.LEFT, nextKey = keyMap.RIGHT) {
|
|
15
|
+
switch (keyCode) {
|
|
16
|
+
case keyMap.HOME:
|
|
17
|
+
return 0;
|
|
18
|
+
case keyMap.END:
|
|
19
|
+
return 'last';
|
|
20
|
+
case previousKey:
|
|
21
|
+
return 'previous';
|
|
22
|
+
case nextKey:
|
|
23
|
+
return 'next';
|
|
24
|
+
}
|
|
25
|
+
return -1;
|
|
26
|
+
}
|