uikit 3.16.7-dev.8223e4acf → 3.16.7-dev.e91049985
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 +12 -0
- package/dist/css/uikit-core-rtl.css +24 -6
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +24 -6
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +24 -6
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +24 -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 +5 -2
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +5 -2
- 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 +5 -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 +5 -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 +43 -20
- 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 +47 -21
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/boot.js +10 -1
- package/src/js/api/watch.js +1 -1
- package/src/js/core/accordion.js +4 -0
- package/src/js/core/dropnav.js +5 -6
- package/src/js/core/navbar.js +14 -4
- package/src/js/core/sticky.js +7 -2
- package/src/js/mixin/slider-nav.js +4 -1
- package/src/js/util/fastdom.js +2 -2
- package/src/less/components/visibility.less +25 -5
- package/src/scss/components/visibility.scss +25 -5
- package/tests/navbar.html +2 -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.16.7-dev.
|
|
5
|
+
"version": "3.16.7-dev.e91049985",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/api/boot.js
CHANGED
|
@@ -4,7 +4,16 @@ import { apply, hasAttr, inBrowser, isPlainObject, startsWith, trigger } from 'u
|
|
|
4
4
|
|
|
5
5
|
export default function (App) {
|
|
6
6
|
if (inBrowser && window.MutationObserver) {
|
|
7
|
-
|
|
7
|
+
if (document.readyState === 'interactive') {
|
|
8
|
+
requestAnimationFrame(() => init(App));
|
|
9
|
+
} else {
|
|
10
|
+
new MutationObserver((records, observer) => {
|
|
11
|
+
if (document.body) {
|
|
12
|
+
init(App);
|
|
13
|
+
observer.disconnect();
|
|
14
|
+
}
|
|
15
|
+
}).observe(document.documentElement, { childList: true });
|
|
16
|
+
}
|
|
8
17
|
}
|
|
9
18
|
}
|
|
10
19
|
|
package/src/js/api/watch.js
CHANGED
package/src/js/core/accordion.js
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
$,
|
|
8
8
|
$$,
|
|
9
9
|
attr,
|
|
10
|
+
children,
|
|
10
11
|
css,
|
|
11
12
|
dimensions,
|
|
12
13
|
filter,
|
|
@@ -171,6 +172,9 @@ export default {
|
|
|
171
172
|
});
|
|
172
173
|
|
|
173
174
|
attr(content, { role: 'region', 'aria-labelledby': toggle.id });
|
|
175
|
+
if (isTag(content, 'ul')) {
|
|
176
|
+
attr(children(content), 'role', 'presentation');
|
|
177
|
+
}
|
|
174
178
|
}
|
|
175
179
|
},
|
|
176
180
|
|
package/src/js/core/dropnav.js
CHANGED
|
@@ -35,7 +35,6 @@ export default {
|
|
|
35
35
|
mixins: [Class, Container],
|
|
36
36
|
|
|
37
37
|
props: {
|
|
38
|
-
dropdown: String,
|
|
39
38
|
align: String,
|
|
40
39
|
clsDrop: String,
|
|
41
40
|
boundary: Boolean,
|
|
@@ -55,7 +54,6 @@ export default {
|
|
|
55
54
|
},
|
|
56
55
|
|
|
57
56
|
data: {
|
|
58
|
-
dropdown: '> li > a, > ul > li > a',
|
|
59
57
|
align: isRtl ? 'right' : 'left',
|
|
60
58
|
clsDrop: 'uk-dropdown',
|
|
61
59
|
clsDropbar: 'uk-dropnav-dropbar',
|
|
@@ -64,6 +62,7 @@ export default {
|
|
|
64
62
|
dropbarAnchor: false,
|
|
65
63
|
duration: 200,
|
|
66
64
|
container: false,
|
|
65
|
+
selNavItem: '> li > a, > ul > li > a',
|
|
67
66
|
},
|
|
68
67
|
|
|
69
68
|
computed: {
|
|
@@ -136,8 +135,8 @@ export default {
|
|
|
136
135
|
},
|
|
137
136
|
|
|
138
137
|
items: {
|
|
139
|
-
get({
|
|
140
|
-
return $$(
|
|
138
|
+
get({ selNavItem }, $el) {
|
|
139
|
+
return $$(selNavItem, $el);
|
|
141
140
|
},
|
|
142
141
|
|
|
143
142
|
watch(items) {
|
|
@@ -164,7 +163,7 @@ export default {
|
|
|
164
163
|
name: 'mouseover focusin',
|
|
165
164
|
|
|
166
165
|
delegate() {
|
|
167
|
-
return this.
|
|
166
|
+
return this.selNavItem;
|
|
168
167
|
},
|
|
169
168
|
|
|
170
169
|
handler({ current, type }) {
|
|
@@ -191,7 +190,7 @@ export default {
|
|
|
191
190
|
name: 'keydown',
|
|
192
191
|
|
|
193
192
|
delegate() {
|
|
194
|
-
return this.
|
|
193
|
+
return this.selNavItem;
|
|
195
194
|
},
|
|
196
195
|
|
|
197
196
|
handler(e) {
|
package/src/js/core/navbar.js
CHANGED
|
@@ -5,14 +5,15 @@ export default {
|
|
|
5
5
|
extends: Dropnav,
|
|
6
6
|
|
|
7
7
|
data: {
|
|
8
|
-
dropdown: '.uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle',
|
|
9
8
|
clsDrop: 'uk-navbar-dropdown',
|
|
9
|
+
selNavItem:
|
|
10
|
+
'.uk-navbar-nav > li > a,a.uk-navbar-item,button.uk-navbar-item,.uk-navbar-item a,.uk-navbar-item button,.uk-navbar-toggle', // Simplify with :where() selector once browser target is Safari 14+
|
|
10
11
|
},
|
|
11
12
|
|
|
12
13
|
computed: {
|
|
13
14
|
items: {
|
|
14
|
-
get({
|
|
15
|
-
return $$(
|
|
15
|
+
get({ selNavItem }, $el) {
|
|
16
|
+
return $$(selNavItem, $el);
|
|
16
17
|
},
|
|
17
18
|
|
|
18
19
|
watch(items) {
|
|
@@ -21,7 +22,16 @@ export default {
|
|
|
21
22
|
'.uk-navbar-nav, .uk-navbar-left, .uk-navbar-right',
|
|
22
23
|
this.$el
|
|
23
24
|
)) {
|
|
24
|
-
css(
|
|
25
|
+
css(
|
|
26
|
+
container,
|
|
27
|
+
'flexGrow',
|
|
28
|
+
justify
|
|
29
|
+
? $$(
|
|
30
|
+
'.uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle',
|
|
31
|
+
container
|
|
32
|
+
).length
|
|
33
|
+
: ''
|
|
34
|
+
);
|
|
25
35
|
}
|
|
26
36
|
|
|
27
37
|
attr($$('.uk-navbar-nav', this.$el), 'role', 'group');
|
package/src/js/core/sticky.js
CHANGED
|
@@ -163,7 +163,7 @@ export default {
|
|
|
163
163
|
|
|
164
164
|
const hide = this.isFixed && types.has('resize') && !sticky;
|
|
165
165
|
if (hide) {
|
|
166
|
-
|
|
166
|
+
preventTransition(this.selTarget);
|
|
167
167
|
this.hide();
|
|
168
168
|
}
|
|
169
169
|
|
|
@@ -174,7 +174,6 @@ export default {
|
|
|
174
174
|
|
|
175
175
|
if (hide) {
|
|
176
176
|
this.show();
|
|
177
|
-
requestAnimationFrame(() => css(this.selTarget, 'transition', ''));
|
|
178
177
|
}
|
|
179
178
|
|
|
180
179
|
const viewport = toPx('100vh', 'height');
|
|
@@ -359,6 +358,7 @@ export default {
|
|
|
359
358
|
this.show();
|
|
360
359
|
Animation.in(this.$el, this.animation).catch(noop);
|
|
361
360
|
} else {
|
|
361
|
+
preventTransition(this.selTarget);
|
|
362
362
|
this.show();
|
|
363
363
|
}
|
|
364
364
|
},
|
|
@@ -480,3 +480,8 @@ function coerce(value) {
|
|
|
480
480
|
function reset(el) {
|
|
481
481
|
css(el, { position: '', top: '', marginTop: '', width: '' });
|
|
482
482
|
}
|
|
483
|
+
|
|
484
|
+
function preventTransition(el) {
|
|
485
|
+
css(el, 'transition', '0s');
|
|
486
|
+
requestAnimationFrame(() => css(el, 'transition', ''));
|
|
487
|
+
}
|
package/src/js/util/fastdom.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// Component: `uk-hidden-*`
|
|
5
5
|
// `uk-visible-*`
|
|
6
6
|
// `uk-invisible`
|
|
7
|
+
// `uk-hidden-visually`
|
|
7
8
|
// `uk-visible-toggle`
|
|
8
9
|
// `uk-hidden-hover`
|
|
9
10
|
// `uk-invisible-hover`
|
|
@@ -96,28 +97,47 @@
|
|
|
96
97
|
========================================================================== */
|
|
97
98
|
|
|
98
99
|
/*
|
|
99
|
-
*
|
|
100
|
+
* Mind that `display: none`, `visibility: hidden` and `opacity: 0`
|
|
101
|
+
* remove the element from the accessibility tree and that
|
|
102
|
+
* `display: none` and `visibility: hidden` are not focusable.
|
|
103
|
+
*
|
|
100
104
|
* The target stays visible if any element within receives focus through keyboard.
|
|
101
105
|
*/
|
|
102
106
|
|
|
103
107
|
/*
|
|
104
|
-
*
|
|
108
|
+
* Remove space when hidden.
|
|
109
|
+
* 1. Remove from document flow.
|
|
110
|
+
* 2. Hide element and shrink its dimension. Can't use zero dimensions together
|
|
111
|
+
* with `overflow: hidden` it would remove it from the accessibility tree.
|
|
112
|
+
* 3. Hide the single rendered pixel.
|
|
113
|
+
* 4. Prevent text wrapping caused by `width: 1px` because it has side effects on vocalisation
|
|
114
|
+
* by screen readers and the visual tracking indicator of other assistive technologies.
|
|
105
115
|
*/
|
|
106
116
|
|
|
117
|
+
.uk-hidden-visually:not(:focus):not(:active):not(:focus-within),
|
|
107
118
|
.uk-visible-toggle:not(:hover):not(:focus) .uk-hidden-hover:not(:focus-within) {
|
|
119
|
+
/* 1 */
|
|
108
120
|
position: absolute !important;
|
|
109
|
-
|
|
110
|
-
|
|
121
|
+
/* 2 */
|
|
122
|
+
width: 1px !important;
|
|
123
|
+
height: 1px !important;
|
|
111
124
|
padding: 0 !important;
|
|
125
|
+
border: 0 !important;
|
|
112
126
|
margin: 0 !important;
|
|
113
127
|
overflow: hidden !important;
|
|
128
|
+
/* 3 */
|
|
129
|
+
clip-path: inset(50%) !important;
|
|
130
|
+
/* 4 */
|
|
131
|
+
white-space: nowrap !important;
|
|
132
|
+
|
|
114
133
|
}
|
|
115
134
|
|
|
116
135
|
/*
|
|
117
136
|
* Keep space when hidden.
|
|
137
|
+
* Hide element without shrinking its dimension.
|
|
118
138
|
*/
|
|
119
139
|
|
|
120
|
-
.uk-visible-toggle:not(:hover):not(:focus) .uk-invisible-hover:not(:focus-within) {
|
|
140
|
+
.uk-visible-toggle:not(:hover):not(:focus) .uk-invisible-hover:not(:focus-within) { clip-path: inset(50%) !important; }
|
|
121
141
|
|
|
122
142
|
|
|
123
143
|
/* Based on Hover Capability of the Pointing Device
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// Component: `uk-hidden-*`
|
|
5
5
|
// `uk-visible-*`
|
|
6
6
|
// `uk-invisible`
|
|
7
|
+
// `uk-hidden-visually`
|
|
7
8
|
// `uk-visible-toggle`
|
|
8
9
|
// `uk-hidden-hover`
|
|
9
10
|
// `uk-invisible-hover`
|
|
@@ -96,28 +97,47 @@
|
|
|
96
97
|
========================================================================== */
|
|
97
98
|
|
|
98
99
|
/*
|
|
99
|
-
*
|
|
100
|
+
* Mind that `display: none`, `visibility: hidden` and `opacity: 0`
|
|
101
|
+
* remove the element from the accessibility tree and that
|
|
102
|
+
* `display: none` and `visibility: hidden` are not focusable.
|
|
103
|
+
*
|
|
100
104
|
* The target stays visible if any element within receives focus through keyboard.
|
|
101
105
|
*/
|
|
102
106
|
|
|
103
107
|
/*
|
|
104
|
-
*
|
|
108
|
+
* Remove space when hidden.
|
|
109
|
+
* 1. Remove from document flow.
|
|
110
|
+
* 2. Hide element and shrink its dimension. Can't use zero dimensions together
|
|
111
|
+
* with `overflow: hidden` it would remove it from the accessibility tree.
|
|
112
|
+
* 3. Hide the single rendered pixel.
|
|
113
|
+
* 4. Prevent text wrapping caused by `width: 1px` because it has side effects on vocalisation
|
|
114
|
+
* by screen readers and the visual tracking indicator of other assistive technologies.
|
|
105
115
|
*/
|
|
106
116
|
|
|
117
|
+
.uk-hidden-visually:not(:focus):not(:active):not(:focus-within),
|
|
107
118
|
.uk-visible-toggle:not(:hover):not(:focus) .uk-hidden-hover:not(:focus-within) {
|
|
119
|
+
/* 1 */
|
|
108
120
|
position: absolute !important;
|
|
109
|
-
|
|
110
|
-
|
|
121
|
+
/* 2 */
|
|
122
|
+
width: 1px !important;
|
|
123
|
+
height: 1px !important;
|
|
111
124
|
padding: 0 !important;
|
|
125
|
+
border: 0 !important;
|
|
112
126
|
margin: 0 !important;
|
|
113
127
|
overflow: hidden !important;
|
|
128
|
+
/* 3 */
|
|
129
|
+
clip-path: inset(50%) !important;
|
|
130
|
+
/* 4 */
|
|
131
|
+
white-space: nowrap !important;
|
|
132
|
+
|
|
114
133
|
}
|
|
115
134
|
|
|
116
135
|
/*
|
|
117
136
|
* Keep space when hidden.
|
|
137
|
+
* Hide element without shrinking its dimension.
|
|
118
138
|
*/
|
|
119
139
|
|
|
120
|
-
.uk-visible-toggle:not(:hover):not(:focus) .uk-invisible-hover:not(:focus-within) {
|
|
140
|
+
.uk-visible-toggle:not(:hover):not(:focus) .uk-invisible-hover:not(:focus-within) { clip-path: inset(50%) !important; }
|
|
121
141
|
|
|
122
142
|
|
|
123
143
|
/* Based on Hover Capability of the Pointing Device
|
package/tests/navbar.html
CHANGED
|
@@ -1584,7 +1584,7 @@
|
|
|
1584
1584
|
|
|
1585
1585
|
<nav class="uk-navbar-container uk-margin">
|
|
1586
1586
|
<div class="uk-container">
|
|
1587
|
-
<div
|
|
1587
|
+
<div uk-navbar>
|
|
1588
1588
|
<div class="uk-navbar-left">
|
|
1589
1589
|
|
|
1590
1590
|
<ul class="uk-navbar-nav">
|
|
@@ -1629,7 +1629,7 @@
|
|
|
1629
1629
|
|
|
1630
1630
|
<nav class="uk-navbar-container uk-margin">
|
|
1631
1631
|
<div class="uk-container">
|
|
1632
|
-
<div class="uk-navbar">
|
|
1632
|
+
<div class="uk-navbar" uk-navbar>
|
|
1633
1633
|
<div class="uk-navbar-left">
|
|
1634
1634
|
|
|
1635
1635
|
<ul class="uk-navbar-nav">
|