@proximus/lavender-carousel 2.0.0-alpha.11 → 2.0.0-alpha.111

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 q = (r) => {
2
- throw TypeError(r);
1
+ var W = (s) => {
2
+ throw TypeError(s);
3
3
  };
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
- const ut = [
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
- ], ht = [
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
- ], bt = [
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
- ], gt = ["", "default", "nowrap", "wrap", "wrap-reverse"], vt = ["", "visible", "hidden", "scroll", "auto"];
34
- class E extends T {
37
+ ], kt = ["", "default", "nowrap", "wrap", "wrap-reverse"], wt = ["", "visible", "hidden", "scroll", "auto"];
38
+ class P extends M {
35
39
  constructor() {
36
- super(G), this.overflowXAttributeDelegate = new F(
40
+ super(B), this.overflowXAttributeDelegate = new nt(
37
41
  this,
38
42
  "overflow-x",
39
43
  (t) => t,
@@ -87,7 +91,7 @@ class E extends T {
87
91
  case "gap--tablet":
88
92
  case "gap--laptop":
89
93
  case "gap--desktop":
90
- this.updateFlexProperties(t, e, i, B);
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 E extends T {
98
102
  t,
99
103
  e,
100
104
  i,
101
- bt
105
+ ft
102
106
  );
103
107
  break;
104
108
  case "align-items":
@@ -106,37 +110,39 @@ class E extends T {
106
110
  case "align-items--tablet":
107
111
  case "align-items--laptop":
108
112
  case "align-items--desktop":
109
- this.updateFlexProperties(t, e, i, ht);
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, gt);
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, ut);
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, vt);
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 (!rt(s, i)) {
139
- console.error(`${i} is not an allowed ${t} value`);
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('", "')}".`
145
+ );
140
146
  return;
141
147
  }
142
148
  this.overflowXAttributeDelegate.attributeChangedCallback(
@@ -145,23 +151,28 @@ class E extends T {
145
151
  i
146
152
  );
147
153
  }
148
- updateFlexProperties(t, e, i, s) {
149
- this.checkName(s, i) || console.error(`${i} is not a valid value for ${s}`);
150
- const n = t.indexOf("--") > -1, l = n ? t.split("--")[0] : t, a = [];
151
- if (!n)
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, s), this.updateStyle(l, c, i, s);
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('", "')}".`
157
+ );
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);
154
162
  });
155
163
  else {
156
164
  const c = t.split("--")[1];
157
- 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);
158
166
  }
159
167
  }
160
- updateStyle(t, e, i, s) {
161
- 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(
162
170
  `--flex-${t}--${e}-value`,
163
171
  `var(--px-spacing-${i}-${e === "laptop" ? "desktop" : e})`
164
- ) : 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(
165
176
  `--flex-${t}--${e}-value`,
166
177
  i
167
178
  ));
@@ -350,8 +361,8 @@ class E extends T {
350
361
  return this.shadowRoot.querySelector(".flex-container");
351
362
  }
352
363
  }
