uikit 3.17.9-dev.73842811 → 3.17.9-dev.77c1d012a
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 +16 -2
- 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 -2
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +9 -9
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +9 -9
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +2 -2
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +21 -25
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +21 -25
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +6 -6
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +21 -25
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +6 -6
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +4 -4
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +41 -33
- 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 +64 -67
- 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 +94 -103
- package/dist/js/uikit.min.js +1 -1
- package/package.json +12 -12
- package/src/js/api/component.js +2 -2
- package/src/js/api/events.js +1 -6
- package/src/js/api/instance.js +5 -5
- package/src/js/api/observables.js +2 -2
- package/src/js/api/options.js +15 -14
- package/src/js/api/props.js +13 -15
- package/src/js/components/filter.js +1 -2
- package/src/js/components/notification.js +1 -2
- package/src/js/components/sortable.js +4 -5
- package/src/js/components/tooltip.js +30 -35
- package/src/js/core/accordion.js +1 -2
- package/src/js/core/drop.js +23 -20
- package/src/js/core/dropnav.js +2 -3
- package/src/js/core/form-custom.js +5 -5
- package/src/js/core/icon.js +5 -6
- package/src/js/core/navbar.js +1 -2
- package/src/js/core/overflow-auto.js +3 -3
- package/src/js/core/scroll.js +1 -2
- package/src/js/core/scrollspy-nav.js +1 -2
- package/src/js/core/sticky.js +2 -5
- package/src/js/core/switcher.js +10 -12
- package/src/js/core/tab.js +2 -2
- package/src/js/core/toggle.js +3 -5
- package/src/js/mixin/animate.js +7 -7
- package/src/js/mixin/internal/animate-fade.js +2 -2
- package/src/js/mixin/modal.js +4 -6
- package/src/js/mixin/slider-drag.js +1 -2
- package/src/js/mixin/slider-nav.js +7 -8
- package/src/js/mixin/togglable.js +8 -8
- package/src/js/util/dimensions.js +4 -4
- package/src/js/util/event.js +6 -7
- package/src/js/util/lang.js +10 -10
- package/src/js/util/position.js +1 -2
- package/src/js/util/selector.js +2 -2
- package/src/js/util/style.js +2 -2
- package/src/js/util/viewport.js +18 -14
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.9-dev.
|
|
1
|
+
/*! UIkit 3.17.9-dev.77c1d012a | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -386,7 +386,7 @@
|
|
|
386
386
|
let ctx = context;
|
|
387
387
|
if (sel[0] === "!") {
|
|
388
388
|
const selectors = sel.substr(1).trim().split(" ");
|
|
389
|
-
ctx =
|
|
389
|
+
ctx = parent(context).closest(selectors[0]);
|
|
390
390
|
sel = selectors.slice(1).join(" ").trim();
|
|
391
391
|
if (!sel.length && split.length === 1) {
|
|
392
392
|
return ctx;
|
|
@@ -502,7 +502,7 @@
|
|
|
502
502
|
}
|
|
503
503
|
function delegate(selector, listener) {
|
|
504
504
|
return (e) => {
|
|
505
|
-
const current = selector[0] === ">" ? findAll(selector, e.currentTarget).reverse().
|
|
505
|
+
const current = selector[0] === ">" ? findAll(selector, e.currentTarget).reverse().find((element) => element.contains(e.target)) : e.target.closest(selector);
|
|
506
506
|
if (current) {
|
|
507
507
|
e.current = current;
|
|
508
508
|
listener.call(this, e);
|
|
@@ -1323,11 +1323,16 @@
|
|
|
1323
1323
|
}
|
|
1324
1324
|
function getCoveringElement(target) {
|
|
1325
1325
|
return target.ownerDocument.elementsFromPoint(offset(target).left, 0).find(
|
|
1326
|
-
(el) => !el.contains(target) && (
|
|
1326
|
+
(el) => !el.contains(target) && (hasPosition(el, "fixed") && zIndex(
|
|
1327
|
+
parents(target).reverse().find((parent2) => !parent2.contains(el) && !hasPosition(parent2, "static"))
|
|
1328
|
+
) < zIndex(el) || hasPosition(el, "sticky") && parent(el).contains(target))
|
|
1327
1329
|
);
|
|
1328
1330
|
}
|
|
1329
|
-
function
|
|
1330
|
-
return
|
|
1331
|
+
function zIndex(element) {
|
|
1332
|
+
return toFloat(css(element, "zIndex"));
|
|
1333
|
+
}
|
|
1334
|
+
function hasPosition(element, position) {
|
|
1335
|
+
return css(element, "position") === position;
|
|
1331
1336
|
}
|
|
1332
1337
|
function scrollingElement(element) {
|
|
1333
1338
|
return toWindow(element).document.scrollingElement;
|
|
@@ -1454,7 +1459,7 @@
|
|
|
1454
1459
|
return viewport;
|
|
1455
1460
|
}
|
|
1456
1461
|
function commonScrollParents(element, target) {
|
|
1457
|
-
return overflowParents(target).filter((parent) =>
|
|
1462
|
+
return overflowParents(target).filter((parent) => parent.contains(element));
|
|
1458
1463
|
}
|
|
1459
1464
|
function getIntersectionArea(...rects) {
|
|
1460
1465
|
let area = {};
|
|
@@ -1855,8 +1860,9 @@
|
|
|
1855
1860
|
}
|
|
1856
1861
|
return type ? type(value) : value;
|
|
1857
1862
|
}
|
|
1863
|
+
const listRe = /,(?![^(]*\))/;
|
|
1858
1864
|
function toList(value) {
|
|
1859
|
-
return isArray(value) ? value : isString(value) ? value.split(
|
|
1865
|
+
return isArray(value) ? value : isString(value) ? value.split(listRe).map((value2) => isNumeric(value2) ? toNumber(value2) : toBoolean(value2.trim())) : [value];
|
|
1860
1866
|
}
|
|
1861
1867
|
|
|
1862
1868
|
function initUpdates(instance) {
|
|
@@ -2333,7 +2339,7 @@
|
|
|
2333
2339
|
if (e.type === "keydown" && e.keyCode !== keyMap.SPACE) {
|
|
2334
2340
|
return;
|
|
2335
2341
|
}
|
|
2336
|
-
if (
|
|
2342
|
+
if (e.target.closest("a,button")) {
|
|
2337
2343
|
e.preventDefault();
|
|
2338
2344
|
this.apply(e.current);
|
|
2339
2345
|
}
|
|
@@ -2706,7 +2712,7 @@
|
|
|
2706
2712
|
handler(e) {
|
|
2707
2713
|
const { current, defaultPrevented } = e;
|
|
2708
2714
|
const { hash } = current;
|
|
2709
|
-
if (!defaultPrevented && hash && isSameSiteAnchor(current) && !
|
|
2715
|
+
if (!defaultPrevented && hash && isSameSiteAnchor(current) && !this.$el.contains($(hash))) {
|
|
2710
2716
|
this.hide();
|
|
2711
2717
|
} else if (matches(current, this.selClose)) {
|
|
2712
2718
|
e.preventDefault();
|
|
@@ -2841,14 +2847,14 @@
|
|
|
2841
2847
|
}
|
|
2842
2848
|
function preventBackgroundFocus(modal) {
|
|
2843
2849
|
return on(document, "focusin", (e) => {
|
|
2844
|
-
if (last(active$1) === modal && !
|
|
2850
|
+
if (last(active$1) === modal && !modal.$el.contains(e.target)) {
|
|
2845
2851
|
modal.$el.focus();
|
|
2846
2852
|
}
|
|
2847
2853
|
});
|
|
2848
2854
|
}
|
|
2849
2855
|
function listenForBackgroundClose$1(modal) {
|
|
2850
2856
|
return on(document, pointerDown$1, ({ target }) => {
|
|
2851
|
-
if (last(active$1) !== modal || modal.overlay && !
|
|
2857
|
+
if (last(active$1) !== modal || modal.overlay && !modal.$el.contains(target) || modal.panel.contains(target)) {
|
|
2852
2858
|
return;
|
|
2853
2859
|
}
|
|
2854
2860
|
once(
|
|
@@ -3058,7 +3064,7 @@
|
|
|
3058
3064
|
return `${this.selList} > *`;
|
|
3059
3065
|
},
|
|
3060
3066
|
handler(e) {
|
|
3061
|
-
if (!this.draggable || !isTouch(e) && hasSelectableText(e.target) ||
|
|
3067
|
+
if (!this.draggable || !isTouch(e) && hasSelectableText(e.target) || e.target.closest(selInput) || e.button > 0 || this.length < 2) {
|
|
3062
3068
|
return;
|
|
3063
3069
|
}
|
|
3064
3070
|
this.start(e);
|
|
@@ -3291,11 +3297,7 @@
|
|
|
3291
3297
|
function registerEvent(instance, event, key) {
|
|
3292
3298
|
let { name, el, handler, capture, passive, delegate, filter, self } = isPlainObject(event) ? event : { name: key, handler: event };
|
|
3293
3299
|
el = isFunction(el) ? el.call(instance, instance) : el || instance.$el;
|
|
3294
|
-
if (isArray(el)) {
|
|
3295
|
-
el.forEach((el2) => registerEvent(instance, { ...event, el: el2 }, key));
|
|
3296
|
-
return;
|
|
3297
|
-
}
|
|
3298
|
-
if (!el || filter && !filter.call(instance)) {
|
|
3300
|
+
if (!el || isArray(el) && !el.length || filter && !filter.call(instance)) {
|
|
3299
3301
|
return;
|
|
3300
3302
|
}
|
|
3301
3303
|
instance._events.push(
|
|
@@ -3361,16 +3363,13 @@
|
|
|
3361
3363
|
}
|
|
3362
3364
|
|
|
3363
3365
|
function initProps(instance) {
|
|
3364
|
-
const props =
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
for (let key in instance.$props) {
|
|
3372
|
-
if (key in props && notIn(exclude, key)) {
|
|
3373
|
-
instance[key] = instance.$props[key];
|
|
3366
|
+
const { $options, $props } = instance;
|
|
3367
|
+
const props = getProps($options);
|
|
3368
|
+
assign($props, props);
|
|
3369
|
+
const { computed, methods } = $options;
|
|
3370
|
+
for (let key in $props) {
|
|
3371
|
+
if (key in props && (!computed || !hasOwn(computed, key)) && (!methods || !hasOwn(methods, key))) {
|
|
3372
|
+
instance[key] = $props[key];
|
|
3374
3373
|
}
|
|
3375
3374
|
}
|
|
3376
3375
|
}
|
|
@@ -3401,9 +3400,6 @@
|
|
|
3401
3400
|
}
|
|
3402
3401
|
return data$1;
|
|
3403
3402
|
}
|
|
3404
|
-
function notIn(options, key) {
|
|
3405
|
-
return options.every((arr) => !arr || !hasOwn(arr, key));
|
|
3406
|
-
}
|
|
3407
3403
|
const getAttributes = memoize((id, props) => {
|
|
3408
3404
|
const attributes = Object.keys(props);
|
|
3409
3405
|
const filter = attributes.concat(id).map((key) => [hyphenate(key), `data-${hyphenate(key)}`]).flat();
|
|
@@ -3521,7 +3517,7 @@
|
|
|
3521
3517
|
};
|
|
3522
3518
|
App.util = util;
|
|
3523
3519
|
App.options = {};
|
|
3524
|
-
App.version = "3.17.9-dev.
|
|
3520
|
+
App.version = "3.17.9-dev.77c1d012a";
|
|
3525
3521
|
|
|
3526
3522
|
const PREFIX = "uk-";
|
|
3527
3523
|
const DATA = "__uikit__";
|
|
@@ -3640,7 +3636,7 @@
|
|
|
3640
3636
|
const instance = this;
|
|
3641
3637
|
attachToElement(el, instance);
|
|
3642
3638
|
instance.$options.el = el;
|
|
3643
|
-
if (
|
|
3639
|
+
if (document.contains(el)) {
|
|
3644
3640
|
callConnected(instance);
|
|
3645
3641
|
}
|
|
3646
3642
|
};
|
|
@@ -3677,16 +3673,16 @@
|
|
|
3677
3673
|
$container: Object.getOwnPropertyDescriptor(App, "container")
|
|
3678
3674
|
});
|
|
3679
3675
|
}
|
|
3680
|
-
const ids =
|
|
3676
|
+
const ids = /* @__PURE__ */ Object.create(null);
|
|
3681
3677
|
function generateId(instance, el = instance.$el, postfix = "") {
|
|
3682
3678
|
if (el.id) {
|
|
3683
3679
|
return el.id;
|
|
3684
3680
|
}
|
|
3685
3681
|
let id = `${instance.$options.id}-${instance._uid}${postfix}`;
|
|
3686
|
-
if (
|
|
3682
|
+
if (ids[id]) {
|
|
3687
3683
|
id = generateId(instance, el, `${postfix}-2`);
|
|
3688
3684
|
}
|
|
3689
|
-
ids
|
|
3685
|
+
ids[id] = true;
|
|
3690
3686
|
return id;
|
|
3691
3687
|
}
|
|
3692
3688
|
|
|
@@ -3798,7 +3794,7 @@
|
|
|
3798
3794
|
return this.selNavItem;
|
|
3799
3795
|
},
|
|
3800
3796
|
handler(e) {
|
|
3801
|
-
if (
|
|
3797
|
+
if (e.target.closest("a,button") && (e.type === "click" || e.keyCode === keyMap.SPACE)) {
|
|
3802
3798
|
e.preventDefault();
|
|
3803
3799
|
this.show(data(e.current, this.attrItem));
|
|
3804
3800
|
}
|
|
@@ -4422,7 +4418,7 @@
|
|
|
4422
4418
|
},
|
|
4423
4419
|
events: {
|
|
4424
4420
|
click(e) {
|
|
4425
|
-
if (
|
|
4421
|
+
if (e.target.closest('a[href="#"],a[href=""]')) {
|
|
4426
4422
|
e.preventDefault();
|
|
4427
4423
|
}
|
|
4428
4424
|
this.close();
|
|
@@ -5606,8 +5602,8 @@
|
|
|
5606
5602
|
methods: {
|
|
5607
5603
|
init(e) {
|
|
5608
5604
|
const { target, button, defaultPrevented } = e;
|
|
5609
|
-
const [placeholder] = this.items.filter((el) =>
|
|
5610
|
-
if (!placeholder || defaultPrevented || button > 0 || isInput(target) ||
|
|
5605
|
+
const [placeholder] = this.items.filter((el) => el.contains(target));
|
|
5606
|
+
if (!placeholder || defaultPrevented || button > 0 || isInput(target) || target.closest(`.${this.clsNoDrag}`) || this.handle && !target.closest(this.handle)) {
|
|
5611
5607
|
return;
|
|
5612
5608
|
}
|
|
5613
5609
|
e.preventDefault();
|
|
@@ -5672,7 +5668,7 @@
|
|
|
5672
5668
|
this.animate(insert);
|
|
5673
5669
|
},
|
|
5674
5670
|
remove(element) {
|
|
5675
|
-
if (!
|
|
5671
|
+
if (!this.target.contains(element)) {
|
|
5676
5672
|
return;
|
|
5677
5673
|
}
|
|
5678
5674
|
this.animate(() => remove$1(element));
|
|
@@ -5869,41 +5865,34 @@
|
|
|
5869
5865
|
|
|
5870
5866
|
var tooltip = {
|
|
5871
5867
|
mixins: [Container, Togglable, Position],
|
|
5872
|
-
args: "title",
|
|
5873
|
-
props: {
|
|
5874
|
-
delay: Number,
|
|
5875
|
-
title: String
|
|
5876
|
-
},
|
|
5877
5868
|
data: {
|
|
5878
5869
|
pos: "top",
|
|
5879
|
-
title: "",
|
|
5880
|
-
delay: 0,
|
|
5881
5870
|
animation: ["uk-animation-scale-up"],
|
|
5882
5871
|
duration: 100,
|
|
5883
5872
|
cls: "uk-active"
|
|
5884
5873
|
},
|
|
5885
|
-
|
|
5886
|
-
this.id = generateId(this, {});
|
|
5887
|
-
this._hasTitle = hasAttr(this.$el, "title");
|
|
5888
|
-
attr(this.$el, {
|
|
5889
|
-
title: "",
|
|
5890
|
-
"aria-describedby": this.id
|
|
5891
|
-
});
|
|
5874
|
+
connected() {
|
|
5892
5875
|
makeFocusable(this.$el);
|
|
5893
5876
|
},
|
|
5894
5877
|
disconnected() {
|
|
5895
5878
|
this.hide();
|
|
5896
|
-
if (!attr(this.$el, "title")) {
|
|
5897
|
-
attr(this.$el, "title", this._hasTitle ? this.title : null);
|
|
5898
|
-
}
|
|
5899
5879
|
},
|
|
5900
5880
|
methods: {
|
|
5901
5881
|
show() {
|
|
5902
|
-
if (this.isToggled(this.tooltip || null)
|
|
5882
|
+
if (this.isToggled(this.tooltip || null)) {
|
|
5883
|
+
return;
|
|
5884
|
+
}
|
|
5885
|
+
const { delay = 0, title } = parseProps(this.$options);
|
|
5886
|
+
if (!title) {
|
|
5903
5887
|
return;
|
|
5904
5888
|
}
|
|
5889
|
+
this.title = title;
|
|
5890
|
+
this.id || (this.id = generateId(this, {}));
|
|
5891
|
+
this._hasTitle = hasAttr(this.$el, "title");
|
|
5892
|
+
attr(this.$el, { title: null, "aria-describedby": this.id });
|
|
5893
|
+
once(this.$el, ["blur", pointerLeave], (e) => !isTouch(e) && this.hide());
|
|
5905
5894
|
clearTimeout(this.showTimer);
|
|
5906
|
-
this.showTimer = setTimeout(this._show,
|
|
5895
|
+
this.showTimer = setTimeout(this._show, delay);
|
|
5907
5896
|
},
|
|
5908
5897
|
async hide() {
|
|
5909
5898
|
if (matches(this.$el, "input:focus")) {
|
|
@@ -5913,6 +5902,7 @@
|
|
|
5913
5902
|
if (this.isToggled(this.tooltip || null)) {
|
|
5914
5903
|
await this.toggleElement(this.tooltip, false, false);
|
|
5915
5904
|
}
|
|
5905
|
+
attr(this.$el, { title: this._hasTitle ? this.title : null, "aria-describedby": null });
|
|
5916
5906
|
remove$1(this.tooltip);
|
|
5917
5907
|
this.tooltip = null;
|
|
5918
5908
|
},
|
|
@@ -5935,7 +5925,7 @@
|
|
|
5935
5925
|
`keydown ${pointerDown$1}`,
|
|
5936
5926
|
this.hide,
|
|
5937
5927
|
false,
|
|
5938
|
-
(e2) => e2.type === pointerDown$1 && !
|
|
5928
|
+
(e2) => e2.type === pointerDown$1 && !this.$el.contains(e2.target) || e2.type === "keydown" && e2.keyCode === keyMap.ESC
|
|
5939
5929
|
),
|
|
5940
5930
|
on([document, ...overflowParents(this.$el)], "scroll", update, {
|
|
5941
5931
|
passive: true
|
|
@@ -5951,17 +5941,10 @@
|
|
|
5951
5941
|
}
|
|
5952
5942
|
},
|
|
5953
5943
|
events: {
|
|
5954
|
-
focus: "show",
|
|
5955
|
-
blur: "hide",
|
|
5956
|
-
[`${pointerEnter} ${pointerLeave}`](e) {
|
|
5957
|
-
if (!isTouch(e)) {
|
|
5958
|
-
this[e.type === pointerEnter ? "show" : "hide"]();
|
|
5959
|
-
}
|
|
5960
|
-
},
|
|
5961
5944
|
// Clicking a button does not give it focus on all browsers and platforms
|
|
5962
5945
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
|
|
5963
|
-
[pointerDown$1](e) {
|
|
5964
|
-
if (isTouch(e)) {
|
|
5946
|
+
[`focus ${pointerEnter} ${pointerDown$1}`](e) {
|
|
5947
|
+
if (!isTouch(e)) {
|
|
5965
5948
|
this.show();
|
|
5966
5949
|
}
|
|
5967
5950
|
}
|
|
@@ -5999,6 +5982,13 @@
|
|
|
5999
5982
|
}
|
|
6000
5983
|
return [dir, align];
|
|
6001
5984
|
}
|
|
5985
|
+
function parseProps(options) {
|
|
5986
|
+
const { el, id } = options;
|
|
5987
|
+
return ["delay", "title"].reduce(
|
|
5988
|
+
(obj, key) => ({ [key]: data(el, key), ...obj }),
|
|
5989
|
+
parseOptions(data(el, id), ["title"])
|
|
5990
|
+
);
|
|
5991
|
+
}
|
|
6002
5992
|
|
|
6003
5993
|
var upload = {
|
|
6004
5994
|
mixins: [I18n],
|
|
@@ -6343,7 +6333,7 @@
|
|
|
6343
6333
|
contents(items) {
|
|
6344
6334
|
for (const el of items) {
|
|
6345
6335
|
const isOpen = hasClass(
|
|
6346
|
-
this.items.find((item) =>
|
|
6336
|
+
this.items.find((item) => item.contains(el)),
|
|
6347
6337
|
this.clsOpen
|
|
6348
6338
|
);
|
|
6349
6339
|
hide(el, !isOpen);
|
|
@@ -6723,7 +6713,7 @@
|
|
|
6723
6713
|
},
|
|
6724
6714
|
handler({ defaultPrevented, current }) {
|
|
6725
6715
|
const { hash } = current;
|
|
6726
|
-
if (!defaultPrevented && hash && isSameSiteAnchor(current) && !
|
|
6716
|
+
if (!defaultPrevented && hash && isSameSiteAnchor(current) && !this.$el.contains($(hash))) {
|
|
6727
6717
|
this.hide(false);
|
|
6728
6718
|
}
|
|
6729
6719
|
}
|
|
@@ -6827,7 +6817,7 @@
|
|
|
6827
6817
|
name: "hide",
|
|
6828
6818
|
handler({ target }) {
|
|
6829
6819
|
if (this.$el !== target) {
|
|
6830
|
-
active = active === null &&
|
|
6820
|
+
active = active === null && this.$el.contains(target) && this.isToggled() ? this : active;
|
|
6831
6821
|
return;
|
|
6832
6822
|
}
|
|
6833
6823
|
active = this.isActive() ? null : active;
|
|
@@ -6859,7 +6849,7 @@
|
|
|
6859
6849
|
return;
|
|
6860
6850
|
}
|
|
6861
6851
|
let prev;
|
|
6862
|
-
while (active && prev !== active && !
|
|
6852
|
+
while (active && prev !== active && !active.$el.contains(this.$el)) {
|
|
6863
6853
|
prev = active;
|
|
6864
6854
|
active.hide(false, false);
|
|
6865
6855
|
}
|
|
@@ -6953,7 +6943,7 @@
|
|
|
6953
6943
|
return result;
|
|
6954
6944
|
}
|
|
6955
6945
|
function getViewport$1(el, target) {
|
|
6956
|
-
return offsetViewport(overflowParents(target).find((parent2) =>
|
|
6946
|
+
return offsetViewport(overflowParents(target).find((parent2) => parent2.contains(el)));
|
|
6957
6947
|
}
|
|
6958
6948
|
function createToggleComponent(drop) {
|
|
6959
6949
|
const { $el } = drop.$create("toggle", query(drop.toggle, drop.$el), {
|
|
@@ -6988,18 +6978,19 @@
|
|
|
6988
6978
|
}
|
|
6989
6979
|
function listenForBackgroundClose(drop) {
|
|
6990
6980
|
return on(document, pointerDown$1, ({ target }) => {
|
|
6991
|
-
if (
|
|
6992
|
-
|
|
6993
|
-
document,
|
|
6994
|
-
`${pointerUp$1} ${pointerCancel} scroll`,
|
|
6995
|
-
({ defaultPrevented, type, target: newTarget }) => {
|
|
6996
|
-
if (!defaultPrevented && type === pointerUp$1 && target === newTarget && !(drop.targetEl && within(target, drop.targetEl))) {
|
|
6997
|
-
drop.hide(false);
|
|
6998
|
-
}
|
|
6999
|
-
},
|
|
7000
|
-
true
|
|
7001
|
-
);
|
|
6981
|
+
if (drop.$el.contains(target)) {
|
|
6982
|
+
return;
|
|
7002
6983
|
}
|
|
6984
|
+
once(
|
|
6985
|
+
document,
|
|
6986
|
+
`${pointerUp$1} ${pointerCancel} scroll`,
|
|
6987
|
+
({ defaultPrevented, type, target: newTarget }) => {
|
|
6988
|
+
if (!defaultPrevented && type === pointerUp$1 && target === newTarget && !(drop.targetEl && within(target, drop.targetEl))) {
|
|
6989
|
+
drop.hide(false);
|
|
6990
|
+
}
|
|
6991
|
+
},
|
|
6992
|
+
true
|
|
6993
|
+
);
|
|
7003
6994
|
});
|
|
7004
6995
|
}
|
|
7005
6996
|
|
|
@@ -7056,7 +7047,7 @@
|
|
|
7056
7047
|
if (this.dropContainer !== $el) {
|
|
7057
7048
|
for (const el of $$(`.${clsDrop}`, this.dropContainer)) {
|
|
7058
7049
|
const target = (_a = this.getDropdown(el)) == null ? void 0 : _a.targetEl;
|
|
7059
|
-
if (!includes(dropdowns, el) && target &&
|
|
7050
|
+
if (!includes(dropdowns, el) && target && this.$el.contains(target)) {
|
|
7060
7051
|
dropdowns.push(el);
|
|
7061
7052
|
}
|
|
7062
7053
|
}
|
|
@@ -7096,7 +7087,7 @@
|
|
|
7096
7087
|
},
|
|
7097
7088
|
handler({ current }) {
|
|
7098
7089
|
const active2 = this.getActive();
|
|
7099
|
-
if (active2 && includes(active2.mode, "hover") && active2.targetEl && !
|
|
7090
|
+
if (active2 && includes(active2.mode, "hover") && active2.targetEl && !current.contains(active2.targetEl) && !active2.isDelaying) {
|
|
7100
7091
|
active2.hide(false);
|
|
7101
7092
|
}
|
|
7102
7093
|
}
|
|
@@ -7367,7 +7358,7 @@
|
|
|
7367
7358
|
{
|
|
7368
7359
|
name: "reset",
|
|
7369
7360
|
el() {
|
|
7370
|
-
return
|
|
7361
|
+
return this.$el.closest("form");
|
|
7371
7362
|
},
|
|
7372
7363
|
handler() {
|
|
7373
7364
|
this.$emit();
|
|
@@ -7813,7 +7804,7 @@
|
|
|
7813
7804
|
extends: IconComponent,
|
|
7814
7805
|
beforeConnect() {
|
|
7815
7806
|
const icon = this.$props.icon;
|
|
7816
|
-
this.icon =
|
|
7807
|
+
this.icon = this.$el.closest(".uk-nav-primary") ? `${icon}-large` : icon;
|
|
7817
7808
|
}
|
|
7818
7809
|
};
|
|
7819
7810
|
const Search = {
|
|
@@ -7829,7 +7820,7 @@
|
|
|
7829
7820
|
const label = this.t("toggle");
|
|
7830
7821
|
attr(this.$el, "aria-label", label);
|
|
7831
7822
|
} else {
|
|
7832
|
-
const button =
|
|
7823
|
+
const button = this.$el.closest("a,button");
|
|
7833
7824
|
if (button) {
|
|
7834
7825
|
const label = this.t("submit");
|
|
7835
7826
|
attr(button, "aria-label", label);
|
|
@@ -7856,7 +7847,7 @@
|
|
|
7856
7847
|
extends: IconComponent,
|
|
7857
7848
|
mixins: [I18n],
|
|
7858
7849
|
beforeConnect() {
|
|
7859
|
-
const button =
|
|
7850
|
+
const button = this.$el.closest("a,button");
|
|
7860
7851
|
attr(button, "role", this.role !== null && isTag(button, "a") ? "button" : this.role);
|
|
7861
7852
|
const label = this.t("label");
|
|
7862
7853
|
if (label && !hasAttr(button, "aria-label")) {
|
|
@@ -8219,7 +8210,7 @@
|
|
|
8219
8210
|
dropbarTransparentMode: false
|
|
8220
8211
|
},
|
|
8221
8212
|
computed: {
|
|
8222
|
-
navbarContainer: (_, $el) => closest(
|
|
8213
|
+
navbarContainer: (_, $el) => $el.closest(".uk-navbar-container"),
|
|
8223
8214
|
dropbarOffset: ({ dropbarTransparentMode }, $el) => dropbarTransparentMode === "behind" ? $el.offsetHeight : 0
|
|
8224
8215
|
},
|
|
8225
8216
|
watch: {
|
|
@@ -8522,8 +8513,8 @@
|
|
|
8522
8513
|
minHeight: 150
|
|
8523
8514
|
},
|
|
8524
8515
|
computed: {
|
|
8525
|
-
container: ({ selContainer }, $el) => closest(
|
|
8526
|
-
content: ({ selContent }, $el) => closest(
|
|
8516
|
+
container: ({ selContainer }, $el) => $el.closest(selContainer),
|
|
8517
|
+
content: ({ selContent }, $el) => $el.closest(selContent)
|
|
8527
8518
|
},
|
|
8528
8519
|
observe: resize({
|
|
8529
8520
|
target: ({ container, content }) => [container, content]
|
|
@@ -8616,7 +8607,7 @@
|
|
|
8616
8607
|
return;
|
|
8617
8608
|
}
|
|
8618
8609
|
for (const instance of instances) {
|
|
8619
|
-
if (
|
|
8610
|
+
if (instance.$el.contains(e.target) && isSameSiteAnchor(instance.$el)) {
|
|
8620
8611
|
e.preventDefault();
|
|
8621
8612
|
if (window.location.href !== instance.$el.href) {
|
|
8622
8613
|
window.history.pushState({}, "", instance.$el.href);
|
|
@@ -8749,7 +8740,7 @@
|
|
|
8749
8740
|
computed: {
|
|
8750
8741
|
links: (_, $el) => $$('a[href*="#"]', $el).filter((el) => el.hash && isSameSiteAnchor(el)),
|
|
8751
8742
|
elements({ closest: selector }) {
|
|
8752
|
-
return this.links.map((el) => closest(
|
|
8743
|
+
return this.links.map((el) => el.closest(selector || "*"));
|
|
8753
8744
|
}
|
|
8754
8745
|
},
|
|
8755
8746
|
watch: {
|
|
@@ -8972,7 +8963,7 @@
|
|
|
8972
8963
|
}
|
|
8973
8964
|
const { placeholder } = this;
|
|
8974
8965
|
css(placeholder, { height, width, margin });
|
|
8975
|
-
if (!
|
|
8966
|
+
if (!document.contains(placeholder)) {
|
|
8976
8967
|
placeholder.hidden = true;
|
|
8977
8968
|
}
|
|
8978
8969
|
(sticky ? before : after)(this.$el, placeholder);
|
|
@@ -9135,7 +9126,7 @@
|
|
|
9135
9126
|
return propOffset + toPx(value, "height", el, true);
|
|
9136
9127
|
} else {
|
|
9137
9128
|
const refElement = value === true ? parent(el) : query(value, el);
|
|
9138
|
-
return offset(refElement).bottom - (padding && refElement
|
|
9129
|
+
return offset(refElement).bottom - (padding && (refElement == null ? void 0 : refElement.contains(el)) ? toFloat(css(refElement, "paddingBottom")) : 0);
|
|
9139
9130
|
}
|
|
9140
9131
|
}
|
|
9141
9132
|
function coerce(value) {
|
|
@@ -9284,7 +9275,7 @@
|
|
|
9284
9275
|
toggles: ({ toggle }, $el) => $$(toggle, $el),
|
|
9285
9276
|
children(_, $el) {
|
|
9286
9277
|
return children($el).filter(
|
|
9287
|
-
(child) => this.toggles.some((toggle) =>
|
|
9278
|
+
(child) => this.toggles.some((toggle) => child.contains(toggle))
|
|
9288
9279
|
);
|
|
9289
9280
|
}
|
|
9290
9281
|
},
|
|
@@ -9357,7 +9348,7 @@
|
|
|
9357
9348
|
return `[${this.attrItem}],[data-${this.attrItem}]`;
|
|
9358
9349
|
},
|
|
9359
9350
|
handler(e) {
|
|
9360
|
-
if (
|
|
9351
|
+
if (e.target.closest("a,button")) {
|
|
9361
9352
|
e.preventDefault();
|
|
9362
9353
|
this.show(data(e.current, this.attrItem));
|
|
9363
9354
|
}
|
|
@@ -9495,7 +9486,7 @@
|
|
|
9495
9486
|
pointerDown$1,
|
|
9496
9487
|
() => trigger(this.$el, "blur"),
|
|
9497
9488
|
true,
|
|
9498
|
-
(e2) => !
|
|
9489
|
+
(e2) => !this.$el.contains(e2.target)
|
|
9499
9490
|
);
|
|
9500
9491
|
if (includes(this.mode, "click")) {
|
|
9501
9492
|
this._preventClick = true;
|
|
@@ -9547,7 +9538,7 @@
|
|
|
9547
9538
|
},
|
|
9548
9539
|
handler(e) {
|
|
9549
9540
|
let link;
|
|
9550
|
-
if (this._preventClick ||
|
|
9541
|
+
if (this._preventClick || e.target.closest('a[href="#"], a[href=""]') || (link = e.target.closest("a[href]")) && (!this.isToggled(this.target) || link.hash && matches(this.target, link.hash))) {
|
|
9551
9542
|
e.preventDefault();
|
|
9552
9543
|
}
|
|
9553
9544
|
if (!this._preventClick && includes(this.mode, "click")) {
|