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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,715 +1,671 @@
1
- const A = ".list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}", w = ":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}}", y = {};
2
- function $(o) {
3
- const t = document.createElement(o), s = Object.getPrototypeOf(t);
4
- return Object.getOwnPropertyNames(s);
1
+ //#region src/list.css?inline
2
+ var e = ".list{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}", 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
+ //#endregion
4
+ //#region ../common/src/common.ts
5
+ function n(e) {
6
+ let t = document.createElement(e), n = Object.getPrototypeOf(t);
7
+ return Object.getOwnPropertyNames(n);
5
8
  }
6
- function S(o) {
7
- const t = document.createElement(o), s = Object.getPrototypeOf(t);
8
- return Object.getOwnPropertyNames(s).map(
9
- (e) => e.toLowerCase()
10
- );
9
+ function r(e) {
10
+ let t = document.createElement(e), n = Object.getPrototypeOf(t);
11
+ return Object.getOwnPropertyNames(n).map((e) => e.toLowerCase());
11
12
  }
12
- const m = new CSSStyleSheet();
13
- m.replaceSync(w);
14
- const x = typeof import.meta < "u" && typeof y < "u" && !0;
15
- typeof window < "u" && (window.isComponentDebug = b);
16
- function b() {
17
- return x;
13
+ var i = new CSSStyleSheet();
14
+ i.replaceSync(t);
15
+ var a = {
16
+ BASE_URL: "/",
17
+ DEV: !0,
18
+ MODE: "production",
19
+ PROD: !1,
20
+ SSR: !1,
21
+ VITE_COMPONENT_DEBUG: "true"
22
+ }, o = a?.VITE_COMPONENT_DEBUG === "true" || a?.DEV === !0;
23
+ typeof window < "u" && (window.isComponentDebug = s);
24
+ function s() {
25
+ return o;
18
26
  }
19
- function j(o) {
20
- b() && console.error(o);
27
+ function c(e) {
28
+ s() && console.error(e);
21
29
  }
22
- typeof window < "u" && (window.isComponentDebug = b);
23
- class u extends HTMLElement {
24
- static get observedAttributes() {
25
- return [
26
- "grow",
27
- "grow--mobile",
28
- "grow--tablet",
29
- "grow--laptop",
30
- "grow--desktop",
31
- "shrink",
32
- "shrink--mobile",
33
- "shrink--tablet",
34
- "shrink--laptop",
35
- "shrink--desktop",
36
- "basis",
37
- "basis--mobile",
38
- "basis--tablet",
39
- "basis--laptop",
40
- "basis--desktop",
41
- "align-self",
42
- "align-self--mobile",
43
- "align-self--tablet",
44
- "align-self--laptop",
45
- "align-self--desktop",
46
- "justify-self",
47
- "justify-self--mobile",
48
- "justify-self--tablet",
49
- "justify-self--laptop",
50
- "justify-self--desktop",
51
- "hidden",
52
- "hidden--mobile",
53
- "hidden--tablet",
54
- "hidden--laptop",
55
- "hidden--desktop",
56
- "shown--sr",
57
- "shown--sr--mobile",
58
- "shown--sr--tablet",
59
- "shown--sr--laptop",
60
- "shown--sr--desktop",
61
- "col-span",
62
- "col-span--mobile",
63
- "col-span--tablet",
64
- "col-span--laptop",
65
- "col-span--desktop",
66
- "order",
67
- "order--mobile",
68
- "order--tablet",
69
- "order--laptop",
70
- "order--desktop"
71
- ];
72
- }
73
- constructor(...t) {
74
- super(), this.shadowRoot || this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [
75
- m,
76
- ...t
77
- ];
78
- }
79
- attributeChangedCallback(t, s, e) {
80
- var i;
81
- if (u.observedAttributes.indexOf(t) !== -1)
82
- switch (t) {
83
- case "grow":
84
- case "grow--mobile":
85
- case "grow--tablet":
86
- case "grow--laptop":
87
- case "grow--desktop":
88
- case "shrink":
89
- case "shrink--mobile":
90
- case "shrink--tablet":
91
- case "shrink--laptop":
92
- case "shrink--desktop":
93
- case "basis":
94
- case "basis--mobile":
95
- case "basis--tablet":
96
- case "basis--laptop":
97
- case "basis--desktop":
98
- this.style.setProperty(`--${t}-value`, e);
99
- break;
100
- case "align-self":
101
- case "align-self--mobile":
102
- case "align-self--tablet":
103
- case "align-self--laptop":
104
- case "align-self--desktop":
105
- this.updateProperties(
106
- t,
107
- s,
108
- e,
109
- ((i = this.parentElement) == null ? void 0 : i.localName) === "px-grid" ? T : M
110
- );
111
- break;
112
- case "justify-self":
113
- case "justify-self--mobile":
114
- case "justify-self--tablet":
115
- case "justify-self--laptop":
116
- case "justify-self--desktop":
117
- this.updateProperties(
118
- t,
119
- s,
120
- e,
121
- C
122
- );
123
- break;
124
- case "col-span":
125
- case "col-span--mobile":
126
- case "col-span--tablet":
127
- case "col-span--laptop":
128
- case "col-span--desktop":
129
- this.updateProperties(t, s, e, D);
130
- break;
131
- case "order":
132
- case "order--mobile":
133
- case "order--tablet":
134
- case "order--laptop":
135
- case "order--desktop":
136
- this.updateProperties(t, s, e, L);
137
- break;
138
- }
139
- }
140
- updateProperties(t, s, e, i) {
141
- if (i && !this.checkName(i, e)) {
142
- j(
143
- `${e} is not an allowed ${i} value for ${this.tagName.toLowerCase()}`
144
- );
145
- return;
146
- }
147
- const a = t.indexOf("--") > -1, l = a ? t.split("--")[0] : t;
148
- if (!a)
149
- this.style.setProperty(
150
- `--${l}-value`,
151
- s
152
- ), this.style.setProperty(
153
- `--${l}-value`,
154
- e
155
- );
156
- else {
157
- const n = t.split("--")[1];
158
- this.style.setProperty(
159
- `--${l}--${n}-value`,
160
- s
161
- ), this.style.setProperty(
162
- `--${l}--${n}-value`,
163
- e
164
- );
165
- }
166
- }
167
- updateStyle(t, s, e) {
168
- e !== null && e !== "" && e !== "default" && this.style.setProperty(
169
- `--${t}--${s}-value`,
170
- e
171
- );
172
- }
173
- checkName(t, s) {
174
- return t.includes(s);
175
- }
176
- get $el() {
177
- return this;
178
- }
179
- get $parentElementName() {
180
- var t;
181
- return (t = this.parentElement) == null ? void 0 : t.tagName.toLowerCase();
182
- }
183
- get isInsideGridOrStack() {
184
- let t = this.parentElement;
185
- for (; t; ) {
186
- if (t.localName === "px-grid" || t.localName === "px-stack" && (t == null ? void 0 : t.getAttribute("direction")) === "row")
187
- return !0;
188
- if (window.getComputedStyle(t).display === "contents") {
189
- t = t.parentElement;
190
- continue;
191
- }
192
- break;
193
- }
194
- return !1;
195
- }
196
- get grow() {
197
- return this.getAttribute("grow");
198
- }
199
- set grow(t) {
200
- this.setAttribute("grow", t);
201
- }
202
- get growMobile() {
203
- return this.getAttribute("grow--mobile");
204
- }
205
- set growMobile(t) {
206
- this.setAttribute("grow--mobile", t);
207
- }
208
- get growTablet() {
209
- return this.getAttribute("grow--tablet");
210
- }
211
- set growTablet(t) {
212
- this.setAttribute("grow--tablet", t);
213
- }
214
- get growLaptop() {
215
- return this.getAttribute("grow--laptop");
216
- }
217
- set growLaptop(t) {
218
- this.setAttribute("grow--laptop", t);
219
- }
220
- get growDesktop() {
221
- return this.getAttribute("grow--desktop");
222
- }
223
- set growDesktop(t) {
224
- this.setAttribute("grow--desktop", t);
225
- }
226
- get shrink() {
227
- return this.getAttribute("shrink");
228
- }
229
- set shrink(t) {
230
- this.setAttribute("shrink", t);
231
- }
232
- get shrinkMobile() {
233
- return this.getAttribute("shrink--mobile");
234
- }
235
- set shrinkMobile(t) {
236
- this.setAttribute("shrink--mobile", t);
237
- }
238
- get shrinkTablet() {
239
- return this.getAttribute("shrink--tablet");
240
- }
241
- set shrinkTablet(t) {
242
- this.setAttribute("shrink--tablet", t);
243
- }
244
- get shrinkLaptop() {
245
- return this.getAttribute("shrink--laptop");
246
- }
247
- set shrinkLaptop(t) {
248
- this.setAttribute("shrink--laptop", t);
249
- }
250
- get shrinkDesktop() {
251
- return this.getAttribute("shrink--desktop");
252
- }
253
- set shrinkDesktop(t) {
254
- this.setAttribute("shrink--desktop", t);
255
- }
256
- get basis() {
257
- return this.getAttribute("basis");
258
- }
259
- set basis(t) {
260
- this.setAttribute("basis", t);
261
- }
262
- get basisMobile() {
263
- return this.getAttribute("basis--mobile");
264
- }
265
- set basisMobile(t) {
266
- this.setAttribute("basis--mobile", t);
267
- }
268
- get basisTablet() {
269
- return this.getAttribute("basis--tablet");
270
- }
271
- set basisTablet(t) {
272
- this.setAttribute("basis--tablet", t);
273
- }
274
- get basisLaptop() {
275
- return this.getAttribute("basis--laptop");
276
- }
277
- set basisLaptop(t) {
278
- this.setAttribute("basis--laptop", t);
279
- }
280
- get basisDesktop() {
281
- return this.getAttribute("basis--desktop");
282
- }
283
- set basisDesktop(t) {
284
- this.setAttribute("basis--desktop", t);
285
- }
286
- get alignSelf() {
287
- return this.getAttribute("align-self");
288
- }
289
- set alignSelf(t) {
290
- this.setAttribute("align-self", t);
291
- }
292
- get alignSelfMobile() {
293
- return this.getAttribute("align-self--mobile");
294
- }
295
- set alignSelfMobile(t) {
296
- this.setAttribute("align-self--mobile", t);
297
- }
298
- get alignSelfTablet() {
299
- return this.getAttribute("align-self--tablet");
300
- }
301
- set alignSelfTablet(t) {
302
- this.setAttribute("align-self--tablet", t);
303
- }
304
- get alignSelfLaptop() {
305
- return this.getAttribute("align-self--laptop");
306
- }
307
- set alignSelfLaptop(t) {
308
- this.setAttribute("align-self--laptop", t);
309
- }
310
- get alignSelfDesktop() {
311
- return this.getAttribute("align-self--desktop");
312
- }
313
- set alignSelfDesktop(t) {
314
- this.setAttribute("align-self--desktop", t);
315
- }
316
- get justifySelf() {
317
- return this.getAttribute("justify-self");
318
- }
319
- set justifySelf(t) {
320
- this.setAttribute("justify-self", t);
321
- }
322
- get justifySelfMobile() {
323
- return this.getAttribute("justify-self--mobile");
324
- }
325
- set justifySelfMobile(t) {
326
- this.setAttribute("justify-self--mobile", t);
327
- }
328
- get justifySelfTablet() {
329
- return this.getAttribute("justify-self--tablet");
330
- }
331
- set justifySelfTablet(t) {
332
- this.setAttribute("justify-self--tablet", t);
333
- }
334
- get justifySelfLaptop() {
335
- return this.getAttribute("justify-self--laptop");
336
- }
337
- set justifySelfLaptop(t) {
338
- this.setAttribute("justify-self--laptop", t);
339
- }
340
- get justifySelfDesktop() {
341
- return this.getAttribute("justify-self--desktop");
342
- }
343
- set justifySelfDesktop(t) {
344
- this.setAttribute("justify-self--desktop", t);
345
- }
346
- get hiddenMobile() {
347
- return this.getAttribute("hidden--mobile");
348
- }
349
- set hiddenMobile(t) {
350
- this.setAttribute("hidden--mobile", t);
351
- }
352
- get hiddenTablet() {
353
- return this.getAttribute("hidden--tablet");
354
- }
355
- set hiddenTablet(t) {
356
- this.setAttribute("hidden--tablet", t);
357
- }
358
- get hiddenLaptop() {
359
- return this.getAttribute("hidden--laptop");
360
- }
361
- set hiddenLaptop(t) {
362
- this.setAttribute("hidden--laptop", t);
363
- }
364
- get hiddenDesktop() {
365
- return this.getAttribute("hidden--desktop");
366
- }
367
- set hiddenDesktop(t) {
368
- this.setAttribute("hidden--desktop", t);
369
- }
370
- get colSpan() {
371
- return this.getAttribute("col-span");
372
- }
373
- set colSpan(t) {
374
- this.setAttribute("col-span", t);
375
- }
376
- get colSpanMobile() {
377
- return this.getAttribute("col-span--mobile");
378
- }
379
- set colSpanMobile(t) {
380
- this.setAttribute("col-span--mobile", t);
381
- }
382
- get colSpanTablet() {
383
- return this.getAttribute("col-span--tablet");
384
- }
385
- set colSpanTablet(t) {
386
- this.setAttribute("col-span--tablet", t);
387
- }
388
- get colSpanLaptop() {
389
- return this.getAttribute("col-span--laptop");
390
- }
391
- set colSpanLaptop(t) {
392
- this.setAttribute("col-span--laptop", t);
393
- }
394
- get colSpanDesktop() {
395
- return this.getAttribute("col-span--desktop");
396
- }
397
- set colSpanDesktop(t) {
398
- this.setAttribute("col-span--desktop", t);
399
- }
400
- get order() {
401
- return this.getAttribute("order");
402
- }
403
- set order(t) {
404
- this.setAttribute("order", t);
405
- }
406
- get orderMobile() {
407
- return this.getAttribute("order--mobile");
408
- }
409
- set orderMobile(t) {
410
- this.setAttribute("order--mobile", t);
411
- }
412
- get orderTablet() {
413
- return this.getAttribute("order--tablet");
414
- }
415
- set orderTablet(t) {
416
- this.setAttribute("order--tablet", t);
417
- }
418
- get orderLaptop() {
419
- return this.getAttribute("order--laptop");
420
- }
421
- set orderLaptop(t) {
422
- this.setAttribute("order--laptop", t);
423
- }
424
- get orderDesktop() {
425
- return this.getAttribute("order--desktop");
426
- }
427
- set orderDesktop(t) {
428
- this.setAttribute("order--desktop", t);
429
- }
430
- }
431
- const g = class g extends u {
432
- // nativeName: string;
433
- static get observedAttributes() {
434
- return [
435
- ...super.observedAttributes,
436
- ...S(this.nativeName)
437
- ];
438
- }
439
- attributeChangedCallback(t, s, e) {
440
- super.attributeChangedCallback(t, s, e), e === null ? this.$el.toggleAttribute(t) : this.$el.setAttribute(t, e);
441
- }
442
- get ctor() {
443
- return Object.getPrototypeOf(this).constructor;
444
- }
445
- constructor(...t) {
446
- super(...t), this.ctor.supportedPropertyNames || (this.ctor.supportedPropertyNames = $(
447
- this.ctor.nativeName
448
- )), this.enhanceWithNativeProperties();
449
- }
450
- enhanceWithNativeProperties() {
451
- var t;
452
- for (const s of this.ctor.supportedPropertyNames)
453
- if (!(s === "constructor" || (((t = this.ctor) == null ? void 0 : t.accessorExclusions) ?? []).includes(s)))
454
- try {
455
- Object.defineProperty(this, s, {
456
- get() {
457
- return this.$el[s];
458
- },
459
- set(e) {
460
- this.$el[s] !== e && (this.$el[s] = e);
461
- }
462
- });
463
- } catch (e) {
464
- console.warn(`Could not create property ${s} for`, this.$el, e);
465
- }
466
- }
467
- get $el() {
468
- return this.shadowRoot.querySelector(this.ctor.nativeName);
469
- }
470
- _updateAttribute(t, s) {
471
- s ? this.setAttribute(t, s) : this.removeAttribute(t);
472
- }
473
- _updateBooleanAttribute(t, s) {
474
- s ? this.setAttribute(t, "") : this.removeAttribute(t);
475
- }
476
- };
477
- g.accessorExclusions = [];
478
- let p = g;
479
- const M = [
480
- "",
481
- "default",
482
- "auto",
483
- "flex-start",
484
- "flex-end",
485
- "center",
486
- "baseline",
487
- "stretch"
488
- ], T = [
489
- "",
490
- "default",
491
- "start",
492
- "end",
493
- "center",
494
- "stretch"
495
- ], C = [
496
- "",
497
- "default",
498
- "start",
499
- "end",
500
- "center",
501
- "stretch"
502
- ], D = [
503
- "",
504
- "1",
505
- "2",
506
- "3",
507
- "4",
508
- "5",
509
- "6",
510
- "7",
511
- "8",
512
- "9",
513
- "10",
514
- "11",
515
- "12"
516
- ], L = [
517
- "",
518
- "-1",
519
- "0",
520
- "1",
521
- "2",
522
- "3",
523
- "4",
524
- "5",
525
- "6",
526
- "7",
527
- "8",
528
- "9",
529
- "10",
530
- "11",
531
- "12"
532
- ], O = ["Xs", "S", "M", "L", "Xl"];
533
- [
534
- ...O.map((o) => o.toLowerCase())
30
+ typeof window < "u" && (window.isComponentDebug = s);
31
+ var l = class e extends HTMLElement {
32
+ static get observedAttributes() {
33
+ 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(".");
34
+ }
35
+ constructor(...e) {
36
+ super(), this.shadowRoot || this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [i, ...e];
37
+ }
38
+ attributeChangedCallback(t, n, r) {
39
+ if (e.observedAttributes.indexOf(t) !== -1) switch (t) {
40
+ case "grow":
41
+ case "grow--mobile":
42
+ case "grow--tablet":
43
+ case "grow--laptop":
44
+ case "grow--desktop":
45
+ case "shrink":
46
+ case "shrink--mobile":
47
+ case "shrink--tablet":
48
+ case "shrink--laptop":
49
+ case "shrink--desktop":
50
+ case "basis":
51
+ case "basis--mobile":
52
+ case "basis--tablet":
53
+ case "basis--laptop":
54
+ case "basis--desktop":
55
+ this.style.setProperty(`--${t}-value`, r);
56
+ break;
57
+ case "align-self":
58
+ case "align-self--mobile":
59
+ case "align-self--tablet":
60
+ case "align-self--laptop":
61
+ case "align-self--desktop":
62
+ this.updateProperties(t, n, r, this.parentElement?.localName === "px-grid" ? f : d);
63
+ break;
64
+ case "justify-self":
65
+ case "justify-self--mobile":
66
+ case "justify-self--tablet":
67
+ case "justify-self--laptop":
68
+ case "justify-self--desktop":
69
+ this.updateProperties(t, n, r, p);
70
+ break;
71
+ case "col-span":
72
+ case "col-span--mobile":
73
+ case "col-span--tablet":
74
+ case "col-span--laptop":
75
+ case "col-span--desktop":
76
+ this.updateProperties(t, n, r, m);
77
+ break;
78
+ case "order":
79
+ case "order--mobile":
80
+ case "order--tablet":
81
+ case "order--laptop":
82
+ case "order--desktop": this.updateProperties(t, n, r, h);
83
+ }
84
+ }
85
+ updateProperties(e, t, n, r) {
86
+ r && (this.checkName(r, n) || c(`"${n}" is not an allowed ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`));
87
+ let i = e.indexOf("--") > -1, a = i ? e.split("--")[0] : e;
88
+ if (!i) this.style.setProperty(`--${a}-value`, t), this.style.setProperty(`--${a}-value`, n);
89
+ else {
90
+ let r = e.split("--")[1];
91
+ this.style.setProperty(`--${a}--${r}-value`, t), this.style.setProperty(`--${a}--${r}-value`, n);
92
+ }
93
+ }
94
+ updateStyle(e, t, n) {
95
+ n !== null && n !== "" && n !== "default" && this.style.setProperty(`--${e}--${t}-value`, n);
96
+ }
97
+ checkName(e, t) {
98
+ return e.includes(t);
99
+ }
100
+ get $el() {
101
+ return this;
102
+ }
103
+ get $parentElementName() {
104
+ return this.parentElement?.tagName.toLowerCase();
105
+ }
106
+ get isInsideGridOrStack() {
107
+ let e = this.parentElement;
108
+ for (; e;) {
109
+ if (e.localName === "px-grid" || e.localName === "px-stack" && e?.getAttribute("direction") === "row") return !0;
110
+ if (window.getComputedStyle(e).display === "contents") e = e.parentElement;
111
+ else break;
112
+ }
113
+ return !1;
114
+ }
115
+ get grow() {
116
+ return this.getAttribute("grow");
117
+ }
118
+ set grow(e) {
119
+ _(this, "grow", e);
120
+ }
121
+ get growMobile() {
122
+ return this.getAttribute("grow--mobile");
123
+ }
124
+ set growMobile(e) {
125
+ _(this, "grow--mobile", e);
126
+ }
127
+ get growTablet() {
128
+ return this.getAttribute("grow--tablet");
129
+ }
130
+ set growTablet(e) {
131
+ _(this, "grow--tablet", e);
132
+ }
133
+ get growLaptop() {
134
+ return this.getAttribute("grow--laptop");
135
+ }
136
+ set growLaptop(e) {
137
+ _(this, "grow--laptop", e);
138
+ }
139
+ get growDesktop() {
140
+ return this.getAttribute("grow--desktop");
141
+ }
142
+ set growDesktop(e) {
143
+ _(this, "grow--desktop", e);
144
+ }
145
+ get shrink() {
146
+ return this.getAttribute("shrink");
147
+ }
148
+ set shrink(e) {
149
+ _(this, "shrink", e);
150
+ }
151
+ get shrinkMobile() {
152
+ return this.getAttribute("shrink--mobile");
153
+ }
154
+ set shrinkMobile(e) {
155
+ _(this, "shrink--mobile", e);
156
+ }
157
+ get shrinkTablet() {
158
+ return this.getAttribute("shrink--tablet");
159
+ }
160
+ set shrinkTablet(e) {
161
+ _(this, "shrink--tablet", e);
162
+ }
163
+ get shrinkLaptop() {
164
+ return this.getAttribute("shrink--laptop");
165
+ }
166
+ set shrinkLaptop(e) {
167
+ _(this, "shrink--laptop", e);
168
+ }
169
+ get shrinkDesktop() {
170
+ return this.getAttribute("shrink--desktop");
171
+ }
172
+ set shrinkDesktop(e) {
173
+ _(this, "shrink--desktop", e);
174
+ }
175
+ get basis() {
176
+ return this.getAttribute("basis");
177
+ }
178
+ set basis(e) {
179
+ _(this, "basis", e);
180
+ }
181
+ get basisMobile() {
182
+ return this.getAttribute("basis--mobile");
183
+ }
184
+ set basisMobile(e) {
185
+ _(this, "basis--mobile", e);
186
+ }
187
+ get basisTablet() {
188
+ return this.getAttribute("basis--tablet");
189
+ }
190
+ set basisTablet(e) {
191
+ _(this, "basis--tablet", e);
192
+ }
193
+ get basisLaptop() {
194
+ return this.getAttribute("basis--laptop");
195
+ }
196
+ set basisLaptop(e) {
197
+ _(this, "basis--laptop", e);
198
+ }
199
+ get basisDesktop() {
200
+ return this.getAttribute("basis--desktop");
201
+ }
202
+ set basisDesktop(e) {
203
+ _(this, "basis--desktop", e);
204
+ }
205
+ get alignSelf() {
206
+ return this.getAttribute("align-self");
207
+ }
208
+ set alignSelf(e) {
209
+ _(this, "align-self", e);
210
+ }
211
+ get alignSelfMobile() {
212
+ return this.getAttribute("align-self--mobile");
213
+ }
214
+ set alignSelfMobile(e) {
215
+ _(this, "align-self--mobile", e);
216
+ }
217
+ get alignSelfTablet() {
218
+ return this.getAttribute("align-self--tablet");
219
+ }
220
+ set alignSelfTablet(e) {
221
+ _(this, "align-self--tablet", e);
222
+ }
223
+ get alignSelfLaptop() {
224
+ return this.getAttribute("align-self--laptop");
225
+ }
226
+ set alignSelfLaptop(e) {
227
+ _(this, "align-self--laptop", e);
228
+ }
229
+ get alignSelfDesktop() {
230
+ return this.getAttribute("align-self--desktop");
231
+ }
232
+ set alignSelfDesktop(e) {
233
+ _(this, "align-self--desktop", e);
234
+ }
235
+ get justifySelf() {
236
+ return this.getAttribute("justify-self");
237
+ }
238
+ set justifySelf(e) {
239
+ _(this, "justify-self", e);
240
+ }
241
+ get justifySelfMobile() {
242
+ return this.getAttribute("justify-self--mobile");
243
+ }
244
+ set justifySelfMobile(e) {
245
+ _(this, "justify-self--mobile", e);
246
+ }
247
+ get justifySelfTablet() {
248
+ return this.getAttribute("justify-self--tablet");
249
+ }
250
+ set justifySelfTablet(e) {
251
+ _(this, "justify-self--tablet", e);
252
+ }
253
+ get justifySelfLaptop() {
254
+ return this.getAttribute("justify-self--laptop");
255
+ }
256
+ set justifySelfLaptop(e) {
257
+ _(this, "justify-self--laptop", e);
258
+ }
259
+ get justifySelfDesktop() {
260
+ return this.getAttribute("justify-self--desktop");
261
+ }
262
+ set justifySelfDesktop(e) {
263
+ _(this, "justify-self--desktop", e);
264
+ }
265
+ get hiddenMobile() {
266
+ return this.hasAttribute("hidden--mobile");
267
+ }
268
+ set hiddenMobile(e) {
269
+ v(this, "hidden--mobile", e);
270
+ }
271
+ get hiddenTablet() {
272
+ return this.hasAttribute("hidden--tablet");
273
+ }
274
+ set hiddenTablet(e) {
275
+ v(this, "hidden--tablet", e);
276
+ }
277
+ get hiddenLaptop() {
278
+ return this.hasAttribute("hidden--laptop");
279
+ }
280
+ set hiddenLaptop(e) {
281
+ v(this, "hidden--laptop", e);
282
+ }
283
+ get hiddenDesktop() {
284
+ return this.hasAttribute("hidden--desktop");
285
+ }
286
+ set hiddenDesktop(e) {
287
+ v(this, "hidden--desktop", e);
288
+ }
289
+ get colSpan() {
290
+ return this.getAttribute("col-span");
291
+ }
292
+ set colSpan(e) {
293
+ _(this, "col-span", e);
294
+ }
295
+ get colSpanMobile() {
296
+ return this.getAttribute("col-span--mobile");
297
+ }
298
+ set colSpanMobile(e) {
299
+ _(this, "col-span--mobile", e);
300
+ }
301
+ get colSpanTablet() {
302
+ return this.getAttribute("col-span--tablet");
303
+ }
304
+ set colSpanTablet(e) {
305
+ _(this, "col-span--tablet", e);
306
+ }
307
+ get colSpanLaptop() {
308
+ return this.getAttribute("col-span--laptop");
309
+ }
310
+ set colSpanLaptop(e) {
311
+ _(this, "col-span--laptop", e);
312
+ }
313
+ get colSpanDesktop() {
314
+ return this.getAttribute("col-span--desktop");
315
+ }
316
+ set colSpanDesktop(e) {
317
+ _(this, "col-span--desktop", e);
318
+ }
319
+ get order() {
320
+ return this.getAttribute("order");
321
+ }
322
+ set order(e) {
323
+ _(this, "order", e);
324
+ }
325
+ get orderMobile() {
326
+ return this.getAttribute("order--mobile");
327
+ }
328
+ set orderMobile(e) {
329
+ _(this, "order--mobile", e);
330
+ }
331
+ get orderTablet() {
332
+ return this.getAttribute("order--tablet");
333
+ }
334
+ set orderTablet(e) {
335
+ _(this, "order--tablet", e);
336
+ }
337
+ get orderLaptop() {
338
+ return this.getAttribute("order--laptop");
339
+ }
340
+ set orderLaptop(e) {
341
+ _(this, "order--laptop", e);
342
+ }
343
+ get orderDesktop() {
344
+ return this.getAttribute("order--desktop");
345
+ }
346
+ set orderDesktop(e) {
347
+ _(this, "order--desktop", e);
348
+ }
349
+ }, u = class extends l {
350
+ static {
351
+ this.accessorExclusions = [];
352
+ }
353
+ static get observedAttributes() {
354
+ return [...super.observedAttributes, ...r(this.nativeName)];
355
+ }
356
+ attributeChangedCallback(e, t, n) {
357
+ super.attributeChangedCallback(e, t, n), n === null ? this.$el.toggleAttribute(e) : this.$el.setAttribute(e, n);
358
+ }
359
+ get ctor() {
360
+ return Object.getPrototypeOf(this).constructor;
361
+ }
362
+ constructor(...e) {
363
+ super(...e), this.ctor.supportedPropertyNames || (this.ctor.supportedPropertyNames = n(this.ctor.nativeName)), this.enhanceWithNativeProperties();
364
+ }
365
+ 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
+ }
374
+ });
375
+ } catch (t) {
376
+ console.warn(`Could not create property ${e} for`, this.$el, t);
377
+ }
378
+ }
379
+ get $el() {
380
+ return this.shadowRoot.querySelector(this.ctor.nativeName);
381
+ }
382
+ _updateAttribute(e, t) {
383
+ _(this, e, t);
384
+ }
385
+ _updateBooleanAttribute(e, t) {
386
+ v(this, e, t);
387
+ }
388
+ }, d = [
389
+ "",
390
+ "default",
391
+ "auto",
392
+ "flex-start",
393
+ "start",
394
+ "flex-end",
395
+ "end",
396
+ "center",
397
+ "baseline",
398
+ "stretch"
399
+ ], f = [
400
+ "",
401
+ "default",
402
+ "start",
403
+ "end",
404
+ "center",
405
+ "stretch"
406
+ ], p = [
407
+ "",
408
+ "default",
409
+ "start",
410
+ "end",
411
+ "center",
412
+ "stretch"
413
+ ], m = [
414
+ "",
415
+ "1",
416
+ "2",
417
+ "3",
418
+ "4",
419
+ "5",
420
+ "6",
421
+ "7",
422
+ "8",
423
+ "9",
424
+ "10",
425
+ "11",
426
+ "12"
427
+ ], h = [
428
+ "",
429
+ "-1",
430
+ "0",
431
+ "1",
432
+ "2",
433
+ "3",
434
+ "4",
435
+ "5",
436
+ "6",
437
+ "7",
438
+ "8",
439
+ "9",
440
+ "10",
441
+ "11",
442
+ "12"
535
443
  ];