353
- customElements.get("px-stack") || customElements.define("px-stack", E);
354
- class ft extends E {
364
+ customElements.get("px-stack") || customElements.define("px-stack", P);
365
+ class yt extends P {
355
366
  constructor() {
356
367
  super();
357
368
  }
@@ -359,8 +370,8 @@ class ft extends E {
359
370
  super.connectedCallback(), this.direction = "column", this.directionMobile = "column", this.directionTablet = "column", this.directionLaptop = "column", this.directionDesktop = "column";
360
371
  }
361
372
  }
362
- customElements.get("px-vstack") || customElements.define("px-vstack", ft);
363
- class xt extends E {
373
+ customElements.get("px-vstack") || customElements.define("px-vstack", yt);
374
+ class At extends P {
364
375
  constructor() {
365
376
  super();
366
377
  }
@@ -368,21 +379,21 @@ class xt extends E {
368
379
  super.connectedCallback(), this.direction = "row", this.directionMobile = "row", this.directionTablet = "row", this.directionLaptop = "row", this.directionDesktop = "row";
369
380
  }
370
381
  }
371
- customElements.get("px-hstack") || customElements.define("px-hstack", xt);
372
- class mt extends HTMLElement {
382
+ customElements.get("px-hstack") || customElements.define("px-hstack", At);
383
+ class $t extends HTMLElement {
373
384
  constructor() {
374
385
  super(), this.isZeroSized = !1, this.growValue = "1", this.isVertical = !1;
375
386
  }
376
387
  static get observedAttributes() {
377
- return ["grow"];
388
+ return ["grow", "nogap"];
378
389
  }
379
390
  attributeChangedCallback(t, e, i) {
380
391
  t === "grow" && (this.growValue = i || "1", this.isZeroSized || (this.style.flexGrow = this.growValue), this.scheduleRecheck());
381
392
  }
382
393
  connectedCallback() {
383
- this.growValue = this.getAttribute("grow") || "1", this.style.flexGrow = this.growValue, this.resizeObserver = new ResizeObserver(() => {
394
+ this.growValue = this.getAttribute("grow") || "1", this.style.flexGrow = this.growValue, this.nogap && (this.resizeObserver = new ResizeObserver(() => {
384
395
  this.handleSizeChange();
385
- }), this.isVertical = this.parentElement.localName === "px-vstack" || this.parentElement.style.flexDirection === "column", this.resizeObserver.observe(this), this.scheduleRecheck();
396
+ }), this.isVertical = this.parentElement.localName === "px-vstack" || this.parentElement.style.flexDirection === "column", this.resizeObserver.observe(this), this.scheduleRecheck());
386
397
  }
387
398
  disconnectedCallback() {
388
399
  var t;
@@ -409,13 +420,19 @@ class mt extends HTMLElement {
409
420
  updateParticipation() {
410
421
  this.isZeroSized ? (this.style.display = "none", this.style.flexGrow = "0") : (this.style.display = "", this.style.flexGrow = this.growValue);
411
422
  }
423
+ get nogap() {
424
+ return this.hasAttribute("nogap");
425
+ }
426
+ set nogap(t) {
427
+ t ? this.setAttribute("nogap", "") : this.removeAttribute("nogap");
428
+ }
412
429
  }
413
- customElements.get("px-spacer") || customElements.define("px-spacer", mt);
414
- const kt = ":host{display:block;box-sizing:border-box}slot[name=body-container]{min-height:100vh}#image-sticky-box{margin-top:-2.5em}", Z = new CSSStyleSheet();
415
- Z.replaceSync(kt);
416
- class yt extends T {
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 {
417
434
  constructor() {
418
- super(Z), this.template = (t) => `
435
+ super(U), this.template = (t) => `
419
436
  <px-container border-radius="none" padding="none">
420
437
  <px-vstack>
421
438
  <px-container id="header-container" border-radius="none">
@@ -592,7 +609,7 @@ class yt extends T {
592
609
  case "background-color":
593
610
  this.$bodyContainer.setAttribute(
594
611
  "background-color",
595
- st.indexOf(i) > 0 ? i : "none"
612
+ pt.indexOf(i) > 0 ? i : "none"
596
613
  );
597
614
  break;
598
615
  case "padding-vertical":
@@ -612,23 +629,24 @@ class yt extends T {
612
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;
613
630
  }
614
631
  }
615
- customElements.get("px-page") === void 0 && customElements.define("px-page", yt);
616
- 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)}}", _ = new CSSStyleSheet();
617
- _.replaceSync(wt);
618
- const At = ["", "default", "small"], $t = [
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 = [
619
636
  "",
620
637
  "default",
621
638
  "secondary",
622
639
  "naked"
623
- ], R = class R extends ot {
640
+ ], $ = class $ extends dt {
624
641
  constructor() {
625
- super(_), this.template = () => "<slot></slot>";
626
- const t = document.createElement(this.nativeName);
642
+ super(K), this.template = () => "<slot></slot>";
643
+ const t = document.createElement($.nativeName);
627
644
  t.classList.add("btn-icon"), t.innerHTML = this.template(), this.shadowRoot.appendChild(t);
628
645
  }
629
646
  static get observedAttributes() {
630
647
  return [
631
648
  ...super.observedAttributes,
649
+ ...ut,
632
650
  "inverted",
633
651
  "loading",
634
652
  "size",
@@ -637,7 +655,6 @@ const At = ["", "default", "small"], $t = [
637
655
  ];
638
656
  }
639
657
  connectedCallback() {
640
- super.connectedCallback();
641
658
  const t = this.querySelector("px-icon");
642
659
  if (t) {
643
660
  const e = t.getAttribute("size"), i = t.getAttribute("color");
@@ -645,7 +662,6 @@ const At = ["", "default", "small"], $t = [
645
662
  this.$el.focus();
646
663
  }), e || t.setAttribute("size", "s"), this.size === "small" && t.setAttribute("size", "xs"), i || t.setAttribute("color", "inherit");
647
664
  }
648
- at(this, this.$el, !1);
649
665
  }
650
666
  attributeChangedCallback(t, e, i) {
651
667
  if (e !== i)
@@ -674,10 +690,14 @@ const At = ["", "default", "small"], $t = [
674
690
  this.$el.classList.toggle("btn-icon--state-loading");
675
691
  }
676
692
  updateSize(t, e) {
677
- this.checkName(At, 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}`)) : console.error(`${e} is not a valid size value`);
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('", "')}".`
695
+ );
678
696
  }
679
697
  updateVariant(t, e) {
680
- this.checkName($t, 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}`)) : console.error(`${e} is not a valid variant value`);
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('", "')}".`
700
+ );
681
701
  }
682
702
  get inverted() {
683
703
  return this.getAttribute("inverted");
@@ -710,10 +730,10 @@ const At = ["", "default", "small"], $t = [
710
730
  t ? this.setAttribute("aria-expanded", t) : this.removeAttribute("aria-expanded");
711
731
  }
712
732
  };
713
- R.nativeName = "button";
714
- let L = R;
715
- customElements.get("px-button-icon") || customElements.define("px-button-icon", L);
716
- class St 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 {
717
737
  constructor() {
718
738
  super();
719
739
  }
@@ -746,8 +766,8 @@ class St extends HTMLElement {
746
766
  t && t.remove();
747
767
  }
748
768
  }
749
- customElements.get("px-icon-set") || customElements.define("px-icon-set", St);
750
- const Ct = [
769
+ customElements.get("px-icon-set") || customElements.define("px-icon-set", jt);
770
+ const Lt = [
751
771
  "Brand",
752
772
  "Accent",
753
773
  "Neutral",
@@ -760,57 +780,58 @@ const Ct = [
760
780
  "StateHover",
761
781
  "StateActive",
762
782
  "StateDisabled"
763
- ], zt = ["Inherit", ...Ct].map(
764
- (r) => r.replace(/([A-Z])/g, "-$1").toLowerCase().slice(1)
765
- ), 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-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)}", U = new CSSStyleSheet();
766
- U.replaceSync(jt);
767
- const Lt = [
768
- "name",
769
- "size",
770
- "color",
771
- "aria-label",
772
- "inverted",
773
- "from",
774
- "disabled"
775
- ];
776
- var h, p, w;
777
- class Tt extends T {
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: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)}", J = new CSSStyleSheet();
786
+ J.replaceSync(Tt);
787
+ var h, d, S;
788
+ class Rt extends M {
778
789
  constructor(...e) {
779
790
  var i;
780
- super(...e, U);
781
- m(this, h);
782
- m(this, p);
783
- m(this, w, () => `<svg aria-hidden="true">
784
- <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>
785
796
  </svg>`);
786
- this.shadowRoot.innerHTML = d(this, w).call(this), this.role = "img", C(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");
787
798
  }
788
799
  static get observedAttributes() {
789
- return [...super.observedAttributes, ...Lt];
800
+ return [
801
+ ...super.observedAttributes,
802
+ "name",
803
+ "size",
804
+ "color",
805
+ "aria-label",
806
+ "inverted",
807
+ "from",
808
+ "disabled"
809
+ ];
790
810
  }
791
- attributeChangedCallback(e, i, s) {
792
- if (i !== s)
811
+ attributeChangedCallback(e, i, a) {
812
+ if (i !== a)
793
813
  switch (e) {
794
814
  case "name":
795
- this.updateName(i, s);
815
+ this.updateName(i, a);
796
816
  break;
797
817
  case "size":
798
- this.updateAttribute(e, i, s, nt);
818
+ this.updateAttribute(e, i, a, ht);
799
819
  break;
800
820
  case "color":
801
- this.updateAttribute(e, i, s, zt);
821
+ this.updateAttribute(e, i, a, Et);
802
822
  break;
803
823
  case "disabled":
804
824
  this.color = "state-disabled";
805
825
  break;
806
826
  case "aria-label":
807
- if (!d(this, p))
827
+ if (!p(this, d))
808
828
  return;
809
- 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");
810
830
  break;
811
831
  }
812
832
  }
813
833
  connectedCallback() {
834
+ this.role = "img";
814
835
  const e = document.querySelectorAll("px-icon-set");
815
836
  e || console.log("<px-icon-set> component not found");
816
837
  for (const i of e) {
@@ -818,20 +839,22 @@ class Tt extends T {
818
839
  console.error("Icon name or src not found");
819
840
  continue;
820
841
  }
821
- i.getAttribute("name") === this.from && i.getAttribute("type") !== "font" && (C(this, h, i.getAttribute("src")), this.$el.firstElementChild.setAttribute(
822
- "xlink:href",
823
- `${d(this, h)}#icon-${this.name}`
842
+ i.getAttribute("name") === this.from && i.getAttribute("type") !== "font" && (E(this, h, i.getAttribute("src")), this.$el.firstElementChild.setAttribute(
843
+ "href",
844
+ `${p(this, h)}#icon-${this.name}`
824
845
  ));
825
846
  }
826
- !this.ariaLabel && d(this, p) && (d(this, p).ariaHidden = "true", this.ariaHidden = "true");
847
+ !this.ariaLabel && p(this, d) && (p(this, d).ariaHidden = "true", this.ariaHidden = "true");
827
848
  }
828
- updateAttribute(e, i, s, n) {
829
- 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`);
849
+ updateAttribute(e, i, a, r) {
850
+ 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(
851
+ `${a} is not an allowed ${e} value for ${this.tagName.toLowerCase()}`
852
+ );
830
853
  }
831
854
  updateName(e, i) {
832
- d(this, h) && this.$el.firstElementChild.setAttribute(
833
- "xlink:href",
834
- `${d(this, h)}#icon-${i}`
855
+ p(this, h) && this.$el.firstElementChild.setAttribute(
856
+ "href",
857
+ `${p(this, h)}#icon-${i}`
835
858
  );
836
859
  }
837
860
  get $el() {
@@ -880,20 +903,20 @@ class Tt extends T {
880
903
  this.setAttribute("disabled", e);
881
904
  }
882
905
  }
883
- h = new WeakMap(), p = new WeakMap(), w = new WeakMap();
884
- customElements.get("px-icon") || customElements.define("px-icon", Tt);
885
- 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();
886
- K.replaceSync(Et);
887
- class It extends HTMLElement {
906
+ h = new WeakMap(), d = new WeakMap(), S = new WeakMap();
907
+ customElements.get("px-icon") || customElements.define("px-icon", Rt);
908
+ 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();
909
+ Q.replaceSync(It);
910
+ class Ht extends HTMLElement {
888
911
  constructor() {
889
912
  super(), this.template = (t, e) => `<div class="container">
890
913
  ${Array.from(
891
914
  { length: Math.min(t, 5) },
892
- (i, s) => `<div id="seed-${s}" ${e === s ? "active" : ""} class="appleseed ${t > 5 ? "appleseed-6-plus" : "appleseed-6-minus"}">
915
+ (i, a) => `<div id="seed-${a}" ${e === a ? "active" : ""} class="appleseed ${t > 5 ? "appleseed-6-plus" : "appleseed-6-minus"}">
893
916
  <div></div>
894
917
  </div>`
895
918
  ).join("")}
896
- </div>`, this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [K], this.shadowRoot.innerHTML = this.template(this.amount, this.active);
919
+ </div>`, this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [Q], this.shadowRoot.innerHTML = this.template(this.amount, this.active);
897
920
  }
898
921
  static get observedAttributes() {
899
922
  return ["amount", "active"];
@@ -926,135 +949,133 @@ class It extends HTMLElement {
926
949
  return parseInt(this.getAttribute("active")) || 0;
927
950
  }
928
951
  }
929
- customElements.get("px-appleseed") || customElements.define("px-appleseed", It);
930
- function k(r) {
931
- var t = typeof r;
932
- return r != null && (t == "object" || t == "function");
952
+ customElements.get("px-appleseed") || customElements.define("px-appleseed", Ht);
953
+ function y(s) {
954
+ var t = typeof s;
955
+ return s != null && (t == "object" || t == "function");
933
956
  }
934
- 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() {
935
- return J.Date.now();
936
- }, Ht = /\s/;
937
- function Pt(r) {
938
- for (var t = r.length; t-- && Ht.test(r.charAt(t)); )
957
+ 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() {
958
+ return Y.Date.now();
959
+ }, Ot = /\s/;
960
+ function Nt(s) {
961
+ for (var t = s.length; t-- && Ot.test(s.charAt(t)); )
939
962
  ;
940
963
  return t;
941
964
  }
942
- var Dt = /^\s+/;
943
- function qt(r) {
944
- return r && r.slice(0, Pt(r) + 1).replace(Dt, "");
965
+ var qt = /^\s+/;
966
+ function Dt(s) {
967
+ return s && s.slice(0, Nt(s) + 1).replace(qt, "");
945
968
  }
946
- var y = J.Symbol, Q = Object.prototype, Ot = Q.hasOwnProperty, Wt = Q.toString, f = y ? y.toStringTag : void 0;
947
- function Nt(r) {
948
- var t = Ot.call(r, f), e = r[f];
969
+ var A = Y.Symbol, V = Object.prototype, Wt = V.hasOwnProperty, Xt = V.toString, m = A ? A.toStringTag : void 0;
970
+ function Ft(s) {
971
+ var t = Wt.call(s, m), e = s[m];
949
972
  try {
950
- r[f] = void 0;
973
+ s[m] = void 0;
951
974
  var i = !0;
952
975
  } catch {
953
976
  }
954
- var s = Wt.call(r);
955
- return i && (t ? r[f] = e : delete r[f]), s;
977
+ var a = Xt.call(s);
978
+ return i && (t ? s[m] = e : delete s[m]), a;
956
979
  }
957
- var Xt = Object.prototype, Ft = Xt.toString;
958
- function Bt(r) {
959
- return Ft.call(r);
980
+ var _t = Object.prototype, Gt = _t.toString;
981
+ function Zt(s) {
982
+ return Gt.call(s);
960
983
  }
961
- var Gt = "[object Null]", Zt = "[object Undefined]", W = y ? y.toStringTag : void 0;
962
- function _t(r) {
963
- return r == null ? r === void 0 ? Zt : Gt : W && W in Object(r) ? Nt(r) : Bt(r);
984
+ var Bt = "[object Null]", Ut = "[object Undefined]", _ = A ? A.toStringTag : void 0;
985
+ function Kt(s) {
986
+ return s == null ? s === void 0 ? Ut : Bt : _ && _ in Object(s) ? Ft(s) : Zt(s);
964
987
  }
965
- function Ut(r) {
966
- return r != null && typeof r == "object";
988
+ function Jt(s) {
989
+ return s != null && typeof s == "object";
967
990
  }
968
- var Kt = "[object Symbol]";
969
- function Jt(r) {
970
- return typeof r == "symbol" || Ut(r) && _t(r) == Kt;
991
+ var Qt = "[object Symbol]";
992
+ function Yt(s) {
993
+ return typeof s == "symbol" || Jt(s) && Kt(s) == Qt;
971
994
  }
972
- var N = NaN, Qt = /^[-+]0x[0-9a-f]+$/i, Yt = /^0b[01]+$/i, Vt = /^0o[0-7]+$/i, te = parseInt;
973
- function X(r) {
974
- if (typeof r == "number")
975
- return r;
976
- if (Jt(r))
977
- return N;
978
- if (k(r)) {
979
- var t = typeof r.valueOf == "function" ? r.valueOf() : r;
980
- r = k(t) ? t + "" : t;
981
- }
982
- if (typeof r != "string")
983
- return r === 0 ? r : +r;
984
- r = qt(r);
985
- var e = Yt.test(r);
986
- return e || Vt.test(r) ? te(r.slice(2), e ? 2 : 8) : Qt.test(r) ? N : +r;
995
+ var G = NaN, Vt = /^[-+]0x[0-9a-f]+$/i, te = /^0b[01]+$/i, ee = /^0o[0-7]+$/i, ie = parseInt;
996
+ function Z(s) {
997
+ if (typeof s == "number")
998
+ return s;
999
+ if (Yt(s))
1000
+ return G;
1001
+ if (y(s)) {
1002
+ var t = typeof s.valueOf == "function" ? s.valueOf() : s;
1003
+ s = y(t) ? t + "" : t;
1004
+ }
1005
+ if (typeof s != "string")
1006
+ return s === 0 ? s : +s;
1007
+ s = Dt(s);
1008
+ var e = te.test(s);
1009
+ return e || ee.test(s) ? ie(s.slice(2), e ? 2 : 8) : Vt.test(s) ? G : +s;
987
1010
  }
988
- var ee = "Expected a function", ie = Math.max, re = Math.min;
989
- function se(r, t, e) {
990
- var i, s, n, l, a, c, b = 0, M = !1, g = !1, A = !0;
991
- if (typeof r != "function")
992
- throw new TypeError(ee);
993
- 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);
994
- function $(o) {
995
- var u = i, v = s;
996
- return i = s = void 0, b = o, l = r.apply(v, u), l;
997
- }
998
- function V(o) {
999
- return b = o, a = setTimeout(x, t), M ? $(o) : l;
1000
- }
1001
- function tt(o) {
1002
- var u = o - c, v = o - b, D = t - u;
1003
- return g ? re(D, n - v) : D;
1004
- }
1005
- function H(o) {
1006
- var u = o - c, v = o - b;
1007
- return c === void 0 || u >= t || u < 0 || g && v >= n;
1008
- }
1009
- function x() {
1010
- var o = z();
1011
- if (H(o))
1012
- return P(o);
1013
- a = setTimeout(x, tt(o));
1014
- }
1015
- function P(o) {
1016
- return a = void 0, A && i ? $(o) : (i = s = void 0, l);
1017
- }
1018
- function et() {
1019
- a !== void 0 && clearTimeout(a), b = 0, i = c = s = a = void 0;
1020
- }
1021
- function it() {
1022
- return a === void 0 ? l : P(z());
1023
- }
1024
- function S() {
1025
- var o = z(), u = H(o);
1026
- if (i = arguments, s = this, c = o, u) {
1027
- if (a === void 0)
1028
- return V(c);
1011
+ var se = "Expected a function", ae = Math.max, oe = Math.min;
1012
+ function re(s, t, e) {
1013
+ var i, a, r, o, l, c, b = 0, O = !1, g = !1, C = !0;
1014
+ if (typeof s != "function")
1015
+ throw new TypeError(se);
1016
+ 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);
1017
+ function z(n) {
1018
+ var u = i, v = a;
1019
+ return i = a = void 0, b = n, o = s.apply(v, u), o;
1020
+ }
1021
+ function st(n) {
1022
+ return b = n, l = setTimeout(w, t), O ? z(n) : o;
1023
+ }
1024
+ function at(n) {
1025
+ var u = n - c, v = n - b, D = t - u;
1026
+ return g ? oe(D, r - v) : D;
1027
+ }
1028
+ function N(n) {
1029
+ var u = n - c, v = n - b;
1030
+ return c === void 0 || u >= t || u < 0 || g && v >= r;
1031
+ }
1032
+ function w() {
1033
+ var n = R();
1034
+ if (N(n))
1035
+ return q(n);
1036
+ l = setTimeout(w, at(n));
1037
+ }
1038
+ function q(n) {
1039
+ return l = void 0, C && i ? z(n) : (i = a = void 0, o);
1040
+ }
1041
+ function ot() {
1042
+ l !== void 0 && clearTimeout(l), b = 0, i = c = a = l = void 0;
1043
+ }
1044
+ function rt() {
1045
+ return l === void 0 ? o : q(R());
1046
+ }
1047
+ function j() {
1048
+ var n = R(), u = N(n);
1049
+ if (i = arguments, a = this, c = n, u) {
1050
+ if (l === void 0)
1051
+ return st(c);
1029
1052
  if (g)
1030
- return clearTimeout(a), a = setTimeout(x, t), $(c);
1053
+ return clearTimeout(l), l = setTimeout(w, t), z(c);
1031
1054
  }
1032
- return a === void 0 && (a = setTimeout(x, t)), l;
1055
+ return l === void 0 && (l = setTimeout(w, t)), o;
1033
1056
  }
1034
- return S.cancel = et, S.flush = it, S;
1057
+ return j.cancel = ot, j.flush = rt, j;
1035
1058
  }
1036
- var oe = "Expected a function";
1037
- function ae(r, t, e) {
1038
- var i = !0, s = !0;
1039
- if (typeof r != "function")
1040
- throw new TypeError(oe);
1041
- return k(e) && (i = "leading" in e ? !!e.leading : i, s = "trailing" in e ? !!e.trailing : s), se(r, t, {
1059
+ var ne = "Expected a function";
1060
+ function le(s, t, e) {
1061
+ var i = !0, a = !0;
1062
+ if (typeof s != "function")
1063
+ throw new TypeError(ne);
1064
+ return y(e) && (i = "leading" in e ? !!e.leading : i, a = "trailing" in e ? !!e.trailing : a), re(s, t, {
1042
1065
  leading: i,
1043
1066
  maxWait: t,
1044
- trailing: s
1067
+ trailing: a
1045
1068
  });
1046
1069
  }
1047
- const I = new CSSStyleSheet();
1048
- I.replaceSync(ct);
1049
- const ne = (r, t, e) => `:host([${r}${e ? `--${e}` : ""}='${t}']) .carousel`, le = "px-spacing", j = (r) => (t, e) => `calc(((100% - ${Math.max(parseInt(t), 2)} * ( var(--px-spacing-${r}-${e}))) / ${t}) - ( 64px / ${Math.max(parseInt(t), 2)}))`;
1070
+ const tt = new CSSStyleSheet();
1071
+ tt.replaceSync(bt);
1072
+ const et = "px-carousel-item-connected";
1073
+ var k, H;
1050
1074
  class ce extends HTMLElement {
1051
1075
  constructor() {
1052
- super(), this.visibleItemsAttributeDelegate = new F(
1053
- this,
1054
- "visible-items",
1055
- j("s"),
1056
- "--px-carousel-min-width"
1057
- ), this.template = `<px-vstack gap="default">
1076
+ super();
1077
+ x(this, k);
1078
+ this.template = `<px-vstack gap="default">
1058
1079
  <div class="carousel">
1059
1080
  <slot></slot>
1060
1081
  </div>
@@ -1074,49 +1095,19 @@ class ce extends HTMLElement {
1074
1095
  </px-hstack>
1075
1096
  </px-hstack>
1076
1097
  </px-vstack>`, this.onScroll = () => {
1077
- const t = this.$carousel.scrollLeft, e = this.$carousel.scrollWidth, i = this.$carousel.clientWidth;
1078
- let s = 0;
1079
- window.innerWidth < 768 ? s = Math.round(
1080
- t / (e - i) * (this.itemNumbers - 1)
1081
- ) : Math.ceil(t + i) + 10 >= e ? s = this.itemNumbers - 1 : s = Math.floor(t / this.$firstItem.offsetWidth + 1) - 1;
1082
- let n = s;
1083
- 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();
1084
- }, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template, this.shadowRoot.adoptedStyleSheets = [
1085
- I,
1086
- lt(
1087
- "gap",
1088
- ne,
1089
- B,
1090
- le
1091
- )
1092
- ];
1093
- }
1094
- static get observedAttributes() {
1095
- return ["visible-items"];
1096
- }
1097
- attributeChangedCallback(t, e, i) {
1098
- if (e !== i)
1099
- switch (t) {
1100
- case "gap":
1101
- case "gap--mobile":
1102
- case "gap--tablet":
1103
- case "gap--desktop":
1104
- this.visibleItemsAttributeDelegate.attributeValue = j(i);
1105
- break;
1106
- default:
1107
- this.visibleItemsAttributeDelegate.attributeChangedCallback(
1108
- t,
1109
- e,
1110
- i
1111
- );
1112
- }
1098
+ const e = this.$carousel.scrollLeft, i = this.$carousel.scrollWidth, a = this.$carousel.clientWidth;
1099
+ let r = 0;
1100
+ window.innerWidth < 768 ? r = Math.round(
1101
+ e / (i - a) * (this.itemNumbers - 1)
1102
+ ) : Math.ceil(e + a) + 10 >= i ? r = this.itemNumbers - 1 : r = Math.floor(e / this.$firstItem.offsetWidth + 1) - 1;
1103
+ let o = r;
1104
+ 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();
1105
+ }, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template, this.shadowRoot.adoptedStyleSheets = [tt];
1113
1106
  }
1114
1107
  connectedCallback() {
1115
- this.visibleItemsAttributeDelegate.init("1"), this.visibleItemsAttributeDelegate.attributeValue = j(
1116
- this.getAttribute("gap") || "s"
1117
- ), requestAnimationFrame(() => {
1118
- this.handleAppleSeedDisplay();
1119
- }), this.$appleseed.setAttribute("amount", `${this.itemNumbers}`), this.$carousel.addEventListener("scroll", ae(this.onScroll, 500)), this.$previous.addEventListener("click", () => {
1108
+ this.addEventListener(et, () => {
1109
+ T(this, k, H).call(this);
1110
+ }), T(this, k, H).call(this), this.$carousel.addEventListener("scroll", le(this.onScroll, 500)), this.$previous.addEventListener("click", () => {
1120
1111
  this.$carousel.scrollLeft -= this.$carousel.clientWidth;
1121
1112
  }), this.$next.addEventListener("click", () => {
1122
1113
  this.$carousel.scrollLeft += this.$carousel.clientWidth;
@@ -1125,8 +1116,8 @@ class ce extends HTMLElement {
1125
1116
  });
1126
1117
  }
1127
1118
  handleNextPrevious() {
1128
- const t = this.$carousel.scrollLeft, e = this.$carousel.scrollWidth, i = this.$carousel.clientWidth;
1129
- t === 0 ? this.$previous.setAttribute("disabled", "") : this.$previous.removeAttribute("disabled"), t + i >= e ? this.$next.setAttribute("disabled", "") : this.$next.removeAttribute("disabled");
1119
+ const e = this.$carousel.scrollLeft, i = this.$carousel.scrollWidth, a = this.$carousel.clientWidth;
1120
+ e === 0 ? this.$previous.setAttribute("disabled", "") : this.$previous.removeAttribute("disabled"), e + a >= i ? this.$next.setAttribute("disabled", "") : this.$next.removeAttribute("disabled");
1130
1121
  }
1131
1122
  handleAppleSeedDisplay() {
1132
1123
  this.isScrolling() ? this.$appleseedContainer.style.display = "block" : this.$appleseedContainer.style.display = "none";
@@ -1156,20 +1147,34 @@ class ce extends HTMLElement {
1156
1147
  return this.querySelectorAll("px-carousel-item").length;
1157
1148
  }
1158
1149
  }
1150
+ k = new WeakSet(), H = function() {
1151
+ this.$appleseed.setAttribute("amount", `${this.itemNumbers}`), requestAnimationFrame(() => {
1152
+ this.handleAppleSeedDisplay();
1153
+ });
1154
+ };
1159
1155
  customElements.get("px-carousel") || customElements.define("px-carousel", ce);
1160
- const Y = new CSSStyleSheet();
1161
- Y.replaceSync(dt);
1162
- class de extends HTMLElement {
1156
+ const it = new CSSStyleSheet();
1157
+ it.replaceSync(gt);
1158
+ class pe extends HTMLElement {
1163
1159
  constructor() {
1164
1160
  super(), this.template = `
1165
1161
  <div class="carousel-item">
1166
1162
  <slot></slot>
1167
- </div>`, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template, this.shadowRoot.adoptedStyleSheets = [I, Y];
1163
+ </div>`, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template, this.shadowRoot.adoptedStyleSheets = [it];
1164
+ }
1165
+ connectedCallback() {
1166
+ this.dispatchEvent(
1167
+ new CustomEvent(et, {
1168
+ bubbles: !0,
1169
+ composed: !0
1170
+ })
1171
+ );
1168
1172
  }
1169
1173
  }
1170
- customElements.get("px-carousel-item") || customElements.define("px-carousel-item", de);
1174
+ customElements.get("px-carousel-item") || customElements.define("px-carousel-item", pe);
1171
1175
  export {
1172
- It as AppleSeed,
1176
+ Ht as AppleSeed,
1177
+ et as CAROUSEL_ITEM_CONNECTED_EVENT,
1173
1178
  ce as Carousel,
1174
- de as CarouselItem
1179
+ pe as CarouselItem
1175
1180
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-carousel",
3
- "version": "2.0.0-alpha.11",
3
+ "version": "2.0.0-alpha.111",
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"