@proximus/heading-group 1.4.19-beta.2 → 1.4.20-alpha.10

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.
Files changed (2) hide show
  1. package/dist/index.es.js +284 -159
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -1,38 +1,114 @@
1
- // src/headinggroup.css?inline
2
- var e = "div{--px-heading-margin-title:0 0 15px 0}", t = "@layer px-reset{:host{font-variant:normal;font-size-adjust:none;font-kerning:auto;font-optical-sizing:auto;font-synthesis:weight style small-caps position;font-feature-settings:normal;font-variation-settings:normal;font-language-override:normal;font-palette:normal;letter-spacing:normal;word-spacing:normal;tab-size:8;text-align:start;text-indent:0;text-transform:none;text-shadow:none;text-rendering:auto;text-wrap:wrap;white-space:normal;word-break:normal;overflow-wrap:normal;-webkit-hyphens:manual;hyphens:manual;text-underline-offset:auto;text-underline-position:auto;-webkit-font-smoothing:initial;-moz-osx-font-smoothing:auto;-webkit-text-size-adjust:auto;-moz-text-size-adjust:auto;text-size-adjust:auto;font-style:normal;font-stretch:100%;line-height:normal;text-emphasis:none}}: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%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}:host([word-break-all]){word-break:break-all}@media screen and (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%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}}:host([word-break-all--mobile]){word-break:break-all}@media screen and (width>=48rem) and (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%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}}:host([word-break-all--tablet]){word-break:break-all}@media screen and (width>=64.0625rem){:host([shown--sr--laptop]),::slotted([shown--sr--laptop]){clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}: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}}:host([word-break-all--laptop]){word-break:break-all}@media screen and (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}:host([word-break-all--desktop]){word-break:break-all}}";
3
- // ../common/src/common.ts
4
- function n(e) {
5
- let t = document.createElement(e), n = Object.getPrototypeOf(t);
6
- return Object.getOwnPropertyNames(n);
7
- }
8
- function r(e) {
9
- let t = document.createElement(e), n = Object.getPrototypeOf(t);
10
- return Object.getOwnPropertyNames(n).map((e) => e.toLowerCase());
11
- }
12
- var i = new CSSStyleSheet();
13
- i.replaceSync(t);
14
- var a = {
1
+ //#region src/headinggroup.css?inline
2
+ var e = "div{--px-heading-margin-title:0 0 15px 0}", t = {
15
3
  BASE_URL: "/",
16
4
  DEV: !0,
17
5
  MODE: "production",
18
6
  PROD: !1,
19
7
  SSR: !1,
20
8
  VITE_COMPONENT_DEBUG: "true"
21
- }, o = a?.VITE_COMPONENT_DEBUG === "true" || a?.DEV === !0;
22
- typeof window < "u" && (window.isComponentDebug = s);
23
- function s() {
24
- return o;
9
+ }, n = t?.VITE_COMPONENT_DEBUG === "true" || t?.DEV === !0;
10
+ typeof window < "u" && (window.isComponentDebug = r);
11
+ function r() {
12
+ return n;
13
+ }
14
+ function i(e) {
15
+ r() && console.error(e);
25
16
  }
26
- function c(e) {
27
- s() && console.error(e);
17
+ typeof window < "u" && (window.isComponentDebug = r);
18
+ //#endregion
19
+ //#region ../common/src/common.css?inline
20
+ var a = "@layer px-reset{:host{font-variant:normal;font-size-adjust:none;font-kerning:auto;font-optical-sizing:auto;font-synthesis:weight style small-caps position;font-feature-settings:normal;font-variation-settings:normal;font-language-override:normal;font-palette:normal;letter-spacing:normal;word-spacing:normal;tab-size:8;text-align:start;text-indent:0;text-transform:none;text-shadow:none;text-rendering:auto;text-wrap:wrap;white-space:normal;word-break:normal;overflow-wrap:normal;-webkit-hyphens:manual;hyphens:manual;text-underline-offset:auto;text-underline-position:auto;-webkit-font-smoothing:initial;-moz-osx-font-smoothing:auto;-webkit-text-size-adjust:auto;-moz-text-size-adjust:auto;text-size-adjust:auto;font-style:normal;font-stretch:100%;line-height:normal;text-emphasis:none}}: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%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}:host([word-break-all]){word-break:break-all}@media screen and (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%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}}:host([word-break-all--mobile]){word-break:break-all}@media screen and (width>=48rem) and (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%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}}:host([word-break-all--tablet]){word-break:break-all}@media screen and (width>=64.0625rem){:host([shown--sr--laptop]),::slotted([shown--sr--laptop]){clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}: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}}:host([word-break-all--laptop]){word-break:break-all}@media screen and (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}:host([word-break-all--desktop]){word-break:break-all}}";
21
+ //#endregion
22
+ //#region ../common/src/attributeSetters.ts
23
+ function o(e, t, n) {
24
+ if (n == null || n === "") {
25
+ e.removeAttribute(t);
26
+ return;
27
+ }
28
+ e.setAttribute(t, n.toString());
29
+ }
30
+ function s(e, t, n) {
31
+ if (!n) {
32
+ e.removeAttribute(t);
33
+ return;
34
+ }
35
+ e.setAttribute(t, "");
28
36
  }
29
- typeof window < "u" && (window.isComponentDebug = s);
30
- var l = class e extends HTMLElement {
37
+ //#endregion
38
+ //#region ../common/src/values.ts
39
+ var c = [
40
+ "",
41
+ "default",
42
+ "auto",
43
+ "flex-start",
44
+ "start",
45
+ "flex-end",
46
+ "end",
47
+ "center",
48
+ "baseline",
49
+ "stretch"
50
+ ], l = [
51
+ "",
52
+ "default",
53
+ "start",
54
+ "end",
55
+ "center",
56
+ "stretch"
57
+ ], u = [
58
+ "",
59
+ "default",
60
+ "start",
61
+ "end",
62
+ "center",
63
+ "stretch"
64
+ ], d = [
65
+ "",
66
+ "1",
67
+ "2",
68
+ "3",
69
+ "4",
70
+ "5",
71
+ "6",
72
+ "7",
73
+ "8",
74
+ "9",
75
+ "10",
76
+ "11",
77
+ "12"
78
+ ], f = [
79
+ "",
80
+ "-1",
81
+ "0",
82
+ "1",
83
+ "2",
84
+ "3",
85
+ "4",
86
+ "5",
87
+ "6",
88
+ "7",
89
+ "8",
90
+ "9",
91
+ "10",
92
+ "11",
93
+ "12"
94
+ ];
95
+ [...[
96
+ "Xs",
97
+ "S",
98
+ "M",
99
+ "L",
100
+ "Xl"
101
+ ].map((e) => e.toLowerCase())];
102
+ //#endregion
103
+ //#region ../common/src/WithExtraAttributes.ts
104
+ var p = new CSSStyleSheet();
105
+ p.replaceSync(a);
106
+ var m = class e extends HTMLElement {
31
107
  static get observedAttributes() {
32
108
  return /* @__PURE__ */ "grow.grow--mobile.grow--tablet.grow--laptop.grow--desktop.shrink.shrink--mobile.shrink--tablet.shrink--laptop.shrink--desktop.basis.basis--mobile.basis--tablet.basis--laptop.basis--desktop.align-self.align-self--mobile.align-self--tablet.align-self--laptop.align-self--desktop.justify-self.justify-self--mobile.justify-self--tablet.justify-self--laptop.justify-self--desktop.hidden.hidden--mobile.hidden--tablet.hidden--laptop.hidden--desktop.shown--sr.shown--sr--mobile.shown--sr--tablet.shown--sr--laptop.shown--sr--desktop.col-span.col-span--mobile.col-span--tablet.col-span--laptop.col-span--desktop.order.order--mobile.order--tablet.order--laptop.order--desktop.sticky-top.sticky-bottom.word-break-all.word-break-all--mobile.word-break-all--tablet.word-break-all--laptop.word-break-all--desktop".split(".");
33
109
  }
34
110
  constructor(...e) {
35
- super(), this.shadowRoot || this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [i, ...e];
111
+ super(), this.shadowRoot || this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [p, ...e];
36
112
  }
37
113
  attributeChangedCallback(t, n, r) {
38
114
  if (e.observedAttributes.indexOf(t) !== -1) switch (t) {
@@ -58,36 +134,36 @@ var l = class e extends HTMLElement {
58
134
  case "align-self--tablet":
59
135
  case "align-self--laptop":
60
136
  case "align-self--desktop":
61
- this.updateProperties(t, n, r, this.parentElement?.localName === "px-grid" ? d : u);
137
+ this.updateProperties(t, n, r, this.parentElement?.localName === "px-grid" ? l : c);
62
138
  break;
63
139
  case "justify-self":
64
140
  case "justify-self--mobile":
65
141
  case "justify-self--tablet":
66
142
  case "justify-self--laptop":
67
143
  case "justify-self--desktop":
68
- this.updateProperties(t, n, r, f);
144
+ this.updateProperties(t, n, r, u);
69
145
  break;
70
146
  case "col-span":
71
147
  case "col-span--mobile":
72
148
  case "col-span--tablet":
73
149
  case "col-span--laptop":
74
150
  case "col-span--desktop":
75
- this.updateProperties(t, n, r, p);
151
+ this.updateProperties(t, n, r, d);
76
152
  break;
77
153
  case "order":
78
154
  case "order--mobile":
79
155
  case "order--tablet":
80
156
  case "order--laptop":
81
- case "order--desktop": this.updateProperties(t, n, r, m);
157
+ case "order--desktop": this.updateProperties(t, n, r, f);
82
158
  }
83
159
  }
84
160
  updateProperties(e, t, n, r) {
85
- r && (this.checkName(r, n) || c(`"${n}" is not an allowed ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`));
86
- let i = e.indexOf("--") > -1, a = i ? e.split("--")[0] : e;
87
- if (!i) this.style.setProperty(`--${a}-value`, t), this.style.setProperty(`--${a}-value`, n);
161
+ r && (this.checkName(r, n) || i(`"${n}" is not an allowed ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`));
162
+ let a = e.indexOf("--") > -1, o = a ? e.split("--")[0] : e;
163
+ if (!a) this.style.setProperty(`--${o}-value`, t), this.style.setProperty(`--${o}-value`, n);
88
164
  else {
89
165
  let r = e.split("--")[1];
90
- this.style.setProperty(`--${a}--${r}-value`, t), this.style.setProperty(`--${a}--${r}-value`, n);
166
+ this.style.setProperty(`--${o}--${r}-value`, t), this.style.setProperty(`--${o}--${r}-value`, n);
91
167
  }
92
168
  }
93
169
  updateStyle(e, t, n) {
@@ -106,8 +182,11 @@ var l = class e extends HTMLElement {
106
182
  let e = this.parentElement;
107
183
  for (; e;) {
108
184
  if (e.localName === "px-grid" || e.localName === "px-stack" && e?.getAttribute("direction") === "row") return !0;
109
- if (window.getComputedStyle(e).display === "contents") e = e.parentElement;
110
- else break;
185
+ if (window.getComputedStyle(e).display === "contents") {
186
+ e = e.parentElement;
187
+ continue;
188
+ }
189
+ break;
111
190
  }
112
191
  return !1;
113
192
  }
@@ -115,347 +194,391 @@ var l = class e extends HTMLElement {
115
194
  return this.getAttribute("grow");
116
195
  }
117
196
  set grow(e) {
118
- h(this, "grow", e);
197
+ o(this, "grow", e);
119
198
  }
120
199
  get growMobile() {
121
200
  return this.getAttribute("grow--mobile");
122
201
  }
123
202
  set growMobile(e) {
124
- h(this, "grow--mobile", e);
203
+ o(this, "grow--mobile", e);
125
204
  }
126
205
  get growTablet() {
127
206
  return this.getAttribute("grow--tablet");
128
207
  }
129
208
  set growTablet(e) {
130
- h(this, "grow--tablet", e);
209
+ o(this, "grow--tablet", e);
131
210
  }
132
211
  get growLaptop() {
133
212
  return this.getAttribute("grow--laptop");
134
213
  }
135
214
  set growLaptop(e) {
136
- h(this, "grow--laptop", e);
215
+ o(this, "grow--laptop", e);
137
216
  }
138
217
  get growDesktop() {
139
218
  return this.getAttribute("grow--desktop");
140
219
  }
141
220
  set growDesktop(e) {
142
- h(this, "grow--desktop", e);
221
+ o(this, "grow--desktop", e);
143
222
  }
144
223
  get shrink() {
145
224
  return this.getAttribute("shrink");
146
225
  }
147
226
  set shrink(e) {
148
- h(this, "shrink", e);
227
+ o(this, "shrink", e);
149
228
  }
150
229
  get shrinkMobile() {
151
230
  return this.getAttribute("shrink--mobile");
152
231
  }
153
232
  set shrinkMobile(e) {
154
- h(this, "shrink--mobile", e);
233
+ o(this, "shrink--mobile", e);
155
234
  }
156
235
  get shrinkTablet() {
157
236
  return this.getAttribute("shrink--tablet");
158
237
  }
159
238
  set shrinkTablet(e) {
160
- h(this, "shrink--tablet", e);
239
+ o(this, "shrink--tablet", e);
161
240
  }
162
241
  get shrinkLaptop() {
163
242
  return this.getAttribute("shrink--laptop");
164
243
  }
165
244
  set shrinkLaptop(e) {
166
- h(this, "shrink--laptop", e);
245
+ o(this, "shrink--laptop", e);
167
246
  }
168
247
  get shrinkDesktop() {
169
248
  return this.getAttribute("shrink--desktop");
170
249
  }
171
250
  set shrinkDesktop(e) {
172
- h(this, "shrink--desktop", e);
251
+ o(this, "shrink--desktop", e);
173
252
  }
174
253
  get basis() {
175
254
  return this.getAttribute("basis");
176
255
  }
177
256
  set basis(e) {
178
- h(this, "basis", e);
257
+ o(this, "basis", e);
179
258
  }
180
259
  get basisMobile() {
181
260
  return this.getAttribute("basis--mobile");
182
261
  }
183
262
  set basisMobile(e) {
184
- h(this, "basis--mobile", e);
263
+ o(this, "basis--mobile", e);
185
264
  }
186
265
  get basisTablet() {
187
266
  return this.getAttribute("basis--tablet");
188
267
  }
189
268
  set basisTablet(e) {
190
- h(this, "basis--tablet", e);
269
+ o(this, "basis--tablet", e);
191
270
  }
192
271
  get basisLaptop() {
193
272
  return this.getAttribute("basis--laptop");
194
273
  }
195
274
  set basisLaptop(e) {
196
- h(this, "basis--laptop", e);
275
+ o(this, "basis--laptop", e);
197
276
  }
198
277
  get basisDesktop() {
199
278
  return this.getAttribute("basis--desktop");
200
279
  }
201
280
  set basisDesktop(e) {
202
- h(this, "basis--desktop", e);
281
+ o(this, "basis--desktop", e);
203
282
  }
204
283
  get alignSelf() {
205
284
  return this.getAttribute("align-self");
206
285
  }
207
286
  set alignSelf(e) {
208
- h(this, "align-self", e);
287
+ o(this, "align-self", e);
209
288
  }
210
289
  get alignSelfMobile() {
211
290
  return this.getAttribute("align-self--mobile");
212
291
  }
213
292
  set alignSelfMobile(e) {
214
- h(this, "align-self--mobile", e);
293
+ o(this, "align-self--mobile", e);
215
294
  }
216
295
  get alignSelfTablet() {
217
296
  return this.getAttribute("align-self--tablet");
218
297
  }
219
298
  set alignSelfTablet(e) {
220
- h(this, "align-self--tablet", e);
299
+ o(this, "align-self--tablet", e);
221
300
  }
222
301
  get alignSelfLaptop() {
223
302
  return this.getAttribute("align-self--laptop");
224
303
  }
225
304
  set alignSelfLaptop(e) {
226
- h(this, "align-self--laptop", e);
305
+ o(this, "align-self--laptop", e);
227
306
  }
228
307
  get alignSelfDesktop() {
229
308
  return this.getAttribute("align-self--desktop");
230
309
  }
231
310
  set alignSelfDesktop(e) {
232
- h(this, "align-self--desktop", e);
311
+ o(this, "align-self--desktop", e);
233
312
  }
234
313
  get justifySelf() {
235
314
  return this.getAttribute("justify-self");
236
315
  }
237
316
  set justifySelf(e) {
238
- h(this, "justify-self", e);
317
+ o(this, "justify-self", e);
239
318
  }
240
319
  get justifySelfMobile() {
241
320
  return this.getAttribute("justify-self--mobile");
242
321
  }
243
322
  set justifySelfMobile(e) {
244
- h(this, "justify-self--mobile", e);
323
+ o(this, "justify-self--mobile", e);
245
324
  }
246
325
  get justifySelfTablet() {
247
326
  return this.getAttribute("justify-self--tablet");
248
327
  }
249
328
  set justifySelfTablet(e) {
250
- h(this, "justify-self--tablet", e);
329
+ o(this, "justify-self--tablet", e);
251
330
  }
252
331
  get justifySelfLaptop() {
253
332
  return this.getAttribute("justify-self--laptop");
254
333
  }
255
334
  set justifySelfLaptop(e) {
256
- h(this, "justify-self--laptop", e);
335
+ o(this, "justify-self--laptop", e);
257
336
  }
258
337
  get justifySelfDesktop() {
259
338
  return this.getAttribute("justify-self--desktop");
260
339
  }
261
340
  set justifySelfDesktop(e) {
262
- h(this, "justify-self--desktop", e);
341
+ o(this, "justify-self--desktop", e);
263
342
  }
264
343
  get hiddenMobile() {
265
344
  return this.hasAttribute("hidden--mobile");
266
345
  }
267
346
  set hiddenMobile(e) {
268
- g(this, "hidden--mobile", e);
347
+ s(this, "hidden--mobile", e);
269
348
  }
270
349
  get hiddenTablet() {
271
350
  return this.hasAttribute("hidden--tablet");
272
351
  }
273
352
  set hiddenTablet(e) {
274
- g(this, "hidden--tablet", e);
353
+ s(this, "hidden--tablet", e);
275
354
  }
276
355
  get hiddenLaptop() {
277
356
  return this.hasAttribute("hidden--laptop");
278
357
  }
279
358
  set hiddenLaptop(e) {
280
- g(this, "hidden--laptop", e);
359
+ s(this, "hidden--laptop", e);
281
360
  }
282
361
  get hiddenDesktop() {
283
362
  return this.hasAttribute("hidden--desktop");
284
363
  }
285
364
  set hiddenDesktop(e) {
286
- g(this, "hidden--desktop", e);
365
+ s(this, "hidden--desktop", e);
366
+ }
367
+ get shownSr() {
368
+ return this.hasAttribute("shown--sr");
369
+ }
370
+ set shownSr(e) {
371
+ s(this, "shown--sr", e);
372
+ }
373
+ get shownSrMobile() {
374
+ return this.hasAttribute("shown--sr--mobile");
375
+ }
376
+ set shownSrMobile(e) {
377
+ s(this, "shown--sr--mobile", e);
378
+ }
379
+ get shownSrTablet() {
380
+ return this.hasAttribute("shown--sr--tablet");
381
+ }
382
+ set shownSrTablet(e) {
383
+ s(this, "shown--sr--tablet", e);
384
+ }
385
+ get shownSrLaptop() {
386
+ return this.hasAttribute("shown--sr--laptop");
387
+ }
388
+ set shownSrLaptop(e) {
389
+ s(this, "shown--sr--laptop", e);
390
+ }
391
+ get shownSrDesktop() {
392
+ return this.hasAttribute("shown--sr--desktop");
393
+ }
394
+ set shownSrDesktop(e) {
395
+ s(this, "shown--sr--desktop", e);
287
396
  }
288
397
  get colSpan() {
289
398
  return this.getAttribute("col-span");
290
399
  }
291
400
  set colSpan(e) {
292
- h(this, "col-span", e);
401
+ o(this, "col-span", e);
293
402
  }
294
403
  get colSpanMobile() {
295
404
  return this.getAttribute("col-span--mobile");
296
405
  }
297
406
  set colSpanMobile(e) {
298
- h(this, "col-span--mobile", e);
407
+ o(this, "col-span--mobile", e);
299
408
  }
300
409
  get colSpanTablet() {
301
410
  return this.getAttribute("col-span--tablet");
302
411
  }
303
412
  set colSpanTablet(e) {
304
- h(this, "col-span--tablet", e);
413
+ o(this, "col-span--tablet", e);
305
414
  }
306
415
  get colSpanLaptop() {
307
416
  return this.getAttribute("col-span--laptop");
308
417
  }
309
418
  set colSpanLaptop(e) {
310
- h(this, "col-span--laptop", e);
419
+ o(this, "col-span--laptop", e);
311
420
  }
312
421
  get colSpanDesktop() {
313
422
  return this.getAttribute("col-span--desktop");
314
423
  }
315
424
  set colSpanDesktop(e) {
316
- h(this, "col-span--desktop", e);
425
+ o(this, "col-span--desktop", e);
317
426
  }
318
427
  get order() {
319
428
  return this.getAttribute("order");
320
429
  }
321
430
  set order(e) {
322
- h(this, "order", e);
431
+ o(this, "order", e);
323
432
  }
324
433
  get orderMobile() {
325
434
  return this.getAttribute("order--mobile");
326
435
  }
327
436
  set orderMobile(e) {
328
- h(this, "order--mobile", e);
437
+ o(this, "order--mobile", e);
329
438
  }
330
439
  get orderTablet() {
331
440
  return this.getAttribute("order--tablet");
332
441
  }
333
442
  set orderTablet(e) {
334
- h(this, "order--tablet", e);
443
+ o(this, "order--tablet", e);
335
444
  }
336
445
  get orderLaptop() {
337
446
  return this.getAttribute("order--laptop");
338
447
  }
339
448
  set orderLaptop(e) {
340
- h(this, "order--laptop", e);
449
+ o(this, "order--laptop", e);
341
450
  }
342
451
  get orderDesktop() {
343
452
  return this.getAttribute("order--desktop");
344
453
  }
345
454
  set orderDesktop(e) {
346
- h(this, "order--desktop", e);
455
+ o(this, "order--desktop", e);
456
+ }
457
+ get stickyTop() {
458
+ return this.hasAttribute("sticky-top");
459
+ }
460
+ set stickyTop(e) {
461
+ s(this, "sticky-top", e);
462
+ }
463
+ get stickyBottom() {
464
+ return this.hasAttribute("sticky-bottom");
465
+ }
466
+ set stickyBottom(e) {
467
+ s(this, "sticky-bottom", e);
468
+ }
469
+ get wordBreakAll() {
470
+ return this.hasAttribute("word-break-all");
471
+ }
472
+ set wordBreakAll(e) {
473
+ s(this, "word-break-all", e);
474
+ }
475
+ get wordBreakAllMobile() {
476
+ return this.hasAttribute("word-break-all--mobile");
477
+ }
478
+ set wordBreakAllMobile(e) {
479
+ s(this, "word-break-all--mobile", e);
480
+ }
481
+ get wordBreakAllTablet() {
482
+ return this.hasAttribute("word-break-all--tablet");
483
+ }
484
+ set wordBreakAllTablet(e) {
485
+ s(this, "word-break-all--tablet", e);
486
+ }
487
+ get wordBreakAllLaptop() {
488
+ return this.hasAttribute("word-break-all--laptop");
489
+ }
490
+ set wordBreakAllLaptop(e) {
491
+ s(this, "word-break-all--laptop", e);
492
+ }
493
+ get wordBreakAllDesktop() {
494
+ return this.hasAttribute("word-break-all--desktop");
495
+ }
496
+ set wordBreakAllDesktop(e) {
497
+ s(this, "word-break-all--desktop", e);
347
498
  }
348
499
  };
349
- (class extends l {
500
+ (class extends m {
501
+ static {
502
+ this.nativeAttributes = {};
503
+ }
504
+ static {
505
+ this.nativeProperties = {};
506
+ }
350
507
  static {
351
- this.accessorExclusions = [];
508
+ this.nativeMethods = [];
352
509
  }
353
510
  static get observedAttributes() {
354
- return [...super.observedAttributes, ...r(this.nativeName)];
511
+ return [...super.observedAttributes, ...Object.keys(this.nativeAttributes)];
355
512
  }
356
513
  attributeChangedCallback(e, t, n) {
357
- super.attributeChangedCallback(e, t, n), n === null ? this.$el.toggleAttribute(e) : this.$el.setAttribute(e, n);
514
+ super.attributeChangedCallback(e, t, n), t !== n && Object.prototype.hasOwnProperty.call(this.ctor.nativeAttributes, e) && this._forwardNativeAttribute(e, n);
358
515
  }
359
516
  get ctor() {
360
517
  return Object.getPrototypeOf(this).constructor;
361
518
  }
362
519
  constructor(...e) {
363
- super(...e), this.ctor.supportedPropertyNames || (this.ctor.supportedPropertyNames = n(this.ctor.nativeName)), this.enhanceWithNativeProperties();
520
+ super(...e), this.enhanceWithNativeProperties();
521
+ }
522
+ getNativePropertyMetadata() {
523
+ let e = /* @__PURE__ */ new Map(), t = this.ctor.nativeAttributes;
524
+ for (let [n, r] of Object.entries(t)) for (let t of r) e.set(t, n);
525
+ let n = new Map(Object.entries(this.ctor.nativeProperties));
526
+ for (let t of e.keys()) n.set(t, "writable");
527
+ return {
528
+ reflectedProperties: e,
529
+ properties: n
530
+ };
531
+ }
532
+ setNativeProperty(e, t, n) {
533
+ let r = n.get(e);
534
+ if (r !== void 0) {
535
+ this.$el[e] = t;
536
+ let n = this.$el.getAttribute(r);
537
+ this.getAttribute(r) !== n && (n === null ? this.removeAttribute(r) : this.setAttribute(r, n));
538
+ } else this.$el[e] !== t && (this.$el[e] = t);
364
539
  }
365
540
  enhanceWithNativeProperties() {
366
- for (let e of this.ctor.supportedPropertyNames) if (!(e === "constructor" || (this.ctor?.accessorExclusions ?? []).includes(e))) try {
367
- Object.defineProperty(this, e, {
368
- get() {
369
- return this.$el[e];
370
- },
371
- set(t) {
372
- this.$el[e] !== t && (this.$el[e] = t);
373
- }
541
+ let { reflectedProperties: e, properties: t } = this.getNativePropertyMetadata();
542
+ for (let [n, r] of t) {
543
+ let t = n;
544
+ Object.defineProperty(this, t, {
545
+ get: () => this.$el[t],
546
+ set: r === "writable" ? (n) => this.setNativeProperty(t, n, e) : void 0
374
547
  });
375
- } catch (t) {
376
- console.warn(`Could not create property ${e} for`, this.$el, t);
377
548
  }
549
+ for (let e of this.ctor.nativeMethods) Object.defineProperty(this, e, { value: (...t) => {
550
+ let n = this.$el, r = Reflect.get(n, e);
551
+ if (typeof r != "function") throw TypeError(`Native ${this.ctor.nativeName}.${e}() is not supported by this browser`);
552
+ return Reflect.apply(r, n, t);
553
+ } });
378
554
  }
379
555
  get $el() {
380
556
  return this.shadowRoot.querySelector(this.ctor.nativeName);
381
557
  }
558
+ _forwardNativeAttribute(e, t) {
559
+ this.$el.getAttribute(e) !== t && (t === null ? this.$el.removeAttribute(e) : this.$el.setAttribute(e, t));
560
+ }
382
561
  _updateAttribute(e, t) {
383
- h(this, e, t);
562
+ o(this, e, t);
384
563
  }
385
564
  _updateBooleanAttribute(e, t) {
386
- g(this, e, t);
565
+ s(this, e, t);
387
566
  }
388
567
  });
389
- var u = [
390
- "",
391
- "default",
392
- "auto",
393
- "flex-start",
394
- "start",
395
- "flex-end",
396
- "end",
397
- "center",
398
- "baseline",
399
- "stretch"
400
- ], d = [
401
- "",
402
- "default",
403
- "start",
404
- "end",
405
- "center",
406
- "stretch"
407
- ], f = [
408
- "",
409
- "default",
410
- "start",
411
- "end",
412
- "center",
413
- "stretch"
414
- ], p = [
415
- "",
416
- "1",
417
- "2",
418
- "3",
419
- "4",
420
- "5",
421
- "6",
422
- "7",
423
- "8",
424
- "9",
425
- "10",
426
- "11",
427
- "12"
428
- ], m = [
429
- "",
430
- "-1",
431
- "0",
432
- "1",
433
- "2",
434
- "3",
435
- "4",
436
- "5",
437
- "6",
438
- "7",
439
- "8",
440
- "9",
441
- "10",
442
- "11",
443
- "12"
568
+ //#endregion
569
+ //#region ../common/src/nativeProperties.ts
570
+ var h = {
571
+ validity: "readonly",
572
+ validationMessage: "readonly",
573
+ willValidate: "readonly"
574
+ }, g = [
575
+ "checkValidity",
576
+ "reportValidity",
577
+ "setCustomValidity"
444
578
  ];
445
- [...[
446
- "Xs",
447
- "S",
448
- "M",
449
- "L",
450
- "Xl"
451
- ].map((e) => e.toLowerCase())];
452
- function h(e, t, n) {
453
- n == null || n === "" ? e.removeAttribute(t) : e.setAttribute(t, n.toString());
454
- }
455
- function g(e, t, n) {
456
- n ? e.setAttribute(t, "") : e.removeAttribute(t);
457
- }
458
- // ../common/src/template.ts
579
+ ({ ...h }), [...g], { ...h }, [...g], { ...h }, [...g], { ...h }, [...g], { ...h }, [...g];
580
+ //#endregion
581
+ //#region ../common/src/template.ts
459
582
  var _ = /* @__PURE__ */ new Map(), v = 500;
460
583
  function y(e) {
461
584
  let t = document.createElement("template");
@@ -472,7 +595,8 @@ function S(e, t) {
472
595
  let n = typeof t == "string" ? x(t) : t;
473
596
  e.replaceChildren(document.importNode(n.content, !0));
474
597
  }
475
- // src/HeadingGroup.ts
598
+ //#endregion
599
+ //#region src/HeadingGroup.ts
476
600
  var C = new CSSStyleSheet();
477
601
  C.replaceSync(e);
478
602
  var w = class e extends HTMLElement {
@@ -487,4 +611,5 @@ var w = class e extends HTMLElement {
487
611
  }
488
612
  };
489
613
  customElements.get("px-heading-group") || customElements.define("px-heading-group", w);
614
+ //#endregion
490
615
  export { w as HeadingGroup };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/heading-group",
3
- "version": "1.4.19-beta.2",
3
+ "version": "1.4.20-alpha.10",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",