536
- const E = [
537
- "none",
538
- "2xs",
539
- "xs",
540
- "s",
541
- "default",
542
- "l",
543
- "heading-to-subtitle",
544
- "heading-to-content",
545
- "page-layout-between-sections"
444
+ [...[
445
+ "Xs",
446
+ "S",
447
+ "M",
448
+ "L",
449
+ "Xl"
450
+ ].map((e) => e.toLowerCase())];
451
+ var g = [
452
+ "none",
453
+ "2xs",
454
+ "xs",
455
+ "s",
456
+ "default",
457
+ "l",
458
+ "heading-to-subtitle",
459
+ "heading-to-content",
460
+ "page-layout-between-sections"
546
461
  ];
547
- function N(o, t, s, e = "", i) {
548
- const a = new CSSStyleSheet(), l = s.reduce(
549
- (n, r) => n + `
550
- ${t(o, r)} {
551
- ${o}: var(--${e}-${r}-desktop);
552
- ${`${i}:var(--${e}-${r}-desktop)`}
462
+ function _(e, t, n) {
463
+ n == null || n === "" ? e.removeAttribute(t) : e.setAttribute(t, n.toString());
464
+ }
465
+ function v(e, t, n) {
466
+ n ? e.setAttribute(t, "") : e.removeAttribute(t);
467
+ }
468
+ //#endregion
469
+ //#region ../common/src/breakpoints.ts
470
+ function y(e, t, n, r = "", i, a = e) {
471
+ let o = new CSSStyleSheet(), s = n.reduce((n, o) => n + `
472
+ ${t(a, o)} {
473
+ ${e}: var(--${r}-${o}-desktop);
474
+ ${i ? `${i}:var(--${r}-${o}-desktop)` : ""}
553
475
  }
554
476
  /* Mobile only - max 767px */
555
- @media only screen and (max-width: 47.938em) {
556
- ${t(o, r)} {
557
- ${o}: var(--${e}-${r}-mobile);
558
- ${`${i}: var(--${e}-${r}-mobile)`}
477
+ @media only screen and (max-width: 47.938rem) {
478
+ ${t(a, o)} {
479
+ ${e}: var(--${r}-${o}-mobile);
480
+ ${i ? `${i}: var(--${r}-${o}-mobile)` : ""}
559
481
  }
560
482
  }
561
- ${t(o, r, "mobile")} {
483
+ ${t(a, o, "mobile")} {
562
484
  /* Mobile only - max 767px */
563
- @media only screen and (max-width: 47.938em) {
564
- ${o}: var(--${e}-${r}-mobile) !important;
565
- ${`${i}: var(--${e}-${r}-mobile)`}
485
+ @media only screen and (max-width: 47.938rem) {
486
+ ${e}: var(--${r}-${o}-mobile) !important;
487
+ ${i ? `${i}: var(--${r}-${o}-mobile)` : ""}
566
488
  }
567
489
  }
568
- ${t(o, r, "tablet")} {
490
+ ${t(a, o, "tablet")} {
569
491
  /* Tablet - min 768px max 1024px */
570
- @media only screen and (min-width: 48em) and (max-width: 64em) {
571
- ${o}: var(--${e}-${r}-desktop) !important;
572
- ${`${i}: var(--${e}-${r}-desktop)`}
492
+ @media only screen and (min-width: 48rem) and (max-width: 64rem) {
493
+ ${e}: var(--${r}-${o}-desktop) !important;
494
+ ${i ? `${i}: var(--${r}-${o}-desktop)` : ""}
573
495
  }
574
496
  }
575
- ${t(o, r, "laptop")} {
497
+ ${t(a, o, "laptop")} {
576
498
  /* Laptop - 1025px*/
577
- @media only screen and (min-width: 64.0625em) {
578
- ${o}: var(--${e}-${r}-desktop) !important;
579
- ${`${i}: var(--${e}-${r}-desktop)`}
499
+ @media only screen and (min-width: 64.0625rem) {
500
+ ${e}: var(--${r}-${o}-desktop) !important;
501
+ ${i ? `${i}: var(--${r}-${o}-desktop)` : ""}
580
502
  }
581
503
  }
582
- ${t(o, r, "desktop")} {
504
+ ${t(a, o, "desktop")} {
583
505
  /* Desktop - 1025px*/
584
- @media only screen and (min-width: 64.0625em) {
585
- ${o}: var(--${e}-${r}-desktop) !important;
586
- ${`${i}: var(--${e}-${r}-desktop)`}
506
+ @media only screen and (min-width: 64.0625rem) {
507
+ ${e}: var(--${r}-${o}-desktop) !important;
508
+ ${i ? `${i}: var(--${r}-${o}-desktop)` : ""}
587
509
  }
588
- }`,
589
- ""
590
- );
591
- return a.replaceSync(l), a;
510
+ }`, "");
511
+ return o.replaceSync(s), o;
592
512
  }
593
- const k = new CSSStyleSheet();
594
- k.replaceSync(A);
595
- const _ = (o, t, s) => `:host([${o}${s ? `--${s}` : ""}='${t}']) .list`, B = "px-spacing", G = N(
596
- "gap",
597
- _,
598
- E,
599
- B,
600
- "--list-gap"
601
- ), c = class c extends p {
602
- template() {
603
- return `
604
- <div class="list" role="list">
605
- <slot></slot>
606
- </div>
607
- `;
608
- }
609
- constructor() {
610
- super(k, G), this.shadowRoot.innerHTML = this.template();
611
- }
612
- static get observedAttributes() {
613
- return ["inverted"];
614
- }
615
- connectedCallback() {
616
- this.gap || (this.gap = "xs");
617
- }
618
- attributeChangedCallback(t, s, e) {
619
- if (s !== e)
620
- switch (t) {
621
- case "inverted":
622
- for (let i = 0; i < this.$children.length; i++)
623
- this.$children[i].hasAttribute("inverted") || this.$children[i].toggleAttribute("inverted");
624
- this.$el.toggleAttribute("inverted", e !== null);
625
- break;
626
- }
627
- }
628
- get $children() {
629
- return this.querySelectorAll("px-list-item");
630
- }
631
- get inverted() {
632
- return this.hasAttribute("inverted");
633
- }
634
- set inverted(t) {
635
- t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
636
- }
637
- get gap() {
638
- return this.getAttribute("gap");
639
- }
640
- set gap(t) {
641
- t ? this.setAttribute("gap", t) : this.removeAttribute("gap");
642
- }
643
- get gapMobile() {
644
- return this.getAttribute("gap--mobile");
645
- }
646
- set gapMobile(t) {
647
- t ? this.setAttribute("gap--mobile", t) : this.removeAttribute("gap--mobile");
648
- }
649
- get gapTablet() {
650
- return this.getAttribute("gap--tablet");
651
- }
652
- set gapTablet(t) {
653
- t ? this.setAttribute("gap--tablet", t) : this.removeAttribute("gap--tablet");
654
- }
655
- get gapLaptop() {
656
- return this.getAttribute("gap--laptop");
657
- }
658
- set gapLaptop(t) {
659
- t ? this.setAttribute("gap--laptop", t) : this.removeAttribute("gap--laptop");
660
- }
661
- get gapDesktop() {
662
- return this.getAttribute("gap--desktop");
663
- }
664
- set gapDesktop(t) {
665
- t ? this.setAttribute("gap--desktop", t) : this.removeAttribute("gap--desktop");
666
- }
667
- };
668
- c.nativeName = "div";
669
- let h = c;
670
- customElements.get("px-list") || customElements.define("px-list", h);
671
- const R = '.list-item{display:flex;gap:var(--px-spacing-xs-mobile);align-items:flex-start;font-family:var(--px-font-family);line-height:var(--px-line-height-ratio-l)}::slotted([slot="label"][inverted]){color:var(--px-color-text-neutral-inverted)}@media only screen and (min-width: 48em){.list-item{gap:var(--px-spacing-xs-tablet)}}@media only screen and (min-width: 64.0625em){.list-item{gap:var(--px-spacing-xs-laptop)}}@media only screen and (min-width: 90.0625em){.list-item{gap:var(--px-spacing-xs-desktop)}}', v = new CSSStyleSheet();
672
- v.replaceSync(R);
673
- const f = class f extends p {
674
- template() {
675
- return `
676
- <div class="list-item" role="listitem">
677
- <slot name="icon"></slot>
678
- <slot name="label"></slot>
679
- </div>
680
- `;
681
- }
682
- constructor() {
683
- super(v), this.shadowRoot.innerHTML = this.template();
684
- }
685
- static get observedAttributes() {
686
- return ["inverted"];
687
- }
688
- // TODO: factorize code
689
- attributeChangedCallback(t, s, e) {
690
- if (s !== e)
691
- switch (t) {
692
- case "inverted":
693
- for (let i = 0; i < this.$children.length; i++)
694
- this.$children[i].hasAttribute("inverted") || this.$children[i].toggleAttribute("inverted");
695
- this.$el.toggleAttribute("inverted", e !== null);
696
- break;
697
- }
698
- }
699
- get $children() {
700
- return this.querySelectorAll("px-list-item > *");
701
- }
702
- get inverted() {
703
- return this.hasAttribute("inverted");
704
- }
705
- set inverted(t) {
706
- t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
707
- }
513
+ //#endregion
514
+ //#region ../common/src/template.ts
515
+ var b = /* @__PURE__ */ new Map(), x = 500;
516
+ function S(e) {
517
+ let t = document.createElement("template");
518
+ return t.innerHTML = e, t;
519
+ }
520
+ function C(e) {
521
+ return S(e);
522
+ }
523
+ function w(e) {
524
+ let t = b.get(e);
525
+ return t || (t = S(e), b.size < x && b.set(e, t)), t;
526
+ }
527
+ function T(e, t) {
528
+ let n = typeof t == "string" ? w(t) : t;
529
+ e.replaceChildren(document.importNode(n.content, !0));
530
+ }
531
+ //#endregion
532
+ //#region src/listitem.css?inline
533
+ var E = ".list-item{gap:var(--px-spacing-xs-mobile);font-family:var(--px-font-family);line-height:var(--px-line-height-ratio-l);color:var(--px-color-text-neutral-default);align-items:flex-start;display:flex}.list-item[inverted]{color:var(--px-color-text-neutral-inverted)}:is(:host([variant=ul]),:host([variant=ol])) .list-item{margin-left:var(--px-spacing-default-mobile);display:list-item}:host([variant=ul]) .list-item{list-style-type:disc}:host([variant=ol]) .list-item{counter-set:list-item var(--item-index,0);list-style-type:decimal}@media screen and (width>=48rem){.list-item{gap:var(--px-spacing-xs-tablet)}}@media screen and (width>=64.0625rem){.list-item{gap:var(--px-spacing-xs-laptop)}}@media screen and (width>=90.0625rem){.list-item{gap:var(--px-spacing-xs-desktop)}}", D = new CSSStyleSheet();
534
+ D.replaceSync(E);
535
+ var O = "px-list-item-connected", k = class e extends u {
536
+ static {
537
+ this.template = C("<div class=\"list-item\" role=\"listitem\"><slot name=\"icon\"></slot><slot name=\"label\"></slot></div>");
538
+ }
539
+ static {
540
+ this.nativeName = "div";
541
+ }
542
+ constructor() {
543
+ super(D), T(this.shadowRoot, e.template);
544
+ }
545
+ connectedCallback() {
546
+ this.dispatchEvent(new CustomEvent(O, {
547
+ bubbles: !0,
548
+ composed: !0
549
+ }));
550
+ }
551
+ static get observedAttributes() {
552
+ return ["inverted"];
553
+ }
554
+ attributeChangedCallback(e, t, n) {
555
+ if (t !== n) switch (e) {
556
+ case "inverted":
557
+ for (let e = 0; e < this.$children.length; e++) this.$children[e].hasAttribute("inverted") || this.$children[e].toggleAttribute("inverted");
558
+ this.$el.toggleAttribute("inverted", n !== null);
559
+ }
560
+ }
561
+ get $children() {
562
+ return this.querySelectorAll("px-list-item > *");
563
+ }
564
+ get inverted() {
565
+ return this.hasAttribute("inverted");
566
+ }
567
+ set inverted(e) {
568
+ e ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
569
+ }
708
570
  };
709
- f.nativeName = "div";
710
- let d = f;
711
- customElements.get("px-list-item") || customElements.define("px-list-item", d);
712
- export {
713
- h as List,
714
- d as ListItem
571
+ customElements.get("px-list-item") || customElements.define("px-list-item", k);
572
+ //#endregion
573
+ //#region src/List.ts
574
+ var A = new CSSStyleSheet();
575
+ A.replaceSync(e);
576
+ var j = [
577
+ "",
578
+ "ul",
579
+ "ol"
580
+ ], M = y("gap", (e, t, n) => `:host([${e}${n ? `--${n}` : ""}='${t}']) .list`, g, "px-spacing", "--list-gap"), N = class e extends u {
581
+ static {
582
+ this.template = C("<div class=\"list\" role=\"list\"><slot></slot></div>");
583
+ }
584
+ static {
585
+ this.nativeName = "div";
586
+ }
587
+ constructor() {
588
+ super(A, M), T(this.shadowRoot, e.template);
589
+ }
590
+ static get observedAttributes() {
591
+ return ["inverted", "variant"];
592
+ }
593
+ connectedCallback() {
594
+ this.gap ||= "xs", this.addEventListener(O, () => {
595
+ this.#e();
596
+ }), this.#e();
597
+ }
598
+ #e() {
599
+ this.#t(), this.#n(this.getAttribute("variant"));
600
+ }
601
+ #t() {
602
+ let e = this.hasAttribute("inverted");
603
+ for (let t = 0; t < this.$children.length; t++) this.$children[t].toggleAttribute("inverted", e);
604
+ this.$el?.toggleAttribute("inverted", e);
605
+ }
606
+ #n(e) {
607
+ for (let t = 0; t < this.$children.length; t++) {
608
+ let n = this.$children[t];
609
+ e === null ? (n.removeAttribute("variant"), n.style.removeProperty("--item-index")) : (n.setAttribute("variant", e), e === "ol" ? n.style.setProperty("--item-index", String(t + 1)) : n.style.removeProperty("--item-index"));
610
+ }
611
+ }
612
+ attributeChangedCallback(e, t, n) {
613
+ if (t !== n) switch (e) {
614
+ case "inverted":
615
+ this.isConnected && this.#t();
616
+ break;
617
+ case "variant":
618
+ this.checkName(j, n) || c(`"${n}" is not a valid variant value for ${this.tagName.toLowerCase()}. Allowed values are: "${j.join("\", \"")}".`), this.isConnected && this.#n(n), super.attributeChangedCallback(e, t, n);
619
+ break;
620
+ default: super.attributeChangedCallback(e, t, n);
621
+ }
622
+ }
623
+ get $children() {
624
+ return this.querySelectorAll("px-list-item");
625
+ }
626
+ get inverted() {
627
+ return this.hasAttribute("inverted");
628
+ }
629
+ set inverted(e) {
630
+ this._updateBooleanAttribute("inverted", e);
631
+ }
632
+ get gap() {
633
+ return this.getAttribute("gap");
634
+ }
635
+ set gap(e) {
636
+ this._updateAttribute("gap", e);
637
+ }
638
+ get gapMobile() {
639
+ return this.getAttribute("gap--mobile");
640
+ }
641
+ set gapMobile(e) {
642
+ this._updateAttribute("gap--mobile", e);
643
+ }
644
+ get gapTablet() {
645
+ return this.getAttribute("gap--tablet");
646
+ }
647
+ set gapTablet(e) {
648
+ this._updateAttribute("gap--tablet", e);
649
+ }
650
+ get gapLaptop() {
651
+ return this.getAttribute("gap--laptop");
652
+ }
653
+ set gapLaptop(e) {
654
+ this._updateAttribute("gap--laptop", e);
655
+ }
656
+ get gapDesktop() {
657
+ return this.getAttribute("gap--desktop");
658
+ }
659
+ set gapDesktop(e) {
660
+ this._updateAttribute("gap--desktop", e);
661
+ }
662
+ get variant() {
663
+ return this.getAttribute("variant");
664
+ }
665
+ set variant(e) {
666
+ this._updateAttribute("variant", e);
667
+ }
715
668
  };
669
+ customElements.get("px-list") || customElements.define("px-list", N);
670
+ //#endregion
671
+ export { O as LIST_ITEM_CONNECTED_EVENT, N as List, k as ListItem, j as listVariantValues };