@proximus/lavender-list 2.0.0-alpha.2 → 2.0.0-alpha.200

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