@proximus/lavender-carousel 2.0.0-alpha.21 → 2.0.0-alpha.211

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.
package/dist/index.es.js CHANGED
@@ -1,431 +1,429 @@
1
- var O = (r) => {
2
- throw TypeError(r);
1
+ import { AttributeBreakpointHandlerDelegate as e, PxElement as t, WithExtraAttributes as n, accessibilityAttributes as r, backgroundColorValues as i, booleanPropertyToAttributeSetter as a, checkName as o, createTemplate as s, gapValues as c, iconSizeValuesKC as l, log as u, propertyToAttributeSetter as d, renderTemplate as f } from "@proximus/lavender-common";
2
+ //#region src/carousel.css?inline
3
+ var p = ":host{display:block}:host *{box-sizing:border-box}:host{--px-carousel-visible-items:1;--px-carousel-gap-default:var(--px-spacing-default-desktop)}: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{scroll-snap-type:x mandatory;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;gap:var(--px-carousel-gap-default--desktop,var(--px-carousel-gap-default));display:flex;overflow:auto hidden}@media screen and (width<=48rem){.carousel{gap:var(--px-carousel-gap-default--mobile,var(--px-carousel-gap-default))}}@media screen and (width>=48.0625rem) and (width<=64rem){.carousel{gap:var(--px-carousel-gap-default--tablet,var(--px-carousel-gap-default))}}@media screen and (width>=64.0625rem) and (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 (width<=48rem){#button-icons{display:none}}.carousel::-webkit-scrollbar{display:none}", m = "::slotted(*){border-radius:var(--px-radius-main);height:100%}.carousel-item{height:100%}:host{scroll-snap-align:start;border-radius:var(--px-radius-main);--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));background:#fff;justify-content:center;align-items:center;overflow:hidden}@media screen and (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 (width>=48.0625rem) and (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 (width>=64.0625rem) and (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 (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 (width>=48rem) and (width<=64rem){:host{flex:1 0 var(--px-carousel-min-width-tablet,var(--px-carousel-min-width-all-tablet))!important}}", h = ":host{--host-gap--mobile:var(--px-spacing-none-mobile);--host-gap--tablet:var(--px-spacing-none-tablet);--host-gap--laptop:var(--px-spacing-none-desktop);--host-gap--desktop:var(--px-spacing-none-desktop);--overflow-x-all:visible;--overflow-x-all-mobile:initial;--overflow-x-all-tablet:initial;--overflow-x-all-laptop:initial;--overflow-x-all-desktop:initial;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{--flex-direction--mobile-value:row;--flex-direction--tablet-value:row;--flex-direction--laptop-value:row;--flex-direction--desktop-value:row;--flex-gap--mobile-value:var(--px-spacing-none-mobile);--flex-gap--tablet-value:var(--px-spacing-none-tablet);--flex-gap--laptop-value:var(--px-spacing-none-desktop);--flex-gap--desktop-value:var(--px-spacing-none-desktop);--flex-align-items--mobile-value:stretch;--flex-align-items--tablet-value:stretch;--flex-align-items--laptop-value:stretch;--flex-align-items--desktop-value:stretch;--flex-justify-content--mobile-value:flex-start;--flex-justify-content--tablet-value:flex-start;--flex-justify-content--laptop-value:flex-start;--flex-justify-content--desktop-value:flex-start;--flex-wrap--mobile-value:nowrap;--flex-wrap--tablet-value:nowrap;--flex-wrap--laptop-value:nowrap;--flex-wrap--desktop-value:nowrap;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);width:100%;height:100%;overflow-x:var(--overflow-x-all);display:flex}@media screen and (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 (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 (width>=48rem) and (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 (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 (width>=64.0625rem) and (width<=90rem){.flex-container{overflow-x:var(--overflow-x-all-laptop,var(--overflow-x-all))}}@media screen and (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))}}:host(px-vstack) .flex-container{--flex-direction--mobile-value:column!important;--flex-direction--tablet-value:column!important;--flex-direction--laptop-value:column!important;--flex-direction--desktop-value:column!important}:host(px-hstack) .flex-container{--flex-direction--mobile-value:row!important;--flex-direction--tablet-value:row!important;--flex-direction--laptop-value:row!important;--flex-direction--desktop-value:row!important}", g = new CSSStyleSheet();
4
+ g.replaceSync(h);
5
+ var _ = document.createElement("template");
6
+ _.innerHTML = "<div class=\"flex-container\"><slot></slot></div>";
7
+ var v = [
8
+ "",
9
+ "default",
10
+ "row",
11
+ "row-reverse",
12
+ "column",
13
+ "column-reverse"
14
+ ], y = [
15
+ "",
16
+ "default",
17
+ "stretch",
18
+ "flex-start",
19
+ "start",
20
+ "flex-end",
21
+ "end",
22
+ "center",
23
+ "baseline"
24
+ ], b = [
25
+ "",
26
+ "default",
27
+ "flex-start",
28
+ "start",
29
+ "flex-end",
30
+ "end",
31
+ "center",
32
+ "space-between",
33
+ "space-around",
34
+ "space-evenly"
35
+ ], x = [
36
+ "",
37
+ "default",
38
+ "nowrap",
39
+ "wrap",
40
+ "wrap-reverse"
41
+ ], S = [
42
+ "",
43
+ "visible",
44
+ "hidden",
45
+ "scroll",
46
+ "auto"
47
+ ], C = class t extends n {
48
+ constructor() {
49
+ super(g), this.overflowXAttributeDelegate = new e(this, "overflow-x", (e) => e, "--overflow-x"), this.shadowRoot.firstChild || this.shadowRoot.appendChild(document.importNode(_.content, !0));
50
+ }
51
+ connectedCallback() {}
52
+ static get observedAttributes() {
53
+ return [
54
+ ...super.observedAttributes,
55
+ "direction",
56
+ "direction--mobile",
57
+ "direction--tablet",
58
+ "direction--laptop",
59
+ "direction--desktop",
60
+ "gap",
61
+ "gap--mobile",
62
+ "gap--tablet",
63
+ "gap--laptop",
64
+ "gap--desktop",
65
+ "justify-content",
66
+ "justify-content--mobile",
67
+ "justify-content--tablet",
68
+ "justify-content--laptop",
69
+ "justify-content--desktop",
70
+ "align-items",
71
+ "align-items--mobile",
72
+ "align-items--tablet",
73
+ "align-items--laptop",
74
+ "align-items--desktop",
75
+ "wrap",
76
+ "wrap--mobile",
77
+ "wrap--tablet",
78
+ "wrap--laptop",
79
+ "wrap--desktop",
80
+ "overflow-x",
81
+ "overflow-x--mobile",
82
+ "overflow-x--tablet",
83
+ "overflow-x--laptop",
84
+ "overflow-x--desktop"
85
+ ];
86
+ }
87
+ attributeChangedCallback(e, t, n) {
88
+ switch (e) {
89
+ case "gap":
90
+ case "gap--mobile":
91
+ case "gap--tablet":
92
+ case "gap--laptop":
93
+ case "gap--desktop":
94
+ this.updateFlexProperties(e, t, n, c);
95
+ break;
96
+ case "justify-content":
97
+ case "justify-content--mobile":
98
+ case "justify-content--tablet":
99
+ case "justify-content--laptop":
100
+ case "justify-content--desktop":
101
+ this.updateFlexProperties(e, t, n, b);
102
+ break;
103
+ case "align-items":
104
+ case "align-items--mobile":
105
+ case "align-items--tablet":
106
+ case "align-items--laptop":
107
+ case "align-items--desktop":
108
+ this.updateFlexProperties(e, t, n, y);
109
+ break;
110
+ case "wrap":
111
+ case "wrap--mobile":
112
+ case "wrap--tablet":
113
+ case "wrap--laptop":
114
+ case "wrap--desktop":
115
+ this.updateFlexProperties(e, t, n, x);
116
+ break;
117
+ case "direction":
118
+ case "direction--mobile":
119
+ case "direction--tablet":
120
+ case "direction--laptop":
121
+ case "direction--desktop":
122
+ this.updateFlexProperties(e, t, n, v);
123
+ break;
124
+ case "overflow-x":
125
+ case "overflow-x--mobile":
126
+ case "overflow-x--tablet":
127
+ case "overflow-x--laptop":
128
+ case "overflow-x--desktop":
129
+ this.updateOverflowX(e, t, n, S);
130
+ break;
131
+ default: super.attributeChangedCallback(e, t, n);
132
+ }
133
+ }
134
+ updateOverflowX(e, t, n, r) {
135
+ o(r, n) ? this.overflowXAttributeDelegate.attributeChangedCallback(e, t, n) : u(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`);
136
+ }
137
+ updateFlexProperties(e, n, r, i) {
138
+ r !== null && !this.checkName(i, r) && u(`"${r}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${i.join("\", \"")}".`);
139
+ let a = e.indexOf("--");
140
+ if (a === -1) for (let n of t.breakpoints) this.getAttribute(`${e}--${n}`) || this.updateStyle(e, n, r, i);
141
+ else {
142
+ let t = e.slice(0, a), n = e.slice(a + 2);
143
+ this.updateStyle(t, n, r || this.getAttribute(t), i);
144
+ }
145
+ }
146
+ updateStyle(e, t, n, r) {
147
+ let i = `--flex-${e}--${t}-value`, a = e === "gap";
148
+ if (!n) this.$el.style.removeProperty(i), a && this.style.removeProperty(`--host-gap--${t}`);
149
+ else if (a && r && r.includes(n)) {
150
+ let e = `var(--px-spacing-${n}-${t === "laptop" ? "desktop" : t})`;
151
+ this.$el.style.setProperty(i, e), this.style.setProperty(`--host-gap--${t}`, e);
152
+ } else this.$el.style.setProperty(i, n);
153
+ }
154
+ static {
155
+ this.breakpoints = [
156
+ "mobile",
157
+ "tablet",
158
+ "laptop",
159
+ "desktop"
160
+ ];
161
+ }
162
+ get direction() {
163
+ return this.getAttribute("direction") ?? "row";
164
+ }
165
+ set direction(e) {
166
+ d(this, "direction", e);
167
+ }
168
+ get directionMobile() {
169
+ return this.getAttribute("direction--mobile");
170
+ }
171
+ set directionMobile(e) {
172
+ d(this, "direction--mobile", e);
173
+ }
174
+ get directionTablet() {
175
+ return this.getAttribute("direction--tablet");
176
+ }
177
+ set directionTablet(e) {
178
+ d(this, "direction--tablet", e);
179
+ }
180
+ get directionLaptop() {
181
+ return this.getAttribute("direction--laptop");
182
+ }
183
+ set directionLaptop(e) {
184
+ d(this, "direction--laptop", e);
185
+ }
186
+ get directionDesktop() {
187
+ return this.getAttribute("direction--desktop");
188
+ }
189
+ set directionDesktop(e) {
190
+ d(this, "direction--desktop", e);
191
+ }
192
+ get gap() {
193
+ return this.getAttribute("gap") ?? "none";
194
+ }
195
+ set gap(e) {
196
+ d(this, "gap", e);
197
+ }
198
+ get gapMobile() {
199
+ return this.getAttribute("gap--mobile");
200
+ }
201
+ set gapMobile(e) {
202
+ d(this, "gap--mobile", e);
203
+ }
204
+ get gapTablet() {
205
+ return this.getAttribute("gap--tablet");
206
+ }
207
+ set gapTablet(e) {
208
+ d(this, "gap--tablet", e);
209
+ }
210
+ get gapLaptop() {
211
+ return this.getAttribute("gap--laptop");
212
+ }
213
+ set gapLaptop(e) {
214
+ d(this, "gap--laptop", e);
215
+ }
216
+ get gapDesktop() {
217
+ return this.getAttribute("gap--desktop");
218
+ }
219
+ set gapDesktop(e) {
220
+ d(this, "gap--desktop", e);
221
+ }
222
+ get justifyContent() {
223
+ return this.getAttribute("justify-content") ?? "flex-start";
224
+ }
225
+ set justifyContent(e) {
226
+ d(this, "justify-content", e);
227
+ }
228
+ get justifyContentMobile() {
229
+ return this.getAttribute("justify-content--mobile");
230
+ }
231
+ set justifyContentMobile(e) {
232
+ d(this, "justify-content--mobile", e);
233
+ }
234
+ get justifyContentTablet() {
235
+ return this.getAttribute("justify-content--tablet");
236
+ }
237
+ set justifyContentTablet(e) {
238
+ d(this, "justify-content--tablet", e);
239
+ }
240
+ get justifyContentLaptop() {
241
+ return this.getAttribute("justify-content--laptop");
242
+ }
243
+ set justifyContentLaptop(e) {
244
+ d(this, "justify-content--laptop", e);
245
+ }
246
+ get justifyContentDesktop() {
247
+ return this.getAttribute("justify-content--desktop");
248
+ }
249
+ set justifyContentDesktop(e) {
250
+ d(this, "justify-content--desktop", e);
251
+ }
252
+ get alignItems() {
253
+ return this.getAttribute("align-items") ?? "stretch";
254
+ }
255
+ set alignItems(e) {
256
+ d(this, "align-items", e);
257
+ }
258
+ get alignItemsMobile() {
259
+ return this.getAttribute("align-items--mobile");
260
+ }
261
+ set alignItemsMobile(e) {
262
+ d(this, "align-items--mobile", e);
263
+ }
264
+ get alignItemsTablet() {
265
+ return this.getAttribute("align-items--tablet");
266
+ }
267
+ set alignItemsTablet(e) {
268
+ d(this, "align-items--tablet", e);
269
+ }
270
+ get alignItemsLaptop() {
271
+ return this.getAttribute("align-items--laptop");
272
+ }
273
+ set alignItemsLaptop(e) {
274
+ d(this, "align-items--laptop", e);
275
+ }
276
+ get alignItemsDesktop() {
277
+ return this.getAttribute("align-items--desktop");
278
+ }
279
+ set alignItemsDesktop(e) {
280
+ d(this, "align-items--desktop", e);
281
+ }
282
+ get wrap() {
283
+ return this.getAttribute("wrap") ?? "nowrap";
284
+ }
285
+ set wrap(e) {
286
+ d(this, "wrap", e);
287
+ }
288
+ get wrapMobile() {
289
+ return this.getAttribute("wrap--mobile");
290
+ }
291
+ set wrapMobile(e) {
292
+ d(this, "wrap--mobile", e);
293
+ }
294
+ get wrapTablet() {
295
+ return this.getAttribute("wrap--tablet");
296
+ }
297
+ set wrapTablet(e) {
298
+ d(this, "wrap--tablet", e);
299
+ }
300
+ get wrapLaptop() {
301
+ return this.getAttribute("wrap--laptop");
302
+ }
303
+ set wrapLaptop(e) {
304
+ d(this, "wrap--laptop", e);
305
+ }
306
+ get wrapDesktop() {
307
+ return this.getAttribute("wrap--desktop");
308
+ }
309
+ set wrapDesktop(e) {
310
+ d(this, "wrap--desktop", e);
311
+ }
312
+ get overflowX() {
313
+ return this.getAttribute("overflow-x") ?? "visible";
314
+ }
315
+ set overflowX(e) {
316
+ d(this, "overflow-x", e);
317
+ }
318
+ get overflowXMobile() {
319
+ return this.getAttribute("overflow-x--mobile");
320
+ }
321
+ set overflowXMobile(e) {
322
+ d(this, "overflow-x--mobile", e);
323
+ }
324
+ get overflowXTablet() {
325
+ return this.getAttribute("overflow-x--tablet");
326
+ }
327
+ set overflowXTablet(e) {
328
+ d(this, "overflow-x--tablet", e);
329
+ }
330
+ get overflowXLaptop() {
331
+ return this.getAttribute("overflow-x--laptop");
332
+ }
333
+ set overflowXLaptop(e) {
334
+ d(this, "overflow-x--laptop", e);
335
+ }
336
+ get overflowXDesktop() {
337
+ return this.getAttribute("overflow-x--desktop");
338
+ }
339
+ set overflowXDesktop(e) {
340
+ d(this, "overflow-x--desktop", e);
341
+ }
342
+ get $el() {
343
+ return this.shadowRoot.firstElementChild;
344
+ }
3
345
  };
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 = [
10
- "",
11
- "default",
12
- "row",
13
- "row-reverse",
14
- "column",
15
- "column-reverse"
16
- ], bt = [
17
- "",
18
- "default",
19
- "stretch",
20
- "flex-start",
21
- "flex-end",
22
- "center",
23
- "baseline"
24
- ], gt = [
25
- "",
26
- "default",
27
- "flex-start",
28
- "flex-end",
29
- "center",
30
- "space-between",
31
- "space-around",
32
- "space-evenly"
33
- ], vt = ["", "default", "nowrap", "wrap", "wrap-reverse"], ft = ["", "visible", "hidden", "scroll", "auto"];
34
- class R extends I {
35
- constructor() {
36
- super(Z), this.overflowXAttributeDelegate = new B(
37
- this,
38
- "overflow-x",
39
- (t) => t,
40
- "--overflow-x"
41
- ), this.template = `<div class="flex-container">
42
- <slot></slot>
43
- </div>`, this.shadowRoot.innerHTML = this.template;
44
- }
45
- connectedCallback() {
46
- this.hasAttribute("direction") || (this.direction = "row"), this.hasAttribute("gap") || (this.gap = "none"), this.hasAttribute("align-items") || (this.alignItems = "stretch"), this.hasAttribute("justify-content") || (this.justifyContent = "flex-start"), this.hasAttribute("wrap") || (this.wrap = "nowrap"), this.hasAttribute("overflow-x") || this.overflowXAttributeDelegate.init("visible");
47
- }
48
- static get observedAttributes() {
49
- return [
50
- ...super.observedAttributes,
51
- "direction",
52
- "direction--mobile",
53
- "direction--tablet",
54
- "direction--laptop",
55
- "direction--desktop",
56
- "gap",
57
- "gap--mobile",
58
- "gap--tablet",
59
- "gap--laptop",
60
- "gap--desktop",
61
- "justify-content",
62
- "justify-content--mobile",
63
- "justify-content--tablet",
64
- "justify-content--laptop",
65
- "justify-content--desktop",
66
- "align-items",
67
- "align-items--mobile",
68
- "align-items--tablet",
69
- "align-items--laptop",
70
- "align-items--desktop",
71
- "wrap",
72
- "wrap--mobile",
73
- "wrap--tablet",
74
- "wrap--laptop",
75
- "wrap--desktop",
76
- "overflow-x",
77
- "overflow-x--mobile",
78
- "overflow-x--tablet",
79
- "overflow-x--laptop",
80
- "overflow-x--desktop"
81
- ];
82
- }
83
- attributeChangedCallback(t, e, i) {
84
- switch (t) {
85
- case "gap":
86
- case "gap--mobile":
87
- case "gap--tablet":
88
- case "gap--laptop":
89
- case "gap--desktop":
90
- this.updateFlexProperties(t, e, i, G);
91
- break;
92
- case "justify-content":
93
- case "justify-content--mobile":
94
- case "justify-content--tablet":
95
- case "justify-content--laptop":
96
- case "justify-content--desktop":
97
- this.updateFlexProperties(
98
- t,
99
- e,
100
- i,
101
- gt
102
- );
103
- break;
104
- case "align-items":
105
- case "align-items--mobile":
106
- case "align-items--tablet":
107
- case "align-items--laptop":
108
- case "align-items--desktop":
109
- this.updateFlexProperties(t, e, i, bt);
110
- break;
111
- case "wrap":
112
- case "wrap--mobile":
113
- case "wrap--tablet":
114
- case "wrap--laptop":
115
- case "wrap--desktop":
116
- this.updateFlexProperties(t, e, i, vt);
117
- break;
118
- case "direction":
119
- case "direction--mobile":
120
- case "direction--tablet":
121
- case "direction--laptop":
122
- case "direction--desktop":
123
- this.updateFlexProperties(t, e, i, ht);
124
- break;
125
- case "overflow-x":
126
- case "overflow-x--mobile":
127
- case "overflow-x--tablet":
128
- case "overflow-x--laptop":
129
- case "overflow-x--desktop":
130
- this.updateOverflowX(t, e, i, ft);
131
- break;
132
- default:
133
- super.attributeChangedCallback(t, e, i);
134
- break;
135
- }
136
- }
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
- );
142
- return;
143
- }
144
- this.overflowXAttributeDelegate.attributeChangedCallback(
145
- t,
146
- e,
147
- i
148
- );
149
- }
150
- updateFlexProperties(t, e, i, s) {
151
- this.checkName(s, i) || x(
152
- `${i} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
153
- );
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
- });
159
- else {
160
- const c = t.split("--")[1];
161
- this.updateStyle(l, c, e, s), this.updateStyle(l, c, i, s);
162
- }
163
- }
164
- updateStyle(t, e, i, s) {
165
- i && (t === "gap" && s && s.includes(i) ? this.$el.style.setProperty(
166
- `--flex-${t}--${e}-value`,
167
- `var(--px-spacing-${i}-${e === "laptop" ? "desktop" : e})`
168
- ) : this.$el.style.setProperty(
169
- `--flex-${t}--${e}-value`,
170
- i
171
- ));
172
- }
173
- get direction() {
174
- return this.getAttribute("direction");
175
- }
176
- set direction(t) {
177
- this.setAttribute("direction", t);
178
- }
179
- get directionMobile() {
180
- return this.getAttribute("direction--mobile");
181
- }
182
- set directionMobile(t) {
183
- this.setAttribute("direction--mobile", t);
184
- }
185
- get directionTablet() {
186
- return this.getAttribute("direction--tablet");
187
- }
188
- set directionTablet(t) {
189
- this.setAttribute("direction--tablet", t);
190
- }
191
- get directionLaptop() {
192
- return this.getAttribute("direction--laptop");
193
- }
194
- set directionLaptop(t) {
195
- this.setAttribute("direction--laptop", t);
196
- }
197
- get directionDesktop() {
198
- return this.getAttribute("direction--desktop");
199
- }
200
- set directionDesktop(t) {
201
- this.setAttribute("direction--desktop", t);
202
- }
203
- get gap() {
204
- return this.getAttribute("gap");
205
- }
206
- set gap(t) {
207
- this.setAttribute("gap", t);
208
- }
209
- get gapMobile() {
210
- return this.getAttribute("gap--mobile");
211
- }
212
- set gapMobile(t) {
213
- this.setAttribute("gap--mobile", t);
214
- }
215
- get gapTablet() {
216
- return this.getAttribute("gap--tablet");
217
- }
218
- set gapTablet(t) {
219
- this.setAttribute("gap--tablet", t);
220
- }
221
- get gapLaptop() {
222
- return this.getAttribute("gap--laptop");
223
- }
224
- set gapLaptop(t) {
225
- this.setAttribute("gap--laptop", t);
226
- }
227
- get gapDesktop() {
228
- return this.getAttribute("gap--desktop");
229
- }
230
- set gapDesktop(t) {
231
- this.setAttribute("gap--desktop", t);
232
- }
233
- get justifyContent() {
234
- return this.getAttribute("justify-content");
235
- }
236
- set justifyContent(t) {
237
- this.setAttribute("justify-content", t);
238
- }
239
- get justifyContentMobile() {
240
- return this.getAttribute("justify-content--mobile");
241
- }
242
- set justifyContentMobile(t) {
243
- this.setAttribute("justify-content--mobile", t);
244
- }
245
- get justifyContentTablet() {
246
- return this.getAttribute("justify-content--tablet");
247
- }
248
- set justifyContentTablet(t) {
249
- this.setAttribute("justify-content--tablet", t);
250
- }
251
- get justifyContentLaptop() {
252
- return this.getAttribute("justify-content--laptop");
253
- }
254
- set justifyContentLaptop(t) {
255
- this.setAttribute("justify-content--laptop", t);
256
- }
257
- get justifyContentDesktop() {
258
- return this.getAttribute("justify-content--desktop");
259
- }
260
- set justifyContentDesktop(t) {
261
- this.setAttribute("justify-content--desktop", t);
262
- }
263
- get alignItems() {
264
- return this.getAttribute("align-items");
265
- }
266
- set alignItems(t) {
267
- this.setAttribute("align-items", t);
268
- }
269
- get alignItemsMobile() {
270
- return this.getAttribute("align-items--mobile");
271
- }
272
- set alignItemsMobile(t) {
273
- this.setAttribute("align-items--mobile", t);
274
- }
275
- get alignItemsTablet() {
276
- return this.getAttribute("align-items--tablet");
277
- }
278
- set alignItemsTablet(t) {
279
- this.setAttribute("align-items--tablet", t);
280
- }
281
- get alignItemsLaptop() {
282
- return this.getAttribute("align-items--laptop");
283
- }
284
- set alignItemsLaptop(t) {
285
- this.setAttribute("align-items--laptop", t);
286
- }
287
- get alignItemsDesktop() {
288
- return this.getAttribute("align-items--desktop");
289
- }
290
- set alignItemsDesktop(t) {
291
- this.setAttribute("align-items--desktop", t);
292
- }
293
- get wrap() {
294
- return this.getAttribute("wrap");
295
- }
296
- set wrap(t) {
297
- this.setAttribute("wrap", t);
298
- }
299
- get wrapMobile() {
300
- return this.getAttribute("wrap--mobile");
301
- }
302
- set wrapMobile(t) {
303
- this.setAttribute("wrap--mobile", t);
304
- }
305
- get wrapTablet() {
306
- return this.getAttribute("wrap--tablet");
307
- }
308
- set wrapTablet(t) {
309
- this.setAttribute("wrap--tablet", t);
310
- }
311
- get wrapLaptop() {
312
- return this.getAttribute("wrap--laptop");
313
- }
314
- set wrapLaptop(t) {
315
- this.setAttribute("wrap--laptop", t);
316
- }
317
- get wrapDesktop() {
318
- return this.getAttribute("wrap--desktop");
319
- }
320
- set wrapDesktop(t) {
321
- this.setAttribute("wrap--desktop", t);
322
- }
323
- get overflowX() {
324
- return this.getAttribute("overflow-x");
325
- }
326
- set overflowX(t) {
327
- this.setAttribute("overflow-x", t);
328
- }
329
- get overflowXMobile() {
330
- return this.getAttribute("overflow-x--mobile");
331
- }
332
- set overflowXMobile(t) {
333
- this.setAttribute("overflow-x--mobile", t);
334
- }
335
- get overflowXTablet() {
336
- return this.getAttribute("overflow-x--tablet");
337
- }
338
- set overflowXTablet(t) {
339
- this.setAttribute("overflow-x--tablet", t);
340
- }
341
- get overflowXLaptop() {
342
- return this.getAttribute("overflow-x--laptop");
343
- }
344
- set overflowXLaptop(t) {
345
- this.setAttribute("overflow-x--laptop", t);
346
- }
347
- get overflowXDesktop() {
348
- return this.getAttribute("overflow-x--desktop");
349
- }
350
- set overflowXDesktop(t) {
351
- this.setAttribute("overflow-x--desktop", t);
352
- }
353
- get $el() {
354
- return this.shadowRoot.querySelector(".flex-container");
355
- }
356
- }
357
- customElements.get("px-stack") || customElements.define("px-stack", R);
358
- class xt extends R {
359
- constructor() {
360
- super();
361
- }
362
- connectedCallback() {
363
- super.connectedCallback(), this.direction = "column", this.directionMobile = "column", this.directionTablet = "column", this.directionLaptop = "column", this.directionDesktop = "column";
364
- }
365
- }
366
- customElements.get("px-vstack") || customElements.define("px-vstack", xt);
367
- class mt extends R {
368
- constructor() {
369
- super();
370
- }
371
- connectedCallback() {
372
- super.connectedCallback(), this.direction = "row", this.directionMobile = "row", this.directionTablet = "row", this.directionLaptop = "row", this.directionDesktop = "row";
373
- }
374
- }
375
- customElements.get("px-hstack") || customElements.define("px-hstack", mt);
376
- class kt extends HTMLElement {
377
- constructor() {
378
- super(), this.isZeroSized = !1, this.growValue = "1", this.isVertical = !1;
379
- }
380
- static get observedAttributes() {
381
- return ["grow", "nogap"];
382
- }
383
- attributeChangedCallback(t, e, i) {
384
- t === "grow" && (this.growValue = i || "1", this.isZeroSized || (this.style.flexGrow = this.growValue), this.scheduleRecheck());
385
- }
386
- connectedCallback() {
387
- this.growValue = this.getAttribute("grow") || "1", this.style.flexGrow = this.growValue, this.nogap && (this.resizeObserver = new ResizeObserver(() => {
388
- this.handleSizeChange();
389
- }), this.isVertical = this.parentElement.localName === "px-vstack" || this.parentElement.style.flexDirection === "column", this.resizeObserver.observe(this), this.scheduleRecheck());
390
- }
391
- disconnectedCallback() {
392
- var t;
393
- (t = this.resizeObserver) == null || t.disconnect(), this.recheckHandle && (cancelAnimationFrame(this.recheckHandle), this.recheckHandle = void 0);
394
- }
395
- get grow() {
396
- return this.getAttribute("grow");
397
- }
398
- set grow(t) {
399
- this.setAttribute("grow", t);
400
- }
401
- scheduleRecheck() {
402
- this.recheckHandle && cancelAnimationFrame(this.recheckHandle), this.recheckHandle = requestAnimationFrame(() => {
403
- this.recheckHandle = void 0, this.recalculateVisibility();
404
- });
405
- }
406
- recalculateVisibility() {
407
- this.isConnected && (this.style.display = "", this.style.flexGrow = this.growValue, this.handleSizeChange());
408
- }
409
- handleSizeChange() {
410
- const t = this.getBoundingClientRect(), e = t.width === 0 && !this.isVertical || t.height === 0 && this.isVertical;
411
- this.isZeroSized !== e && (this.isZeroSized = e, this.updateParticipation());
412
- }
413
- updateParticipation() {
414
- this.isZeroSized ? (this.style.display = "none", this.style.flexGrow = "0") : (this.style.display = "", this.style.flexGrow = this.growValue);
415
- }
416
- get nogap() {
417
- return this.hasAttribute("nogap");
418
- }
419
- set nogap(t) {
420
- t ? this.setAttribute("nogap", "") : this.removeAttribute("nogap");
421
- }
422
- }
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 {
427
- constructor() {
428
- super(_), this.template = (t) => `
346
+ customElements.get("px-stack") || customElements.define("px-stack", C);
347
+ var w = (e) => e === "direction" || e.startsWith("direction--"), T = class extends C {
348
+ get direction() {
349
+ return "column";
350
+ }
351
+ set direction(e) {
352
+ d(this, "direction", e);
353
+ }
354
+ attributeChangedCallback(e, t, n) {
355
+ w(e) || super.attributeChangedCallback(e, t, n);
356
+ }
357
+ };
358
+ customElements.get("px-vstack") || customElements.define("px-vstack", T);
359
+ var ee = class extends C {
360
+ get direction() {
361
+ return "row";
362
+ }
363
+ set direction(e) {
364
+ d(this, "direction", e);
365
+ }
366
+ attributeChangedCallback(e, t, n) {
367
+ w(e) || super.attributeChangedCallback(e, t, n);
368
+ }
369
+ };
370
+ customElements.get("px-hstack") || customElements.define("px-hstack", ee);
371
+ //#endregion
372
+ //#region ../Layout/src/Spacer.ts
373
+ var te = class extends HTMLElement {
374
+ constructor() {
375
+ super(), this.isZeroSized = !1, this.growValue = "1", this.isVertical = !1;
376
+ }
377
+ static get observedAttributes() {
378
+ return ["grow", "nogap"];
379
+ }
380
+ attributeChangedCallback(e, t, n) {
381
+ e === "grow" && (this.growValue = n || "1", this.isZeroSized || (this.style.flexGrow = this.growValue), this.scheduleRecheck());
382
+ }
383
+ connectedCallback() {
384
+ this.growValue = this.getAttribute("grow") || "1", this.style.flexGrow = this.growValue, this.nogap && this.parentElement && (this.resizeObserver = new ResizeObserver(() => {
385
+ this.handleSizeChange();
386
+ }), this.isVertical = this.parentElement.localName === "px-vstack" || this.parentElement.style.flexDirection === "column", this.resizeObserver.observe(this), this.scheduleRecheck());
387
+ }
388
+ disconnectedCallback() {
389
+ this.resizeObserver?.disconnect(), this.recheckHandle &&= (cancelAnimationFrame(this.recheckHandle), void 0);
390
+ }
391
+ get grow() {
392
+ return this.getAttribute("grow");
393
+ }
394
+ set grow(e) {
395
+ this.setAttribute("grow", `${e}`);
396
+ }
397
+ scheduleRecheck() {
398
+ this.recheckHandle && cancelAnimationFrame(this.recheckHandle), this.recheckHandle = requestAnimationFrame(() => {
399
+ this.recheckHandle = void 0, this.recalculateVisibility();
400
+ });
401
+ }
402
+ recalculateVisibility() {
403
+ this.isConnected && (this.style.display = "", this.style.flexGrow = this.growValue, this.handleSizeChange());
404
+ }
405
+ handleSizeChange() {
406
+ let e = this.getBoundingClientRect(), t = e.width === 0 && !this.isVertical || e.height === 0 && this.isVertical;
407
+ this.isZeroSized !== t && (this.isZeroSized = t, this.updateParticipation());
408
+ }
409
+ updateParticipation() {
410
+ this.isZeroSized ? (this.style.display = "none", this.style.flexGrow = "0") : (this.style.display = "", this.style.flexGrow = this.growValue);
411
+ }
412
+ get nogap() {
413
+ return this.hasAttribute("nogap");
414
+ }
415
+ set nogap(e) {
416
+ e ? this.setAttribute("nogap", "") : this.removeAttribute("nogap");
417
+ }
418
+ };
419
+ customElements.get("px-spacer") || customElements.define("px-spacer", te);
420
+ //#endregion
421
+ //#region ../Layout/src/Page.css?inline
422
+ var ne = ":host{box-sizing:border-box;display:block}slot[name=body-container]{min-height:100vh}#image-sticky-box{margin-top:-2.5rem}", E = new CSSStyleSheet();
423
+ E.replaceSync(ne);
424
+ var re = class extends n {
425
+ constructor() {
426
+ super(E), this.template = () => `
429
427
  <px-container border-radius="none" padding="none">
430
428
  <px-vstack>
431
429
  <px-container id="header-container" border-radius="none">
@@ -462,15 +460,6 @@ class wt extends I {
462
460
  <px-spacer></px-spacer>
463
461
  </px-hstack>
464
462
  </px-container>
465
- ${t ? ` <px-hstack>
466
- <px-spacer></px-spacer>
467
- <px-container border-radius="none" box-shadow="xl" id="image-sticky-box" border="s" grow="${this.grow}" basis="${this.basis}" border-radius="m">
468
- <px-vstack gap="s">
469
- <slot name="image-sticky-container"></slot>
470
- </px-vstack>
471
- </px-container>
472
- <px-spacer></px-spacer>
473
- </px-hstack>` : ""}
474
463
  <px-container
475
464
  id="body-container"
476
465
  id="main"
@@ -527,220 +516,218 @@ class wt extends I {
527
516
  </px-container>
528
517
  </px-vstack>
529
518
  </px-container>
530
- `, this.shadowRoot.innerHTML = this.template(!!this.$imageStickySlot);
531
- }
532
- static get observedAttributes() {
533
- return [
534
- ...super.observedAttributes,
535
- "background-image",
536
- "gap",
537
- "background-color",
538
- "padding-vertical",
539
- "padding-horizontal"
540
- ];
541
- }
542
- get $wideImage() {
543
- return this.shadowRoot.querySelector("#image-box");
544
- }
545
- get $bodyVStackContainer() {
546
- return this.shadowRoot.querySelector("#header-vstack-container");
547
- }
548
- get $bodyContainer() {
549
- return this.shadowRoot.querySelector("#body-container");
550
- }
551
- get $contactContainer() {
552
- return this.shadowRoot.querySelector("#contact-container");
553
- }
554
- get $footerContainer() {
555
- return this.shadowRoot.querySelector("#footer-container");
556
- }
557
- get $headerContainer() {
558
- return this.shadowRoot.querySelector("#header-container");
559
- }
560
- get $imageContainer() {
561
- return this.shadowRoot.querySelector("#image-container");
562
- }
563
- get backgroundImage() {
564
- return this.getAttribute("background-image");
565
- }
566
- get $imageStickySlot() {
567
- return this.querySelector('*[slot="image-sticky-container"]');
568
- }
569
- get $main() {
570
- return this.shadowRoot.querySelector("#main");
571
- }
572
- get backgroundColor() {
573
- return this.getAttribute("background-color") || "none";
574
- }
575
- get paddingVertical() {
576
- return this.getAttribute("padding-vertical");
577
- }
578
- get paddingHorizontal() {
579
- return this.getAttribute("padding-horizontal");
580
- }
581
- set paddingVertical(t) {
582
- this.setAttribute("padding-vertical", t);
583
- }
584
- set paddingHorizontal(t) {
585
- this.setAttribute("padding-horizontal", t);
586
- }
587
- get gap() {
588
- return this.getAttribute("gap");
589
- }
590
- connectedCallback() {
591
- this.handlePaddingVerticalChange(this.paddingVertical), this.handlePaddingHorizontalChange(this.paddingHorizontal);
592
- }
593
- attributeChangedCallback(t, e, i) {
594
- if (e !== i)
595
- switch (t) {
596
- case "background-image":
597
- this.$imageContainer.setAttribute("background-image", i);
598
- break;
599
- case "gap":
600
- this.$bodyVStackContainer.setAttribute("gap", i);
601
- break;
602
- case "background-color":
603
- this.$bodyContainer.setAttribute(
604
- "background-color",
605
- ot.indexOf(i) > 0 ? i : "none"
606
- );
607
- break;
608
- case "padding-vertical":
609
- this.handlePaddingVerticalChange(i);
610
- break;
611
- case "padding-horizontal":
612
- this.handlePaddingHorizontalChange(i);
613
- break;
614
- default:
615
- super.attributeChangedCallback(t, e, i);
616
- }
617
- }
618
- handlePaddingVerticalChange(t) {
619
- this.$headerContainer.setAttribute("padding-top", t), this.$footerContainer.setAttribute("padding-bottom", t);
620
- }
621
- handlePaddingHorizontalChange(t) {
622
- 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
- }
624
- }
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 = [
629
- "",
630
- "default",
631
- "secondary",
632
- "naked"
633
- ], A = class A extends at {
634
- constructor() {
635
- super(U), this.template = () => "<slot></slot>";
636
- const t = document.createElement(A.nativeName);
637
- t.classList.add("btn-icon"), t.innerHTML = this.template(), this.shadowRoot.appendChild(t);
638
- }
639
- static get observedAttributes() {
640
- return [
641
- ...super.observedAttributes,
642
- "inverted",
643
- "loading",
644
- "size",
645
- "variant",
646
- "aria-expanded"
647
- ];
648
- }
649
- connectedCallback() {
650
- const t = this.querySelector("px-icon");
651
- if (t) {
652
- const e = t.getAttribute("size"), i = t.getAttribute("color");
653
- t.addEventListener("click", () => {
654
- this.$el.focus();
655
- }), e || t.setAttribute("size", "s"), this.size === "small" && t.setAttribute("size", "xs"), i || t.setAttribute("color", "inherit");
656
- }
657
- nt(this, this.$el, !1);
658
- }
659
- attributeChangedCallback(t, e, i) {
660
- if (e !== i)
661
- switch (t) {
662
- case "loading":
663
- this.updateLoading();
664
- break;
665
- case "size":
666
- this.updateSize(e, i);
667
- break;
668
- case "variant":
669
- this.updateVariant(e, i);
670
- break;
671
- case "aria-expanded":
672
- i && (this.$el.setAttribute("aria-expanded", i), this.removeAttribute("aria-expanded"));
673
- break;
674
- default:
675
- super.attributeChangedCallback(t, e, i);
676
- break;
677
- }
678
- }
679
- _toggleClass(t, e) {
680
- t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(t), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(e);
681
- }
682
- updateLoading() {
683
- this.$el.classList.toggle("btn-icon--state-loading");
684
- }
685
- 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()}`
688
- );
689
- }
690
- 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()}`
693
- );
694
- }
695
- get inverted() {
696
- return this.getAttribute("inverted");
697
- }
698
- set inverted(t) {
699
- this.setAttribute("inverted", t);
700
- }
701
- get loading() {
702
- return this.getAttribute("loading");
703
- }
704
- set loading(t) {
705
- this.setAttribute("loading", t);
706
- }
707
- get size() {
708
- return this.getAttribute("size");
709
- }
710
- set size(t) {
711
- this.setAttribute("size", t);
712
- }
713
- get variant() {
714
- return this.getAttribute("variant");
715
- }
716
- set variant(t) {
717
- this.setAttribute("variant", t);
718
- }
719
- get ariaExpanded() {
720
- return this.getAttribute("aria-expanded");
721
- }
722
- set ariaExpanded(t) {
723
- t ? this.setAttribute("aria-expanded", t) : this.removeAttribute("aria-expanded");
724
- }
519
+ `, f(this.shadowRoot, this.template());
520
+ }
521
+ static get observedAttributes() {
522
+ return [
523
+ ...super.observedAttributes,
524
+ "background-image",
525
+ "gap",
526
+ "background-color",
527
+ "padding-vertical",
528
+ "padding-horizontal"
529
+ ];
530
+ }
531
+ get $wideImage() {
532
+ return this.shadowRoot.querySelector("#image-box");
533
+ }
534
+ get $bodyVStackContainer() {
535
+ return this.shadowRoot.querySelector("#header-vstack-container");
536
+ }
537
+ get $bodyContainer() {
538
+ return this.shadowRoot.querySelector("#body-container");
539
+ }
540
+ get $contactContainer() {
541
+ return this.shadowRoot.querySelector("#contact-container");
542
+ }
543
+ get $footerContainer() {
544
+ return this.shadowRoot.querySelector("#footer-container");
545
+ }
546
+ get $headerContainer() {
547
+ return this.shadowRoot.querySelector("#header-container");
548
+ }
549
+ get $imageContainer() {
550
+ return this.shadowRoot.querySelector("#image-container");
551
+ }
552
+ get backgroundImage() {
553
+ return this.getAttribute("background-image");
554
+ }
555
+ get $main() {
556
+ return this.shadowRoot.querySelector("#main");
557
+ }
558
+ get backgroundColor() {
559
+ return this.getAttribute("background-color") || "none";
560
+ }
561
+ get paddingVertical() {
562
+ return this.getAttribute("padding-vertical");
563
+ }
564
+ get paddingHorizontal() {
565
+ return this.getAttribute("padding-horizontal");
566
+ }
567
+ set paddingVertical(e) {
568
+ this.setAttribute("padding-vertical", `${e}`);
569
+ }
570
+ set paddingHorizontal(e) {
571
+ this.setAttribute("padding-horizontal", `${e}`);
572
+ }
573
+ get gap() {
574
+ return this.getAttribute("gap");
575
+ }
576
+ connectedCallback() {
577
+ this.handlePaddingVerticalChange(this.paddingVertical), this.handlePaddingHorizontalChange(this.paddingHorizontal);
578
+ }
579
+ attributeChangedCallback(e, t, n) {
580
+ if (t !== n) switch (e) {
581
+ case "background-image":
582
+ this.$imageContainer.setAttribute("background-image", n);
583
+ break;
584
+ case "gap":
585
+ this.$bodyVStackContainer.setAttribute("gap", n);
586
+ break;
587
+ case "background-color":
588
+ this.$bodyContainer.setAttribute("background-color", i.indexOf(n) > 0 ? n : "none");
589
+ break;
590
+ case "padding-vertical":
591
+ this.handlePaddingVerticalChange(n);
592
+ break;
593
+ case "padding-horizontal":
594
+ this.handlePaddingHorizontalChange(n);
595
+ break;
596
+ default: super.attributeChangedCallback(e, t, n);
597
+ }
598
+ }
599
+ handlePaddingVerticalChange(e) {
600
+ this.$bodyContainer.paddingTop = e, this.$bodyContainer.paddingBottom = e;
601
+ }
602
+ handlePaddingHorizontalChange(e) {
603
+ this.$headerContainer.paddingLeft = e, this.$headerContainer.paddingRight = e, this.$bodyContainer.paddingLeft = e, this.$bodyContainer.paddingRight = e, this.$contactContainer.paddingLeft = e, this.$contactContainer.paddingRight = e, this.$footerContainer.paddingLeft = e, this.$footerContainer.paddingRight = e, this.$imageContainer.paddingLeft = e, this.$imageContainer.paddingRight = e;
604
+ }
605
+ };
606
+ customElements.get("px-page") === void 0 && customElements.define("px-page", re);
607
+ //#endregion
608
+ //#region ../ButtonIcon/src/buttonicon.css?inline
609
+ var ie = ":host{display:inline-block}.btn-icon,.btn-icon *{box-sizing:border-box}.btn-icon{font-size:var(--px-font-size-base);width:var(--px-size-l);height:var(--px-size-l);vertical-align:middle;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;justify-content:center;align-items:center;display:inline-flex}.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{color:var(--px-color-icon-brand-default);background-color:#0000;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:#0000}:host([inverted]) .btn-icon.btn-icon--variant-naked{color:var(--px-color-icon-brand-inverted);background-color:#0000}: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 (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 (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)}}", D = new CSSStyleSheet();
610
+ D.replaceSync(ie);
611
+ var O = [
612
+ "",
613
+ "default",
614
+ "small"
615
+ ], k = [
616
+ "",
617
+ "default",
618
+ "secondary",
619
+ "naked"
620
+ ], A = class e extends t {
621
+ static {
622
+ this.template = s("<button class=\"btn-icon\"><slot></slot></button>");
623
+ }
624
+ static {
625
+ this.nativeName = "button";
626
+ }
627
+ constructor() {
628
+ super(D), f(this.shadowRoot, e.template);
629
+ }
630
+ static get observedAttributes() {
631
+ return [
632
+ ...super.observedAttributes,
633
+ ...r,
634
+ "inverted",
635
+ "loading",
636
+ "size",
637
+ "variant",
638
+ "aria-expanded"
639
+ ];
640
+ }
641
+ connectedCallback() {
642
+ let e = this.querySelector("px-icon");
643
+ if (e) {
644
+ let t = e.getAttribute("size"), n = e.getAttribute("color");
645
+ e.addEventListener("click", () => {
646
+ this.$el.focus();
647
+ }), t || e.setAttribute("size", "s"), this.size === "small" && e.setAttribute("size", "xs"), n || e.setAttribute("color", "inherit");
648
+ }
649
+ }
650
+ attributeChangedCallback(e, t, n) {
651
+ if (t !== n) switch (e) {
652
+ case "loading":
653
+ this.updateLoading();
654
+ break;
655
+ case "size":
656
+ this.updateSize(t, n);
657
+ break;
658
+ case "variant":
659
+ this.updateVariant(t, n);
660
+ break;
661
+ case "aria-expanded":
662
+ n && (this.$el.setAttribute("aria-expanded", n), this.removeAttribute("aria-expanded"));
663
+ break;
664
+ default: super.attributeChangedCallback(e, t, n);
665
+ }
666
+ }
667
+ _toggleClass(e, t) {
668
+ e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(e), t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(t);
669
+ }
670
+ updateLoading() {
671
+ this.$el.classList.toggle("btn-icon--state-loading");
672
+ }
673
+ updateSize(e, t) {
674
+ this.checkName(O, t) ? (e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`btn-icon--size-${e}`), t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`btn-icon--size-${t}`)) : u(`"${t}" is not a valid size value for ${this.tagName.toLowerCase()}. Allowed values are: "${O.join("\", \"")}".`);
675
+ }
676
+ updateVariant(e, t) {
677
+ this.checkName(k, t) ? (e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`btn-icon--variant-${e}`), t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`btn-icon--variant-${t}`)) : u(`"${t}" is not a valid variant value for ${this.tagName.toLowerCase()}. Allowed values are: "${k.join("\", \"")}".`);
678
+ }
679
+ get inverted() {
680
+ return this.hasAttribute("inverted");
681
+ }
682
+ set inverted(e) {
683
+ this._updateBooleanAttribute("inverted", e);
684
+ }
685
+ get loading() {
686
+ return this.hasAttribute("loading");
687
+ }
688
+ set loading(e) {
689
+ this._updateBooleanAttribute("loading", e);
690
+ }
691
+ get size() {
692
+ return this.getAttribute("size");
693
+ }
694
+ set size(e) {
695
+ this._updateAttribute("size", e);
696
+ }
697
+ get variant() {
698
+ return this.getAttribute("variant");
699
+ }
700
+ set variant(e) {
701
+ this._updateAttribute("variant", e);
702
+ }
703
+ get ariaExpanded() {
704
+ return this.getAttribute("aria-expanded");
705
+ }
706
+ set ariaExpanded(e) {
707
+ this._updateAttribute("aria-expanded", e);
708
+ }
725
709
  };
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 {
730
- constructor() {
731
- super();
732
- }
733
- static get observedAttributes() {
734
- return ["name", "src", "type", "format"];
735
- }
736
- connectedCallback() {
737
- if (document.querySelectorAll(
738
- `px-icon-set[name="${this.getAttribute("name")}"]`
739
- ).length > 1 && (console.warn(
740
- "Only one <px-icon-set> component is allowed, self removing"
741
- ), this.remove()), this.getAttribute("type") === "font") {
742
- const e = document.createElement("style");
743
- e.setAttribute("type", "text/css"), e.setAttribute("data-name", this.getAttribute("name")), e.textContent = `
710
+ customElements.get("px-button-icon") || customElements.define("px-button-icon", A);
711
+ //#endregion
712
+ //#region ../Icon/common/src/IconSet.ts
713
+ var j = class extends HTMLElement {
714
+ constructor() {
715
+ super();
716
+ }
717
+ static get observedAttributes() {
718
+ return [
719
+ "name",
720
+ "src",
721
+ "type",
722
+ "format"
723
+ ];
724
+ }
725
+ connectedCallback() {
726
+ if (document.querySelectorAll(`px-icon-set[name="${this.getAttribute("name")}"]`).length > 1 && (console.warn("Only one <px-icon-set> component is allowed, self removing"), this.remove()), this.getAttribute("type") === "font") {
727
+ let e = document.createElement("style");
728
+ e.setAttribute("type", "text/css");
729
+ let t = this.getAttribute("name");
730
+ t && e.setAttribute("data-name", t), e.textContent = `
744
731
  @font-face {
745
732
  font-family: 'lavender';
746
733
  src:
@@ -750,445 +737,377 @@ class Ct extends HTMLElement {
750
737
  font-display: block;
751
738
  }
752
739
  `, document.head.appendChild(e);
753
- }
754
- }
755
- disconnectedCallback() {
756
- const t = document.querySelector(
757
- `style[data-name="${this.getAttribute("name")}"]`
758
- );
759
- t && t.remove();
760
- }
761
- }
762
- customElements.get("px-icon-set") || customElements.define("px-icon-set", Ct);
763
- const zt = [
764
- "Brand",
765
- "Accent",
766
- "Neutral",
767
- "Dimmed",
768
- "PurposeSuccess",
769
- "PurposeWarning",
770
- "PurposeError",
771
- "PurposeUnlimited",
772
- "PurposePromo",
773
- "StateHover",
774
- "StateActive",
775
- "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 {
791
- constructor(...e) {
792
- 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=""></use>
798
- </svg>`);
799
- this.shadowRoot.innerHTML = d(this, $).call(this), j(this, p, (i = this.attachInternals) == null ? void 0 : i.call(this)), d(this, p) && (d(this, p).role = "img");
800
- }
801
- static get observedAttributes() {
802
- return [...super.observedAttributes, ...Tt];
803
- }
804
- attributeChangedCallback(e, i, s) {
805
- if (i !== s)
806
- switch (e) {
807
- case "name":
808
- this.updateName(i, s);
809
- break;
810
- case "size":
811
- this.updateAttribute(e, i, s, lt);
812
- break;
813
- case "color":
814
- this.updateAttribute(e, i, s, jt);
815
- break;
816
- case "disabled":
817
- this.color = "state-disabled";
818
- break;
819
- case "aria-label":
820
- if (!d(this, p))
821
- return;
822
- s ? (d(this, p).ariaHidden = "false", this.ariaHidden = "false") : (d(this, p).ariaHidden = "true", this.ariaHidden = "true");
823
- break;
824
- }
825
- }
826
- connectedCallback() {
827
- this.role = "img", this.name && this.$el.firstElementChild.setAttribute(
828
- "xlink:href",
829
- `#icon-${this.name}`
830
- );
831
- const e = document.querySelectorAll("px-icon-set");
832
- e || console.log("<px-icon-set> component not found");
833
- for (const i of e) {
834
- if (!i.getAttribute("name") || !i.getAttribute("src")) {
835
- console.error("Icon name or src not found");
836
- continue;
837
- }
838
- i.getAttribute("name") === this.from && i.getAttribute("type") !== "font" && (j(this, h, i.getAttribute("src")), this.$el.firstElementChild.setAttribute(
839
- "xlink:href",
840
- `${d(this, h)}#icon-${this.name}`
841
- ));
842
- }
843
- !this.ariaLabel && d(this, p) && (d(this, p).ariaHidden = "true", this.ariaHidden = "true");
844
- }
845
- updateAttribute(e, i, s, n) {
846
- 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(
847
- `${s} is not an allowed ${e} value for ${this.tagName.toLowerCase()}`
848
- );
849
- }
850
- updateName(e, i) {
851
- d(this, h) && this.$el.firstElementChild.setAttribute(
852
- "xlink:href",
853
- `${d(this, h)}#icon-${i}`
854
- );
855
- }
856
- get $el() {
857
- return this.shadowRoot.querySelector("svg");
858
- }
859
- get name() {
860
- return this.getAttribute("name");
861
- }
862
- set name(e) {
863
- this.setAttribute("name", e);
864
- }
865
- get size() {
866
- return this.getAttribute("size");
867
- }
868
- set size(e) {
869
- this.setAttribute("size", e);
870
- }
871
- get color() {
872
- return this.getAttribute("color");
873
- }
874
- set color(e) {
875
- this.setAttribute("color", e);
876
- }
877
- get arialabel() {
878
- return this.getAttribute("aria-label");
879
- }
880
- set arialabel(e) {
881
- this.setAttribute("aria-label", e);
882
- }
883
- get inverted() {
884
- return this.getAttribute("inverted");
885
- }
886
- set inverted(e) {
887
- this.setAttribute("inverted", e);
888
- }
889
- get from() {
890
- return this.getAttribute("from");
891
- }
892
- set from(e) {
893
- this.setAttribute("from", e);
894
- }
895
- get disabled() {
896
- return this.getAttribute("disabled");
897
- }
898
- set disabled(e) {
899
- this.setAttribute("disabled", e);
900
- }
901
- }
902
- h = new WeakMap(), p = new WeakMap(), $ = new WeakMap();
903
- customElements.get("px-icon") || customElements.define("px-icon", Et);
904
- 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();
905
- J.replaceSync(It);
906
- class Rt extends HTMLElement {
907
- constructor() {
908
- super(), this.template = (t, e) => `<div class="container">
909
- ${Array.from(
910
- { length: Math.min(t, 5) },
911
- (i, s) => `<div id="seed-${s}" ${e === s ? "active" : ""} class="appleseed ${t > 5 ? "appleseed-6-plus" : "appleseed-6-minus"}">
740
+ }
741
+ }
742
+ disconnectedCallback() {
743
+ let e = document.querySelector(`style[data-name="${this.getAttribute("name")}"]`);
744
+ e && e.remove();
745
+ }
746
+ };
747
+ customElements.get("px-icon-set") || customElements.define("px-icon-set", j);
748
+ var M = [
749
+ "Inherit",
750
+ "Brand",
751
+ "Accent",
752
+ "Neutral",
753
+ "Dimmed",
754
+ "PurposeSuccess",
755
+ "PurposeWarning",
756
+ "PurposeError",
757
+ "PurposeUnlimited",
758
+ "PurposePromo",
759
+ "StateHover",
760
+ "StateActive",
761
+ "StateDisabled"
762
+ ].map((e) => e.replace(/([A-Z])/g, "-$1").toLowerCase().slice(1)), ae = ":host{flex-direction:column;justify-content:center;display:inline-flex}svg{font-size:var(--px-size-icon-s);width:1em;height:1em;color:var(--px-color-icon-accent-default);line-height:1}.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)}", N = new CSSStyleSheet();
763
+ N.replaceSync(ae);
764
+ var oe = class e extends n {
765
+ static {
766
+ this.template = s("<svg aria-hidden=\"true\"><use></use></svg>");
767
+ }
768
+ #e = null;
769
+ #t;
770
+ static get observedAttributes() {
771
+ return [
772
+ ...super.observedAttributes,
773
+ "name",
774
+ "size",
775
+ "color",
776
+ "aria-label",
777
+ "inverted",
778
+ "from",
779
+ "disabled"
780
+ ];
781
+ }
782
+ constructor(...t) {
783
+ super(...t, N), f(this.shadowRoot, e.template), this.#t = this.attachInternals?.(), this.#t && (this.#t.role = "img");
784
+ }
785
+ attributeChangedCallback(e, t, n) {
786
+ if (t !== n) switch (e) {
787
+ case "name":
788
+ this.updateName(t, n);
789
+ break;
790
+ case "size":
791
+ this.updateAttribute(e, t, n, l);
792
+ break;
793
+ case "color":
794
+ this.updateAttribute(e, t, n, M);
795
+ break;
796
+ case "disabled":
797
+ this.color = "state-disabled";
798
+ break;
799
+ case "aria-label":
800
+ if (!this.#t) return;
801
+ n ? (this.#t.ariaHidden = "false", this.ariaHidden = "false") : (this.#t.ariaHidden = "true", this.ariaHidden = "true");
802
+ }
803
+ }
804
+ connectedCallback() {
805
+ this.role = "img";
806
+ let e = document.querySelectorAll("px-icon-set");
807
+ e || console.log("<px-icon-set> component not found");
808
+ for (let t of e) !t.getAttribute("name") || !t.getAttribute("src") ? console.error("Icon name or src not found") : t.getAttribute("name") === this.from && t.getAttribute("type") !== "font" && (this.#e = t.getAttribute("src"), this.$el.firstElementChild?.setAttribute("href", `${this.#e}#icon-${this.name}`));
809
+ !this.ariaLabel && this.#t && (this.#t.ariaHidden = "true", this.ariaHidden = "true"), this.parentElement?.localName === "px-a" && this.slot !== "before" && this.slot !== "after" && (this.color || this.setAttribute("color", "inherit"));
810
+ }
811
+ updateAttribute(e, t, n, r) {
812
+ t !== null && t !== "" && (e === "size" ? this.$el.classList.toggle(`${e}-${t}`) : this.$el.classList.toggle(t)), n !== null && n !== "" && (e === "size" ? this.$el.classList.toggle(`${e}-${n}`) : this.$el.classList.toggle(n)), this.checkName(r, n) || u(`${n} is not an allowed ${e} value for ${this.tagName.toLowerCase()}`);
813
+ }
814
+ updateName(e, t) {
815
+ this.#e && this.$el.firstElementChild?.setAttribute("href", `${this.#e}#icon-${t}`);
816
+ }
817
+ get $el() {
818
+ return this.shadowRoot.querySelector("svg");
819
+ }
820
+ get name() {
821
+ return this.getAttribute("name");
822
+ }
823
+ set name(e) {
824
+ d(this, "name", e);
825
+ }
826
+ get size() {
827
+ return this.getAttribute("size");
828
+ }
829
+ set size(e) {
830
+ d(this, "size", e);
831
+ }
832
+ get color() {
833
+ return this.getAttribute("color");
834
+ }
835
+ set color(e) {
836
+ d(this, "color", e);
837
+ }
838
+ get arialabel() {
839
+ return this.getAttribute("aria-label");
840
+ }
841
+ set arialabel(e) {
842
+ d(this, "aria-label", e);
843
+ }
844
+ get inverted() {
845
+ return this.hasAttribute("inverted");
846
+ }
847
+ set inverted(e) {
848
+ a(this, "inverted", e);
849
+ }
850
+ get from() {
851
+ return this.getAttribute("from");
852
+ }
853
+ set from(e) {
854
+ d(this, "from", e);
855
+ }
856
+ get disabled() {
857
+ return this.hasAttribute("disabled");
858
+ }
859
+ set disabled(e) {
860
+ a(this, "disabled", e);
861
+ }
862
+ };
863
+ customElements.get("px-icon") || customElements.define("px-icon", oe);
864
+ //#endregion
865
+ //#region src/appleseed.css?inline
866
+ var se = ":host{--px-appleseed-size-l:14px;--px-appleseed-size-m:10px;--px-appleseed-size-s:6px;--px-appleseed-size-xs:4px}.container{display:flex}:is(.container:has(#seed-0.appleseed-6-plus[active]),.container:has(#seed-1.appleseed-6-plus[active])) :nth-child(4)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}:is(.container:has(#seed-0.appleseed-6-plus[active]),.container:has(#seed-1.appleseed-6-plus[active])) :nth-child(5)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}:is(.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(2),.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(4))>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}:is(.container:has(#seed-2.appleseed-6-plus[active]) :first-child,.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]) :first-child>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]) :first-child>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);justify-content:center;align-items:center;display:flex}@media screen and (width<=47.938rem){.appleseed{width:var(--px-size-icon-s);height:var(--px-size-icon-s)}}:is(.appleseed-6-plus,.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)}:is(.appleseed-6-plus,.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)}", P = new CSSStyleSheet();
867
+ P.replaceSync(se);
868
+ var F = class extends HTMLElement {
869
+ constructor() {
870
+ super(), this.template = (e, t) => `<div class="container">
871
+ ${Array.from({ length: Math.min(e, 5) }, (n, r) => `<div id="seed-${r}" ${t === r ? "active" : ""} class="appleseed ${e > 5 ? "appleseed-6-plus" : "appleseed-6-minus"}">
912
872
  <div></div>
913
- </div>`
914
- ).join("")}
915
- </div>`, this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [J], this.shadowRoot.innerHTML = this.template(this.amount, this.active);
916
- }
917
- static get observedAttributes() {
918
- return ["amount", "active"];
919
- }
920
- attributeChangedCallback(t, e, i) {
921
- if (e !== i)
922
- switch (t) {
923
- case "amount":
924
- this.shadowRoot.innerHTML = this.template(
925
- parseInt(i) || 0,
926
- this.active
927
- );
928
- break;
929
- case "active":
930
- this.handleActive(e, i);
931
- break;
932
- }
933
- }
934
- handleActive(t, e) {
935
- var i;
936
- t === null || e === void 0 || (this.$active.removeAttribute("active"), (i = this.shadowRoot.querySelector(`#seed-${e}`)) == null || i.setAttribute("active", ""));
937
- }
938
- get $active() {
939
- return this.shadowRoot.querySelector("[active]");
940
- }
941
- get amount() {
942
- return parseInt(this.getAttribute("amount")) || 0;
943
- }
944
- get active() {
945
- return parseInt(this.getAttribute("active")) || 0;
946
- }
947
- }
948
- customElements.get("px-appleseed") || customElements.define("px-appleseed", Rt);
949
- function y(r) {
950
- var t = typeof r;
951
- return r != null && (t == "object" || t == "function");
952
- }
953
- 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() {
954
- return Q.Date.now();
955
- }, Pt = /\s/;
956
- function Dt(r) {
957
- for (var t = r.length; t-- && Pt.test(r.charAt(t)); )
958
- ;
959
- return t;
960
- }
961
- var qt = /^\s+/;
962
- function Ot(r) {
963
- return r && r.slice(0, Dt(r) + 1).replace(qt, "");
873
+ </div>`).join("")}
874
+ </div>`, this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [P], this.shadowRoot.innerHTML = this.template(this.amount, this.active);
875
+ }
876
+ static get observedAttributes() {
877
+ return ["amount", "active"];
878
+ }
879
+ attributeChangedCallback(e, t, n) {
880
+ if (t !== n) switch (e) {
881
+ case "amount":
882
+ this.shadowRoot.innerHTML = this.template(parseInt(n) || 0, this.active);
883
+ break;
884
+ case "active": this.handleActive(t, n);
885
+ }
886
+ }
887
+ handleActive(e, t) {
888
+ e !== null && t !== void 0 && (this.$active?.removeAttribute("active"), this.shadowRoot.querySelector(`#seed-${t}`)?.setAttribute("active", ""));
889
+ }
890
+ get $active() {
891
+ return this.shadowRoot.querySelector("[active]");
892
+ }
893
+ get amount() {
894
+ return parseInt(this.getAttribute("amount") ?? "0") || 0;
895
+ }
896
+ get active() {
897
+ return parseInt(this.getAttribute("active") ?? "0") || 0;
898
+ }
899
+ };
900
+ customElements.get("px-appleseed") || customElements.define("px-appleseed", F);
901
+ //#endregion
902
+ //#region ../../../node_modules/lodash-es/isObject.js
903
+ function I(e) {
904
+ var t = typeof e;
905
+ return e != null && (t == "object" || t == "function");
964
906
  }
965
- var w = Q.Symbol, Y = Object.prototype, Nt = Y.hasOwnProperty, Wt = Y.toString, f = w ? w.toStringTag : void 0;
966
- function Xt(r) {
967
- var t = Nt.call(r, f), e = r[f];
968
- try {
969
- r[f] = void 0;
970
- var i = !0;
971
- } catch {
972
- }
973
- var s = Wt.call(r);
974
- return i && (t ? r[f] = e : delete r[f]), s;
907
+ //#endregion
908
+ //#region ../../../node_modules/lodash-es/_freeGlobal.js
909
+ var ce = typeof global == "object" && global && global.Object === Object && global, le = typeof self == "object" && self && self.Object === Object && self, L = ce || le || Function("return this")(), R = function() {
910
+ return L.Date.now();
911
+ }, z = /\s/;
912
+ function B(e) {
913
+ for (var t = e.length; t-- && z.test(e.charAt(t)););
914
+ return t;
975
915
  }
976
- var Ft = Object.prototype, Bt = Ft.toString;
977
- function Gt(r) {
978
- return Bt.call(r);
916
+ //#endregion
917
+ //#region ../../../node_modules/lodash-es/_baseTrim.js
918
+ var V = /^\s+/;
919
+ function H(e) {
920
+ return e && e.slice(0, B(e) + 1).replace(V, "");
979
921
  }
980
- var Zt = "[object Null]", _t = "[object Undefined]", W = w ? w.toStringTag : void 0;
981
- function Ut(r) {
982
- return r == null ? r === void 0 ? _t : Zt : W && W in Object(r) ? Xt(r) : Gt(r);
922
+ //#endregion
923
+ //#region ../../../node_modules/lodash-es/_Symbol.js
924
+ var U = L.Symbol, W = Object.prototype, ue = W.hasOwnProperty, de = W.toString, G = U ? U.toStringTag : void 0;
925
+ function fe(e) {
926
+ var t = ue.call(e, G), n = e[G];
927
+ try {
928
+ e[G] = void 0;
929
+ var r = !0;
930
+ } catch {}
931
+ var i = de.call(e);
932
+ return r && (t ? e[G] = n : delete e[G]), i;
983
933
  }
984
- function Kt(r) {
985
- return r != null && typeof r == "object";
934
+ //#endregion
935
+ //#region ../../../node_modules/lodash-es/_objectToString.js
936
+ var pe = Object.prototype.toString;
937
+ function me(e) {
938
+ return pe.call(e);
986
939
  }
987
- var Jt = "[object Symbol]";
988
- function Qt(r) {
989
- return typeof r == "symbol" || Kt(r) && Ut(r) == Jt;
940
+ //#endregion
941
+ //#region ../../../node_modules/lodash-es/_baseGetTag.js
942
+ var he = "[object Null]", ge = "[object Undefined]", K = U ? U.toStringTag : void 0;
943
+ function _e(e) {
944
+ return e == null ? e === void 0 ? ge : he : K && K in Object(e) ? fe(e) : me(e);
990
945
  }
991
- var X = NaN, Yt = /^[-+]0x[0-9a-f]+$/i, Vt = /^0b[01]+$/i, te = /^0o[0-7]+$/i, ee = parseInt;
992
- function F(r) {
993
- if (typeof r == "number")
994
- return r;
995
- if (Qt(r))
996
- return X;
997
- if (y(r)) {
998
- var t = typeof r.valueOf == "function" ? r.valueOf() : r;
999
- r = y(t) ? t + "" : t;
1000
- }
1001
- if (typeof r != "string")
1002
- return r === 0 ? r : +r;
1003
- r = Ot(r);
1004
- var e = Vt.test(r);
1005
- return e || te.test(r) ? ee(r.slice(2), e ? 2 : 8) : Yt.test(r) ? X : +r;
946
+ //#endregion
947
+ //#region ../../../node_modules/lodash-es/isObjectLike.js
948
+ function ve(e) {
949
+ return typeof e == "object" && !!e;
1006
950
  }
1007
- var ie = "Expected a function", re = Math.max, se = Math.min;
1008
- function oe(r, t, e) {
1009
- var i, s, n, l, a, c, b = 0, H = !1, g = !1, S = !0;
1010
- if (typeof r != "function")
1011
- throw new TypeError(ie);
1012
- 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);
1013
- function C(o) {
1014
- var u = i, v = s;
1015
- return i = s = void 0, b = o, l = r.apply(v, u), l;
1016
- }
1017
- function tt(o) {
1018
- return b = o, a = setTimeout(m, t), H ? C(o) : l;
1019
- }
1020
- function et(o) {
1021
- var u = o - c, v = o - b, q = t - u;
1022
- return g ? se(q, n - v) : q;
1023
- }
1024
- function P(o) {
1025
- var u = o - c, v = o - b;
1026
- return c === void 0 || u >= t || u < 0 || g && v >= n;
1027
- }
1028
- function m() {
1029
- var o = L();
1030
- if (P(o))
1031
- return D(o);
1032
- a = setTimeout(m, et(o));
1033
- }
1034
- function D(o) {
1035
- return a = void 0, S && i ? C(o) : (i = s = void 0, l);
1036
- }
1037
- function it() {
1038
- a !== void 0 && clearTimeout(a), b = 0, i = c = s = a = void 0;
1039
- }
1040
- function rt() {
1041
- return a === void 0 ? l : D(L());
1042
- }
1043
- function z() {
1044
- var o = L(), u = P(o);
1045
- if (i = arguments, s = this, c = o, u) {
1046
- if (a === void 0)
1047
- return tt(c);
1048
- if (g)
1049
- return clearTimeout(a), a = setTimeout(m, t), C(c);
1050
- }
1051
- return a === void 0 && (a = setTimeout(m, t)), l;
1052
- }
1053
- return z.cancel = it, z.flush = rt, z;
951
+ //#endregion
952
+ //#region ../../../node_modules/lodash-es/isSymbol.js
953
+ var ye = "[object Symbol]";
954
+ function be(e) {
955
+ return typeof e == "symbol" || ve(e) && _e(e) == ye;
1054
956
  }
1055
- var ae = "Expected a function";
1056
- function ne(r, t, e) {
1057
- var i = !0, s = !0;
1058
- if (typeof r != "function")
1059
- throw new TypeError(ae);
1060
- return y(e) && (i = "leading" in e ? !!e.leading : i, s = "trailing" in e ? !!e.trailing : s), oe(r, t, {
1061
- leading: i,
1062
- maxWait: t,
1063
- trailing: s
1064
- });
957
+ //#endregion
958
+ //#region ../../../node_modules/lodash-es/toNumber.js
959
+ var q = NaN, xe = /^[-+]0x[0-9a-f]+$/i, Se = /^0b[01]+$/i, Ce = /^0o[0-7]+$/i, we = parseInt;
960
+ function J(e) {
961
+ if (typeof e == "number") return e;
962
+ if (be(e)) return q;
963
+ if (I(e)) {
964
+ var t = typeof e.valueOf == "function" ? e.valueOf() : e;
965
+ e = I(t) ? t + "" : t;
966
+ }
967
+ if (typeof e != "string") return e === 0 ? e : +e;
968
+ e = H(e);
969
+ var n = Se.test(e);
970
+ return n || Ce.test(e) ? we(e.slice(2), n ? 2 : 8) : xe.test(e) ? q : +e;
1065
971
  }
1066
- const M = new CSSStyleSheet();
1067
- M.replaceSync(dt);
1068
- 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)}))`;
1069
- class de extends HTMLElement {
1070
- constructor() {
1071
- super(), this.visibleItemsAttributeDelegate = new B(
1072
- this,
1073
- "visible-items",
1074
- T("s"),
1075
- "--px-carousel-min-width"
1076
- ), this.template = `<px-vstack gap="default">
1077
- <div class="carousel">
1078
- <slot></slot>
1079
- </div>
1080
- <px-hstack
1081
- id="appleseed-container"
1082
- justify-content="space-between"
1083
- justify-content--mobile="center"
1084
- >
1085
- <px-appleseed active="0"></px-appleseed>
1086
- <px-hstack id="button-icons" gap="default">
1087
- <px-button-icon disabled id="previous" aria-hidden="true">
1088
- <px-icon name="chevron_left" from="lavender"></px-icon>
1089
- </px-button-icon>
1090
- <px-button-icon id="next" aria-hidden="true">
1091
- <px-icon name="chevron_right" from="lavender"></px-icon>
1092
- </px-button-icon>
1093
- </px-hstack>
1094
- </px-hstack>
1095
- </px-vstack>`, this.onScroll = () => {
1096
- const t = this.$carousel.scrollLeft, e = this.$carousel.scrollWidth, i = this.$carousel.clientWidth;
1097
- let s = 0;
1098
- window.innerWidth < 768 ? s = Math.round(
1099
- t / (e - i) * (this.itemNumbers - 1)
1100
- ) : Math.ceil(t + i) + 10 >= e ? s = this.itemNumbers - 1 : s = Math.floor(t / this.$firstItem.offsetWidth + 1) - 1;
1101
- let n = s;
1102
- 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();
1103
- }, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template, this.shadowRoot.adoptedStyleSheets = [
1104
- M,
1105
- ct(
1106
- "gap",
1107
- le,
1108
- G,
1109
- ce
1110
- )
1111
- ];
1112
- }
1113
- static get observedAttributes() {
1114
- return ["visible-items"];
1115
- }
1116
- attributeChangedCallback(t, e, i) {
1117
- if (e !== i)
1118
- switch (t) {
1119
- case "gap":
1120
- case "gap--mobile":
1121
- case "gap--tablet":
1122
- case "gap--desktop":
1123
- this.visibleItemsAttributeDelegate.attributeValue = T(i);
1124
- break;
1125
- default:
1126
- this.visibleItemsAttributeDelegate.attributeChangedCallback(
1127
- t,
1128
- e,
1129
- i
1130
- );
1131
- }
1132
- }
1133
- connectedCallback() {
1134
- this.visibleItemsAttributeDelegate.init("1"), this.visibleItemsAttributeDelegate.attributeValue = T(
1135
- this.getAttribute("gap") || "s"
1136
- ), requestAnimationFrame(() => {
1137
- this.handleAppleSeedDisplay();
1138
- }), this.$appleseed.setAttribute("amount", `${this.itemNumbers}`), this.$carousel.addEventListener("scroll", ne(this.onScroll, 500)), this.$previous.addEventListener("click", () => {
1139
- this.$carousel.scrollLeft -= this.$carousel.clientWidth;
1140
- }), this.$next.addEventListener("click", () => {
1141
- this.$carousel.scrollLeft += this.$carousel.clientWidth;
1142
- }), window.addEventListener("resize", () => {
1143
- this.handleAppleSeedDisplay();
1144
- });
1145
- }
1146
- handleNextPrevious() {
1147
- const t = this.$carousel.scrollLeft, e = this.$carousel.scrollWidth, i = this.$carousel.clientWidth;
1148
- t === 0 ? this.$previous.setAttribute("disabled", "") : this.$previous.removeAttribute("disabled"), t + i >= e ? this.$next.setAttribute("disabled", "") : this.$next.removeAttribute("disabled");
1149
- }
1150
- handleAppleSeedDisplay() {
1151
- this.isScrolling() ? this.$appleseedContainer.style.display = "block" : this.$appleseedContainer.style.display = "none";
1152
- }
1153
- isScrolling() {
1154
- return this.$carousel.scrollWidth - this.$carousel.clientWidth > 10;
1155
- }
1156
- get $appleseedContainer() {
1157
- return this.shadowRoot.querySelector("#appleseed-container");
1158
- }
1159
- get $appleseed() {
1160
- return this.$appleseedContainer.querySelector("px-appleseed");
1161
- }
1162
- get $carousel() {
1163
- return this.shadowRoot.querySelector(".carousel");
1164
- }
1165
- get $previous() {
1166
- return this.shadowRoot.querySelector("#previous");
1167
- }
1168
- get $next() {
1169
- return this.shadowRoot.querySelector("#next");
1170
- }
1171
- get $firstItem() {
1172
- return this.querySelector("px-carousel-item");
1173
- }
1174
- get itemNumbers() {
1175
- return this.querySelectorAll("px-carousel-item").length;
1176
- }
972
+ //#endregion
973
+ //#region ../../../node_modules/lodash-es/debounce.js
974
+ var Te = "Expected a function", Ee = Math.max, De = Math.min;
975
+ function Oe(e, t, n) {
976
+ var r, i, a, o, s, c, l = 0, u = !1, d = !1, f = !0;
977
+ if (typeof e != "function") throw TypeError(Te);
978
+ t = J(t) || 0, I(n) && (u = !!n.leading, d = "maxWait" in n, a = d ? Ee(J(n.maxWait) || 0, t) : a, f = "trailing" in n ? !!n.trailing : f);
979
+ function p(t) {
980
+ var n = r, a = i;
981
+ return r = i = void 0, l = t, o = e.apply(a, n), o;
982
+ }
983
+ function m(e) {
984
+ return l = e, s = setTimeout(_, t), u ? p(e) : o;
985
+ }
986
+ function h(e) {
987
+ var n = e - c, r = e - l, i = t - n;
988
+ return d ? De(i, a - r) : i;
989
+ }
990
+ function g(e) {
991
+ var n = e - c, r = e - l;
992
+ return c === void 0 || n >= t || n < 0 || d && r >= a;
993
+ }
994
+ function _() {
995
+ var e = R();
996
+ if (g(e)) return v(e);
997
+ s = setTimeout(_, h(e));
998
+ }
999
+ function v(e) {
1000
+ return s = void 0, f && r ? p(e) : (r = i = void 0, o);
1001
+ }
1002
+ function y() {
1003
+ s !== void 0 && clearTimeout(s), l = 0, r = c = i = s = void 0;
1004
+ }
1005
+ function b() {
1006
+ return s === void 0 ? o : v(R());
1007
+ }
1008
+ function x() {
1009
+ var e = R(), n = g(e);
1010
+ if (r = arguments, i = this, c = e, n) {
1011
+ if (s === void 0) return m(c);
1012
+ if (d) return clearTimeout(s), s = setTimeout(_, t), p(c);
1013
+ }
1014
+ return s === void 0 && (s = setTimeout(_, t)), o;
1015
+ }
1016
+ return x.cancel = y, x.flush = b, x;
1177
1017
  }
1178
- customElements.get("px-carousel") || customElements.define("px-carousel", de);
1179
- const V = new CSSStyleSheet();
1180
- V.replaceSync(pt);
1181
- class pe extends HTMLElement {
1182
- constructor() {
1183
- super(), this.template = `
1184
- <div class="carousel-item">
1185
- <slot></slot>
1186
- </div>`, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template, this.shadowRoot.adoptedStyleSheets = [M, V];
1187
- }
1018
+ //#endregion
1019
+ //#region ../../../node_modules/lodash-es/throttle.js
1020
+ var ke = "Expected a function";
1021
+ function Ae(e, t, n) {
1022
+ var r = !0, i = !0;
1023
+ if (typeof e != "function") throw TypeError(ke);
1024
+ return I(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), Oe(e, t, {
1025
+ leading: r,
1026
+ maxWait: t,
1027
+ trailing: i
1028
+ });
1188
1029
  }
1189
- customElements.get("px-carousel-item") || customElements.define("px-carousel-item", pe);
1190
- export {
1191
- Rt as AppleSeed,
1192
- de as Carousel,
1193
- pe as CarouselItem
1030
+ //#endregion
1031
+ //#region src/Carousel.ts
1032
+ var Y = new CSSStyleSheet();
1033
+ Y.replaceSync(p);
1034
+ var X = "px-carousel-item-connected", Z = class e extends HTMLElement {
1035
+ static {
1036
+ this.template = s("<px-vstack gap=\"default\"><div class=\"carousel\"><slot></slot></div><px-hstack\n id=\"appleseed-container\"\n justify-content=\"space-between\"\n justify-content--mobile=\"center\"\n ><px-appleseed active=\"0\"></px-appleseed><px-hstack id=\"button-icons\" gap=\"default\"><px-button-icon disabled id=\"previous\" aria-hidden=\"true\"><px-icon name=\"chevron_left\" from=\"lavender\"></px-icon></px-button-icon><px-button-icon id=\"next\" aria-hidden=\"true\"><px-icon name=\"chevron_right\" from=\"lavender\"></px-icon></px-button-icon></px-hstack></px-hstack></px-vstack>");
1037
+ }
1038
+ constructor() {
1039
+ super(), this.onScroll = () => {
1040
+ let e = this.$carousel.scrollLeft, t = this.$carousel.scrollWidth, n = this.$carousel.clientWidth, r = 0;
1041
+ r = window.innerWidth < 768 ? Math.round(e / (t - n) * (this.itemNumbers - 1)) : Math.ceil(e + n) + 10 >= t ? this.itemNumbers - 1 : Math.floor(e / this.$firstItem.offsetWidth + 1) - 1;
1042
+ let i = r;
1043
+ this.itemNumbers > 5 && (r > 2 && r < this.itemNumbers - 2 ? i = 2 : r === this.itemNumbers - 2 ? i = 3 : r === this.itemNumbers - 1 && (i = 4)), this.$appleseed.setAttribute("active", `${i}`), this.handleNextPrevious();
1044
+ }, this.attachShadow({ mode: "open" }), f(this.shadowRoot, e.template), this.shadowRoot.adoptedStyleSheets = [Y];
1045
+ }
1046
+ connectedCallback() {
1047
+ this.addEventListener(X, () => {
1048
+ this.#e();
1049
+ }), this.#e(), this.$carousel.addEventListener("scroll", Ae(this.onScroll, 500)), this.$previous.addEventListener("click", () => {
1050
+ this.$carousel.scrollLeft -= this.$carousel.clientWidth;
1051
+ }), this.$next.addEventListener("click", () => {
1052
+ this.$carousel.scrollLeft += this.$carousel.clientWidth;
1053
+ }), window.addEventListener("resize", () => {
1054
+ this.handleAppleSeedDisplay();
1055
+ });
1056
+ }
1057
+ #e() {
1058
+ this.$appleseed.setAttribute("amount", `${this.itemNumbers}`), requestAnimationFrame(() => {
1059
+ this.handleAppleSeedDisplay();
1060
+ });
1061
+ }
1062
+ handleNextPrevious() {
1063
+ let e = this.$carousel.scrollLeft, t = this.$carousel.scrollWidth, n = this.$carousel.clientWidth;
1064
+ e === 0 ? this.$previous.setAttribute("disabled", "") : this.$previous.removeAttribute("disabled"), e + n >= t ? this.$next.setAttribute("disabled", "") : this.$next.removeAttribute("disabled");
1065
+ }
1066
+ handleAppleSeedDisplay() {
1067
+ this.isScrolling() ? this.$appleseedContainer.style.display = "block" : this.$appleseedContainer.style.display = "none";
1068
+ }
1069
+ isScrolling() {
1070
+ return this.$carousel.scrollWidth - this.$carousel.clientWidth > 10;
1071
+ }
1072
+ get $appleseedContainer() {
1073
+ return this.shadowRoot.querySelector("#appleseed-container");
1074
+ }
1075
+ get $appleseed() {
1076
+ return this.$appleseedContainer.querySelector("px-appleseed");
1077
+ }
1078
+ get $carousel() {
1079
+ return this.shadowRoot.querySelector(".carousel");
1080
+ }
1081
+ get $previous() {
1082
+ return this.shadowRoot.querySelector("#previous");
1083
+ }
1084
+ get $next() {
1085
+ return this.shadowRoot.querySelector("#next");
1086
+ }
1087
+ get $firstItem() {
1088
+ return this.querySelector("px-carousel-item");
1089
+ }
1090
+ get itemNumbers() {
1091
+ return this.querySelectorAll("px-carousel-item").length;
1092
+ }
1093
+ };
1094
+ customElements.get("px-carousel") || customElements.define("px-carousel", Z);
1095
+ var Q = new CSSStyleSheet();
1096
+ Q.replaceSync(m);
1097
+ var $ = class e extends HTMLElement {
1098
+ static {
1099
+ this.template = s("<div class=\"carousel-item\"><slot></slot></div>");
1100
+ }
1101
+ constructor() {
1102
+ super(), this.attachShadow({ mode: "open" }), f(this.shadowRoot, e.template), this.shadowRoot.adoptedStyleSheets = [Q];
1103
+ }
1104
+ connectedCallback() {
1105
+ this.dispatchEvent(new CustomEvent(X, {
1106
+ bubbles: !0,
1107
+ composed: !0
1108
+ }));
1109
+ }
1194
1110
  };
1111
+ customElements.get("px-carousel-item") || customElements.define("px-carousel-item", $);
1112
+ //#endregion
1113
+ export { F as AppleSeed, X as CAROUSEL_ITEM_CONNECTED_EVENT, Z as Carousel, $ as CarouselItem };