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

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 +62 -62
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -780,17 +780,8 @@ const zt = [
780
780
  (s) => s.replace(/([A-Z])/g, "-$1").toLowerCase().slice(1)
781
781
  ), Lt = ":host{display:inline-flex;flex-direction:column;justify-content:center}svg{font-size:var(--px-size-icon-s);line-height:var(--px-font-line-height-xs);width:1em;height:1em;color:var(--px-color-icon-accent-default)}.inherit{color:inherit}.brand{color:var(--px-color-icon-brand-default)}.accent{color:var(--px-color-icon-accent-default)}.neutral{color:var(--px-color-icon-neutral-default)}.dimmed{color:var(--px-color-icon-dimmed-default)}.purpose-success{color:var(--px-color-icon-purpose-success-default)}.purpose-warning{color:var(--px-color-icon-purpose-warning-default)}.purpose-error{color:var(--px-color-icon-purpose-error-default)}.purpose-unlimited{color:var(--px-color-icon-purpose-unlimited-default)}.purpose-promo{color:var(--px-color-icon-purpose-promo-default)}.state-hover:hover{color:var(--px-color-icon-state-hover-default)}.state-active:active{color:var(--px-color-icon-state-active-default)}.state-disabled{color:var(--px-color-icon-state-disabled-default)}:host([inverted]) svg{color:var(--px-color-icon-accent-inverted)}:host([inverted]) .inherit{color:inherit}:host([inverted]) .brand{color:var(--px-color-icon-brand-inverted)}:host([inverted]) .accent{color:var(--px-color-icon-accent-inverted)}:host([inverted]) .neutral{color:var(--px-color-icon-neutral-inverted)}:host([inverted]) .dimmed{color:var(--px-color-icon-dimmed-inverted)}:host([inverted]) .purpose-success{color:var(--px-color-icon-purpose-success-inverted)}:host([inverted]) .purpose-warning{color:var(--px-color-icon-purpose-warning-inverted)}:host([inverted]) .purpose-error{color:var(--px-color-icon-purpose-error-inverted)}:host([inverted]) .purpose-unlimited{color:var(--px-color-icon-purpose-unlimited-inverted)}:host([inverted]) .purpose-promo{color:var(--px-color-icon-purpose-promo-inverted)}:host([inverted]) .state-hover:hover{color:var(--px-color-icon-state-hover-inverted)}:host([inverted]) .state-active:active{color:var(--px-color-icon-state-active-inverted)}:host([inverted]) .state-disabled{color:var(--px-color-icon-state-disabled-inverted)}.size-xs{font-size:var(--px-size-icon-xs)}.size-s{font-size:var(--px-size-icon-s)}.size-m{font-size:var(--px-size-icon-m)}.size-l{font-size:var(--px-size-icon-l)}.size-xl{font-size:var(--px-size-icon-xl)}", K = new CSSStyleSheet();
782
782
  K.replaceSync(Lt);
783
- const Tt = [
784
- "name",
785
- "size",
786
- "color",
787
- "aria-label",
788
- "inverted",
789
- "from",
790
- "disabled"
791
- ];
792
783
  var u, p, $;
