uikit 3.20.10 → 3.20.11-dev.43d76edf7
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/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 +2 -7
- 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 +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +4 -1
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +4 -1
- 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 +109 -105
- 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 +109 -107
- package/dist/js/uikit.min.js +1 -1
- package/package.json +3 -3
- package/src/js/api/observer.js +2 -2
- package/src/js/components/filter.js +1 -8
- package/src/js/core/icon.js +2 -1
- package/src/js/core/svg.js +7 -3
- package/src/js/mixin/slider-parallax.js +5 -0
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.20.
|
|
1
|
+
/*! UIkit 3.20.11-dev.43d76edf7 | 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() :
|
|
@@ -2395,7 +2395,7 @@
|
|
|
2395
2395
|
return ["filter", "sort"].every((prop) => isEqual(stateA[prop], stateB[prop]));
|
|
2396
2396
|
}
|
|
2397
2397
|
function applyState(state, target, children) {
|
|
2398
|
-
const selector =
|
|
2398
|
+
const selector = Object.values(state.filter).join("");
|
|
2399
2399
|
for (const el of children) {
|
|
2400
2400
|
css(el, "display", selector && !matches(el, selector) ? "none" : "");
|
|
2401
2401
|
}
|
|
@@ -2433,11 +2433,6 @@
|
|
|
2433
2433
|
const { filter = "", group = "", sort, order = "asc" } = getFilter(el, attr2);
|
|
2434
2434
|
return isUndefined(sort) ? group in stateFilter && filter === stateFilter[group] || !filter && group && !(group in stateFilter) && !stateFilter[""] : stateSort === sort && stateOrder === order;
|
|
2435
2435
|
}
|
|
2436
|
-
function getSelector({ filter }) {
|
|
2437
|
-
let selector = "";
|
|
2438
|
-
each(filter, (value) => selector += value || "");
|
|
2439
|
-
return selector;
|
|
2440
|
-
}
|
|
2441
2436
|
function sortItems(nodes, sort, order) {
|
|
2442
2437
|
return [...nodes].sort(
|
|
2443
2438
|
(a, b) => data(a, sort).localeCompare(data(b, sort), void 0, { numeric: true }) * (order === "asc" || -1)
|
|
@@ -3348,7 +3343,7 @@
|
|
|
3348
3343
|
}
|
|
3349
3344
|
const key = `_observe${instance._observers.length}`;
|
|
3350
3345
|
if (isFunction(target) && !hasOwn(instance, key)) {
|
|
3351
|
-
registerComputed(instance, key, () => target.call(instance, instance));
|
|
3346
|
+
registerComputed(instance, key, () => toNodes(target.call(instance, instance)));
|
|
3352
3347
|
}
|
|
3353
3348
|
handler = isString(handler) ? instance[handler] : handler.bind(instance);
|
|
3354
3349
|
if (isFunction(options)) {
|
|
@@ -3539,7 +3534,7 @@
|
|
|
3539
3534
|
};
|
|
3540
3535
|
App.util = util;
|
|
3541
3536
|
App.options = {};
|
|
3542
|
-
App.version = "3.20.
|
|
3537
|
+
App.version = "3.20.11-dev.43d76edf7";
|
|
3543
3538
|
|
|
3544
3539
|
const PREFIX = "uk-";
|
|
3545
3540
|
const DATA = "__uikit__";
|
|
@@ -4938,6 +4933,9 @@
|
|
|
4938
4933
|
return false;
|
|
4939
4934
|
}
|
|
4940
4935
|
const target = this.parallaxTarget;
|
|
4936
|
+
if (!target) {
|
|
4937
|
+
return false;
|
|
4938
|
+
}
|
|
4941
4939
|
const start = toPx(this.parallaxStart, "height", target, true);
|
|
4942
4940
|
const end = toPx(this.parallaxEnd, "height", target, true);
|
|
4943
4941
|
const percent = ease(scrolledOver(target, start, end), this.parallaxEasing);
|
|
@@ -7891,6 +7889,107 @@
|
|
|
7891
7889
|
dimensions.forEach((val, i) => attr(el, props[i], toFloat(val) * this.ratio || null));
|
|
7892
7890
|
}
|
|
7893
7891
|
|
|
7892
|
+
var svg = {
|
|
7893
|
+
mixins: [Svg],
|
|
7894
|
+
args: "src",
|
|
7895
|
+
props: {
|
|
7896
|
+
src: String,
|
|
7897
|
+
icon: String,
|
|
7898
|
+
attributes: "list",
|
|
7899
|
+
strokeAnimation: Boolean
|
|
7900
|
+
},
|
|
7901
|
+
data: {
|
|
7902
|
+
strokeAnimation: false
|
|
7903
|
+
},
|
|
7904
|
+
observe: [
|
|
7905
|
+
mutation({
|
|
7906
|
+
async handler() {
|
|
7907
|
+
const svg = await this.svg;
|
|
7908
|
+
if (svg) {
|
|
7909
|
+
applyAttributes.call(this, svg);
|
|
7910
|
+
}
|
|
7911
|
+
},
|
|
7912
|
+
options: {
|
|
7913
|
+
attributes: true,
|
|
7914
|
+
attributeFilter: ["id", "class", "style"]
|
|
7915
|
+
}
|
|
7916
|
+
})
|
|
7917
|
+
],
|
|
7918
|
+
async connected() {
|
|
7919
|
+
if (includes(this.src, "#")) {
|
|
7920
|
+
[this.src, this.icon] = this.src.split("#");
|
|
7921
|
+
}
|
|
7922
|
+
const svg = await this.svg;
|
|
7923
|
+
if (svg) {
|
|
7924
|
+
applyAttributes.call(this, svg);
|
|
7925
|
+
if (this.strokeAnimation) {
|
|
7926
|
+
applyAnimation(svg);
|
|
7927
|
+
}
|
|
7928
|
+
}
|
|
7929
|
+
},
|
|
7930
|
+
methods: {
|
|
7931
|
+
async getSvg() {
|
|
7932
|
+
if (isTag(this.$el, "img") && !this.$el.complete && this.$el.loading === "lazy") {
|
|
7933
|
+
await new Promise((resolve) => once(this.$el, "load", resolve));
|
|
7934
|
+
}
|
|
7935
|
+
return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject("SVG not found.");
|
|
7936
|
+
}
|
|
7937
|
+
}
|
|
7938
|
+
};
|
|
7939
|
+
function applyAttributes(el) {
|
|
7940
|
+
const { $el } = this;
|
|
7941
|
+
addClass(el, attr($el, "class"), "uk-svg");
|
|
7942
|
+
for (let i = 0; i < $el.style.length; i++) {
|
|
7943
|
+
const prop = $el.style[i];
|
|
7944
|
+
css(el, prop, css($el, prop));
|
|
7945
|
+
}
|
|
7946
|
+
for (const attribute in this.attributes) {
|
|
7947
|
+
const [prop, value] = this.attributes[attribute].split(":", 2);
|
|
7948
|
+
attr(el, prop, value);
|
|
7949
|
+
}
|
|
7950
|
+
if (!this.$el.id) {
|
|
7951
|
+
removeAttr(el, "id");
|
|
7952
|
+
}
|
|
7953
|
+
}
|
|
7954
|
+
const loadSVG = memoize(async (src) => {
|
|
7955
|
+
if (src) {
|
|
7956
|
+
if (startsWith(src, "data:")) {
|
|
7957
|
+
return decodeURIComponent(src.split(",")[1]);
|
|
7958
|
+
} else {
|
|
7959
|
+
return (await fetch(src)).text();
|
|
7960
|
+
}
|
|
7961
|
+
} else {
|
|
7962
|
+
return Promise.reject();
|
|
7963
|
+
}
|
|
7964
|
+
});
|
|
7965
|
+
function parseSVG(svg, icon) {
|
|
7966
|
+
if (icon && includes(svg, "<symbol")) {
|
|
7967
|
+
svg = parseSymbols(svg)[icon] || svg;
|
|
7968
|
+
}
|
|
7969
|
+
return stringToSvg(svg);
|
|
7970
|
+
}
|
|
7971
|
+
const symbolRe = /<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g;
|
|
7972
|
+
const parseSymbols = memoize(function(svg) {
|
|
7973
|
+
const symbols = {};
|
|
7974
|
+
symbolRe.lastIndex = 0;
|
|
7975
|
+
let match;
|
|
7976
|
+
while (match = symbolRe.exec(svg)) {
|
|
7977
|
+
symbols[match[3]] = `<svg ${match[1]}svg>`;
|
|
7978
|
+
}
|
|
7979
|
+
return symbols;
|
|
7980
|
+
});
|
|
7981
|
+
function applyAnimation(el) {
|
|
7982
|
+
const length = getMaxPathLength(el);
|
|
7983
|
+
if (length) {
|
|
7984
|
+
css(el, "--uk-animation-stroke", length);
|
|
7985
|
+
}
|
|
7986
|
+
}
|
|
7987
|
+
function stringToSvg(string) {
|
|
7988
|
+
const container = document.createElement("template");
|
|
7989
|
+
container.innerHTML = string;
|
|
7990
|
+
return container.content.firstElementChild;
|
|
7991
|
+
}
|
|
7992
|
+
|
|
7894
7993
|
const icons = {
|
|
7895
7994
|
spinner,
|
|
7896
7995
|
totop,
|
|
@@ -8061,7 +8160,7 @@
|
|
|
8061
8160
|
return null;
|
|
8062
8161
|
}
|
|
8063
8162
|
if (!parsed[icon]) {
|
|
8064
|
-
parsed[icon] =
|
|
8163
|
+
parsed[icon] = stringToSvg(icons[applyRtl(icon)] || icons[icon]);
|
|
8065
8164
|
}
|
|
8066
8165
|
return parsed[icon].cloneNode(true);
|
|
8067
8166
|
}
|
|
@@ -9280,103 +9379,6 @@
|
|
|
9280
9379
|
}
|
|
9281
9380
|
}
|
|
9282
9381
|
|
|
9283
|
-
var svg = {
|
|
9284
|
-
mixins: [Svg],
|
|
9285
|
-
args: "src",
|
|
9286
|
-
props: {
|
|
9287
|
-
src: String,
|
|
9288
|
-
icon: String,
|
|
9289
|
-
attributes: "list",
|
|
9290
|
-
strokeAnimation: Boolean
|
|
9291
|
-
},
|
|
9292
|
-
data: {
|
|
9293
|
-
strokeAnimation: false
|
|
9294
|
-
},
|
|
9295
|
-
observe: [
|
|
9296
|
-
mutation({
|
|
9297
|
-
async handler() {
|
|
9298
|
-
const svg = await this.svg;
|
|
9299
|
-
if (svg) {
|
|
9300
|
-
applyAttributes.call(this, svg);
|
|
9301
|
-
}
|
|
9302
|
-
},
|
|
9303
|
-
options: {
|
|
9304
|
-
attributes: true,
|
|
9305
|
-
attributeFilter: ["id", "class", "style"]
|
|
9306
|
-
}
|
|
9307
|
-
})
|
|
9308
|
-
],
|
|
9309
|
-
async connected() {
|
|
9310
|
-
if (includes(this.src, "#")) {
|
|
9311
|
-
[this.src, this.icon] = this.src.split("#");
|
|
9312
|
-
}
|
|
9313
|
-
const svg = await this.svg;
|
|
9314
|
-
if (svg) {
|
|
9315
|
-
applyAttributes.call(this, svg);
|
|
9316
|
-
if (this.strokeAnimation) {
|
|
9317
|
-
applyAnimation(svg);
|
|
9318
|
-
}
|
|
9319
|
-
}
|
|
9320
|
-
},
|
|
9321
|
-
methods: {
|
|
9322
|
-
async getSvg() {
|
|
9323
|
-
if (isTag(this.$el, "img") && !this.$el.complete && this.$el.loading === "lazy") {
|
|
9324
|
-
await new Promise((resolve) => once(this.$el, "load", resolve));
|
|
9325
|
-
}
|
|
9326
|
-
return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject("SVG not found.");
|
|
9327
|
-
}
|
|
9328
|
-
}
|
|
9329
|
-
};
|
|
9330
|
-
function applyAttributes(el) {
|
|
9331
|
-
const { $el } = this;
|
|
9332
|
-
addClass(el, attr($el, "class"), "uk-svg");
|
|
9333
|
-
for (let i = 0; i < $el.style.length; i++) {
|
|
9334
|
-
const prop = $el.style[i];
|
|
9335
|
-
css(el, prop, css($el, prop));
|
|
9336
|
-
}
|
|
9337
|
-
for (const attribute in this.attributes) {
|
|
9338
|
-
const [prop, value] = this.attributes[attribute].split(":", 2);
|
|
9339
|
-
attr(el, prop, value);
|
|
9340
|
-
}
|
|
9341
|
-
if (!this.$el.id) {
|
|
9342
|
-
removeAttr(el, "id");
|
|
9343
|
-
}
|
|
9344
|
-
}
|
|
9345
|
-
const loadSVG = memoize(async (src) => {
|
|
9346
|
-
if (src) {
|
|
9347
|
-
if (startsWith(src, "data:")) {
|
|
9348
|
-
return decodeURIComponent(src.split(",")[1]);
|
|
9349
|
-
} else {
|
|
9350
|
-
return (await fetch(src)).text();
|
|
9351
|
-
}
|
|
9352
|
-
} else {
|
|
9353
|
-
return Promise.reject();
|
|
9354
|
-
}
|
|
9355
|
-
});
|
|
9356
|
-
function parseSVG(svg, icon) {
|
|
9357
|
-
if (icon && includes(svg, "<symbol")) {
|
|
9358
|
-
svg = parseSymbols(svg)[icon] || svg;
|
|
9359
|
-
}
|
|
9360
|
-
svg = $(svg.substr(svg.indexOf("<svg")));
|
|
9361
|
-
return (svg == null ? void 0 : svg.hasChildNodes()) && svg;
|
|
9362
|
-
}
|
|
9363
|
-
const symbolRe = /<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g;
|
|
9364
|
-
const parseSymbols = memoize(function(svg) {
|
|
9365
|
-
const symbols = {};
|
|
9366
|
-
symbolRe.lastIndex = 0;
|
|
9367
|
-
let match;
|
|
9368
|
-
while (match = symbolRe.exec(svg)) {
|
|
9369
|
-
symbols[match[3]] = `<svg ${match[1]}svg>`;
|
|
9370
|
-
}
|
|
9371
|
-
return symbols;
|
|
9372
|
-
});
|
|
9373
|
-
function applyAnimation(el) {
|
|
9374
|
-
const length = getMaxPathLength(el);
|
|
9375
|
-
if (length) {
|
|
9376
|
-
css(el, "--uk-animation-stroke", length);
|
|
9377
|
-
}
|
|
9378
|
-
}
|
|
9379
|
-
|
|
9380
9382
|
const selDisabled = ".uk-disabled *, .uk-disabled, [disabled]";
|
|
9381
9383
|
var Switcher = {
|
|
9382
9384
|
mixins: [Togglable],
|