@proximus/lavender-carousel 2.0.0-alpha.16 → 2.0.0-alpha.160

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.
@@ -1,15 +1,13 @@
1
- import { AttributeBreakpointHandlerDelegate } from '@proximus/lavender-common';
2
1
  import '@proximus/lavender-layout';
3
2
  import '@proximus/lavender-button-icon';
4
3
  import '@proximus/lavender-icon';
5
4
  import './AppleSeed.ts';
6
5
  import { type AppleSeed } from './AppleSeed.ts';
6
+ export declare const CAROUSEL_ITEM_CONNECTED_EVENT = "px-carousel-item-connected";
7
7
  export declare class Carousel extends HTMLElement {
8
- visibleItemsAttributeDelegate: AttributeBreakpointHandlerDelegate;
8
+ #private;
9
9
  template: string;
10
10
  constructor();
11
- static get observedAttributes(): string[];
12
- attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
13
11
  connectedCallback(): void;
14
12
  private onScroll;
15
13
  private handleNextPrevious;
@@ -26,4 +24,5 @@ export declare class Carousel extends HTMLElement {
26
24
  export declare class CarouselItem extends HTMLElement {
27
25
  template: string;
28
26
  constructor();
27
+ connectedCallback(): void;
29
28
  }
package/dist/index.es.js CHANGED
@@ -1,39 +1,43 @@
1
- var O = (r) => {
2
- throw TypeError(r);
1
+ var W = (s) => {
2
+ throw TypeError(s);
3
3
  };
4
- var N = (r, t, e) => t.has(r) || O("Cannot " + e);
5
- var d = (r, t, e) => (N(r, t, "read from private field"), e ? e.call(r) : t.get(r)), k = (r, t, e) => t.has(r) ? O("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), j = (r, t, e, i) => (N(r, t, "write to private field"), i ? i.call(r, e) : t.set(r, e), e);
6
- import { WithExtraAttributes as I, AttributeBreakpointHandlerDelegate as B, gapValues as G, checkName as st, log as x, backgroundColorValues as ot, PxElement as at, transferAccessibilityAttributes as nt, iconSizeValuesKC as lt, cssTokenBreakpoints as ct } from "@proximus/lavender-common";
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}}", ut = ':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))}}', Z = new CSSStyleSheet();
8
- Z.replaceSync(ut);
9
- const ht = [
4
+ var L = (s, t, e) => t.has(s) || W("Cannot " + e);
5
+ var p = (s, t, e) => (L(s, t, "read from private field"), e ? e.call(s) : t.get(s)), x = (s, t, e) => t.has(s) ? W("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, e), E = (s, t, e, i) => (L(s, t, "write to private field"), i ? i.call(s, e) : t.set(s, e), e), T = (s, t, e) => (L(s, t, "access private method"), e);
6
+ import { WithExtraAttributes as M, AttributeBreakpointHandlerDelegate as nt, gapValues as lt, checkName as ct, log as f, backgroundColorValues as pt, PxElement as dt, accessibilityAttributes as ut, iconSizeValuesKC as ht } from "@proximus/lavender-common";
7
+ const bt = ':host{display:block;--px-carousel-visible-items: 1;--px-carousel-gap-default: var(--px-spacing-default-desktop)}:host *{box-sizing:border-box}:host([visible-items="1"]){--px-carousel-visible-items: 1}:host([visible-items="2"]){--px-carousel-visible-items: 2}:host([visible-items="3"]){--px-carousel-visible-items: 3}:host([visible-items="4"]){--px-carousel-visible-items: 4}:host([visible-items="5"]){--px-carousel-visible-items: 5}:host([visible-items="6"]){--px-carousel-visible-items: 6}:host([visible-items="7"]){--px-carousel-visible-items: 7}:host([visible-items="8"]){--px-carousel-visible-items: 8}:host([visible-items="9"]){--px-carousel-visible-items: 9}:host([visible-items--mobile="1"]){--px-carousel-visible-items--mobile: 1}:host([visible-items--mobile="2"]){--px-carousel-visible-items--mobile: 2}:host([visible-items--mobile="3"]){--px-carousel-visible-items--mobile: 3}:host([visible-items--mobile="4"]){--px-carousel-visible-items--mobile: 4}:host([visible-items--mobile="5"]){--px-carousel-visible-items--mobile: 5}:host([visible-items--mobile="6"]){--px-carousel-visible-items--mobile: 6}:host([visible-items--mobile="7"]){--px-carousel-visible-items--mobile: 7}:host([visible-items--mobile="8"]){--px-carousel-visible-items--mobile: 8}:host([visible-items--mobile="9"]){--px-carousel-visible-items--mobile: 9}:host([visible-items--tablet="1"]){--px-carousel-visible-items--tablet: 1}:host([visible-items--tablet="2"]){--px-carousel-visible-items--tablet: 2}:host([visible-items--tablet="3"]){--px-carousel-visible-items--tablet: 3}:host([visible-items--tablet="4"]){--px-carousel-visible-items--tablet: 4}:host([visible-items--tablet="5"]){--px-carousel-visible-items--tablet: 5}:host([visible-items--tablet="6"]){--px-carousel-visible-items--tablet: 6}:host([visible-items--tablet="7"]){--px-carousel-visible-items--tablet: 7}:host([visible-items--tablet="8"]){--px-carousel-visible-items--tablet: 8}:host([visible-items--tablet="9"]){--px-carousel-visible-items--tablet: 9}:host([visible-items--laptop="1"]){--px-carousel-visible-items--laptop: 1}:host([visible-items--laptop="2"]){--px-carousel-visible-items--laptop: 2}:host([visible-items--laptop="3"]){--px-carousel-visible-items--laptop: 3}:host([visible-items--laptop="4"]){--px-carousel-visible-items--laptop: 4}:host([visible-items--laptop="5"]){--px-carousel-visible-items--laptop: 5}:host([visible-items--laptop="6"]){--px-carousel-visible-items--laptop: 6}:host([visible-items--laptop="7"]){--px-carousel-visible-items--laptop: 7}:host([visible-items--laptop="8"]){--px-carousel-visible-items--laptop: 8}:host([visible-items--laptop="9"]){--px-carousel-visible-items--laptop: 9}:host([visible-items--desktop="1"]){--px-carousel-visible-items--desktop: 1}:host([visible-items--desktop="2"]){--px-carousel-visible-items--desktop: 2}:host([visible-items--desktop="3"]){--px-carousel-visible-items--desktop: 3}:host([visible-items--desktop="4"]){--px-carousel-visible-items--desktop: 4}:host([visible-items--desktop="5"]){--px-carousel-visible-items--desktop: 5}:host([visible-items--desktop="6"]){--px-carousel-visible-items--desktop: 6}:host([visible-items--desktop="7"]){--px-carousel-visible-items--desktop: 7}:host([visible-items--desktop="8"]){--px-carousel-visible-items--desktop: 8}:host([visible-items--desktop="9"]){--px-carousel-visible-items--desktop: 9}:host([gap="default"]){--px-carousel-gap-default: var(--px-spacing-default-desktop)}:host([gap="s"]){--px-carousel-gap-default: var(--px-spacing-s-desktop)}:host([gap="xs"]){--px-carousel-gap-default: var(--px-spacing-xs-desktop)}:host([gap="2xs"]){--px-carousel-gap-default: var(--px-spacing-2xs-desktop)}:host([gap="l"]){--px-carousel-gap-default: var(--px-spacing-l-desktop)}:host([gap="none"]){--px-carousel-gap-default: 0}:host([gap--mobile="default"]){--px-carousel-gap-default--mobile: var(--px-spacing-default-mobile)}:host([gap--mobile="s"]){--px-carousel-gap-default--mobile: var(--px-spacing-s-mobile)}:host([gap--mobile="xs"]){--px-carousel-gap-default--mobile: var(--px-spacing-xs-mobile)}:host([gap--mobile="2xs"]){--px-carousel-gap-default--mobile: var(--px-spacing-2xs-mobile)}:host([gap--mobile="l"]){--px-carousel-gap-default--mobile: var(--px-spacing-l-mobile)}:host([gap--mobile="none"]){--px-carousel-gap-default--mobile: 0}:host([gap--tablet="default"]){--px-carousel-gap-default--tablet: var(--px-spacing-default-tablet)}:host([gap--tablet="s"]){--px-carousel-gap-default--tablet: var(--px-spacing-s-tablet)}:host([gap--tablet="xs"]){--px-carousel-gap-default--tablet: var(--px-spacing-xs-tablet)}:host([gap--tablet="2xs"]){--px-carousel-gap-default--tablet: var(--px-spacing-2xs-tablet)}:host([gap--tablet="l"]){--px-carousel-gap-default--tablet: var(--px-spacing-l-tablet)}:host([gap--tablet="none"]){--px-carousel-gap-default--tablet: 0}:host([gap--laptop="default"]){--px-carousel-gap-default--laptop: var(--px-spacing-default-laptop)}:host([gap--laptop="s"]){--px-carousel-gap-default--laptop: var(--px-spacing-s-laptop)}:host([gap--laptop="xs"]){--px-carousel-gap-default--laptop: var(--px-spacing-xs-laptop)}:host([gap--laptop="2xs"]){--px-carousel-gap-default--laptop: var(--px-spacing-2xs-laptop)}:host([gap--laptop="l"]){--px-carousel-gap-default--laptop: var(--px-spacing-l-laptop)}:host([gap--laptop="none"]){--px-carousel-gap-default--laptop: 0}:host([gap--desktop="default"]){--px-carousel-gap-default--desktop: var(--px-spacing-default-desktop)}:host([gap--desktop="s"]){--px-carousel-gap-default--desktop: var(--px-spacing-s-desktop)}:host([gap--desktop="xs"]){--px-carousel-gap-default--desktop: var(--px-spacing-xs-desktop)}:host([gap--desktop="2xs"]){--px-carousel-gap-default--desktop: var(--px-spacing-2xs-desktop)}:host([gap--desktop="l"]){--px-carousel-gap-default--desktop: var(--px-spacing-l-desktop)}:host([gap--desktop="none"]){--px-carousel-gap-default--desktop: 0}.carousel{overflow:hidden;display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;gap:var(--px-carousel-gap-default--desktop, var(--px-carousel-gap-default))}@media screen and (max-width: 48rem){.carousel{gap:var(--px-carousel-gap-default--mobile, var(--px-carousel-gap-default))}}@media screen and (min-width: 48.0625rem) and (max-width: 64rem){.carousel{gap:var(--px-carousel-gap-default--tablet, var(--px-carousel-gap-default))}}@media screen and (min-width: 64.0625rem) and (max-width: 90rem){.carousel{gap:var(--px-carousel-gap-default--laptop, var(--px-carousel-gap-default))}}#appleseed-container{margin-inline:var(--px-spacing-s-mobile)}@media screen and (max-width: 48rem){#button-icons{display:none}}.carousel::-webkit-scrollbar{display:none}', gt = "::slotted(*){border-radius:var(--px-radius-main);height:100%}.carousel-item{height:100%}:host{scroll-snap-align:start;align-items:center;justify-content:center;border-radius:var(--px-radius-main);background:#fff;overflow:hidden;--visible-items: var( --px-carousel-visible-items--desktop, var(--px-carousel-visible-items, 1) );--spacing: var( --px-carousel-gap-default--desktop, var(--px-carousel-gap-default, var(--px-spacing-s-desktop)) );min-width:calc((100% - max(var(--visible-items),2) * var(--spacing)) / var(--visible-items) - 64px / max(var(--visible-items),2))}@media screen and (max-width: 48rem){:host{--visible-items: var( --px-carousel-visible-items--mobile, var(--px-carousel-visible-items, 1) );--spacing: var( --px-carousel-gap-default--mobile, var(--px-carousel-gap-default, var(--px-spacing-s-mobile)) )}}@media screen and (min-width: 48.0625rem) and (max-width: 64rem){:host{--visible-items: var( --px-carousel-visible-items--tablet, var(--px-carousel-visible-items, 1) );--spacing: var( --px-carousel-gap-default--tablet, var(--px-carousel-gap-default, var(--px-spacing-s-desktop)) )}}@media screen and (min-width: 64.0625rem) and (max-width: 90rem){:host{--visible-items: var( --px-carousel-visible-items--laptop, var(--px-carousel-visible-items, 1) );--spacing: var( --px-carousel-gap-default--laptop, var(--px-carousel-gap-default, var(--px-spacing-s-desktop)) )}}@media screen and (max-width: 48rem){: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: 48rem) and (max-width: 64rem){:host{flex:1 0 var( --px-carousel-min-width-tablet, var(--px-carousel-min-width-all-tablet) )!important}}", vt = ':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 screen and (max-width: 47.938rem){.flex-container{overflow-x:var(--overflow-x-all-mobile, var(--overflow-x-all));scrollbar-width:none}.flex-container::-webkit-scrollbar{display:none}}@media screen and (min-width: 48rem){.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 screen and (min-width: 48rem) and (max-width: 64rem){.flex-container{overflow-x:var(--overflow-x-all-tablet, var(--overflow-x-all));scrollbar-width:none}.flex-container::-webkit-scrollbar{display:none}}@media screen and (min-width: 64.0625rem){.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 screen and (min-width: 64.0625rem) and (max-width: 90rem){.flex-container{overflow-x:var(--overflow-x-all-laptop, var(--overflow-x-all))}}@media screen and (min-width: 90.0625rem){.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))}}', B = new CSSStyleSheet();
8
+ B.replaceSync(vt);
9
+ const xt = [
10
10
  "",
11
11
  "default",
12
12
  "row",
13
13
  "row-reverse",
14
14
  "column",
15
15
  "column-reverse"
16
- ], bt = [
16
+ ], mt = [
17
17
  "",
18
18
  "default",
19
19
  "stretch",
20
20
  "flex-start",
21
+ "start",
21
22
  "flex-end",
23
+ "end",
22
24
  "center",
23
25
  "baseline"
24
- ], gt = [
26
+ ], ft = [
25
27
  "",
26
28
  "default",
27
29
  "flex-start",
30
+ "start",
28
31
  "flex-end",
32
+ "end",
29
33
  "center",
30
34
  "space-between",
31
35
  "space-around",
32
36
  "space-evenly"
33
- ], vt = ["", "default", "nowrap", "wrap", "wrap-reverse"], ft = ["", "visible", "hidden", "scroll", "auto"];
34
- class R extends I {
37
+ ], kt = ["", "default", "nowrap", "wrap", "wrap-reverse"], wt = ["", "visible", "hidden", "scroll", "auto"];
38
+ class P extends M {
35
39
  constructor() {
36
- super(Z), this.overflowXAttributeDelegate = new B(
40
+ super(B), this.overflowXAttributeDelegate = new nt(
37
41
  this,
38
42
  "overflow-x",
39
43
  (t) => t,
@@ -87,7 +91,7 @@ class R extends I {
87
91
  case "gap--tablet":
88
92
  case "gap--laptop":
89
93
  case "gap--desktop":
90
- this.updateFlexProperties(t, e, i, G);
94
+ this.updateFlexProperties(t, e, i, lt);
91
95
  break;
92
96
  case "justify-content":
93
97
  case "justify-content--mobile":
@@ -98,7 +102,7 @@ class R extends I {
98
102
  t,
99
103
  e,
100
104
  i,
101
- gt
105
+ ft
102
106
  );
103
107
  break;
104
108
  case "align-items":
@@ -106,38 +110,38 @@ class R extends I {
106
110
  case "align-items--tablet":
107
111
  case "align-items--laptop":
108
112
  case "align-items--desktop":
109
- this.updateFlexProperties(t, e, i, bt);
113
+ this.updateFlexProperties(t, e, i, mt);
110
114
  break;
111
115
  case "wrap":
112
116
  case "wrap--mobile":
113
117
  case "wrap--tablet":
114
118
  case "wrap--laptop":
115
119
  case "wrap--desktop":
116
- this.updateFlexProperties(t, e, i, vt);
120
+ this.updateFlexProperties(t, e, i, kt);
117
121
  break;
118
122
  case "direction":
119
123
  case "direction--mobile":
120
124
  case "direction--tablet":
121
125
  case "direction--laptop":
122
126
  case "direction--desktop":
123
- this.updateFlexProperties(t, e, i, ht);
127
+ this.updateFlexProperties(t, e, i, xt);
124
128
  break;
125
129
  case "overflow-x":
126
130
  case "overflow-x--mobile":
127
131
  case "overflow-x--tablet":
128
132
  case "overflow-x--laptop":
129
133
  case "overflow-x--desktop":
130
- this.updateOverflowX(t, e, i, ft);
134
+ this.updateOverflowX(t, e, i, wt);
131
135
  break;
132
136
  default:
133
137
  super.attributeChangedCallback(t, e, i);
134
138
  break;
135
139
  }
136
140
  }
137
- updateOverflowX(t, e, i, s) {
138
- if (!st(s, i)) {
139
- x(
140
- `${i} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
141
+ updateOverflowX(t, e, i, a) {
142
+ if (!ct(a, i)) {
143
+ f(
144
+ `"${i}" is not a valid ${t} value for ${this.tagName.toLowerCase()}. Allowed values are: "${a.join('", "')}".`
141
145
  );
142
146
  return;
143
147
  }
@@ -147,25 +151,28 @@ class R extends I {
147
151
  i
148
152
  );
149
153
  }
150
- updateFlexProperties(t, e, i, s) {
151
- this.checkName(s, i) || x(
152
- `${i} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
154
+ updateFlexProperties(t, e, i, a) {
155
+ this.checkName(a, i) || f(
156
+ `"${i}" is not a valid ${t} value for ${this.tagName.toLowerCase()}. Allowed values are: "${a.join('", "')}".`
153
157
  );
154
- const n = t.indexOf("--") > -1, l = n ? t.split("--")[0] : t, a = [];
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) => {
157
- this.updateStyle(l, c, e, s), this.updateStyle(l, c, i, s);
158
+ const r = t.indexOf("--") > -1, o = r ? t.split("--")[0] : t, l = [];
159
+ if (!r)
160
+ this.getAttribute(o + "--mobile") || l.push("mobile"), this.getAttribute(o + "--tablet") || l.push("tablet"), this.getAttribute(o + "--laptop") || l.push("laptop"), this.getAttribute(o + "--desktop") || l.push("desktop"), l.forEach((c) => {
161
+ this.updateStyle(o, c, e, a), this.updateStyle(o, c, i, a);
158
162
  });
159
163
  else {
160
164
  const c = t.split("--")[1];
161
- this.updateStyle(l, c, e, s), this.updateStyle(l, c, i, s);
165
+ this.updateStyle(o, c, e, a), this.updateStyle(o, c, i, a);
162
166
  }
163
167
  }
164
- updateStyle(t, e, i, s) {
165
- i && (t === "gap" && s && s.includes(i) ? this.$el.style.setProperty(
168
+ updateStyle(t, e, i, a) {
169
+ i && (t === "gap" && a && a.includes(i) ? (this.$el.style.setProperty(
166
170
  `--flex-${t}--${e}-value`,
167
171
  `var(--px-spacing-${i}-${e === "laptop" ? "desktop" : e})`
168
- ) : this.$el.style.setProperty(
172
+ ), this.style.setProperty(
173
+ `--host-gap--${e}`,
174
+ `var(--px-spacing-${i}-${e === "laptop" ? "desktop" : e})`
175
+ )) : this.$el.style.setProperty(
169
176
  `--flex-${t}--${e}-value`,
170
177
  i
171
178
  ));
@@ -354,8 +361,8 @@ class R extends I {
354
361
  return this.shadowRoot.querySelector(".flex-container");
355
362
  }
356
363
  }
357
- customElements.get("px-stack") || customElements.define("px-stack", R);
358
- class xt extends R {
364
+ customElements.get("px-stack") || customElements.define("px-stack", P);
365
+ class yt extends P {
359
366
  constructor() {
360
367
  super();
361
368
  }
@@ -363,8 +370,8 @@ class xt extends R {
363
370
  super.connectedCallback(), this.direction = "column", this.directionMobile = "column", this.directionTablet = "column", this.directionLaptop = "column", this.directionDesktop = "column";
364
371
  }
365
372
  }
366
- customElements.get("px-vstack") || customElements.define("px-vstack", xt);
367
- class mt extends R {
373
+ customElements.get("px-vstack") || customElements.define("px-vstack", yt);
374
+ class At extends P {
368
375
  constructor() {
369
376
  super();
370
377
  }
@@ -372,8 +379,8 @@ class mt extends R {
372
379
  super.connectedCallback(), this.direction = "row", this.directionMobile = "row", this.directionTablet = "row", this.directionLaptop = "row", this.directionDesktop = "row";
373
380
  }
374
381
  }
375
- customElements.get("px-hstack") || customElements.define("px-hstack", mt);
376
- class kt extends HTMLElement {
382
+ customElements.get("px-hstack") || customElements.define("px-hstack", At);
383
+ class $t extends HTMLElement {
377
384
  constructor() {
378
385
  super(), this.isZeroSized = !1, this.growValue = "1", this.isVertical = !1;
379
386
  }
@@ -420,12 +427,12 @@ class kt extends HTMLElement {
420
427
  t ? this.setAttribute("nogap", "") : this.removeAttribute("nogap");
421
428
  }
422
429
  }
423
- customElements.get("px-spacer") || customElements.define("px-spacer", kt);
424
- const yt = ":host{display:block;box-sizing:border-box}slot[name=body-container]{min-height:100vh}#image-sticky-box{margin-top:-2.5em}", _ = new CSSStyleSheet();
425
- _.replaceSync(yt);
426
- class wt extends I {
430
+ customElements.get("px-spacer") || customElements.define("px-spacer", $t);
431
+ const St = ":host{display:block;box-sizing:border-box}slot[name=body-container]{min-height:100vh}#image-sticky-box{margin-top:-2.5rem}", U = new CSSStyleSheet();
432
+ U.replaceSync(St);
433
+ class Ct extends M {
427
434
  constructor() {
428
- super(_), this.template = (t) => `
435
+ super(U), this.template = (t) => `
429
436
  <px-container border-radius="none" padding="none">
430
437
  <px-vstack>
431
438
  <px-container id="header-container" border-radius="none">
@@ -602,7 +609,7 @@ class wt extends I {
602
609
  case "background-color":
603
610
  this.$bodyContainer.setAttribute(
604
611
  "background-color",
605
- ot.indexOf(i) > 0 ? i : "none"
612
+ pt.indexOf(i) > 0 ? i : "none"
606
613
  );
607
614
  break;
608
615
  case "padding-vertical":
@@ -622,23 +629,24 @@ class wt extends I {
622
629
  this.$headerContainer.paddingLeft = t, this.$headerContainer.paddingRight = t, this.$bodyContainer.paddingLeft = t, this.$bodyContainer.paddingRight = t, this.$contactContainer.paddingLeft = t, this.$contactContainer.paddingRight = t, this.$footerContainer.paddingLeft = t, this.$footerContainer.paddingRight = t, this.$imageContainer.paddingLeft = t, this.$imageContainer.paddingRight = t;
623
630
  }
624
631
  }
625
- customElements.get("px-page") === void 0 && customElements.define("px-page", wt);
626
- const At = ".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();
627
- U.replaceSync(At);
628
- const $t = ["", "default", "small"], St = [
632
+ customElements.get("px-page") === void 0 && customElements.define("px-page", Ct);
633
+ const zt = ".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 screen and (min-width: 48rem){.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 screen and (min-width: 64.0625rem){.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)}}", K = new CSSStyleSheet();
634
+ K.replaceSync(zt);
635
+ const X = ["", "default", "small"], F = [
629
636
  "",
630
637
  "default",
631
638
  "secondary",
632
639
  "naked"
633
- ], A = class A extends at {
640
+ ], $ = class $ extends dt {
634
641
  constructor() {
635
- super(U), this.template = () => "<slot></slot>";
636
- const t = document.createElement(A.nativeName);
642
+ super(K), this.template = () => "<slot></slot>";
643
+ const t = document.createElement($.nativeName);
637
644
  t.classList.add("btn-icon"), t.innerHTML = this.template(), this.shadowRoot.appendChild(t);
638
645
  }
639
646
  static get observedAttributes() {
640
647
  return [
641
648
  ...super.observedAttributes,
649
+ ...ut,
642
650
  "inverted",
643
651
  "loading",
644
652
  "size",
@@ -654,7 +662,6 @@ const $t = ["", "default", "small"], St = [
654
662
  this.$el.focus();
655
663
  }), e || t.setAttribute("size", "s"), this.size === "small" && t.setAttribute("size", "xs"), i || t.setAttribute("color", "inherit");
656
664
  }
657
- nt(this, this.$el, !1);
658
665
  }
659
666
  attributeChangedCallback(t, e, i) {
660
667
  if (e !== i)
@@ -683,13 +690,13 @@ const $t = ["", "default", "small"], St = [
683
690
  this.$el.classList.toggle("btn-icon--state-loading");
684
691
  }
685
692
  updateSize(t, e) {
686
- this.checkName($t, e) ? (t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`btn-icon--size-${t}`), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`btn-icon--size-${e}`)) : x(
687
- `${e} is not a valid size value for ${this.tagName.toLowerCase()}`
693
+ this.checkName(X, e) ? (t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`btn-icon--size-${t}`), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`btn-icon--size-${e}`)) : f(
694
+ `"${e}" is not a valid size value for ${this.tagName.toLowerCase()}. Allowed values are: "${X.join('", "')}".`
688
695
  );
689
696
  }
690
697
  updateVariant(t, e) {
691
- this.checkName(St, e) ? (t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`btn-icon--variant-${t}`), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`btn-icon--variant-${e}`)) : x(
692
- `${e} is not a valid variant value for ${this.tagName.toLowerCase()}`
698
+ this.checkName(F, e) ? (t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`btn-icon--variant-${t}`), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`btn-icon--variant-${e}`)) : f(
699
+ `"${e}" is not a valid variant value for ${this.tagName.toLowerCase()}. Allowed values are: "${F.join('", "')}".`
693
700
  );
694
701
  }
695
702
  get inverted() {
@@ -723,10 +730,10 @@ const $t = ["", "default", "small"], St = [
723
730
  t ? this.setAttribute("aria-expanded", t) : this.removeAttribute("aria-expanded");
724
731
  }
725
732
  };
726
- A.nativeName = "button";
727
- let E = A;
728
- customElements.get("px-button-icon") || customElements.define("px-button-icon", E);
729
- class Ct extends HTMLElement {
733
+ $.nativeName = "button";
734
+ let I = $;
735
+ customElements.get("px-button-icon") || customElements.define("px-button-icon", I);
736
+ class jt extends HTMLElement {
730
737
  constructor() {
731
738
  super();
732
739
  }
@@ -759,8 +766,8 @@ class Ct extends HTMLElement {
759
766
  t && t.remove();
760
767
  }
761
768
  }
762
- customElements.get("px-icon-set") || customElements.define("px-icon-set", Ct);
763
- const zt = [
769
+ customElements.get("px-icon-set") || customElements.define("px-icon-set", jt);
770
+ const Lt = [
764
771
  "Brand",
765
772
  "Accent",
766
773
  "Neutral",
@@ -773,80 +780,82 @@ const zt = [
773
780
  "StateHover",
774
781
  "StateActive",
775
782
  "StateDisabled"
776
- ], jt = ["Inherit", ...zt].map(
777
- (r) => r.replace(/([A-Z])/g, "-$1").toLowerCase().slice(1)
778
- ), 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();
779
- K.replaceSync(Lt);
780
- const Tt = [
781
- "name",
782
- "size",
783
- "color",
784
- "aria-label",
785
- "inverted",
786
- "from",
787
- "disabled"
788
- ];
789
- var h, p, $;
790
- class Et extends I {
783
+ ], Et = ["Inherit", ...Lt].map(
784
+ (s) => s.replace(/([A-Z])/g, "-$1").toLowerCase().slice(1)
785
+ ), Tt = ":host{display:inline-flex;flex-direction:column;justify-content:center}svg{font-size:var(--px-size-icon-s);line-height:1;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)}", J = new CSSStyleSheet();
786
+ J.replaceSync(Tt);
787
+ var h, d, S;
788
+ class Rt extends M {
791
789
  constructor(...e) {
792
790
  var i;
793
- super(...e, K);
794
- k(this, h);
795
- k(this, p);
796
- k(this, $, () => `<svg aria-hidden="true">
797
- <use xlink:href="#icon-${this.name}"></use>
791
+ super(...e, J);
792
+ x(this, h);
793
+ x(this, d);
794
+ x(this, S, () => `<svg aria-hidden="true">
795
+ <use></use>
798
796
  </svg>`);
799
- this.shadowRoot.innerHTML = d(this, $).call(this), this.role = "img", j(this, p, (i = this.attachInternals) == null ? void 0 : i.call(this)), d(this, p) && (d(this, p).role = "img");
797
+ this.shadowRoot.innerHTML = p(this, S).call(this), E(this, d, (i = this.attachInternals) == null ? void 0 : i.call(this)), p(this, d) && (p(this, d).role = "img");
800
798
  }
801
799
  static get observedAttributes() {
802
- return [...super.observedAttributes, ...Tt];
800
+ return [
801
+ ...super.observedAttributes,
802
+ "name",
803
+ "size",
804
+ "color",
805
+ "aria-label",
806
+ "inverted",
807
+ "from",
808
+ "disabled"
809
+ ];
803
810
  }
804
- attributeChangedCallback(e, i, s) {
805
- if (i !== s)
811
+ attributeChangedCallback(e, i, a) {
812
+ if (i !== a)
806
813
  switch (e) {
807
814
  case "name":
808
- this.updateName(i, s);
815
+ this.updateName(i, a);
809
816
  break;
810
817
  case "size":
811
- this.updateAttribute(e, i, s, lt);
818
+ this.updateAttribute(e, i, a, ht);
812
819
  break;
813
820
  case "color":
814
- this.updateAttribute(e, i, s, jt);
821
+ this.updateAttribute(e, i, a, Et);
815
822
  break;
816
823
  case "disabled":
817
824
  this.color = "state-disabled";
818
825
  break;
819
826
  case "aria-label":
820
- if (!d(this, p))
827
+ if (!p(this, d))
821
828
  return;
822
- s ? (d(this, p).ariaHidden = "false", this.ariaHidden = "false") : (d(this, p).ariaHidden = "true", this.ariaHidden = "true");
829
+ a ? (p(this, d).ariaHidden = "false", this.ariaHidden = "false") : (p(this, d).ariaHidden = "true", this.ariaHidden = "true");
823
830
  break;
824
831
  }
825
832
  }
826
833
  connectedCallback() {
834
+ var i;
835
+ this.role = "img";
827
836
  const e = document.querySelectorAll("px-icon-set");
828
837
  e || console.log("<px-icon-set> component not found");
829
- for (const i of e) {
830
- if (!i.getAttribute("name") || !i.getAttribute("src")) {
838
+ for (const a of e) {
839
+ if (!a.getAttribute("name") || !a.getAttribute("src")) {
831
840
  console.error("Icon name or src not found");
832
841
  continue;
833
842
  }
834
- i.getAttribute("name") === this.from && i.getAttribute("type") !== "font" && (j(this, h, i.getAttribute("src")), this.$el.firstElementChild.setAttribute(
835
- "xlink:href",
836
- `${d(this, h)}#icon-${this.name}`
843
+ a.getAttribute("name") === this.from && a.getAttribute("type") !== "font" && (E(this, h, a.getAttribute("src")), this.$el.firstElementChild.setAttribute(
844
+ "href",
845
+ `${p(this, h)}#icon-${this.name}`
837
846
  ));
838
847
  }
839
- !this.ariaLabel && d(this, p) && (d(this, p).ariaHidden = "true", this.ariaHidden = "true");
848
+ !this.ariaLabel && p(this, d) && (p(this, d).ariaHidden = "true", this.ariaHidden = "true"), ((i = this.parentElement) == null ? void 0 : i.localName) === "px-a" && this.slot !== "before" && this.slot !== "after" && (this.color || this.setAttribute("color", "inherit"));
840
849
  }
841
- updateAttribute(e, i, s, n) {
842
- 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) || x(
843
- `${s} is not an allowed ${e} value for ${this.tagName.toLowerCase()}`
850
+ updateAttribute(e, i, a, r) {
851
+ i !== null && i !== "" && (e === "size" ? this.$el.classList.toggle(`${e}-${i}`) : this.$el.classList.toggle(i)), a !== null && a !== "" && (e === "size" ? this.$el.classList.toggle(`${e}-${a}`) : this.$el.classList.toggle(a)), this.checkName(r, a) || f(
852
+ `${a} is not an allowed ${e} value for ${this.tagName.toLowerCase()}`
844
853
  );
845
854
  }
846
855
  updateName(e, i) {
847
- d(this, h) && this.$el.firstElementChild.setAttribute(
848
- "xlink:href",
849
- `${d(this, h)}#icon-${i}`
856
+ p(this, h) && this.$el.firstElementChild.setAttribute(
857
+ "href",
858
+ `${p(this, h)}#icon-${i}`
850
859
  );
851
860
  }
852
861
  get $el() {
@@ -895,20 +904,20 @@ class Et extends I {
895
904
  this.setAttribute("disabled", e);
896
905
  }
897
906
  }
898
- h = new WeakMap(), p = new WeakMap(), $ = new WeakMap();
899
- customElements.get("px-icon") || customElements.define("px-icon", Et);
900
- 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();
901
- J.replaceSync(It);
902
- class Rt extends HTMLElement {
907
+ h = new WeakMap(), d = new WeakMap(), S = new WeakMap();
908
+ customElements.get("px-icon") || customElements.define("px-icon", Rt);
909
+ 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 screen and (max-width: 47.938rem){.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)}", Q = new CSSStyleSheet();
910
+ Q.replaceSync(It);
911
+ class Ht extends HTMLElement {
903
912
  constructor() {
904
913
  super(), this.template = (t, e) => `<div class="container">
905
914
  ${Array.from(
906
915
  { length: Math.min(t, 5) },
907
- (i, s) => `<div id="seed-${s}" ${e === s ? "active" : ""} class="appleseed ${t > 5 ? "appleseed-6-plus" : "appleseed-6-minus"}">
916
+ (i, a) => `<div id="seed-${a}" ${e === a ? "active" : ""} class="appleseed ${t > 5 ? "appleseed-6-plus" : "appleseed-6-minus"}">
908
917
  <div></div>
909
918
  </div>`
910
919
  ).join("")}
911
- </div>`, this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [J], this.shadowRoot.innerHTML = this.template(this.amount, this.active);
920
+ </div>`, this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [Q], this.shadowRoot.innerHTML = this.template(this.amount, this.active);
912
921
  }
913
922
  static get observedAttributes() {
914
923
  return ["amount", "active"];
@@ -941,135 +950,133 @@ class Rt extends HTMLElement {
941
950
  return parseInt(this.getAttribute("active")) || 0;
942
951
  }
943
952
  }
944
- customElements.get("px-appleseed") || customElements.define("px-appleseed", Rt);
945
- function y(r) {
946
- var t = typeof r;
947
- return r != null && (t == "object" || t == "function");
953
+ customElements.get("px-appleseed") || customElements.define("px-appleseed", Ht);
954
+ function y(s) {
955
+ var t = typeof s;
956
+ return s != null && (t == "object" || t == "function");
948
957
  }
949
- 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() {
950
- return Q.Date.now();
951
- }, Pt = /\s/;
952
- function Dt(r) {
953
- for (var t = r.length; t-- && Pt.test(r.charAt(t)); )
958
+ var Mt = typeof global == "object" && global && global.Object === Object && global, Pt = typeof self == "object" && self && self.Object === Object && self, Y = Mt || Pt || Function("return this")(), R = function() {
959
+ return Y.Date.now();
960
+ }, Ot = /\s/;
961
+ function Nt(s) {
962
+ for (var t = s.length; t-- && Ot.test(s.charAt(t)); )
954
963
  ;
955
964
  return t;
956
965
  }
957
966
  var qt = /^\s+/;
958
- function Ot(r) {
959
- return r && r.slice(0, Dt(r) + 1).replace(qt, "");
967
+ function Dt(s) {
968
+ return s && s.slice(0, Nt(s) + 1).replace(qt, "");
960
969
  }
961
- var w = Q.Symbol, Y = Object.prototype, Nt = Y.hasOwnProperty, Wt = Y.toString, f = w ? w.toStringTag : void 0;
962
- function Xt(r) {
963
- var t = Nt.call(r, f), e = r[f];
970
+ var A = Y.Symbol, V = Object.prototype, Wt = V.hasOwnProperty, Xt = V.toString, m = A ? A.toStringTag : void 0;
971
+ function Ft(s) {
972
+ var t = Wt.call(s, m), e = s[m];
964
973
  try {
965
- r[f] = void 0;
974
+ s[m] = void 0;
966
975
  var i = !0;
967
976
  } catch {
968
977
  }
969
- var s = Wt.call(r);
970
- return i && (t ? r[f] = e : delete r[f]), s;
978
+ var a = Xt.call(s);
979
+ return i && (t ? s[m] = e : delete s[m]), a;
971
980
  }
972
- var Ft = Object.prototype, Bt = Ft.toString;
973
- function Gt(r) {
974
- return Bt.call(r);
981
+ var _t = Object.prototype, Gt = _t.toString;
982
+ function Zt(s) {
983
+ return Gt.call(s);
975
984
  }
976
- var Zt = "[object Null]", _t = "[object Undefined]", W = w ? w.toStringTag : void 0;
977
- function Ut(r) {
978
- return r == null ? r === void 0 ? _t : Zt : W && W in Object(r) ? Xt(r) : Gt(r);
985
+ var Bt = "[object Null]", Ut = "[object Undefined]", _ = A ? A.toStringTag : void 0;
986
+ function Kt(s) {
987
+ return s == null ? s === void 0 ? Ut : Bt : _ && _ in Object(s) ? Ft(s) : Zt(s);
979
988
  }
980
- function Kt(r) {
981
- return r != null && typeof r == "object";
989
+ function Jt(s) {
990
+ return s != null && typeof s == "object";
982
991
  }
983
- var Jt = "[object Symbol]";
984
- function Qt(r) {
985
- return typeof r == "symbol" || Kt(r) && Ut(r) == Jt;
992
+ var Qt = "[object Symbol]";
993
+ function Yt(s) {
994
+ return typeof s == "symbol" || Jt(s) && Kt(s) == Qt;
986
995
  }
987
- var X = NaN, Yt = /^[-+]0x[0-9a-f]+$/i, Vt = /^0b[01]+$/i, te = /^0o[0-7]+$/i, ee = parseInt;
988
- function F(r) {
989
- if (typeof r == "number")
990
- return r;
991
- if (Qt(r))
992
- return X;
993
- if (y(r)) {
994
- var t = typeof r.valueOf == "function" ? r.valueOf() : r;
995
- r = y(t) ? t + "" : t;
996
- }
997
- if (typeof r != "string")
998
- return r === 0 ? r : +r;
999
- r = Ot(r);
1000
- var e = Vt.test(r);
1001
- return e || te.test(r) ? ee(r.slice(2), e ? 2 : 8) : Yt.test(r) ? X : +r;
996
+ var G = NaN, Vt = /^[-+]0x[0-9a-f]+$/i, te = /^0b[01]+$/i, ee = /^0o[0-7]+$/i, ie = parseInt;
997
+ function Z(s) {
998
+ if (typeof s == "number")
999
+ return s;
1000
+ if (Yt(s))
1001
+ return G;
1002
+ if (y(s)) {
1003
+ var t = typeof s.valueOf == "function" ? s.valueOf() : s;
1004
+ s = y(t) ? t + "" : t;
1005
+ }
1006
+ if (typeof s != "string")
1007
+ return s === 0 ? s : +s;
1008
+ s = Dt(s);
1009
+ var e = te.test(s);
1010
+ return e || ee.test(s) ? ie(s.slice(2), e ? 2 : 8) : Vt.test(s) ? G : +s;
1002
1011
  }
1003
- var ie = "Expected a function", re = Math.max, se = Math.min;
1004
- function oe(r, t, e) {
1005
- var i, s, n, l, a, c, b = 0, H = !1, g = !1, S = !0;
1006
- if (typeof r != "function")
1007
- throw new TypeError(ie);
1008
- t = F(t) || 0, y(e) && (H = !!e.leading, g = "maxWait" in e, n = g ? re(F(e.maxWait) || 0, t) : n, S = "trailing" in e ? !!e.trailing : S);
1009
- function C(o) {
1010
- var u = i, v = s;
1011
- return i = s = void 0, b = o, l = r.apply(v, u), l;
1012
- }
1013
- function tt(o) {
1014
- return b = o, a = setTimeout(m, t), H ? C(o) : l;
1015
- }
1016
- function et(o) {
1017
- var u = o - c, v = o - b, q = t - u;
1018
- return g ? se(q, n - v) : q;
1019
- }
1020
- function P(o) {
1021
- var u = o - c, v = o - b;
1022
- return c === void 0 || u >= t || u < 0 || g && v >= n;
1023
- }
1024
- function m() {
1025
- var o = L();
1026
- if (P(o))
1027
- return D(o);
1028
- a = setTimeout(m, et(o));
1029
- }
1030
- function D(o) {
1031
- return a = void 0, S && i ? C(o) : (i = s = void 0, l);
1032
- }
1033
- function it() {
1034
- a !== void 0 && clearTimeout(a), b = 0, i = c = s = a = void 0;
1012
+ var se = "Expected a function", ae = Math.max, oe = Math.min;
1013
+ function re(s, t, e) {
1014
+ var i, a, r, o, l, c, b = 0, O = !1, g = !1, C = !0;
1015
+ if (typeof s != "function")
1016
+ throw new TypeError(se);
1017
+ t = Z(t) || 0, y(e) && (O = !!e.leading, g = "maxWait" in e, r = g ? ae(Z(e.maxWait) || 0, t) : r, C = "trailing" in e ? !!e.trailing : C);
1018
+ function z(n) {
1019
+ var u = i, v = a;
1020
+ return i = a = void 0, b = n, o = s.apply(v, u), o;
1021
+ }
1022
+ function st(n) {
1023
+ return b = n, l = setTimeout(w, t), O ? z(n) : o;
1024
+ }
1025
+ function at(n) {
1026
+ var u = n - c, v = n - b, D = t - u;
1027
+ return g ? oe(D, r - v) : D;
1028
+ }
1029
+ function N(n) {
1030
+ var u = n - c, v = n - b;
1031
+ return c === void 0 || u >= t || u < 0 || g && v >= r;
1032
+ }
1033
+ function w() {
1034
+ var n = R();
1035
+ if (N(n))
1036
+ return q(n);
1037
+ l = setTimeout(w, at(n));
1038
+ }
1039
+ function q(n) {
1040
+ return l = void 0, C && i ? z(n) : (i = a = void 0, o);
1041
+ }
1042
+ function ot() {
1043
+ l !== void 0 && clearTimeout(l), b = 0, i = c = a = l = void 0;
1035
1044
  }
1036
1045
  function rt() {
1037
- return a === void 0 ? l : D(L());
1046
+ return l === void 0 ? o : q(R());
1038
1047
  }
1039
- function z() {
1040
- var o = L(), u = P(o);
1041
- if (i = arguments, s = this, c = o, u) {
1042
- if (a === void 0)
1043
- return tt(c);
1048
+ function j() {
1049
+ var n = R(), u = N(n);
1050
+ if (i = arguments, a = this, c = n, u) {
1051
+ if (l === void 0)
1052
+ return st(c);
1044
1053
  if (g)
1045
- return clearTimeout(a), a = setTimeout(m, t), C(c);
1054
+ return clearTimeout(l), l = setTimeout(w, t), z(c);
1046
1055
  }
1047
- return a === void 0 && (a = setTimeout(m, t)), l;
1056
+ return l === void 0 && (l = setTimeout(w, t)), o;
1048
1057
  }
1049
- return z.cancel = it, z.flush = rt, z;
1058
+ return j.cancel = ot, j.flush = rt, j;
1050
1059
  }
1051
- var ae = "Expected a function";
1052
- function ne(r, t, e) {
1053
- var i = !0, s = !0;
1054
- if (typeof r != "function")
1055
- throw new TypeError(ae);
1056
- return y(e) && (i = "leading" in e ? !!e.leading : i, s = "trailing" in e ? !!e.trailing : s), oe(r, t, {
1060
+ var ne = "Expected a function";
1061
+ function le(s, t, e) {
1062
+ var i = !0, a = !0;
1063
+ if (typeof s != "function")
1064
+ throw new TypeError(ne);
1065
+ return y(e) && (i = "leading" in e ? !!e.leading : i, a = "trailing" in e ? !!e.trailing : a), re(s, t, {
1057
1066
  leading: i,
1058
1067
  maxWait: t,
1059
- trailing: s
1068
+ trailing: a
1060
1069
  });
1061
1070
  }
1062
- const M = new CSSStyleSheet();
1063
- M.replaceSync(dt);
1064
- const le = (r, t, e) => `:host([${r}${e ? `--${e}` : ""}='${t}']) .carousel`, ce = "px-spacing", T = (r) => (t, e) => `calc(((100% - ${Math.max(parseInt(t), 2)} * ( var(--px-spacing-${r}-${e}))) / ${t}) - ( 64px / ${Math.max(parseInt(t), 2)}))`;
1065
- class de extends HTMLElement {
1071
+ const tt = new CSSStyleSheet();
1072
+ tt.replaceSync(bt);
1073
+ const et = "px-carousel-item-connected";
1074
+ var k, H;
1075
+ class ce extends HTMLElement {
1066
1076
  constructor() {
1067
- super(), this.visibleItemsAttributeDelegate = new B(
1068
- this,
1069
- "visible-items",
1070
- T("s"),
1071
- "--px-carousel-min-width"
1072
- ), this.template = `<px-vstack gap="default">
1077
+ super();
1078
+ x(this, k);
1079
+ this.template = `<px-vstack gap="default">
1073
1080
  <div class="carousel">
1074
1081
  <slot></slot>
1075
1082
  </div>
@@ -1089,49 +1096,19 @@ class de extends HTMLElement {
1089
1096
  </px-hstack>
1090
1097
  </px-hstack>
1091
1098
  </px-vstack>`, this.onScroll = () => {
1092
- const t = this.$carousel.scrollLeft, e = this.$carousel.scrollWidth, i = this.$carousel.clientWidth;
1093
- let s = 0;
1094
- window.innerWidth < 768 ? s = Math.round(
1095
- t / (e - i) * (this.itemNumbers - 1)
1096
- ) : Math.ceil(t + i) + 10 >= e ? s = this.itemNumbers - 1 : s = Math.floor(t / this.$firstItem.offsetWidth + 1) - 1;
1097
- let n = s;
1098
- 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();
1099
- }, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template, this.shadowRoot.adoptedStyleSheets = [
1100
- M,
1101
- ct(
1102
- "gap",
1103
- le,
1104
- G,
1105
- ce
1106
- )
1107
- ];
1108
- }
1109
- static get observedAttributes() {
1110
- return ["visible-items"];
1111
- }
1112
- attributeChangedCallback(t, e, i) {
1113
- if (e !== i)
1114
- switch (t) {
1115
- case "gap":
1116
- case "gap--mobile":
1117
- case "gap--tablet":
1118
- case "gap--desktop":
1119
- this.visibleItemsAttributeDelegate.attributeValue = T(i);
1120
- break;
1121
- default:
1122
- this.visibleItemsAttributeDelegate.attributeChangedCallback(
1123
- t,
1124
- e,
1125
- i
1126
- );
1127
- }
1099
+ const e = this.$carousel.scrollLeft, i = this.$carousel.scrollWidth, a = this.$carousel.clientWidth;
1100
+ let r = 0;
1101
+ window.innerWidth < 768 ? r = Math.round(
1102
+ e / (i - a) * (this.itemNumbers - 1)
1103
+ ) : Math.ceil(e + a) + 10 >= i ? r = this.itemNumbers - 1 : r = Math.floor(e / this.$firstItem.offsetWidth + 1) - 1;
1104
+ let o = r;
1105
+ this.itemNumbers > 5 && (r > 2 && r < this.itemNumbers - 2 ? o = 2 : r === this.itemNumbers - 2 ? o = 3 : r === this.itemNumbers - 1 && (o = 4)), this.$appleseed.setAttribute("active", `${o}`), this.handleNextPrevious();
1106
+ }, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template, this.shadowRoot.adoptedStyleSheets = [tt];
1128
1107
  }
1129
1108
  connectedCallback() {
1130
- this.visibleItemsAttributeDelegate.init("1"), this.visibleItemsAttributeDelegate.attributeValue = T(
1131
- this.getAttribute("gap") || "s"
1132
- ), requestAnimationFrame(() => {
1133
- this.handleAppleSeedDisplay();
1134
- }), this.$appleseed.setAttribute("amount", `${this.itemNumbers}`), this.$carousel.addEventListener("scroll", ne(this.onScroll, 500)), this.$previous.addEventListener("click", () => {
1109
+ this.addEventListener(et, () => {
1110
+ T(this, k, H).call(this);
1111
+ }), T(this, k, H).call(this), this.$carousel.addEventListener("scroll", le(this.onScroll, 500)), this.$previous.addEventListener("click", () => {
1135
1112
  this.$carousel.scrollLeft -= this.$carousel.clientWidth;
1136
1113
  }), this.$next.addEventListener("click", () => {
1137
1114
  this.$carousel.scrollLeft += this.$carousel.clientWidth;
@@ -1140,8 +1117,8 @@ class de extends HTMLElement {
1140
1117
  });
1141
1118
  }
1142
1119
  handleNextPrevious() {
1143
- const t = this.$carousel.scrollLeft, e = this.$carousel.scrollWidth, i = this.$carousel.clientWidth;
1144
- t === 0 ? this.$previous.setAttribute("disabled", "") : this.$previous.removeAttribute("disabled"), t + i >= e ? this.$next.setAttribute("disabled", "") : this.$next.removeAttribute("disabled");
1120
+ const e = this.$carousel.scrollLeft, i = this.$carousel.scrollWidth, a = this.$carousel.clientWidth;
1121
+ e === 0 ? this.$previous.setAttribute("disabled", "") : this.$previous.removeAttribute("disabled"), e + a >= i ? this.$next.setAttribute("disabled", "") : this.$next.removeAttribute("disabled");
1145
1122
  }
1146
1123
  handleAppleSeedDisplay() {
1147
1124
  this.isScrolling() ? this.$appleseedContainer.style.display = "block" : this.$appleseedContainer.style.display = "none";
@@ -1171,20 +1148,34 @@ class de extends HTMLElement {
1171
1148
  return this.querySelectorAll("px-carousel-item").length;
1172
1149
  }
1173
1150
  }
1174
- customElements.get("px-carousel") || customElements.define("px-carousel", de);
1175
- const V = new CSSStyleSheet();
1176
- V.replaceSync(pt);
1151
+ k = new WeakSet(), H = function() {
1152
+ this.$appleseed.setAttribute("amount", `${this.itemNumbers}`), requestAnimationFrame(() => {
1153
+ this.handleAppleSeedDisplay();
1154
+ });
1155
+ };
1156
+ customElements.get("px-carousel") || customElements.define("px-carousel", ce);
1157
+ const it = new CSSStyleSheet();
1158
+ it.replaceSync(gt);
1177
1159
  class pe extends HTMLElement {
1178
1160
  constructor() {
1179
1161
  super(), this.template = `
1180
1162
  <div class="carousel-item">
1181
1163
  <slot></slot>
1182
- </div>`, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template, this.shadowRoot.adoptedStyleSheets = [M, V];
1164
+ </div>`, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template, this.shadowRoot.adoptedStyleSheets = [it];
1165
+ }
1166
+ connectedCallback() {
1167
+ this.dispatchEvent(
1168
+ new CustomEvent(et, {
1169
+ bubbles: !0,
1170
+ composed: !0
1171
+ })
1172
+ );
1183
1173
  }
1184
1174
  }
1185
1175
  customElements.get("px-carousel-item") || customElements.define("px-carousel-item", pe);
1186
1176
  export {
1187
- Rt as AppleSeed,
1188
- de as Carousel,
1177
+ Ht as AppleSeed,
1178
+ et as CAROUSEL_ITEM_CONNECTED_EVENT,
1179
+ ce as Carousel,
1189
1180
  pe as CarouselItem
1190
1181
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-carousel",
3
- "version": "2.0.0-alpha.16",
3
+ "version": "2.0.0-alpha.160",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  "clean": "rm -rf dist",
14
14
  "build": "npm run clean && NODE_ENV=development vite build && tsc && npm run transform-package-json && npm run wc-manifest",
15
15
  "test": "vitest run --coverage",
16
- "wc-manifest": "cem analyze --globs \"src/*\" --config ../custom-elements-manifest.config.js --outdir dist"
16
+ "wc-manifest": "cem analyze --globs \"src/*\" --config ../../custom-elements-manifest.config.js --outdir dist"
17
17
  },
18
18
  "publishConfig": {
19
19
  "access": "public"