@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,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: B = !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 }) {
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."), B = k, v = k), this._breakpoint = m || "", this._openInsideBreakpoint = q, this._openOutsideBreakpoint = B, 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, () => {
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 T = n("boolean", {
648
+ const B = n("boolean", {
649
649
  openOnFocus: this._openOnFocus,
650
650
  closeOnBlur: this._closeOnBlur,
651
651
  openInsideBreakpoint: this._openInsideBreakpoint,
@@ -658,7 +658,7 @@ var $ = class {
658
658
  unlockOutsideBreakpoint: this._unlockOutsideBreakpoint,
659
659
  locked: this._locked.value
660
660
  }, { shouldThrow: !1 });
661
- T.status || (this._errors = [...this._errors, ...T.errors], this._valid = !1);
661
+ B.status || (this._errors = [...this._errors, ...B.errors], this._valid = !1);
662
662
  }), W && this.initialize();
663
663
  }
664
664
  get lockedClass() {
@@ -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.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", 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
- }), this._addEventListener("keydown", this.dom.breadcrumb, (t) => {
857
- this.currentEvent = "keyboard", f(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", 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
- }), this._addEventListener("keyup", this.dom.breadcrumb, (t) => {
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({