uikit 3.17.8 → 3.17.9-dev.337e68f15
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 +15 -7
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +15 -7
- 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 +22 -26
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +22 -26
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +12 -4
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +22 -26
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +12 -4
- 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 +47 -31
- 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 +74 -71
- 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 +104 -107
- 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 +6 -3
- package/src/js/api/observables.js +2 -2
- package/src/js/api/options.js +15 -14
- package/src/js/api/props.js +32 -18
- 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 +11 -11
- 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 +20 -16
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.9-dev.337e68f15 | 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() :
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
}
|
|
190
190
|
function memoize(fn) {
|
|
191
191
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
192
|
-
return (key) => cache[key] || (cache[key] = fn(key));
|
|
192
|
+
return (key, ...args) => cache[key] || (cache[key] = fn(key, ...args));
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
function attr(element, name, value) {
|
|
@@ -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);
|
|
@@ -1225,14 +1225,14 @@
|
|
|
1225
1225
|
const scroll = element2.scrollTop;
|
|
1226
1226
|
const duration = getDuration(Math.abs(top));
|
|
1227
1227
|
const start = Date.now();
|
|
1228
|
-
const targetTop = offset(targetEl).top;
|
|
1228
|
+
const targetTop = offset(targetEl).top + scroll;
|
|
1229
1229
|
let prev = 0;
|
|
1230
1230
|
let frames = 15;
|
|
1231
1231
|
(function step() {
|
|
1232
1232
|
const percent = ease(clamp((Date.now() - start) / duration));
|
|
1233
1233
|
let diff = 0;
|
|
1234
1234
|
if (parents2[0] === element2 && scroll + top < maxScroll) {
|
|
1235
|
-
diff = offset(targetEl).top - targetTop;
|
|
1235
|
+
diff = offset(targetEl).top + element2.scrollTop - targetTop;
|
|
1236
1236
|
const coverEl = getCoveringElement(targetEl);
|
|
1237
1237
|
diff -= coverEl ? offset(coverEl).height : 0;
|
|
1238
1238
|
}
|
|
@@ -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,17 +3400,18 @@
|
|
|
3401
3400
|
}
|
|
3402
3401
|
return data$1;
|
|
3403
3402
|
}
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3403
|
+
const getAttributes = memoize((id, props) => {
|
|
3404
|
+
const attributes = Object.keys(props);
|
|
3405
|
+
const filter = attributes.concat(id).map((key) => [hyphenate(key), `data-${hyphenate(key)}`]).flat();
|
|
3406
|
+
return { attributes, filter };
|
|
3407
|
+
});
|
|
3407
3408
|
function initPropsObserver(instance) {
|
|
3408
3409
|
const { $options, $props } = instance;
|
|
3409
3410
|
const { id, props, el } = $options;
|
|
3410
3411
|
if (!props) {
|
|
3411
3412
|
return;
|
|
3412
3413
|
}
|
|
3413
|
-
const attributes =
|
|
3414
|
-
const filter = attributes.map((key) => hyphenate(key)).concat(id);
|
|
3414
|
+
const { attributes, filter } = getAttributes(id, props);
|
|
3415
3415
|
const observer = new MutationObserver((records) => {
|
|
3416
3416
|
const data = getProps($options);
|
|
3417
3417
|
if (records.some(({ attributeName }) => {
|
|
@@ -3425,7 +3425,7 @@
|
|
|
3425
3425
|
});
|
|
3426
3426
|
observer.observe(el, {
|
|
3427
3427
|
attributes: true,
|
|
3428
|
-
attributeFilter: filter
|
|
3428
|
+
attributeFilter: filter
|
|
3429
3429
|
});
|
|
3430
3430
|
registerObserver(instance, observer);
|
|
3431
3431
|
}
|
|
@@ -3517,7 +3517,7 @@
|
|
|
3517
3517
|
};
|
|
3518
3518
|
App.util = util;
|
|
3519
3519
|
App.options = {};
|
|
3520
|
-
App.version = "3.17.
|
|
3520
|
+
App.version = "3.17.9-dev.337e68f15";
|
|
3521
3521
|
|
|
3522
3522
|
const PREFIX = "uk-";
|
|
3523
3523
|
const DATA = "__uikit__";
|
|
@@ -3636,7 +3636,7 @@
|
|
|
3636
3636
|
const instance = this;
|
|
3637
3637
|
attachToElement(el, instance);
|
|
3638
3638
|
instance.$options.el = el;
|
|
3639
|
-
if (
|
|
3639
|
+
if (document.contains(el)) {
|
|
3640
3640
|
callConnected(instance);
|
|
3641
3641
|
}
|
|
3642
3642
|
};
|
|
@@ -3673,14 +3673,16 @@
|
|
|
3673
3673
|
$container: Object.getOwnPropertyDescriptor(App, "container")
|
|
3674
3674
|
});
|
|
3675
3675
|
}
|
|
3676
|
+
const ids = /* @__PURE__ */ Object.create(null);
|
|
3676
3677
|
function generateId(instance, el = instance.$el, postfix = "") {
|
|
3677
3678
|
if (el.id) {
|
|
3678
3679
|
return el.id;
|
|
3679
3680
|
}
|
|
3680
3681
|
let id = `${instance.$options.id}-${instance._uid}${postfix}`;
|
|
3681
|
-
if (
|
|
3682
|
+
if (ids[id]) {
|
|
3682
3683
|
id = generateId(instance, el, `${postfix}-2`);
|
|
3683
3684
|
}
|
|
3685
|
+
ids[id] = true;
|
|
3684
3686
|
return id;
|
|
3685
3687
|
}
|
|
3686
3688
|
|
|
@@ -3792,7 +3794,7 @@
|
|
|
3792
3794
|
return this.selNavItem;
|
|
3793
3795
|
},
|
|
3794
3796
|
handler(e) {
|
|
3795
|
-
if (
|
|
3797
|
+
if (e.target.closest("a,button") && (e.type === "click" || e.keyCode === keyMap.SPACE)) {
|
|
3796
3798
|
e.preventDefault();
|
|
3797
3799
|
this.show(data(e.current, this.attrItem));
|
|
3798
3800
|
}
|
|
@@ -4416,7 +4418,7 @@
|
|
|
4416
4418
|
},
|
|
4417
4419
|
events: {
|
|
4418
4420
|
click(e) {
|
|
4419
|
-
if (
|
|
4421
|
+
if (e.target.closest('a[href="#"],a[href=""]')) {
|
|
4420
4422
|
e.preventDefault();
|
|
4421
4423
|
}
|
|
4422
4424
|
this.close();
|
|
@@ -5600,8 +5602,8 @@
|
|
|
5600
5602
|
methods: {
|
|
5601
5603
|
init(e) {
|
|
5602
5604
|
const { target, button, defaultPrevented } = e;
|
|
5603
|
-
const [placeholder] = this.items.filter((el) =>
|
|
5604
|
-
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)) {
|
|
5605
5607
|
return;
|
|
5606
5608
|
}
|
|
5607
5609
|
e.preventDefault();
|
|
@@ -5666,7 +5668,7 @@
|
|
|
5666
5668
|
this.animate(insert);
|
|
5667
5669
|
},
|
|
5668
5670
|
remove(element) {
|
|
5669
|
-
if (!
|
|
5671
|
+
if (!this.target.contains(element)) {
|
|
5670
5672
|
return;
|
|
5671
5673
|
}
|
|
5672
5674
|
this.animate(() => remove$1(element));
|
|
@@ -5863,41 +5865,34 @@
|
|
|
5863
5865
|
|
|
5864
5866
|
var tooltip = {
|
|
5865
5867
|
mixins: [Container, Togglable, Position],
|
|
5866
|
-
args: "title",
|
|
5867
|
-
props: {
|
|
5868
|
-
delay: Number,
|
|
5869
|
-
title: String
|
|
5870
|
-
},
|
|
5871
5868
|
data: {
|
|
5872
5869
|
pos: "top",
|
|
5873
|
-
title: "",
|
|
5874
|
-
delay: 0,
|
|
5875
5870
|
animation: ["uk-animation-scale-up"],
|
|
5876
5871
|
duration: 100,
|
|
5877
5872
|
cls: "uk-active"
|
|
5878
5873
|
},
|
|
5879
|
-
|
|
5880
|
-
this.id = generateId(this, {});
|
|
5881
|
-
this._hasTitle = hasAttr(this.$el, "title");
|
|
5882
|
-
attr(this.$el, {
|
|
5883
|
-
title: "",
|
|
5884
|
-
"aria-describedby": this.id
|
|
5885
|
-
});
|
|
5874
|
+
connected() {
|
|
5886
5875
|
makeFocusable(this.$el);
|
|
5887
5876
|
},
|
|
5888
5877
|
disconnected() {
|
|
5889
5878
|
this.hide();
|
|
5890
|
-
if (!attr(this.$el, "title")) {
|
|
5891
|
-
attr(this.$el, "title", this._hasTitle ? this.title : null);
|
|
5892
|
-
}
|
|
5893
5879
|
},
|
|
5894
5880
|
methods: {
|
|
5895
5881
|
show() {
|
|
5896
|
-
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) {
|
|
5897
5887
|
return;
|
|
5898
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());
|
|
5899
5894
|
clearTimeout(this.showTimer);
|
|
5900
|
-
this.showTimer = setTimeout(this._show,
|
|
5895
|
+
this.showTimer = setTimeout(this._show, delay);
|
|
5901
5896
|
},
|
|
5902
5897
|
async hide() {
|
|
5903
5898
|
if (matches(this.$el, "input:focus")) {
|
|
@@ -5907,6 +5902,7 @@
|
|
|
5907
5902
|
if (this.isToggled(this.tooltip || null)) {
|
|
5908
5903
|
await this.toggleElement(this.tooltip, false, false);
|
|
5909
5904
|
}
|
|
5905
|
+
attr(this.$el, { title: this._hasTitle ? this.title : null, "aria-describedby": null });
|
|
5910
5906
|
remove$1(this.tooltip);
|
|
5911
5907
|
this.tooltip = null;
|
|
5912
5908
|
},
|
|
@@ -5929,7 +5925,7 @@
|
|
|
5929
5925
|
`keydown ${pointerDown$1}`,
|
|
5930
5926
|
this.hide,
|
|
5931
5927
|
false,
|
|
5932
|
-
(e2) => e2.type === pointerDown$1 && !
|
|
5928
|
+
(e2) => e2.type === pointerDown$1 && !this.$el.contains(e2.target) || e2.type === "keydown" && e2.keyCode === keyMap.ESC
|
|
5933
5929
|
),
|
|
5934
5930
|
on([document, ...overflowParents(this.$el)], "scroll", update, {
|
|
5935
5931
|
passive: true
|
|
@@ -5945,17 +5941,10 @@
|
|
|
5945
5941
|
}
|
|
5946
5942
|
},
|
|
5947
5943
|
events: {
|
|
5948
|
-
focus: "show",
|
|
5949
|
-
blur: "hide",
|
|
5950
|
-
[`${pointerEnter} ${pointerLeave}`](e) {
|
|
5951
|
-
if (!isTouch(e)) {
|
|
5952
|
-
this[e.type === pointerEnter ? "show" : "hide"]();
|
|
5953
|
-
}
|
|
5954
|
-
},
|
|
5955
5944
|
// Clicking a button does not give it focus on all browsers and platforms
|
|
5956
5945
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
|
|
5957
|
-
[pointerDown$1](e) {
|
|
5958
|
-
if (isTouch(e)) {
|
|
5946
|
+
[`focus ${pointerEnter} ${pointerDown$1}`](e) {
|
|
5947
|
+
if (!isTouch(e)) {
|
|
5959
5948
|
this.show();
|
|
5960
5949
|
}
|
|
5961
5950
|
}
|
|
@@ -5993,6 +5982,13 @@
|
|
|
5993
5982
|
}
|
|
5994
5983
|
return [dir, align];
|
|
5995
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
|
+
}
|
|
5996
5992
|
|
|
5997
5993
|
var upload = {
|
|
5998
5994
|
mixins: [I18n],
|
|
@@ -6337,7 +6333,7 @@
|
|
|
6337
6333
|
contents(items) {
|
|
6338
6334
|
for (const el of items) {
|
|
6339
6335
|
const isOpen = hasClass(
|
|
6340
|
-
this.items.find((item) =>
|
|
6336
|
+
this.items.find((item) => item.contains(el)),
|
|
6341
6337
|
this.clsOpen
|
|
6342
6338
|
);
|
|
6343
6339
|
hide(el, !isOpen);
|
|
@@ -6717,7 +6713,7 @@
|
|
|
6717
6713
|
},
|
|
6718
6714
|
handler({ defaultPrevented, current }) {
|
|
6719
6715
|
const { hash } = current;
|
|
6720
|
-
if (!defaultPrevented && hash && isSameSiteAnchor(current) && !
|
|
6716
|
+
if (!defaultPrevented && hash && isSameSiteAnchor(current) && !this.$el.contains($(hash))) {
|
|
6721
6717
|
this.hide(false);
|
|
6722
6718
|
}
|
|
6723
6719
|
}
|
|
@@ -6821,7 +6817,7 @@
|
|
|
6821
6817
|
name: "hide",
|
|
6822
6818
|
handler({ target }) {
|
|
6823
6819
|
if (this.$el !== target) {
|
|
6824
|
-
active = active === null &&
|
|
6820
|
+
active = active === null && this.$el.contains(target) && this.isToggled() ? this : active;
|
|
6825
6821
|
return;
|
|
6826
6822
|
}
|
|
6827
6823
|
active = this.isActive() ? null : active;
|
|
@@ -6853,7 +6849,7 @@
|
|
|
6853
6849
|
return;
|
|
6854
6850
|
}
|
|
6855
6851
|
let prev;
|
|
6856
|
-
while (active && prev !== active && !
|
|
6852
|
+
while (active && prev !== active && !active.$el.contains(this.$el)) {
|
|
6857
6853
|
prev = active;
|
|
6858
6854
|
active.hide(false, false);
|
|
6859
6855
|
}
|
|
@@ -6947,7 +6943,7 @@
|
|
|
6947
6943
|
return result;
|
|
6948
6944
|
}
|
|
6949
6945
|
function getViewport$1(el, target) {
|
|
6950
|
-
return offsetViewport(overflowParents(target).find((parent2) =>
|
|
6946
|
+
return offsetViewport(overflowParents(target).find((parent2) => parent2.contains(el)));
|
|
6951
6947
|
}
|
|
6952
6948
|
function createToggleComponent(drop) {
|
|
6953
6949
|
const { $el } = drop.$create("toggle", query(drop.toggle, drop.$el), {
|
|
@@ -6982,18 +6978,19 @@
|
|
|
6982
6978
|
}
|
|
6983
6979
|
function listenForBackgroundClose(drop) {
|
|
6984
6980
|
return on(document, pointerDown$1, ({ target }) => {
|
|
6985
|
-
if (
|
|
6986
|
-
|
|
6987
|
-
document,
|
|
6988
|
-
`${pointerUp$1} ${pointerCancel} scroll`,
|
|
6989
|
-
({ defaultPrevented, type, target: newTarget }) => {
|
|
6990
|
-
if (!defaultPrevented && type === pointerUp$1 && target === newTarget && !(drop.targetEl && within(target, drop.targetEl))) {
|
|
6991
|
-
drop.hide(false);
|
|
6992
|
-
}
|
|
6993
|
-
},
|
|
6994
|
-
true
|
|
6995
|
-
);
|
|
6981
|
+
if (drop.$el.contains(target)) {
|
|
6982
|
+
return;
|
|
6996
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
|
+
);
|
|
6997
6994
|
});
|
|
6998
6995
|
}
|
|
6999
6996
|
|
|
@@ -7050,7 +7047,7 @@
|
|
|
7050
7047
|
if (this.dropContainer !== $el) {
|
|
7051
7048
|
for (const el of $$(`.${clsDrop}`, this.dropContainer)) {
|
|
7052
7049
|
const target = (_a = this.getDropdown(el)) == null ? void 0 : _a.targetEl;
|
|
7053
|
-
if (!includes(dropdowns, el) && target &&
|
|
7050
|
+
if (!includes(dropdowns, el) && target && this.$el.contains(target)) {
|
|
7054
7051
|
dropdowns.push(el);
|
|
7055
7052
|
}
|
|
7056
7053
|
}
|
|
@@ -7090,7 +7087,7 @@
|
|
|
7090
7087
|
},
|
|
7091
7088
|
handler({ current }) {
|
|
7092
7089
|
const active2 = this.getActive();
|
|
7093
|
-
if (active2 && includes(active2.mode, "hover") && active2.targetEl && !
|
|
7090
|
+
if (active2 && includes(active2.mode, "hover") && active2.targetEl && !current.contains(active2.targetEl) && !active2.isDelaying) {
|
|
7094
7091
|
active2.hide(false);
|
|
7095
7092
|
}
|
|
7096
7093
|
}
|
|
@@ -7361,7 +7358,7 @@
|
|
|
7361
7358
|
{
|
|
7362
7359
|
name: "reset",
|
|
7363
7360
|
el() {
|
|
7364
|
-
return
|
|
7361
|
+
return this.$el.closest("form");
|
|
7365
7362
|
},
|
|
7366
7363
|
handler() {
|
|
7367
7364
|
this.$emit();
|
|
@@ -7807,7 +7804,7 @@
|
|
|
7807
7804
|
extends: IconComponent,
|
|
7808
7805
|
beforeConnect() {
|
|
7809
7806
|
const icon = this.$props.icon;
|
|
7810
|
-
this.icon =
|
|
7807
|
+
this.icon = this.$el.closest(".uk-nav-primary") ? `${icon}-large` : icon;
|
|
7811
7808
|
}
|
|
7812
7809
|
};
|
|
7813
7810
|
const Search = {
|
|
@@ -7823,7 +7820,7 @@
|
|
|
7823
7820
|
const label = this.t("toggle");
|
|
7824
7821
|
attr(this.$el, "aria-label", label);
|
|
7825
7822
|
} else {
|
|
7826
|
-
const button =
|
|
7823
|
+
const button = this.$el.closest("a,button");
|
|
7827
7824
|
if (button) {
|
|
7828
7825
|
const label = this.t("submit");
|
|
7829
7826
|
attr(button, "aria-label", label);
|
|
@@ -7850,7 +7847,7 @@
|
|
|
7850
7847
|
extends: IconComponent,
|
|
7851
7848
|
mixins: [I18n],
|
|
7852
7849
|
beforeConnect() {
|
|
7853
|
-
const button =
|
|
7850
|
+
const button = this.$el.closest("a,button");
|
|
7854
7851
|
attr(button, "role", this.role !== null && isTag(button, "a") ? "button" : this.role);
|
|
7855
7852
|
const label = this.t("label");
|
|
7856
7853
|
if (label && !hasAttr(button, "aria-label")) {
|
|
@@ -8213,7 +8210,7 @@
|
|
|
8213
8210
|
dropbarTransparentMode: false
|
|
8214
8211
|
},
|
|
8215
8212
|
computed: {
|
|
8216
|
-
navbarContainer: (_, $el) => closest(
|
|
8213
|
+
navbarContainer: (_, $el) => $el.closest(".uk-navbar-container"),
|
|
8217
8214
|
dropbarOffset: ({ dropbarTransparentMode }, $el) => dropbarTransparentMode === "behind" ? $el.offsetHeight : 0
|
|
8218
8215
|
},
|
|
8219
8216
|
watch: {
|
|
@@ -8516,8 +8513,8 @@
|
|
|
8516
8513
|
minHeight: 150
|
|
8517
8514
|
},
|
|
8518
8515
|
computed: {
|
|
8519
|
-
container: ({ selContainer }, $el) => closest(
|
|
8520
|
-
content: ({ selContent }, $el) => closest(
|
|
8516
|
+
container: ({ selContainer }, $el) => $el.closest(selContainer),
|
|
8517
|
+
content: ({ selContent }, $el) => $el.closest(selContent)
|
|
8521
8518
|
},
|
|
8522
8519
|
observe: resize({
|
|
8523
8520
|
target: ({ container, content }) => [container, content]
|
|
@@ -8610,7 +8607,7 @@
|
|
|
8610
8607
|
return;
|
|
8611
8608
|
}
|
|
8612
8609
|
for (const instance of instances) {
|
|
8613
|
-
if (
|
|
8610
|
+
if (instance.$el.contains(e.target) && isSameSiteAnchor(instance.$el)) {
|
|
8614
8611
|
e.preventDefault();
|
|
8615
8612
|
if (window.location.href !== instance.$el.href) {
|
|
8616
8613
|
window.history.pushState({}, "", instance.$el.href);
|
|
@@ -8743,7 +8740,7 @@
|
|
|
8743
8740
|
computed: {
|
|
8744
8741
|
links: (_, $el) => $$('a[href*="#"]', $el).filter((el) => el.hash && isSameSiteAnchor(el)),
|
|
8745
8742
|
elements({ closest: selector }) {
|
|
8746
|
-
return this.links.map((el) => closest(
|
|
8743
|
+
return this.links.map((el) => el.closest(selector || "*"));
|
|
8747
8744
|
}
|
|
8748
8745
|
},
|
|
8749
8746
|
watch: {
|
|
@@ -8966,7 +8963,7 @@
|
|
|
8966
8963
|
}
|
|
8967
8964
|
const { placeholder } = this;
|
|
8968
8965
|
css(placeholder, { height, width, margin });
|
|
8969
|
-
if (!
|
|
8966
|
+
if (!document.contains(placeholder)) {
|
|
8970
8967
|
placeholder.hidden = true;
|
|
8971
8968
|
}
|
|
8972
8969
|
(sticky ? before : after)(this.$el, placeholder);
|
|
@@ -9129,7 +9126,7 @@
|
|
|
9129
9126
|
return propOffset + toPx(value, "height", el, true);
|
|
9130
9127
|
} else {
|
|
9131
9128
|
const refElement = value === true ? parent(el) : query(value, el);
|
|
9132
|
-
return offset(refElement).bottom - (padding && refElement
|
|
9129
|
+
return offset(refElement).bottom - (padding && (refElement == null ? void 0 : refElement.contains(el)) ? toFloat(css(refElement, "paddingBottom")) : 0);
|
|
9133
9130
|
}
|
|
9134
9131
|
}
|
|
9135
9132
|
function coerce(value) {
|
|
@@ -9278,7 +9275,7 @@
|
|
|
9278
9275
|
toggles: ({ toggle }, $el) => $$(toggle, $el),
|
|
9279
9276
|
children(_, $el) {
|
|
9280
9277
|
return children($el).filter(
|
|
9281
|
-
(child) => this.toggles.some((toggle) =>
|
|
9278
|
+
(child) => this.toggles.some((toggle) => child.contains(toggle))
|
|
9282
9279
|
);
|
|
9283
9280
|
}
|
|
9284
9281
|
},
|
|
@@ -9351,7 +9348,7 @@
|
|
|
9351
9348
|
return `[${this.attrItem}],[data-${this.attrItem}]`;
|
|
9352
9349
|
},
|
|
9353
9350
|
handler(e) {
|
|
9354
|
-
if (
|
|
9351
|
+
if (e.target.closest("a,button")) {
|
|
9355
9352
|
e.preventDefault();
|
|
9356
9353
|
this.show(data(e.current, this.attrItem));
|
|
9357
9354
|
}
|
|
@@ -9489,7 +9486,7 @@
|
|
|
9489
9486
|
pointerDown$1,
|
|
9490
9487
|
() => trigger(this.$el, "blur"),
|
|
9491
9488
|
true,
|
|
9492
|
-
(e2) => !
|
|
9489
|
+
(e2) => !this.$el.contains(e2.target)
|
|
9493
9490
|
);
|
|
9494
9491
|
if (includes(this.mode, "click")) {
|
|
9495
9492
|
this._preventClick = true;
|
|
@@ -9541,7 +9538,7 @@
|
|
|
9541
9538
|
},
|
|
9542
9539
|
handler(e) {
|
|
9543
9540
|
let link;
|
|
9544
|
-
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))) {
|
|
9545
9542
|
e.preventDefault();
|
|
9546
9543
|
}
|
|
9547
9544
|
if (!this._preventClick && includes(this.mode, "click")) {
|