uikit 3.16.24-dev.d6158da87 → 3.16.25-dev.12f581d90
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 +2 -1
- package/build/build.js +2 -2
- package/build/less.js +2 -2
- package/build/prefix.js +3 -3
- package/build/release.js +7 -7
- package/build/scope.js +3 -3
- package/build/scss.js +9 -9
- package/build/util.js +11 -11
- 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 +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 +351 -350
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +353 -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 +69 -69
- 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 +222 -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 +300 -302
- 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 +452 -449
- 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 +6837 -6836
- 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 +1 -1
- 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 +3 -3
- 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 +12 -12
- 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 -9
- 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/tests/js/index.js +7 -7
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
|
}
|
package/tests/js/index.js
CHANGED
|
@@ -47,13 +47,13 @@ const style = styles[storage[key]] || styles.theme;
|
|
|
47
47
|
document.writeln(
|
|
48
48
|
`<link rel="stylesheet" href="${
|
|
49
49
|
dir !== 'rtl' ? style.css : style.css.replace('.css', '-rtl.css')
|
|
50
|
-
}"
|
|
50
|
+
}">`,
|
|
51
51
|
);
|
|
52
52
|
|
|
53
53
|
// add javascript
|
|
54
54
|
document.writeln('<script src="../dist/js/uikit.js"></script>');
|
|
55
55
|
document.writeln(
|
|
56
|
-
`<script src="${style.icons ? style.icons : '../dist/js/uikit-icons.js'}"></script
|
|
56
|
+
`<script src="${style.icons ? style.icons : '../dist/js/uikit-icons.js'}"></script>`,
|
|
57
57
|
);
|
|
58
58
|
|
|
59
59
|
on(window, 'load', () =>
|
|
@@ -73,7 +73,7 @@ on(window, 'load', () =>
|
|
|
73
73
|
`<option value="${name}.html">${name
|
|
74
74
|
.split('-')
|
|
75
75
|
.map(ucfirst)
|
|
76
|
-
.join(' ')}</option
|
|
76
|
+
.join(' ')}</option>`,
|
|
77
77
|
)
|
|
78
78
|
.join('')}
|
|
79
79
|
</select>
|
|
@@ -92,7 +92,7 @@ on(window, 'load', () =>
|
|
|
92
92
|
<span style="margin: 5px">RTL</span>
|
|
93
93
|
</label>
|
|
94
94
|
</div>
|
|
95
|
-
|
|
95
|
+
`,
|
|
96
96
|
);
|
|
97
97
|
|
|
98
98
|
const [$tests, $styles, $inverse, $rtl] = $container.children;
|
|
@@ -139,7 +139,7 @@ on(window, 'load', () =>
|
|
|
139
139
|
'uk-section-primary',
|
|
140
140
|
'uk-section-secondary',
|
|
141
141
|
'uk-overlay-default',
|
|
142
|
-
'uk-overlay-primary'
|
|
142
|
+
'uk-overlay-primary',
|
|
143
143
|
);
|
|
144
144
|
|
|
145
145
|
addClass($$('.uk-navbar-container'), 'uk-navbar-transparent');
|
|
@@ -164,8 +164,8 @@ on(window, 'load', () =>
|
|
|
164
164
|
|
|
165
165
|
css(docEl, 'paddingTop', '');
|
|
166
166
|
}),
|
|
167
|
-
100
|
|
168
|
-
)
|
|
167
|
+
100,
|
|
168
|
+
),
|
|
169
169
|
);
|
|
170
170
|
|
|
171
171
|
css(docEl, 'paddingTop', '80px');
|