@proximus/lavender-carousel 2.0.0-alpha.1 → 2.0.0-alpha.2

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 +119 -90
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -1,11 +1,11 @@
1
1
  var q = (r) => {
2
2
  throw TypeError(r);
3
3
  };
4
- var W = (r, t, e) => t.has(r) || q("Cannot " + e);
5
- var d = (r, t, e) => (W(r, t, "read from private field"), e ? e.call(r) : t.get(r)), m = (r, t, e) => t.has(r) ? q("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), C = (r, t, e, i) => (W(r, t, "write to private field"), i ? i.call(r, e) : t.set(r, e), e);
6
- import { WithExtraAttributes as T, AttributeBreakpointHandlerDelegate as F, gapValues as _, checkName as rt, backgroundColorValues as ot, PxElement as st, transferAccessibilityAttributes as at, iconSizeValuesKC as nt, cssTokenBreakpoints as lt } from "@proximus/lavender-common";
7
- const ct = ":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}", dt = "::slotted(*){border-radius:var(--px-radius-main)}: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}}", pt = ':host{display:block}: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([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([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([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))}}', B = new CSSStyleSheet();
8
- B.replaceSync(pt);
4
+ var O = (r, t, e) => t.has(r) || q("Cannot " + e);
5
+ var d = (r, t, e) => (O(r, t, "read from private field"), e ? e.call(r) : t.get(r)), m = (r, t, e) => t.has(r) ? q("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), C = (r, t, e, i) => (O(r, t, "write to private field"), i ? i.call(r, e) : t.set(r, e), e);
6
+ import { WithExtraAttributes as T, AttributeBreakpointHandlerDelegate as F, gapValues as B, checkName as rt, backgroundColorValues as st, PxElement as ot, transferAccessibilityAttributes as at, iconSizeValuesKC as nt, cssTokenBreakpoints as lt } from "@proximus/lavender-common";
7
+ const ct = ":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}", dt = "::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}}", pt = ':host{display:block}: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([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([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([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))}}', G = new CSSStyleSheet();
8
+ G.replaceSync(pt);
9
9
  const ut = [
10
10
  "",
11
11
  "default",
@@ -33,7 +33,7 @@ const ut = [
33
33
  ], gt = ["", "default", "nowrap", "wrap", "wrap-reverse"], vt = ["", "visible", "hidden", "scroll", "auto"];
34
34
  class E extends T {
35
35
  constructor() {
36
- super(B), this.overflowXAttributeDelegate = new F(
36
+ super(G), this.overflowXAttributeDelegate = new F(
37
37
  this,
38
38
  "overflow-x",
39
39
  (t) => t,
@@ -87,7 +87,7 @@ class E extends T {
87
87
  case "gap--tablet":
88
88
  case "gap--laptop":
89
89
  case "gap--desktop":
90
- this.updateFlexProperties(t, e, i, _);
90
+ this.updateFlexProperties(t, e, i, B);
91
91
  break;
92
92
  case "justify-content":
93
93
  case "justify-content--mobile":
@@ -134,8 +134,8 @@ class E extends T {
134
134
  break;
135
135
  }
136
136
  }
137
- updateOverflowX(t, e, i, o) {
138
- if (!rt(o, i)) {
137
+ updateOverflowX(t, e, i, s) {
138
+ if (!rt(s, i)) {
139
139
  console.error(`${i} is not an allowed ${t} value`);
140
140
  return;
141
141
  }
@@ -145,20 +145,20 @@ class E extends T {
145
145
  i
146
146
  );
147
147
  }
148
- updateFlexProperties(t, e, i, o) {
149
- this.checkName(o, i) || console.error(`${i} is not a valid value for ${o}`);
148
+ updateFlexProperties(t, e, i, s) {
149
+ this.checkName(s, i) || console.error(`${i} is not a valid value for ${s}`);
150
150
  const n = t.indexOf("--") > -1, l = n ? t.split("--")[0] : t, a = [];
151
151
  if (!n)
152
152
  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) => {
153
- this.updateStyle(l, c, e, o), this.updateStyle(l, c, i, o);
153
+ this.updateStyle(l, c, e, s), this.updateStyle(l, c, i, s);
154
154
  });
155
155
  else {
156
156
  const c = t.split("--")[1];
157
- this.updateStyle(l, c, e, o), this.updateStyle(l, c, i, o);
157
+ this.updateStyle(l, c, e, s), this.updateStyle(l, c, i, s);
158
158
  }
159
159
  }
160
- updateStyle(t, e, i, o) {
161
- i && (t === "gap" && o && o.includes(i) ? this.$el.style.setProperty(
160
+ updateStyle(t, e, i, s) {
161
+ i && (t === "gap" && s && s.includes(i) ? this.$el.style.setProperty(
162
162
  `--flex-${t}--${e}-value`,
163
163
  `var(--px-spacing-${i}-${e === "laptop" ? "desktop" : e})`
164
164
  ) : this.$el.style.setProperty(
@@ -371,16 +371,26 @@ class xt extends E {
371
371
  customElements.get("px-hstack") || customElements.define("px-hstack", xt);
372
372
  class mt extends HTMLElement {
373
373
  constructor() {
374
- super();
374
+ super(), this.isZeroSized = !1, this.growValue = "1";
375
375
  }
376
376
  static get observedAttributes() {
377
377
  return ["grow"];
378
378
  }
379
379
  attributeChangedCallback(t, e, i) {
380
- t === "grow" && (this.style.flexGrow = i);
380
+ t === "grow" && (this.growValue = i || "1", this.isZeroSized || (this.style.flexGrow = this.growValue), this.scheduleRecheck());
381
381
  }
382
382
  connectedCallback() {
383
- this.style.flexGrow = this.getAttribute("grow") || "1";
383
+ this.growValue = this.getAttribute("grow") || "1", this.style.flexGrow = this.growValue, this.resizeObserver = new ResizeObserver((t) => {
384
+ t.forEach((e) => {
385
+ this.handleSizeChange(
386
+ e.contentRect.width === 0 || e.contentRect.height === 0
387
+ );
388
+ });
389
+ }), this.resizeObserver.observe(this), this.scheduleRecheck();
390
+ }
391
+ disconnectedCallback() {
392
+ var t;
393
+ (t = this.resizeObserver) == null || t.disconnect(), this.recheckHandle && (cancelAnimationFrame(this.recheckHandle), this.recheckHandle = void 0);
384
394
  }
385
395
  get grow() {
386
396
  return this.getAttribute("grow");
@@ -388,13 +398,31 @@ class mt extends HTMLElement {
388
398
  set grow(t) {
389
399
  this.setAttribute("grow", t);
390
400
  }
401
+ scheduleRecheck() {
402
+ this.recheckHandle && cancelAnimationFrame(this.recheckHandle), this.recheckHandle = requestAnimationFrame(() => {
403
+ this.recheckHandle = void 0, this.recalculateVisibility();
404
+ });
405
+ }
406
+ recalculateVisibility() {
407
+ if (!this.isConnected)
408
+ return;
409
+ this.style.display = "", this.style.flexGrow = this.growValue;
410
+ const t = this.getBoundingClientRect(), e = t.width === 0 || t.height === 0;
411
+ this.handleSizeChange(e);
412
+ }
413
+ handleSizeChange(t) {
414
+ this.isZeroSized !== t && (this.isZeroSized = t, this.updateParticipation());
415
+ }
416
+ updateParticipation() {
417
+ this.isZeroSized ? (this.style.display = "none", this.style.flexGrow = "0") : (this.style.display = "", this.style.flexGrow = this.growValue);
418
+ }
391
419
  }
392
420
  customElements.get("px-spacer") || customElements.define("px-spacer", mt);
393
- const kt = ":host{display:block;box-sizing:border-box}slot[name=body-container]{min-height:100vh}#image-sticky-box{margin-top:-2.5em}", G = new CSSStyleSheet();
394
- G.replaceSync(kt);
421
+ const kt = ":host{display:block;box-sizing:border-box}slot[name=body-container]{min-height:100vh}#image-sticky-box{margin-top:-2.5em}", _ = new CSSStyleSheet();
422
+ _.replaceSync(kt);
395
423
  class yt extends T {
396
424
  constructor() {
397
- super(G), this.template = (t) => `
425
+ super(_), this.template = (t) => `
398
426
  <px-container border-radius="none" padding="none">
399
427
  <px-vstack>
400
428
  <px-container id="header-container" border-radius="none">
@@ -571,7 +599,7 @@ class yt extends T {
571
599
  case "background-color":
572
600
  this.$bodyContainer.setAttribute(
573
601
  "background-color",
574
- ot.indexOf(i) > 0 ? i : "none"
602
+ st.indexOf(i) > 0 ? i : "none"
575
603
  );
576
604
  break;
577
605
  case "padding-vertical":
@@ -592,16 +620,16 @@ class yt extends T {
592
620
  }
593
621
  }
594
622
  customElements.get("px-page") === void 0 && customElements.define("px-page", yt);
595
- const wt = ".btn-icon{font-size:var(--px-font-size-base);display:inline-flex;width:var(--px-size-l);height:var(--px-size-l);vertical-align:middle;align-items:center;justify-content:center;cursor:pointer;--btn-transition: all .2s ease-in-out 0s;transition:var(--btn-transition);background:var(--px-color-background-container-primary-default);color:var(--px-color-icon-brand-inverted);border-radius:var(--px-radius-pill);padding:var(--px-padding-xs-mobile);border:var(--px-size-border-m) solid transparent}.btn-icon,.btn-icon *{box-sizing:border-box}.btn-icon ::slotted(px-icon){line-height:0}.btn-icon:hover:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-bordered-default);color:var(--px-color-icon-brand-default);border-color:var(--px-color-border-state-hover-default)}.btn-icon:active:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-active-inverted);color:var(--px-color-icon-state-active-default);border-color:var(--px-color-border-state-active-default)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}.btn-icon[disabled],.btn-icon[aria-disabled=true]{background:var(--px-color-background-state-disabled-default);color:var(--px-color-icon-state-disabled-default);cursor:default;pointer-events:none}.btn-icon.btn-icon--state-loading{background:var(--px-color-background-state-disabled-default);color:var(--px-color-icon-brand-default);cursor:inherit}.btn-icon--size-small{padding:var(--px-padding-2xs-mobile);width:var(--px-size-m);height:var(--px-size-m)}.btn-icon--variant-secondary{background-color:var(--px-color-background-container-secondary-default);color:var(--px-color-icon-brand-default)}.btn-icon--variant-naked{background-color:transparent;color:var(--px-color-icon-brand-default);width:auto;height:auto}:host([inverted]) .btn-icon{background:var(--px-color-background-container-primary-inverted);color:var(--px-color-icon-brand-default)}:host([inverted]) .btn-icon:hover:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-bordered-inverted);color:var(--px-color-icon-brand-inverted);border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) .btn-icon:active:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-default);color:var(--px-color-icon-state-active-inverted);border-color:var(--px-color-border-state-active-inverted)}:host([inverted]) .btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-color:var(--px-color-border-focus-outline-inverted)}:host([inverted]) .btn-icon[disabled],:host([inverted]) .btn-icon[aria-disabled=true]{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-icon-state-disabled-inverted)}:host([inverted]) .btn-icon.btn-icon--state-loading{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-icon-brand-inverted);border-color:transparent}:host([inverted]) .btn-icon.btn-icon--variant-naked{background-color:transparent;color:var(--px-color-icon-brand-inverted)}:host([inverted]) .btn-icon--variant-secondary{background-color:var(--px-color-background-container-secondary-inverted);color:var(--px-color-icon-brand-inverted)}@media only screen and (min-width: 768px){.btn-icon{padding:var(--px-padding-xs-desktop)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn-icon--size-small{padding:var(--px-padding-2xs-desktop)}}@media only screen and (min-width: 1025px){.btn-icon{padding:var(--px-padding-xs-desktop)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn-icon--size-small{padding:var(--px-padding-2xs-desktop)}}", U = new CSSStyleSheet();
596
- U.replaceSync(wt);
623
+ const wt = ".btn-icon{font-size:var(--px-font-size-base);display:inline-flex;width:var(--px-size-l);height:var(--px-size-l);vertical-align:middle;align-items:center;justify-content:center;cursor:pointer;--btn-transition: all .2s ease-in-out 0s;transition:var(--btn-transition);background:var(--px-color-background-container-primary-default);color:var(--px-color-icon-brand-inverted);border-radius:var(--px-radius-pill);padding:var(--px-padding-xs-mobile);border:var(--px-size-border-m) solid transparent}.btn-icon,.btn-icon *{box-sizing:border-box}.btn-icon ::slotted(px-icon){line-height:0}.btn-icon:hover:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-bordered-default);color:var(--px-color-icon-brand-default);border-color:var(--px-color-border-state-hover-default)}.btn-icon:active:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-active-inverted);color:var(--px-color-icon-state-active-default);border-color:var(--px-color-border-state-active-default)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}.btn-icon[disabled],.btn-icon[aria-disabled=true]{background:var(--px-color-background-state-disabled-default);color:var(--px-color-icon-state-disabled-default);cursor:default;pointer-events:none}.btn-icon.btn-icon--state-loading{background:var(--px-color-background-state-disabled-default);color:var(--px-color-icon-brand-default);cursor:inherit}.btn-icon--size-small{padding:var(--px-padding-2xs-mobile);width:var(--px-size-m);height:var(--px-size-m)}.btn-icon--variant-secondary{background-color:var(--px-color-background-container-secondary-default);color:var(--px-color-icon-brand-default)}.btn-icon--variant-naked{background-color:transparent;color:var(--px-color-icon-brand-default);width:auto;height:auto}:host([inverted]) .btn-icon{background:var(--px-color-background-container-primary-inverted);color:var(--px-color-icon-brand-default)}:host([inverted]) .btn-icon:hover:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-bordered-inverted);color:var(--px-color-icon-brand-inverted);border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) .btn-icon:active:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-default);color:var(--px-color-icon-state-active-inverted);border-color:var(--px-color-border-state-active-inverted)}:host([inverted]) .btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-color:var(--px-color-border-focus-outline-inverted)}:host([inverted]) .btn-icon[disabled],:host([inverted]) .btn-icon[aria-disabled=true]{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-icon-state-disabled-inverted)}:host([inverted]) .btn-icon.btn-icon--state-loading{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-icon-brand-inverted);border-color:transparent}:host([inverted]) .btn-icon.btn-icon--variant-naked{background-color:transparent;color:var(--px-color-icon-brand-inverted)}:host([inverted]) .btn-icon--variant-secondary{background-color:var(--px-color-background-container-secondary-inverted);color:var(--px-color-icon-brand-inverted)}@media only screen and (min-width: 768px){.btn-icon{padding:var(--px-padding-xs-desktop)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn-icon--size-small{padding:var(--px-padding-2xs-desktop)}}@media only screen and (min-width: 1025px){.btn-icon{padding:var(--px-padding-xs-desktop)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn-icon--size-small{padding:var(--px-padding-2xs-desktop)}}", Z = new CSSStyleSheet();
624
+ Z.replaceSync(wt);
597
625
  const At = ["", "default", "small"], $t = [
598
626
  "",
599
627
  "default",
600
628
  "secondary",
601
629
  "naked"
602
- ], R = class R extends st {
630
+ ], R = class R extends ot {
603
631
  constructor() {
604
- super(U), this.template = () => "<slot></slot>";
632
+ super(Z), this.template = () => "<slot></slot>";
605
633
  const t = document.createElement(this.nativeName);
606
634
  t.classList.add("btn-icon"), t.innerHTML = this.template(), this.shadowRoot.appendChild(t);
607
635
  }
@@ -728,6 +756,7 @@ class St extends HTMLElement {
728
756
  customElements.get("px-icon-set") || customElements.define("px-icon-set", St);
729
757
  const Ct = [
730
758
  "Brand",
759
+ "Accent",
731
760
  "Neutral",
732
761
  "Dimmed",
733
762
  "PurposeSuccess",
@@ -740,8 +769,8 @@ const Ct = [
740
769
  "StateDisabled"
741
770
  ], zt = ["Inherit", ...Ct].map(
742
771
  (r) => r.replace(/([A-Z])/g, "-$1").toLowerCase().slice(1)
743
- ), jt = ":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-brand-default)}.inherit{color:inherit}.brand{color:var(--px-color-icon-brand-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-brand-inverted)}:host([inverted]) .inherit{color:inherit}:host([inverted]) .brand{color:var(--px-color-icon-brand-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();
744
- K.replaceSync(jt);
772
+ ), jt = ":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-brand-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-brand-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)}", U = new CSSStyleSheet();
773
+ U.replaceSync(jt);
745
774
  const Lt = [
746
775
  "name",
747
776
  "size",
@@ -755,7 +784,7 @@ var h, p, w;
755
784
  class Tt extends T {
756
785
  constructor(...e) {
757
786
  var i;
758
- super(...e, K);
787
+ super(...e, U);
759
788
  m(this, h);
760
789
  m(this, p);
761
790
  m(this, w, () => `<svg aria-hidden="true">
@@ -766,17 +795,17 @@ class Tt extends T {
766
795
  static get observedAttributes() {
767
796
  return [...super.observedAttributes, ...Lt];
768
797
  }
769
- attributeChangedCallback(e, i, o) {
770
- if (i !== o)
798
+ attributeChangedCallback(e, i, s) {
799
+ if (i !== s)
771
800
  switch (e) {
772
801
  case "name":
773
- this.updateName(i, o);
802
+ this.updateName(i, s);
774
803
  break;
775
804
  case "size":
776
- this.updateAttribute(e, i, o, nt);
805
+ this.updateAttribute(e, i, s, nt);
777
806
  break;
778
807
  case "color":
779
- this.updateAttribute(e, i, o, zt);
808
+ this.updateAttribute(e, i, s, zt);
780
809
  break;
781
810
  case "disabled":
782
811
  this.color = "state-disabled";
@@ -784,7 +813,7 @@ class Tt extends T {
784
813
  case "aria-label":
785
814
  if (!d(this, p))
786
815
  return;
787
- o ? d(this, p).ariaHidden = "false" : d(this, p).ariaHidden = "true";
816
+ s ? d(this, p).ariaHidden = "false" : d(this, p).ariaHidden = "true";
788
817
  break;
789
818
  }
790
819
  }
@@ -803,8 +832,8 @@ class Tt extends T {
803
832
  }
804
833
  !this.ariaLabel && d(this, p) && (d(this, p).ariaHidden = "true");
805
834
  }
806
- updateAttribute(e, i, o, n) {
807
- i !== null && i !== "" && (e === "size" ? this.$el.classList.toggle(`${e}-${i}`) : this.$el.classList.toggle(i)), o !== null && o !== "" && (e === "size" ? this.$el.classList.toggle(`${e}-${o}`) : this.$el.classList.toggle(o)), this.checkName(n, o) || console.error(`${o} is not an allowed ${e} value`);
835
+ updateAttribute(e, i, s, n) {
836
+ i !== null && i !== "" && (e === "size" ? this.$el.classList.toggle(`${e}-${i}`) : this.$el.classList.toggle(i)), s !== null && s !== "" && (e === "size" ? this.$el.classList.toggle(`${e}-${s}`) : this.$el.classList.toggle(s)), this.checkName(n, s) || console.error(`${s} is not an allowed ${e} value`);
808
837
  }
809
838
  updateName(e, i) {
810
839
  d(this, h) && this.$el.firstElementChild.setAttribute(
@@ -860,18 +889,18 @@ class Tt extends T {
860
889
  }
861
890
  h = new WeakMap(), p = new WeakMap(), w = new WeakMap();
862
891
  customElements.get("px-icon") || customElements.define("px-icon", Tt);
863
- 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)}", Z = new CSSStyleSheet();
864
- Z.replaceSync(Et);
892
+ 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)}", K = new CSSStyleSheet();
893
+ K.replaceSync(Et);
865
894
  class It extends HTMLElement {
866
895
  constructor() {
867
896
  super(), this.template = (t, e) => `<div class="container">
868
897
  ${Array.from(
869
898
  { length: Math.min(t, 5) },
870
- (i, o) => `<div id="seed-${o}" ${e === o ? "active" : ""} class="appleseed ${t > 5 ? "appleseed-6-plus" : "appleseed-6-minus"}">
899
+ (i, s) => `<div id="seed-${s}" ${e === s ? "active" : ""} class="appleseed ${t > 5 ? "appleseed-6-plus" : "appleseed-6-minus"}">
871
900
  <div></div>
872
901
  </div>`
873
902
  ).join("")}
874
- </div>`, this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [Z], this.shadowRoot.innerHTML = this.template(this.amount, this.active);
903
+ </div>`, this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [K], this.shadowRoot.innerHTML = this.template(this.amount, this.active);
875
904
  }
876
905
  static get observedAttributes() {
877
906
  return ["amount", "active"];
@@ -911,41 +940,41 @@ function k(r) {
911
940
  }
912
941
  var Rt = typeof global == "object" && global && global.Object === Object && global, Mt = typeof self == "object" && self && self.Object === Object && self, J = Rt || Mt || Function("return this")(), z = function() {
913
942
  return J.Date.now();
914
- }, Pt = /\s/;
915
- function Dt(r) {
916
- for (var t = r.length; t-- && Pt.test(r.charAt(t)); )
943
+ }, Ht = /\s/;
944
+ function Pt(r) {
945
+ for (var t = r.length; t-- && Ht.test(r.charAt(t)); )
917
946
  ;
918
947
  return t;
919
948
  }
920
- var Ht = /^\s+/;
949
+ var Dt = /^\s+/;
921
950
  function qt(r) {
922
- return r && r.slice(0, Dt(r) + 1).replace(Ht, "");
951
+ return r && r.slice(0, Pt(r) + 1).replace(Dt, "");
923
952
  }
924
- var y = J.Symbol, Q = Object.prototype, Wt = Q.hasOwnProperty, Ot = Q.toString, f = y ? y.toStringTag : void 0;
953
+ var y = J.Symbol, Q = Object.prototype, Ot = Q.hasOwnProperty, Wt = Q.toString, f = y ? y.toStringTag : void 0;
925
954
  function Nt(r) {
926
- var t = Wt.call(r, f), e = r[f];
955
+ var t = Ot.call(r, f), e = r[f];
927
956
  try {
928
957
  r[f] = void 0;
929
958
  var i = !0;
930
959
  } catch {
931
960
  }
932
- var o = Ot.call(r);
933
- return i && (t ? r[f] = e : delete r[f]), o;
961
+ var s = Wt.call(r);
962
+ return i && (t ? r[f] = e : delete r[f]), s;
934
963
  }
935
964
  var Xt = Object.prototype, Ft = Xt.toString;
936
- function _t(r) {
965
+ function Bt(r) {
937
966
  return Ft.call(r);
938
967
  }
939
- var Bt = "[object Null]", Gt = "[object Undefined]", O = y ? y.toStringTag : void 0;
940
- function Ut(r) {
941
- return r == null ? r === void 0 ? Gt : Bt : O && O in Object(r) ? Nt(r) : _t(r);
968
+ var Gt = "[object Null]", _t = "[object Undefined]", W = y ? y.toStringTag : void 0;
969
+ function Zt(r) {
970
+ return r == null ? r === void 0 ? _t : Gt : W && W in Object(r) ? Nt(r) : Bt(r);
942
971
  }
943
- function Kt(r) {
972
+ function Ut(r) {
944
973
  return r != null && typeof r == "object";
945
974
  }
946
- var Zt = "[object Symbol]";
975
+ var Kt = "[object Symbol]";
947
976
  function Jt(r) {
948
- return typeof r == "symbol" || Kt(r) && Ut(r) == Zt;
977
+ return typeof r == "symbol" || Ut(r) && Zt(r) == Kt;
949
978
  }
950
979
  var N = NaN, Qt = /^[-+]0x[0-9a-f]+$/i, Yt = /^0b[01]+$/i, Vt = /^0o[0-7]+$/i, te = parseInt;
951
980
  function X(r) {
@@ -964,44 +993,44 @@ function X(r) {
964
993
  return e || Vt.test(r) ? te(r.slice(2), e ? 2 : 8) : Qt.test(r) ? N : +r;
965
994
  }
966
995
  var ee = "Expected a function", ie = Math.max, re = Math.min;
967
- function oe(r, t, e) {
968
- var i, o, n, l, a, c, b = 0, M = !1, g = !1, A = !0;
996
+ function se(r, t, e) {
997
+ var i, s, n, l, a, c, b = 0, M = !1, g = !1, A = !0;
969
998
  if (typeof r != "function")
970
999
  throw new TypeError(ee);
971
1000
  t = X(t) || 0, k(e) && (M = !!e.leading, g = "maxWait" in e, n = g ? ie(X(e.maxWait) || 0, t) : n, A = "trailing" in e ? !!e.trailing : A);
972
- function $(s) {
973
- var u = i, v = o;
974
- return i = o = void 0, b = s, l = r.apply(v, u), l;
1001
+ function $(o) {
1002
+ var u = i, v = s;
1003
+ return i = s = void 0, b = o, l = r.apply(v, u), l;
975
1004
  }
976
- function V(s) {
977
- return b = s, a = setTimeout(x, t), M ? $(s) : l;
1005
+ function V(o) {
1006
+ return b = o, a = setTimeout(x, t), M ? $(o) : l;
978
1007
  }
979
- function tt(s) {
980
- var u = s - c, v = s - b, H = t - u;
981
- return g ? re(H, n - v) : H;
1008
+ function tt(o) {
1009
+ var u = o - c, v = o - b, D = t - u;
1010
+ return g ? re(D, n - v) : D;
982
1011
  }
983
- function P(s) {
984
- var u = s - c, v = s - b;
1012
+ function H(o) {
1013
+ var u = o - c, v = o - b;
985
1014
  return c === void 0 || u >= t || u < 0 || g && v >= n;
986
1015
  }
987
1016
  function x() {
988
- var s = z();
989
- if (P(s))
990
- return D(s);
991
- a = setTimeout(x, tt(s));
1017
+ var o = z();
1018
+ if (H(o))
1019
+ return P(o);
1020
+ a = setTimeout(x, tt(o));
992
1021
  }
993
- function D(s) {
994
- return a = void 0, A && i ? $(s) : (i = o = void 0, l);
1022
+ function P(o) {
1023
+ return a = void 0, A && i ? $(o) : (i = s = void 0, l);
995
1024
  }
996
1025
  function et() {
997
- a !== void 0 && clearTimeout(a), b = 0, i = c = o = a = void 0;
1026
+ a !== void 0 && clearTimeout(a), b = 0, i = c = s = a = void 0;
998
1027
  }
999
1028
  function it() {
1000
- return a === void 0 ? l : D(z());
1029
+ return a === void 0 ? l : P(z());
1001
1030
  }
1002
1031
  function S() {
1003
- var s = z(), u = P(s);
1004
- if (i = arguments, o = this, c = s, u) {
1032
+ var o = z(), u = H(o);
1033
+ if (i = arguments, s = this, c = o, u) {
1005
1034
  if (a === void 0)
1006
1035
  return V(c);
1007
1036
  if (g)
@@ -1011,15 +1040,15 @@ function oe(r, t, e) {
1011
1040
  }
1012
1041
  return S.cancel = et, S.flush = it, S;
1013
1042
  }
1014
- var se = "Expected a function";
1043
+ var oe = "Expected a function";
1015
1044
  function ae(r, t, e) {
1016
- var i = !0, o = !0;
1045
+ var i = !0, s = !0;
1017
1046
  if (typeof r != "function")
1018
- throw new TypeError(se);
1019
- return k(e) && (i = "leading" in e ? !!e.leading : i, o = "trailing" in e ? !!e.trailing : o), oe(r, t, {
1047
+ throw new TypeError(oe);
1048
+ return k(e) && (i = "leading" in e ? !!e.leading : i, s = "trailing" in e ? !!e.trailing : s), se(r, t, {
1020
1049
  leading: i,
1021
1050
  maxWait: t,
1022
- trailing: o
1051
+ trailing: s
1023
1052
  });
1024
1053
  }
1025
1054
  const I = new CSSStyleSheet();
@@ -1053,18 +1082,18 @@ class ce extends HTMLElement {
1053
1082
  </px-hstack>
1054
1083
  </px-vstack>`, this.onScroll = () => {
1055
1084
  const t = this.$carousel.scrollLeft, e = this.$carousel.scrollWidth, i = this.$carousel.clientWidth;
1056
- let o = 0;
1057
- window.innerWidth < 768 ? o = Math.round(
1085
+ let s = 0;
1086
+ window.innerWidth < 768 ? s = Math.round(
1058
1087
  t / (e - i) * (this.itemNumbers - 1)
1059
- ) : Math.ceil(t + i) + 10 >= e ? o = this.itemNumbers - 1 : o = Math.floor(t / this.$firstItem.offsetWidth + 1) - 1;
1060
- let n = o;
1061
- this.itemNumbers > 5 && (o > 2 && o < this.itemNumbers - 2 ? n = 2 : o === this.itemNumbers - 2 ? n = 3 : o === this.itemNumbers - 1 && (n = 4)), this.$appleseed.setAttribute("active", `${n}`), this.handleNextPrevious();
1088
+ ) : Math.ceil(t + i) + 10 >= e ? s = this.itemNumbers - 1 : s = Math.floor(t / this.$firstItem.offsetWidth + 1) - 1;
1089
+ let n = s;
1090
+ this.itemNumbers > 5 && (s > 2 && s < this.itemNumbers - 2 ? n = 2 : s === this.itemNumbers - 2 ? n = 3 : s === this.itemNumbers - 1 && (n = 4)), this.$appleseed.setAttribute("active", `${n}`), this.handleNextPrevious();
1062
1091
  }, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template, this.shadowRoot.adoptedStyleSheets = [
1063
1092
  I,
1064
1093
  lt(
1065
1094
  "gap",
1066
1095
  ne,
1067
- _,
1096
+ B,
1068
1097
  le
1069
1098
  )
1070
1099
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-carousel",
3
- "version": "2.0.0-alpha.1",
3
+ "version": "2.0.0-alpha.2",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",