uikit 3.16.24 → 3.16.25-dev.931f07bf4
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/.eslintrc.json +0 -9
- package/.prettierrc.json +3 -4
- package/CHANGELOG.md +6 -0
- package/build/build.js +2 -2
- package/build/less.js +2 -2
- package/build/prefix.js +8 -7
- package/build/release.js +7 -7
- package/build/scope.js +3 -3
- package/build/scss.js +26 -16
- package/build/util.js +11 -11
- package/dist/css/uikit-core-rtl.css +6 -2
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +6 -2
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +6 -2
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +6 -2
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +2 -2
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +18 -18
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +347 -350
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +349 -352
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +6 -6
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +76 -72
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +37 -37
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +218 -224
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +37 -37
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +265 -271
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +2 -2
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +95 -95
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +2 -2
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +459 -452
- 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 +6832 -6831
- package/dist/js/uikit.min.js +1 -1
- package/package.json +8 -7
- package/src/js/api/app.js +1 -1
- package/src/js/api/boot.js +2 -2
- package/src/js/api/component.js +1 -1
- package/src/js/api/computed.js +2 -2
- package/src/js/api/events.js +2 -2
- package/src/js/api/global.js +3 -3
- package/src/js/api/hooks.js +4 -4
- package/src/js/api/instance.js +3 -3
- package/src/js/api/log.js +1 -1
- package/src/js/api/observables.js +12 -6
- package/src/js/api/observer.js +2 -2
- package/src/js/api/options.js +2 -2
- package/src/js/api/props.js +2 -2
- package/src/js/api/state.js +2 -2
- package/src/js/components/countdown.js +1 -1
- package/src/js/components/filter.js +5 -5
- package/src/js/components/internal/lightbox-animations.js +1 -1
- package/src/js/components/internal/slider-transitioner.js +6 -6
- package/src/js/components/internal/slideshow-animations.js +1 -1
- package/src/js/components/lightbox-panel.js +10 -10
- package/src/js/components/lightbox.js +2 -2
- package/src/js/components/notification.js +4 -4
- package/src/js/components/parallax.js +5 -5
- package/src/js/components/slider-parallax.js +1 -1
- package/src/js/components/slider.js +12 -12
- package/src/js/components/slideshow.js +3 -3
- package/src/js/components/sortable.js +4 -4
- package/src/js/components/tooltip.js +6 -6
- package/src/js/components/upload.js +4 -4
- package/src/js/core/accordion.js +8 -8
- package/src/js/core/alert.js +2 -2
- package/src/js/core/cover.js +1 -1
- package/src/js/core/drop.js +12 -12
- package/src/js/core/dropnav.js +7 -7
- package/src/js/core/form-custom.js +1 -1
- package/src/js/core/grid.js +9 -9
- package/src/js/core/height-match.js +2 -2
- package/src/js/core/height-viewport.js +1 -1
- package/src/js/core/icon.js +23 -23
- package/src/js/core/img.js +2 -2
- package/src/js/core/index.js +16 -14
- package/src/js/core/leader.js +2 -2
- package/src/js/core/modal.js +7 -7
- package/src/js/core/navbar.js +4 -4
- package/src/js/core/offcanvas.js +3 -3
- package/src/js/core/overflow-auto.js +3 -3
- package/src/js/core/responsive.js +3 -3
- package/src/js/core/scrollspy-nav.js +1 -1
- package/src/js/core/scrollspy.js +1 -1
- package/src/js/core/sticky.js +13 -13
- package/src/js/core/svg.js +4 -4
- package/src/js/core/switcher.js +7 -7
- package/src/js/core/tab.js +2 -2
- package/src/js/core/toggle.js +5 -5
- package/src/js/core/video.js +1 -1
- package/src/js/mixin/animate.js +1 -1
- package/src/js/mixin/i18n.js +1 -1
- package/src/js/mixin/internal/animate-fade.js +14 -14
- package/src/js/mixin/internal/animate-slide.js +1 -1
- package/src/js/mixin/internal/scroll.js +1 -1
- package/src/js/mixin/modal.js +15 -12
- package/src/js/mixin/parallax.js +2 -2
- package/src/js/mixin/position.js +2 -2
- package/src/js/mixin/slider-drag.js +1 -1
- package/src/js/mixin/slider-nav.js +8 -14
- package/src/js/mixin/slider.js +9 -9
- package/src/js/mixin/slideshow.js +1 -1
- package/src/js/mixin/togglable.js +4 -4
- package/src/js/uikit-core.js +2 -2
- package/src/js/uikit.js +2 -2
- package/src/js/util/animation.js +8 -8
- package/src/js/util/class.js +1 -1
- package/src/js/util/dimensions.js +5 -5
- package/src/js/util/dom.js +3 -3
- package/src/js/util/event.js +3 -3
- package/src/js/util/filter.js +1 -1
- package/src/js/util/lang.js +4 -4
- package/src/js/util/observer.js +2 -2
- package/src/js/util/player.js +1 -1
- package/src/js/util/position.js +5 -5
- package/src/js/util/selector.js +1 -1
- package/src/js/util/style.js +1 -1
- package/src/js/util/svg.js +2 -2
- package/src/js/util/viewport.js +6 -6
- package/src/less/components/slider.less +8 -2
- package/src/scss/components/inverse.scss +0 -1
- package/src/scss/components/slider.scss +8 -2
- package/src/scss/mixins-theme.scss +560 -552
- package/src/scss/mixins.scss +456 -448
- package/src/scss/variables-theme.scss +2 -2
- package/src/scss/variables.scss +2 -2
- package/tests/js/index.js +7 -7
- package/build/scss/inverse.scss +0 -30
package/src/js/util/class.js
CHANGED
|
@@ -11,7 +11,7 @@ export function removeClass(element, ...args) {
|
|
|
11
11
|
|
|
12
12
|
export function removeClasses(element, cls) {
|
|
13
13
|
attr(element, 'class', (value) =>
|
|
14
|
-
(value || '').replace(new RegExp(`\\b${cls}\\b\\s?`, 'g'), '')
|
|
14
|
+
(value || '').replace(new RegExp(`\\b${cls}\\b\\s?`, 'g'), ''),
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { on } from './event';
|
|
2
|
-
import { css } from './style';
|
|
3
1
|
import { $, append, remove } from './dom';
|
|
2
|
+
import { on } from './event';
|
|
4
3
|
import {
|
|
5
4
|
isDocument,
|
|
6
5
|
isElement,
|
|
@@ -14,6 +13,7 @@ import {
|
|
|
14
13
|
toWindow,
|
|
15
14
|
ucfirst,
|
|
16
15
|
} from './lang';
|
|
16
|
+
import { css } from './style';
|
|
17
17
|
|
|
18
18
|
const dirs = {
|
|
19
19
|
width: ['left', 'right'],
|
|
@@ -137,7 +137,7 @@ function dimension(prop) {
|
|
|
137
137
|
return css(
|
|
138
138
|
element,
|
|
139
139
|
prop,
|
|
140
|
-
!value && value !== 0 ? '' : +value + boxModelAdjust(element, prop) + 'px'
|
|
140
|
+
!value && value !== 0 ? '' : +value + boxModelAdjust(element, prop) + 'px',
|
|
141
141
|
);
|
|
142
142
|
}
|
|
143
143
|
};
|
|
@@ -149,7 +149,7 @@ export function boxModelAdjust(element, prop, sizing = 'border-box') {
|
|
|
149
149
|
dirs[prop].map(ucfirst),
|
|
150
150
|
(prop) =>
|
|
151
151
|
toFloat(css(element, `padding${prop}`)) +
|
|
152
|
-
toFloat(css(element, `border${prop}Width`))
|
|
152
|
+
toFloat(css(element, `border${prop}Width`)),
|
|
153
153
|
)
|
|
154
154
|
: 0;
|
|
155
155
|
}
|
|
@@ -182,7 +182,7 @@ export function toPx(value, property = 'width', element = window, offsetDim = fa
|
|
|
182
182
|
: offsetDim
|
|
183
183
|
? element[`offset${ucfirst(property)}`]
|
|
184
184
|
: dimensions(element)[property],
|
|
185
|
-
value
|
|
185
|
+
value,
|
|
186
186
|
)
|
|
187
187
|
: value;
|
|
188
188
|
});
|
package/src/js/util/dom.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { once } from './event';
|
|
2
2
|
import { parent } from './filter';
|
|
3
|
-
import { find, findAll } from './selector';
|
|
4
3
|
import { isElement, isString, isUndefined, startsWith, toArray, toNode, toNodes } from './lang';
|
|
4
|
+
import { find, findAll } from './selector';
|
|
5
5
|
|
|
6
6
|
export function ready(fn) {
|
|
7
7
|
if (document.readyState !== 'loading') {
|
|
@@ -60,8 +60,8 @@ export function wrapInner(element, structure) {
|
|
|
60
60
|
toNodes(element).map((element) =>
|
|
61
61
|
element.hasChildNodes()
|
|
62
62
|
? wrapAll(toArray(element.childNodes), structure)
|
|
63
|
-
: append(element, structure)
|
|
64
|
-
)
|
|
63
|
+
: append(element, structure),
|
|
64
|
+
),
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
|
package/src/js/util/event.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { findAll } from './selector';
|
|
2
1
|
import { closest, within } from './filter';
|
|
3
2
|
import { isArray, isFunction, isString, toNode, toNodes } from './lang';
|
|
3
|
+
import { findAll } from './selector';
|
|
4
4
|
|
|
5
5
|
export function on(...args) {
|
|
6
6
|
let [targets, types, selector, listener, useCapture = false] = getArgs(args);
|
|
@@ -48,7 +48,7 @@ export function once(...args) {
|
|
|
48
48
|
listener(e, result);
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
useCapture
|
|
51
|
+
useCapture,
|
|
52
52
|
);
|
|
53
53
|
|
|
54
54
|
return off;
|
|
@@ -56,7 +56,7 @@ export function once(...args) {
|
|
|
56
56
|
|
|
57
57
|
export function trigger(targets, event, detail) {
|
|
58
58
|
return toEventTargets(targets).every((target) =>
|
|
59
|
-
target.dispatchEvent(createEvent(event, true, true, detail))
|
|
59
|
+
target.dispatchEvent(createEvent(event, true, true, detail)),
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
62
|
|
package/src/js/util/filter.js
CHANGED
|
@@ -23,7 +23,7 @@ export function isVoidElement(element) {
|
|
|
23
23
|
|
|
24
24
|
export function isVisible(element) {
|
|
25
25
|
return toNodes(element).some(
|
|
26
|
-
(element) => element.offsetWidth || element.offsetHeight || element.getClientRects().length
|
|
26
|
+
(element) => element.offsetWidth || element.offsetHeight || element.getClientRects().length,
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
29
|
|
package/src/js/util/lang.js
CHANGED
|
@@ -11,7 +11,7 @@ export const hyphenate = memoize((str) => str.replace(hyphenateRe, '-$1').toLowe
|
|
|
11
11
|
const camelizeRe = /-(\w)/g;
|
|
12
12
|
|
|
13
13
|
export const camelize = memoize((str) =>
|
|
14
|
-
(str.charAt(0).toLowerCase() + str.slice(1)).replace(camelizeRe, (_, c) => c.toUpperCase())
|
|
14
|
+
(str.charAt(0).toLowerCase() + str.slice(1)).replace(camelizeRe, (_, c) => c.toUpperCase()),
|
|
15
15
|
);
|
|
16
16
|
|
|
17
17
|
export const ucfirst = memoize((str) => str.charAt(0).toUpperCase() + str.slice(1));
|
|
@@ -160,14 +160,14 @@ export function sortBy(array, prop) {
|
|
|
160
160
|
return array
|
|
161
161
|
.slice()
|
|
162
162
|
.sort(({ [prop]: propA = 0 }, { [prop]: propB = 0 }) =>
|
|
163
|
-
propA > propB ? 1 : propB > propA ? -1 : 0
|
|
163
|
+
propA > propB ? 1 : propB > propA ? -1 : 0,
|
|
164
164
|
);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
export function sumBy(array, iteratee) {
|
|
168
168
|
return array.reduce(
|
|
169
169
|
(sum, item) => sum + toFloat(isFunction(iteratee) ? iteratee(item) : item[iteratee]),
|
|
170
|
-
0
|
|
170
|
+
0,
|
|
171
171
|
);
|
|
172
172
|
}
|
|
173
173
|
|
|
@@ -194,7 +194,7 @@ export function intersectRect(...rects) {
|
|
|
194
194
|
([minProp, maxProp]) =>
|
|
195
195
|
Math.min(...rects.map(({ [minProp]: min }) => min)) -
|
|
196
196
|
Math.max(...rects.map(({ [maxProp]: max }) => max)) >
|
|
197
|
-
0
|
|
197
|
+
0,
|
|
198
198
|
);
|
|
199
199
|
}
|
|
200
200
|
|
package/src/js/util/observer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { inBrowser } from './env';
|
|
1
2
|
import { on } from './event';
|
|
2
3
|
import { toNodes } from './lang';
|
|
3
|
-
import { inBrowser } from './env';
|
|
4
4
|
|
|
5
5
|
export function observeIntersection(targets, cb, options = {}, { intersecting = true } = {}) {
|
|
6
6
|
const observer = new IntersectionObserver(
|
|
@@ -11,7 +11,7 @@ export function observeIntersection(targets, cb, options = {}, { intersecting =
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
: cb,
|
|
14
|
-
options
|
|
14
|
+
options,
|
|
15
15
|
);
|
|
16
16
|
for (const el of toNodes(targets)) {
|
|
17
17
|
observer.observe(el);
|
package/src/js/util/player.js
CHANGED
package/src/js/util/position.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { css } from './style';
|
|
2
|
-
import { within } from './filter';
|
|
3
1
|
import { offset } from './dimensions';
|
|
2
|
+
import { within } from './filter';
|
|
4
3
|
import { clamp, isArray, ucfirst } from './lang';
|
|
4
|
+
import { css } from './style';
|
|
5
5
|
import { offsetViewport, overflowParents } from './viewport';
|
|
6
6
|
|
|
7
7
|
const dirs = [
|
|
@@ -82,7 +82,7 @@ function getPosition(element, target, options) {
|
|
|
82
82
|
clamp(
|
|
83
83
|
clamp(position[start], viewport[start], viewport[end] - position[prop]),
|
|
84
84
|
targetDim[start] - position[prop] + elOffset[i],
|
|
85
|
-
targetDim[end] - elOffset[i]
|
|
85
|
+
targetDim[end] - elOffset[i],
|
|
86
86
|
) - position[start];
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -116,7 +116,7 @@ function attachTo(element, target, options) {
|
|
|
116
116
|
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
117
117
|
moveBy(attach.element[i], end, elOffset[prop]) +
|
|
118
118
|
+offsetBy[i],
|
|
119
|
-
i
|
|
119
|
+
i,
|
|
120
120
|
);
|
|
121
121
|
}
|
|
122
122
|
return elOffset;
|
|
@@ -145,7 +145,7 @@ function getViewport(element, target, viewportOffset, boundary, i) {
|
|
|
145
145
|
if (boundary) {
|
|
146
146
|
viewport = getIntersectionArea(
|
|
147
147
|
viewport,
|
|
148
|
-
offset(isArray(boundary) ? boundary[i] : boundary)
|
|
148
|
+
offset(isArray(boundary) ? boundary[i] : boundary),
|
|
149
149
|
);
|
|
150
150
|
}
|
|
151
151
|
|
package/src/js/util/selector.js
CHANGED
|
@@ -77,7 +77,7 @@ function _query(selector, context = document, queryFn) {
|
|
|
77
77
|
const selectorRe = /.*?[^\\](?:,|$)/g;
|
|
78
78
|
|
|
79
79
|
const splitSelector = memoize((selector) =>
|
|
80
|
-
selector.match(selectorRe).map((selector) => selector.replace(/,$/, '').trim())
|
|
80
|
+
selector.match(selectorRe).map((selector) => selector.replace(/,$/, '').trim()),
|
|
81
81
|
);
|
|
82
82
|
|
|
83
83
|
function domPath(element) {
|
package/src/js/util/style.js
CHANGED
package/src/js/util/svg.js
CHANGED
package/src/js/util/viewport.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { css } from './style';
|
|
2
|
-
import { isVisible, parents } from './filter';
|
|
3
1
|
import { offset, offsetPosition } from './dimensions';
|
|
2
|
+
import { isVisible, parents } from './filter';
|
|
4
3
|
import {
|
|
5
4
|
clamp,
|
|
6
5
|
findIndex,
|
|
@@ -11,6 +10,7 @@ import {
|
|
|
11
10
|
toWindow,
|
|
12
11
|
ucfirst,
|
|
13
12
|
} from './lang';
|
|
13
|
+
import { css } from './style';
|
|
14
14
|
|
|
15
15
|
export function isInView(element, offsetTop = 0, offsetLeft = 0) {
|
|
16
16
|
if (!isVisible(element)) {
|
|
@@ -29,7 +29,7 @@ export function isInView(element, offsetTop = 0, offsetLeft = 0) {
|
|
|
29
29
|
right: right + offsetLeft,
|
|
30
30
|
};
|
|
31
31
|
})
|
|
32
|
-
.concat(offset(element))
|
|
32
|
+
.concat(offset(element)),
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -62,7 +62,7 @@ export function scrollIntoView(element, { offset: offsetBy = 0 } = {}) {
|
|
|
62
62
|
|
|
63
63
|
return () => scrollTo(scrollElement, top - scrollTop).then(fn);
|
|
64
64
|
},
|
|
65
|
-
() => Promise.resolve()
|
|
65
|
+
() => Promise.resolve(),
|
|
66
66
|
)();
|
|
67
67
|
|
|
68
68
|
function scrollTo(element, top) {
|
|
@@ -130,8 +130,8 @@ export function scrollParents(element, scrollable = false, props = []) {
|
|
|
130
130
|
css(parent, 'overflow')
|
|
131
131
|
.split(' ')
|
|
132
132
|
.some((prop) => includes(['auto', 'scroll', ...props], prop)) &&
|
|
133
|
-
(!scrollable || parent.scrollHeight > offsetViewport(parent).height)
|
|
134
|
-
)
|
|
133
|
+
(!scrollable || parent.scrollHeight > offsetViewport(parent).height),
|
|
134
|
+
),
|
|
135
135
|
)
|
|
136
136
|
.reverse();
|
|
137
137
|
}
|
|
@@ -39,10 +39,16 @@
|
|
|
39
39
|
========================================================================== */
|
|
40
40
|
|
|
41
41
|
/*
|
|
42
|
-
* Clip child elements
|
|
42
|
+
* 1. Clip child elements
|
|
43
|
+
* 2. Prevent accidental scrolling through elements in slide getting focused
|
|
43
44
|
*/
|
|
44
45
|
|
|
45
|
-
.uk-slider-container {
|
|
46
|
+
.uk-slider-container {
|
|
47
|
+
/* 1 */
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
/* 2 */
|
|
50
|
+
overflow: clip;
|
|
51
|
+
}
|
|
46
52
|
|
|
47
53
|
/*
|
|
48
54
|
* Widen container to prevent box-shadows from clipping, `large-box-shadow`
|
|
@@ -35,10 +35,16 @@
|
|
|
35
35
|
========================================================================== */
|
|
36
36
|
|
|
37
37
|
/*
|
|
38
|
-
* Clip child elements
|
|
38
|
+
* 1. Clip child elements
|
|
39
|
+
* 2. Prevent accidental scrolling through elements in slide getting focused
|
|
39
40
|
*/
|
|
40
41
|
|
|
41
|
-
.uk-slider-container {
|
|
42
|
+
.uk-slider-container {
|
|
43
|
+
/* 1 */
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
/* 2 */
|
|
46
|
+
overflow: clip;
|
|
47
|
+
}
|
|
42
48
|
|
|
43
49
|
/*
|
|
44
50
|
* Widen container to prevent box-shadows from clipping, `large-box-shadow`
|