@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.
Files changed (51) hide show
  1. package/dist/css/component/carousel.css +1 -1
  2. package/dist/css/component/carousel.css.map +1 -1
  3. package/dist/css/component.css +1 -1
  4. package/dist/css/component.css.map +1 -1
  5. package/dist/css/graupl.css +1 -1
  6. package/dist/css/graupl.css.map +1 -1
  7. package/dist/js/breadcrumb.js +30 -30
  8. package/dist/js/breadcrumb.js.map +1 -1
  9. package/dist/js/carousel.js +266 -145
  10. package/dist/js/carousel.js.map +1 -1
  11. package/dist/js/component/breadcrumb.cjs.js +22 -22
  12. package/dist/js/component/breadcrumb.cjs.js.map +1 -1
  13. package/dist/js/component/breadcrumb.es.js +22 -22
  14. package/dist/js/component/breadcrumb.es.js.map +1 -1
  15. package/dist/js/component/breadcrumb.iife.js +24 -24
  16. package/dist/js/component/breadcrumb.iife.js.map +1 -1
  17. package/dist/js/component/carousel.cjs.js +246 -125
  18. package/dist/js/component/carousel.cjs.js.map +1 -1
  19. package/dist/js/component/carousel.es.js +246 -125
  20. package/dist/js/component/carousel.es.js.map +1 -1
  21. package/dist/js/component/carousel.iife.js +243 -122
  22. package/dist/js/component/carousel.iife.js.map +1 -1
  23. package/dist/js/component/disclosure.cjs.js +1 -1
  24. package/dist/js/component/disclosure.cjs.js.map +1 -1
  25. package/dist/js/component/disclosure.es.js +1 -1
  26. package/dist/js/component/disclosure.es.js.map +1 -1
  27. package/dist/js/component/disclosure.iife.js +1 -1
  28. package/dist/js/component/disclosure.iife.js.map +1 -1
  29. package/dist/js/disclosure.js +12 -12
  30. package/dist/js/disclosure.js.map +1 -1
  31. package/dist/js/generator/breadcrumb.cjs.js +24 -24
  32. package/dist/js/generator/breadcrumb.cjs.js.map +1 -1
  33. package/dist/js/generator/breadcrumb.es.js +40 -40
  34. package/dist/js/generator/breadcrumb.es.js.map +1 -1
  35. package/dist/js/generator/breadcrumb.iife.js +46 -46
  36. package/dist/js/generator/breadcrumb.iife.js.map +1 -1
  37. package/dist/js/generator/carousel.cjs.js +262 -141
  38. package/dist/js/generator/carousel.cjs.js.map +1 -1
  39. package/dist/js/generator/carousel.es.js +262 -141
  40. package/dist/js/generator/carousel.es.js.map +1 -1
  41. package/dist/js/generator/carousel.iife.js +263 -142
  42. package/dist/js/generator/carousel.iife.js.map +1 -1
  43. package/dist/js/generator/disclosure.cjs.js +13 -13
  44. package/dist/js/generator/disclosure.cjs.js.map +1 -1
  45. package/dist/js/generator/disclosure.es.js +13 -13
  46. package/dist/js/generator/disclosure.es.js.map +1 -1
  47. package/dist/js/generator/disclosure.iife.js +12 -12
  48. package/dist/js/generator/disclosure.iife.js.map +1 -1
  49. package/dist/js/graupl.js +565 -444
  50. package/dist/js/graupl.js.map +1 -1
  51. package/package.json +1 -1
@@ -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, f) => {
449
- i[`${o}Element[${f}]`] = a;
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: f = "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 } = {}) {
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 = f || "", 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, () => {
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(), (this.isLocked || this.lockInsideBreakpoint && window.matchMedia(this.mediaQuery).matches || this.lockOutsideBreakpoint && !window.matchMedia(this.mediaQuery).matches) && this.lock();
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 _(t, e, s) {
912
+ function f(t, e, s) {
913
913
  return O(`:not(${m(t)})`, k(e, s), (i) => $(i, { add: t }));
914
914
  }
915
- _.remove = (t, e, s) => O(m(t), k(e, s), (i) => $(i, { remove: t })), _.filter = (t, e, s) => O(m(t), k(e, s)), _.find = (t, e) => k(t ? m(t) : `[${w}]`, e);
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
- _("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 (!f) {
920
- console.warn(`No controller found for disclosure with ID "${r.id}". Please ensure there is an element with the selector "${a}".`), _.remove("graupl-disclosure-generator", r);
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: f,
925
+ controllerElement: _,
926
926
  initialize: !0,
927
927
  ...t,
928
928
  ...o