@graupl/graupl 1.0.0-beta.45 → 1.0.0-beta.47
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/dist/css/component/carousel.css +1 -1
- package/dist/css/component/carousel.css.map +1 -1
- package/dist/css/component.css +1 -1
- package/dist/css/component.css.map +1 -1
- package/dist/css/graupl.css +1 -1
- package/dist/css/graupl.css.map +1 -1
- package/dist/js/breadcrumb.js +30 -30
- package/dist/js/breadcrumb.js.map +1 -1
- package/dist/js/carousel.js +266 -145
- package/dist/js/carousel.js.map +1 -1
- package/dist/js/component/breadcrumb.cjs.js +22 -22
- package/dist/js/component/breadcrumb.cjs.js.map +1 -1
- package/dist/js/component/breadcrumb.es.js +22 -22
- package/dist/js/component/breadcrumb.es.js.map +1 -1
- package/dist/js/component/breadcrumb.iife.js +24 -24
- package/dist/js/component/breadcrumb.iife.js.map +1 -1
- package/dist/js/component/carousel.cjs.js +246 -125
- package/dist/js/component/carousel.cjs.js.map +1 -1
- package/dist/js/component/carousel.es.js +246 -125
- package/dist/js/component/carousel.es.js.map +1 -1
- package/dist/js/component/carousel.iife.js +243 -122
- package/dist/js/component/carousel.iife.js.map +1 -1
- package/dist/js/component/disclosure.cjs.js +1 -1
- package/dist/js/component/disclosure.cjs.js.map +1 -1
- package/dist/js/component/disclosure.es.js +1 -1
- package/dist/js/component/disclosure.es.js.map +1 -1
- package/dist/js/component/disclosure.iife.js +1 -1
- package/dist/js/component/disclosure.iife.js.map +1 -1
- package/dist/js/disclosure.js +12 -12
- package/dist/js/disclosure.js.map +1 -1
- package/dist/js/generator/breadcrumb.cjs.js +24 -24
- package/dist/js/generator/breadcrumb.cjs.js.map +1 -1
- package/dist/js/generator/breadcrumb.es.js +40 -40
- package/dist/js/generator/breadcrumb.es.js.map +1 -1
- package/dist/js/generator/breadcrumb.iife.js +46 -46
- package/dist/js/generator/breadcrumb.iife.js.map +1 -1
- package/dist/js/generator/carousel.cjs.js +262 -141
- package/dist/js/generator/carousel.cjs.js.map +1 -1
- package/dist/js/generator/carousel.es.js +262 -141
- package/dist/js/generator/carousel.es.js.map +1 -1
- package/dist/js/generator/carousel.iife.js +263 -142
- package/dist/js/generator/carousel.iife.js.map +1 -1
- package/dist/js/generator/disclosure.cjs.js +13 -13
- package/dist/js/generator/disclosure.cjs.js.map +1 -1
- package/dist/js/generator/disclosure.es.js +13 -13
- package/dist/js/generator/disclosure.es.js.map +1 -1
- package/dist/js/generator/disclosure.iife.js +12 -12
- package/dist/js/generator/disclosure.iife.js.map +1 -1
- package/dist/js/graupl.js +565 -444
- package/dist/js/graupl.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function c(t, e, { shouldThrow: s = !0 } = {}) {
|
|
2
2
|
const i = {
|
|
3
3
|
status: !0,
|
|
4
4
|
errors: []
|
|
@@ -61,7 +61,7 @@ function I(t, { shouldThrow: e = !0 } = {}) {
|
|
|
61
61
|
if (e && !s.status) throw s.errors[0];
|
|
62
62
|
return s;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function u(t, { shouldThrow: e = !0 } = {}) {
|
|
65
65
|
const s = {
|
|
66
66
|
status: !0,
|
|
67
67
|
errors: []
|
|
@@ -140,7 +140,7 @@ function tt(t, e, { shouldThrow: s = !0 } = {}) {
|
|
|
140
140
|
errors: []
|
|
141
141
|
};
|
|
142
142
|
try {
|
|
143
|
-
if (n("string", { tagName: t }, { shouldThrow: !0 }).status &&
|
|
143
|
+
if (n("string", { tagName: t }, { shouldThrow: !0 }).status && c(HTMLElement, e, { shouldThrow: !0 }).status) {
|
|
144
144
|
const r = t.toLowerCase();
|
|
145
145
|
for (const o in e) try {
|
|
146
146
|
if (e[o].tagName.toLowerCase() !== r) throw new TypeError(`${o} must be a <${r}> element. <${e[o].tagName.toLowerCase()}> given.`);
|
|
@@ -248,7 +248,7 @@ var $ = class {
|
|
|
248
248
|
}
|
|
249
249
|
initialize() {
|
|
250
250
|
try {
|
|
251
|
-
!this._crush && typeof window[this.scope] < "u" && (
|
|
251
|
+
!this._crush && typeof window[this.scope] < "u" && (c(L, { storage: window[this.scope] }, { shouldThrow: !1 }).status || typeof window[this.scope].storage < "u" && typeof window[this.scope].scope < "u" && typeof window[this.scope].type < "u") && (this._storage = window[this.scope].storage);
|
|
252
252
|
} catch {} finally {
|
|
253
253
|
window[this.scope] = this;
|
|
254
254
|
}
|
|
@@ -388,7 +388,7 @@ var $ = class {
|
|
|
388
388
|
return this._classes.initialize;
|
|
389
389
|
}
|
|
390
390
|
set initializeClass(t) {
|
|
391
|
-
|
|
391
|
+
u({ initializeClass: t }), this._classes.initialize !== t && (this._classes.initialize = t);
|
|
392
392
|
}
|
|
393
393
|
get focusState() {
|
|
394
394
|
return this._focusState;
|
|
@@ -447,7 +447,7 @@ var $ = class {
|
|
|
447
447
|
for (const o of Object.keys(this._dom)) Array.isArray(this._dom[o]) ? this._dom[o].forEach((a, g) => {
|
|
448
448
|
i[`${o}Element[${g}]`] = a;
|
|
449
449
|
}) : this._dom[o] !== null && (i[`${o}Element`] = this._dom[o]);
|
|
450
|
-
const r =
|
|
450
|
+
const r = c(HTMLElement, i, { shouldThrow: !1 });
|
|
451
451
|
r.status || (this._errors = [...this._errors, ...r.errors], this._valid = !1);
|
|
452
452
|
}
|
|
453
453
|
if (Object.keys(this._selectors).length > 0) {
|
|
@@ -459,7 +459,7 @@ var $ = class {
|
|
|
459
459
|
if (Object.keys(this._classes).length > 0) {
|
|
460
460
|
const i = {};
|
|
461
461
|
for (const o of Object.keys(this._classes)) this._classes[o] !== "" && (i[`${o}Class`] = this._classes[o]);
|
|
462
|
-
const r =
|
|
462
|
+
const r = u(i, { shouldThrow: !1 });
|
|
463
463
|
r.status || (this._errors = [...this._errors, ...r.errors], this._valid = !1);
|
|
464
464
|
}
|
|
465
465
|
if (Object.keys(this._durations).length > 0) {
|
|
@@ -496,7 +496,7 @@ var $ = class {
|
|
|
496
496
|
_setDOMElementType(t, { context: e, overwrite: s = !0, strict: i = !1 } = {}) {
|
|
497
497
|
if (typeof this.selectors[t] != "string") throw new Error(`Graupl ${this.name}: "${t}" is not a valid element type.`);
|
|
498
498
|
if (this._rootDOMElement === t || this._protectedDOMElements.includes(t)) throw new Error(`Graupl ${this.name}: "${t}" element cannot be set through _setDOMElementType because it is a protected element.`);
|
|
499
|
-
|
|
499
|
+
c(HTMLElement, { context: e });
|
|
500
500
|
const r = Array.from(e.querySelectorAll(this.selectors[t])).filter((o) => i ? o.parentElement === e : !0);
|
|
501
501
|
Array.isArray(this._dom[t]) ? s ? this._dom[t] = r : this._dom[t] = [...this._dom[t], ...r] : this._dom[t] = r[0] || null;
|
|
502
502
|
}
|
|
@@ -516,14 +516,14 @@ var $ = class {
|
|
|
516
516
|
_handleKeydown() {}
|
|
517
517
|
_handleKeyup() {}
|
|
518
518
|
_store() {
|
|
519
|
-
this._shouldStore && (
|
|
519
|
+
this._shouldStore && (c(y, { storage: window.GrauplStorage }, { shouldThrow: !1 }).status || new y({ scope: "GrauplStorage" }), window.GrauplStorage.set({
|
|
520
520
|
key: this.id !== "" ? this.id : this.key,
|
|
521
521
|
type: this._storageKey,
|
|
522
522
|
data: this
|
|
523
523
|
}));
|
|
524
524
|
}
|
|
525
525
|
_unstore() {
|
|
526
|
-
this._shouldStore &&
|
|
526
|
+
this._shouldStore && c(y, { storage: window.GrauplStorage }, { shouldThrow: !1 }).status && window.GrauplStorage.clear({
|
|
527
527
|
key: this.id !== "" ? this.id : this.key,
|
|
528
528
|
type: this._storageKey
|
|
529
529
|
});
|
|
@@ -558,7 +558,7 @@ var $ = class {
|
|
|
558
558
|
});
|
|
559
559
|
}
|
|
560
560
|
_dispatchEvent(t, e) {
|
|
561
|
-
et(t, this),
|
|
561
|
+
et(t, this), c(HTMLElement, { element: e }), e.dispatchEvent(this.events[t]);
|
|
562
562
|
}
|
|
563
563
|
_addEventListener(t, e, s, i = {}) {
|
|
564
564
|
e.addEventListener(t, s, i), this._listeners.push({
|
|
@@ -635,17 +635,17 @@ var $ = class {
|
|
|
635
635
|
_mediaQueryListEventCallback = (t) => {
|
|
636
636
|
t.matches ? (this.unlockInsideBreakpoint && this.unlock(), this.isOpen && this.closeInsideBreakpoint ? (this.isLocked && this.unlock(), this.close({ preserveState: !0 })) : !this.isOpen && this.openInsideBreakpoint && (this.isLocked && this.unlock(), this.open()), this.lockInsideBreakpoint && this.lock()) : (this.unlockOutsideBreakpoint && this.unlock(), this.isOpen && this.closeOutsideBreakpoint ? (this.isLocked && this.unlock(), this.close({ preserveState: !0 })) : !this.isOpen && this.openOutsideBreakpoint && (this.isLocked && this.unlock(), this.open()), this.lockOutsideBreakpoint && this.lock());
|
|
637
637
|
};
|
|
638
|
-
constructor({ breadcrumbElement: t, breadcrumbItemsSelector: e = ".breadcrumb-item", breadcrumbLinksSelector: s = ".breadcrumb-link", breadcrumbToggleSelector: i = ".breadcrumb-toggle", lockedClass: r = "locked", unlockedClass: o = "unlocked", openClass: a = "show", closeClass: g = "hide", transitionClass: A = "transition", transitionDuration: z = 250, openDuration: j = -1, closeDuration: F = -1, openOnFocus: x = !1, closeOnBlur: Q = !1, minWidth: C = "", breakpoint: m = "856px", autoOpen: k = !1, openInsideBreakpoint: q = !1, openOutsideBreakpoint:
|
|
638
|
+
constructor({ breadcrumbElement: t, breadcrumbItemsSelector: e = ".breadcrumb-item", breadcrumbLinksSelector: s = ".breadcrumb-link", breadcrumbToggleSelector: i = ".breadcrumb-toggle", lockedClass: r = "locked", unlockedClass: o = "unlocked", openClass: a = "show", closeClass: g = "hide", transitionClass: A = "transition", transitionDuration: z = 250, openDuration: j = -1, closeDuration: F = -1, openOnFocus: x = !1, closeOnBlur: Q = !1, minWidth: C = "", breakpoint: m = "856px", autoOpen: k = !1, openInsideBreakpoint: q = !1, openOutsideBreakpoint: T = !0, closeInsideBreakpoint: v = !0, closeOutsideBreakpoint: V = !1, lockInsideBreakpoint: P = !1, lockOutsideBreakpoint: K = !0, unlockInsideBreakpoint: G = !0, unlockOutsideBreakpoint: H = !1, locked: N = !1, mediaQuery: R = "", prefix: U = "graupl-", key: J = null, initializeClass: Z = "initializing", initialize: W = !1 }) {
|
|
639
639
|
super({
|
|
640
640
|
prefix: U,
|
|
641
641
|
key: J,
|
|
642
642
|
initializeClass: Z
|
|
643
|
-
}), this._dom.breadcrumb = t, this._dom.breadcrumbItems = [], this._dom.breadcrumbLinks = [], this._dom.breadcrumbToggle = null, this._selectors.breadcrumbItems = e, this._selectors.breadcrumbLinks = s, this._selectors.breadcrumbToggle = i, this._elements.breadcrumbItems = [], this._classes.locked = r || "", this._classes.unlocked = o || "", this._classes.open = a || "", this._classes.close = g || "", this._classes.transition = A || "", this._durations.transition = z, this._durations.open = j, this._durations.close = F, this._openOnFocus = x, this._closeOnBlur = Q, C !== "" && (console.warn("`minWidth` is deprecated and will be removed in a future release. Please set `breakpoint` instead."), m === "" && (m = C)), k && m !== "" && (console.warn("`autoOpen` is deprecated and will be removed in a future release. Please set `openOutsideBreakpoint` and `closeInsideBreakpoint` to `true` instead."),
|
|
643
|
+
}), this._dom.breadcrumb = t, this._dom.breadcrumbItems = [], this._dom.breadcrumbLinks = [], this._dom.breadcrumbToggle = null, this._selectors.breadcrumbItems = e, this._selectors.breadcrumbLinks = s, this._selectors.breadcrumbToggle = i, this._elements.breadcrumbItems = [], this._classes.locked = r || "", this._classes.unlocked = o || "", this._classes.open = a || "", this._classes.close = g || "", this._classes.transition = A || "", this._durations.transition = z, this._durations.open = j, this._durations.close = F, this._openOnFocus = x, this._closeOnBlur = Q, C !== "" && (console.warn("`minWidth` is deprecated and will be removed in a future release. Please set `breakpoint` instead."), m === "" && (m = C)), k && m !== "" && (console.warn("`autoOpen` is deprecated and will be removed in a future release. Please set `openOutsideBreakpoint` and `closeInsideBreakpoint` to `true` instead."), T = k, v = k), this._breakpoint = m || "", this._openInsideBreakpoint = q, this._openOutsideBreakpoint = T, this._closeInsideBreakpoint = v, this._closeOutsideBreakpoint = V, this._lockInsideBreakpoint = P, this._lockOutsideBreakpoint = K, this._unlockInsideBreakpoint = G, this._unlockOutsideBreakpoint = H, this._mediaQueryString = R || "", this._locked.value = N, this._locked.commit(), this._registerEvent("expand", { detail: { breadcrumb: this } }), this._registerEvent("collapse", { detail: { breadcrumb: this } }), this._registerEvent("lock", { detail: { breadcrumb: this } }), this._registerEvent("unlock", { detail: { breadcrumb: this } }), this._addEventListener("grauplComponentInitialize", this.rootDOMElement, () => {
|
|
644
644
|
requestAnimationFrame(() => {
|
|
645
645
|
this.dom.breadcrumbToggle && (this.dom.breadcrumbToggle.getAttribute("aria-expanded") === "true" || this.openOutsideBreakpoint && !window.matchMedia(this.mediaQuery).matches || this.openInsideBreakpoint && window.matchMedia(this.mediaQuery).matches ? this.open({ force: !0 }) : this.close({ force: !0 })), this.isLocked || this.lockInsideBreakpoint && window.matchMedia(this.mediaQuery).matches || this.lockOutsideBreakpoint && !window.matchMedia(this.mediaQuery).matches ? this.lock({ force: !0 }) : this.unlock({ force: !0 });
|
|
646
646
|
});
|
|
647
647
|
}), this._addEventListener("grauplComponentValidate", this.rootDOMElement, () => {
|
|
648
|
-
const
|
|
648
|
+
const B = n("boolean", {
|
|
649
649
|
openOnFocus: this._openOnFocus,
|
|
650
650
|
closeOnBlur: this._closeOnBlur,
|
|
651
651
|
openInsideBreakpoint: this._openInsideBreakpoint,
|
|
@@ -658,38 +658,38 @@ var $ = class {
|
|
|
658
658
|
unlockOutsideBreakpoint: this._unlockOutsideBreakpoint,
|
|
659
659
|
locked: this._locked.value
|
|
660
660
|
}, { shouldThrow: !1 });
|
|
661
|
-
|
|
661
|
+
B.status || (this._errors = [...this._errors, ...B.errors], this._valid = !1);
|
|
662
662
|
}), W && this.initialize();
|
|
663
663
|
}
|
|
664
664
|
get lockedClass() {
|
|
665
665
|
return this._classes.locked;
|
|
666
666
|
}
|
|
667
667
|
set lockedClass(t) {
|
|
668
|
-
|
|
668
|
+
u({ lockedClass: t }), this._classes.locked !== t && (this._classes.locked = t);
|
|
669
669
|
}
|
|
670
670
|
get unlockedClass() {
|
|
671
671
|
return this._classes.unlocked;
|
|
672
672
|
}
|
|
673
673
|
set unlockedClass(t) {
|
|
674
|
-
|
|
674
|
+
u({ unlockedClass: t }), this._classes.unlocked !== t && (this._classes.unlocked = t);
|
|
675
675
|
}
|
|
676
676
|
get openClass() {
|
|
677
677
|
return this._classes.open;
|
|
678
678
|
}
|
|
679
679
|
set openClass(t) {
|
|
680
|
-
|
|
680
|
+
u({ openClass: t }), this._classes.open !== t && (this._classes.open = t);
|
|
681
681
|
}
|
|
682
682
|
get closeClass() {
|
|
683
683
|
return this._classes.close;
|
|
684
684
|
}
|
|
685
685
|
set closeClass(t) {
|
|
686
|
-
|
|
686
|
+
u({ closeClass: t }), this._classes.close !== t && (this._classes.close = t);
|
|
687
687
|
}
|
|
688
688
|
get transitionClass() {
|
|
689
689
|
return this._classes.transition;
|
|
690
690
|
}
|
|
691
691
|
set transitionClass(t) {
|
|
692
|
-
|
|
692
|
+
u({ transitionClass: t }), this._classes.transition !== t && (this._classes.transition = t);
|
|
693
693
|
}
|
|
694
694
|
get transitionDuration() {
|
|
695
695
|
return this._durations.transition;
|
|
@@ -802,7 +802,7 @@ var $ = class {
|
|
|
802
802
|
});
|
|
803
803
|
}
|
|
804
804
|
_reveal({ emit: t = this.isInitialized, transition: e = this.isInitialized } = {}) {
|
|
805
|
-
this.dom.breadcrumbToggle.setAttribute("aria-expanded", "true"), e && this.transitionlass !== "" ? (h(this.transitionClass, this.dom.breadcrumb), requestAnimationFrame(() => {
|
|
805
|
+
this.dom.breadcrumbToggle && this.dom.breadcrumbToggle.setAttribute("aria-expanded", "true"), e && this.transitionlass !== "" ? (h(this.transitionClass, this.dom.breadcrumb), requestAnimationFrame(() => {
|
|
806
806
|
l(this.closeClass, this.dom.breadcrumb), requestAnimationFrame(() => {
|
|
807
807
|
h(this.openClass, this.dom.breadcrumb), requestAnimationFrame(() => {
|
|
808
808
|
setTimeout(() => {
|
|
@@ -810,10 +810,10 @@ var $ = class {
|
|
|
810
810
|
}, this.openDuration);
|
|
811
811
|
});
|
|
812
812
|
});
|
|
813
|
-
})) : (h(this.openClass, this.dom.breadcrumb), l(this.closeClass, this.dom.breadcrumb)), t && this._dispatchEvent("expand", this.dom.breadcrumbToggle);
|
|
813
|
+
})) : (h(this.openClass, this.dom.breadcrumb), l(this.closeClass, this.dom.breadcrumb)), t && (this.dom.breadcrumbToggle ? this._dispatchEvent("expand", this.dom.breadcrumbToggle) : this._dispatchEvent("expand", this.dom.breadcrumb));
|
|
814
814
|
}
|
|
815
815
|
_conceal({ emit: t = this.isInitialized, transition: e = this.isInitialized } = {}) {
|
|
816
|
-
this.dom.breadcrumbToggle.setAttribute("aria-expanded", "false"), e && this.transitionClass !== "" ? (h(this.transitionClass, this.dom.breadcrumb), requestAnimationFrame(() => {
|
|
816
|
+
this.dom.breadcrumbToggle && this.dom.breadcrumbToggle.setAttribute("aria-expanded", "false"), e && this.transitionClass !== "" ? (h(this.transitionClass, this.dom.breadcrumb), requestAnimationFrame(() => {
|
|
817
817
|
l(this.openClass, this.dom.breadcrumb), requestAnimationFrame(() => {
|
|
818
818
|
h(this.closeClass, this.dom.breadcrumb), requestAnimationFrame(() => {
|
|
819
819
|
setTimeout(() => {
|
|
@@ -821,13 +821,13 @@ var $ = class {
|
|
|
821
821
|
}, this.closeDuration);
|
|
822
822
|
});
|
|
823
823
|
});
|
|
824
|
-
})) : (h(this.closeClass, this.dom.breadcrumb), l(this.openClass, this.dom.breadcrumb)), t && this._dispatchEvent("collapse", this.dom.breadcrumbToggle);
|
|
824
|
+
})) : (h(this.closeClass, this.dom.breadcrumb), l(this.openClass, this.dom.breadcrumb)), t && (this.dom.breadcrumbToggle ? this._dispatchEvent("collapse", this.dom.breadcrumbToggle) : this._dispatchEvent("collapse", this.dom.breadcrumb));
|
|
825
825
|
}
|
|
826
826
|
_lock({ emit: t = this.isInitialized } = {}) {
|
|
827
|
-
h(this.lockedClass, this.dom.breadcrumb), l(this.unlockedClass, this.dom.breadcrumb), this.dom.breadcrumbToggle.setAttribute("disabled", "true"), t && this._dispatchEvent("lock", this.dom.breadcrumbToggle);
|
|
827
|
+
h(this.lockedClass, this.dom.breadcrumb), l(this.unlockedClass, this.dom.breadcrumb), this.dom.breadcrumbToggle && this.dom.breadcrumbToggle.setAttribute("disabled", "true"), t && (this.dom.breadcrumbToggle ? this._dispatchEvent("lock", this.dom.breadcrumbToggle) : this._dispatchEvent("lock", this.dom.breadcrumb));
|
|
828
828
|
}
|
|
829
829
|
_unlock({ emit: t = this.isInitialized } = {}) {
|
|
830
|
-
h(this.unlockedClass, this.dom.breadcrumb), l(this.lockedClass, this.dom.breadcrumb), this.dom.breadcrumbToggle.removeAttribute("disabled"), t && this._dispatchEvent("unlock", this.dom.breadcrumbToggle);
|
|
830
|
+
h(this.unlockedClass, this.dom.breadcrumb), l(this.lockedClass, this.dom.breadcrumb), this.dom.breadcrumbToggle && this.dom.breadcrumbToggle.removeAttribute("disabled"), t && (this.dom.breadcrumbToggle ? this._dispatchEvent("unlock", this.dom.breadcrumbToggle) : this._dispatchEvent("unlock", this.dom.breadcrumb));
|
|
831
831
|
}
|
|
832
832
|
_handleFocus() {
|
|
833
833
|
this.elements.breadcrumbItems.forEach((t, e) => {
|
|
@@ -839,26 +839,30 @@ var $ = class {
|
|
|
839
839
|
});
|
|
840
840
|
}
|
|
841
841
|
_handleClick() {
|
|
842
|
-
this.
|
|
843
|
-
this.currentEvent = "mouse", t.button === 0 && (d(t), this.toggle());
|
|
844
|
-
}), this._addEventListener("click", document, (t) => {
|
|
842
|
+
this._addEventListener("click", document, (t) => {
|
|
845
843
|
this.focusState !== "self" || !this.closeOnBlur || (this.currentEvent = "mouse", !this.dom.breadcrumb.contains(t.target) && this.dom.breadcrumbToggle !== t.target && this.close());
|
|
846
|
-
}))
|
|
844
|
+
}), this.dom.breadcrumbToggle && this._addEventListener("click", this.dom.breadcrumbToggle, (t) => {
|
|
845
|
+
this.currentEvent = "mouse", t.button === 0 && (d(t), this.toggle());
|
|
846
|
+
});
|
|
847
847
|
}
|
|
848
848
|
_handleKeydown() {
|
|
849
|
-
this.
|
|
849
|
+
this._addEventListener("keydown", this.dom.breadcrumb, (t) => {
|
|
850
|
+
this.currentEvent = "keyboard", f(t) === "Escape" && d(t);
|
|
851
|
+
}), this.dom.breadcrumbToggle && this._addEventListener("keydown", this.dom.breadcrumbToggle, (t) => {
|
|
850
852
|
switch (this.currentEvent = "keyboard", f(t)) {
|
|
851
853
|
case "Space":
|
|
852
854
|
case "Enter":
|
|
853
855
|
d(t);
|
|
854
856
|
break;
|
|
855
857
|
}
|
|
856
|
-
})
|
|
857
|
-
this.currentEvent = "keyboard", f(t) === "Escape" && d(t);
|
|
858
|
-
}));
|
|
858
|
+
});
|
|
859
859
|
}
|
|
860
860
|
_handleKeyup() {
|
|
861
|
-
this.
|
|
861
|
+
this._addEventListener("keyup", this.dom.breadcrumb, (t) => {
|
|
862
|
+
this.currentEvent = "keyboard", f(t) === "Escape" && (d(t), this.close(), this.currentChild > this.elements.breadcrumbItems.indexOf(this.elements.breadcrumbToggle) && requestAnimationFrame(() => {
|
|
863
|
+
this.focusToggle();
|
|
864
|
+
}));
|
|
865
|
+
}), this.dom.breadcrumbToggle && this._addEventListener("keyup", this.dom.breadcrumbToggle, (t) => {
|
|
862
866
|
switch (this.currentEvent = "keyboard", f(t)) {
|
|
863
867
|
case "Space":
|
|
864
868
|
case "Enter":
|
|
@@ -872,11 +876,7 @@ var $ = class {
|
|
|
872
876
|
}));
|
|
873
877
|
break;
|
|
874
878
|
}
|
|
875
|
-
})
|
|
876
|
-
this.currentEvent = "keyboard", f(t) === "Escape" && (d(t), this.close(), this.currentChild > this.elements.breadcrumbItems.indexOf(this.elements.breadcrumbToggle) && requestAnimationFrame(() => {
|
|
877
|
-
this.focusToggle();
|
|
878
|
-
}));
|
|
879
|
-
}));
|
|
879
|
+
});
|
|
880
880
|
}
|
|
881
881
|
open({ force: t = !1, emit: e = this.isInitialized, transition: s = this.isInitialized, preserveState: i = !1 } = {}) {
|
|
882
882
|
this.isOpen && !t || this.isLocked && !t || (this.focusState = "self", this._reveal({
|