uikit 3.19.4 → 3.19.5-dev.520984f53
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 +10 -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 +7 -8
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +55 -55
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +55 -55
- 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 +64 -45
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +64 -45
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +66 -48
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +64 -45
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +65 -46
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +3 -3
- 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 +122 -77
- 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 +128 -84
- package/dist/js/uikit.min.js +1 -1
- package/eslint.config.js +8 -5
- package/package.json +3 -4
- package/src/js/api/boot.js +6 -7
- package/src/js/api/component.js +4 -4
- package/src/js/api/observer.js +17 -5
- package/src/js/components/filter.js +4 -5
- package/src/js/components/slider.js +1 -1
- package/src/js/core/drop.js +0 -6
- package/src/js/core/img.js +1 -1
- package/src/js/core/inverse.js +20 -5
- package/src/js/core/margin.js +1 -1
- package/src/js/core/switcher.js +6 -1
- package/src/js/core/toggle.js +1 -1
- package/src/js/mixin/slider.js +0 -3
- package/src/js/mixin/slideshow.js +3 -0
- package/src/js/util/lang.js +1 -1
- package/src/js/util/selector.js +66 -38
- package/src/js/util/svg.js +1 -12
- package/tests/modal.html +2 -2
- package/build/package.json +0 -4
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.19.
|
|
1
|
+
/*! UIkit 3.19.5-dev.520984f53 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
return parseFloat(value) || 0;
|
|
89
89
|
}
|
|
90
90
|
function toNode(element) {
|
|
91
|
-
return toNodes(element)[0];
|
|
91
|
+
return element && toNodes(element)[0];
|
|
92
92
|
}
|
|
93
93
|
function toNodes(element) {
|
|
94
94
|
return isNode(element) ? [element] : Array.from(element || []).filter(isNode);
|
|
@@ -367,55 +367,82 @@
|
|
|
367
367
|
function findAll(selector, context) {
|
|
368
368
|
return toNodes(_query(selector, toNode(context), "querySelectorAll"));
|
|
369
369
|
}
|
|
370
|
-
const contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
|
|
371
|
-
const isContextSelector = memoize((selector) => selector.match(contextSelectorRe));
|
|
372
370
|
function getContext(selector, context = document) {
|
|
373
|
-
return isString(selector) &&
|
|
371
|
+
return isString(selector) && parseSelector(selector).isContextSelector || isDocument(context) ? context : context.ownerDocument;
|
|
374
372
|
}
|
|
375
|
-
const
|
|
376
|
-
const
|
|
373
|
+
const addStarRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
|
|
374
|
+
const splitSelectorRe = /.*?[^\\](?![^(]*\))(?:,|$)/g;
|
|
375
|
+
const trailingCommaRe = /\s*,$/;
|
|
376
|
+
const parseSelector = memoize((selector) => {
|
|
377
|
+
var _a;
|
|
378
|
+
selector = selector.replace(addStarRe, "$1 *");
|
|
379
|
+
let isContextSelector = false;
|
|
380
|
+
const selectors = [];
|
|
381
|
+
for (let sel of (_a = selector.match(splitSelectorRe)) != null ? _a : []) {
|
|
382
|
+
sel = sel.replace(trailingCommaRe, "").trim();
|
|
383
|
+
if (sel[0] === ">") {
|
|
384
|
+
sel = `:scope ${sel}`;
|
|
385
|
+
}
|
|
386
|
+
isContextSelector || (isContextSelector = ["!", "+", "~", "-"].includes(sel[0]));
|
|
387
|
+
selectors.push(sel);
|
|
388
|
+
}
|
|
389
|
+
return {
|
|
390
|
+
selector: selectors.join(","),
|
|
391
|
+
selectors,
|
|
392
|
+
isContextSelector
|
|
393
|
+
};
|
|
394
|
+
});
|
|
377
395
|
function _query(selector, context = document, queryFn) {
|
|
378
396
|
if (!selector || !isString(selector)) {
|
|
379
397
|
return selector;
|
|
380
398
|
}
|
|
381
|
-
|
|
382
|
-
if (isContextSelector
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
399
|
+
const parsed = parseSelector(selector);
|
|
400
|
+
if (!parsed.isContextSelector) {
|
|
401
|
+
return _doQuery(context, queryFn, parsed.selector);
|
|
402
|
+
}
|
|
403
|
+
selector = "";
|
|
404
|
+
const isSingle = parsed.selectors.length === 1;
|
|
405
|
+
for (let sel of parsed.selectors) {
|
|
406
|
+
let ctx = context;
|
|
407
|
+
if (sel[0] === "!") {
|
|
408
|
+
const selectors = sel.substr(1).trim().split(" ");
|
|
409
|
+
ctx = context.parentElement.closest(selectors[0]);
|
|
410
|
+
sel = selectors.slice(1).join(" ").trim();
|
|
411
|
+
if (!sel.length && isSingle) {
|
|
412
|
+
return ctx;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
if (sel[0] === "-") {
|
|
416
|
+
const selectors = sel.substr(1).trim().split(" ");
|
|
417
|
+
const prev = (ctx || context).previousElementSibling;
|
|
418
|
+
ctx = matches(prev, sel.substr(1)) ? prev : null;
|
|
419
|
+
sel = selectors.slice(1).join(" ");
|
|
420
|
+
if (!sel.length && isSingle) {
|
|
421
|
+
return ctx;
|
|
422
|
+
}
|
|
423
|
+
} else if (sel[0] === "~" || sel[0] === "+" && isSingle) {
|
|
424
|
+
return _doQuery(
|
|
425
|
+
ctx.parentElement,
|
|
426
|
+
queryFn,
|
|
427
|
+
`:scope :nth-child(${index(ctx) + 1}) ${sel}`
|
|
428
|
+
);
|
|
404
429
|
}
|
|
405
|
-
if (
|
|
406
|
-
|
|
430
|
+
if (ctx) {
|
|
431
|
+
selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
|
|
407
432
|
}
|
|
408
433
|
}
|
|
434
|
+
if (!isDocument(context)) {
|
|
435
|
+
context = context.ownerDocument;
|
|
436
|
+
}
|
|
437
|
+
return _doQuery(context, queryFn, selector);
|
|
438
|
+
}
|
|
439
|
+
function _doQuery(context, queryFn, selector) {
|
|
409
440
|
try {
|
|
410
441
|
return context[queryFn](selector);
|
|
411
442
|
} catch (e) {
|
|
412
443
|
return null;
|
|
413
444
|
}
|
|
414
445
|
}
|
|
415
|
-
const selectorRe = /.*?[^\\](?![^(]*\))(?:,|$)/g;
|
|
416
|
-
const splitSelector = memoize(
|
|
417
|
-
(selector) => selector.match(selectorRe).map((selector2) => selector2.replace(/,$/, "").trim())
|
|
418
|
-
);
|
|
419
446
|
function domPath(element) {
|
|
420
447
|
const names = [];
|
|
421
448
|
while (element.parentNode) {
|
|
@@ -1875,18 +1902,30 @@
|
|
|
1875
1902
|
}
|
|
1876
1903
|
const targets = hasOwn(instance, key) ? instance[key] : target;
|
|
1877
1904
|
const observer = observe(targets, handler, options, args);
|
|
1878
|
-
if (isFunction(target) && isArray(instance[key])
|
|
1879
|
-
registerWatch(
|
|
1905
|
+
if (isFunction(target) && isArray(instance[key])) {
|
|
1906
|
+
registerWatch(
|
|
1907
|
+
instance,
|
|
1908
|
+
{ handler: updateTargets(observer, options), immediate: false },
|
|
1909
|
+
key
|
|
1910
|
+
);
|
|
1880
1911
|
}
|
|
1881
1912
|
registerObserver(instance, observer);
|
|
1882
1913
|
}
|
|
1883
|
-
function updateTargets(observer) {
|
|
1914
|
+
function updateTargets(observer, options) {
|
|
1884
1915
|
return (targets, prev) => {
|
|
1885
1916
|
for (const target of prev) {
|
|
1886
|
-
!includes(targets, target)
|
|
1917
|
+
if (!includes(targets, target)) {
|
|
1918
|
+
if (observer.unobserve) {
|
|
1919
|
+
observer.unobserve(target);
|
|
1920
|
+
} else {
|
|
1921
|
+
observer.disconnect();
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1887
1924
|
}
|
|
1888
1925
|
for (const target of targets) {
|
|
1889
|
-
!includes(prev, target)
|
|
1926
|
+
if (!includes(prev, target) || !observer.unobserve) {
|
|
1927
|
+
observer.observe(target, options);
|
|
1928
|
+
}
|
|
1890
1929
|
}
|
|
1891
1930
|
};
|
|
1892
1931
|
}
|
|
@@ -2153,26 +2192,26 @@
|
|
|
2153
2192
|
};
|
|
2154
2193
|
App.util = util;
|
|
2155
2194
|
App.options = {};
|
|
2156
|
-
App.version = "3.19.
|
|
2195
|
+
App.version = "3.19.5-dev.520984f53";
|
|
2157
2196
|
|
|
2158
2197
|
const PREFIX = "uk-";
|
|
2159
2198
|
const DATA = "__uikit__";
|
|
2160
2199
|
const components$1 = {};
|
|
2161
2200
|
function component(name, options) {
|
|
2162
|
-
var _a;
|
|
2201
|
+
var _a, _b;
|
|
2163
2202
|
const id = PREFIX + hyphenate(name);
|
|
2164
2203
|
if (!options) {
|
|
2165
|
-
if (
|
|
2204
|
+
if (!components$1[id].options) {
|
|
2166
2205
|
components$1[id] = App.extend(components$1[id]);
|
|
2167
2206
|
}
|
|
2168
2207
|
return components$1[id];
|
|
2169
2208
|
}
|
|
2170
2209
|
name = camelize(name);
|
|
2171
2210
|
App[name] = (element, data) => createComponent(name, element, data);
|
|
2172
|
-
const opt =
|
|
2211
|
+
const opt = (_a = options.options) != null ? _a : { ...options };
|
|
2173
2212
|
opt.id = id;
|
|
2174
2213
|
opt.name = name;
|
|
2175
|
-
(
|
|
2214
|
+
(_b = opt.install) == null ? void 0 : _b.call(opt, App, opt, name);
|
|
2176
2215
|
if (App._initialized && !opt.functional) {
|
|
2177
2216
|
requestAnimationFrame(() => createComponent(name, `[${id}],[data-${id}]`));
|
|
2178
2217
|
}
|
|
@@ -2180,7 +2219,7 @@
|
|
|
2180
2219
|
}
|
|
2181
2220
|
function createComponent(name, element, data, ...args) {
|
|
2182
2221
|
const Component = component(name);
|
|
2183
|
-
return Component.options.functional ? new Component({ data: isPlainObject(element) ? element : [element, data, ...args] }) : element ?
|
|
2222
|
+
return Component.options.functional ? new Component({ data: isPlainObject(element) ? element : [element, data, ...args] }) : element ? findAll(element).map(init)[0] : init();
|
|
2184
2223
|
function init(element2) {
|
|
2185
2224
|
const instance = getComponent(element2, name);
|
|
2186
2225
|
if (instance) {
|
|
@@ -2256,14 +2295,14 @@
|
|
|
2256
2295
|
if (name) {
|
|
2257
2296
|
if (hasAttr(target, attributeName)) {
|
|
2258
2297
|
createComponent(name, target);
|
|
2259
|
-
|
|
2298
|
+
} else {
|
|
2299
|
+
(_a = getComponent(target, name)) == null ? void 0 : _a.$destroy();
|
|
2260
2300
|
}
|
|
2261
|
-
(_a = getComponent(target, name)) == null ? void 0 : _a.$destroy();
|
|
2262
2301
|
}
|
|
2263
2302
|
}
|
|
2264
2303
|
function connect(node) {
|
|
2265
2304
|
const components2 = getComponents(node);
|
|
2266
|
-
for (const name in
|
|
2305
|
+
for (const name in components2) {
|
|
2267
2306
|
callConnected(components2[name]);
|
|
2268
2307
|
}
|
|
2269
2308
|
for (const attributeName of node.getAttributeNames()) {
|
|
@@ -2273,7 +2312,7 @@
|
|
|
2273
2312
|
}
|
|
2274
2313
|
function disconnect(node) {
|
|
2275
2314
|
const components2 = getComponents(node);
|
|
2276
|
-
for (const name in
|
|
2315
|
+
for (const name in components2) {
|
|
2277
2316
|
callDisconnected(components2[name]);
|
|
2278
2317
|
}
|
|
2279
2318
|
}
|
|
@@ -2282,7 +2321,7 @@
|
|
|
2282
2321
|
attribute = attribute.slice(5);
|
|
2283
2322
|
}
|
|
2284
2323
|
const cmp = components$1[attribute];
|
|
2285
|
-
return cmp && (
|
|
2324
|
+
return cmp && (cmp.options || cmp).name;
|
|
2286
2325
|
}
|
|
2287
2326
|
|
|
2288
2327
|
function globalApi(App) {
|
|
@@ -3253,10 +3292,6 @@
|
|
|
3253
3292
|
}
|
|
3254
3293
|
css(this.$el, this._style);
|
|
3255
3294
|
},
|
|
3256
|
-
observe: lazyload({
|
|
3257
|
-
target: ({ toggle, $el }) => query(toggle, $el),
|
|
3258
|
-
targets: ({ $el }) => $el
|
|
3259
|
-
}),
|
|
3260
3295
|
events: [
|
|
3261
3296
|
{
|
|
3262
3297
|
name: "click",
|
|
@@ -3945,10 +3980,10 @@
|
|
|
3945
3980
|
observe: [
|
|
3946
3981
|
mutation({
|
|
3947
3982
|
options: {
|
|
3948
|
-
childList: true,
|
|
3949
3983
|
attributes: true,
|
|
3950
3984
|
attributeFilter: ["style"]
|
|
3951
|
-
}
|
|
3985
|
+
},
|
|
3986
|
+
target: ({ $el }) => [$el, ...children($el)]
|
|
3952
3987
|
}),
|
|
3953
3988
|
resize({
|
|
3954
3989
|
target: ({ $el }) => [$el, ...children($el)]
|
|
@@ -4667,13 +4702,13 @@
|
|
|
4667
4702
|
delete this.img;
|
|
4668
4703
|
},
|
|
4669
4704
|
observe: intersection({
|
|
4670
|
-
target: ({ $el, $props }) => [$el, ...queryAll($props.target, $el)],
|
|
4671
4705
|
handler(entries, observer) {
|
|
4672
4706
|
this.load();
|
|
4673
4707
|
observer.disconnect();
|
|
4674
4708
|
},
|
|
4675
4709
|
options: ({ margin }) => ({ rootMargin: margin }),
|
|
4676
|
-
filter: ({ loading }) => loading === "lazy"
|
|
4710
|
+
filter: ({ loading }) => loading === "lazy",
|
|
4711
|
+
target: ({ $el, $props }) => $props.target ? [$el, ...queryAll($props.target, $el)] : $el
|
|
4677
4712
|
}),
|
|
4678
4713
|
methods: {
|
|
4679
4714
|
load() {
|
|
@@ -4763,9 +4798,17 @@
|
|
|
4763
4798
|
selActive: false
|
|
4764
4799
|
},
|
|
4765
4800
|
computed: {
|
|
4766
|
-
target: ({ target }, $el) => target ? $$(target, $el) :
|
|
4801
|
+
target: ({ target }, $el) => target ? $$(target, $el) : $el
|
|
4767
4802
|
},
|
|
4768
4803
|
observe: [
|
|
4804
|
+
intersection({
|
|
4805
|
+
handler(entries) {
|
|
4806
|
+
this.isIntersecting = entries.some(({ isIntersecting }) => isIntersecting);
|
|
4807
|
+
this.$emit();
|
|
4808
|
+
},
|
|
4809
|
+
target: ({ target }) => target,
|
|
4810
|
+
args: { intersecting: false }
|
|
4811
|
+
}),
|
|
4769
4812
|
mutation({
|
|
4770
4813
|
target: ({ target }) => target,
|
|
4771
4814
|
options: { attributes: true, attributeFilter: ["class"], attributeOldValue: true }
|
|
@@ -4773,7 +4816,10 @@
|
|
|
4773
4816
|
{
|
|
4774
4817
|
target: ({ target }) => target,
|
|
4775
4818
|
observe: (target, handler) => {
|
|
4776
|
-
const observer = observeResize(
|
|
4819
|
+
const observer = observeResize(
|
|
4820
|
+
[...toNodes(target), document.documentElement],
|
|
4821
|
+
handler
|
|
4822
|
+
);
|
|
4777
4823
|
const listener = [
|
|
4778
4824
|
on(document, "scroll itemshown itemhidden", handler, {
|
|
4779
4825
|
passive: true,
|
|
@@ -4802,7 +4848,10 @@
|
|
|
4802
4848
|
],
|
|
4803
4849
|
update: {
|
|
4804
4850
|
read() {
|
|
4805
|
-
|
|
4851
|
+
if (!this.isIntersecting) {
|
|
4852
|
+
return false;
|
|
4853
|
+
}
|
|
4854
|
+
for (const target of toNodes(this.target)) {
|
|
4806
4855
|
replaceClass(
|
|
4807
4856
|
target,
|
|
4808
4857
|
"uk-light,uk-dark",
|
|
@@ -6084,18 +6133,10 @@
|
|
|
6084
6133
|
}
|
|
6085
6134
|
|
|
6086
6135
|
function getMaxPathLength(el) {
|
|
6087
|
-
return Math.ceil(
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
try {
|
|
6092
|
-
return stroke.getTotalLength();
|
|
6093
|
-
} catch (e) {
|
|
6094
|
-
return 0;
|
|
6095
|
-
}
|
|
6096
|
-
})
|
|
6097
|
-
)
|
|
6098
|
-
);
|
|
6136
|
+
return Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => {
|
|
6137
|
+
var _a;
|
|
6138
|
+
return (_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke);
|
|
6139
|
+
})));
|
|
6099
6140
|
}
|
|
6100
6141
|
|
|
6101
6142
|
var svg = {
|
|
@@ -6320,7 +6361,11 @@
|
|
|
6320
6361
|
],
|
|
6321
6362
|
update() {
|
|
6322
6363
|
var _a;
|
|
6323
|
-
|
|
6364
|
+
for (const el of this.connects) {
|
|
6365
|
+
if (isTag(el, "ul")) {
|
|
6366
|
+
attr(el, "role", "presentation");
|
|
6367
|
+
}
|
|
6368
|
+
}
|
|
6324
6369
|
attr(children(this.$el), "role", "presentation");
|
|
6325
6370
|
for (const index in this.toggles) {
|
|
6326
6371
|
const toggle = this.toggles[index];
|
|
@@ -6419,7 +6464,7 @@
|
|
|
6419
6464
|
}
|
|
6420
6465
|
}
|
|
6421
6466
|
},
|
|
6422
|
-
observe: lazyload({
|
|
6467
|
+
observe: lazyload({ targets: ({ target }) => target }),
|
|
6423
6468
|
events: [
|
|
6424
6469
|
{
|
|
6425
6470
|
name: pointerDown,
|