@proximus/lavender-common 1.4.17-alpha.7 → 1.4.17-beta.1
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.d.ts +1 -0
- package/dist/index.es.js +101 -83
- package/dist/template.d.ts +14 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -155,235 +155,235 @@ var u = class e extends HTMLElement {
|
|
|
155
155
|
return this.getAttribute("grow");
|
|
156
156
|
}
|
|
157
157
|
set grow(e) {
|
|
158
|
-
|
|
158
|
+
V(this, "grow", e);
|
|
159
159
|
}
|
|
160
160
|
get growMobile() {
|
|
161
161
|
return this.getAttribute("grow--mobile");
|
|
162
162
|
}
|
|
163
163
|
set growMobile(e) {
|
|
164
|
-
|
|
164
|
+
V(this, "grow--mobile", e);
|
|
165
165
|
}
|
|
166
166
|
get growTablet() {
|
|
167
167
|
return this.getAttribute("grow--tablet");
|
|
168
168
|
}
|
|
169
169
|
set growTablet(e) {
|
|
170
|
-
|
|
170
|
+
V(this, "grow--tablet", e);
|
|
171
171
|
}
|
|
172
172
|
get growLaptop() {
|
|
173
173
|
return this.getAttribute("grow--laptop");
|
|
174
174
|
}
|
|
175
175
|
set growLaptop(e) {
|
|
176
|
-
|
|
176
|
+
V(this, "grow--laptop", e);
|
|
177
177
|
}
|
|
178
178
|
get growDesktop() {
|
|
179
179
|
return this.getAttribute("grow--desktop");
|
|
180
180
|
}
|
|
181
181
|
set growDesktop(e) {
|
|
182
|
-
|
|
182
|
+
V(this, "grow--desktop", e);
|
|
183
183
|
}
|
|
184
184
|
get shrink() {
|
|
185
185
|
return this.getAttribute("shrink");
|
|
186
186
|
}
|
|
187
187
|
set shrink(e) {
|
|
188
|
-
|
|
188
|
+
V(this, "shrink", e);
|
|
189
189
|
}
|
|
190
190
|
get shrinkMobile() {
|
|
191
191
|
return this.getAttribute("shrink--mobile");
|
|
192
192
|
}
|
|
193
193
|
set shrinkMobile(e) {
|
|
194
|
-
|
|
194
|
+
V(this, "shrink--mobile", e);
|
|
195
195
|
}
|
|
196
196
|
get shrinkTablet() {
|
|
197
197
|
return this.getAttribute("shrink--tablet");
|
|
198
198
|
}
|
|
199
199
|
set shrinkTablet(e) {
|
|
200
|
-
|
|
200
|
+
V(this, "shrink--tablet", e);
|
|
201
201
|
}
|
|
202
202
|
get shrinkLaptop() {
|
|
203
203
|
return this.getAttribute("shrink--laptop");
|
|
204
204
|
}
|
|
205
205
|
set shrinkLaptop(e) {
|
|
206
|
-
|
|
206
|
+
V(this, "shrink--laptop", e);
|
|
207
207
|
}
|
|
208
208
|
get shrinkDesktop() {
|
|
209
209
|
return this.getAttribute("shrink--desktop");
|
|
210
210
|
}
|
|
211
211
|
set shrinkDesktop(e) {
|
|
212
|
-
|
|
212
|
+
V(this, "shrink--desktop", e);
|
|
213
213
|
}
|
|
214
214
|
get basis() {
|
|
215
215
|
return this.getAttribute("basis");
|
|
216
216
|
}
|
|
217
217
|
set basis(e) {
|
|
218
|
-
|
|
218
|
+
V(this, "basis", e);
|
|
219
219
|
}
|
|
220
220
|
get basisMobile() {
|
|
221
221
|
return this.getAttribute("basis--mobile");
|
|
222
222
|
}
|
|
223
223
|
set basisMobile(e) {
|
|
224
|
-
|
|
224
|
+
V(this, "basis--mobile", e);
|
|
225
225
|
}
|
|
226
226
|
get basisTablet() {
|
|
227
227
|
return this.getAttribute("basis--tablet");
|
|
228
228
|
}
|
|
229
229
|
set basisTablet(e) {
|
|
230
|
-
|
|
230
|
+
V(this, "basis--tablet", e);
|
|
231
231
|
}
|
|
232
232
|
get basisLaptop() {
|
|
233
233
|
return this.getAttribute("basis--laptop");
|
|
234
234
|
}
|
|
235
235
|
set basisLaptop(e) {
|
|
236
|
-
|
|
236
|
+
V(this, "basis--laptop", e);
|
|
237
237
|
}
|
|
238
238
|
get basisDesktop() {
|
|
239
239
|
return this.getAttribute("basis--desktop");
|
|
240
240
|
}
|
|
241
241
|
set basisDesktop(e) {
|
|
242
|
-
|
|
242
|
+
V(this, "basis--desktop", e);
|
|
243
243
|
}
|
|
244
244
|
get alignSelf() {
|
|
245
245
|
return this.getAttribute("align-self");
|
|
246
246
|
}
|
|
247
247
|
set alignSelf(e) {
|
|
248
|
-
|
|
248
|
+
V(this, "align-self", e);
|
|
249
249
|
}
|
|
250
250
|
get alignSelfMobile() {
|
|
251
251
|
return this.getAttribute("align-self--mobile");
|
|
252
252
|
}
|
|
253
253
|
set alignSelfMobile(e) {
|
|
254
|
-
|
|
254
|
+
V(this, "align-self--mobile", e);
|
|
255
255
|
}
|
|
256
256
|
get alignSelfTablet() {
|
|
257
257
|
return this.getAttribute("align-self--tablet");
|
|
258
258
|
}
|
|
259
259
|
set alignSelfTablet(e) {
|
|
260
|
-
|
|
260
|
+
V(this, "align-self--tablet", e);
|
|
261
261
|
}
|
|
262
262
|
get alignSelfLaptop() {
|
|
263
263
|
return this.getAttribute("align-self--laptop");
|
|
264
264
|
}
|
|
265
265
|
set alignSelfLaptop(e) {
|
|
266
|
-
|
|
266
|
+
V(this, "align-self--laptop", e);
|
|
267
267
|
}
|
|
268
268
|
get alignSelfDesktop() {
|
|
269
269
|
return this.getAttribute("align-self--desktop");
|
|
270
270
|
}
|
|
271
271
|
set alignSelfDesktop(e) {
|
|
272
|
-
|
|
272
|
+
V(this, "align-self--desktop", e);
|
|
273
273
|
}
|
|
274
274
|
get justifySelf() {
|
|
275
275
|
return this.getAttribute("justify-self");
|
|
276
276
|
}
|
|
277
277
|
set justifySelf(e) {
|
|
278
|
-
|
|
278
|
+
V(this, "justify-self", e);
|
|
279
279
|
}
|
|
280
280
|
get justifySelfMobile() {
|
|
281
281
|
return this.getAttribute("justify-self--mobile");
|
|
282
282
|
}
|
|
283
283
|
set justifySelfMobile(e) {
|
|
284
|
-
|
|
284
|
+
V(this, "justify-self--mobile", e);
|
|
285
285
|
}
|
|
286
286
|
get justifySelfTablet() {
|
|
287
287
|
return this.getAttribute("justify-self--tablet");
|
|
288
288
|
}
|
|
289
289
|
set justifySelfTablet(e) {
|
|
290
|
-
|
|
290
|
+
V(this, "justify-self--tablet", e);
|
|
291
291
|
}
|
|
292
292
|
get justifySelfLaptop() {
|
|
293
293
|
return this.getAttribute("justify-self--laptop");
|
|
294
294
|
}
|
|
295
295
|
set justifySelfLaptop(e) {
|
|
296
|
-
|
|
296
|
+
V(this, "justify-self--laptop", e);
|
|
297
297
|
}
|
|
298
298
|
get justifySelfDesktop() {
|
|
299
299
|
return this.getAttribute("justify-self--desktop");
|
|
300
300
|
}
|
|
301
301
|
set justifySelfDesktop(e) {
|
|
302
|
-
|
|
302
|
+
V(this, "justify-self--desktop", e);
|
|
303
303
|
}
|
|
304
304
|
get hiddenMobile() {
|
|
305
305
|
return this.hasAttribute("hidden--mobile");
|
|
306
306
|
}
|
|
307
307
|
set hiddenMobile(e) {
|
|
308
|
-
|
|
308
|
+
H(this, "hidden--mobile", e);
|
|
309
309
|
}
|
|
310
310
|
get hiddenTablet() {
|
|
311
311
|
return this.hasAttribute("hidden--tablet");
|
|
312
312
|
}
|
|
313
313
|
set hiddenTablet(e) {
|
|
314
|
-
|
|
314
|
+
H(this, "hidden--tablet", e);
|
|
315
315
|
}
|
|
316
316
|
get hiddenLaptop() {
|
|
317
317
|
return this.hasAttribute("hidden--laptop");
|
|
318
318
|
}
|
|
319
319
|
set hiddenLaptop(e) {
|
|
320
|
-
|
|
320
|
+
H(this, "hidden--laptop", e);
|
|
321
321
|
}
|
|
322
322
|
get hiddenDesktop() {
|
|
323
323
|
return this.hasAttribute("hidden--desktop");
|
|
324
324
|
}
|
|
325
325
|
set hiddenDesktop(e) {
|
|
326
|
-
|
|
326
|
+
H(this, "hidden--desktop", e);
|
|
327
327
|
}
|
|
328
328
|
get colSpan() {
|
|
329
329
|
return this.getAttribute("col-span");
|
|
330
330
|
}
|
|
331
331
|
set colSpan(e) {
|
|
332
|
-
|
|
332
|
+
V(this, "col-span", e);
|
|
333
333
|
}
|
|
334
334
|
get colSpanMobile() {
|
|
335
335
|
return this.getAttribute("col-span--mobile");
|
|
336
336
|
}
|
|
337
337
|
set colSpanMobile(e) {
|
|
338
|
-
|
|
338
|
+
V(this, "col-span--mobile", e);
|
|
339
339
|
}
|
|
340
340
|
get colSpanTablet() {
|
|
341
341
|
return this.getAttribute("col-span--tablet");
|
|
342
342
|
}
|
|
343
343
|
set colSpanTablet(e) {
|
|
344
|
-
|
|
344
|
+
V(this, "col-span--tablet", e);
|
|
345
345
|
}
|
|
346
346
|
get colSpanLaptop() {
|
|
347
347
|
return this.getAttribute("col-span--laptop");
|
|
348
348
|
}
|
|
349
349
|
set colSpanLaptop(e) {
|
|
350
|
-
|
|
350
|
+
V(this, "col-span--laptop", e);
|
|
351
351
|
}
|
|
352
352
|
get colSpanDesktop() {
|
|
353
353
|
return this.getAttribute("col-span--desktop");
|
|
354
354
|
}
|
|
355
355
|
set colSpanDesktop(e) {
|
|
356
|
-
|
|
356
|
+
V(this, "col-span--desktop", e);
|
|
357
357
|
}
|
|
358
358
|
get order() {
|
|
359
359
|
return this.getAttribute("order");
|
|
360
360
|
}
|
|
361
361
|
set order(e) {
|
|
362
|
-
|
|
362
|
+
V(this, "order", e);
|
|
363
363
|
}
|
|
364
364
|
get orderMobile() {
|
|
365
365
|
return this.getAttribute("order--mobile");
|
|
366
366
|
}
|
|
367
367
|
set orderMobile(e) {
|
|
368
|
-
|
|
368
|
+
V(this, "order--mobile", e);
|
|
369
369
|
}
|
|
370
370
|
get orderTablet() {
|
|
371
371
|
return this.getAttribute("order--tablet");
|
|
372
372
|
}
|
|
373
373
|
set orderTablet(e) {
|
|
374
|
-
|
|
374
|
+
V(this, "order--tablet", e);
|
|
375
375
|
}
|
|
376
376
|
get orderLaptop() {
|
|
377
377
|
return this.getAttribute("order--laptop");
|
|
378
378
|
}
|
|
379
379
|
set orderLaptop(e) {
|
|
380
|
-
|
|
380
|
+
V(this, "order--laptop", e);
|
|
381
381
|
}
|
|
382
382
|
get orderDesktop() {
|
|
383
383
|
return this.getAttribute("order--desktop");
|
|
384
384
|
}
|
|
385
385
|
set orderDesktop(e) {
|
|
386
|
-
|
|
386
|
+
V(this, "order--desktop", e);
|
|
387
387
|
}
|
|
388
388
|
}, d = class extends u {
|
|
389
389
|
static {
|
|
@@ -419,10 +419,10 @@ var u = class e extends HTMLElement {
|
|
|
419
419
|
return this.shadowRoot.querySelector(this.ctor.nativeName);
|
|
420
420
|
}
|
|
421
421
|
_updateAttribute(e, t) {
|
|
422
|
-
|
|
422
|
+
V(this, e, t);
|
|
423
423
|
}
|
|
424
424
|
_updateBooleanAttribute(e, t) {
|
|
425
|
-
|
|
425
|
+
H(this, e, t);
|
|
426
426
|
}
|
|
427
427
|
}, f = class extends d {
|
|
428
428
|
connectedCallback() {
|
|
@@ -496,7 +496,7 @@ var u = class e extends HTMLElement {
|
|
|
496
496
|
"end",
|
|
497
497
|
"center",
|
|
498
498
|
"stretch"
|
|
499
|
-
],
|
|
499
|
+
], ee = [
|
|
500
500
|
"",
|
|
501
501
|
"default",
|
|
502
502
|
"inherit",
|
|
@@ -512,7 +512,7 @@ var u = class e extends HTMLElement {
|
|
|
512
512
|
"heading-l",
|
|
513
513
|
"heading-m",
|
|
514
514
|
"heading-s"
|
|
515
|
-
],
|
|
515
|
+
], b = [
|
|
516
516
|
"",
|
|
517
517
|
"default",
|
|
518
518
|
"inherit",
|
|
@@ -527,7 +527,7 @@ var u = class e extends HTMLElement {
|
|
|
527
527
|
"state-hover",
|
|
528
528
|
"state-active",
|
|
529
529
|
"state-disabled"
|
|
530
|
-
],
|
|
530
|
+
], x = [
|
|
531
531
|
"",
|
|
532
532
|
"default",
|
|
533
533
|
"inherit",
|
|
@@ -535,23 +535,23 @@ var u = class e extends HTMLElement {
|
|
|
535
535
|
"title",
|
|
536
536
|
"title-large",
|
|
537
537
|
"subtitle"
|
|
538
|
-
],
|
|
538
|
+
], S = [
|
|
539
539
|
"Xs",
|
|
540
540
|
"S",
|
|
541
541
|
"M",
|
|
542
542
|
"L",
|
|
543
543
|
"Xl"
|
|
544
|
-
],
|
|
544
|
+
], te = [
|
|
545
545
|
"",
|
|
546
546
|
"default",
|
|
547
|
-
...
|
|
548
|
-
],
|
|
547
|
+
...S.map((e) => e.toLowerCase())
|
|
548
|
+
], ne = [
|
|
549
549
|
"",
|
|
550
550
|
"default",
|
|
551
551
|
"left",
|
|
552
552
|
"center",
|
|
553
553
|
"right"
|
|
554
|
-
],
|
|
554
|
+
], re = [
|
|
555
555
|
"",
|
|
556
556
|
"none",
|
|
557
557
|
"3xs",
|
|
@@ -561,18 +561,18 @@ var u = class e extends HTMLElement {
|
|
|
561
561
|
"m",
|
|
562
562
|
"l",
|
|
563
563
|
"xl"
|
|
564
|
-
],
|
|
564
|
+
], C = [
|
|
565
565
|
"",
|
|
566
566
|
"none",
|
|
567
567
|
"s",
|
|
568
568
|
"m",
|
|
569
569
|
"l"
|
|
570
|
-
],
|
|
570
|
+
], w = [
|
|
571
571
|
"",
|
|
572
572
|
"none",
|
|
573
573
|
"main",
|
|
574
574
|
"pill"
|
|
575
|
-
],
|
|
575
|
+
], T = [
|
|
576
576
|
"none",
|
|
577
577
|
"main",
|
|
578
578
|
"brand",
|
|
@@ -583,7 +583,7 @@ var u = class e extends HTMLElement {
|
|
|
583
583
|
"purpose-warning",
|
|
584
584
|
"purpose-error",
|
|
585
585
|
"purpose-unlimited"
|
|
586
|
-
],
|
|
586
|
+
], E = [
|
|
587
587
|
"",
|
|
588
588
|
"all",
|
|
589
589
|
"top",
|
|
@@ -592,19 +592,19 @@ var u = class e extends HTMLElement {
|
|
|
592
592
|
"left",
|
|
593
593
|
"block",
|
|
594
594
|
"inline"
|
|
595
|
-
],
|
|
595
|
+
], D = /* @__PURE__ */ ".none.surface-light.surface-default.surface-strong.surface-stronger.surface-dark.surface-brand.surface-brand-light.container-primary.container-secondary.container-light.container-default.container-strong.state-hover.state-hover-bordered.state-active.state-disabled.purpose-success.purpose-warning.purpose-error.purpose-unlimited.purpose-promo.purpose-info.purpose-eco.purpose-notification.footer-sitemap".split("."), O = [
|
|
596
596
|
"",
|
|
597
597
|
"cover",
|
|
598
598
|
"contain",
|
|
599
599
|
"default"
|
|
600
|
-
],
|
|
600
|
+
], k = [
|
|
601
601
|
"",
|
|
602
602
|
"none",
|
|
603
603
|
"s",
|
|
604
604
|
"m",
|
|
605
605
|
"l",
|
|
606
606
|
"xl"
|
|
607
|
-
],
|
|
607
|
+
], A = [
|
|
608
608
|
"",
|
|
609
609
|
"default",
|
|
610
610
|
"title-4xl",
|
|
@@ -615,7 +615,7 @@ var u = class e extends HTMLElement {
|
|
|
615
615
|
"title-m",
|
|
616
616
|
"title-s",
|
|
617
617
|
"subtitle"
|
|
618
|
-
],
|
|
618
|
+
], j = /* @__PURE__ */ ".purple-top-red.purple-top-magenta.purple-top-orange.purple-top-blue.purple-top-turquoise.purple-top-green.purple-right-red.purple-right-magenta.purple-right-orange.purple-right-blue.purple-right-turquoise.purple-right-green.purple-top-right-red.purple-top-right-magenta.purple-top-right-orange.purple-top-right-blue.purple-top-right-turquoise.purple-top-right-green.purple-bottom-right-red.purple-bottom-right-magenta.purple-bottom-right-orange.purple-bottom-right-blue.purple-bottom-right-turquoise.purple-bottom-right-green.color-top-red.color-top-magenta.color-top-orange.color-top-blue.color-top-turquoise.color-top-green.color-right-red.color-right-magenta.color-right-orange.color-right-blue.color-right-turquoise.color-right-green.color-top-right-red.color-top-right-magenta.color-top-right-orange.color-top-right-blue.color-top-right-turquoise.color-top-right-green.color-bottom-right-red.color-bottom-right-magenta.color-bottom-right-orange.color-bottom-right-blue.color-bottom-right-turquoise.color-bottom-right-green".split("."), M = [
|
|
619
619
|
"none",
|
|
620
620
|
"2xs",
|
|
621
621
|
"xs",
|
|
@@ -625,14 +625,14 @@ var u = class e extends HTMLElement {
|
|
|
625
625
|
"heading-to-subtitle",
|
|
626
626
|
"heading-to-content",
|
|
627
627
|
"page-layout-between-sections"
|
|
628
|
-
],
|
|
628
|
+
], N = [
|
|
629
629
|
"",
|
|
630
630
|
"all",
|
|
631
631
|
"top",
|
|
632
632
|
"right",
|
|
633
633
|
"bottom",
|
|
634
634
|
"left"
|
|
635
|
-
],
|
|
635
|
+
], P = [
|
|
636
636
|
"",
|
|
637
637
|
"default",
|
|
638
638
|
"xs",
|
|
@@ -641,36 +641,36 @@ var u = class e extends HTMLElement {
|
|
|
641
641
|
"l",
|
|
642
642
|
"xl"
|
|
643
643
|
];
|
|
644
|
-
function
|
|
644
|
+
function F(e) {
|
|
645
645
|
let t = document.createElement("style");
|
|
646
646
|
t.innerHTML = e, document.head.appendChild(t);
|
|
647
647
|
}
|
|
648
|
-
function
|
|
648
|
+
function I(e) {
|
|
649
649
|
return typeof e == "string" && (e === "false" || e === "0" || e === "null") || typeof e == "boolean" && !e;
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function L() {
|
|
652
652
|
return window.matchMedia("only screen and (min-width: 768px)").matches ? "tablet" : window.matchMedia("only screen and (min-width: 1025px)").matches ? "laptop" : "mobile";
|
|
653
653
|
}
|
|
654
|
-
function
|
|
654
|
+
function R(e, t) {
|
|
655
655
|
return t !== null && e.includes(t);
|
|
656
656
|
}
|
|
657
|
-
var
|
|
658
|
-
function
|
|
659
|
-
if (
|
|
657
|
+
var z = /* @__PURE__ */ "aria-label.aria-labelledby.aria-describedby.aria-controls.aria-expanded.aria-haspopup.aria-pressed.aria-selected.aria-required.aria-disabled.aria-live.aria-atomic.aria-relevant.aria-orientation.aria-valuenow.aria-valuetext.aria-valuemin.aria-valuemax.aria-details.aria-modal.aria-autocomplete.aria-activedescendant.aria-colcount.aria-colindex.aria-colspan.aria-rowcount.aria-rowindex.aria-rowspan.aria-keyshortcuts.aria-placeholder.aria-invalid.aria-busy.aria-owns".split(".");
|
|
658
|
+
function B(e, t, n = !1) {
|
|
659
|
+
if (z.forEach((n) => {
|
|
660
660
|
e.getAttribute(n) && (t.setAttribute(n, e.getAttribute(n)), e.removeAttribute(n));
|
|
661
661
|
}), n && !e.getAttribute("aria-labelledby")) {
|
|
662
662
|
let n = `px-${t.localName?.toLowerCase() ?? "component"}-${Math.random().toString(36).substring(2, 15)}`;
|
|
663
663
|
t.setAttribute("id", n), e.setAttribute("aria-labelledby", n);
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
-
function
|
|
666
|
+
function V(e, t, n) {
|
|
667
667
|
if (n == null || n === "") {
|
|
668
668
|
e.removeAttribute(t);
|
|
669
669
|
return;
|
|
670
670
|
}
|
|
671
671
|
e.setAttribute(t, n.toString());
|
|
672
672
|
}
|
|
673
|
-
function
|
|
673
|
+
function H(e, t, n) {
|
|
674
674
|
if (!n) {
|
|
675
675
|
e.removeAttribute(t);
|
|
676
676
|
return;
|
|
@@ -679,7 +679,7 @@ function G(e, t, n) {
|
|
|
679
679
|
}
|
|
680
680
|
//#endregion
|
|
681
681
|
//#region src/breakpoints.ts
|
|
682
|
-
function
|
|
682
|
+
function U(e, t, n, r = "", i, a = e) {
|
|
683
683
|
let o = new CSSStyleSheet(), s = n.reduce((n, o) => n + `
|
|
684
684
|
${t(a, o)} {
|
|
685
685
|
${e}: var(--${r}-${o}-desktop);
|
|
@@ -722,7 +722,7 @@ function K(e, t, n, r = "", i, a = e) {
|
|
|
722
722
|
}`, "");
|
|
723
723
|
return o.replaceSync(s), o;
|
|
724
724
|
}
|
|
725
|
-
var
|
|
725
|
+
var W = class {
|
|
726
726
|
constructor(e, t, n, r) {
|
|
727
727
|
this.component = e, this.attributeName = t, this.cssVariable = r, this.attributeNameMobile = `${this.attributeName}--mobile`, this.attributeNameTablet = `${this.attributeName}--tablet`, this.attributeNameLaptop = `${this.attributeName}--laptop`, this.attributeNameDesktop = `${this.attributeName}--desktop`, this._attributeValue = n, Object.defineProperty(this.component, this.toCamelCase(this.attributeName), {
|
|
728
728
|
get: () => this.component.getAttribute(this.attributeName),
|
|
@@ -768,31 +768,31 @@ var q = class {
|
|
|
768
768
|
set attributeValue(e) {
|
|
769
769
|
this._attributeValue = e, this.setCSSProperties();
|
|
770
770
|
}
|
|
771
|
-
},
|
|
772
|
-
function
|
|
771
|
+
}, G = ".mgnlEditor", K = { "PX-HEADER": "editor" };
|
|
772
|
+
function q(e) {
|
|
773
773
|
return !!e.shadowRoot?.querySelector("slot:not([name])");
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function J(e, t) {
|
|
776
776
|
return t[e.tagName] ?? null;
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function Y(e, { selector: t = G, slotByHost: n = K } = {}) {
|
|
779
779
|
if (!e.matches(t) || e.hasAttribute("slot")) return null;
|
|
780
780
|
let r = e.parentElement;
|
|
781
|
-
if (!r?.shadowRoot ||
|
|
782
|
-
let i =
|
|
781
|
+
if (!r?.shadowRoot || q(r)) return null;
|
|
782
|
+
let i = J(r, n);
|
|
783
783
|
return i ? (e.setAttribute("slot", i), i) : null;
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function X({ selector: e = G, slotByHost: t = K, root: n = document.documentElement } = {}) {
|
|
786
786
|
let r = 0;
|
|
787
787
|
return n.querySelectorAll(e).forEach((n) => {
|
|
788
|
-
|
|
788
|
+
Y(n, {
|
|
789
789
|
selector: e,
|
|
790
790
|
slotByHost: t
|
|
791
791
|
}) && (r += 1);
|
|
792
792
|
}), r;
|
|
793
793
|
}
|
|
794
|
-
function
|
|
795
|
-
|
|
794
|
+
function ie({ selector: e = G, slotByHost: t = K, root: n = document.documentElement } = {}) {
|
|
795
|
+
X({
|
|
796
796
|
selector: e,
|
|
797
797
|
slotByHost: t,
|
|
798
798
|
root: n
|
|
@@ -800,11 +800,11 @@ function te({ selector: e = J, slotByHost: t = Y, root: n = document.documentEle
|
|
|
800
800
|
let r = new MutationObserver((n) => {
|
|
801
801
|
n.forEach((n) => {
|
|
802
802
|
n.addedNodes.forEach((n) => {
|
|
803
|
-
n instanceof Element && (
|
|
803
|
+
n instanceof Element && (Y(n, {
|
|
804
804
|
selector: e,
|
|
805
805
|
slotByHost: t
|
|
806
806
|
}), n.querySelectorAll(e).forEach((n) => {
|
|
807
|
-
|
|
807
|
+
Y(n, {
|
|
808
808
|
selector: e,
|
|
809
809
|
slotByHost: t
|
|
810
810
|
});
|
|
@@ -818,4 +818,22 @@ function te({ selector: e = J, slotByHost: t = Y, root: n = document.documentEle
|
|
|
818
818
|
}), () => r.disconnect();
|
|
819
819
|
}
|
|
820
820
|
//#endregion
|
|
821
|
-
|
|
821
|
+
//#region src/template.ts
|
|
822
|
+
var Z = /* @__PURE__ */ new Map(), ae = 500;
|
|
823
|
+
function Q(e) {
|
|
824
|
+
let t = document.createElement("template");
|
|
825
|
+
return t.innerHTML = e, t;
|
|
826
|
+
}
|
|
827
|
+
function oe(e) {
|
|
828
|
+
return Q(e);
|
|
829
|
+
}
|
|
830
|
+
function $(e) {
|
|
831
|
+
let t = Z.get(e);
|
|
832
|
+
return t || (t = Q(e), Z.size < ae && Z.set(e, t)), t;
|
|
833
|
+
}
|
|
834
|
+
function se(e, t) {
|
|
835
|
+
let n = typeof t == "string" ? $(t) : t;
|
|
836
|
+
e.replaceChildren(document.importNode(n.content, !0));
|
|
837
|
+
}
|
|
838
|
+
//#endregion
|
|
839
|
+
export { W as AttributeBreakpointHandlerDelegate, d as PxElement, f as VerticallyExtendedElement, u as WithExtraAttributes, c as WrappedInteractiveStateController, z as accessibilityAttributes, F as addGlobalStylesheet, P as assetContainerImgWidthValues, Y as assignCmsEditorSlot, X as assignCmsEditorSlots, D as backgroundColorValues, O as backgroundSizeValues, H as booleanPropertyToAttributeSetter, T as borderColorValues, w as borderRadiusValues, E as borderSideValues, C as borderValues, k as boxShadowValues, R as checkName, b as colorValues, oe as createTemplate, h as cssGridAlignSelfValues, _ as cssGridColSpanValues, g as cssGridJustifySelfValues, v as cssGridOrderValues, y as cssGridPlaceSelfValues, U as cssTokenBreakpoints, m as flexboxAlignSelfValues, ee as fontsizeValues, x as fontweightValues, M as gapValues, n as getSupportedAttributeNames, t as getSupportedPropertyNames, $ as getTemplate, L as getViewportFormat, j as gradientValues, p as gridGapValues, A as headingValues, S as iconSizeValues, te as iconSizeValuesKC, o as isComponentDebug, I as isFalsy, s as log, N as noBorderRadiusValues, ie as observeCmsEditorSlots, re as paddingValues, V as propertyToAttributeSetter, se as renderTemplate, ne as textalignValues, B as transferAccessibilityAttributes };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Declares a static template. Call it once, at module level, with a plain
|
|
3
|
+
* template literal: the build (scripts/vite-plugin-minify-templates.js)
|
|
4
|
+
* strips the whitespace between tags so clones contain no empty text nodes.
|
|
5
|
+
*/
|
|
6
|
+
export declare function createTemplate(html: string): HTMLTemplateElement;
|
|
7
|
+
export declare function getTemplate(html: string): HTMLTemplateElement;
|
|
8
|
+
/**
|
|
9
|
+
* Drop-in replacement for `root.innerHTML = html`: replaces the children of
|
|
10
|
+
* `root` with a clone of the parsed template.
|
|
11
|
+
* `importNode` creates the nodes in the current document, so nested custom
|
|
12
|
+
* elements are upgraded synchronously, exactly like with `innerHTML`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function renderTemplate(root: ShadowRoot | Element | DocumentFragment, template: HTMLTemplateElement | string): void;
|