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