uikit 3.25.26 → 3.25.27-dev.9e97c1f
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 +39 -0
- package/build/prefix.js +1 -1
- package/build/publishDev.js +1 -1
- package/build/scope.js +1 -1
- package/build/scss.js +1 -1
- package/build/util.js +0 -2
- package/dist/css/uikit-core-rtl.css +1327 -1204
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1327 -1204
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1339 -1223
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1339 -1223
- 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 +149 -146
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +150 -147
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/marquee.js +215 -0
- package/dist/js/components/marquee.min.js +1 -0
- package/dist/js/components/notification.js +8 -6
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +8 -12
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +8 -12
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +65 -26
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +8 -12
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +95 -103
- 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 +15 -17
- 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 +888 -337
- 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 +766 -433
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/component.js +2 -3
- package/src/js/api/observables.js +16 -4
- package/src/js/api/options.js +6 -3
- package/src/js/api/props.js +1 -3
- package/src/js/api/state.js +7 -8
- package/src/js/components/index.js +1 -0
- package/src/js/components/internal/lightbox-animations.js +7 -26
- package/src/js/components/internal/slider-preload.js +1 -0
- package/src/js/components/internal/slideshow-animations.js +15 -62
- package/src/js/components/lightbox-panel.js +123 -109
- package/src/js/components/lightbox.js +5 -8
- package/src/js/components/marquee.js +156 -0
- package/src/js/components/notification.js +7 -5
- package/src/js/core/accordion.js +62 -31
- package/src/js/core/alert.js +1 -1
- package/src/js/core/drop.js +4 -3
- package/src/js/core/dropnav.js +13 -32
- package/src/js/core/grid.js +5 -19
- package/src/js/core/margin.js +3 -0
- package/src/js/core/overflow-auto.js +5 -1
- package/src/js/core/sticky.js +1 -1
- package/src/js/core/switcher.js +18 -62
- package/src/js/core/video.js +236 -21
- package/src/js/mixin/connect.js +90 -0
- package/src/js/mixin/internal/slideshow-animations.js +5 -13
- package/src/js/mixin/internal/slideshow-transitioner.js +2 -2
- package/src/js/mixin/parallax.js +1 -4
- package/src/js/mixin/position.js +1 -1
- package/src/js/mixin/scroll-driven.js +57 -0
- package/src/js/mixin/slider-nav.js +2 -12
- package/src/js/mixin/slider-parallax.js +9 -38
- package/src/js/mixin/togglable.js +13 -14
- package/src/js/util/attr.js +7 -7
- package/src/js/util/dom.js +3 -4
- package/src/js/util/keys.js +14 -0
- package/src/js/util/lang.js +2 -2
- package/src/js/util/player.js +4 -2
- package/src/js/util/style.js +12 -13
- package/src/js/util/viewport.js +22 -25
- package/src/less/components/_import.less +8 -3
- package/src/less/components/animation.less +1 -1
- package/src/less/components/base.less +1 -1
- package/src/less/components/button.less +1 -1
- package/src/less/components/card.less +8 -8
- package/src/less/components/dropcap.less +71 -0
- package/src/less/components/floating-shadow.less +66 -0
- package/src/less/components/form.less +15 -15
- package/src/less/components/grid.less +58 -65
- package/src/less/components/lightbox.less +2 -8
- package/src/less/components/logo.less +94 -0
- package/src/less/components/margin.less +155 -124
- package/src/less/components/marquee.less +133 -0
- package/src/less/components/modal.less +1 -4
- package/src/less/components/nav.less +1 -1
- package/src/less/components/navbar.less +1 -1
- package/src/less/components/padding.less +9 -9
- package/src/less/components/position.less +9 -4
- package/src/less/components/search.less +1 -1
- package/src/less/components/slideshow.less +1 -4
- package/src/less/components/switcher.less +5 -2
- package/src/less/components/table.less +4 -4
- package/src/less/components/text.less +10 -4
- package/src/less/components/utility.less +0 -163
- package/src/less/components/visibility.less +4 -4
- package/src/less/theme/_import.less +6 -2
- package/src/less/theme/alert.less +0 -5
- package/src/less/theme/dropcap.less +29 -0
- package/src/less/theme/floating-shadow.less +20 -0
- package/src/less/theme/logo.less +29 -0
- package/src/less/theme/marquee.less +14 -0
- package/src/less/theme/thumbnav.less +1 -4
- package/src/less/theme/utility.less +0 -32
- package/src/scss/components/_import.scss +8 -3
- package/src/scss/components/animation.scss +1 -1
- package/src/scss/components/base.scss +1 -1
- package/src/scss/components/button.scss +1 -1
- package/src/scss/components/card.scss +8 -8
- package/src/scss/components/dropcap.scss +63 -0
- package/src/scss/components/floating-shadow.scss +63 -0
- package/src/scss/components/form.scss +14 -14
- package/src/scss/components/grid.scss +57 -64
- package/src/scss/components/lightbox.scss +2 -8
- package/src/scss/components/logo.scss +75 -0
- package/src/scss/components/margin.scss +155 -124
- package/src/scss/components/marquee.scss +136 -0
- package/src/scss/components/modal.scss +1 -4
- package/src/scss/components/nav.scss +1 -1
- package/src/scss/components/navbar.scss +1 -1
- package/src/scss/components/padding.scss +9 -9
- package/src/scss/components/position.scss +9 -4
- package/src/scss/components/search.scss +1 -1
- package/src/scss/components/slideshow.scss +1 -4
- package/src/scss/components/switcher.scss +5 -2
- package/src/scss/components/table.scss +4 -4
- package/src/scss/components/text.scss +10 -4
- package/src/scss/components/utility.scss +0 -129
- package/src/scss/components/visibility.scss +4 -4
- package/src/scss/mixins-theme.scss +44 -43
- package/src/scss/mixins.scss +40 -31
- package/src/scss/variables-theme.scss +14 -14
- package/src/scss/variables.scss +14 -14
- package/tests/accordion.html +77 -10
- package/tests/alert.html +1 -1
- package/tests/align.html +5 -5
- package/tests/animation.html +4 -4
- package/tests/article.html +7 -7
- package/tests/background.html +2 -2
- package/tests/badge.html +1 -1
- package/tests/base.html +2 -2
- package/tests/button.html +1 -1
- package/tests/card.html +15 -15
- package/tests/close.html +2 -2
- package/tests/comment.html +9 -9
- package/tests/container.html +2 -2
- package/tests/countdown.html +21 -21
- package/tests/cover.html +3 -3
- package/tests/description-list.html +1 -1
- package/tests/divider.html +3 -3
- package/tests/dotnav.html +1 -1
- package/tests/drop.html +7 -7
- package/tests/dropbar.html +5 -5
- package/tests/dropcap.html +26 -0
- package/tests/dropdown.html +1 -1
- package/tests/dropnav.html +18 -18
- package/tests/filter.html +3 -3
- package/tests/floating-shadow.html +44 -0
- package/tests/form.html +14 -14
- package/tests/grid.html +41 -47
- package/tests/heading.html +2 -2
- package/tests/height-viewport.html +4 -4
- package/tests/height.html +5 -5
- package/tests/icon.html +8 -8
- package/tests/image.html +6 -6
- package/tests/index.html +13 -13
- package/tests/js/index.js +1 -1
- package/tests/leader.html +5 -5
- package/tests/lightbox.html +6 -6
- package/tests/link.html +1 -1
- package/tests/list.html +4 -4
- package/tests/logo.html +84 -0
- package/tests/margin.html +59 -7
- package/tests/marker.html +3 -3
- package/tests/marquee.html +617 -0
- package/tests/modal.html +3 -3
- package/tests/nav.html +5 -5
- package/tests/navbar.html +27 -27
- package/tests/notification.html +8 -2
- package/tests/offcanvas.html +12 -12
- package/tests/overlay.html +3 -3
- package/tests/padding.html +1 -1
- package/tests/pagination.html +3 -3
- package/tests/parallax.html +1 -1
- package/tests/position.html +6 -6
- package/tests/scrollspy.html +13 -13
- package/tests/search.html +5 -5
- package/tests/section.html +17 -17
- package/tests/slidenav.html +3 -3
- package/tests/slider.html +5 -5
- package/tests/slideshow.html +33 -3
- package/tests/sortable.html +15 -15
- package/tests/sticky-navbar.html +4 -4
- package/tests/sticky-parallax.html +3 -3
- package/tests/sticky.html +3 -3
- package/tests/svg.html +3 -2
- package/tests/switcher.html +7 -7
- package/tests/tab.html +5 -5
- package/tests/text.html +9 -3
- package/tests/tile.html +4 -4
- package/tests/toggle.html +1 -1
- package/tests/tooltip.html +3 -3
- package/tests/totop.html +2 -2
- package/tests/transition.html +1 -1
- package/tests/upload.html +5 -5
- package/tests/utility.html +16 -116
- package/tests/video.html +224 -24
- package/tests/visibility.html +4 -4
- package/tests/width.html +12 -12
|
@@ -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);
|
|
@@ -1,59 +1,30 @@
|
|
|
1
|
-
import { hasClass, includes,
|
|
2
|
-
import
|
|
3
|
-
import { ease } from './parallax';
|
|
1
|
+
import { hasClass, includes, trigger } from 'uikit-util';
|
|
2
|
+
import ScrollDriven from './scroll-driven';
|
|
4
3
|
|
|
5
4
|
export default {
|
|
5
|
+
mixins: [ScrollDriven],
|
|
6
|
+
|
|
6
7
|
props: {
|
|
7
8
|
parallax: Boolean,
|
|
8
|
-
parallaxTarget: Boolean,
|
|
9
|
-
parallaxStart: String,
|
|
10
|
-
parallaxEnd: String,
|
|
11
|
-
parallaxEasing: Number,
|
|
12
9
|
},
|
|
13
10
|
|
|
14
11
|
data: {
|
|
15
12
|
parallax: false,
|
|
16
|
-
parallaxTarget: false,
|
|
17
|
-
parallaxStart: 0,
|
|
18
|
-
parallaxEnd: 0,
|
|
19
|
-
parallaxEasing: 0,
|
|
20
13
|
},
|
|
21
14
|
|
|
22
|
-
observe: [
|
|
23
|
-
resize({
|
|
24
|
-
target: ({ $el, parallaxTarget }) => [$el, parallaxTarget],
|
|
25
|
-
filter: ({ parallax }) => parallax,
|
|
26
|
-
}),
|
|
27
|
-
scroll({ filter: ({ parallax }) => parallax }),
|
|
28
|
-
],
|
|
29
|
-
|
|
30
15
|
computed: {
|
|
31
|
-
|
|
32
|
-
return
|
|
16
|
+
parallaxTargetFallback() {
|
|
17
|
+
return this.list;
|
|
33
18
|
},
|
|
34
19
|
},
|
|
35
20
|
|
|
36
21
|
update: {
|
|
37
|
-
|
|
22
|
+
write({ percent }) {
|
|
38
23
|
if (!this.parallax) {
|
|
39
|
-
return
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const target = this.parallaxTarget;
|
|
43
|
-
|
|
44
|
-
if (!target) {
|
|
45
|
-
return false;
|
|
24
|
+
return;
|
|
46
25
|
}
|
|
47
26
|
|
|
48
|
-
const
|
|
49
|
-
const end = toPx(this.parallaxEnd, 'height', target, true);
|
|
50
|
-
const percent = ease(scrolledOver(target, start, end), this.parallaxEasing);
|
|
51
|
-
|
|
52
|
-
return { parallax: this.getIndexAt(percent) };
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
write({ parallax }) {
|
|
56
|
-
const [prevIndex, slidePercent] = parallax;
|
|
27
|
+
const [prevIndex, slidePercent] = this.getIndexAt(percent);
|
|
57
28
|
|
|
58
29
|
const nextIndex = this.getValidIndex(prevIndex + Math.ceil(slidePercent));
|
|
59
30
|
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
isBoolean,
|
|
10
10
|
isFunction,
|
|
11
11
|
isVisible,
|
|
12
|
+
pick,
|
|
12
13
|
removeClass,
|
|
13
14
|
startsWith,
|
|
14
15
|
toFloat,
|
|
@@ -163,20 +164,18 @@ async function toggleTransition(el, show, { animation, duration, velocity, trans
|
|
|
163
164
|
_toggle(el, true);
|
|
164
165
|
}
|
|
165
166
|
|
|
166
|
-
const prevProps =
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
].map((key) => [key, el.style[key]]),
|
|
179
|
-
);
|
|
167
|
+
const prevProps = pick(el.style, [
|
|
168
|
+
'padding',
|
|
169
|
+
'border',
|
|
170
|
+
'width',
|
|
171
|
+
'height',
|
|
172
|
+
'minWidth',
|
|
173
|
+
'minHeight',
|
|
174
|
+
'overflowY',
|
|
175
|
+
'overflowX',
|
|
176
|
+
marginProp,
|
|
177
|
+
marginStartProp,
|
|
178
|
+
]);
|
|
180
179
|
|
|
181
180
|
const dim = dimensions(el);
|
|
182
181
|
const currentMargin = toFloat(css(el, marginProp));
|
package/src/js/util/attr.js
CHANGED
|
@@ -10,13 +10,13 @@ export function attr(element, name, value) {
|
|
|
10
10
|
|
|
11
11
|
if (isUndefined(value)) {
|
|
12
12
|
return toNode(element)?.getAttribute(name);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
for (const el of toNodes(element)) {
|
|
16
|
+
if (value === null) {
|
|
17
|
+
removeAttr(el, name);
|
|
18
|
+
} else {
|
|
19
|
+
el.setAttribute(name, value);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
package/src/js/util/dom.js
CHANGED
|
@@ -68,10 +68,9 @@ export function wrapInner(element, structure) {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
export function unwrap(element) {
|
|
71
|
-
toNodes(element)
|
|
72
|
-
.
|
|
73
|
-
|
|
74
|
-
.forEach((parent) => parent.replaceWith(...parent.childNodes));
|
|
71
|
+
for (const elementParent of new Set(toNodes(element).map(parent))) {
|
|
72
|
+
elementParent.replaceWith(...elementParent.childNodes);
|
|
73
|
+
}
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
const singleTagRe = /^<(\w+)\s*\/?>(?:<\/\1>)?$/;
|
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
|
+
}
|
package/src/js/util/lang.js
CHANGED
|
@@ -178,8 +178,8 @@ export function uniqueBy(array, prop) {
|
|
|
178
178
|
|
|
179
179
|
export function pick(obj, props) {
|
|
180
180
|
const result = {};
|
|
181
|
-
for (const
|
|
182
|
-
result[
|
|
181
|
+
for (const key of props) {
|
|
182
|
+
result[key] = obj[key];
|
|
183
183
|
}
|
|
184
184
|
return result;
|
|
185
185
|
}
|
package/src/js/util/player.js
CHANGED
|
@@ -42,7 +42,9 @@ function isIFrame(el) {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
function isYoutube(el) {
|
|
45
|
-
return /\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be
|
|
45
|
+
return /\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\/.*/.test(
|
|
46
|
+
el.src,
|
|
47
|
+
);
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
function isVimeo(el) {
|
|
@@ -58,7 +60,7 @@ function post(el, cmd) {
|
|
|
58
60
|
el.contentWindow.postMessage(JSON.stringify({ event: 'command', ...cmd }), '*');
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
const stateKey =
|
|
63
|
+
const stateKey = Symbol();
|
|
62
64
|
let counter = 0;
|
|
63
65
|
function enableApi(el) {
|
|
64
66
|
if (el[stateKey]) {
|
package/src/js/util/style.js
CHANGED
|
@@ -37,23 +37,22 @@ export function css(element, property, value, priority) {
|
|
|
37
37
|
|
|
38
38
|
if (isUndefined(value)) {
|
|
39
39
|
return getComputedStyle(element).getPropertyValue(property);
|
|
40
|
-
} else {
|
|
41
|
-
element.style.setProperty(
|
|
42
|
-
property,
|
|
43
|
-
isNumeric(value) && !cssNumber[property] && !isCustomProperty(property)
|
|
44
|
-
? `${value}px`
|
|
45
|
-
: value || isNumber(value)
|
|
46
|
-
? value
|
|
47
|
-
: '',
|
|
48
|
-
priority,
|
|
49
|
-
);
|
|
50
40
|
}
|
|
41
|
+
element.style.setProperty(
|
|
42
|
+
property,
|
|
43
|
+
isNumeric(value) && !cssNumber[property] && !isCustomProperty(property)
|
|
44
|
+
? `${value}px`
|
|
45
|
+
: value || isNumber(value)
|
|
46
|
+
? value
|
|
47
|
+
: '',
|
|
48
|
+
priority,
|
|
49
|
+
);
|
|
51
50
|
} else if (isArray(property)) {
|
|
52
|
-
const
|
|
51
|
+
const values = {};
|
|
53
52
|
for (const prop of property) {
|
|
54
|
-
|
|
53
|
+
values[prop] = css(element, prop);
|
|
55
54
|
}
|
|
56
|
-
return
|
|
55
|
+
return values;
|
|
57
56
|
} else if (isObject(property)) {
|
|
58
57
|
for (const prop in property) {
|
|
59
58
|
css(element, prop, property[prop], value);
|
package/src/js/util/viewport.js
CHANGED
|
@@ -18,20 +18,18 @@ export function isInView(element, offsetTop = 0, offsetLeft = 0) {
|
|
|
18
18
|
return false;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
.concat(offset(element)),
|
|
34
|
-
);
|
|
21
|
+
const rects = overflowParents(element).map((parent) => {
|
|
22
|
+
const { top, left, bottom, right } = offsetViewport(parent);
|
|
23
|
+
|
|
24
|
+
return {
|
|
25
|
+
top: top - offsetTop,
|
|
26
|
+
left: left - offsetLeft,
|
|
27
|
+
bottom: bottom + offsetTop,
|
|
28
|
+
right: right + offsetLeft,
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
return intersectRect(...rects, offset(element));
|
|
35
33
|
}
|
|
36
34
|
|
|
37
35
|
export function scrollIntoView(element, { offset: offsetBy = 0 } = {}) {
|
|
@@ -145,17 +143,16 @@ export function scrollParents(element, scrollable = false, props = []) {
|
|
|
145
143
|
ancestors = ancestors.slice(fixedIndex);
|
|
146
144
|
}
|
|
147
145
|
|
|
148
|
-
return [
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
.reverse();
|
|
146
|
+
return [
|
|
147
|
+
scrollEl,
|
|
148
|
+
...ancestors.filter(
|
|
149
|
+
(parent) =>
|
|
150
|
+
css(parent, 'overflow')
|
|
151
|
+
.split(' ')
|
|
152
|
+
.some((prop) => includes(['auto', 'scroll', ...props], prop)) &&
|
|
153
|
+
(!scrollable || parent.scrollHeight > offsetViewport(parent).height),
|
|
154
|
+
),
|
|
155
|
+
].reverse();
|
|
159
156
|
}
|
|
160
157
|
|
|
161
158
|
export function scrollParent(...args) {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
@import "icon.less";
|
|
14
14
|
@import "form-range.less";
|
|
15
15
|
@import "form.less"; // After: Icon, Form Range
|
|
16
|
+
@import "search.less"; // After: Icon
|
|
16
17
|
@import "button.less";
|
|
17
18
|
@import "progress.less";
|
|
18
19
|
|
|
@@ -31,10 +32,11 @@
|
|
|
31
32
|
@import "placeholder.less";
|
|
32
33
|
@import "badge.less";
|
|
33
34
|
@import "label.less";
|
|
35
|
+
@import "dropcap.less";
|
|
36
|
+
@import "floating-shadow.less";
|
|
34
37
|
@import "overlay.less"; // After: Icon
|
|
35
38
|
@import "article.less";
|
|
36
39
|
@import "comment.less";
|
|
37
|
-
@import "search.less"; // After: Icon
|
|
38
40
|
|
|
39
41
|
// JavaScript
|
|
40
42
|
@import "accordion.less";
|
|
@@ -44,6 +46,7 @@
|
|
|
44
46
|
@import "modal.less"; // After: Close
|
|
45
47
|
@import "slideshow.less";
|
|
46
48
|
@import "slider.less";
|
|
49
|
+
@import "marquee.less";
|
|
47
50
|
@import "sticky.less";
|
|
48
51
|
@import "offcanvas.less";
|
|
49
52
|
@import "switcher.less";
|
|
@@ -70,8 +73,10 @@
|
|
|
70
73
|
@import "tab.less";
|
|
71
74
|
@import "slidenav.less"; // After: Icon
|
|
72
75
|
@import "dotnav.less";
|
|
76
|
+
|
|
73
77
|
@import "dropdown.less"; // After: Card, Nav
|
|
74
78
|
@import "lightbox.less"; // After: Close, Slidenav
|
|
79
|
+
@import "logo.less"; // After: Navbar
|
|
75
80
|
|
|
76
81
|
// Utilities
|
|
77
82
|
@import "animation.less";
|
|
@@ -85,9 +90,9 @@
|
|
|
85
90
|
@import "svg.less";
|
|
86
91
|
@import "utility.less";
|
|
87
92
|
@import "flex.less"; // After: Utility
|
|
88
|
-
@import "margin.less";
|
|
89
|
-
@import "padding.less";
|
|
90
93
|
@import "position.less";
|
|
94
|
+
@import "margin.less"; // After: Position
|
|
95
|
+
@import "padding.less";
|
|
91
96
|
@import "transition.less";
|
|
92
97
|
@import "visibility.less";
|
|
93
98
|
@import "inverse.less";
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
/* Toggle animation based on the State of the Parent Element
|
|
139
139
|
========================================================================== */
|
|
140
140
|
|
|
141
|
-
.uk-animation-toggle:not(:hover
|
|
141
|
+
.uk-animation-toggle:not(:hover, :focus) [class*="uk-animation-"] { animation-name: none; }
|
|
142
142
|
|
|
143
143
|
|
|
144
144
|
/* Keyframes used by animation classes
|
|
@@ -366,11 +366,11 @@
|
|
|
366
366
|
* Small
|
|
367
367
|
*/
|
|
368
368
|
|
|
369
|
-
.uk-card-small.uk-card-body,
|
|
370
|
-
.uk-card-small .uk-card-body { padding: @card-small-body-padding-vertical @card-small-body-padding-horizontal; }
|
|
369
|
+
.uk-card-small:where(.uk-card-body),
|
|
370
|
+
.uk-card-small :where(.uk-card-body) { padding: @card-small-body-padding-vertical @card-small-body-padding-horizontal; }
|
|
371
371
|
|
|
372
|
-
.uk-card-small .uk-card-header { padding: @card-small-header-padding-vertical @card-small-header-padding-horizontal; }
|
|
373
|
-
.uk-card-small .uk-card-footer { padding: @card-small-footer-padding-vertical @card-small-footer-padding-horizontal; }
|
|
372
|
+
.uk-card-small :where(.uk-card-header) { padding: @card-small-header-padding-vertical @card-small-header-padding-horizontal; }
|
|
373
|
+
.uk-card-small :where(.uk-card-footer) { padding: @card-small-footer-padding-vertical @card-small-footer-padding-horizontal; }
|
|
374
374
|
|
|
375
375
|
/*
|
|
376
376
|
* Large
|
|
@@ -379,11 +379,11 @@
|
|
|
379
379
|
/* Desktop and bigger */
|
|
380
380
|
@media (min-width: @breakpoint-large) {
|
|
381
381
|
|
|
382
|
-
.uk-card-large.uk-card-body,
|
|
383
|
-
.uk-card-large .uk-card-body { padding: @card-large-body-padding-vertical-l @card-large-body-padding-horizontal-l; }
|
|
382
|
+
.uk-card-large:where(.uk-card-body),
|
|
383
|
+
.uk-card-large :where(.uk-card-body) { padding: @card-large-body-padding-vertical-l @card-large-body-padding-horizontal-l; }
|
|
384
384
|
|
|
385
|
-
.uk-card-large .uk-card-header { padding: @card-large-header-padding-vertical-l @card-large-header-padding-horizontal-l; }
|
|
386
|
-
.uk-card-large .uk-card-footer { padding: @card-large-footer-padding-vertical-l @card-large-footer-padding-horizontal-l; }
|
|
385
|
+
.uk-card-large :where(.uk-card-header) { padding: @card-large-header-padding-vertical-l @card-large-header-padding-horizontal-l; }
|
|
386
|
+
.uk-card-large :where(.uk-card-footer) { padding: @card-large-footer-padding-vertical-l @card-large-footer-padding-horizontal-l; }
|
|
387
387
|
|
|
388
388
|
}
|
|
389
389
|
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Name: Dropcap
|
|
2
|
+
// Description: Style for the drop cap
|
|
3
|
+
//
|
|
4
|
+
// Component: `uk-dropcap`
|
|
5
|
+
//
|
|
6
|
+
// ========================================================================
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
// Variables
|
|
10
|
+
// ========================================================================
|
|
11
|
+
@dropcap-margin-right: 10px;
|
|
12
|
+
@dropcap-font-size: ((@global-line-height * 3) * 1em);
|
|
13
|
+
@dropcap-line-height: 1;
|
|
14
|
+
|
|
15
|
+
/* ========================================================================
|
|
16
|
+
Component: Dropcap
|
|
17
|
+
========================================================================== */
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* 1. Firefox doesn't apply `::first-letter` if the first letter is inside child elements
|
|
21
|
+
* https://bugzilla.mozilla.org/show_bug.cgi?id=214004
|
|
22
|
+
* 2. In Firefox, a floating `::first-letter` doesn't have a line box and there for no `line-height`
|
|
23
|
+
* https://bugzilla.mozilla.org/show_bug.cgi?id=317933
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
.uk-dropcap::first-letter,
|
|
27
|
+
/* 1 */
|
|
28
|
+
.uk-dropcap > p:first-of-type::first-letter {
|
|
29
|
+
display: block;
|
|
30
|
+
margin-right: @dropcap-margin-right;
|
|
31
|
+
float: left;
|
|
32
|
+
font-size: @dropcap-font-size;
|
|
33
|
+
line-height: @dropcap-line-height;
|
|
34
|
+
.hook-dropcap();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* 2 */
|
|
38
|
+
@-moz-document url-prefix() {
|
|
39
|
+
|
|
40
|
+
.uk-dropcap::first-letter,
|
|
41
|
+
.uk-dropcap > p:first-of-type::first-letter { margin-top: 1.1%; }
|
|
42
|
+
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
// Misc
|
|
47
|
+
// ========================================================================
|
|
48
|
+
|
|
49
|
+
.hook-dropcap-misc();
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
// Hooks
|
|
53
|
+
// ========================================================================
|
|
54
|
+
|
|
55
|
+
.hook-dropcap() {}
|
|
56
|
+
.hook-dropcap-misc() {}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
// Inverse
|
|
60
|
+
// ========================================================================
|
|
61
|
+
|
|
62
|
+
.hook-inverse () {
|
|
63
|
+
|
|
64
|
+
.uk-dropcap::first-letter,
|
|
65
|
+
.uk-dropcap p:first-of-type::first-letter {
|
|
66
|
+
.hook-inverse-dropcap();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.hook-inverse-dropcap() {}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Name: Floating Shadow
|
|
2
|
+
// Description: Component to create floating shadows
|
|
3
|
+
//
|
|
4
|
+
// Component: `uk-floating-shadow`
|
|
5
|
+
//
|
|
6
|
+
// ========================================================================
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
// Variables
|
|
10
|
+
// ========================================================================
|
|
11
|
+
|
|
12
|
+
@floating-shadow-height: 30px;
|
|
13
|
+
@floating-shadow-bottom: -@floating-shadow-height;
|
|
14
|
+
@floating-shadow-border-radius: 100%;
|
|
15
|
+
@floating-shadow-background: #444;
|
|
16
|
+
@floating-shadow-blur: 20px;
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/* ========================================================================
|
|
20
|
+
Component: Floating Shadow
|
|
21
|
+
========================================================================== */
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* 1. Set position.
|
|
25
|
+
* 2. Set style
|
|
26
|
+
* 3. Fix shadow being clipped in Safari if container is animated
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
.uk-floating-shadow {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
position: relative;
|
|
32
|
+
z-index: 0;
|
|
33
|
+
max-width: 100%;
|
|
34
|
+
vertical-align: middle;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.uk-floating-shadow::after {
|
|
38
|
+
content: "";
|
|
39
|
+
/* 1 */
|
|
40
|
+
position: absolute;
|
|
41
|
+
bottom: @floating-shadow-bottom;
|
|
42
|
+
left: 0;
|
|
43
|
+
right: 0;
|
|
44
|
+
z-index: -1;
|
|
45
|
+
/* 2 */
|
|
46
|
+
height: @floating-shadow-height;
|
|
47
|
+
border-radius: @floating-shadow-border-radius;
|
|
48
|
+
background: @floating-shadow-background;
|
|
49
|
+
filter: blur(@floating-shadow-blur);
|
|
50
|
+
/* 3 */
|
|
51
|
+
will-change: filter;
|
|
52
|
+
.hook-floating-shadow();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
// Misc
|
|
57
|
+
// ========================================================================
|
|
58
|
+
|
|
59
|
+
.hook-floating-shadow-misc();
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
// Hooks
|
|
63
|
+
// ========================================================================
|
|
64
|
+
|
|
65
|
+
.hook-floating-shadow() {}
|
|
66
|
+
.hook-floating-shadow-misc() {}
|