uikit 3.20.10-dev.de039bb62 → 3.20.11-dev.3a41e0fa6
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 +15 -3
- package/build/release.js +1 -1
- package/build/scope.js +4 -9
- 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 +3 -3
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +3 -3
- 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 +6 -6
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +6 -6
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +13 -8
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +6 -6
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +11 -8
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +5 -8
- 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 +115 -111
- 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 +125 -124
- package/dist/js/uikit.min.js +1 -1
- package/package.json +4 -3
- package/src/js/api/observer.js +2 -2
- package/src/js/components/filter.js +1 -8
- package/src/js/components/internal/slider-transitioner.js +6 -0
- package/src/js/components/sortable.js +7 -9
- package/src/js/core/icon.js +2 -1
- package/src/js/core/svg.js +7 -3
- package/src/js/mixin/media.js +1 -1
- package/src/js/mixin/parallax.js +2 -2
- package/src/js/mixin/slider-parallax.js +5 -0
- package/src/js/mixin/slider.js +2 -2
- package/src/js/util/filter.js +3 -3
- package/src/js/util/selector.js +2 -2
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.20.
|
|
1
|
+
/*! UIkit 3.20.11-dev.3a41e0fa6 | 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() :
|
|
@@ -348,9 +348,9 @@
|
|
|
348
348
|
}
|
|
349
349
|
function getTargetedElement(el) {
|
|
350
350
|
if (isSameSiteAnchor(el)) {
|
|
351
|
-
|
|
352
|
-
const id = decodeURIComponent(
|
|
353
|
-
return
|
|
351
|
+
const { hash, ownerDocument } = toNode(el);
|
|
352
|
+
const id = decodeURIComponent(hash).slice(1);
|
|
353
|
+
return ownerDocument.getElementById(id) || ownerDocument.getElementsByName(id)[0];
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
|
|
@@ -389,9 +389,9 @@
|
|
|
389
389
|
};
|
|
390
390
|
});
|
|
391
391
|
const parsePositionSelector = memoize((selector) => {
|
|
392
|
-
selector = selector.
|
|
392
|
+
selector = selector.slice(1).trim();
|
|
393
393
|
const index2 = selector.indexOf(" ");
|
|
394
|
-
return ~index2 ? [selector.
|
|
394
|
+
return ~index2 ? [selector.slice(0, index2), selector.slice(index2 + 1)] : [selector, ""];
|
|
395
395
|
});
|
|
396
396
|
function _query(selector, context = document, queryFn) {
|
|
397
397
|
if (!selector || !isString(selector)) {
|
|
@@ -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.3a41e0fa6";
|
|
3543
3538
|
|
|
3544
3539
|
const PREFIX = "uk-";
|
|
3545
3540
|
const DATA = "__uikit__";
|
|
@@ -3994,14 +3989,14 @@
|
|
|
3994
3989
|
getValidIndex(index = this.index, prevIndex = this.prevIndex) {
|
|
3995
3990
|
return this.getIndex(index, prevIndex);
|
|
3996
3991
|
},
|
|
3997
|
-
_show(prev, next, force) {
|
|
3992
|
+
async _show(prev, next, force) {
|
|
3998
3993
|
this._transitioner = this._getTransitioner(prev, next, this.dir, {
|
|
3999
3994
|
easing: force ? next.offsetWidth < 600 ? "cubic-bezier(0.25, 0.46, 0.45, 0.94)" : "cubic-bezier(0.165, 0.84, 0.44, 1)" : this.easing,
|
|
4000
3995
|
...this.transitionOptions
|
|
4001
3996
|
});
|
|
4002
3997
|
if (!force && !prev) {
|
|
4003
3998
|
this._translate(1);
|
|
4004
|
-
return
|
|
3999
|
+
return;
|
|
4005
4000
|
}
|
|
4006
4001
|
const { length } = this.stack;
|
|
4007
4002
|
return this._transitioner[length > 1 ? "forward" : "show"](
|
|
@@ -4522,7 +4517,7 @@
|
|
|
4522
4517
|
function toMedia(value, element) {
|
|
4523
4518
|
if (isString(value)) {
|
|
4524
4519
|
if (startsWith(value, "@")) {
|
|
4525
|
-
value = toFloat(css(element, `--uk-breakpoint-${value.
|
|
4520
|
+
value = toFloat(css(element, `--uk-breakpoint-${value.slice(1)}`));
|
|
4526
4521
|
} else if (isNaN(value)) {
|
|
4527
4522
|
return value;
|
|
4528
4523
|
}
|
|
@@ -4725,13 +4720,13 @@
|
|
|
4725
4720
|
};
|
|
4726
4721
|
}
|
|
4727
4722
|
function getBackgroundPos(el, prop) {
|
|
4728
|
-
return getCssValue(el, `background-position-${prop.
|
|
4723
|
+
return getCssValue(el, `background-position-${prop.slice(-1)}`, "");
|
|
4729
4724
|
}
|
|
4730
4725
|
function setBackgroundPosFn(bgProps, positions, props2) {
|
|
4731
4726
|
return function(css2, percent) {
|
|
4732
4727
|
for (const prop of bgProps) {
|
|
4733
4728
|
const value = getValue(props2[prop], percent);
|
|
4734
|
-
css2[`background-position-${prop.
|
|
4729
|
+
css2[`background-position-${prop.slice(-1)}`] = `calc(${positions[prop]} + ${value}px)`;
|
|
4735
4730
|
}
|
|
4736
4731
|
};
|
|
4737
4732
|
}
|
|
@@ -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);
|
|
@@ -5054,7 +5052,9 @@
|
|
|
5054
5052
|
show(duration, percent = 0, linear) {
|
|
5055
5053
|
const timing = linear ? "linear" : easing;
|
|
5056
5054
|
duration -= Math.round(duration * clamp(percent, -1, 1));
|
|
5055
|
+
css(list, "transitionProperty", "none");
|
|
5057
5056
|
this.translate(percent);
|
|
5057
|
+
css(list, "transitionProperty", "");
|
|
5058
5058
|
percent = prev ? percent : clamp(percent, 0, 1);
|
|
5059
5059
|
triggerUpdate(this.getItemIn(), "itemin", { percent, duration, timing, dir });
|
|
5060
5060
|
prev && triggerUpdate(this.getItemIn(true), "itemout", {
|
|
@@ -5739,11 +5739,10 @@
|
|
|
5739
5739
|
},
|
|
5740
5740
|
move: throttle(function(e) {
|
|
5741
5741
|
assign(this.pos, getEventPos(e));
|
|
5742
|
-
if (this.drag) {
|
|
5743
|
-
this.$emit("move");
|
|
5744
|
-
} else if (Math.abs(this.pos.x - this.origin.x) > this.threshold || Math.abs(this.pos.y - this.origin.y) > this.threshold) {
|
|
5742
|
+
if (!this.drag && (Math.abs(this.pos.x - this.origin.x) > this.threshold || Math.abs(this.pos.y - this.origin.y) > this.threshold)) {
|
|
5745
5743
|
this.start(e);
|
|
5746
5744
|
}
|
|
5745
|
+
this.$emit("move");
|
|
5747
5746
|
}),
|
|
5748
5747
|
end() {
|
|
5749
5748
|
off(document, pointerMove$1, this.move);
|
|
@@ -5903,10 +5902,8 @@
|
|
|
5903
5902
|
return function(...args) {
|
|
5904
5903
|
if (!throttled) {
|
|
5905
5904
|
throttled = true;
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
fn.call(this, ...args);
|
|
5909
|
-
});
|
|
5905
|
+
fn.call(this, ...args);
|
|
5906
|
+
requestAnimationFrame(() => throttled = false);
|
|
5910
5907
|
}
|
|
5911
5908
|
};
|
|
5912
5909
|
}
|
|
@@ -7889,6 +7886,107 @@
|
|
|
7889
7886
|
dimensions.forEach((val, i) => attr(el, props[i], toFloat(val) * this.ratio || null));
|
|
7890
7887
|
}
|
|
7891
7888
|
|
|
7889
|
+
var svg = {
|
|
7890
|
+
mixins: [Svg],
|
|
7891
|
+
args: "src",
|
|
7892
|
+
props: {
|
|
7893
|
+
src: String,
|
|
7894
|
+
icon: String,
|
|
7895
|
+
attributes: "list",
|
|
7896
|
+
strokeAnimation: Boolean
|
|
7897
|
+
},
|
|
7898
|
+
data: {
|
|
7899
|
+
strokeAnimation: false
|
|
7900
|
+
},
|
|
7901
|
+
observe: [
|
|
7902
|
+
mutation({
|
|
7903
|
+
async handler() {
|
|
7904
|
+
const svg = await this.svg;
|
|
7905
|
+
if (svg) {
|
|
7906
|
+
applyAttributes.call(this, svg);
|
|
7907
|
+
}
|
|
7908
|
+
},
|
|
7909
|
+
options: {
|
|
7910
|
+
attributes: true,
|
|
7911
|
+
attributeFilter: ["id", "class", "style"]
|
|
7912
|
+
}
|
|
7913
|
+
})
|
|
7914
|
+
],
|
|
7915
|
+
async connected() {
|
|
7916
|
+
if (includes(this.src, "#")) {
|
|
7917
|
+
[this.src, this.icon] = this.src.split("#");
|
|
7918
|
+
}
|
|
7919
|
+
const svg = await this.svg;
|
|
7920
|
+
if (svg) {
|
|
7921
|
+
applyAttributes.call(this, svg);
|
|
7922
|
+
if (this.strokeAnimation) {
|
|
7923
|
+
applyAnimation(svg);
|
|
7924
|
+
}
|
|
7925
|
+
}
|
|
7926
|
+
},
|
|
7927
|
+
methods: {
|
|
7928
|
+
async getSvg() {
|
|
7929
|
+
if (isTag(this.$el, "img") && !this.$el.complete && this.$el.loading === "lazy") {
|
|
7930
|
+
await new Promise((resolve) => once(this.$el, "load", resolve));
|
|
7931
|
+
}
|
|
7932
|
+
return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject("SVG not found.");
|
|
7933
|
+
}
|
|
7934
|
+
}
|
|
7935
|
+
};
|
|
7936
|
+
function applyAttributes(el) {
|
|
7937
|
+
const { $el } = this;
|
|
7938
|
+
addClass(el, attr($el, "class"), "uk-svg");
|
|
7939
|
+
for (let i = 0; i < $el.style.length; i++) {
|
|
7940
|
+
const prop = $el.style[i];
|
|
7941
|
+
css(el, prop, css($el, prop));
|
|
7942
|
+
}
|
|
7943
|
+
for (const attribute in this.attributes) {
|
|
7944
|
+
const [prop, value] = this.attributes[attribute].split(":", 2);
|
|
7945
|
+
attr(el, prop, value);
|
|
7946
|
+
}
|
|
7947
|
+
if (!this.$el.id) {
|
|
7948
|
+
removeAttr(el, "id");
|
|
7949
|
+
}
|
|
7950
|
+
}
|
|
7951
|
+
const loadSVG = memoize(async (src) => {
|
|
7952
|
+
if (src) {
|
|
7953
|
+
if (startsWith(src, "data:")) {
|
|
7954
|
+
return decodeURIComponent(src.split(",")[1]);
|
|
7955
|
+
} else {
|
|
7956
|
+
return (await fetch(src)).text();
|
|
7957
|
+
}
|
|
7958
|
+
} else {
|
|
7959
|
+
return Promise.reject();
|
|
7960
|
+
}
|
|
7961
|
+
});
|
|
7962
|
+
function parseSVG(svg, icon) {
|
|
7963
|
+
if (icon && includes(svg, "<symbol")) {
|
|
7964
|
+
svg = parseSymbols(svg)[icon] || svg;
|
|
7965
|
+
}
|
|
7966
|
+
return stringToSvg(svg);
|
|
7967
|
+
}
|
|
7968
|
+
const symbolRe = /<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g;
|
|
7969
|
+
const parseSymbols = memoize(function(svg) {
|
|
7970
|
+
const symbols = {};
|
|
7971
|
+
symbolRe.lastIndex = 0;
|
|
7972
|
+
let match;
|
|
7973
|
+
while (match = symbolRe.exec(svg)) {
|
|
7974
|
+
symbols[match[3]] = `<svg ${match[1]}svg>`;
|
|
7975
|
+
}
|
|
7976
|
+
return symbols;
|
|
7977
|
+
});
|
|
7978
|
+
function applyAnimation(el) {
|
|
7979
|
+
const length = getMaxPathLength(el);
|
|
7980
|
+
if (length) {
|
|
7981
|
+
css(el, "--uk-animation-stroke", length);
|
|
7982
|
+
}
|
|
7983
|
+
}
|
|
7984
|
+
function stringToSvg(string) {
|
|
7985
|
+
const container = document.createElement("template");
|
|
7986
|
+
container.innerHTML = string;
|
|
7987
|
+
return container.content.firstElementChild;
|
|
7988
|
+
}
|
|
7989
|
+
|
|
7892
7990
|
const icons = {
|
|
7893
7991
|
spinner,
|
|
7894
7992
|
totop,
|
|
@@ -8059,7 +8157,7 @@
|
|
|
8059
8157
|
return null;
|
|
8060
8158
|
}
|
|
8061
8159
|
if (!parsed[icon]) {
|
|
8062
|
-
parsed[icon] =
|
|
8160
|
+
parsed[icon] = stringToSvg(icons[applyRtl(icon)] || icons[icon]);
|
|
8063
8161
|
}
|
|
8064
8162
|
return parsed[icon].cloneNode(true);
|
|
8065
8163
|
}
|
|
@@ -9278,103 +9376,6 @@
|
|
|
9278
9376
|
}
|
|
9279
9377
|
}
|
|
9280
9378
|
|
|
9281
|
-
var svg = {
|
|
9282
|
-
mixins: [Svg],
|
|
9283
|
-
args: "src",
|
|
9284
|
-
props: {
|
|
9285
|
-
src: String,
|
|
9286
|
-
icon: String,
|
|
9287
|
-
attributes: "list",
|
|
9288
|
-
strokeAnimation: Boolean
|
|
9289
|
-
},
|
|
9290
|
-
data: {
|
|
9291
|
-
strokeAnimation: false
|
|
9292
|
-
},
|
|
9293
|
-
observe: [
|
|
9294
|
-
mutation({
|
|
9295
|
-
async handler() {
|
|
9296
|
-
const svg = await this.svg;
|
|
9297
|
-
if (svg) {
|
|
9298
|
-
applyAttributes.call(this, svg);
|
|
9299
|
-
}
|
|
9300
|
-
},
|
|
9301
|
-
options: {
|
|
9302
|
-
attributes: true,
|
|
9303
|
-
attributeFilter: ["id", "class", "style"]
|
|
9304
|
-
}
|
|
9305
|
-
})
|
|
9306
|
-
],
|
|
9307
|
-
async connected() {
|
|
9308
|
-
if (includes(this.src, "#")) {
|
|
9309
|
-
[this.src, this.icon] = this.src.split("#");
|
|
9310
|
-
}
|
|
9311
|
-
const svg = await this.svg;
|
|
9312
|
-
if (svg) {
|
|
9313
|
-
applyAttributes.call(this, svg);
|
|
9314
|
-
if (this.strokeAnimation) {
|
|
9315
|
-
applyAnimation(svg);
|
|
9316
|
-
}
|
|
9317
|
-
}
|
|
9318
|
-
},
|
|
9319
|
-
methods: {
|
|
9320
|
-
async getSvg() {
|
|
9321
|
-
if (isTag(this.$el, "img") && !this.$el.complete && this.$el.loading === "lazy") {
|
|
9322
|
-
await new Promise((resolve) => once(this.$el, "load", resolve));
|
|
9323
|
-
}
|
|
9324
|
-
return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject("SVG not found.");
|
|
9325
|
-
}
|
|
9326
|
-
}
|
|
9327
|
-
};
|
|
9328
|
-
function applyAttributes(el) {
|
|
9329
|
-
const { $el } = this;
|
|
9330
|
-
addClass(el, attr($el, "class"), "uk-svg");
|
|
9331
|
-
for (let i = 0; i < $el.style.length; i++) {
|
|
9332
|
-
const prop = $el.style[i];
|
|
9333
|
-
css(el, prop, css($el, prop));
|
|
9334
|
-
}
|
|
9335
|
-
for (const attribute in this.attributes) {
|
|
9336
|
-
const [prop, value] = this.attributes[attribute].split(":", 2);
|
|
9337
|
-
attr(el, prop, value);
|
|
9338
|
-
}
|
|
9339
|
-
if (!this.$el.id) {
|
|
9340
|
-
removeAttr(el, "id");
|
|
9341
|
-
}
|
|
9342
|
-
}
|
|
9343
|
-
const loadSVG = memoize(async (src) => {
|
|
9344
|
-
if (src) {
|
|
9345
|
-
if (startsWith(src, "data:")) {
|
|
9346
|
-
return decodeURIComponent(src.split(",")[1]);
|
|
9347
|
-
} else {
|
|
9348
|
-
return (await fetch(src)).text();
|
|
9349
|
-
}
|
|
9350
|
-
} else {
|
|
9351
|
-
return Promise.reject();
|
|
9352
|
-
}
|
|
9353
|
-
});
|
|
9354
|
-
function parseSVG(svg, icon) {
|
|
9355
|
-
if (icon && includes(svg, "<symbol")) {
|
|
9356
|
-
svg = parseSymbols(svg)[icon] || svg;
|
|
9357
|
-
}
|
|
9358
|
-
svg = $(svg.substr(svg.indexOf("<svg")));
|
|
9359
|
-
return (svg == null ? void 0 : svg.hasChildNodes()) && svg;
|
|
9360
|
-
}
|
|
9361
|
-
const symbolRe = /<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g;
|
|
9362
|
-
const parseSymbols = memoize(function(svg) {
|
|
9363
|
-
const symbols = {};
|
|
9364
|
-
symbolRe.lastIndex = 0;
|
|
9365
|
-
let match;
|
|
9366
|
-
while (match = symbolRe.exec(svg)) {
|
|
9367
|
-
symbols[match[3]] = `<svg ${match[1]}svg>`;
|
|
9368
|
-
}
|
|
9369
|
-
return symbols;
|
|
9370
|
-
});
|
|
9371
|
-
function applyAnimation(el) {
|
|
9372
|
-
const length = getMaxPathLength(el);
|
|
9373
|
-
if (length) {
|
|
9374
|
-
css(el, "--uk-animation-stroke", length);
|
|
9375
|
-
}
|
|
9376
|
-
}
|
|
9377
|
-
|
|
9378
9379
|
const selDisabled = ".uk-disabled *, .uk-disabled, [disabled]";
|
|
9379
9380
|
var Switcher = {
|
|
9380
9381
|
mixins: [Togglable],
|