793
- class Et extends I {
784
+ class Tt extends I {
794
785
  constructor(...e) {
795
786
  var i;
796
787
  super(...e, K);
@@ -802,7 +793,16 @@ class Et extends I {
802
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");
803
794
  }
804
795
  static get observedAttributes() {
805
- return [...super.observedAttributes, ...Tt];
796
+ return [
797
+ ...super.observedAttributes,
798
+ "name",
799
+ "size",
800
+ "color",
801
+ "aria-label",
802
+ "inverted",
803
+ "from",
804
+ "disabled"
805
+ ];
806
806
  }
807
807
  attributeChangedCallback(e, i, o) {
808
808
  if (i !== o)
@@ -903,10 +903,10 @@ class Et extends I {
903
903
  }
904
904
  }
905
905
  u = new WeakMap(), p = new WeakMap(), $ = new WeakMap();
906
- customElements.get("px-icon") || customElements.define("px-icon", Et);
907
- const It = ":host{--px-appleseed-size-l: 14px;--px-appleseed-size-m: 10px;--px-appleseed-size-s: 6px;--px-appleseed-size-xs: 4px}.container{display:flex}.container:has(#seed-0.appleseed-6-plus[active]) :nth-child(4)>div,.container:has(#seed-1.appleseed-6-plus[active]) :nth-child(4)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.container:has(#seed-0.appleseed-6-plus[active]) :nth-child(5)>div,.container:has(#seed-1.appleseed-6-plus[active]) :nth-child(5)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(2)>div,.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(4)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(1)>div,.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(5)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-3.appleseed-6-plus[active]) :nth-child(1)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-3.appleseed-6-plus[active]) :nth-child(2)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.container:has(#seed-3.appleseed-6-plus[active]) :nth-child(5)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-4.appleseed-6-plus[active]) :nth-child(1)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-4.appleseed-6-plus[active]) :nth-child(2)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.appleseed{width:var(--px-size-icon-m);height:var(--px-size-icon-m);display:flex;justify-content:center;align-items:center}@media only screen and (max-width: 47.938em){.appleseed{width:var(--px-size-icon-s);height:var(--px-size-icon-s)}}.appleseed-6-plus>div,.appleseed-6-minus>div{box-shadow:inset 0 0 0 var(--px-size-border-s) var(--px-color-border-brand-default);border-radius:var(--px-radius-main);height:var(--px-appleseed-size-m);width:var(--px-appleseed-size-m)}.appleseed-6-plus[active]>div,.appleseed-6-minus[active]>div{width:var(--px-appleseed-size-l);height:var(--px-appleseed-size-l);background-color:var(--px-color-icon-brand-default)}", J = new CSSStyleSheet();
908
- J.replaceSync(It);
909
- class Rt extends HTMLElement {
906
+ customElements.get("px-icon") || customElements.define("px-icon", Tt);
907
+ const Et = ":host{--px-appleseed-size-l: 14px;--px-appleseed-size-m: 10px;--px-appleseed-size-s: 6px;--px-appleseed-size-xs: 4px}.container{display:flex}.container:has(#seed-0.appleseed-6-plus[active]) :nth-child(4)>div,.container:has(#seed-1.appleseed-6-plus[active]) :nth-child(4)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.container:has(#seed-0.appleseed-6-plus[active]) :nth-child(5)>div,.container:has(#seed-1.appleseed-6-plus[active]) :nth-child(5)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(2)>div,.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(4)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(1)>div,.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(5)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-3.appleseed-6-plus[active]) :nth-child(1)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-3.appleseed-6-plus[active]) :nth-child(2)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.container:has(#seed-3.appleseed-6-plus[active]) :nth-child(5)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-4.appleseed-6-plus[active]) :nth-child(1)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-4.appleseed-6-plus[active]) :nth-child(2)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.appleseed{width:var(--px-size-icon-m);height:var(--px-size-icon-m);display:flex;justify-content:center;align-items:center}@media only screen and (max-width: 47.938em){.appleseed{width:var(--px-size-icon-s);height:var(--px-size-icon-s)}}.appleseed-6-plus>div,.appleseed-6-minus>div{box-shadow:inset 0 0 0 var(--px-size-border-s) var(--px-color-border-brand-default);border-radius:var(--px-radius-main);height:var(--px-appleseed-size-m);width:var(--px-appleseed-size-m)}.appleseed-6-plus[active]>div,.appleseed-6-minus[active]>div{width:var(--px-appleseed-size-l);height:var(--px-appleseed-size-l);background-color:var(--px-color-icon-brand-default)}", J = new CSSStyleSheet();
908
+ J.replaceSync(Et);
909
+ class It extends HTMLElement {
910
910
  constructor() {
911
911
  super(), this.template = (t, e) => `<div class="container">
912
912
  ${Array.from(
@@ -948,54 +948,54 @@ class Rt extends HTMLElement {
948
948
  return parseInt(this.getAttribute("active")) || 0;
949
949
  }
950
950
  }
951
- customElements.get("px-appleseed") || customElements.define("px-appleseed", Rt);
951
+ customElements.get("px-appleseed") || customElements.define("px-appleseed", It);
952
952
  function y(s) {
953
953
  var t = typeof s;
954
954
  return s != null && (t == "object" || t == "function");
955
955
  }
956
- var Mt = typeof global == "object" && global && global.Object === Object && global, Ht = typeof self == "object" && self && self.Object === Object && self, Q = Mt || Ht || Function("return this")(), L = function() {
956
+ var Rt = typeof global == "object" && global && global.Object === Object && global, Mt = typeof self == "object" && self && self.Object === Object && self, Q = Rt || Mt || Function("return this")(), L = function() {
957
957
  return Q.Date.now();
958
- }, Pt = /\s/;
959
- function Dt(s) {
960
- for (var t = s.length; t-- && Pt.test(s.charAt(t)); )
958
+ }, Ht = /\s/;
959
+ function Pt(s) {
960
+ for (var t = s.length; t-- && Ht.test(s.charAt(t)); )
961
961
  ;
962
962
  return t;
963
963
  }
964
- var qt = /^\s+/;
965
- function Ot(s) {
966
- return s && s.slice(0, Dt(s) + 1).replace(qt, "");
964
+ var Dt = /^\s+/;
965
+ function qt(s) {
966
+ return s && s.slice(0, Pt(s) + 1).replace(Dt, "");
967
967
  }
968
- var w = Q.Symbol, Y = Object.prototype, Nt = Y.hasOwnProperty, Wt = Y.toString, f = w ? w.toStringTag : void 0;
969
- function Xt(s) {
970
- var t = Nt.call(s, f), e = s[f];
968
+ var w = Q.Symbol, Y = Object.prototype, Ot = Y.hasOwnProperty, Nt = Y.toString, f = w ? w.toStringTag : void 0;
969
+ function Wt(s) {
970
+ var t = Ot.call(s, f), e = s[f];
971
971
  try {
972
972
  s[f] = void 0;
973
973
  var i = !0;
974
974
  } catch {
975
975
  }
976
- var o = Wt.call(s);
976
+ var o = Nt.call(s);
977
977
  return i && (t ? s[f] = e : delete s[f]), o;
978
978
  }
979
- var Ft = Object.prototype, Bt = Ft.toString;
980
- function Gt(s) {
981
- return Bt.call(s);
979
+ var Xt = Object.prototype, Ft = Xt.toString;
980
+ function Bt(s) {
981
+ return Ft.call(s);
982
982
  }
983
- var Zt = "[object Null]", _t = "[object Undefined]", W = w ? w.toStringTag : void 0;
984
- function Ut(s) {
985
- return s == null ? s === void 0 ? _t : Zt : W && W in Object(s) ? Xt(s) : Gt(s);
983
+ var Gt = "[object Null]", Zt = "[object Undefined]", W = w ? w.toStringTag : void 0;
984
+ function _t(s) {
985
+ return s == null ? s === void 0 ? Zt : Gt : W && W in Object(s) ? Wt(s) : Bt(s);
986
986
  }
987
- function Kt(s) {
987
+ function Ut(s) {
988
988
  return s != null && typeof s == "object";
989
989
  }
990
- var Jt = "[object Symbol]";
991
- function Qt(s) {
992
- return typeof s == "symbol" || Kt(s) && Ut(s) == Jt;
990
+ var Kt = "[object Symbol]";
991
+ function Jt(s) {
992
+ return typeof s == "symbol" || Ut(s) && _t(s) == Kt;
993
993
  }
994
- var X = NaN, Yt = /^[-+]0x[0-9a-f]+$/i, Vt = /^0b[01]+$/i, te = /^0o[0-7]+$/i, ee = parseInt;
994
+ var X = NaN, Qt = /^[-+]0x[0-9a-f]+$/i, Yt = /^0b[01]+$/i, Vt = /^0o[0-7]+$/i, te = parseInt;
995
995
  function F(s) {
996
996
  if (typeof s == "number")
997
997
  return s;
998
- if (Qt(s))
998
+ if (Jt(s))
999
999
  return X;
1000
1000
  if (y(s)) {
1001
1001
  var t = typeof s.valueOf == "function" ? s.valueOf() : s;
@@ -1003,16 +1003,16 @@ function F(s) {
1003
1003
  }
1004
1004
  if (typeof s != "string")
1005
1005
  return s === 0 ? s : +s;
1006
- s = Ot(s);
1007
- var e = Vt.test(s);
1008
- return e || te.test(s) ? ee(s.slice(2), e ? 2 : 8) : Yt.test(s) ? X : +s;
1006
+ s = qt(s);
1007
+ var e = Yt.test(s);
1008
+ return e || Vt.test(s) ? te(s.slice(2), e ? 2 : 8) : Qt.test(s) ? X : +s;
1009
1009
  }
1010
- var ie = "Expected a function", se = Math.max, oe = Math.min;
1011
- function re(s, t, e) {
1010
+ var ee = "Expected a function", ie = Math.max, se = Math.min;
1011
+ function oe(s, t, e) {
1012
1012
  var i, o, n, l, a, c, b = 0, H = !1, g = !1, S = !0;
1013
1013
  if (typeof s != "function")
1014
- throw new TypeError(ie);
1015
- t = F(t) || 0, y(e) && (H = !!e.leading, g = "maxWait" in e, n = g ? se(F(e.maxWait) || 0, t) : n, S = "trailing" in e ? !!e.trailing : S);
1014
+ throw new TypeError(ee);
1015
+ 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
1016
  function C(r) {
1017
1017
  var h = i, v = o;
1018
1018
  return i = o = void 0, b = r, l = s.apply(v, h), l;
@@ -1022,7 +1022,7 @@ function re(s, t, e) {
1022
1022
  }
1023
1023
  function et(r) {
1024
1024
  var h = r - c, v = r - b, q = t - h;
1025
- return g ? oe(q, n - v) : q;
1025
+ return g ? se(q, n - v) : q;
1026
1026
  }
1027
1027
  function P(r) {
1028
1028
  var h = r - c, v = r - b;
@@ -1055,12 +1055,12 @@ function re(s, t, e) {
1055
1055
  }
1056
1056
  return z.cancel = it, z.flush = st, z;
1057
1057
  }
1058
- var ae = "Expected a function";
1059
- function ne(s, t, e) {
1058
+ var re = "Expected a function";
1059
+ function ae(s, t, e) {
1060
1060
  var i = !0, o = !0;
1061
1061
  if (typeof s != "function")
1062
- throw new TypeError(ae);
1063
- return y(e) && (i = "leading" in e ? !!e.leading : i, o = "trailing" in e ? !!e.trailing : o), re(s, t, {
1062
+ throw new TypeError(re);
1063
+ return y(e) && (i = "leading" in e ? !!e.leading : i, o = "trailing" in e ? !!e.trailing : o), oe(s, t, {
1064
1064
  leading: i,
1065
1065
  maxWait: t,
1066
1066
  trailing: o
@@ -1068,8 +1068,8 @@ function ne(s, t, e) {
1068
1068
  }
1069
1069
  const M = new CSSStyleSheet();
1070
1070
  M.replaceSync(dt);
1071
- const le = (s, t, e) => `:host([${s}${e ? `--${e}` : ""}='${t}']) .carousel`, ce = "px-spacing", T = (s) => (t, e) => `calc(((100% - ${Math.max(parseInt(t), 2)} * ( var(--px-spacing-${s}-${e}))) / ${t}) - ( 64px / ${Math.max(parseInt(t), 2)}))`;
1072
- class de extends HTMLElement {
1071
+ const ne = (s, t, e) => `:host([${s}${e ? `--${e}` : ""}='${t}']) .carousel`, le = "px-spacing", T = (s) => (t, e) => `calc(((100% - ${Math.max(parseInt(t), 2)} * ( var(--px-spacing-${s}-${e}))) / ${t}) - ( 64px / ${Math.max(parseInt(t), 2)}))`;
1072
+ class ce extends HTMLElement {
1073
1073
  constructor() {
1074
1074
  super(), this.visibleItemsAttributeDelegate = new B(
1075
1075
  this,
@@ -1107,9 +1107,9 @@ class de extends HTMLElement {
1107
1107
  M,
1108
1108
  ct(
1109
1109
  "gap",
1110
- le,
1110
+ ne,
1111
1111
  G,
1112
- ce
1112
+ le
1113
1113
  )
1114
1114
  ];
1115
1115
  }
@@ -1138,7 +1138,7 @@ class de extends HTMLElement {
1138
1138
  this.getAttribute("gap") || "s"
1139
1139
  ), requestAnimationFrame(() => {
1140
1140
  this.handleAppleSeedDisplay();
1141
- }), this.$appleseed.setAttribute("amount", `${this.itemNumbers}`), this.$carousel.addEventListener("scroll", ne(this.onScroll, 500)), this.$previous.addEventListener("click", () => {
1141
+ }), this.$appleseed.setAttribute("amount", `${this.itemNumbers}`), this.$carousel.addEventListener("scroll", ae(this.onScroll, 500)), this.$previous.addEventListener("click", () => {
1142
1142
  this.$carousel.scrollLeft -= this.$carousel.clientWidth;
1143
1143
  }), this.$next.addEventListener("click", () => {
1144
1144
  this.$carousel.scrollLeft += this.$carousel.clientWidth;
@@ -1178,10 +1178,10 @@ class de extends HTMLElement {
1178
1178
  return this.querySelectorAll("px-carousel-item").length;
1179
1179
  }
1180
1180
  }
1181
- customElements.get("px-carousel") || customElements.define("px-carousel", de);
1181
+ customElements.get("px-carousel") || customElements.define("px-carousel", ce);
1182
1182
  const V = new CSSStyleSheet();
1183
1183
  V.replaceSync(pt);
1184
- class pe extends HTMLElement {
1184
+ class de extends HTMLElement {
1185
1185
  constructor() {
1186
1186
  super(), this.template = `
1187
1187
  <div class="carousel-item">
@@ -1189,9 +1189,9 @@ class pe extends HTMLElement {
1189
1189
  </div>`, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template, this.shadowRoot.adoptedStyleSheets = [M, V];
1190
1190
  }
1191
1191
  }
1192
- customElements.get("px-carousel-item") || customElements.define("px-carousel-item", pe);
1192
+ customElements.get("px-carousel-item") || customElements.define("px-carousel-item", de);
1193
1193
  export {
1194
- Rt as AppleSeed,
1195
- de as Carousel,
1196
- pe as CarouselItem
1194
+ It as AppleSeed,
1195
+ ce as Carousel,
1196
+ de as CarouselItem
1197
1197
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-carousel",
3
- "version": "2.0.0-alpha.53",
3
+ "version": "2.0.0-alpha.55",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",