@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
@@ -635,12 +635,12 @@ var O = 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: i = ".breadcrumb-link", breadcrumbToggleSelector: s = ".breadcrumb-toggle", lockedClass: r = "locked", unlockedClass: o = "unlocked", openClass: a = "show", closeClass: f = "hide", transitionClass: v = "transition", transitionDuration: I = 250, openDuration: T = -1, closeDuration: $ = -1, openOnFocus: M = !1, closeOnBlur: D = !1, minWidth: g = "", breakpoint: m = "856px", autoOpen: p = !1, openInsideBreakpoint: S = !1, openOutsideBreakpoint: k = !0, closeInsideBreakpoint: y = !0, closeOutsideBreakpoint: L = !1, lockInsideBreakpoint: z = !1, lockOutsideBreakpoint: A = !0, unlockInsideBreakpoint: j = !0, unlockOutsideBreakpoint: F = !1, locked: x = !1, mediaQuery: Q = "", prefix: q = "graupl-", key: V = null, initializeClass: P = "initializing", initialize: K = !1 }) {
638
+ constructor({ breadcrumbElement: t, breadcrumbItemsSelector: e = ".breadcrumb-item", breadcrumbLinksSelector: i = ".breadcrumb-link", breadcrumbToggleSelector: s = ".breadcrumb-toggle", lockedClass: r = "locked", unlockedClass: o = "unlocked", openClass: a = "show", closeClass: f = "hide", transitionClass: v = "transition", transitionDuration: T = 250, openDuration: I = -1, closeDuration: $ = -1, openOnFocus: M = !1, closeOnBlur: D = !1, minWidth: g = "", breakpoint: m = "856px", autoOpen: p = !1, openInsideBreakpoint: S = !1, openOutsideBreakpoint: k = !0, closeInsideBreakpoint: y = !0, closeOutsideBreakpoint: L = !1, lockInsideBreakpoint: z = !1, lockOutsideBreakpoint: A = !0, unlockInsideBreakpoint: j = !0, unlockOutsideBreakpoint: F = !1, locked: x = !1, mediaQuery: Q = "", prefix: q = "graupl-", key: V = null, initializeClass: P = "initializing", initialize: K = !1 }) {
639
639
  super({
640
640
  prefix: q,
641
641
  key: V,
642
642
  initializeClass: P
643
- }), this._dom.breadcrumb = t, this._dom.breadcrumbItems = [], this._dom.breadcrumbLinks = [], this._dom.breadcrumbToggle = null, this._selectors.breadcrumbItems = e, this._selectors.breadcrumbLinks = i, this._selectors.breadcrumbToggle = s, this._elements.breadcrumbItems = [], this._classes.locked = r || "", this._classes.unlocked = o || "", this._classes.open = a || "", this._classes.close = f || "", this._classes.transition = v || "", this._durations.transition = I, this._durations.open = T, this._durations.close = $, this._openOnFocus = M, this._closeOnBlur = D, g !== "" && (console.warn("`minWidth` is deprecated and will be removed in a future release. Please set `breakpoint` instead."), m === "" && (m = g)), p && m !== "" && (console.warn("`autoOpen` is deprecated and will be removed in a future release. Please set `openOutsideBreakpoint` and `closeInsideBreakpoint` to `true` instead."), k = p, y = p), this._breakpoint = m || "", this._openInsideBreakpoint = S, this._openOutsideBreakpoint = k, this._closeInsideBreakpoint = y, this._closeOutsideBreakpoint = L, this._lockInsideBreakpoint = z, this._lockOutsideBreakpoint = A, this._unlockInsideBreakpoint = j, this._unlockOutsideBreakpoint = F, this._mediaQueryString = Q || "", this._locked.value = x, 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, () => {
643
+ }), this._dom.breadcrumb = t, this._dom.breadcrumbItems = [], this._dom.breadcrumbLinks = [], this._dom.breadcrumbToggle = null, this._selectors.breadcrumbItems = e, this._selectors.breadcrumbLinks = i, this._selectors.breadcrumbToggle = s, this._elements.breadcrumbItems = [], this._classes.locked = r || "", this._classes.unlocked = o || "", this._classes.open = a || "", this._classes.close = f || "", this._classes.transition = v || "", this._durations.transition = T, this._durations.open = I, this._durations.close = $, this._openOnFocus = M, this._closeOnBlur = D, g !== "" && (console.warn("`minWidth` is deprecated and will be removed in a future release. Please set `breakpoint` instead."), m === "" && (m = g)), p && m !== "" && (console.warn("`autoOpen` is deprecated and will be removed in a future release. Please set `openOutsideBreakpoint` and `closeInsideBreakpoint` to `true` instead."), k = p, y = p), this._breakpoint = m || "", this._openInsideBreakpoint = S, this._openOutsideBreakpoint = k, this._closeInsideBreakpoint = y, this._closeOutsideBreakpoint = L, this._lockInsideBreakpoint = z, this._lockOutsideBreakpoint = A, this._unlockInsideBreakpoint = j, this._unlockOutsideBreakpoint = F, this._mediaQueryString = Q || "", this._locked.value = x, 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
  });
@@ -802,7 +802,7 @@ var O = 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 O = 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 O = 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 O = class {
839
839
  });
840
840
  }
841
841
  _handleClick() {
842
- this.dom.breadcrumbToggle && (this._addEventListener("click", this.dom.breadcrumbToggle, (t) => {
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.dom.breadcrumbToggle && (this._addEventListener("keydown", this.dom.breadcrumbToggle, (t) => {
849
+ this._addEventListener("keydown", this.dom.breadcrumb, (t) => {
850
+ this.currentEvent = "keyboard", _(t) === "Escape" && d(t);
851
+ }), this.dom.breadcrumbToggle && this._addEventListener("keydown", this.dom.breadcrumbToggle, (t) => {
850
852
  switch (this.currentEvent = "keyboard", _(t)) {
851
853
  case "Space":
852
854
  case "Enter":
853
855
  d(t);
854
856
  break;
855
857
  }
856
- }), this._addEventListener("keydown", this.dom.breadcrumb, (t) => {
857
- this.currentEvent = "keyboard", _(t) === "Escape" && d(t);
858
- }));
858
+ });
859
859
  }
860
860
  _handleKeyup() {
861
- this.dom.breadcrumbToggle && (this._addEventListener("keyup", this.dom.breadcrumbToggle, (t) => {
861
+ this._addEventListener("keyup", this.dom.breadcrumb, (t) => {
862
+ this.currentEvent = "keyboard", _(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", _(t)) {
863
867
  case "Space":
864
868
  case "Enter":
@@ -872,11 +876,7 @@ var O = class {
872
876
  }));
873
877
  break;
874
878
  }
875
- }), this._addEventListener("keyup", this.dom.breadcrumb, (t) => {
876
- this.currentEvent = "keyboard", _(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: i = this.isInitialized, preserveState: s = !1 } = {}) {
882
882
  this.isOpen && !t || this.isLocked && !t || (this.focusState = "self", this._reveal({