@proximus/lavender-common 2.0.0-alpha.6 → 2.0.0-alpha.61
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/breakpoints.d.ts +1 -1
- package/dist/common.d.ts +19 -3
- package/dist/index.es.js +197 -171
- package/package.json +1 -1
package/dist/breakpoints.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function cssTokenBreakpoints(attributeName: string, selector: (attributeName: string, attribute: string, device?: 'mobile' | 'tablet' | 'laptop' | 'desktop') => string, attributeValues: string[], cssPropertyPrefix?: string, generatedCssPropertyName?: string): CSSStyleSheet;
|
|
1
|
+
export declare function cssTokenBreakpoints(attributeName: string, selector: (attributeName: string, attribute: string, device?: 'mobile' | 'tablet' | 'laptop' | 'desktop') => string, attributeValues: string[], cssPropertyPrefix?: string, generatedCssPropertyName?: string, selectorAttributeName?: string): CSSStyleSheet;
|
|
2
2
|
export declare class AttributeBreakpointHandlerDelegate {
|
|
3
3
|
private readonly component;
|
|
4
4
|
private readonly attributeName;
|
package/dist/common.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
export declare function getSupportedPropertyNames(htmlElementName: string): string[];
|
|
2
2
|
export declare function getSupportedAttributeNames(htmlElementName: string): string[];
|
|
3
|
+
declare global {
|
|
4
|
+
interface Window {
|
|
5
|
+
isComponentDebug?: () => boolean;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export declare function isComponentDebug(): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Logs an error message to the console if the global debug flag is set.
|
|
11
|
+
* Usage: log('message')
|
|
12
|
+
*/
|
|
13
|
+
export declare function log(message: string): void;
|
|
3
14
|
export declare class WithExtraAttributes extends HTMLElement {
|
|
4
15
|
static get observedAttributes(): string[];
|
|
5
16
|
constructor(...adoptedStylesheets: CSSStyleSheet[]);
|
|
@@ -91,16 +102,20 @@ export declare class WithExtraAttributes extends HTMLElement {
|
|
|
91
102
|
}
|
|
92
103
|
export declare abstract class PxElement<HTML_TYPE extends Element> extends WithExtraAttributes {
|
|
93
104
|
static nativeName: string;
|
|
94
|
-
|
|
95
|
-
accessorExclusions: string[];
|
|
105
|
+
static supportedPropertyNames: string[];
|
|
106
|
+
static accessorExclusions: string[];
|
|
96
107
|
static get observedAttributes(): string[];
|
|
97
108
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
109
|
+
protected get ctor(): any;
|
|
98
110
|
protected constructor(...adoptedStylesheets: CSSStyleSheet[]);
|
|
99
|
-
|
|
111
|
+
enhanceWithNativeProperties(): void;
|
|
100
112
|
get $el(): HTML_TYPE;
|
|
101
113
|
protected _updateAttribute(name: string, value: string): void;
|
|
102
114
|
protected _updateBooleanAttribute(name: string, value: boolean): void;
|
|
103
115
|
}
|
|
116
|
+
export declare class VerticallyExtendedElement<HTML_TYPE extends Element> extends PxElement<HTML_TYPE> {
|
|
117
|
+
connectedCallback(): void;
|
|
118
|
+
}
|
|
104
119
|
export declare const gridGapValues: string[];
|
|
105
120
|
export declare const flexboxAlignSelfValues: readonly ["", "default", "auto", "flex-start", "flex-end", "center", "baseline", "stretch"];
|
|
106
121
|
export declare const cssGridAlignSelfValues: readonly ["", "default", "start", "end", "center", "stretch"];
|
|
@@ -132,4 +147,5 @@ export declare function addGlobalStylesheet(inlineStyles: string): void;
|
|
|
132
147
|
export declare function isFalsy(value: string | boolean): boolean;
|
|
133
148
|
export declare function getViewportFormat(): "mobile" | "tablet" | "laptop";
|
|
134
149
|
export declare function checkName(values: string[], value: string): boolean;
|
|
150
|
+
export declare const accessibilityAttributes: string[];
|
|
135
151
|
export declare function transferAccessibilityAttributes(sourceElement: HTMLElement, targetElement: HTMLElement, applyLabelledBy?: boolean): void;
|
package/dist/index.es.js
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
const
|
|
2
|
-
function
|
|
3
|
-
const t = document.createElement(
|
|
1
|
+
const g = ":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}}", f = {};
|
|
2
|
+
function m(o) {
|
|
3
|
+
const t = document.createElement(o), s = Object.getPrototypeOf(t);
|
|
4
4
|
return Object.getOwnPropertyNames(s);
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
const t = document.createElement(
|
|
6
|
+
function k(o) {
|
|
7
|
+
const t = document.createElement(o), s = Object.getPrototypeOf(t);
|
|
8
8
|
return Object.getOwnPropertyNames(s).map(
|
|
9
9
|
(e) => e.toLowerCase()
|
|
10
10
|
);
|
|
11
11
|
}
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const d = new CSSStyleSheet();
|
|
13
|
+
d.replaceSync(g);
|
|
14
|
+
const v = typeof import.meta < "u" && typeof f < "u" && !0;
|
|
15
|
+
typeof window < "u" && (window.isComponentDebug = h);
|
|
16
|
+
function h() {
|
|
17
|
+
return v;
|
|
18
|
+
}
|
|
19
|
+
function w(o) {
|
|
20
|
+
h() && console.error(o);
|
|
21
|
+
}
|
|
22
|
+
typeof window < "u" && (window.isComponentDebug = h);
|
|
23
|
+
class u extends HTMLElement {
|
|
15
24
|
static get observedAttributes() {
|
|
16
25
|
return [
|
|
17
26
|
"grow",
|
|
@@ -63,13 +72,13 @@ class p extends HTMLElement {
|
|
|
63
72
|
}
|
|
64
73
|
constructor(...t) {
|
|
65
74
|
super(), this.shadowRoot || this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [
|
|
66
|
-
|
|
75
|
+
d,
|
|
67
76
|
...t
|
|
68
77
|
];
|
|
69
78
|
}
|
|
70
79
|
attributeChangedCallback(t, s, e) {
|
|
71
|
-
var
|
|
72
|
-
if (
|
|
80
|
+
var i;
|
|
81
|
+
if (u.observedAttributes.indexOf(t) !== -1)
|
|
73
82
|
switch (t) {
|
|
74
83
|
case "grow":
|
|
75
84
|
case "grow--mobile":
|
|
@@ -97,7 +106,7 @@ class p extends HTMLElement {
|
|
|
97
106
|
t,
|
|
98
107
|
s,
|
|
99
108
|
e,
|
|
100
|
-
((
|
|
109
|
+
((i = this.parentElement) == null ? void 0 : i.localName) === "px-grid" ? A : y
|
|
101
110
|
);
|
|
102
111
|
break;
|
|
103
112
|
case "justify-self":
|
|
@@ -109,7 +118,7 @@ class p extends HTMLElement {
|
|
|
109
118
|
t,
|
|
110
119
|
s,
|
|
111
120
|
e,
|
|
112
|
-
|
|
121
|
+
S
|
|
113
122
|
);
|
|
114
123
|
break;
|
|
115
124
|
case "col-span":
|
|
@@ -117,22 +126,21 @@ class p extends HTMLElement {
|
|
|
117
126
|
case "col-span--tablet":
|
|
118
127
|
case "col-span--laptop":
|
|
119
128
|
case "col-span--desktop":
|
|
120
|
-
this.updateProperties(t, s, e,
|
|
129
|
+
this.updateProperties(t, s, e, $);
|
|
121
130
|
break;
|
|
122
131
|
case "order":
|
|
123
132
|
case "order--mobile":
|
|
124
133
|
case "order--tablet":
|
|
125
134
|
case "order--laptop":
|
|
126
135
|
case "order--desktop":
|
|
127
|
-
this.updateProperties(t, s, e,
|
|
136
|
+
this.updateProperties(t, s, e, x);
|
|
128
137
|
break;
|
|
129
138
|
}
|
|
130
139
|
}
|
|
131
|
-
updateProperties(t, s, e,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
140
|
+
updateProperties(t, s, e, i) {
|
|
141
|
+
i && (this.checkName(i, e) || w(
|
|
142
|
+
`${e} is not an allowed ${i} value for ${this.tagName.toLowerCase()}`
|
|
143
|
+
));
|
|
136
144
|
const a = t.indexOf("--") > -1, l = a ? t.split("--")[0] : t;
|
|
137
145
|
if (!a)
|
|
138
146
|
this.style.setProperty(
|
|
@@ -417,38 +425,44 @@ class p extends HTMLElement {
|
|
|
417
425
|
this.setAttribute("order--desktop", t);
|
|
418
426
|
}
|
|
419
427
|
}
|
|
420
|
-
class
|
|
421
|
-
|
|
422
|
-
super(...t), this.accessorExclusions = [], this.nativeName = Object.getPrototypeOf(this).constructor.nativeName, this.accessorExclusions = Object.getPrototypeOf(this).constructor.accessorExclusions || [];
|
|
423
|
-
}
|
|
428
|
+
const b = class b extends u {
|
|
429
|
+
// nativeName: string;
|
|
424
430
|
static get observedAttributes() {
|
|
425
431
|
return [
|
|
426
432
|
...super.observedAttributes,
|
|
427
|
-
...
|
|
433
|
+
...k(this.nativeName)
|
|
428
434
|
];
|
|
429
435
|
}
|
|
430
436
|
attributeChangedCallback(t, s, e) {
|
|
431
437
|
super.attributeChangedCallback(t, s, e), e === null ? this.$el.toggleAttribute(t) : this.$el.setAttribute(t, e);
|
|
432
438
|
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
439
|
+
get ctor() {
|
|
440
|
+
return Object.getPrototypeOf(this).constructor;
|
|
441
|
+
}
|
|
442
|
+
constructor(...t) {
|
|
443
|
+
super(...t), this.ctor.supportedPropertyNames || (this.ctor.supportedPropertyNames = m(
|
|
444
|
+
this.ctor.nativeName
|
|
445
|
+
)), this.enhanceWithNativeProperties();
|
|
446
|
+
}
|
|
447
|
+
enhanceWithNativeProperties() {
|
|
448
|
+
var t;
|
|
449
|
+
for (const s of this.ctor.supportedPropertyNames)
|
|
450
|
+
if (!(s === "constructor" || (((t = this.ctor) == null ? void 0 : t.accessorExclusions) ?? []).includes(s)))
|
|
436
451
|
try {
|
|
437
|
-
Object.defineProperty(this,
|
|
452
|
+
Object.defineProperty(this, s, {
|
|
438
453
|
get() {
|
|
439
|
-
return this.$el[
|
|
454
|
+
return this.$el[s];
|
|
440
455
|
},
|
|
441
|
-
set(
|
|
442
|
-
this.$el[
|
|
456
|
+
set(e) {
|
|
457
|
+
this.$el[s] !== e && (this.$el[s] = e);
|
|
443
458
|
}
|
|
444
459
|
});
|
|
445
|
-
} catch (
|
|
446
|
-
console.warn(`Could not create property ${
|
|
460
|
+
} catch (e) {
|
|
461
|
+
console.warn(`Could not create property ${s} for`, this.$el, e);
|
|
447
462
|
}
|
|
448
|
-
this.isInsideGridOrStack && (this.$el.style.display = "block", this.$el.style.height = "100%");
|
|
449
463
|
}
|
|
450
464
|
get $el() {
|
|
451
|
-
return this.shadowRoot.querySelector(this.nativeName);
|
|
465
|
+
return this.shadowRoot.querySelector(this.ctor.nativeName);
|
|
452
466
|
}
|
|
453
467
|
_updateAttribute(t, s) {
|
|
454
468
|
s ? this.setAttribute(t, s) : this.removeAttribute(t);
|
|
@@ -456,8 +470,15 @@ class y extends p {
|
|
|
456
470
|
_updateBooleanAttribute(t, s) {
|
|
457
471
|
s ? this.setAttribute(t, "") : this.removeAttribute(t);
|
|
458
472
|
}
|
|
473
|
+
};
|
|
474
|
+
b.accessorExclusions = [];
|
|
475
|
+
let p = b;
|
|
476
|
+
class L extends p {
|
|
477
|
+
connectedCallback() {
|
|
478
|
+
this.isInsideGridOrStack && (this.$el.style.display = "block", this.$el.style.height = "100%");
|
|
479
|
+
}
|
|
459
480
|
}
|
|
460
|
-
const
|
|
481
|
+
const M = ["", "default", "none", "l"], y = [
|
|
461
482
|
"",
|
|
462
483
|
"default",
|
|
463
484
|
"auto",
|
|
@@ -466,21 +487,21 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
466
487
|
"center",
|
|
467
488
|
"baseline",
|
|
468
489
|
"stretch"
|
|
469
|
-
],
|
|
490
|
+
], A = [
|
|
470
491
|
"",
|
|
471
492
|
"default",
|
|
472
493
|
"start",
|
|
473
494
|
"end",
|
|
474
495
|
"center",
|
|
475
496
|
"stretch"
|
|
476
|
-
],
|
|
497
|
+
], S = [
|
|
477
498
|
"",
|
|
478
499
|
"default",
|
|
479
500
|
"start",
|
|
480
501
|
"end",
|
|
481
502
|
"center",
|
|
482
503
|
"stretch"
|
|
483
|
-
],
|
|
504
|
+
], $ = [
|
|
484
505
|
"",
|
|
485
506
|
"1",
|
|
486
507
|
"2",
|
|
@@ -494,7 +515,7 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
494
515
|
"10",
|
|
495
516
|
"11",
|
|
496
517
|
"12"
|
|
497
|
-
],
|
|
518
|
+
], x = [
|
|
498
519
|
"",
|
|
499
520
|
"-1",
|
|
500
521
|
"0",
|
|
@@ -510,7 +531,7 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
510
531
|
"10",
|
|
511
532
|
"11",
|
|
512
533
|
"12"
|
|
513
|
-
],
|
|
534
|
+
], N = [
|
|
514
535
|
"",
|
|
515
536
|
"default",
|
|
516
537
|
"auto",
|
|
@@ -518,7 +539,7 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
518
539
|
"end",
|
|
519
540
|
"center",
|
|
520
541
|
"stretch"
|
|
521
|
-
],
|
|
542
|
+
], D = [
|
|
522
543
|
"",
|
|
523
544
|
"default",
|
|
524
545
|
"inherit",
|
|
@@ -534,7 +555,7 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
534
555
|
"heading-l",
|
|
535
556
|
"heading-m",
|
|
536
557
|
"heading-s"
|
|
537
|
-
],
|
|
558
|
+
], T = [
|
|
538
559
|
"",
|
|
539
560
|
"default",
|
|
540
561
|
"inherit",
|
|
@@ -549,7 +570,7 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
549
570
|
"state-hover",
|
|
550
571
|
"state-active",
|
|
551
572
|
"state-disabled"
|
|
552
|
-
],
|
|
573
|
+
], O = [
|
|
553
574
|
"",
|
|
554
575
|
"default",
|
|
555
576
|
"inherit",
|
|
@@ -557,11 +578,11 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
557
578
|
"title",
|
|
558
579
|
"title-large",
|
|
559
580
|
"subtitle"
|
|
560
|
-
],
|
|
581
|
+
], j = ["Xs", "S", "M", "L", "Xl"], _ = [
|
|
561
582
|
"",
|
|
562
583
|
"default",
|
|
563
|
-
...
|
|
564
|
-
],
|
|
584
|
+
...j.map((o) => o.toLowerCase())
|
|
585
|
+
], P = ["", "default", "left", "center", "right"], q = [
|
|
565
586
|
"",
|
|
566
587
|
"none",
|
|
567
588
|
"3xs",
|
|
@@ -571,7 +592,7 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
571
592
|
"m",
|
|
572
593
|
"l",
|
|
573
594
|
"xl"
|
|
574
|
-
],
|
|
595
|
+
], G = ["", "none", "s", "m", "l"], E = ["", "none", "main", "pill"], B = [
|
|
575
596
|
"none",
|
|
576
597
|
"main",
|
|
577
598
|
"brand",
|
|
@@ -582,7 +603,7 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
582
603
|
"purpose-warning",
|
|
583
604
|
"purpose-error",
|
|
584
605
|
"purpose-unlimited"
|
|
585
|
-
],
|
|
606
|
+
], V = [
|
|
586
607
|
"",
|
|
587
608
|
"all",
|
|
588
609
|
"top",
|
|
@@ -591,7 +612,7 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
591
612
|
"left",
|
|
592
613
|
"block",
|
|
593
614
|
"inline"
|
|
594
|
-
],
|
|
615
|
+
], R = [
|
|
595
616
|
"",
|
|
596
617
|
"none",
|
|
597
618
|
"surface-light",
|
|
@@ -618,8 +639,8 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
618
639
|
"purpose-info",
|
|
619
640
|
"purpose-eco",
|
|
620
641
|
"purpose-notification",
|
|
621
|
-
"footer"
|
|
622
|
-
],
|
|
642
|
+
"footer-sitemap"
|
|
643
|
+
], z = ["", "cover", "contain", "default"], H = ["", "none", "s", "m", "l", "xl"], I = [
|
|
623
644
|
"",
|
|
624
645
|
"default",
|
|
625
646
|
"title-4xl",
|
|
@@ -630,7 +651,7 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
630
651
|
"title-m",
|
|
631
652
|
"title-s",
|
|
632
653
|
"subtitle"
|
|
633
|
-
],
|
|
654
|
+
], W = [
|
|
634
655
|
"",
|
|
635
656
|
"purple-top-red",
|
|
636
657
|
"purple-top-magenta",
|
|
@@ -680,7 +701,7 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
680
701
|
"color-bottom-right-blue",
|
|
681
702
|
"color-bottom-right-turquoise",
|
|
682
703
|
"color-bottom-right-green"
|
|
683
|
-
],
|
|
704
|
+
], X = [
|
|
684
705
|
"none",
|
|
685
706
|
"2xs",
|
|
686
707
|
"xs",
|
|
@@ -690,14 +711,14 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
690
711
|
"heading-to-subtitle",
|
|
691
712
|
"heading-to-content",
|
|
692
713
|
"page-layout-between-sections"
|
|
693
|
-
],
|
|
714
|
+
], F = [
|
|
694
715
|
"",
|
|
695
716
|
"all",
|
|
696
717
|
"top",
|
|
697
718
|
"right",
|
|
698
719
|
"bottom",
|
|
699
720
|
"left"
|
|
700
|
-
],
|
|
721
|
+
], U = [
|
|
701
722
|
"",
|
|
702
723
|
"default",
|
|
703
724
|
"xs",
|
|
@@ -706,111 +727,112 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
706
727
|
"l",
|
|
707
728
|
"xl"
|
|
708
729
|
];
|
|
709
|
-
function
|
|
730
|
+
function J(o) {
|
|
710
731
|
const t = document.createElement("style");
|
|
711
|
-
t.innerHTML =
|
|
732
|
+
t.innerHTML = o, document.head.appendChild(t);
|
|
712
733
|
}
|
|
713
|
-
function
|
|
714
|
-
return typeof
|
|
734
|
+
function K(o) {
|
|
735
|
+
return typeof o == "string" && (o === "false" || o === "0" || o === "null") || typeof o == "boolean" && !o;
|
|
715
736
|
}
|
|
716
|
-
function
|
|
737
|
+
function Q() {
|
|
717
738
|
return window.matchMedia("only screen and (min-width: 768px)").matches ? "tablet" : window.matchMedia("only screen and (min-width: 1025px)").matches ? "laptop" : "mobile";
|
|
718
739
|
}
|
|
719
|
-
function
|
|
720
|
-
return
|
|
740
|
+
function Y(o, t) {
|
|
741
|
+
return o.includes(t);
|
|
721
742
|
}
|
|
722
|
-
|
|
743
|
+
const C = [
|
|
744
|
+
"aria-label",
|
|
745
|
+
"aria-labelledby",
|
|
746
|
+
"aria-describedby",
|
|
747
|
+
"aria-controls",
|
|
748
|
+
"aria-expanded",
|
|
749
|
+
"aria-haspopup",
|
|
750
|
+
"aria-pressed",
|
|
751
|
+
"aria-selected",
|
|
752
|
+
"aria-required",
|
|
753
|
+
"aria-disabled",
|
|
754
|
+
"aria-live",
|
|
755
|
+
"aria-atomic",
|
|
756
|
+
"aria-relevant",
|
|
757
|
+
"aria-orientation",
|
|
758
|
+
"aria-valuenow",
|
|
759
|
+
"aria-valuetext",
|
|
760
|
+
"aria-valuemin",
|
|
761
|
+
"aria-valuemax",
|
|
762
|
+
"aria-details",
|
|
763
|
+
"aria-modal",
|
|
764
|
+
"aria-autocomplete",
|
|
765
|
+
"aria-activedescendant",
|
|
766
|
+
"aria-colcount",
|
|
767
|
+
"aria-colindex",
|
|
768
|
+
"aria-colspan",
|
|
769
|
+
"aria-rowcount",
|
|
770
|
+
"aria-rowindex",
|
|
771
|
+
"aria-rowspan",
|
|
772
|
+
"aria-keyshortcuts",
|
|
773
|
+
"aria-placeholder",
|
|
774
|
+
"aria-invalid",
|
|
775
|
+
"aria-busy",
|
|
776
|
+
"aria-owns"
|
|
777
|
+
];
|
|
778
|
+
function Z(o, t, s = !0) {
|
|
723
779
|
var e;
|
|
724
|
-
if (
|
|
725
|
-
|
|
726
|
-
"aria-labelledby",
|
|
727
|
-
"aria-describedby",
|
|
728
|
-
"aria-controls",
|
|
729
|
-
"aria-expanded",
|
|
730
|
-
"aria-haspopup",
|
|
731
|
-
"aria-pressed",
|
|
732
|
-
"aria-selected",
|
|
733
|
-
"aria-required",
|
|
734
|
-
"aria-disabled",
|
|
735
|
-
"aria-live",
|
|
736
|
-
"aria-atomic",
|
|
737
|
-
"aria-relevant",
|
|
738
|
-
"aria-orientation",
|
|
739
|
-
"aria-valuenow",
|
|
740
|
-
"aria-valuetext",
|
|
741
|
-
"aria-valuemin",
|
|
742
|
-
"aria-valuemax",
|
|
743
|
-
"aria-details",
|
|
744
|
-
"aria-modal",
|
|
745
|
-
"aria-autocomplete",
|
|
746
|
-
"aria-activedescendant",
|
|
747
|
-
"aria-colcount",
|
|
748
|
-
"aria-colindex",
|
|
749
|
-
"aria-colspan",
|
|
750
|
-
"aria-rowcount",
|
|
751
|
-
"aria-rowindex",
|
|
752
|
-
"aria-rowspan",
|
|
753
|
-
"aria-keyshortcuts",
|
|
754
|
-
"aria-placeholder",
|
|
755
|
-
"aria-invalid",
|
|
756
|
-
"aria-busy",
|
|
757
|
-
"aria-owns"
|
|
758
|
-
].forEach((o) => {
|
|
759
|
-
i.getAttribute(o) && (t.setAttribute(o, i.getAttribute(o)), i.removeAttribute(o));
|
|
780
|
+
if (C.forEach((i) => {
|
|
781
|
+
o.getAttribute(i) && (t.setAttribute(i, o.getAttribute(i)), o.removeAttribute(i));
|
|
760
782
|
}), s) {
|
|
761
|
-
const
|
|
762
|
-
t.setAttribute("id",
|
|
783
|
+
const i = `px-${((e = t.localName) == null ? void 0 : e.toLowerCase()) ?? "component"}-${Math.random().toString(36).substring(2, 15)}`;
|
|
784
|
+
t.setAttribute("id", i), o.setAttribute("aria-labelledby", i);
|
|
763
785
|
}
|
|
764
786
|
}
|
|
765
|
-
function
|
|
766
|
-
const
|
|
767
|
-
(
|
|
768
|
-
${t(
|
|
769
|
-
${
|
|
770
|
-
${
|
|
787
|
+
function tt(o, t, s, e = "", i, a = o) {
|
|
788
|
+
const l = new CSSStyleSheet(), n = s.reduce(
|
|
789
|
+
(c, r) => c + `
|
|
790
|
+
${t(a, r)} {
|
|
791
|
+
${o}: var(--${e}-${r}-desktop);
|
|
792
|
+
${i ? `${i}:var(--${e}-${r}-desktop)` : ""}
|
|
771
793
|
}
|
|
772
794
|
/* Mobile only - max 767px */
|
|
773
795
|
@media only screen and (max-width: 47.938em) {
|
|
774
|
-
${t(
|
|
775
|
-
${
|
|
776
|
-
${
|
|
796
|
+
${t(a, r)} {
|
|
797
|
+
${o}: var(--${e}-${r}-mobile);
|
|
798
|
+
${i ? `${i}: var(--${e}-${r}-mobile)` : ""}
|
|
777
799
|
}
|
|
778
800
|
}
|
|
779
|
-
${t(
|
|
801
|
+
${t(a, r, "mobile")} {
|
|
780
802
|
/* Mobile only - max 767px */
|
|
781
803
|
@media only screen and (max-width: 47.938em) {
|
|
782
|
-
${
|
|
783
|
-
${
|
|
804
|
+
${o}: var(--${e}-${r}-mobile) !important;
|
|
805
|
+
${i ? `${i}: var(--${e}-${r}-mobile)` : ""}
|
|
784
806
|
}
|
|
785
807
|
}
|
|
786
|
-
${t(
|
|
808
|
+
${t(a, r, "tablet")} {
|
|
787
809
|
/* Tablet - min 768px max 1024px */
|
|
788
810
|
@media only screen and (min-width: 48em) and (max-width: 64em) {
|
|
789
|
-
${
|
|
790
|
-
${
|
|
811
|
+
${o}: var(--${e}-${r}-desktop) !important;
|
|
812
|
+
${i ? `${i}: var(--${e}-${r}-desktop)` : ""}
|
|
791
813
|
}
|
|
792
814
|
}
|
|
793
|
-
${t(
|
|
815
|
+
${t(a, r, "laptop")} {
|
|
794
816
|
/* Laptop - 1025px*/
|
|
795
817
|
@media only screen and (min-width: 64.0625em) {
|
|
796
|
-
${
|
|
797
|
-
${
|
|
818
|
+
${o}: var(--${e}-${r}-desktop) !important;
|
|
819
|
+
${i ? `${i}: var(--${e}-${r}-desktop)` : ""}
|
|
798
820
|
}
|
|
799
821
|
}
|
|
800
|
-
${t(
|
|
822
|
+
${t(a, r, "desktop")} {
|
|
801
823
|
/* Desktop - 1025px*/
|
|
802
824
|
@media only screen and (min-width: 64.0625em) {
|
|
803
|
-
${
|
|
804
|
-
${
|
|
825
|
+
${o}: var(--${e}-${r}-desktop) !important;
|
|
826
|
+
${i ? `${i}: var(--${e}-${r}-desktop)` : ""}
|
|
805
827
|
}
|
|
806
828
|
}`,
|
|
807
829
|
""
|
|
808
830
|
);
|
|
809
|
-
return
|
|
831
|
+
return l.replaceSync(n), l;
|
|
810
832
|
}
|
|
811
|
-
class
|
|
812
|
-
constructor(t, s, e,
|
|
813
|
-
this.component = t, this.attributeName = s, this.cssVariable =
|
|
833
|
+
class et {
|
|
834
|
+
constructor(t, s, e, i) {
|
|
835
|
+
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(
|
|
814
836
|
this.component,
|
|
815
837
|
this.toCamelCase(this.attributeName),
|
|
816
838
|
{
|
|
@@ -842,10 +864,10 @@ class J {
|
|
|
842
864
|
}
|
|
843
865
|
}
|
|
844
866
|
setCSSProperty(t, s, e = !0) {
|
|
845
|
-
const [,
|
|
867
|
+
const [, i = ""] = t.split("--");
|
|
846
868
|
this.component.style.setProperty(
|
|
847
|
-
`${this.cssVariable}${e ? "-all" : ""}${
|
|
848
|
-
`${this._attributeValue(s,
|
|
869
|
+
`${this.cssVariable}${e ? "-all" : ""}${i ? `-${i}` : ""}`,
|
|
870
|
+
`${this._attributeValue(s, i)}`
|
|
849
871
|
);
|
|
850
872
|
}
|
|
851
873
|
setCSSProperties() {
|
|
@@ -867,12 +889,12 @@ class J {
|
|
|
867
889
|
e,
|
|
868
890
|
!1
|
|
869
891
|
);
|
|
870
|
-
const
|
|
892
|
+
const i = this.component.getAttribute(
|
|
871
893
|
this.attributeNameLaptop
|
|
872
894
|
);
|
|
873
|
-
|
|
895
|
+
i && this.setCSSProperty(
|
|
874
896
|
this.attributeNameLaptop,
|
|
875
|
-
|
|
897
|
+
i,
|
|
876
898
|
!1
|
|
877
899
|
);
|
|
878
900
|
const a = this.component.getAttribute(
|
|
@@ -889,41 +911,45 @@ class J {
|
|
|
889
911
|
}
|
|
890
912
|
}
|
|
891
913
|
export {
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
914
|
+
et as AttributeBreakpointHandlerDelegate,
|
|
915
|
+
p as PxElement,
|
|
916
|
+
L as VerticallyExtendedElement,
|
|
917
|
+
u as WithExtraAttributes,
|
|
918
|
+
C as accessibilityAttributes,
|
|
919
|
+
J as addGlobalStylesheet,
|
|
920
|
+
U as assetContainerImgWidthValues,
|
|
921
|
+
R as backgroundColorValues,
|
|
922
|
+
z as backgroundSizeValues,
|
|
923
|
+
B as borderColorValues,
|
|
924
|
+
E as borderRadiusValues,
|
|
925
|
+
V as borderSideValues,
|
|
926
|
+
G as borderValues,
|
|
927
|
+
H as boxShadowValues,
|
|
928
|
+
Y as checkName,
|
|
929
|
+
T as colorValues,
|
|
930
|
+
A as cssGridAlignSelfValues,
|
|
931
|
+
$ as cssGridColSpanValues,
|
|
932
|
+
S as cssGridJustifySelfValues,
|
|
933
|
+
x as cssGridOrderValues,
|
|
934
|
+
N as cssGridPlaceSelfValues,
|
|
935
|
+
tt as cssTokenBreakpoints,
|
|
936
|
+
y as flexboxAlignSelfValues,
|
|
937
|
+
D as fontsizeValues,
|
|
938
|
+
O as fontweightValues,
|
|
939
|
+
X as gapValues,
|
|
940
|
+
k as getSupportedAttributeNames,
|
|
941
|
+
m as getSupportedPropertyNames,
|
|
942
|
+
Q as getViewportFormat,
|
|
943
|
+
W as gradientValues,
|
|
944
|
+
M as gridGapValues,
|
|
945
|
+
I as headingValues,
|
|
946
|
+
j as iconSizeValues,
|
|
947
|
+
_ as iconSizeValuesKC,
|
|
948
|
+
h as isComponentDebug,
|
|
949
|
+
K as isFalsy,
|
|
950
|
+
w as log,
|
|
951
|
+
F as noBorderRadiusValues,
|
|
952
|
+
q as paddingValues,
|
|
953
|
+
P as textalignValues,
|
|
954
|
+
Z as transferAccessibilityAttributes
|
|
929
955
|
};
|