@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
package/dist/js/disclosure.js
CHANGED
|
@@ -445,8 +445,8 @@
|
|
|
445
445
|
const t = Q(this, { shouldThrow: !1 });
|
|
446
446
|
if (t.status || (this._errors = [...this._errors, ...t.errors], this._valid = !1), Object.keys(this._dom).length > 0) {
|
|
447
447
|
const i = {};
|
|
448
|
-
for (const o of Object.keys(this._dom)) Array.isArray(this._dom[o]) ? this._dom[o].forEach((a,
|
|
449
|
-
i[`${o}Element[${
|
|
448
|
+
for (const o of Object.keys(this._dom)) Array.isArray(this._dom[o]) ? this._dom[o].forEach((a, _) => {
|
|
449
|
+
i[`${o}Element[${_}]`] = a;
|
|
450
450
|
}) : this._dom[o] !== null && (i[`${o}Element`] = this._dom[o]);
|
|
451
451
|
const r = c(HTMLElement, i, { shouldThrow: !1 });
|
|
452
452
|
r.status || (this._errors = [...this._errors, ...r.errors], this._valid = !1);
|
|
@@ -610,14 +610,14 @@
|
|
|
610
610
|
_mediaQueryListEventCallback = (t) => {
|
|
611
611
|
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());
|
|
612
612
|
};
|
|
613
|
-
constructor({ disclosureElement: t, controllerElement: e, disclosureContentSelector: s = ".disclosure-content", lockedClass: i = "locked", unlockedClass: r = "unlocked", openClass: o = "show", closeClass: a = "hide", transitionClass:
|
|
613
|
+
constructor({ disclosureElement: t, controllerElement: e, disclosureContentSelector: s = ".disclosure-content", lockedClass: i = "locked", unlockedClass: r = "unlocked", openClass: o = "show", closeClass: a = "hide", transitionClass: _ = "transitioning", transitionDuration: K = 250, openDuration: G = -1, closeDuration: H = -1, openOnFocus: R = !1, closeOnBlur: N = !1, minWidth: I = "", breakpoint: g = "", autoOpen: b = !1, openInsideBreakpoint: U = !1, openOutsideBreakpoint: D = !1, closeInsideBreakpoint: M = !1, closeOutsideBreakpoint: J = !1, lockInsideBreakpoint: Z = !1, lockOutsideBreakpoint: W = !1, unlockInsideBreakpoint: X = !1, unlockOutsideBreakpoint: Y = !1, locked: tt = !1, mediaQuery: et = "", prefix: st = "graupl-", key: it = null, initializeClass: rt = "initializing", initialize: ot = !1 } = {}) {
|
|
614
614
|
super({
|
|
615
615
|
prefix: st,
|
|
616
616
|
key: it,
|
|
617
617
|
initializeClass: rt
|
|
618
|
-
}), this._dom.disclosure = t, this._dom.controller = e, this._selectors.content = s, this._classes.locked = i || "", this._classes.unlocked = r || "", this._classes.open = o || "", this._classes.close = a || "", this._classes.transition =
|
|
618
|
+
}), this._dom.disclosure = t, this._dom.controller = e, this._selectors.content = s, this._classes.locked = i || "", this._classes.unlocked = r || "", this._classes.open = o || "", this._classes.close = a || "", this._classes.transition = _ || "", this._durations.transition = K, this._durations.open = G, this._durations.close = H, this._openOnFocus = R, this._closeOnBlur = N, I !== "" && (console.warn("`minWidth` is deprecated and will be removed in a future release. Please set `breakpoint` instead."), g === "" && (g = I)), b && g !== "" && (console.warn("`autoOpen` is deprecated and will be removed in a future release. Please set `openOutsideBreakpoint` and `closeInsideBreakpoint` to `true` instead."), D = b, M = b), this._breakpoint = g || "", this._openInsideBreakpoint = U, this._openOutsideBreakpoint = D, this._closeInsideBreakpoint = M, this._closeOutsideBreakpoint = J, this._lockInsideBreakpoint = Z, this._lockOutsideBreakpoint = W, this._unlockInsideBreakpoint = X, this._unlockOutsideBreakpoint = Y, this._mediaQueryString = et || "", this._locked.value = tt, this._locked.commit(), this._registerEvent("expand", { detail: { disclosure: this } }), this._registerEvent("collapse", { detail: { disclosure: this } }), this._registerEvent("lock", { detail: { disclosure: this } }), this._registerEvent("unlock", { detail: { disclosure: this } }), this._addEventListener("grauplComponentInitialize", this.rootDOMElement, () => {
|
|
619
619
|
requestAnimationFrame(() => {
|
|
620
|
-
this.dom.controller.getAttribute("aria-expanded") === "true" || this.openOutsideBreakpoint && !window.matchMedia(this.mediaQuery).matches || this.openInsideBreakpoint && window.matchMedia(this.mediaQuery).matches ? this.open() : this.close(),
|
|
620
|
+
this.dom.controller.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 });
|
|
621
621
|
});
|
|
622
622
|
}), this._addEventListener("grauplComponentValidate", this.rootDOMElement, () => {
|
|
623
623
|
const S = n("boolean", {
|
|
@@ -909,20 +909,20 @@
|
|
|
909
909
|
const r = i.join(" ");
|
|
910
910
|
E(t, r === "" ? "remove" : "set", r);
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function f(t, e, s) {
|
|
913
913
|
return O(`:not(${m(t)})`, k(e, s), (i) => $(i, { add: t }));
|
|
914
914
|
}
|
|
915
|
-
|
|
915
|
+
f.remove = (t, e, s) => O(m(t), k(e, s), (i) => $(i, { remove: t })), f.filter = (t, e, s) => O(m(t), k(e, s)), f.find = (t, e) => k(t ? m(t) : `[${w}]`, e);
|
|
916
916
|
const x = ({ options: t = {}, context: e = document, disclosureSelector: s = ".disclosure", controllerSelector: i = ".disclosure-toggle" } = {}) => {
|
|
917
|
-
|
|
918
|
-
const o = r.dataset.grauplDisclosureOptions ? JSON.parse(r.dataset.grauplDisclosureOptions.replace(/'/g, "\"")) || {} : {}, a = `${i}[data-graupl-disclosure-target="${r.id}"]`, [
|
|
919
|
-
if (!
|
|
920
|
-
console.warn(`No controller found for disclosure with ID "${r.id}". Please ensure there is an element with the selector "${a}".`),
|
|
917
|
+
f("graupl-disclosure-generator", s, e).forEach((r) => {
|
|
918
|
+
const o = r.dataset.grauplDisclosureOptions ? JSON.parse(r.dataset.grauplDisclosureOptions.replace(/'/g, "\"")) || {} : {}, a = `${i}[data-graupl-disclosure-target="${r.id}"]`, [_] = f("graupl-disclosure-generator", a, e);
|
|
919
|
+
if (!_) {
|
|
920
|
+
console.warn(`No controller found for disclosure with ID "${r.id}". Please ensure there is an element with the selector "${a}".`), f.remove("graupl-disclosure-generator", r);
|
|
921
921
|
return;
|
|
922
922
|
}
|
|
923
923
|
new V({
|
|
924
924
|
disclosureElement: r,
|
|
925
|
-
controllerElement:
|
|
925
|
+
controllerElement: _,
|
|
926
926
|
initialize: !0,
|
|
927
927
|
...t,
|
|
928
928
|
...o
|