uikit 3.25.30-dev.6f7d153 → 3.25.30
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 +1 -6
- 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 +1 -1
- 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 +1 -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 +1 -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 +81 -93
- 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 +81 -93
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/core/drop.js +3 -12
- package/src/js/core/dropnav.js +44 -67
- package/src/js/core/navbar.js +1 -1
- package/src/js/core/toggle.js +47 -36
- package/tests/toggle.html +2 -2
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.25.30
|
|
1
|
+
/*! UIkit 3.25.30 | 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() :
|
|
@@ -3421,7 +3421,7 @@
|
|
|
3421
3421
|
return Math.atan2(Math.abs(pos2.y - pos1.y), Math.abs(pos2.x - pos1.x)) * 180 / Math.PI;
|
|
3422
3422
|
}
|
|
3423
3423
|
|
|
3424
|
-
var VERSION = '3.25.30
|
|
3424
|
+
var VERSION = '3.25.30';
|
|
3425
3425
|
|
|
3426
3426
|
function initWatches(instance) {
|
|
3427
3427
|
instance._watches = [];
|
|
@@ -7219,7 +7219,7 @@
|
|
|
7219
7219
|
self: true,
|
|
7220
7220
|
handler(e) {
|
|
7221
7221
|
e.preventDefault();
|
|
7222
|
-
if (!matches(this.$el, ":focus
|
|
7222
|
+
if (!matches(this.$el, ":focus,:hover")) {
|
|
7223
7223
|
this.hide();
|
|
7224
7224
|
}
|
|
7225
7225
|
}
|
|
@@ -7234,10 +7234,10 @@
|
|
|
7234
7234
|
}
|
|
7235
7235
|
},
|
|
7236
7236
|
{
|
|
7237
|
-
name: pointerLeave
|
|
7237
|
+
name: `${pointerLeave} focusout`,
|
|
7238
7238
|
filter: ({ mode }) => includes(mode, "hover"),
|
|
7239
7239
|
handler(e) {
|
|
7240
|
-
if (!isTouch(e) && e.relatedTarget
|
|
7240
|
+
if (!isTouch(e) && e.relatedTarget) {
|
|
7241
7241
|
this.hide();
|
|
7242
7242
|
}
|
|
7243
7243
|
}
|
|
@@ -7263,7 +7263,6 @@
|
|
|
7263
7263
|
const handlers = [
|
|
7264
7264
|
listenForResize(this),
|
|
7265
7265
|
listenForEscClose(this),
|
|
7266
|
-
listenForFocusClose(this),
|
|
7267
7266
|
listenForBackgroundClose(this),
|
|
7268
7267
|
this.autoUpdate && listenForScroll(this),
|
|
7269
7268
|
this.closeOnScroll && listenForScrollClose(this)
|
|
@@ -7452,14 +7451,6 @@
|
|
|
7452
7451
|
function listenForScrollClose(drop) {
|
|
7453
7452
|
return listenForScroll(drop, () => drop.hide(false));
|
|
7454
7453
|
}
|
|
7455
|
-
function listenForFocusClose(drop) {
|
|
7456
|
-
return on(document, "focusin", ({ target }) => {
|
|
7457
|
-
var _a;
|
|
7458
|
-
if (!drop.$el.contains(target) && !((_a = drop.targetEl) == null ? void 0 : _a.contains(target))) {
|
|
7459
|
-
drop.hide(false);
|
|
7460
|
-
}
|
|
7461
|
-
});
|
|
7462
|
-
}
|
|
7463
7454
|
function listenForBackgroundClose(drop) {
|
|
7464
7455
|
return onOutsidePointer(
|
|
7465
7456
|
(target) => {
|
|
@@ -7503,7 +7494,7 @@
|
|
|
7503
7494
|
delayShow: 160,
|
|
7504
7495
|
duration: 200,
|
|
7505
7496
|
container: false,
|
|
7506
|
-
selNavItem: "> li > a, >
|
|
7497
|
+
selNavItem: "> li > a, > ul > li > a"
|
|
7507
7498
|
},
|
|
7508
7499
|
computed: {
|
|
7509
7500
|
dropbarAnchor: ({ dropbarAnchor }, $el) => query(dropbarAnchor, $el) || $el,
|
|
@@ -7558,7 +7549,7 @@
|
|
|
7558
7549
|
},
|
|
7559
7550
|
events: [
|
|
7560
7551
|
{
|
|
7561
|
-
name: "mouseover",
|
|
7552
|
+
name: "mouseover focusin",
|
|
7562
7553
|
delegate: ({ selNavItem }) => selNavItem,
|
|
7563
7554
|
handler({ current }) {
|
|
7564
7555
|
const active2 = this.getActive();
|
|
@@ -7572,24 +7563,31 @@
|
|
|
7572
7563
|
self: true,
|
|
7573
7564
|
delegate: ({ selNavItem }) => selNavItem,
|
|
7574
7565
|
handler(e) {
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
}
|
|
7578
|
-
const { current, keyCode, shiftKey } = e;
|
|
7566
|
+
var _a;
|
|
7567
|
+
const { current, keyCode } = e;
|
|
7579
7568
|
const active2 = this.getActive();
|
|
7580
|
-
if (keyCode === keyMap.
|
|
7581
|
-
|
|
7582
|
-
return;
|
|
7583
|
-
}
|
|
7584
|
-
if ((active2 == null ? void 0 : active2.targetEl) === current && (keyCode === keyMap.DOWN || keyCode === keyMap.TAB && !shiftKey)) {
|
|
7585
|
-
const [first] = getFocusableElements(active2.$el);
|
|
7586
|
-
if (first) {
|
|
7569
|
+
if (keyCode === keyMap.DOWN) {
|
|
7570
|
+
if ((active2 == null ? void 0 : active2.targetEl) === current) {
|
|
7587
7571
|
e.preventDefault();
|
|
7588
|
-
|
|
7572
|
+
(_a = $(selFocusable, active2.$el)) == null ? void 0 : _a.focus();
|
|
7573
|
+
} else {
|
|
7574
|
+
const dropdown = this.dropdowns.find(
|
|
7575
|
+
(el) => {
|
|
7576
|
+
var _a2;
|
|
7577
|
+
return ((_a2 = this.getDropdown(el)) == null ? void 0 : _a2.targetEl) === current;
|
|
7578
|
+
}
|
|
7579
|
+
);
|
|
7580
|
+
if (dropdown) {
|
|
7581
|
+
e.preventDefault();
|
|
7582
|
+
current.click();
|
|
7583
|
+
once(dropdown, "show", (e2) => {
|
|
7584
|
+
var _a2;
|
|
7585
|
+
return (_a2 = $(selFocusable, e2.target)) == null ? void 0 : _a2.focus();
|
|
7586
|
+
});
|
|
7587
|
+
}
|
|
7589
7588
|
}
|
|
7590
|
-
return;
|
|
7591
7589
|
}
|
|
7592
|
-
|
|
7590
|
+
handleNavItemNavigation(e, this.items, active2);
|
|
7593
7591
|
}
|
|
7594
7592
|
},
|
|
7595
7593
|
{
|
|
@@ -7597,33 +7595,27 @@
|
|
|
7597
7595
|
el: ({ dropContainer }) => dropContainer,
|
|
7598
7596
|
delegate: ({ clsDrop }) => `.${clsDrop}`,
|
|
7599
7597
|
handler(e) {
|
|
7600
|
-
|
|
7598
|
+
var _a, _b;
|
|
7599
|
+
const { current, keyCode, target } = e;
|
|
7600
|
+
if (isInput(target) || !includes(this.dropdowns, current)) {
|
|
7601
7601
|
return;
|
|
7602
7602
|
}
|
|
7603
|
-
const { current, keyCode, target } = e;
|
|
7604
7603
|
const active2 = this.getActive();
|
|
7605
|
-
|
|
7604
|
+
const next = getNavigationIndex(keyCode, keyMap.UP, keyMap.DOWN);
|
|
7605
|
+
if (~next) {
|
|
7606
|
+
e.preventDefault();
|
|
7607
|
+
const elements = $$(selFocusable, current);
|
|
7608
|
+
(_a = elements[getIndex(
|
|
7609
|
+
next,
|
|
7610
|
+
elements,
|
|
7611
|
+
findIndex(elements, (el) => matches(el, ":focus"))
|
|
7612
|
+
)]) == null ? void 0 : _a.focus();
|
|
7606
7613
|
return;
|
|
7607
7614
|
}
|
|
7608
7615
|
if (keyCode === keyMap.ESC) {
|
|
7609
|
-
|
|
7610
|
-
return;
|
|
7611
|
-
}
|
|
7612
|
-
const elements = getFocusableElements(current);
|
|
7613
|
-
if (keyCode === keyMap.TAB) {
|
|
7614
|
-
if (target === elements[e.shiftKey ? 0 : elements.length - 1]) {
|
|
7615
|
-
active2.targetEl.focus();
|
|
7616
|
-
if (e.shiftKey) {
|
|
7617
|
-
e.preventDefault();
|
|
7618
|
-
} else {
|
|
7619
|
-
active2.hide(false, false);
|
|
7620
|
-
}
|
|
7621
|
-
}
|
|
7622
|
-
return;
|
|
7623
|
-
}
|
|
7624
|
-
if (!isInput(target)) {
|
|
7625
|
-
handleNavigation(e, elements, target);
|
|
7616
|
+
(_b = active2.targetEl) == null ? void 0 : _b.focus();
|
|
7626
7617
|
}
|
|
7618
|
+
handleNavItemNavigation(e, this.items, active2);
|
|
7627
7619
|
}
|
|
7628
7620
|
},
|
|
7629
7621
|
{
|
|
@@ -7759,32 +7751,25 @@
|
|
|
7759
7751
|
}
|
|
7760
7752
|
}
|
|
7761
7753
|
};
|
|
7762
|
-
function
|
|
7763
|
-
var _a;
|
|
7764
|
-
const
|
|
7754
|
+
function handleNavItemNavigation(e, toggles, active2) {
|
|
7755
|
+
var _a, _b, _c;
|
|
7756
|
+
const { current, keyCode } = e;
|
|
7765
7757
|
const next = getNavigationIndex(keyCode);
|
|
7766
7758
|
if (~next) {
|
|
7767
7759
|
e.preventDefault();
|
|
7768
|
-
(_a =
|
|
7760
|
+
(_a = active2.hide) == null ? void 0 : _a.call(active2, false);
|
|
7761
|
+
toggles[getIndex(next, toggles, toggles.indexOf(active2.targetEl || current))].focus();
|
|
7762
|
+
} else if (keyCode === keyMap.TAB) {
|
|
7763
|
+
(_b = active2.targetEl) == null ? void 0 : _b.focus();
|
|
7764
|
+
(_c = active2.hide) == null ? void 0 : _c.call(active2, false);
|
|
7769
7765
|
}
|
|
7770
7766
|
}
|
|
7771
|
-
function closeDropdown(e, drop) {
|
|
7772
|
-
var _a;
|
|
7773
|
-
e.preventDefault();
|
|
7774
|
-
drop.hide(false);
|
|
7775
|
-
(_a = drop.targetEl) == null ? void 0 : _a.focus();
|
|
7776
|
-
}
|
|
7777
|
-
function getFocusableElements(el, selector = selFocusable) {
|
|
7778
|
-
return $$(selector, el).filter(
|
|
7779
|
-
(el2) => el2.tabIndex >= 0 && !matches(el2, ":disabled") && !el2.closest("[inert]") && isVisible(el2)
|
|
7780
|
-
);
|
|
7781
|
-
}
|
|
7782
7767
|
function preventInitialPointerEnter(el) {
|
|
7783
7768
|
const off = () => handlers.forEach((handler) => handler());
|
|
7784
7769
|
const handlers = [
|
|
7785
7770
|
once(el.ownerDocument, pointerMove$1, (e) => el.contains(e.target) || off()),
|
|
7786
|
-
on(el, `mouseenter ${pointerEnter}`, (e) => e.stopPropagation(), true),
|
|
7787
|
-
on(el, `mouseleave ${pointerLeave}`, off, true)
|
|
7771
|
+
on(el, `mouseenter ${pointerEnter}`, (e) => e.stopPropagation(), { capture: true }),
|
|
7772
|
+
on(el, `mouseleave ${pointerLeave}`, off, { capture: true })
|
|
7788
7773
|
];
|
|
7789
7774
|
}
|
|
7790
7775
|
|
|
@@ -8753,7 +8738,7 @@
|
|
|
8753
8738
|
autoUpdate: false,
|
|
8754
8739
|
delayShow: 200,
|
|
8755
8740
|
clsDrop: "uk-navbar-dropdown",
|
|
8756
|
-
selNavItem: ".uk-navbar-nav > li > a
|
|
8741
|
+
selNavItem: ".uk-navbar-nav > li > a,a.uk-navbar-item,button.uk-navbar-item,.uk-navbar-item a,.uk-navbar-item button,.uk-navbar-toggle",
|
|
8757
8742
|
// Simplify with :where() selector once browser target is Safari 14+
|
|
8758
8743
|
dropbarTransparentMode: false
|
|
8759
8744
|
},
|
|
@@ -10012,43 +9997,48 @@
|
|
|
10012
9997
|
name: pointerDown$1,
|
|
10013
9998
|
filter: ({ mode }) => includes(mode, "hover"),
|
|
10014
9999
|
handler(e) {
|
|
10015
|
-
this.
|
|
10000
|
+
this._preventClick = null;
|
|
10001
|
+
if (!isTouch(e) || isBoolean(this._showState) || this.$el.disabled) {
|
|
10002
|
+
return;
|
|
10003
|
+
}
|
|
10004
|
+
trigger(this.$el, "focus");
|
|
10005
|
+
once(
|
|
10006
|
+
document,
|
|
10007
|
+
pointerDown$1,
|
|
10008
|
+
() => trigger(this.$el, "blur"),
|
|
10009
|
+
true,
|
|
10010
|
+
(e2) => !this.$el.contains(e2.target)
|
|
10011
|
+
);
|
|
10012
|
+
if (includes(this.mode, "click")) {
|
|
10013
|
+
this._preventClick = true;
|
|
10014
|
+
}
|
|
10016
10015
|
}
|
|
10017
10016
|
},
|
|
10018
10017
|
{
|
|
10019
|
-
name: `${pointerEnter} ${pointerLeave}
|
|
10018
|
+
name: `${pointerEnter} ${pointerLeave} focus blur`,
|
|
10020
10019
|
filter: ({ mode }) => includes(mode, "hover"),
|
|
10021
10020
|
handler(e) {
|
|
10022
|
-
|
|
10023
|
-
const allowClick = includes(this.mode, "click") || e.detail === 0 || isTouch(e) || this._touch;
|
|
10024
|
-
if (this.$el.disabled || (click ? e.defaultPrevented || !allowClick : isTouch(e) || document.readyState === "loading")) {
|
|
10021
|
+
if (isTouch(e) || this.$el.disabled || document.readyState === "loading") {
|
|
10025
10022
|
return;
|
|
10026
10023
|
}
|
|
10024
|
+
const show = includes([pointerEnter, "focus"], e.type);
|
|
10027
10025
|
const expanded = this.isToggled(this.target);
|
|
10028
|
-
if (e.type === pointerLeave) {
|
|
10029
|
-
|
|
10030
|
-
|
|
10031
|
-
return;
|
|
10032
|
-
}
|
|
10033
|
-
this._showState = null;
|
|
10034
|
-
if (expanded !== initial) {
|
|
10035
|
-
this.toggle("togglehide");
|
|
10036
|
-
} else {
|
|
10037
|
-
trigger(this.target, "togglehide", [this]);
|
|
10026
|
+
if (!show && (!isBoolean(this._showState) || e.type === pointerLeave && matches(this.$el, ":focus") || e.type === "blur" && matches(this.$el, ":hover"))) {
|
|
10027
|
+
if (expanded === this._showState) {
|
|
10028
|
+
this._showState = null;
|
|
10038
10029
|
}
|
|
10039
10030
|
return;
|
|
10040
10031
|
}
|
|
10041
|
-
if (
|
|
10042
|
-
|
|
10043
|
-
}
|
|
10044
|
-
if (!click && expanded === this._showState) {
|
|
10045
|
-
this.toggle("toggleshow");
|
|
10032
|
+
if (show && isBoolean(this._showState) && expanded !== this._showState) {
|
|
10033
|
+
return;
|
|
10046
10034
|
}
|
|
10035
|
+
this._showState = show ? expanded : null;
|
|
10036
|
+
this.toggle(`toggle${show ? "show" : "hide"}`);
|
|
10047
10037
|
}
|
|
10048
10038
|
},
|
|
10049
10039
|
{
|
|
10050
10040
|
name: "keydown",
|
|
10051
|
-
filter: ({ $el, mode }) =>
|
|
10041
|
+
filter: ({ $el, mode }) => includes(mode, "click") && !isTag($el, "input"),
|
|
10052
10042
|
handler(e) {
|
|
10053
10043
|
if (e.keyCode === keyMap.SPACE || e.keyCode === keyMap.ENTER) {
|
|
10054
10044
|
e.preventDefault();
|
|
@@ -10060,17 +10050,15 @@
|
|
|
10060
10050
|
name: "click",
|
|
10061
10051
|
filter: ({ mode }) => ["click", "hover"].some((m) => includes(mode, m)),
|
|
10062
10052
|
handler(e) {
|
|
10063
|
-
const touch = this._touch;
|
|
10064
|
-
this._touch = false;
|
|
10065
10053
|
if (e.defaultPrevented) {
|
|
10066
10054
|
return;
|
|
10067
10055
|
}
|
|
10068
10056
|
const link = e.target.closest("a[href]");
|
|
10069
10057
|
const isButtonLike = isSameSiteAnchor(link) && (!link.hash || matches(this.target, link.hash));
|
|
10070
|
-
if (isButtonLike || link && !this.isToggled(this.target)) {
|
|
10058
|
+
if (this._preventClick || isButtonLike || link && !this.isToggled(this.target)) {
|
|
10071
10059
|
e.preventDefault();
|
|
10072
10060
|
}
|
|
10073
|
-
if (
|
|
10061
|
+
if (!this._preventClick && includes(this.mode, "click") && (!link || isButtonLike || e.defaultPrevented)) {
|
|
10074
10062
|
this.toggle();
|
|
10075
10063
|
}
|
|
10076
10064
|
}
|