uikit 3.25.23-dev.2ad20f7 → 3.25.23-dev.9ebc131
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 +4 -0
- package/build/build.js +1 -2
- package/build/scss.js +83 -54
- 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 +2 -2
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +4 -4
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +326 -37
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +326 -37
- 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 +195 -195
- 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 -9
- 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 +6 -4
- 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 +110 -102
- 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 -104
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/app.js +2 -4
- package/src/js/api/component.js +12 -8
- package/src/js/api/observables.js +2 -4
- package/src/js/api/props.js +1 -2
- package/src/js/components/countdown.js +1 -1
- package/src/js/components/slider.js +1 -1
- package/src/js/components/slideshow.js +0 -5
- package/src/js/components/tooltip.js +4 -2
- package/src/js/core/accordion.js +11 -7
- package/src/js/core/drop.js +10 -32
- package/src/js/core/dropnav.js +1 -1
- package/src/js/core/form-custom.js +1 -1
- package/src/js/core/img.js +2 -7
- package/src/js/core/overflow-fade.js +6 -5
- package/src/js/mixin/event.js +31 -0
- package/src/js/mixin/modal.js +26 -34
- package/src/js/mixin/svg.js +1 -1
- package/src/js/util/event.js +1 -5
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.25.23-dev.
|
|
1
|
+
/*! UIkit 3.25.23-dev.9ebc131 | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -516,10 +516,7 @@
|
|
|
516
516
|
return toEventTargets(targets).map((target) => target.dispatchEvent(createEvent(event, true, true, detail2))).every((result) => result);
|
|
517
517
|
}
|
|
518
518
|
function createEvent(e, bubbles = true, cancelable = false, detail2) {
|
|
519
|
-
|
|
520
|
-
e = new CustomEvent(e, { bubbles, cancelable, detail: detail2 });
|
|
521
|
-
}
|
|
522
|
-
return e;
|
|
519
|
+
return isString(e) ? new CustomEvent(e, { bubbles, cancelable, detail: detail2 }) : e;
|
|
523
520
|
}
|
|
524
521
|
function getArgs(args) {
|
|
525
522
|
args[0] = toEventTargets(args[0]);
|
|
@@ -1681,7 +1678,7 @@
|
|
|
1681
1678
|
wrapInner: wrapInner
|
|
1682
1679
|
});
|
|
1683
1680
|
|
|
1684
|
-
var VERSION = '3.25.23-dev.
|
|
1681
|
+
var VERSION = '3.25.23-dev.9ebc131';
|
|
1685
1682
|
|
|
1686
1683
|
function initUpdates(instance) {
|
|
1687
1684
|
instance._data = {};
|
|
@@ -2048,7 +2045,7 @@
|
|
|
2048
2045
|
}
|
|
2049
2046
|
const getAttributes = memoize((id, props) => {
|
|
2050
2047
|
const attributes = Object.keys(props);
|
|
2051
|
-
const filter = attributes.concat(id).
|
|
2048
|
+
const filter = attributes.concat(id).flatMap((key) => [hyphenate(key), `data-${hyphenate(key)}`]);
|
|
2052
2049
|
return { attributes, filter };
|
|
2053
2050
|
});
|
|
2054
2051
|
function initPropsObserver(instance) {
|
|
@@ -2157,15 +2154,15 @@
|
|
|
2157
2154
|
return data;
|
|
2158
2155
|
}
|
|
2159
2156
|
|
|
2160
|
-
|
|
2157
|
+
function App(options) {
|
|
2161
2158
|
init$1(this, options);
|
|
2162
|
-
}
|
|
2159
|
+
}
|
|
2163
2160
|
App.util = util;
|
|
2164
2161
|
App.options = {};
|
|
2165
2162
|
App.version = VERSION;
|
|
2166
2163
|
|
|
2167
2164
|
const PREFIX = "uk-";
|
|
2168
|
-
const
|
|
2165
|
+
const elementComponents = /* @__PURE__ */ new WeakMap();
|
|
2169
2166
|
const components$1 = {};
|
|
2170
2167
|
function component(name, options) {
|
|
2171
2168
|
var _a, _b;
|
|
@@ -2203,22 +2200,24 @@
|
|
|
2203
2200
|
}
|
|
2204
2201
|
}
|
|
2205
2202
|
function getComponents(element) {
|
|
2206
|
-
return (element
|
|
2203
|
+
return elementComponents.get(element) || {};
|
|
2207
2204
|
}
|
|
2208
2205
|
function getComponent(element, name) {
|
|
2209
2206
|
return getComponents(element)[name];
|
|
2210
2207
|
}
|
|
2211
2208
|
function attachToElement(element, instance) {
|
|
2212
|
-
|
|
2213
|
-
|
|
2209
|
+
let components2 = elementComponents.get(element);
|
|
2210
|
+
if (!components2) {
|
|
2211
|
+
components2 = {};
|
|
2212
|
+
elementComponents.set(element, components2);
|
|
2214
2213
|
}
|
|
2215
|
-
|
|
2214
|
+
components2[instance.$options.name] = instance;
|
|
2216
2215
|
}
|
|
2217
2216
|
function detachFromElement(element, instance) {
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
if (isEmpty(
|
|
2221
|
-
delete
|
|
2217
|
+
const components2 = elementComponents.get(element);
|
|
2218
|
+
components2 == null ? true : delete components2[instance.$options.name];
|
|
2219
|
+
if (isEmpty(components2)) {
|
|
2220
|
+
elementComponents.delete(element);
|
|
2222
2221
|
}
|
|
2223
2222
|
}
|
|
2224
2223
|
|
|
@@ -2413,8 +2412,8 @@
|
|
|
2413
2412
|
for (const el of toNodes(isFunction(targets) ? targets(this) : targets)) {
|
|
2414
2413
|
$$('[loading="lazy"]', el).slice(0, preload - 1).forEach((el2) => removeAttr(el2, "loading"));
|
|
2415
2414
|
}
|
|
2416
|
-
for (const
|
|
2417
|
-
observer.unobserve(
|
|
2415
|
+
for (const { isIntersecting, target } of entries) {
|
|
2416
|
+
isIntersecting && observer.unobserve(target);
|
|
2418
2417
|
}
|
|
2419
2418
|
},
|
|
2420
2419
|
...options
|
|
@@ -2492,11 +2491,48 @@
|
|
|
2492
2491
|
}
|
|
2493
2492
|
};
|
|
2494
2493
|
|
|
2494
|
+
const keyMap = {
|
|
2495
|
+
TAB: 9,
|
|
2496
|
+
ENTER: 13,
|
|
2497
|
+
ESC: 27,
|
|
2498
|
+
SPACE: 32,
|
|
2499
|
+
END: 35,
|
|
2500
|
+
HOME: 36,
|
|
2501
|
+
LEFT: 37,
|
|
2502
|
+
UP: 38,
|
|
2503
|
+
RIGHT: 39,
|
|
2504
|
+
DOWN: 40
|
|
2505
|
+
};
|
|
2506
|
+
|
|
2495
2507
|
function maybeDefaultPreventClick(e) {
|
|
2496
2508
|
if (e.target.closest('a[href="#"],a[href=""]')) {
|
|
2497
2509
|
e.preventDefault();
|
|
2498
2510
|
}
|
|
2499
2511
|
}
|
|
2512
|
+
function onEscape(handler, isEligible = () => true) {
|
|
2513
|
+
return on(document, "keydown", (e) => {
|
|
2514
|
+
if (e.keyCode === keyMap.ESC && isEligible()) {
|
|
2515
|
+
handler(e);
|
|
2516
|
+
}
|
|
2517
|
+
});
|
|
2518
|
+
}
|
|
2519
|
+
function onOutsidePointer(handler, isOutside, isEligible) {
|
|
2520
|
+
return on(document, pointerDown, ({ target }) => {
|
|
2521
|
+
if (!isOutside(target) || isEligible && !isEligible()) {
|
|
2522
|
+
return;
|
|
2523
|
+
}
|
|
2524
|
+
once(
|
|
2525
|
+
document,
|
|
2526
|
+
`${pointerUp} ${pointerCancel} scroll`,
|
|
2527
|
+
({ defaultPrevented, type, target: newTarget }) => {
|
|
2528
|
+
if (!defaultPrevented && type === pointerUp && target === newTarget) {
|
|
2529
|
+
handler(target);
|
|
2530
|
+
}
|
|
2531
|
+
},
|
|
2532
|
+
true
|
|
2533
|
+
);
|
|
2534
|
+
});
|
|
2535
|
+
}
|
|
2500
2536
|
|
|
2501
2537
|
var Togglable = {
|
|
2502
2538
|
props: {
|
|
@@ -2676,19 +2712,7 @@
|
|
|
2676
2712
|
);
|
|
2677
2713
|
}
|
|
2678
2714
|
|
|
2679
|
-
const
|
|
2680
|
-
TAB: 9,
|
|
2681
|
-
ENTER: 13,
|
|
2682
|
-
ESC: 27,
|
|
2683
|
-
SPACE: 32,
|
|
2684
|
-
END: 35,
|
|
2685
|
-
HOME: 36,
|
|
2686
|
-
LEFT: 37,
|
|
2687
|
-
UP: 38,
|
|
2688
|
-
RIGHT: 39,
|
|
2689
|
-
DOWN: 40
|
|
2690
|
-
};
|
|
2691
|
-
|
|
2715
|
+
const wrappers = /* @__PURE__ */ new WeakMap();
|
|
2692
2716
|
var Accordion = {
|
|
2693
2717
|
mixins: [Class, Togglable],
|
|
2694
2718
|
props: {
|
|
@@ -2718,10 +2742,12 @@
|
|
|
2718
2742
|
return this.items.map((item) => $(toggle, item));
|
|
2719
2743
|
},
|
|
2720
2744
|
contents({ content }) {
|
|
2721
|
-
return this.items.map(
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2745
|
+
return this.items.map(
|
|
2746
|
+
(item) => {
|
|
2747
|
+
var _a;
|
|
2748
|
+
return ((_a = wrappers.get(item)) == null ? void 0 : _a.firstElementChild) || $(content, item);
|
|
2749
|
+
}
|
|
2750
|
+
);
|
|
2725
2751
|
}
|
|
2726
2752
|
},
|
|
2727
2753
|
watch: {
|
|
@@ -2828,12 +2854,12 @@
|
|
|
2828
2854
|
el && (el.hidden = hide2);
|
|
2829
2855
|
}
|
|
2830
2856
|
async function transition(el, show, { content, duration, velocity, transition: transition2 }) {
|
|
2831
|
-
|
|
2832
|
-
content = (
|
|
2833
|
-
if (!
|
|
2834
|
-
|
|
2857
|
+
let wrapper = wrappers.get(el);
|
|
2858
|
+
content = (wrapper == null ? void 0 : wrapper.firstElementChild) || $(content, el);
|
|
2859
|
+
if (!wrapper) {
|
|
2860
|
+
wrapper = wrapAll(content, "<div>");
|
|
2861
|
+
wrappers.set(el, wrapper);
|
|
2835
2862
|
}
|
|
2836
|
-
const wrapper = el._wrapper;
|
|
2837
2863
|
css(wrapper, "overflow", "hidden");
|
|
2838
2864
|
const currentHeight = toFloat(css(wrapper, "height"));
|
|
2839
2865
|
await Transition.cancel(wrapper);
|
|
@@ -2844,7 +2870,7 @@
|
|
|
2844
2870
|
css(wrapper, "height", currentHeight);
|
|
2845
2871
|
await Transition.start(wrapper, { height: show ? endHeight : 0 }, duration, transition2);
|
|
2846
2872
|
unwrap(content);
|
|
2847
|
-
delete
|
|
2873
|
+
wrappers.delete(el);
|
|
2848
2874
|
if (!show) {
|
|
2849
2875
|
hide(content, true);
|
|
2850
2876
|
}
|
|
@@ -3548,32 +3574,21 @@
|
|
|
3548
3574
|
});
|
|
3549
3575
|
}
|
|
3550
3576
|
function listenForEscClose$1(drop) {
|
|
3551
|
-
return
|
|
3552
|
-
if (e.keyCode === keyMap.ESC) {
|
|
3553
|
-
drop.hide(false);
|
|
3554
|
-
}
|
|
3555
|
-
});
|
|
3577
|
+
return onEscape(() => drop.hide(false));
|
|
3556
3578
|
}
|
|
3557
3579
|
function listenForScrollClose(drop) {
|
|
3558
3580
|
return listenForScroll(drop, () => drop.hide(false));
|
|
3559
3581
|
}
|
|
3560
3582
|
function listenForBackgroundClose$1(drop) {
|
|
3561
|
-
return
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
if (!defaultPrevented && type === pointerUp && target === newTarget && !((_a = drop.targetEl) == null ? void 0 : _a.contains(target))) {
|
|
3571
|
-
drop.hide(false);
|
|
3572
|
-
}
|
|
3573
|
-
},
|
|
3574
|
-
true
|
|
3575
|
-
);
|
|
3576
|
-
});
|
|
3583
|
+
return onOutsidePointer(
|
|
3584
|
+
(target) => {
|
|
3585
|
+
var _a;
|
|
3586
|
+
if (!((_a = drop.targetEl) == null ? void 0 : _a.contains(target))) {
|
|
3587
|
+
drop.hide(false);
|
|
3588
|
+
}
|
|
3589
|
+
},
|
|
3590
|
+
(target) => !drop.$el.contains(target)
|
|
3591
|
+
);
|
|
3577
3592
|
}
|
|
3578
3593
|
|
|
3579
3594
|
var Dropnav = {
|
|
@@ -3616,7 +3631,7 @@
|
|
|
3616
3631
|
return null;
|
|
3617
3632
|
}
|
|
3618
3633
|
dropbar = this._dropbar || query(dropbar, this.$el) || $(`+ .${this.clsDropbar}`, this.$el);
|
|
3619
|
-
return dropbar
|
|
3634
|
+
return dropbar || (this._dropbar = $("<div>"));
|
|
3620
3635
|
},
|
|
3621
3636
|
dropContainer(_, $el) {
|
|
3622
3637
|
return this.container || $el;
|
|
@@ -3930,7 +3945,7 @@
|
|
|
3930
3945
|
let option;
|
|
3931
3946
|
const prop = isInput(target) ? "value" : "textContent";
|
|
3932
3947
|
const prev = target[prop];
|
|
3933
|
-
const value = ((_a = input.files) == null ? void 0 : _a[0]) ? input.files[0].name : matches(input, "select") && (option = $$("option", input).
|
|
3948
|
+
const value = ((_a = input.files) == null ? void 0 : _a[0]) ? input.files[0].name : matches(input, "select") && (option = $$("option", input).find((el) => el.selected)) ? option.textContent : input.value;
|
|
3934
3949
|
if (prev !== value) {
|
|
3935
3950
|
target[prop] = value;
|
|
3936
3951
|
}
|
|
@@ -4541,7 +4556,7 @@
|
|
|
4541
4556
|
if (icon && includes(svg, "<symbol")) {
|
|
4542
4557
|
svg = parseSymbols(svg)[icon] || svg;
|
|
4543
4558
|
}
|
|
4544
|
-
return toNodes(fragment(svg)).
|
|
4559
|
+
return toNodes(fragment(svg)).find(isElement);
|
|
4545
4560
|
}
|
|
4546
4561
|
const symbolRe = /<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g;
|
|
4547
4562
|
const parseSymbols = memoize(function(svg) {
|
|
@@ -4799,8 +4814,7 @@
|
|
|
4799
4814
|
const elements = isTag(parentNode, "picture") ? children(parentNode) : [el];
|
|
4800
4815
|
elements.forEach((el2) => setSourceProps(el2, el2));
|
|
4801
4816
|
} else if (src) {
|
|
4802
|
-
|
|
4803
|
-
if (change) {
|
|
4817
|
+
if (!includes(el.style.backgroundImage, src)) {
|
|
4804
4818
|
css(el, "backgroundImage", `url(${escape(src)})`);
|
|
4805
4819
|
trigger(el, createEvent("load", false));
|
|
4806
4820
|
}
|
|
@@ -4848,10 +4862,7 @@
|
|
|
4848
4862
|
} else {
|
|
4849
4863
|
sources = parseOptions(sources);
|
|
4850
4864
|
}
|
|
4851
|
-
|
|
4852
|
-
sources = [sources];
|
|
4853
|
-
}
|
|
4854
|
-
return sources.filter((source) => !isEmpty(source));
|
|
4865
|
+
return (isArray(sources) ? sources : [sources]).filter((source) => !isEmpty(source));
|
|
4855
4866
|
}
|
|
4856
4867
|
function isImg(el) {
|
|
4857
4868
|
return isTag(el, "img");
|
|
@@ -5033,6 +5044,7 @@
|
|
|
5033
5044
|
}
|
|
5034
5045
|
|
|
5035
5046
|
const active = [];
|
|
5047
|
+
const pendingReject = /* @__PURE__ */ new WeakMap();
|
|
5036
5048
|
var Modal = {
|
|
5037
5049
|
mixins: [Class, Container, Togglable],
|
|
5038
5050
|
props: {
|
|
@@ -5187,11 +5199,13 @@
|
|
|
5187
5199
|
}
|
|
5188
5200
|
};
|
|
5189
5201
|
function animate(el, show, { transitionElement, _toggle }) {
|
|
5202
|
+
let rejectAnimation;
|
|
5190
5203
|
return new Promise(
|
|
5191
5204
|
(resolve, reject) => once(el, "show hide", () => {
|
|
5192
5205
|
var _a;
|
|
5193
|
-
(_a = el
|
|
5194
|
-
|
|
5206
|
+
(_a = pendingReject.get(el)) == null ? void 0 : _a();
|
|
5207
|
+
rejectAnimation = reject;
|
|
5208
|
+
pendingReject.set(el, reject);
|
|
5195
5209
|
_toggle(el, show);
|
|
5196
5210
|
const off = once(
|
|
5197
5211
|
transitionElement,
|
|
@@ -5212,10 +5226,14 @@
|
|
|
5212
5226
|
toMs(css(transitionElement, "transitionDuration"))
|
|
5213
5227
|
);
|
|
5214
5228
|
})
|
|
5215
|
-
).then(() =>
|
|
5229
|
+
).then(() => {
|
|
5230
|
+
if (pendingReject.get(el) === rejectAnimation) {
|
|
5231
|
+
pendingReject.delete(el);
|
|
5232
|
+
}
|
|
5233
|
+
});
|
|
5216
5234
|
}
|
|
5217
5235
|
function toMs(time) {
|
|
5218
|
-
return time
|
|
5236
|
+
return toFloat(time) * (endsWith(time, "ms") ? 1 : 1e3);
|
|
5219
5237
|
}
|
|
5220
5238
|
function preventBackgroundFocus(modal) {
|
|
5221
5239
|
return on(document, "focusin", (e) => {
|
|
@@ -5231,28 +5249,17 @@
|
|
|
5231
5249
|
});
|
|
5232
5250
|
}
|
|
5233
5251
|
function listenForBackgroundClose(modal) {
|
|
5234
|
-
return
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
document,
|
|
5240
|
-
`${pointerUp} ${pointerCancel} scroll`,
|
|
5241
|
-
({ defaultPrevented, type, target: newTarget }) => {
|
|
5242
|
-
if (!defaultPrevented && type === pointerUp && target === newTarget) {
|
|
5243
|
-
modal.hide();
|
|
5244
|
-
}
|
|
5245
|
-
},
|
|
5246
|
-
true
|
|
5247
|
-
);
|
|
5248
|
-
});
|
|
5252
|
+
return onOutsidePointer(
|
|
5253
|
+
() => modal.hide(),
|
|
5254
|
+
(target) => (!modal.overlay || modal.$el.contains(target)) && Boolean(modal.panel) && !modal.panel.contains(target),
|
|
5255
|
+
() => last(active) === modal
|
|
5256
|
+
);
|
|
5249
5257
|
}
|
|
5250
5258
|
function listenForEscClose(modal) {
|
|
5251
|
-
return
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
});
|
|
5259
|
+
return onEscape(
|
|
5260
|
+
() => modal.hide(),
|
|
5261
|
+
() => last(active) === modal
|
|
5262
|
+
);
|
|
5256
5263
|
}
|
|
5257
5264
|
function setAriaExpanded(el, toggled) {
|
|
5258
5265
|
if (el == null ? void 0 : el.ariaExpanded) {
|
|
@@ -5643,11 +5650,12 @@
|
|
|
5643
5650
|
],
|
|
5644
5651
|
update: {
|
|
5645
5652
|
read() {
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5653
|
+
return {
|
|
5654
|
+
overflow: [
|
|
5655
|
+
this.$el.scrollWidth - this.$el.clientWidth,
|
|
5656
|
+
this.$el.scrollHeight - this.$el.clientHeight
|
|
5657
|
+
]
|
|
5658
|
+
};
|
|
5651
5659
|
},
|
|
5652
5660
|
write({ overflow }) {
|
|
5653
5661
|
for (let i = 0; i < 2; i++) {
|