uikit 3.25.30-dev.188f79c → 3.25.30-dev.6f7d153
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 +7 -1
- package/dist/css/uikit-core-rtl.css +8 -6
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +8 -6
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +8 -6
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +8 -6
- 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 +93 -81
- 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 +93 -81
- package/dist/js/uikit.min.js +1 -1
- package/package.json +13 -13
- package/src/js/core/drop.js +12 -3
- package/src/js/core/dropnav.js +67 -44
- package/src/js/core/navbar.js +1 -1
- package/src/js/core/toggle.js +36 -47
- package/src/js/util/lang.js +1 -1
- package/src/less/components/breadcrumb.less +7 -5
- package/src/scss/components/breadcrumb.scss +7 -5
- package/tests/js/index.js +2 -2
- package/tests/toggle.html +2 -2
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.25.30-dev.
|
|
1
|
+
/*! UIkit 3.25.30-dev.6f7d153 | 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() :
|
|
@@ -1683,7 +1683,7 @@
|
|
|
1683
1683
|
wrapInner: wrapInner
|
|
1684
1684
|
});
|
|
1685
1685
|
|
|
1686
|
-
var VERSION = '3.25.30-dev.
|
|
1686
|
+
var VERSION = '3.25.30-dev.6f7d153';
|
|
1687
1687
|
|
|
1688
1688
|
function initUpdates(instance) {
|
|
1689
1689
|
instance._data = {};
|
|
@@ -3370,7 +3370,7 @@
|
|
|
3370
3370
|
self: true,
|
|
3371
3371
|
handler(e) {
|
|
3372
3372
|
e.preventDefault();
|
|
3373
|
-
if (!matches(this.$el, ":focus,:hover")) {
|
|
3373
|
+
if (!matches(this.$el, ":focus-within,:hover")) {
|
|
3374
3374
|
this.hide();
|
|
3375
3375
|
}
|
|
3376
3376
|
}
|
|
@@ -3385,10 +3385,10 @@
|
|
|
3385
3385
|
}
|
|
3386
3386
|
},
|
|
3387
3387
|
{
|
|
3388
|
-
name:
|
|
3388
|
+
name: pointerLeave,
|
|
3389
3389
|
filter: ({ mode }) => includes(mode, "hover"),
|
|
3390
3390
|
handler(e) {
|
|
3391
|
-
if (!isTouch(e) && e.relatedTarget) {
|
|
3391
|
+
if (!isTouch(e) && e.relatedTarget && !matches(this.$el, ":focus-within")) {
|
|
3392
3392
|
this.hide();
|
|
3393
3393
|
}
|
|
3394
3394
|
}
|
|
@@ -3414,6 +3414,7 @@
|
|
|
3414
3414
|
const handlers = [
|
|
3415
3415
|
listenForResize(this),
|
|
3416
3416
|
listenForEscClose$1(this),
|
|
3417
|
+
listenForFocusClose(this),
|
|
3417
3418
|
listenForBackgroundClose$1(this),
|
|
3418
3419
|
this.autoUpdate && listenForScroll(this),
|
|
3419
3420
|
this.closeOnScroll && listenForScrollClose(this)
|
|
@@ -3602,6 +3603,14 @@
|
|
|
3602
3603
|
function listenForScrollClose(drop) {
|
|
3603
3604
|
return listenForScroll(drop, () => drop.hide(false));
|
|
3604
3605
|
}
|
|
3606
|
+
function listenForFocusClose(drop) {
|
|
3607
|
+
return on(document, "focusin", ({ target }) => {
|
|
3608
|
+
var _a;
|
|
3609
|
+
if (!drop.$el.contains(target) && !((_a = drop.targetEl) == null ? void 0 : _a.contains(target))) {
|
|
3610
|
+
drop.hide(false);
|
|
3611
|
+
}
|
|
3612
|
+
});
|
|
3613
|
+
}
|
|
3605
3614
|
function listenForBackgroundClose$1(drop) {
|
|
3606
3615
|
return onOutsidePointer(
|
|
3607
3616
|
(target) => {
|
|
@@ -3645,7 +3654,7 @@
|
|
|
3645
3654
|
delayShow: 160,
|
|
3646
3655
|
duration: 200,
|
|
3647
3656
|
container: false,
|
|
3648
|
-
selNavItem: "> li > a, > ul > li > a"
|
|
3657
|
+
selNavItem: "> li > a, > li > button, > ul > li > a, > ul > li > button"
|
|
3649
3658
|
},
|
|
3650
3659
|
computed: {
|
|
3651
3660
|
dropbarAnchor: ({ dropbarAnchor }, $el) => query(dropbarAnchor, $el) || $el,
|
|
@@ -3700,7 +3709,7 @@
|
|
|
3700
3709
|
},
|
|
3701
3710
|
events: [
|
|
3702
3711
|
{
|
|
3703
|
-
name: "mouseover
|
|
3712
|
+
name: "mouseover",
|
|
3704
3713
|
delegate: ({ selNavItem }) => selNavItem,
|
|
3705
3714
|
handler({ current }) {
|
|
3706
3715
|
const active2 = this.getActive();
|
|
@@ -3714,31 +3723,24 @@
|
|
|
3714
3723
|
self: true,
|
|
3715
3724
|
delegate: ({ selNavItem }) => selNavItem,
|
|
3716
3725
|
handler(e) {
|
|
3717
|
-
|
|
3718
|
-
|
|
3726
|
+
if (e.defaultPrevented || e.altKey || e.ctrlKey || e.metaKey) {
|
|
3727
|
+
return;
|
|
3728
|
+
}
|
|
3729
|
+
const { current, keyCode, shiftKey } = e;
|
|
3719
3730
|
const active2 = this.getActive();
|
|
3720
|
-
if (keyCode === keyMap.
|
|
3721
|
-
|
|
3731
|
+
if (keyCode === keyMap.ESC && active2) {
|
|
3732
|
+
closeDropdown(e, active2);
|
|
3733
|
+
return;
|
|
3734
|
+
}
|
|
3735
|
+
if ((active2 == null ? void 0 : active2.targetEl) === current && (keyCode === keyMap.DOWN || keyCode === keyMap.TAB && !shiftKey)) {
|
|
3736
|
+
const [first] = getFocusableElements(active2.$el);
|
|
3737
|
+
if (first) {
|
|
3722
3738
|
e.preventDefault();
|
|
3723
|
-
|
|
3724
|
-
} else {
|
|
3725
|
-
const dropdown = this.dropdowns.find(
|
|
3726
|
-
(el) => {
|
|
3727
|
-
var _a2;
|
|
3728
|
-
return ((_a2 = this.getDropdown(el)) == null ? void 0 : _a2.targetEl) === current;
|
|
3729
|
-
}
|
|
3730
|
-
);
|
|
3731
|
-
if (dropdown) {
|
|
3732
|
-
e.preventDefault();
|
|
3733
|
-
current.click();
|
|
3734
|
-
once(dropdown, "show", (e2) => {
|
|
3735
|
-
var _a2;
|
|
3736
|
-
return (_a2 = $(selFocusable, e2.target)) == null ? void 0 : _a2.focus();
|
|
3737
|
-
});
|
|
3738
|
-
}
|
|
3739
|
+
first.focus();
|
|
3739
3740
|
}
|
|
3741
|
+
return;
|
|
3740
3742
|
}
|
|
3741
|
-
|
|
3743
|
+
handleNavigation(e, getFocusableElements(this.$el, this.selNavItem), current);
|
|
3742
3744
|
}
|
|
3743
3745
|
},
|
|
3744
3746
|
{
|
|
@@ -3746,27 +3748,33 @@
|
|
|
3746
3748
|
el: ({ dropContainer }) => dropContainer,
|
|
3747
3749
|
delegate: ({ clsDrop }) => `.${clsDrop}`,
|
|
3748
3750
|
handler(e) {
|
|
3749
|
-
|
|
3750
|
-
const { current, keyCode, target } = e;
|
|
3751
|
-
if (isInput(target) || !includes(this.dropdowns, current)) {
|
|
3751
|
+
if (e.defaultPrevented || e.altKey || e.ctrlKey || e.metaKey) {
|
|
3752
3752
|
return;
|
|
3753
3753
|
}
|
|
3754
|
+
const { current, keyCode, target } = e;
|
|
3754
3755
|
const active2 = this.getActive();
|
|
3755
|
-
|
|
3756
|
-
if (~next) {
|
|
3757
|
-
e.preventDefault();
|
|
3758
|
-
const elements = $$(selFocusable, current);
|
|
3759
|
-
(_a = elements[getIndex(
|
|
3760
|
-
next,
|
|
3761
|
-
elements,
|
|
3762
|
-
findIndex(elements, (el) => matches(el, ":focus"))
|
|
3763
|
-
)]) == null ? void 0 : _a.focus();
|
|
3756
|
+
if (!active2 || active2.$el !== current) {
|
|
3764
3757
|
return;
|
|
3765
3758
|
}
|
|
3766
3759
|
if (keyCode === keyMap.ESC) {
|
|
3767
|
-
(
|
|
3760
|
+
closeDropdown(e, active2);
|
|
3761
|
+
return;
|
|
3762
|
+
}
|
|
3763
|
+
const elements = getFocusableElements(current);
|
|
3764
|
+
if (keyCode === keyMap.TAB) {
|
|
3765
|
+
if (target === elements[e.shiftKey ? 0 : elements.length - 1]) {
|
|
3766
|
+
active2.targetEl.focus();
|
|
3767
|
+
if (e.shiftKey) {
|
|
3768
|
+
e.preventDefault();
|
|
3769
|
+
} else {
|
|
3770
|
+
active2.hide(false, false);
|
|
3771
|
+
}
|
|
3772
|
+
}
|
|
3773
|
+
return;
|
|
3774
|
+
}
|
|
3775
|
+
if (!isInput(target)) {
|
|
3776
|
+
handleNavigation(e, elements, target);
|
|
3768
3777
|
}
|
|
3769
|
-
handleNavItemNavigation(e, this.items, active2);
|
|
3770
3778
|
}
|
|
3771
3779
|
},
|
|
3772
3780
|
{
|
|
@@ -3902,25 +3910,32 @@
|
|
|
3902
3910
|
}
|
|
3903
3911
|
}
|
|
3904
3912
|
};
|
|
3905
|
-
function
|
|
3906
|
-
var _a
|
|
3907
|
-
const {
|
|
3913
|
+
function handleNavigation(e, elements, current) {
|
|
3914
|
+
var _a;
|
|
3915
|
+
const keyCode = { [keyMap.UP]: keyMap.LEFT, [keyMap.DOWN]: keyMap.RIGHT }[e.keyCode] || e.keyCode;
|
|
3908
3916
|
const next = getNavigationIndex(keyCode);
|
|
3909
3917
|
if (~next) {
|
|
3910
3918
|
e.preventDefault();
|
|
3911
|
-
(_a =
|
|
3912
|
-
toggles[getIndex(next, toggles, toggles.indexOf(active2.targetEl || current))].focus();
|
|
3913
|
-
} else if (keyCode === keyMap.TAB) {
|
|
3914
|
-
(_b = active2.targetEl) == null ? void 0 : _b.focus();
|
|
3915
|
-
(_c = active2.hide) == null ? void 0 : _c.call(active2, false);
|
|
3919
|
+
(_a = elements[getIndex(next, elements, elements.indexOf(current), true)]) == null ? void 0 : _a.focus();
|
|
3916
3920
|
}
|
|
3917
3921
|
}
|
|
3922
|
+
function closeDropdown(e, drop) {
|
|
3923
|
+
var _a;
|
|
3924
|
+
e.preventDefault();
|
|
3925
|
+
drop.hide(false);
|
|
3926
|
+
(_a = drop.targetEl) == null ? void 0 : _a.focus();
|
|
3927
|
+
}
|
|
3928
|
+
function getFocusableElements(el, selector = selFocusable) {
|
|
3929
|
+
return $$(selector, el).filter(
|
|
3930
|
+
(el2) => el2.tabIndex >= 0 && !matches(el2, ":disabled") && !el2.closest("[inert]") && isVisible(el2)
|
|
3931
|
+
);
|
|
3932
|
+
}
|
|
3918
3933
|
function preventInitialPointerEnter(el) {
|
|
3919
3934
|
const off = () => handlers.forEach((handler) => handler());
|
|
3920
3935
|
const handlers = [
|
|
3921
3936
|
once(el.ownerDocument, pointerMove, (e) => el.contains(e.target) || off()),
|
|
3922
|
-
on(el, `mouseenter ${pointerEnter}`, (e) => e.stopPropagation(),
|
|
3923
|
-
on(el, `mouseleave ${pointerLeave}`, off,
|
|
3937
|
+
on(el, `mouseenter ${pointerEnter}`, (e) => e.stopPropagation(), true),
|
|
3938
|
+
on(el, `mouseleave ${pointerLeave}`, off, true)
|
|
3924
3939
|
];
|
|
3925
3940
|
}
|
|
3926
3941
|
|
|
@@ -5377,7 +5392,7 @@
|
|
|
5377
5392
|
autoUpdate: false,
|
|
5378
5393
|
delayShow: 200,
|
|
5379
5394
|
clsDrop: "uk-navbar-dropdown",
|
|
5380
|
-
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",
|
|
5395
|
+
selNavItem: ".uk-navbar-nav > li > a,.uk-navbar-nav > li > button,a.uk-navbar-item,button.uk-navbar-item,.uk-navbar-item a,.uk-navbar-item button,.uk-navbar-toggle",
|
|
5381
5396
|
// Simplify with :where() selector once browser target is Safari 14+
|
|
5382
5397
|
dropbarTransparentMode: false
|
|
5383
5398
|
},
|
|
@@ -6649,48 +6664,43 @@
|
|
|
6649
6664
|
name: pointerDown,
|
|
6650
6665
|
filter: ({ mode }) => includes(mode, "hover"),
|
|
6651
6666
|
handler(e) {
|
|
6652
|
-
this.
|
|
6653
|
-
if (!isTouch(e) || isBoolean(this._showState) || this.$el.disabled) {
|
|
6654
|
-
return;
|
|
6655
|
-
}
|
|
6656
|
-
trigger(this.$el, "focus");
|
|
6657
|
-
once(
|
|
6658
|
-
document,
|
|
6659
|
-
pointerDown,
|
|
6660
|
-
() => trigger(this.$el, "blur"),
|
|
6661
|
-
true,
|
|
6662
|
-
(e2) => !this.$el.contains(e2.target)
|
|
6663
|
-
);
|
|
6664
|
-
if (includes(this.mode, "click")) {
|
|
6665
|
-
this._preventClick = true;
|
|
6666
|
-
}
|
|
6667
|
+
this._touch = isTouch(e);
|
|
6667
6668
|
}
|
|
6668
6669
|
},
|
|
6669
6670
|
{
|
|
6670
|
-
name: `${pointerEnter} ${pointerLeave}
|
|
6671
|
+
name: `${pointerEnter} ${pointerLeave} click`,
|
|
6671
6672
|
filter: ({ mode }) => includes(mode, "hover"),
|
|
6672
6673
|
handler(e) {
|
|
6673
|
-
|
|
6674
|
+
const click = e.type === "click";
|
|
6675
|
+
const allowClick = includes(this.mode, "click") || e.detail === 0 || isTouch(e) || this._touch;
|
|
6676
|
+
if (this.$el.disabled || (click ? e.defaultPrevented || !allowClick : isTouch(e) || document.readyState === "loading")) {
|
|
6674
6677
|
return;
|
|
6675
6678
|
}
|
|
6676
|
-
const show = includes([pointerEnter, "focus"], e.type);
|
|
6677
6679
|
const expanded = this.isToggled(this.target);
|
|
6678
|
-
if (
|
|
6679
|
-
|
|
6680
|
-
|
|
6680
|
+
if (e.type === pointerLeave) {
|
|
6681
|
+
const initial = this._showState;
|
|
6682
|
+
if (!isBoolean(initial)) {
|
|
6683
|
+
return;
|
|
6684
|
+
}
|
|
6685
|
+
this._showState = null;
|
|
6686
|
+
if (expanded !== initial) {
|
|
6687
|
+
this.toggle("togglehide");
|
|
6688
|
+
} else {
|
|
6689
|
+
trigger(this.target, "togglehide", [this]);
|
|
6681
6690
|
}
|
|
6682
6691
|
return;
|
|
6683
6692
|
}
|
|
6684
|
-
if (
|
|
6685
|
-
|
|
6693
|
+
if (!isBoolean(this._showState)) {
|
|
6694
|
+
this._showState = expanded;
|
|
6695
|
+
}
|
|
6696
|
+
if (!click && expanded === this._showState) {
|
|
6697
|
+
this.toggle("toggleshow");
|
|
6686
6698
|
}
|
|
6687
|
-
this._showState = show ? expanded : null;
|
|
6688
|
-
this.toggle(`toggle${show ? "show" : "hide"}`);
|
|
6689
6699
|
}
|
|
6690
6700
|
},
|
|
6691
6701
|
{
|
|
6692
6702
|
name: "keydown",
|
|
6693
|
-
filter: ({ $el, mode }) => includes(mode,
|
|
6703
|
+
filter: ({ $el, mode }) => ["click", "hover"].some((m) => includes(mode, m)) && !isTag($el, "input"),
|
|
6694
6704
|
handler(e) {
|
|
6695
6705
|
if (e.keyCode === keyMap.SPACE || e.keyCode === keyMap.ENTER) {
|
|
6696
6706
|
e.preventDefault();
|
|
@@ -6702,15 +6712,17 @@
|
|
|
6702
6712
|
name: "click",
|
|
6703
6713
|
filter: ({ mode }) => ["click", "hover"].some((m) => includes(mode, m)),
|
|
6704
6714
|
handler(e) {
|
|
6715
|
+
const touch = this._touch;
|
|
6716
|
+
this._touch = false;
|
|
6705
6717
|
if (e.defaultPrevented) {
|
|
6706
6718
|
return;
|
|
6707
6719
|
}
|
|
6708
6720
|
const link = e.target.closest("a[href]");
|
|
6709
6721
|
const isButtonLike = isSameSiteAnchor(link) && (!link.hash || matches(this.target, link.hash));
|
|
6710
|
-
if (
|
|
6722
|
+
if (isButtonLike || link && !this.isToggled(this.target)) {
|
|
6711
6723
|
e.preventDefault();
|
|
6712
6724
|
}
|
|
6713
|
-
if (
|
|
6725
|
+
if ((includes(this.mode, "click") || e.detail === 0 || isTouch(e) || touch) && (!link || isButtonLike || e.defaultPrevented)) {
|
|
6714
6726
|
this.toggle();
|
|
6715
6727
|
}
|
|
6716
6728
|
}
|