@proximus/lavender-common 2.0.0-alpha.11 → 2.0.0-alpha.110

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- export declare function cssTokenBreakpoints(attributeName: string, selector: (attributeName: string, attribute: string, device?: 'mobile' | 'tablet' | 'laptop' | 'desktop') => string, attributeValues: string[], cssPropertyPrefix?: string, generatedCssPropertyName?: string): CSSStyleSheet;
1
+ export declare function cssTokenBreakpoints(attributeName: string, selector: (attributeName: string, attribute: string, device?: 'mobile' | 'tablet' | 'laptop' | 'desktop') => string, attributeValues: string[], cssPropertyPrefix?: string, generatedCssPropertyName?: string, selectorAttributeName?: string): CSSStyleSheet;
2
2
  export declare class AttributeBreakpointHandlerDelegate {
3
3
  private readonly component;
4
4
  private readonly attributeName;
package/dist/common.d.ts CHANGED
@@ -1,5 +1,24 @@
1
1
  export declare function getSupportedPropertyNames(htmlElementName: string): string[];
2
2
  export declare function getSupportedAttributeNames(htmlElementName: string): string[];
3
+ declare global {
4
+ interface Window {
5
+ isComponentDebug?: () => boolean;
6
+ }
7
+ }
8
+ export declare function isComponentDebug(): boolean;
9
+ /**
10
+ * Logs an error message to the console if the global debug flag is set.
11
+ * Usage: log('message')
12
+ */
13
+ export declare function log(message: string): void;
14
+ export declare class WrappedInteractiveStateController {
15
+ #private;
16
+ constructor(host: HTMLElement, interactiveElement: HTMLElement, canSetInteractiveState: () => boolean);
17
+ clearInteractiveState: () => void;
18
+ connect(): void;
19
+ disconnect(): void;
20
+ setInteractiveState(state: 'hover' | null): void;
21
+ }
3
22
  export declare class WithExtraAttributes extends HTMLElement {
4
23
  static get observedAttributes(): string[];
5
24
  constructor(...adoptedStylesheets: CSSStyleSheet[]);
@@ -91,18 +110,22 @@ export declare class WithExtraAttributes extends HTMLElement {
91
110
  }
92
111
  export declare abstract class PxElement<HTML_TYPE extends Element> extends WithExtraAttributes {
93
112
  static nativeName: string;
94
- nativeName: string;
95
- accessorExclusions: string[];
113
+ static supportedPropertyNames: string[];
114
+ static accessorExclusions: string[];
96
115
  static get observedAttributes(): string[];
97
116
  attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
117
+ protected get ctor(): any;
98
118
  protected constructor(...adoptedStylesheets: CSSStyleSheet[]);
99
- connectedCallback(): void;
119
+ enhanceWithNativeProperties(): void;
100
120
  get $el(): HTML_TYPE;
101
121
  protected _updateAttribute(name: string, value: string): void;
102
122
  protected _updateBooleanAttribute(name: string, value: boolean): void;
103
123
  }
124
+ export declare class VerticallyExtendedElement<HTML_TYPE extends Element> extends PxElement<HTML_TYPE> {
125
+ connectedCallback(): void;
126
+ }
104
127
  export declare const gridGapValues: string[];
105
- export declare const flexboxAlignSelfValues: readonly ["", "default", "auto", "flex-start", "flex-end", "center", "baseline", "stretch"];
128
+ export declare const flexboxAlignSelfValues: readonly ["", "default", "auto", "flex-start", "start", "flex-end", "end", "center", "baseline", "stretch"];
106
129
  export declare const cssGridAlignSelfValues: readonly ["", "default", "start", "end", "center", "stretch"];
107
130
  export declare const cssGridJustifySelfValues: readonly ["", "default", "start", "end", "center", "stretch"];
108
131
  export declare const cssGridColSpanValues: string[];
@@ -132,4 +155,5 @@ export declare function addGlobalStylesheet(inlineStyles: string): void;
132
155
  export declare function isFalsy(value: string | boolean): boolean;
133
156
  export declare function getViewportFormat(): "mobile" | "tablet" | "laptop";
134
157
  export declare function checkName(values: string[], value: string): boolean;
158
+ export declare const accessibilityAttributes: string[];
135
159
  export declare function transferAccessibilityAttributes(sourceElement: HTMLElement, targetElement: HTMLElement, applyLabelledBy?: boolean): void;
package/dist/index.es.js CHANGED
@@ -1,17 +1,101 @@
1
- const u = ":host([grow]){flex-grow:var(--grow-value)}:host([shrink]){flex-shrink:var(--shrink-value)}:host([basis]){flex-basis:var(--basis-value)}:host([align-self]){align-self:var(--align-self-value)}:host([col-span]){grid-column:span var(--col-span-value) / span var(--col-span-value)}:host([justify-self]){justify-self:var(--justify-value)}:host([order]),::slotted([order]){order:var(--order-value)}:host([hidden]),::slotted([hidden]){display:none}:host([shown--sr]),::slotted(*[shown--sr]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media screen and (max-width: 767px){:host([hidden--mobile]),::slotted([hidden--mobile]){display:none}:host([grow--mobile]){flex-grow:var(--grow--mobile-value)!important}:host([shrink--mobile]){flex-shrink:var(--shrink--mobile-value)!important}:host([basis--mobile]){flex-basis:var(--basis--mobile-value)!important}:host([align-self--mobile]){align-self:var(--align-self--mobile-value)!important}:host([col-span--mobile]){grid-column:span var(--col-span--mobile-value) / span var(--col-span--mobile-value)!important}:host([justify-self--mobile]){justify-self:var(--justify-self--mobile-value)!important}:host([order--mobile]),::slotted([order--mobile]){order:var(--order--mobile-value)!important}:host([shown--sr--mobile]),::slotted(*[shown--sr--mobile]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}@media screen and (min-width: 768px) and (max-width: 1024px){:host([hidden--tablet]),::slotted([hidden--tablet]){display:none}:host([grow--tablet]){flex-grow:var(--grow--tablet-value)!important}:host([shrink--tablet]){flex-shrink:var(--shrink--tablet-value)!important}:host([basis--tablet]){flex-basis:var(--basis--tablet-value)!important}:host([align-self--tablet]){align-self:var(--align-self--tablet-value)!important}:host([col-span--tablet]){grid-column:span var(--col-span--tablet-value) / span var(--col-span--tablet-value)!important}:host([justify-self--tablet]){justify-self:var(--justify-self--tablet-value)!important}:host([order--tablet]),::slotted([order--tablet]){order:var(--order--tablet-value)!important}:host([shown--sr--tablet]),::slotted(*[shown--sr--tablet]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}@media screen and (min-width: 1025px){:host([shown--sr--laptop]),::slotted(*[shown--sr--laptop]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}@media screen and (min-width: 1025px){:host([hidden--laptop]),::slotted([hidden--laptop]){display:none!important}:host([grow--laptop]){flex-grow:var(--grow--laptop-value)!important}:host([shrink--laptop]){flex-shrink:var(--shrink--laptop-value)!important}:host([basis--laptop]){flex-basis:var(--basis--laptop-value)!important}:host([align-self--laptop]){align-self:var(--align-self--laptop-value)!important}:host([col-span--laptop]){grid-column:span var(--col-span--laptop-value) / span var(--col-span--laptop-value)!important}:host([justify-self--laptop]){justify-self:var(--justify-self--laptop-value)!important}:host([order--laptop]),::slotted([order--laptop]){order:var(--order--laptop-value)!important}}@media screen and (min-width: 1441px){:host([col-span--desktop]){grid-column:span var(--col-span--desktop-value) / span var(--col-span--desktop-value)!important}:host([justify-self--desktop]){justify-self:var(--justify-self--desktop-value)!important}:host([order--desktop]),::slotted([order--desktop]){order:var(--order--desktop-value)!important}:host([hidden--desktop]),::slotted([hidden--desktop]){display:none!important}:host([grow--desktop]){flex-grow:var(--grow--desktop-value)!important}:host([shrink--desktop]){flex-shrink:var(--shrink--desktop-value)!important}:host([basis--desktop]){flex-basis:var(--basis--desktop-value)!important}:host([align-self--desktop]){align-self:var(--align-self--desktop-value)!important}}";
2
- function b(i) {
1
+ var S = (i) => {
2
+ throw TypeError(i);
3
+ };
4
+ var $ = (i, t, s) => t.has(i) || S("Cannot " + s);
5
+ var a = (i, t, s) => ($(i, t, "read from private field"), s ? s.call(i) : t.get(i)), d = (i, t, s) => t.has(i) ? S("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, s), p = (i, t, s, e) => ($(i, t, "write to private field"), e ? e.call(i, s) : t.set(i, s), s);
6
+ const M = ":host([grow]){flex-grow:var(--grow-value)}:host([shrink]){flex-shrink:var(--shrink-value)}:host([basis]){flex-basis:var(--basis-value)}:host([align-self]){align-self:var(--align-self-value)}:host([col-span]){grid-column:span var(--col-span-value) / span var(--col-span-value)}:host([justify-self]){justify-self:var(--justify-self-value)}:host([order]),::slotted([order]){order:var(--order-value)}:host([sticky-top]),:host([sticky-bottom]){z-index:5}:host([sticky-top]){position:sticky;top:0}:host([sticky-bottom]){position:sticky;bottom:0}:host([hidden]),::slotted([hidden]){display:none}:host([shown--sr]),::slotted(*[shown--sr]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media screen and (max-width: 47.938rem){:host([hidden--mobile]),::slotted([hidden--mobile]){display:none}:host([grow--mobile]){flex-grow:var(--grow--mobile-value)!important}:host([shrink--mobile]){flex-shrink:var(--shrink--mobile-value)!important}:host([basis--mobile]){flex-basis:var(--basis--mobile-value)!important}:host([align-self--mobile]){align-self:var(--align-self--mobile-value)!important}:host([col-span--mobile]){grid-column:span var(--col-span--mobile-value) / span var(--col-span--mobile-value)!important}:host([justify-self--mobile]){justify-self:var(--justify-self--mobile-value)!important}:host([order--mobile]),::slotted([order--mobile]){order:var(--order--mobile-value)!important}:host([shown--sr--mobile]),::slotted(*[shown--sr--mobile]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}@media screen and (min-width: 48rem) and (max-width: 64rem){:host([hidden--tablet]),::slotted([hidden--tablet]){display:none}:host([grow--tablet]){flex-grow:var(--grow--tablet-value)!important}:host([shrink--tablet]){flex-shrink:var(--shrink--tablet-value)!important}:host([basis--tablet]){flex-basis:var(--basis--tablet-value)!important}:host([align-self--tablet]){align-self:var(--align-self--tablet-value)!important}:host([col-span--tablet]){grid-column:span var(--col-span--tablet-value) / span var(--col-span--tablet-value)!important}:host([justify-self--tablet]){justify-self:var(--justify-self--tablet-value)!important}:host([order--tablet]),::slotted([order--tablet]){order:var(--order--tablet-value)!important}:host([shown--sr--tablet]),::slotted(*[shown--sr--tablet]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}@media screen and (min-width: 64.0625rem){:host([shown--sr--laptop]),::slotted(*[shown--sr--laptop]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}@media screen and (min-width: 64.0625rem){:host([hidden--laptop]),::slotted([hidden--laptop]){display:none!important}:host([grow--laptop]){flex-grow:var(--grow--laptop-value)!important}:host([shrink--laptop]){flex-shrink:var(--shrink--laptop-value)!important}:host([basis--laptop]){flex-basis:var(--basis--laptop-value)!important}:host([align-self--laptop]){align-self:var(--align-self--laptop-value)!important}:host([col-span--laptop]){grid-column:span var(--col-span--laptop-value) / span var(--col-span--laptop-value)!important}:host([justify-self--laptop]){justify-self:var(--justify-self--laptop-value)!important}:host([order--laptop]),::slotted([order--laptop]){order:var(--order--laptop-value)!important}}@media screen and (min-width: 90.0625rem){:host([col-span--desktop]){grid-column:span var(--col-span--desktop-value) / span var(--col-span--desktop-value)!important}:host([justify-self--desktop]){justify-self:var(--justify-self--desktop-value)!important}:host([order--desktop]),::slotted([order--desktop]){order:var(--order--desktop-value)!important}:host([hidden--desktop]),::slotted([hidden--desktop]){display:none!important}:host([grow--desktop]){flex-grow:var(--grow--desktop-value)!important}:host([shrink--desktop]){flex-shrink:var(--shrink--desktop-value)!important}:host([basis--desktop]){flex-basis:var(--basis--desktop-value)!important}:host([align-self--desktop]){align-self:var(--align-self--desktop-value)!important}}", x = { DEV: !0, VITE_COMPONENT_DEBUG: "true" };
7
+ function N(i) {
3
8
  const t = document.createElement(i), s = Object.getPrototypeOf(t);
4
9
  return Object.getOwnPropertyNames(s);
5
10
  }
6
- function d(i) {
11
+ function D(i) {
7
12
  const t = document.createElement(i), s = Object.getPrototypeOf(t);
8
13
  return Object.getOwnPropertyNames(s).map(
9
14
  (e) => e.toLowerCase()
10
15
  );
11
16
  }
12
- const h = new CSSStyleSheet();
13
- h.replaceSync(u);
14
- class p extends HTMLElement {
17
+ const j = new CSSStyleSheet();
18
+ j.replaceSync(M);
19
+ const c = typeof import.meta < "u" && typeof x < "u" ? x : void 0, T = (c == null ? void 0 : c.VITE_COMPONENT_DEBUG) === "true" || (c == null ? void 0 : c.DEV) === !0;
20
+ typeof window < "u" && (window.isComponentDebug = y);
21
+ function y() {
22
+ return T;
23
+ }
24
+ function E(i) {
25
+ y() && console.error(i);
26
+ }
27
+ var g, n, f, h, u, k, C;
28
+ class U {
29
+ constructor(t, s, e) {
30
+ d(this, k);
31
+ d(this, g);
32
+ d(this, n);
33
+ d(this, f);
34
+ d(this, h);
35
+ d(this, u);
36
+ p(this, h, !1), p(this, u, () => {
37
+ this.setInteractiveState("hover");
38
+ }), this.clearInteractiveState = () => {
39
+ this.setInteractiveState(null);
40
+ }, p(this, g, t), p(this, n, s), p(this, f, e);
41
+ }
42
+ connect() {
43
+ a(this, h) || (a(this, n).addEventListener(
44
+ "pointerenter",
45
+ a(this, u)
46
+ ), a(this, n).addEventListener(
47
+ "pointerleave",
48
+ this.clearInteractiveState
49
+ ), a(this, n).addEventListener(
50
+ "focusin",
51
+ a(this, u)
52
+ ), a(this, n).addEventListener(
53
+ "focusout",
54
+ this.clearInteractiveState
55
+ ), p(this, h, !0));
56
+ }
57
+ disconnect() {
58
+ a(this, h) && (a(this, n).removeEventListener(
59
+ "pointerenter",
60
+ a(this, u)
61
+ ), a(this, n).removeEventListener(
62
+ "pointerleave",
63
+ this.clearInteractiveState
64
+ ), a(this, n).removeEventListener(
65
+ "focusin",
66
+ a(this, u)
67
+ ), a(this, n).removeEventListener(
68
+ "focusout",
69
+ this.clearInteractiveState
70
+ ), p(this, h, !1));
71
+ }
72
+ setInteractiveState(t) {
73
+ const s = a(this, k, C);
74
+ if (!a(this, f).call(this)) {
75
+ s.forEach((e) => e.removeAttribute("interactive-state"));
76
+ return;
77
+ }
78
+ s.forEach((e) => {
79
+ t ? e.setAttribute("interactive-state", t) : e.removeAttribute("interactive-state");
80
+ });
81
+ }
82
+ }
83
+ g = new WeakMap(), n = new WeakMap(), f = new WeakMap(), h = new WeakMap(), u = new WeakMap(), k = new WeakSet(), C = function() {
84
+ return Array.from(a(this, g).querySelectorAll("*")).filter(
85
+ O
86
+ );
87
+ };
88
+ function O(i) {
89
+ var s;
90
+ if (i.hasAttribute("interactive-state"))
91
+ return !0;
92
+ const t = customElements.get(
93
+ i.localName
94
+ );
95
+ return ((s = t == null ? void 0 : t.observedAttributes) == null ? void 0 : s.includes("interactive-state")) ?? !1;
96
+ }
97
+ typeof window < "u" && (window.isComponentDebug = y);
98
+ class w extends HTMLElement {
15
99
  static get observedAttributes() {
16
100
  return [
17
101
  "grow",
@@ -58,18 +142,20 @@ class p extends HTMLElement {
58
142
  "order--mobile",
59
143
  "order--tablet",
60
144
  "order--laptop",
61
- "order--desktop"
145
+ "order--desktop",
146
+ "sticky-top",
147
+ "sticky-bottom"
62
148
  ];
63
149
  }
64
150
  constructor(...t) {
65
151
  super(), this.shadowRoot || this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [
66
- h,
152
+ j,
67
153
  ...t
68
154
  ];
69
155
  }
70
156
  attributeChangedCallback(t, s, e) {
71
157
  var o;
72
- if (p.observedAttributes.indexOf(t) !== -1)
158
+ if (w.observedAttributes.indexOf(t) !== -1)
73
159
  switch (t) {
74
160
  case "grow":
75
161
  case "grow--mobile":
@@ -97,7 +183,7 @@ class p extends HTMLElement {
97
183
  t,
98
184
  s,
99
185
  e,
100
- ((o = this.parentElement) == null ? void 0 : o.localName) === "px-grid" ? g : c
186
+ ((o = this.parentElement) == null ? void 0 : o.localName) === "px-grid" ? I : _
101
187
  );
102
188
  break;
103
189
  case "justify-self":
@@ -109,7 +195,7 @@ class p extends HTMLElement {
109
195
  t,
110
196
  s,
111
197
  e,
112
- f
198
+ P
113
199
  );
114
200
  break;
115
201
  case "col-span":
@@ -117,38 +203,37 @@ class p extends HTMLElement {
117
203
  case "col-span--tablet":
118
204
  case "col-span--laptop":
119
205
  case "col-span--desktop":
120
- this.updateProperties(t, s, e, m);
206
+ this.updateProperties(t, s, e, G);
121
207
  break;
122
208
  case "order":
123
209
  case "order--mobile":
124
210
  case "order--tablet":
125
211
  case "order--laptop":
126
212
  case "order--desktop":
127
- this.updateProperties(t, s, e, k);
213
+ this.updateProperties(t, s, e, q);
128
214
  break;
129
215
  }
130
216
  }
131
217
  updateProperties(t, s, e, o) {
132
- if (o && !this.checkName(o, e)) {
133
- console.error(`${e} is not a valid value for ${o}`);
134
- return;
135
- }
136
- const a = t.indexOf("--") > -1, l = a ? t.split("--")[0] : t;
137
- if (!a)
218
+ o && (this.checkName(o, e) || E(
219
+ `"${e}" is not an allowed ${t} value for ${this.tagName.toLowerCase()}. Allowed values are: "${o.join('", "')}".`
220
+ ));
221
+ const l = t.indexOf("--") > -1, b = l ? t.split("--")[0] : t;
222
+ if (!l)
138
223
  this.style.setProperty(
139
- `--${l}-value`,
224
+ `--${b}-value`,
140
225
  s
141
226
  ), this.style.setProperty(
142
- `--${l}-value`,
227
+ `--${b}-value`,
143
228
  e
144
229
  );
145
230
  else {
146
- const n = t.split("--")[1];
231
+ const m = t.split("--")[1];
147
232
  this.style.setProperty(
148
- `--${l}--${n}-value`,
233
+ `--${b}--${m}-value`,
149
234
  s
150
235
  ), this.style.setProperty(
151
- `--${l}--${n}-value`,
236
+ `--${b}--${m}-value`,
152
237
  e
153
238
  );
154
239
  }
@@ -417,38 +502,44 @@ class p extends HTMLElement {
417
502
  this.setAttribute("order--desktop", t);
418
503
  }
419
504
  }
420
- class y extends p {
421
- constructor(...t) {
422
- super(...t), this.accessorExclusions = [], this.nativeName = Object.getPrototypeOf(this).constructor.nativeName, this.accessorExclusions = Object.getPrototypeOf(this).constructor.accessorExclusions || [];
423
- }
505
+ const A = class A extends w {
506
+ // nativeName: string;
424
507
  static get observedAttributes() {
425
508
  return [
426
509
  ...super.observedAttributes,
427
- ...d(this.nativeName)
510
+ ...D(this.nativeName)
428
511
  ];
429
512
  }
430
513
  attributeChangedCallback(t, s, e) {
431
514
  super.attributeChangedCallback(t, s, e), e === null ? this.$el.toggleAttribute(t) : this.$el.setAttribute(t, e);
432
515
  }
433
- connectedCallback() {
434
- for (const t of b(this.nativeName))
435
- if (!(t === "constructor" || this.accessorExclusions.includes(t)))
516
+ get ctor() {
517
+ return Object.getPrototypeOf(this).constructor;
518
+ }
519
+ constructor(...t) {
520
+ super(...t), this.ctor.supportedPropertyNames || (this.ctor.supportedPropertyNames = N(
521
+ this.ctor.nativeName
522
+ )), this.enhanceWithNativeProperties();
523
+ }
524
+ enhanceWithNativeProperties() {
525
+ var t;
526
+ for (const s of this.ctor.supportedPropertyNames)
527
+ if (!(s === "constructor" || (((t = this.ctor) == null ? void 0 : t.accessorExclusions) ?? []).includes(s)))
436
528
  try {
437
- Object.defineProperty(this, t, {
529
+ Object.defineProperty(this, s, {
438
530
  get() {
439
- return this.$el[t];
531
+ return this.$el[s];
440
532
  },
441
- set(s) {
442
- this.$el[t] !== s && (this.$el[t] = s);
533
+ set(e) {
534
+ this.$el[s] !== e && (this.$el[s] = e);
443
535
  }
444
536
  });
445
- } catch (s) {
446
- console.warn(`Could not create property ${t} for`, this.$el, s);
537
+ } catch (e) {
538
+ console.warn(`Could not create property ${s} for`, this.$el, e);
447
539
  }
448
- this.isInsideGridOrStack && (this.$el.style.display = "block", this.$el.style.height = "100%");
449
540
  }
450
541
  get $el() {
451
- return this.shadowRoot.querySelector(this.nativeName);
542
+ return this.shadowRoot.querySelector(this.ctor.nativeName);
452
543
  }
453
544
  _updateAttribute(t, s) {
454
545
  s ? this.setAttribute(t, s) : this.removeAttribute(t);
@@ -456,31 +547,40 @@ class y extends p {
456
547
  _updateBooleanAttribute(t, s) {
457
548
  s ? this.setAttribute(t, "") : this.removeAttribute(t);
458
549
  }
550
+ };
551
+ A.accessorExclusions = [];
552
+ let v = A;
553
+ class V extends v {
554
+ connectedCallback() {
555
+ this.isInsideGridOrStack && (this.$el.style.display = "block", this.$el.style.height = "100%");
556
+ }
459
557
  }
460
- const w = ["", "default", "none", "l"], c = [
558
+ const W = ["", "default", "none", "l"], _ = [
461
559
  "",
462
560
  "default",
463
561
  "auto",
464
562
  "flex-start",
563
+ "start",
465
564
  "flex-end",
565
+ "end",
466
566
  "center",
467
567
  "baseline",
468
568
  "stretch"
469
- ], g = [
569
+ ], I = [
470
570
  "",
471
571
  "default",
472
572
  "start",
473
573
  "end",
474
574
  "center",
475
575
  "stretch"
476
- ], f = [
576
+ ], P = [
477
577
  "",
478
578
  "default",
479
579
  "start",
480
580
  "end",
481
581
  "center",
482
582
  "stretch"
483
- ], m = [
583
+ ], G = [
484
584
  "",
485
585
  "1",
486
586
  "2",
@@ -494,7 +594,7 @@ const w = ["", "default", "none", "l"], c = [
494
594
  "10",
495
595
  "11",
496
596
  "12"
497
- ], k = [
597
+ ], q = [
498
598
  "",
499
599
  "-1",
500
600
  "0",
@@ -510,7 +610,7 @@ const w = ["", "default", "none", "l"], c = [
510
610
  "10",
511
611
  "11",
512
612
  "12"
513
- ], A = [
613
+ ], H = [
514
614
  "",
515
615
  "default",
516
616
  "auto",
@@ -518,7 +618,7 @@ const w = ["", "default", "none", "l"], c = [
518
618
  "end",
519
619
  "center",
520
620
  "stretch"
521
- ], S = [
621
+ ], X = [
522
622
  "",
523
623
  "default",
524
624
  "inherit",
@@ -534,7 +634,7 @@ const w = ["", "default", "none", "l"], c = [
534
634
  "heading-l",
535
635
  "heading-m",
536
636
  "heading-s"
537
- ], $ = [
637
+ ], F = [
538
638
  "",
539
639
  "default",
540
640
  "inherit",
@@ -549,7 +649,7 @@ const w = ["", "default", "none", "l"], c = [
549
649
  "state-hover",
550
650
  "state-active",
551
651
  "state-disabled"
552
- ], x = [
652
+ ], J = [
553
653
  "",
554
654
  "default",
555
655
  "inherit",
@@ -557,11 +657,11 @@ const w = ["", "default", "none", "l"], c = [
557
657
  "title",
558
658
  "title-large",
559
659
  "subtitle"
560
- ], v = ["Xs", "S", "M", "L", "Xl"], j = [
660
+ ], B = ["Xs", "S", "M", "L", "Xl"], K = [
561
661
  "",
562
662
  "default",
563
- ...v.map((i) => i.toLowerCase())
564
- ], C = ["", "default", "left", "center", "right"], L = [
663
+ ...B.map((i) => i.toLowerCase())
664
+ ], Q = ["", "default", "left", "center", "right"], Y = [
565
665
  "",
566
666
  "none",
567
667
  "3xs",
@@ -571,7 +671,7 @@ const w = ["", "default", "none", "l"], c = [
571
671
  "m",
572
672
  "l",
573
673
  "xl"
574
- ], M = ["", "none", "s", "m", "l"], T = ["", "none", "main", "pill"], N = [
674
+ ], Z = ["", "none", "s", "m", "l"], tt = ["", "none", "main", "pill"], et = [
575
675
  "none",
576
676
  "main",
577
677
  "brand",
@@ -582,7 +682,7 @@ const w = ["", "default", "none", "l"], c = [
582
682
  "purpose-warning",
583
683
  "purpose-error",
584
684
  "purpose-unlimited"
585
- ], D = [
685
+ ], st = [
586
686
  "",
587
687
  "all",
588
688
  "top",
@@ -591,7 +691,7 @@ const w = ["", "default", "none", "l"], c = [
591
691
  "left",
592
692
  "block",
593
693
  "inline"
594
- ], O = [
694
+ ], it = [
595
695
  "",
596
696
  "none",
597
697
  "surface-light",
@@ -618,8 +718,8 @@ const w = ["", "default", "none", "l"], c = [
618
718
  "purpose-info",
619
719
  "purpose-eco",
620
720
  "purpose-notification",
621
- "footer"
622
- ], q = ["", "cover", "contain", "default"], E = ["", "none", "s", "m", "l", "xl"], G = [
721
+ "footer-sitemap"
722
+ ], ot = ["", "cover", "contain", "default"], rt = ["", "none", "s", "m", "l", "xl"], at = [
623
723
  "",
624
724
  "default",
625
725
  "title-4xl",
@@ -630,7 +730,7 @@ const w = ["", "default", "none", "l"], c = [
630
730
  "title-m",
631
731
  "title-s",
632
732
  "subtitle"
633
- ], P = [
733
+ ], lt = [
634
734
  "",
635
735
  "purple-top-red",
636
736
  "purple-top-magenta",
@@ -680,7 +780,7 @@ const w = ["", "default", "none", "l"], c = [
680
780
  "color-bottom-right-blue",
681
781
  "color-bottom-right-turquoise",
682
782
  "color-bottom-right-green"
683
- ], _ = [
783
+ ], nt = [
684
784
  "none",
685
785
  "2xs",
686
786
  "xs",
@@ -690,14 +790,14 @@ const w = ["", "default", "none", "l"], c = [
690
790
  "heading-to-subtitle",
691
791
  "heading-to-content",
692
792
  "page-layout-between-sections"
693
- ], B = [
793
+ ], pt = [
694
794
  "",
695
795
  "all",
696
796
  "top",
697
797
  "right",
698
798
  "bottom",
699
799
  "left"
700
- ], R = [
800
+ ], ht = [
701
801
  "",
702
802
  "default",
703
803
  "xs",
@@ -706,117 +806,118 @@ const w = ["", "default", "none", "l"], c = [
706
806
  "l",
707
807
  "xl"
708
808
  ];
709
- function V(i) {
809
+ function ut(i) {
710
810
  const t = document.createElement("style");
711
811
  t.innerHTML = i, document.head.appendChild(t);
712
812
  }
713
- function z(i) {
813
+ function bt(i) {
714
814
  return typeof i == "string" && (i === "false" || i === "0" || i === "null") || typeof i == "boolean" && !i;
715
815
  }
716
- function H() {
816
+ function dt() {
717
817
  return window.matchMedia("only screen and (min-width: 768px)").matches ? "tablet" : window.matchMedia("only screen and (min-width: 1025px)").matches ? "laptop" : "mobile";
718
818
  }
719
- function I(i, t) {
819
+ function ct(i, t) {
720
820
  return i.includes(t);
721
821
  }
722
- function F(i, t, s = !0) {
822
+ const z = [
823
+ "aria-label",
824
+ "aria-labelledby",
825
+ "aria-describedby",
826
+ "aria-controls",
827
+ "aria-expanded",
828
+ "aria-haspopup",
829
+ "aria-pressed",
830
+ "aria-selected",
831
+ "aria-required",
832
+ "aria-disabled",
833
+ "aria-live",
834
+ "aria-atomic",
835
+ "aria-relevant",
836
+ "aria-orientation",
837
+ "aria-valuenow",
838
+ "aria-valuetext",
839
+ "aria-valuemin",
840
+ "aria-valuemax",
841
+ "aria-details",
842
+ "aria-modal",
843
+ "aria-autocomplete",
844
+ "aria-activedescendant",
845
+ "aria-colcount",
846
+ "aria-colindex",
847
+ "aria-colspan",
848
+ "aria-rowcount",
849
+ "aria-rowindex",
850
+ "aria-rowspan",
851
+ "aria-keyshortcuts",
852
+ "aria-placeholder",
853
+ "aria-invalid",
854
+ "aria-busy",
855
+ "aria-owns"
856
+ ];
857
+ function gt(i, t, s = !1) {
723
858
  var e;
724
- if ([
725
- "aria-label",
726
- "aria-labelledby",
727
- "aria-describedby",
728
- "aria-controls",
729
- "aria-expanded",
730
- "aria-haspopup",
731
- "aria-pressed",
732
- "aria-selected",
733
- "aria-required",
734
- "aria-disabled",
735
- "aria-live",
736
- "aria-atomic",
737
- "aria-relevant",
738
- "aria-orientation",
739
- "aria-valuenow",
740
- "aria-valuetext",
741
- "aria-valuemin",
742
- "aria-valuemax",
743
- "aria-details",
744
- "aria-modal",
745
- "aria-autocomplete",
746
- "aria-activedescendant",
747
- "aria-colcount",
748
- "aria-colindex",
749
- "aria-colspan",
750
- "aria-rowcount",
751
- "aria-rowindex",
752
- "aria-rowspan",
753
- "aria-keyshortcuts",
754
- "aria-placeholder",
755
- "aria-invalid",
756
- "aria-busy",
757
- "aria-owns"
758
- ].forEach((o) => {
859
+ if (z.forEach((o) => {
759
860
  i.getAttribute(o) && (t.setAttribute(o, i.getAttribute(o)), i.removeAttribute(o));
760
- }), s) {
861
+ }), s && !i.getAttribute("aria-labelledby")) {
761
862
  const o = `px-${((e = t.localName) == null ? void 0 : e.toLowerCase()) ?? "component"}-${Math.random().toString(36).substring(2, 15)}`;
762
863
  t.setAttribute("id", o), i.setAttribute("aria-labelledby", o);
763
864
  }
764
865
  }
765
- function X(i, t, s, e = "", o) {
766
- const a = new CSSStyleSheet(), l = s.reduce(
767
- (n, r) => n + `
768
- ${t(i, r)} {
866
+ function ft(i, t, s, e = "", o, l = i) {
867
+ const b = new CSSStyleSheet(), m = s.reduce(
868
+ (L, r) => L + `
869
+ ${t(l, r)} {
769
870
  ${i}: var(--${e}-${r}-desktop);
770
871
  ${o ? `${o}:var(--${e}-${r}-desktop)` : ""}
771
872
  }
772
873
  /* Mobile only - max 767px */
773
- @media only screen and (max-width: 47.938em) {
774
- ${t(i, r)} {
874
+ @media only screen and (max-width: 47.938rem) {
875
+ ${t(l, r)} {
775
876
  ${i}: var(--${e}-${r}-mobile);
776
877
  ${o ? `${o}: var(--${e}-${r}-mobile)` : ""}
777
878
  }
778
879
  }
779
- ${t(i, r, "mobile")} {
880
+ ${t(l, r, "mobile")} {
780
881
  /* Mobile only - max 767px */
781
- @media only screen and (max-width: 47.938em) {
882
+ @media only screen and (max-width: 47.938rem) {
782
883
  ${i}: var(--${e}-${r}-mobile) !important;
783
884
  ${o ? `${o}: var(--${e}-${r}-mobile)` : ""}
784
885
  }
785
886
  }
786
- ${t(i, r, "tablet")} {
887
+ ${t(l, r, "tablet")} {
787
888
  /* Tablet - min 768px max 1024px */
788
- @media only screen and (min-width: 48em) and (max-width: 64em) {
889
+ @media only screen and (min-width: 48rem) and (max-width: 64rem) {
789
890
  ${i}: var(--${e}-${r}-desktop) !important;
790
891
  ${o ? `${o}: var(--${e}-${r}-desktop)` : ""}
791
892
  }
792
893
  }
793
- ${t(i, r, "laptop")} {
894
+ ${t(l, r, "laptop")} {
794
895
  /* Laptop - 1025px*/
795
- @media only screen and (min-width: 64.0625em) {
896
+ @media only screen and (min-width: 64.0625rem) {
796
897
  ${i}: var(--${e}-${r}-desktop) !important;
797
898
  ${o ? `${o}: var(--${e}-${r}-desktop)` : ""}
798
899
  }
799
900
  }
800
- ${t(i, r, "desktop")} {
901
+ ${t(l, r, "desktop")} {
801
902
  /* Desktop - 1025px*/
802
- @media only screen and (min-width: 64.0625em) {
903
+ @media only screen and (min-width: 64.0625rem) {
803
904
  ${i}: var(--${e}-${r}-desktop) !important;
804
905
  ${o ? `${o}: var(--${e}-${r}-desktop)` : ""}
805
906
  }
806
907
  }`,
807
908
  ""
808
909
  );
809
- return a.replaceSync(l), a;
910
+ return b.replaceSync(m), b;
810
911
  }
811
- class J {
912
+ class mt {
812
913
  constructor(t, s, e, o) {
813
914
  this.component = t, this.attributeName = s, this.cssVariable = o, this.attributeNameMobile = `${this.attributeName}--mobile`, this.attributeNameTablet = `${this.attributeName}--tablet`, this.attributeNameLaptop = `${this.attributeName}--laptop`, this.attributeNameDesktop = `${this.attributeName}--desktop`, this._attributeValue = e, Object.defineProperty(
814
915
  this.component,
815
916
  this.toCamelCase(this.attributeName),
816
917
  {
817
918
  get: () => this.component.getAttribute(this.attributeName),
818
- set: (a) => {
819
- this.component.setAttribute(this.attributeName, a);
919
+ set: (l) => {
920
+ this.component.setAttribute(this.attributeName, l);
820
921
  }
821
922
  }
822
923
  );
@@ -875,12 +976,12 @@ class J {
875
976
  o,
876
977
  !1
877
978
  );
878
- const a = this.component.getAttribute(
979
+ const l = this.component.getAttribute(
879
980
  this.attributeNameDesktop
880
981
  );
881
- a && this.setCSSProperty(
982
+ l && this.setCSSProperty(
882
983
  this.attributeNameDesktop,
883
- a,
984
+ l,
884
985
  !1
885
986
  );
886
987
  }
@@ -889,41 +990,46 @@ class J {
889
990
  }
890
991
  }
891
992
  export {
892
- J as AttributeBreakpointHandlerDelegate,
893
- y as PxElement,
894
- p as WithExtraAttributes,
895
- V as addGlobalStylesheet,
896
- R as assetContainerImgWidthValues,
897
- O as backgroundColorValues,
898
- q as backgroundSizeValues,
899
- N as borderColorValues,
900
- T as borderRadiusValues,
901
- D as borderSideValues,
902
- M as borderValues,
903
- E as boxShadowValues,
904
- I as checkName,
905
- $ as colorValues,
906
- g as cssGridAlignSelfValues,
907
- m as cssGridColSpanValues,
908
- f as cssGridJustifySelfValues,
909
- k as cssGridOrderValues,
910
- A as cssGridPlaceSelfValues,
911
- X as cssTokenBreakpoints,
912
- c as flexboxAlignSelfValues,
913
- S as fontsizeValues,
914
- x as fontweightValues,
915
- _ as gapValues,
916
- d as getSupportedAttributeNames,
917
- b as getSupportedPropertyNames,
918
- H as getViewportFormat,
919
- P as gradientValues,
920
- w as gridGapValues,
921
- G as headingValues,
922
- v as iconSizeValues,
923
- j as iconSizeValuesKC,
924
- z as isFalsy,
925
- B as noBorderRadiusValues,
926
- L as paddingValues,
927
- C as textalignValues,
928
- F as transferAccessibilityAttributes
993
+ mt as AttributeBreakpointHandlerDelegate,
994
+ v as PxElement,
995
+ V as VerticallyExtendedElement,
996
+ w as WithExtraAttributes,
997
+ U as WrappedInteractiveStateController,
998
+ z as accessibilityAttributes,
999
+ ut as addGlobalStylesheet,
1000
+ ht as assetContainerImgWidthValues,
1001
+ it as backgroundColorValues,
1002
+ ot as backgroundSizeValues,
1003
+ et as borderColorValues,
1004
+ tt as borderRadiusValues,
1005
+ st as borderSideValues,
1006
+ Z as borderValues,
1007
+ rt as boxShadowValues,
1008
+ ct as checkName,
1009
+ F as colorValues,
1010
+ I as cssGridAlignSelfValues,
1011
+ G as cssGridColSpanValues,
1012
+ P as cssGridJustifySelfValues,
1013
+ q as cssGridOrderValues,
1014
+ H as cssGridPlaceSelfValues,
1015
+ ft as cssTokenBreakpoints,
1016
+ _ as flexboxAlignSelfValues,
1017
+ X as fontsizeValues,
1018
+ J as fontweightValues,
1019
+ nt as gapValues,
1020
+ D as getSupportedAttributeNames,
1021
+ N as getSupportedPropertyNames,
1022
+ dt as getViewportFormat,
1023
+ lt as gradientValues,
1024
+ W as gridGapValues,
1025
+ at as headingValues,
1026
+ B as iconSizeValues,
1027
+ K as iconSizeValuesKC,
1028
+ y as isComponentDebug,
1029
+ bt as isFalsy,
1030
+ E as log,
1031
+ pt as noBorderRadiusValues,
1032
+ Y as paddingValues,
1033
+ Q as textalignValues,
1034
+ gt as transferAccessibilityAttributes
929
1035
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-common",
3
- "version": "2.0.0-alpha.11",
3
+ "version": "2.0.0-alpha.110",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",