@proximus/lavender-status 1.4.15-alpha.7 → 1.4.16-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Status.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { Icon } from '@proximus/lavender-icon';
1
+ import { type Icon } from '@proximus/lavender-icon';
2
2
  import { PxElement } from '@proximus/lavender-common';
3
+ import '@proximus/lavender-layout';
3
4
  export declare const statusStateValues: string[];
4
5
  export declare class Status extends PxElement<HTMLDivElement> {
5
6
  static nativeName: string;
package/dist/index.es.js CHANGED
@@ -1,8 +1,601 @@
1
- import { PxElement as e, log as t } from "@proximus/lavender-common";
1
+ import { AttributeBreakpointHandlerDelegate as e, PxElement as t, WithExtraAttributes as n, backgroundColorValues as r, checkName as i, gapValues as a, log as o, propertyToAttributeSetter as s } from "@proximus/lavender-common";
2
2
  //#region src/status.css?inline
3
- var n = ":host,:host>*{box-sizing:border-box;display:block}.status{color:var(--px-color-text-brand-default)}.status ::slotted([slot=label]){font-family:var(--px-font-family);font-size:var(--px-text-size-label-m-mobile);font-weight:var(--px-font-weight-body);line-height:var(--px-line-height-ratio-l)}.status.success{color:var(--px-color-text-purpose-success-default)}.status.warning,.status.ongoing{color:var(--px-color-text-purpose-warning-default)}.status.error{color:var(--px-color-text-purpose-error-default)}.status.unlimited{color:var(--px-color-text-purpose-unlimited-default)}.status[disabled]{color:var(--px-color-text-state-disabled-default)}:host([inverted]) .status{color:var(--px-color-text-brand-inverted)}:host([inverted]) .status.success{color:var(--px-color-text-purpose-success-inverted)}:host([inverted]) .status.warning,:host([inverted]) .status.ongoing{color:var(--px-color-text-purpose-warning-inverted)}:host([inverted]) .status.error{color:var(--px-color-text-purpose-error-inverted)}:host([inverted]) .status.unlimited{color:var(--px-color-text-purpose-unlimited-inverted)}:host([inverted]) .status[disabled]{color:var(--px-color-text-state-disabled-inverted)}@media screen and (width>=48rem){.status ::slotted([slot=label]){font-size:var(--px-text-size-label-m-tablet)}}@media screen and (width>=64.0625rem){.status ::slotted([slot=label]){font-size:var(--px-text-size-label-m-laptop)}}", r = new CSSStyleSheet();
4
- r.replaceSync(n);
5
- var i = [
3
+ var c = ":host,:host>*{box-sizing:border-box;display:block}.status{color:var(--px-color-text-brand-default)}.status ::slotted([slot=label]){font-family:var(--px-font-family);font-size:var(--px-text-size-label-m-mobile);font-weight:var(--px-font-weight-body);line-height:var(--px-line-height-ratio-s)}.status.success{color:var(--px-color-text-purpose-success-default)}.status.warning,.status.ongoing{color:var(--px-color-text-purpose-warning-default)}.status.error{color:var(--px-color-text-purpose-error-default)}.status.unlimited{color:var(--px-color-text-purpose-unlimited-default)}.status[disabled]{color:var(--px-color-text-state-disabled-default)}:host([inverted]) .status{color:var(--px-color-text-brand-inverted)}:host([inverted]) .status.success{color:var(--px-color-text-purpose-success-inverted)}:host([inverted]) .status.warning,:host([inverted]) .status.ongoing{color:var(--px-color-text-purpose-warning-inverted)}:host([inverted]) .status.error{color:var(--px-color-text-purpose-error-inverted)}:host([inverted]) .status.unlimited{color:var(--px-color-text-purpose-unlimited-inverted)}:host([inverted]) .status[disabled]{color:var(--px-color-text-state-disabled-inverted)}@media screen and (width>=48rem){.status ::slotted([slot=label]){font-size:var(--px-text-size-label-m-tablet)}}@media screen and (width>=64.0625rem){.status ::slotted([slot=label]){font-size:var(--px-text-size-label-m-laptop)}}", l = ":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))}}", u = new CSSStyleSheet();
4
+ u.replaceSync(l);
5
+ var d = [
6
+ "",
7
+ "default",
8
+ "row",
9
+ "row-reverse",
10
+ "column",
11
+ "column-reverse"
12
+ ], f = [
13
+ "",
14
+ "default",
15
+ "stretch",
16
+ "flex-start",
17
+ "start",
18
+ "flex-end",
19
+ "end",
20
+ "center",
21
+ "baseline"
22
+ ], p = [
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
+ ], m = [
34
+ "",
35
+ "default",
36
+ "nowrap",
37
+ "wrap",
38
+ "wrap-reverse"
39
+ ], h = [
40
+ "",
41
+ "visible",
42
+ "hidden",
43
+ "scroll",
44
+ "auto"
45
+ ], g = class extends n {
46
+ constructor() {
47
+ super(u), 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, a);
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, p);
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, f);
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, m);
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, d);
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, h);
130
+ break;
131
+ default: super.attributeChangedCallback(e, t, n);
132
+ }
133
+ }
134
+ updateOverflowX(e, t, n, r) {
135
+ if (!i(r, n)) {
136
+ o(`"${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) || o(`"${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, s = [];
144
+ if (!i) this.getAttribute(a + "--mobile") || s.push("mobile"), this.getAttribute(a + "--tablet") || s.push("tablet"), this.getAttribute(a + "--laptop") || s.push("laptop"), this.getAttribute(a + "--desktop") || s.push("desktop"), s.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
+ s(this, "direction", e);
160
+ }
161
+ get directionMobile() {
162
+ return this.getAttribute("direction--mobile");
163
+ }
164
+ set directionMobile(e) {
165
+ s(this, "direction--mobile", e);
166
+ }
167
+ get directionTablet() {
168
+ return this.getAttribute("direction--tablet");
169
+ }
170
+ set directionTablet(e) {
171
+ s(this, "direction--tablet", e);
172
+ }
173
+ get directionLaptop() {
174
+ return this.getAttribute("direction--laptop");
175
+ }
176
+ set directionLaptop(e) {
177
+ s(this, "direction--laptop", e);
178
+ }
179
+ get directionDesktop() {
180
+ return this.getAttribute("direction--desktop");
181
+ }
182
+ set directionDesktop(e) {
183
+ s(this, "direction--desktop", e);
184
+ }
185
+ get gap() {
186
+ return this.getAttribute("gap");
187
+ }
188
+ set gap(e) {
189
+ s(this, "gap", e);
190
+ }
191
+ get gapMobile() {
192
+ return this.getAttribute("gap--mobile");
193
+ }
194
+ set gapMobile(e) {
195
+ s(this, "gap--mobile", e);
196
+ }
197
+ get gapTablet() {
198
+ return this.getAttribute("gap--tablet");
199
+ }
200
+ set gapTablet(e) {
201
+ s(this, "gap--tablet", e);
202
+ }
203
+ get gapLaptop() {
204
+ return this.getAttribute("gap--laptop");
205
+ }
206
+ set gapLaptop(e) {
207
+ s(this, "gap--laptop", e);
208
+ }
209
+ get gapDesktop() {
210
+ return this.getAttribute("gap--desktop");
211
+ }
212
+ set gapDesktop(e) {
213
+ s(this, "gap--desktop", e);
214
+ }
215
+ get justifyContent() {
216
+ return this.getAttribute("justify-content");
217
+ }
218
+ set justifyContent(e) {
219
+ s(this, "justify-content", e);
220
+ }
221
+ get justifyContentMobile() {
222
+ return this.getAttribute("justify-content--mobile");
223
+ }
224
+ set justifyContentMobile(e) {
225
+ s(this, "justify-content--mobile", e);
226
+ }
227
+ get justifyContentTablet() {
228
+ return this.getAttribute("justify-content--tablet");
229
+ }
230
+ set justifyContentTablet(e) {
231
+ s(this, "justify-content--tablet", e);
232
+ }
233
+ get justifyContentLaptop() {
234
+ return this.getAttribute("justify-content--laptop");
235
+ }
236
+ set justifyContentLaptop(e) {
237
+ s(this, "justify-content--laptop", e);
238
+ }
239
+ get justifyContentDesktop() {
240
+ return this.getAttribute("justify-content--desktop");
241
+ }
242
+ set justifyContentDesktop(e) {
243
+ s(this, "justify-content--desktop", e);
244
+ }
245
+ get alignItems() {
246
+ return this.getAttribute("align-items");
247
+ }
248
+ set alignItems(e) {
249
+ s(this, "align-items", e);
250
+ }
251
+ get alignItemsMobile() {
252
+ return this.getAttribute("align-items--mobile");
253
+ }
254
+ set alignItemsMobile(e) {
255
+ s(this, "align-items--mobile", e);
256
+ }
257
+ get alignItemsTablet() {
258
+ return this.getAttribute("align-items--tablet");
259
+ }
260
+ set alignItemsTablet(e) {
261
+ s(this, "align-items--tablet", e);
262
+ }
263
+ get alignItemsLaptop() {
264
+ return this.getAttribute("align-items--laptop");
265
+ }
266
+ set alignItemsLaptop(e) {
267
+ s(this, "align-items--laptop", e);
268
+ }
269
+ get alignItemsDesktop() {
270
+ return this.getAttribute("align-items--desktop");
271
+ }
272
+ set alignItemsDesktop(e) {
273
+ s(this, "align-items--desktop", e);
274
+ }
275
+ get wrap() {
276
+ return this.getAttribute("wrap");
277
+ }
278
+ set wrap(e) {
279
+ s(this, "wrap", e);
280
+ }
281
+ get wrapMobile() {
282
+ return this.getAttribute("wrap--mobile");
283
+ }
284
+ set wrapMobile(e) {
285
+ s(this, "wrap--mobile", e);
286
+ }
287
+ get wrapTablet() {
288
+ return this.getAttribute("wrap--tablet");
289
+ }
290
+ set wrapTablet(e) {
291
+ s(this, "wrap--tablet", e);
292
+ }
293
+ get wrapLaptop() {
294
+ return this.getAttribute("wrap--laptop");
295
+ }
296
+ set wrapLaptop(e) {
297
+ s(this, "wrap--laptop", e);
298
+ }
299
+ get wrapDesktop() {
300
+ return this.getAttribute("wrap--desktop");
301
+ }
302
+ set wrapDesktop(e) {
303
+ s(this, "wrap--desktop", e);
304
+ }
305
+ get overflowX() {
306
+ return this.getAttribute("overflow-x");
307
+ }
308
+ set overflowX(e) {
309
+ s(this, "overflow-x", e);
310
+ }
311
+ get overflowXMobile() {
312
+ return this.getAttribute("overflow-x--mobile");
313
+ }
314
+ set overflowXMobile(e) {
315
+ s(this, "overflow-x--mobile", e);
316
+ }
317
+ get overflowXTablet() {
318
+ return this.getAttribute("overflow-x--tablet");
319
+ }
320
+ set overflowXTablet(e) {
321
+ s(this, "overflow-x--tablet", e);
322
+ }
323
+ get overflowXLaptop() {
324
+ return this.getAttribute("overflow-x--laptop");
325
+ }
326
+ set overflowXLaptop(e) {
327
+ s(this, "overflow-x--laptop", e);
328
+ }
329
+ get overflowXDesktop() {
330
+ return this.getAttribute("overflow-x--desktop");
331
+ }
332
+ set overflowXDesktop(e) {
333
+ s(this, "overflow-x--desktop", e);
334
+ }
335
+ get $el() {
336
+ return this.shadowRoot.querySelector(".flex-container");
337
+ }
338
+ };
339
+ customElements.get("px-stack") || customElements.define("px-stack", g);
340
+ var _ = class extends g {
341
+ constructor() {
342
+ super();
343
+ }
344
+ connectedCallback() {
345
+ super.connectedCallback(), this.direction = "column", this.directionMobile = "column", this.directionTablet = "column", this.directionLaptop = "column", this.directionDesktop = "column";
346
+ }
347
+ };
348
+ customElements.get("px-vstack") || customElements.define("px-vstack", _);
349
+ var v = class extends g {
350
+ constructor() {
351
+ super();
352
+ }
353
+ connectedCallback() {
354
+ super.connectedCallback(), this.direction = "row", this.directionMobile = "row", this.directionTablet = "row", this.directionLaptop = "row", this.directionDesktop = "row";
355
+ }
356
+ };
357
+ customElements.get("px-hstack") || customElements.define("px-hstack", v);
358
+ //#endregion
359
+ //#region ../Layout/src/Spacer.ts
360
+ var y = class extends HTMLElement {
361
+ constructor() {
362
+ super(), this.isZeroSized = !1, this.growValue = "1", this.isVertical = !1;
363
+ }
364
+ static get observedAttributes() {
365
+ return ["grow", "nogap"];
366
+ }
367
+ attributeChangedCallback(e, t, n) {
368
+ e === "grow" && (this.growValue = n || "1", this.isZeroSized || (this.style.flexGrow = this.growValue), this.scheduleRecheck());
369
+ }
370
+ connectedCallback() {
371
+ this.growValue = this.getAttribute("grow") || "1", this.style.flexGrow = this.growValue, this.nogap && this.parentElement && (this.resizeObserver = new ResizeObserver(() => {
372
+ this.handleSizeChange();
373
+ }), this.isVertical = this.parentElement.localName === "px-vstack" || this.parentElement.style.flexDirection === "column", this.resizeObserver.observe(this), this.scheduleRecheck());
374
+ }
375
+ disconnectedCallback() {
376
+ this.resizeObserver?.disconnect(), this.recheckHandle &&= (cancelAnimationFrame(this.recheckHandle), void 0);
377
+ }
378
+ get grow() {
379
+ return this.getAttribute("grow");
380
+ }
381
+ set grow(e) {
382
+ this.setAttribute("grow", `${e}`);
383
+ }
384
+ scheduleRecheck() {
385
+ this.recheckHandle && cancelAnimationFrame(this.recheckHandle), this.recheckHandle = requestAnimationFrame(() => {
386
+ this.recheckHandle = void 0, this.recalculateVisibility();
387
+ });
388
+ }
389
+ recalculateVisibility() {
390
+ this.isConnected && (this.style.display = "", this.style.flexGrow = this.growValue, this.handleSizeChange());
391
+ }
392
+ handleSizeChange() {
393
+ let e = this.getBoundingClientRect(), t = e.width === 0 && !this.isVertical || e.height === 0 && this.isVertical;
394
+ this.isZeroSized !== t && (this.isZeroSized = t, this.updateParticipation());
395
+ }
396
+ updateParticipation() {
397
+ this.isZeroSized ? (this.style.display = "none", this.style.flexGrow = "0") : (this.style.display = "", this.style.flexGrow = this.growValue);
398
+ }
399
+ get nogap() {
400
+ return this.hasAttribute("nogap");
401
+ }
402
+ set nogap(e) {
403
+ e ? this.setAttribute("nogap", "") : this.removeAttribute("nogap");
404
+ }
405
+ };
406
+ customElements.get("px-spacer") || customElements.define("px-spacer", y);
407
+ //#endregion
408
+ //#region ../Layout/src/Page.css?inline
409
+ var b = ":host{box-sizing:border-box;display:block}slot[name=body-container]{min-height:100vh}#image-sticky-box{margin-top:-2.5rem}", x = new CSSStyleSheet();
410
+ x.replaceSync(b);
411
+ var S = class extends n {
412
+ constructor() {
413
+ super(x), this.template = () => `
414
+ <px-container border-radius="none" padding="none">
415
+ <px-vstack>
416
+ <px-container id="header-container" border-radius="none">
417
+ <px-hstack>
418
+ <px-spacer></px-spacer>
419
+ <px-vstack
420
+ id="header-vstack-container"
421
+ gap="s"
422
+ grow="${this.grow}"
423
+ basis="${this.basis}"
424
+ >
425
+ <slot name="header-container"></slot>
426
+ </px-vstack>
427
+ <px-spacer></px-spacer>
428
+ </px-hstack>
429
+ </px-container>
430
+ <px-container
431
+ id="image-container"
432
+ border-radius="none"
433
+ padding="none"
434
+ padding-top="xl"
435
+ id="image-box"
436
+ background-size="cover"
437
+ background-position="top center"
438
+ padding-bottom="xl"
439
+ border-radius="none"
440
+ bgimg="${this.backgroundImage}"
441
+ >
442
+ <px-hstack>
443
+ <px-spacer></px-spacer>
444
+ <px-vstack grow="${this.grow}" basis="${this.basis}">
445
+ <slot name="image-container"></slot>
446
+ </px-vstack>
447
+ <px-spacer></px-spacer>
448
+ </px-hstack>
449
+ </px-container>
450
+ <px-container
451
+ id="body-container"
452
+ id="main"
453
+ background-color="${this.backgroundColor}"
454
+ padding="none"
455
+ padding-top="xl"
456
+ padding-bottom="xl"
457
+ >
458
+ <px-hstack>
459
+ <px-spacer></px-spacer>
460
+ <px-vstack
461
+ id="body-vstack-container"
462
+ gap="l"
463
+ grow="${this.grow}"
464
+ basis="${this.basis}"
465
+ >
466
+ <slot name="body-container"></slot>
467
+ </px-vstack>
468
+ <px-spacer></px-spacer>
469
+ </px-hstack>
470
+ </px-container>
471
+ <px-container
472
+ id="contact-container"
473
+ border-radius="none"
474
+ id="main"
475
+ background-color="surface-default"
476
+ padding="none"
477
+ padding-top="xl"
478
+ padding-bottom="xl"
479
+ >
480
+ <px-hstack>
481
+ <px-spacer></px-spacer>
482
+ <px-vstack gap="l" grow="${this.grow}" basis="${this.basis}">
483
+ <slot name="contact-container"></slot>
484
+ </px-vstack>
485
+ <px-spacer></px-spacer>
486
+ </px-hstack>
487
+ </px-container>
488
+ <px-container
489
+ id="footer-container"
490
+ background-color="none"
491
+ border-radius="none"
492
+ style="background-color: rgb(108, 66, 156)"
493
+ padding-top="xl"
494
+ padding-bottom="xl"
495
+ >
496
+ <px-hstack>
497
+ <px-spacer></px-spacer>
498
+ <px-vstack gap="l" grow="${this.grow}" basis="${this.basis}">
499
+ <slot name="footer-container"></slot>
500
+ </px-vstack>
501
+ <px-spacer></px-spacer>
502
+ </px-hstack>
503
+ </px-container>
504
+ </px-vstack>
505
+ </px-container>
506
+ `, this.shadowRoot.innerHTML = this.template();
507
+ }
508
+ static get observedAttributes() {
509
+ return [
510
+ ...super.observedAttributes,
511
+ "background-image",
512
+ "gap",
513
+ "background-color",
514
+ "padding-vertical",
515
+ "padding-horizontal"
516
+ ];
517
+ }
518
+ get $wideImage() {
519
+ return this.shadowRoot.querySelector("#image-box");
520
+ }
521
+ get $bodyVStackContainer() {
522
+ return this.shadowRoot.querySelector("#header-vstack-container");
523
+ }
524
+ get $bodyContainer() {
525
+ return this.shadowRoot.querySelector("#body-container");
526
+ }
527
+ get $contactContainer() {
528
+ return this.shadowRoot.querySelector("#contact-container");
529
+ }
530
+ get $footerContainer() {
531
+ return this.shadowRoot.querySelector("#footer-container");
532
+ }
533
+ get $headerContainer() {
534
+ return this.shadowRoot.querySelector("#header-container");
535
+ }
536
+ get $imageContainer() {
537
+ return this.shadowRoot.querySelector("#image-container");
538
+ }
539
+ get backgroundImage() {
540
+ return this.getAttribute("background-image");
541
+ }
542
+ get $main() {
543
+ return this.shadowRoot.querySelector("#main");
544
+ }
545
+ get backgroundColor() {
546
+ return this.getAttribute("background-color") || "none";
547
+ }
548
+ get paddingVertical() {
549
+ return this.getAttribute("padding-vertical");
550
+ }
551
+ get paddingHorizontal() {
552
+ return this.getAttribute("padding-horizontal");
553
+ }
554
+ set paddingVertical(e) {
555
+ this.setAttribute("padding-vertical", `${e}`);
556
+ }
557
+ set paddingHorizontal(e) {
558
+ this.setAttribute("padding-horizontal", `${e}`);
559
+ }
560
+ get gap() {
561
+ return this.getAttribute("gap");
562
+ }
563
+ connectedCallback() {
564
+ this.handlePaddingVerticalChange(this.paddingVertical), this.handlePaddingHorizontalChange(this.paddingHorizontal);
565
+ }
566
+ attributeChangedCallback(e, t, n) {
567
+ if (t !== n) switch (e) {
568
+ case "background-image":
569
+ this.$imageContainer.setAttribute("background-image", n);
570
+ break;
571
+ case "gap":
572
+ this.$bodyVStackContainer.setAttribute("gap", n);
573
+ break;
574
+ case "background-color":
575
+ this.$bodyContainer.setAttribute("background-color", r.indexOf(n) > 0 ? n : "none");
576
+ break;
577
+ case "padding-vertical":
578
+ this.handlePaddingVerticalChange(n);
579
+ break;
580
+ case "padding-horizontal":
581
+ this.handlePaddingHorizontalChange(n);
582
+ break;
583
+ default: super.attributeChangedCallback(e, t, n);
584
+ }
585
+ }
586
+ handlePaddingVerticalChange(e) {
587
+ this.$bodyContainer.paddingTop = e, this.$bodyContainer.paddingBottom = e;
588
+ }
589
+ handlePaddingHorizontalChange(e) {
590
+ this.$headerContainer.paddingLeft = e, this.$headerContainer.paddingRight = e, this.$bodyContainer.paddingLeft = e, this.$bodyContainer.paddingRight = e, this.$contactContainer.paddingLeft = e, this.$contactContainer.paddingRight = e, this.$footerContainer.paddingLeft = e, this.$footerContainer.paddingRight = e, this.$imageContainer.paddingLeft = e, this.$imageContainer.paddingRight = e;
591
+ }
592
+ };
593
+ customElements.get("px-page") === void 0 && customElements.define("px-page", S);
594
+ //#endregion
595
+ //#region src/Status.ts
596
+ var C = new CSSStyleSheet();
597
+ C.replaceSync(c);
598
+ var w = [
6
599
  "",
7
600
  "info",
8
601
  "success",
@@ -10,12 +603,12 @@ var i = [
10
603
  "error",
11
604
  "ongoing",
12
605
  "unlimited"
13
- ], a = class extends e {
606
+ ], T = class extends t {
14
607
  static {
15
608
  this.nativeName = "div";
16
609
  }
17
610
  constructor() {
18
- super(r), this.template = () => "\n<div class=\"status\">\n <px-hstack gap=\"2xs\" align-items=\"flex-start\">\n <px-icon name=\"information_fill\" from=\"lavender\" size=\"s\" color=\"brand\"></px-icon>\n <slot name=\"label\"></slot>\n </px-hstack>\n</div>", this.shadowRoot.innerHTML = this.template();
611
+ super(C), this.template = () => "\n<div class=\"status\">\n <px-hstack gap=\"2xs\" align-items=\"flex-start\">\n <px-icon name=\"information_fill\" from=\"lavender\" size=\"s\" color=\"brand\"></px-icon>\n <slot name=\"label\"></slot>\n </px-hstack>\n</div>", this.shadowRoot.innerHTML = this.template();
19
612
  }
20
613
  static get observedAttributes() {
21
614
  return [
@@ -60,11 +653,11 @@ var i = [
60
653
  }
61
654
  }
62
655
  updateState(e) {
63
- if (!this.checkName(i, e)) {
64
- t(`"${e}" is not a valid state value for ${this.tagName.toLowerCase()}. Allowed values are: "${i.join("\", \"")}".`);
656
+ if (!this.checkName(w, e)) {
657
+ o(`"${e}" is not a valid state value for ${this.tagName.toLowerCase()}. Allowed values are: "${w.join("\", \"")}".`);
65
658
  return;
66
659
  }
67
- let n = {
660
+ let t = {
68
661
  info: {
69
662
  name: "information_fill",
70
663
  color: "brand"
@@ -89,8 +682,8 @@ var i = [
89
682
  name: "infinity_fill",
90
683
  color: "purpose-unlimited"
91
684
  }
92
- }, { name: r, color: a } = n[e] || n.info;
93
- this.$statusIcon.name = r, this.$statusIcon.color = a;
685
+ }, { name: n, color: r } = t[e] || t.info;
686
+ this.$statusIcon.name = n, this.$statusIcon.color = r;
94
687
  }
95
688
  updateIconOnly(e) {
96
689
  let t = e ? `--${e}` : "";
@@ -154,6 +747,6 @@ var i = [
154
747
  this._updateBooleanAttribute("inverted", e);
155
748
  }
156
749
  };
157
- customElements.get("px-status") || customElements.define("px-status", a);
750
+ customElements.get("px-status") || customElements.define("px-status", T);
158
751
  //#endregion
159
- export { a as Status, i as statusStateValues };
752
+ export { T as Status, w as statusStateValues };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-status",
3
- "version": "1.4.15-alpha.7",
3
+ "version": "1.4.16-alpha.2",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",