@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
@@ -168,7 +168,7 @@
168
168
  if (s && !i.status) throw i.errors[0];
169
169
  return i;
170
170
  }
171
- function Q(t, { shouldThrow: e = !0 } = {}) {
171
+ function x(t, { shouldThrow: e = !0 } = {}) {
172
172
  const s = {
173
173
  status: !0,
174
174
  errors: []
@@ -211,7 +211,7 @@
211
211
  function d(t) {
212
212
  t.preventDefault(), t.stopPropagation();
213
213
  }
214
- var B = class {
214
+ var T = class {
215
215
  _equals = Object.is;
216
216
  _current;
217
217
  _committed;
@@ -442,7 +442,7 @@
442
442
  }
443
443
  _validate() {
444
444
  this._dispatchEvent("prevalidate", this.rootDOMElement);
445
- const t = Q(this, { shouldThrow: !1 });
445
+ const t = x(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
448
  for (const o of Object.keys(this._dom)) Array.isArray(this._dom[o]) ? this._dom[o].forEach((a, w) => {
@@ -590,7 +590,7 @@
590
590
  dispose() {
591
591
  this._clearIntervals(), this._clearTimeouts(), this._removeEventListeners(), this._unstore(), delete this;
592
592
  }
593
- }, x = class extends v {
593
+ }, Q = class extends v {
594
594
  _rootDOMElement = "item";
595
595
  _protectedDOMElements = ["link"];
596
596
  _storageKey = "breadcrumbItems";
@@ -619,8 +619,8 @@
619
619
  }, q = class extends v {
620
620
  _rootDOMElement = "breadcrumb";
621
621
  _currentChild = 0;
622
- _open = new B(!1);
623
- _locked = new B(!1);
622
+ _open = new T(!1);
623
+ _locked = new T(!1);
624
624
  _openInsideBreakpoint = !1;
625
625
  _openOutsideBreakpoint = !0;
626
626
  _closeInsideBreakpoint = !0;
@@ -793,7 +793,7 @@
793
793
  }
794
794
  _createChildElements() {
795
795
  this.dom.breadcrumbItems.forEach((t) => {
796
- const e = t.querySelector(this.selectors.breadcrumbLinks), s = t.querySelector(this.selectors.breadcrumbToggle) !== null, i = new x({
796
+ const e = t.querySelector(this.selectors.breadcrumbLinks), s = t.querySelector(this.selectors.breadcrumbToggle) !== null, i = new Q({
797
797
  breadcrumbItemElement: t,
798
798
  breadcrumbLinkElement: e,
799
799
  parentBreadcrumb: this,
@@ -803,7 +803,7 @@
803
803
  });
804
804
  }
805
805
  _reveal({ emit: t = this.isInitialized, transition: e = this.isInitialized } = {}) {
806
- this.dom.breadcrumbToggle.setAttribute("aria-expanded", "true"), e && this.transitionlass !== "" ? (h(this.transitionClass, this.dom.breadcrumb), requestAnimationFrame(() => {
806
+ this.dom.breadcrumbToggle && this.dom.breadcrumbToggle.setAttribute("aria-expanded", "true"), e && this.transitionlass !== "" ? (h(this.transitionClass, this.dom.breadcrumb), requestAnimationFrame(() => {
807
807
  l(this.closeClass, this.dom.breadcrumb), requestAnimationFrame(() => {
808
808
  h(this.openClass, this.dom.breadcrumb), requestAnimationFrame(() => {
809
809
  setTimeout(() => {
@@ -811,10 +811,10 @@
811
811
  }, this.openDuration);
812
812
  });
813
813
  });
814
- })) : (h(this.openClass, this.dom.breadcrumb), l(this.closeClass, this.dom.breadcrumb)), t && this._dispatchEvent("expand", this.dom.breadcrumbToggle);
814
+ })) : (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));
815
815
  }
816
816
  _conceal({ emit: t = this.isInitialized, transition: e = this.isInitialized } = {}) {
817
- this.dom.breadcrumbToggle.setAttribute("aria-expanded", "false"), e && this.transitionClass !== "" ? (h(this.transitionClass, this.dom.breadcrumb), requestAnimationFrame(() => {
817
+ this.dom.breadcrumbToggle && this.dom.breadcrumbToggle.setAttribute("aria-expanded", "false"), e && this.transitionClass !== "" ? (h(this.transitionClass, this.dom.breadcrumb), requestAnimationFrame(() => {
818
818
  l(this.openClass, this.dom.breadcrumb), requestAnimationFrame(() => {
819
819
  h(this.closeClass, this.dom.breadcrumb), requestAnimationFrame(() => {
820
820
  setTimeout(() => {
@@ -822,13 +822,13 @@
822
822
  }, this.closeDuration);
823
823
  });
824
824
  });
825
- })) : (h(this.closeClass, this.dom.breadcrumb), l(this.openClass, this.dom.breadcrumb)), t && this._dispatchEvent("collapse", this.dom.breadcrumbToggle);
825
+ })) : (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));
826
826
  }
827
827
  _lock({ emit: t = this.isInitialized } = {}) {
828
- 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);
828
+ 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));
829
829
  }
830
830
  _unlock({ emit: t = this.isInitialized } = {}) {
831
- h(this.unlockedClass, this.dom.breadcrumb), l(this.lockedClass, this.dom.breadcrumb), this.dom.breadcrumbToggle.removeAttribute("disabled"), t && this._dispatchEvent("unlock", this.dom.breadcrumbToggle);
831
+ 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));
832
832
  }
833
833
  _handleFocus() {
834
834
  this.elements.breadcrumbItems.forEach((t, e) => {
@@ -840,26 +840,30 @@
840
840
  });
841
841
  }
842
842
  _handleClick() {
843
- this.dom.breadcrumbToggle && (this._addEventListener("click", this.dom.breadcrumbToggle, (t) => {
844
- this.currentEvent = "mouse", t.button === 0 && (d(t), this.toggle());
845
- }), this._addEventListener("click", document, (t) => {
843
+ this._addEventListener("click", document, (t) => {
846
844
  this.focusState !== "self" || !this.closeOnBlur || (this.currentEvent = "mouse", !this.dom.breadcrumb.contains(t.target) && this.dom.breadcrumbToggle !== t.target && this.close());
847
- }));
845
+ }), this.dom.breadcrumbToggle && this._addEventListener("click", this.dom.breadcrumbToggle, (t) => {
846
+ this.currentEvent = "mouse", t.button === 0 && (d(t), this.toggle());
847
+ });
848
848
  }
849
849
  _handleKeydown() {
850
- this.dom.breadcrumbToggle && (this._addEventListener("keydown", this.dom.breadcrumbToggle, (t) => {
850
+ this._addEventListener("keydown", this.dom.breadcrumb, (t) => {
851
+ this.currentEvent = "keyboard", m(t) === "Escape" && d(t);
852
+ }), this.dom.breadcrumbToggle && this._addEventListener("keydown", this.dom.breadcrumbToggle, (t) => {
851
853
  switch (this.currentEvent = "keyboard", m(t)) {
852
854
  case "Space":
853
855
  case "Enter":
854
856
  d(t);
855
857
  break;
856
858
  }
857
- }), this._addEventListener("keydown", this.dom.breadcrumb, (t) => {
858
- this.currentEvent = "keyboard", m(t) === "Escape" && d(t);
859
- }));
859
+ });
860
860
  }
861
861
  _handleKeyup() {
862
- this.dom.breadcrumbToggle && (this._addEventListener("keyup", this.dom.breadcrumbToggle, (t) => {
862
+ this._addEventListener("keyup", this.dom.breadcrumb, (t) => {
863
+ this.currentEvent = "keyboard", m(t) === "Escape" && (d(t), this.close(), this.currentChild > this.elements.breadcrumbItems.indexOf(this.elements.breadcrumbToggle) && requestAnimationFrame(() => {
864
+ this.focusToggle();
865
+ }));
866
+ }), this.dom.breadcrumbToggle && this._addEventListener("keyup", this.dom.breadcrumbToggle, (t) => {
863
867
  switch (this.currentEvent = "keyboard", m(t)) {
864
868
  case "Space":
865
869
  case "Enter":
@@ -873,11 +877,7 @@
873
877
  }));
874
878
  break;
875
879
  }
876
- }), this._addEventListener("keyup", this.dom.breadcrumb, (t) => {
877
- this.currentEvent = "keyboard", m(t) === "Escape" && (d(t), this.close(), this.currentChild > this.elements.breadcrumbItems.indexOf(this.elements.breadcrumbToggle) && requestAnimationFrame(() => {
878
- this.focusToggle();
879
- }));
880
- }));
880
+ });
881
881
  }
882
882
  open({ force: t = !1, emit: e = this.isInitialized, transition: s = this.isInitialized, preserveState: i = !1 } = {}) {
883
883
  this.isOpen && !t || this.isLocked && !t || (this.focusState = "self", this._reveal({
@@ -952,13 +952,13 @@
952
952
  this.focusState = "self", this.elements.breadcrumbToggle !== null && (this.currentChild = this.elements.breadcrumbItems.indexOf(this.elements.breadcrumbToggle) || 0, this.elements.breadcrumbToggle.focus());
953
953
  }
954
954
  };
955
- const T = /[\11\12\14\15\40]+/, k = "data-once", V = document;
955
+ const B = /[\11\12\14\15\40]+/, k = "data-once", V = document;
956
956
  function y(t, e, s) {
957
957
  return t[`${e}Attribute`](k, s);
958
958
  }
959
959
  function f(t) {
960
960
  if (typeof t != "string") throw new TypeError("once ID must be a string");
961
- if (t === "" || T.test(t)) throw new RangeError("once ID must not be empty or contain spaces");
961
+ if (t === "" || B.test(t)) throw new RangeError("once ID must not be empty or contain spaces");
962
962
  return `[${k}~="${t}"]`;
963
963
  }
964
964
  function P(t) {
@@ -981,7 +981,7 @@
981
981
  }
982
982
  function I(t, { add: e, remove: s }) {
983
983
  const i = [];
984
- y(t, "has") && y(t, "get").trim().split(T).forEach((o) => {
984
+ y(t, "has") && y(t, "get").trim().split(B).forEach((o) => {
985
985
  i.indexOf(o) < 0 && o !== s && i.push(o);
986
986
  }), e && i.push(e);
987
987
  const r = i.join(" ");