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-core.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() :
|
|
@@ -1866,7 +1866,7 @@
|
|
|
1866
1866
|
}
|
|
1867
1867
|
const key = `_observe${instance._observers.length}`;
|
|
1868
1868
|
if (isFunction(target) && !hasOwn(instance, key)) {
|
|
1869
|
-
registerComputed(instance, key, () => target.call(instance, instance));
|
|
1869
|
+
registerComputed(instance, key, () => toNodes(target.call(instance, instance)));
|
|
1870
1870
|
}
|
|
1871
1871
|
handler = isString(handler) ? instance[handler] : handler.bind(instance);
|
|
1872
1872
|
if (isFunction(options)) {
|
|
@@ -2164,7 +2164,7 @@
|
|
|
2164
2164
|
};
|
|
2165
2165
|
App.util = util;
|
|
2166
2166
|
App.options = {};
|
|
2167
|
-
App.version = "3.20.
|
|
2167
|
+
App.version = "3.20.11-dev.43d76edf7";
|
|
2168
2168
|
|
|
2169
2169
|
const PREFIX = "uk-";
|
|
2170
2170
|
const DATA = "__uikit__";
|
|
@@ -4416,6 +4416,111 @@
|
|
|
4416
4416
|
dimensions.forEach((val, i) => attr(el, props[i], toFloat(val) * this.ratio || null));
|
|
4417
4417
|
}
|
|
4418
4418
|
|
|
4419
|
+
function getMaxPathLength(el) {
|
|
4420
|
+
return isVisible(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
|
|
4421
|
+
}
|
|
4422
|
+
|
|
4423
|
+
var svg = {
|
|
4424
|
+
mixins: [Svg],
|
|
4425
|
+
args: "src",
|
|
4426
|
+
props: {
|
|
4427
|
+
src: String,
|
|
4428
|
+
icon: String,
|
|
4429
|
+
attributes: "list",
|
|
4430
|
+
strokeAnimation: Boolean
|
|
4431
|
+
},
|
|
4432
|
+
data: {
|
|
4433
|
+
strokeAnimation: false
|
|
4434
|
+
},
|
|
4435
|
+
observe: [
|
|
4436
|
+
mutation({
|
|
4437
|
+
async handler() {
|
|
4438
|
+
const svg = await this.svg;
|
|
4439
|
+
if (svg) {
|
|
4440
|
+
applyAttributes.call(this, svg);
|
|
4441
|
+
}
|
|
4442
|
+
},
|
|
4443
|
+
options: {
|
|
4444
|
+
attributes: true,
|
|
4445
|
+
attributeFilter: ["id", "class", "style"]
|
|
4446
|
+
}
|
|
4447
|
+
})
|
|
4448
|
+
],
|
|
4449
|
+
async connected() {
|
|
4450
|
+
if (includes(this.src, "#")) {
|
|
4451
|
+
[this.src, this.icon] = this.src.split("#");
|
|
4452
|
+
}
|
|
4453
|
+
const svg = await this.svg;
|
|
4454
|
+
if (svg) {
|
|
4455
|
+
applyAttributes.call(this, svg);
|
|
4456
|
+
if (this.strokeAnimation) {
|
|
4457
|
+
applyAnimation(svg);
|
|
4458
|
+
}
|
|
4459
|
+
}
|
|
4460
|
+
},
|
|
4461
|
+
methods: {
|
|
4462
|
+
async getSvg() {
|
|
4463
|
+
if (isTag(this.$el, "img") && !this.$el.complete && this.$el.loading === "lazy") {
|
|
4464
|
+
await new Promise((resolve) => once(this.$el, "load", resolve));
|
|
4465
|
+
}
|
|
4466
|
+
return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject("SVG not found.");
|
|
4467
|
+
}
|
|
4468
|
+
}
|
|
4469
|
+
};
|
|
4470
|
+
function applyAttributes(el) {
|
|
4471
|
+
const { $el } = this;
|
|
4472
|
+
addClass(el, attr($el, "class"), "uk-svg");
|
|
4473
|
+
for (let i = 0; i < $el.style.length; i++) {
|
|
4474
|
+
const prop = $el.style[i];
|
|
4475
|
+
css(el, prop, css($el, prop));
|
|
4476
|
+
}
|
|
4477
|
+
for (const attribute in this.attributes) {
|
|
4478
|
+
const [prop, value] = this.attributes[attribute].split(":", 2);
|
|
4479
|
+
attr(el, prop, value);
|
|
4480
|
+
}
|
|
4481
|
+
if (!this.$el.id) {
|
|
4482
|
+
removeAttr(el, "id");
|
|
4483
|
+
}
|
|
4484
|
+
}
|
|
4485
|
+
const loadSVG = memoize(async (src) => {
|
|
4486
|
+
if (src) {
|
|
4487
|
+
if (startsWith(src, "data:")) {
|
|
4488
|
+
return decodeURIComponent(src.split(",")[1]);
|
|
4489
|
+
} else {
|
|
4490
|
+
return (await fetch(src)).text();
|
|
4491
|
+
}
|
|
4492
|
+
} else {
|
|
4493
|
+
return Promise.reject();
|
|
4494
|
+
}
|
|
4495
|
+
});
|
|
4496
|
+
function parseSVG(svg, icon) {
|
|
4497
|
+
if (icon && includes(svg, "<symbol")) {
|
|
4498
|
+
svg = parseSymbols(svg)[icon] || svg;
|
|
4499
|
+
}
|
|
4500
|
+
return stringToSvg(svg);
|
|
4501
|
+
}
|
|
4502
|
+
const symbolRe = /<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g;
|
|
4503
|
+
const parseSymbols = memoize(function(svg) {
|
|
4504
|
+
const symbols = {};
|
|
4505
|
+
symbolRe.lastIndex = 0;
|
|
4506
|
+
let match;
|
|
4507
|
+
while (match = symbolRe.exec(svg)) {
|
|
4508
|
+
symbols[match[3]] = `<svg ${match[1]}svg>`;
|
|
4509
|
+
}
|
|
4510
|
+
return symbols;
|
|
4511
|
+
});
|
|
4512
|
+
function applyAnimation(el) {
|
|
4513
|
+
const length = getMaxPathLength(el);
|
|
4514
|
+
if (length) {
|
|
4515
|
+
css(el, "--uk-animation-stroke", length);
|
|
4516
|
+
}
|
|
4517
|
+
}
|
|
4518
|
+
function stringToSvg(string) {
|
|
4519
|
+
const container = document.createElement("template");
|
|
4520
|
+
container.innerHTML = string;
|
|
4521
|
+
return container.content.firstElementChild;
|
|
4522
|
+
}
|
|
4523
|
+
|
|
4419
4524
|
const icons = {
|
|
4420
4525
|
spinner,
|
|
4421
4526
|
totop,
|
|
@@ -4586,7 +4691,7 @@
|
|
|
4586
4691
|
return null;
|
|
4587
4692
|
}
|
|
4588
4693
|
if (!parsed[icon]) {
|
|
4589
|
-
parsed[icon] =
|
|
4694
|
+
parsed[icon] = stringToSvg(icons[applyRtl(icon)] || icons[icon]);
|
|
4590
4695
|
}
|
|
4591
4696
|
return parsed[icon].cloneNode(true);
|
|
4592
4697
|
}
|
|
@@ -6055,107 +6160,6 @@
|
|
|
6055
6160
|
}
|
|
6056
6161
|
}
|
|
6057
6162
|
|
|
6058
|
-
function getMaxPathLength(el) {
|
|
6059
|
-
return isVisible(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
|
|
6060
|
-
}
|
|
6061
|
-
|
|
6062
|
-
var svg = {
|
|
6063
|
-
mixins: [Svg],
|
|
6064
|
-
args: "src",
|
|
6065
|
-
props: {
|
|
6066
|
-
src: String,
|
|
6067
|
-
icon: String,
|
|
6068
|
-
attributes: "list",
|
|
6069
|
-
strokeAnimation: Boolean
|
|
6070
|
-
},
|
|
6071
|
-
data: {
|
|
6072
|
-
strokeAnimation: false
|
|
6073
|
-
},
|
|
6074
|
-
observe: [
|
|
6075
|
-
mutation({
|
|
6076
|
-
async handler() {
|
|
6077
|
-
const svg = await this.svg;
|
|
6078
|
-
if (svg) {
|
|
6079
|
-
applyAttributes.call(this, svg);
|
|
6080
|
-
}
|
|
6081
|
-
},
|
|
6082
|
-
options: {
|
|
6083
|
-
attributes: true,
|
|
6084
|
-
attributeFilter: ["id", "class", "style"]
|
|
6085
|
-
}
|
|
6086
|
-
})
|
|
6087
|
-
],
|
|
6088
|
-
async connected() {
|
|
6089
|
-
if (includes(this.src, "#")) {
|
|
6090
|
-
[this.src, this.icon] = this.src.split("#");
|
|
6091
|
-
}
|
|
6092
|
-
const svg = await this.svg;
|
|
6093
|
-
if (svg) {
|
|
6094
|
-
applyAttributes.call(this, svg);
|
|
6095
|
-
if (this.strokeAnimation) {
|
|
6096
|
-
applyAnimation(svg);
|
|
6097
|
-
}
|
|
6098
|
-
}
|
|
6099
|
-
},
|
|
6100
|
-
methods: {
|
|
6101
|
-
async getSvg() {
|
|
6102
|
-
if (isTag(this.$el, "img") && !this.$el.complete && this.$el.loading === "lazy") {
|
|
6103
|
-
await new Promise((resolve) => once(this.$el, "load", resolve));
|
|
6104
|
-
}
|
|
6105
|
-
return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject("SVG not found.");
|
|
6106
|
-
}
|
|
6107
|
-
}
|
|
6108
|
-
};
|
|
6109
|
-
function applyAttributes(el) {
|
|
6110
|
-
const { $el } = this;
|
|
6111
|
-
addClass(el, attr($el, "class"), "uk-svg");
|
|
6112
|
-
for (let i = 0; i < $el.style.length; i++) {
|
|
6113
|
-
const prop = $el.style[i];
|
|
6114
|
-
css(el, prop, css($el, prop));
|
|
6115
|
-
}
|
|
6116
|
-
for (const attribute in this.attributes) {
|
|
6117
|
-
const [prop, value] = this.attributes[attribute].split(":", 2);
|
|
6118
|
-
attr(el, prop, value);
|
|
6119
|
-
}
|
|
6120
|
-
if (!this.$el.id) {
|
|
6121
|
-
removeAttr(el, "id");
|
|
6122
|
-
}
|
|
6123
|
-
}
|
|
6124
|
-
const loadSVG = memoize(async (src) => {
|
|
6125
|
-
if (src) {
|
|
6126
|
-
if (startsWith(src, "data:")) {
|
|
6127
|
-
return decodeURIComponent(src.split(",")[1]);
|
|
6128
|
-
} else {
|
|
6129
|
-
return (await fetch(src)).text();
|
|
6130
|
-
}
|
|
6131
|
-
} else {
|
|
6132
|
-
return Promise.reject();
|
|
6133
|
-
}
|
|
6134
|
-
});
|
|
6135
|
-
function parseSVG(svg, icon) {
|
|
6136
|
-
if (icon && includes(svg, "<symbol")) {
|
|
6137
|
-
svg = parseSymbols(svg)[icon] || svg;
|
|
6138
|
-
}
|
|
6139
|
-
svg = $(svg.substr(svg.indexOf("<svg")));
|
|
6140
|
-
return (svg == null ? void 0 : svg.hasChildNodes()) && svg;
|
|
6141
|
-
}
|
|
6142
|
-
const symbolRe = /<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g;
|
|
6143
|
-
const parseSymbols = memoize(function(svg) {
|
|
6144
|
-
const symbols = {};
|
|
6145
|
-
symbolRe.lastIndex = 0;
|
|
6146
|
-
let match;
|
|
6147
|
-
while (match = symbolRe.exec(svg)) {
|
|
6148
|
-
symbols[match[3]] = `<svg ${match[1]}svg>`;
|
|
6149
|
-
}
|
|
6150
|
-
return symbols;
|
|
6151
|
-
});
|
|
6152
|
-
function applyAnimation(el) {
|
|
6153
|
-
const length = getMaxPathLength(el);
|
|
6154
|
-
if (length) {
|
|
6155
|
-
css(el, "--uk-animation-stroke", length);
|
|
6156
|
-
}
|
|
6157
|
-
}
|
|
6158
|
-
|
|
6159
6163
|
const selDisabled = ".uk-disabled *, .uk-disabled, [disabled]";
|
|
6160
6164
|
var Switcher = {
|
|
6161
6165
|
mixins: [Togglable],
|