@proximus/lavender-carousel 2.0.0-alpha.55 → 2.0.0-alpha.57

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 (2) hide show
  1. package/dist/index.es.js +35 -38
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -3,7 +3,7 @@ var O = (s) => {
3
3
  };
4
4
  var N = (s, t, e) => t.has(s) || O("Cannot " + e);
5
5
  var d = (s, t, e) => (N(s, t, "read from private field"), e ? e.call(s) : t.get(s)), k = (s, t, e) => t.has(s) ? O("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, e), j = (s, t, e, i) => (N(s, t, "write to private field"), i ? i.call(s, e) : t.set(s, e), e);
6
- import { WithExtraAttributes as I, AttributeBreakpointHandlerDelegate as B, gapValues as G, checkName as ot, log as x, backgroundColorValues as rt, PxElement as at, transferAccessibilityAttributes as nt, iconSizeValuesKC as lt, cssTokenBreakpoints as ct } from "@proximus/lavender-common";
6
+ import { WithExtraAttributes as I, AttributeBreakpointHandlerDelegate as B, gapValues as G, checkName as ot, log as x, backgroundColorValues as at, PxElement as rt, transferAccessibilityAttributes as nt, iconSizeValuesKC as lt, cssTokenBreakpoints as ct } from "@proximus/lavender-common";
7
7
  const dt = ":host{display:block}:host *{box-sizing:border-box}.carousel{overflow:hidden;display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;gap:var(--px-spacing-default-desktop)}@media only screen and (max-width: 768px){.carousel{gap:var(--px-spacing-default-mobile)}}#appleseed-container{margin-inline:var(--px-spacing-s-mobile)}@media only screen and (max-width: 768px){#button-icons{display:none}}.carousel::-webkit-scrollbar{display:none}", pt = "::slotted(*){border-radius:var(--px-radius-main);height:100%}.carousel-item{height:100%}:host{scroll-snap-align:start;align-items:center;justify-content:center;flex:1 0 var( --px-carousel-min-width-desktop, var(--px-carousel-min-width-all-desktop) );border-radius:var(--px-radius-main);background:#fff;overflow:hidden}@media screen and (max-width: 768px){:host{scroll-snap-align:center;flex:1 0 var( --px-carousel-min-width-mobile, var(--px-carousel-min-width-all-mobile) )!important}}@media screen and (min-width: 768px) and (max-width: 1024px){:host{flex:1 0 var( --px-carousel-min-width-tablet, var(--px-carousel-min-width-all-tablet) )!important}}", ht = ':host{display:block}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-mobile) - var(--host-gap--mobile))}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile))}.flex-container{display:flex;height:100%;width:100%;box-sizing:border-box;flex-direction:var(--flex-direction--mobile-value);gap:var(--flex-gap--mobile-value);flex-wrap:var(--flex-wrap--mobile-value);justify-content:var(--flex-justify-content--mobile-value);align-items:var(--flex-align-items--mobile-value);overflow-x:var(--overflow-x-all)}@media only screen and (max-width: 47.9375em){.flex-container{overflow-x:var(--overflow-x-all-mobile, var(--overflow-x-all));scrollbar-width:none}.flex-container::-webkit-scrollbar{display:none}}@media only screen and (min-width: 48em){.flex-container{flex-direction:var(--flex-direction--tablet-value);gap:var(--flex-gap--tablet-value);flex-wrap:var(--flex-wrap--tablet-value);justify-content:var(--flex-justify-content--tablet-value);align-items:var(--flex-align-items--tablet-value)}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-tablet) - var(--host-gap--tablet))}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet))}}@media only screen and (min-width: 48em) and (max-width: 64em){.flex-container{overflow-x:var(--overflow-x-all-tablet, var(--overflow-x-all));scrollbar-width:none}.flex-container::-webkit-scrollbar{display:none}}@media only screen and (min-width: 64.0625em){.flex-container{flex-direction:var(--flex-direction--laptop-value);gap:var(--flex-gap--laptop-value);flex-wrap:var(--flex-wrap--laptop-value);justify-content:var(--flex-justify-content--laptop-value);align-items:var(--flex-align-items--laptop-value)}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-laptop) - var(--host-gap--laptop))}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-laptop) + var(--px-focus-offset-laptop)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-laptop) + var(--px-focus-offset-laptop))}}@media only screen and (min-width: 64.0625em) and (max-width: 90em){.flex-container{overflow-x:var(--overflow-x-all-laptop, var(--overflow-x-all))}}@media only screen and (min-width: 90.0625em){.flex-container{flex-direction:var(--flex-direction--desktop-value);gap:var(--flex-gap--desktop-value);flex-wrap:var(--flex-wrap--desktop-value);justify-content:var(--flex-justify-content--desktop-value);align-items:var(--flex-align-items--desktop-value);overflow-x:var(--overflow-x-all-desktop, var(--overflow-x-all))}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-desktop) - var(--host-gap--desktop))}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop))}}', Z = new CSSStyleSheet();
8
8
  Z.replaceSync(ht);
9
9
  const ut = [
@@ -151,9 +151,9 @@ class R extends I {
151
151
  this.checkName(o, i) || x(
152
152
  `${i} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
153
153
  );
154
- const n = t.indexOf("--") > -1, l = n ? t.split("--")[0] : t, a = [];
154
+ const n = t.indexOf("--") > -1, l = n ? t.split("--")[0] : t, r = [];
155
155
  if (!n)
156
- this.getAttribute(l + "--mobile") || a.push("mobile"), this.getAttribute(l + "--tablet") || a.push("tablet"), this.getAttribute(l + "--laptop") || a.push("laptop"), this.getAttribute(l + "--desktop") || a.push("desktop"), a.forEach((c) => {
156
+ this.getAttribute(l + "--mobile") || r.push("mobile"), this.getAttribute(l + "--tablet") || r.push("tablet"), this.getAttribute(l + "--laptop") || r.push("laptop"), this.getAttribute(l + "--desktop") || r.push("desktop"), r.forEach((c) => {
157
157
  this.updateStyle(l, c, e, o), this.updateStyle(l, c, i, o);
158
158
  });
159
159
  else {
@@ -605,7 +605,7 @@ class wt extends I {
605
605
  case "background-color":
606
606
  this.$bodyContainer.setAttribute(
607
607
  "background-color",
608
- rt.indexOf(i) > 0 ? i : "none"
608
+ at.indexOf(i) > 0 ? i : "none"
609
609
  );
610
610
  break;
611
611
  case "padding-vertical":
@@ -633,7 +633,7 @@ const $t = ["", "default", "small"], St = [
633
633
  "default",
634
634
  "secondary",
635
635
  "naked"
636
- ], A = class A extends at {
636
+ ], A = class A extends rt {
637
637
  constructor() {
638
638
  super(U), this.template = () => "<slot></slot>";
639
639
  const t = document.createElement(A.nativeName);
@@ -788,7 +788,7 @@ class Tt extends I {
788
788
  k(this, u);
789
789
  k(this, p);
790
790
  k(this, $, () => `<svg aria-hidden="true">
791
- <use xlink:href=""></use>
791
+ <use></use>
792
792
  </svg>`);
793
793
  this.shadowRoot.innerHTML = d(this, $).call(this), j(this, p, (i = this.attachInternals) == null ? void 0 : i.call(this)), d(this, p) && (d(this, p).role = "img");
794
794
  }
@@ -827,10 +827,7 @@ class Tt extends I {
827
827
  }
828
828
  }
829
829
  connectedCallback() {
830
- this.role = "img", this.name && this.$el.firstElementChild.setAttribute(
831
- "xlink:href",
832
- `#icon-${this.name}`
833
- );
830
+ this.role = "img";
834
831
  const e = document.querySelectorAll("px-icon-set");
835
832
  e || console.log("<px-icon-set> component not found");
836
833
  for (const i of e) {
@@ -839,7 +836,7 @@ class Tt extends I {
839
836
  continue;
840
837
  }
841
838
  i.getAttribute("name") === this.from && i.getAttribute("type") !== "font" && (j(this, u, i.getAttribute("src")), this.$el.firstElementChild.setAttribute(
842
- "xlink:href",
839
+ "href",
843
840
  `${d(this, u)}#icon-${this.name}`
844
841
  ));
845
842
  }
@@ -852,7 +849,7 @@ class Tt extends I {
852
849
  }
853
850
  updateName(e, i) {
854
851
  d(this, u) && this.$el.firstElementChild.setAttribute(
855
- "xlink:href",
852
+ "href",
856
853
  `${d(this, u)}#icon-${i}`
857
854
  );
858
855
  }
@@ -1009,57 +1006,57 @@ function F(s) {
1009
1006
  }
1010
1007
  var ee = "Expected a function", ie = Math.max, se = Math.min;
1011
1008
  function oe(s, t, e) {
1012
- var i, o, n, l, a, c, b = 0, H = !1, g = !1, S = !0;
1009
+ var i, o, n, l, r, c, b = 0, H = !1, g = !1, S = !0;
1013
1010
  if (typeof s != "function")
1014
1011
  throw new TypeError(ee);
1015
1012
  t = F(t) || 0, y(e) && (H = !!e.leading, g = "maxWait" in e, n = g ? ie(F(e.maxWait) || 0, t) : n, S = "trailing" in e ? !!e.trailing : S);
1016
- function C(r) {
1013
+ function C(a) {
1017
1014
  var h = i, v = o;
1018
- return i = o = void 0, b = r, l = s.apply(v, h), l;
1015
+ return i = o = void 0, b = a, l = s.apply(v, h), l;
1019
1016
  }
1020
- function tt(r) {
1021
- return b = r, a = setTimeout(m, t), H ? C(r) : l;
1017
+ function tt(a) {
1018
+ return b = a, r = setTimeout(m, t), H ? C(a) : l;
1022
1019
  }
1023
- function et(r) {
1024
- var h = r - c, v = r - b, q = t - h;
1020
+ function et(a) {
1021
+ var h = a - c, v = a - b, q = t - h;
1025
1022
  return g ? se(q, n - v) : q;
1026
1023
  }
1027
- function P(r) {
1028
- var h = r - c, v = r - b;
1024
+ function P(a) {
1025
+ var h = a - c, v = a - b;
1029
1026
  return c === void 0 || h >= t || h < 0 || g && v >= n;
1030
1027
  }
1031
1028
  function m() {
1032
- var r = L();
1033
- if (P(r))
1034
- return D(r);
1035
- a = setTimeout(m, et(r));
1029
+ var a = L();
1030
+ if (P(a))
1031
+ return D(a);
1032
+ r = setTimeout(m, et(a));
1036
1033
  }
1037
- function D(r) {
1038
- return a = void 0, S && i ? C(r) : (i = o = void 0, l);
1034
+ function D(a) {
1035
+ return r = void 0, S && i ? C(a) : (i = o = void 0, l);
1039
1036
  }
1040
1037
  function it() {
1041
- a !== void 0 && clearTimeout(a), b = 0, i = c = o = a = void 0;
1038
+ r !== void 0 && clearTimeout(r), b = 0, i = c = o = r = void 0;
1042
1039
  }
1043
1040
  function st() {
1044
- return a === void 0 ? l : D(L());
1041
+ return r === void 0 ? l : D(L());
1045
1042
  }
1046
1043
  function z() {
1047
- var r = L(), h = P(r);
1048
- if (i = arguments, o = this, c = r, h) {
1049
- if (a === void 0)
1044
+ var a = L(), h = P(a);
1045
+ if (i = arguments, o = this, c = a, h) {
1046
+ if (r === void 0)
1050
1047
  return tt(c);
1051
1048
  if (g)
1052
- return clearTimeout(a), a = setTimeout(m, t), C(c);
1049
+ return clearTimeout(r), r = setTimeout(m, t), C(c);
1053
1050
  }
1054
- return a === void 0 && (a = setTimeout(m, t)), l;
1051
+ return r === void 0 && (r = setTimeout(m, t)), l;
1055
1052
  }
1056
1053
  return z.cancel = it, z.flush = st, z;
1057
1054
  }
1058
- var re = "Expected a function";
1059
- function ae(s, t, e) {
1055
+ var ae = "Expected a function";
1056
+ function re(s, t, e) {
1060
1057
  var i = !0, o = !0;
1061
1058
  if (typeof s != "function")
1062
- throw new TypeError(re);
1059
+ throw new TypeError(ae);
1063
1060
  return y(e) && (i = "leading" in e ? !!e.leading : i, o = "trailing" in e ? !!e.trailing : o), oe(s, t, {
1064
1061
  leading: i,
1065
1062
  maxWait: t,
@@ -1138,7 +1135,7 @@ class ce extends HTMLElement {
1138
1135
  this.getAttribute("gap") || "s"
1139
1136
  ), requestAnimationFrame(() => {
1140
1137
  this.handleAppleSeedDisplay();
1141
- }), this.$appleseed.setAttribute("amount", `${this.itemNumbers}`), this.$carousel.addEventListener("scroll", ae(this.onScroll, 500)), this.$previous.addEventListener("click", () => {
1138
+ }), this.$appleseed.setAttribute("amount", `${this.itemNumbers}`), this.$carousel.addEventListener("scroll", re(this.onScroll, 500)), this.$previous.addEventListener("click", () => {
1142
1139
  this.$carousel.scrollLeft -= this.$carousel.clientWidth;
1143
1140
  }), this.$next.addEventListener("click", () => {
1144
1141
  this.$carousel.scrollLeft += this.$carousel.clientWidth;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-carousel",
3
- "version": "2.0.0-alpha.55",
3
+ "version": "2.0.0-alpha.57",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",