uikit 3.21.6-dev.de7455236 → 3.21.7-dev.b9cd769db
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 +9 -0
- 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 +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1 -1
- 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 +7 -8
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +7 -8
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +7 -8
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +7 -8
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +7 -8
- 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 +22 -22
- 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 +22 -22
- package/dist/js/uikit.min.js +1 -1
- package/package.json +10 -10
- package/src/js/api/component.js +2 -2
- package/src/js/core/drop.js +5 -1
- package/src/js/core/modal.js +1 -2
- package/src/js/mixin/position.js +1 -1
- package/src/js/util/dom.js +1 -2
- package/src/js/util/selector.js +7 -7
- package/src/js/util/viewport.js +17 -21
- package/tests/js/index.js +1 -1
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.21.
|
|
5
|
+
"version": "3.21.7-dev.b9cd769db",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"homepage": "https://getuikit.com",
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@eslint/js": "^9.
|
|
23
|
+
"@eslint/js": "^9.6.0",
|
|
24
24
|
"@rollup/plugin-alias": "^5.1.0",
|
|
25
25
|
"@rollup/plugin-replace": "^5.0.5",
|
|
26
26
|
"archiver": "^7.0.1",
|
|
@@ -28,20 +28,20 @@
|
|
|
28
28
|
"chokidar-cli": "^3.0.0",
|
|
29
29
|
"clean-css": "^5.3.3",
|
|
30
30
|
"dateformat": "^5.0.3",
|
|
31
|
-
"esbuild": "^0.
|
|
32
|
-
"eslint": "^9.
|
|
31
|
+
"esbuild": "^0.23.0",
|
|
32
|
+
"eslint": "^9.6.0",
|
|
33
33
|
"eslint-config-prettier": "^9.1.0",
|
|
34
|
-
"execa": "^9.0
|
|
34
|
+
"execa": "^9.3.0",
|
|
35
35
|
"fs-extra": "^11.2.0",
|
|
36
|
-
"glob": "^
|
|
37
|
-
"globals": "^15.
|
|
38
|
-
"inquirer": "^
|
|
36
|
+
"glob": "^11.0.0",
|
|
37
|
+
"globals": "^15.7.0",
|
|
38
|
+
"inquirer": "^10.0.0",
|
|
39
39
|
"less": "^4.2.0",
|
|
40
40
|
"minimist": "^1.2.8",
|
|
41
41
|
"number-precision": "^1.6.0",
|
|
42
|
-
"p-limit": "^
|
|
42
|
+
"p-limit": "^6.0.0",
|
|
43
43
|
"prettier": "^3.2.5",
|
|
44
|
-
"prettier-plugin-organize-imports": "^
|
|
44
|
+
"prettier-plugin-organize-imports": "^4.0.0",
|
|
45
45
|
"rollup": "^4.16.4",
|
|
46
46
|
"rollup-plugin-esbuild": "^6.1.1",
|
|
47
47
|
"rollup-plugin-modify": "^3.0.0",
|
package/src/js/api/component.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { camelize,
|
|
1
|
+
import { $$, camelize, hyphenate, isEmpty, isPlainObject } from 'uikit-util';
|
|
2
2
|
import App from './app';
|
|
3
3
|
|
|
4
4
|
const PREFIX = 'uk-';
|
|
@@ -41,7 +41,7 @@ export function createComponent(name, element, data, ...args) {
|
|
|
41
41
|
return Component.options.functional
|
|
42
42
|
? new Component({ data: isPlainObject(element) ? element : [element, data, ...args] })
|
|
43
43
|
: element
|
|
44
|
-
?
|
|
44
|
+
? $$(element).map(init)[0]
|
|
45
45
|
: init();
|
|
46
46
|
|
|
47
47
|
function init(element) {
|
package/src/js/core/drop.js
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
removeClass,
|
|
30
30
|
} from 'uikit-util';
|
|
31
31
|
import Container from '../mixin/container';
|
|
32
|
-
import Position from '../mixin/position';
|
|
32
|
+
import Position, { storeScrollPosition } from '../mixin/position';
|
|
33
33
|
import Togglable from '../mixin/togglable';
|
|
34
34
|
import { keyMap } from '../util/keys';
|
|
35
35
|
import { preventBackgroundScroll } from '../util/scroll';
|
|
@@ -375,6 +375,8 @@ export default {
|
|
|
375
375
|
},
|
|
376
376
|
|
|
377
377
|
position() {
|
|
378
|
+
const restoreScrollPosition = storeScrollPosition(this.$el);
|
|
379
|
+
|
|
378
380
|
removeClass(this.$el, 'uk-drop-stack');
|
|
379
381
|
css(this.$el, this._style);
|
|
380
382
|
|
|
@@ -439,6 +441,8 @@ export default {
|
|
|
439
441
|
this.positionAt(this.$el, this.target, this.boundary);
|
|
440
442
|
}
|
|
441
443
|
}
|
|
444
|
+
|
|
445
|
+
restoreScrollPosition();
|
|
442
446
|
},
|
|
443
447
|
},
|
|
444
448
|
};
|
package/src/js/core/modal.js
CHANGED
|
@@ -22,8 +22,7 @@ export default {
|
|
|
22
22
|
data: {
|
|
23
23
|
clsPage: 'uk-modal-page',
|
|
24
24
|
selPanel: '.uk-modal-dialog',
|
|
25
|
-
selClose:
|
|
26
|
-
'.uk-modal-close, .uk-modal-close-default, .uk-modal-close-outside, .uk-modal-close-full',
|
|
25
|
+
selClose: '[class*="uk-modal-close"]',
|
|
27
26
|
},
|
|
28
27
|
|
|
29
28
|
events: [
|
package/src/js/mixin/position.js
CHANGED
package/src/js/util/dom.js
CHANGED
package/src/js/util/selector.js
CHANGED
|
@@ -25,16 +25,16 @@ function getContext(selector, context = document) {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const addStarRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
|
|
28
|
-
|
|
29
|
-
const
|
|
28
|
+
// This will fail for nested, comma separated selectors (e.g `a:has(b:not(c),d)`)
|
|
29
|
+
const splitSelectorRe = /(\([^)]*\)|[^,])+/g;
|
|
30
30
|
|
|
31
31
|
const parseSelector = memoize((selector) => {
|
|
32
32
|
selector = selector.replace(addStarRe, '$1 *');
|
|
33
33
|
let isContextSelector = false;
|
|
34
34
|
|
|
35
35
|
const selectors = [];
|
|
36
|
-
for (let sel of selector.match(splitSelectorRe)
|
|
37
|
-
sel = sel.
|
|
36
|
+
for (let sel of selector.match(splitSelectorRe)) {
|
|
37
|
+
sel = sel.trim();
|
|
38
38
|
isContextSelector ||= ['!', '+', '~', '-', '>'].includes(sel[0]);
|
|
39
39
|
selectors.push(sel);
|
|
40
40
|
}
|
|
@@ -45,11 +45,11 @@ const parseSelector = memoize((selector) => {
|
|
|
45
45
|
isContextSelector,
|
|
46
46
|
};
|
|
47
47
|
});
|
|
48
|
-
|
|
48
|
+
const positionRe = /(\([^)]*\)|\S)*/;
|
|
49
49
|
const parsePositionSelector = memoize((selector) => {
|
|
50
50
|
selector = selector.slice(1).trim();
|
|
51
|
-
const
|
|
52
|
-
return
|
|
51
|
+
const [position] = selector.match(positionRe);
|
|
52
|
+
return [position, selector.slice(position.length + 1)];
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
function _query(selector, context = document, queryFn) {
|
package/src/js/util/viewport.js
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { hasClass } from './class';
|
|
2
2
|
import { dimensions, offset, offsetPosition } from './dimensions';
|
|
3
3
|
import { isVisible, parent, parents } from './filter';
|
|
4
|
-
import {
|
|
5
|
-
clamp,
|
|
6
|
-
findIndex,
|
|
7
|
-
includes,
|
|
8
|
-
intersectRect,
|
|
9
|
-
isWindow,
|
|
10
|
-
toFloat,
|
|
11
|
-
toWindow,
|
|
12
|
-
ucfirst,
|
|
13
|
-
} from './lang';
|
|
4
|
+
import { clamp, findIndex, includes, intersectRect, toFloat, toWindow, ucfirst } from './lang';
|
|
14
5
|
import { css } from './style';
|
|
15
6
|
|
|
16
7
|
export function isInView(element, offsetTop = 0, offsetLeft = 0) {
|
|
@@ -162,37 +153,42 @@ export function overflowParents(element) {
|
|
|
162
153
|
|
|
163
154
|
export function offsetViewport(scrollElement) {
|
|
164
155
|
const window = toWindow(scrollElement);
|
|
165
|
-
|
|
166
|
-
|
|
156
|
+
const documentScrollingElement = scrollingElement(scrollElement);
|
|
157
|
+
const useWindow = scrollElement.contains(documentScrollingElement);
|
|
167
158
|
|
|
168
|
-
if (
|
|
159
|
+
if (useWindow && window.visualViewport) {
|
|
169
160
|
let { height, width, scale, pageTop: top, pageLeft: left } = window.visualViewport;
|
|
170
161
|
height = Math.round(height * scale);
|
|
171
162
|
width = Math.round(width * scale);
|
|
172
163
|
return { height, width, top, left, bottom: top + height, right: left + width };
|
|
173
164
|
}
|
|
174
165
|
|
|
175
|
-
let rect = offset(
|
|
176
|
-
if (css(
|
|
166
|
+
let rect = offset(useWindow ? window : scrollElement);
|
|
167
|
+
if (css(scrollElement, 'display') === 'inline') {
|
|
177
168
|
return rect;
|
|
178
169
|
}
|
|
179
170
|
|
|
171
|
+
const { body, documentElement } = window.document;
|
|
172
|
+
const viewportElement = useWindow
|
|
173
|
+
? documentScrollingElement === documentElement ||
|
|
174
|
+
// In quirks mode the scrolling element is body, even though the viewport is html
|
|
175
|
+
documentScrollingElement.clientHeight < body.clientHeight
|
|
176
|
+
? documentScrollingElement
|
|
177
|
+
: body
|
|
178
|
+
: scrollElement;
|
|
180
179
|
for (let [prop, dir, start, end] of [
|
|
181
180
|
['width', 'x', 'left', 'right'],
|
|
182
181
|
['height', 'y', 'top', 'bottom'],
|
|
183
182
|
]) {
|
|
184
|
-
if (isWindow(viewportElement)) {
|
|
185
|
-
// iOS 12 returns <body> as scrollingElement
|
|
186
|
-
viewportElement = viewportElement.document;
|
|
187
|
-
} else {
|
|
188
|
-
rect[start] += toFloat(css(viewportElement, `border-${start}-width`));
|
|
189
|
-
}
|
|
190
183
|
const subpixel = rect[prop] % 1;
|
|
184
|
+
|
|
185
|
+
rect[start] += toFloat(css(viewportElement, `border-${start}-width`));
|
|
191
186
|
rect[prop] = rect[dir] =
|
|
192
187
|
viewportElement[`client${ucfirst(prop)}`] -
|
|
193
188
|
(subpixel ? (subpixel < 0.5 ? -subpixel : 1 - subpixel) : 0);
|
|
194
189
|
rect[end] = rect[prop] + rect[start];
|
|
195
190
|
}
|
|
191
|
+
|
|
196
192
|
return rect;
|
|
197
193
|
}
|
|
198
194
|
|
package/tests/js/index.js
CHANGED