@proximus/lavender-common 2.0.0-alpha.1 → 2.0.0-alpha.100
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 +30 -4
- package/dist/index.es.js +275 -160
- 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,24 @@
|
|
|
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;
|
|
14
|
+
export declare class WrappedInteractiveStateController {
|
|
15
|
+
#private;
|
|
16
|
+
constructor(host: HTMLElement, interactiveElement: HTMLElement, canSetInteractiveState: () => boolean);
|
|
17
|
+
clearInteractiveState: () => void;
|
|
18
|
+
connect(): void;
|
|
19
|
+
disconnect(): void;
|
|
20
|
+
setInteractiveState(state: 'hover' | null): void;
|
|
21
|
+
}
|
|
3
22
|
export declare class WithExtraAttributes extends HTMLElement {
|
|
4
23
|
static get observedAttributes(): string[];
|
|
5
24
|
constructor(...adoptedStylesheets: CSSStyleSheet[]);
|
|
@@ -9,8 +28,7 @@ export declare class WithExtraAttributes extends HTMLElement {
|
|
|
9
28
|
checkName<T extends readonly string[]>(values: T, value: string): boolean;
|
|
10
29
|
get $el(): Element;
|
|
11
30
|
get $parentElementName(): string;
|
|
12
|
-
get
|
|
13
|
-
get isStack(): boolean;
|
|
31
|
+
get isInsideGridOrStack(): boolean;
|
|
14
32
|
get grow(): string;
|
|
15
33
|
set grow(value: string);
|
|
16
34
|
get growMobile(): string;
|
|
@@ -92,12 +110,19 @@ export declare class WithExtraAttributes extends HTMLElement {
|
|
|
92
110
|
}
|
|
93
111
|
export declare abstract class PxElement<HTML_TYPE extends Element> extends WithExtraAttributes {
|
|
94
112
|
static nativeName: string;
|
|
95
|
-
|
|
113
|
+
static supportedPropertyNames: string[];
|
|
114
|
+
static accessorExclusions: string[];
|
|
96
115
|
static get observedAttributes(): string[];
|
|
97
116
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
117
|
+
protected get ctor(): any;
|
|
98
118
|
protected constructor(...adoptedStylesheets: CSSStyleSheet[]);
|
|
99
|
-
|
|
119
|
+
enhanceWithNativeProperties(): void;
|
|
100
120
|
get $el(): HTML_TYPE;
|
|
121
|
+
protected _updateAttribute(name: string, value: string): void;
|
|
122
|
+
protected _updateBooleanAttribute(name: string, value: boolean): void;
|
|
123
|
+
}
|
|
124
|
+
export declare class VerticallyExtendedElement<HTML_TYPE extends Element> extends PxElement<HTML_TYPE> {
|
|
125
|
+
connectedCallback(): void;
|
|
101
126
|
}
|
|
102
127
|
export declare const gridGapValues: string[];
|
|
103
128
|
export declare const flexboxAlignSelfValues: readonly ["", "default", "auto", "flex-start", "flex-end", "center", "baseline", "stretch"];
|
|
@@ -130,4 +155,5 @@ export declare function addGlobalStylesheet(inlineStyles: string): void;
|
|
|
130
155
|
export declare function isFalsy(value: string | boolean): boolean;
|
|
131
156
|
export declare function getViewportFormat(): "mobile" | "tablet" | "laptop";
|
|
132
157
|
export declare function checkName(values: string[], value: string): boolean;
|
|
158
|
+
export declare const accessibilityAttributes: string[];
|
|
133
159
|
export declare function transferAccessibilityAttributes(sourceElement: HTMLElement, targetElement: HTMLElement, applyLabelledBy?: boolean): void;
|
package/dist/index.es.js
CHANGED
|
@@ -1,17 +1,101 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var A = (i) => {
|
|
2
|
+
throw TypeError(i);
|
|
3
|
+
};
|
|
4
|
+
var S = (i, t, s) => t.has(i) || A("Cannot " + s);
|
|
5
|
+
var a = (i, t, s) => (S(i, t, "read from private field"), s ? s.call(i) : t.get(i)), d = (i, t, s) => t.has(i) ? A("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, s), p = (i, t, s, e) => (S(i, t, "write to private field"), e ? e.call(i, s) : t.set(i, s), s);
|
|
6
|
+
const C = ":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]){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%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media screen and (max-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%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}@media screen and (min-width: 48rem) and (max-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%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}@media screen and (min-width: 64.0625rem){: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: 64.0625rem){: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: 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}}", L = {};
|
|
7
|
+
function N(i) {
|
|
3
8
|
const t = document.createElement(i), s = Object.getPrototypeOf(t);
|
|
4
9
|
return Object.getOwnPropertyNames(s);
|
|
5
10
|
}
|
|
6
|
-
function
|
|
11
|
+
function M(i) {
|
|
7
12
|
const t = document.createElement(i), s = Object.getPrototypeOf(t);
|
|
8
13
|
return Object.getOwnPropertyNames(s).map(
|
|
9
14
|
(e) => e.toLowerCase()
|
|
10
15
|
);
|
|
11
16
|
}
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
const $ = new CSSStyleSheet();
|
|
18
|
+
$.replaceSync(C);
|
|
19
|
+
const D = typeof import.meta < "u" && typeof L < "u" && !0;
|
|
20
|
+
typeof window < "u" && (window.isComponentDebug = v);
|
|
21
|
+
function v() {
|
|
22
|
+
return D;
|
|
23
|
+
}
|
|
24
|
+
function T(i) {
|
|
25
|
+
v() && console.error(i);
|
|
26
|
+
}
|
|
27
|
+
var c, n, g, h, u, m, x;
|
|
28
|
+
class R {
|
|
29
|
+
constructor(t, s, e) {
|
|
30
|
+
d(this, m);
|
|
31
|
+
d(this, c);
|
|
32
|
+
d(this, n);
|
|
33
|
+
d(this, g);
|
|
34
|
+
d(this, h);
|
|
35
|
+
d(this, u);
|
|
36
|
+
p(this, h, !1), p(this, u, () => {
|
|
37
|
+
this.setInteractiveState("hover");
|
|
38
|
+
}), this.clearInteractiveState = () => {
|
|
39
|
+
this.setInteractiveState(null);
|
|
40
|
+
}, p(this, c, t), p(this, n, s), p(this, g, e);
|
|
41
|
+
}
|
|
42
|
+
connect() {
|
|
43
|
+
a(this, h) || (a(this, n).addEventListener(
|
|
44
|
+
"pointerenter",
|
|
45
|
+
a(this, u)
|
|
46
|
+
), a(this, n).addEventListener(
|
|
47
|
+
"pointerleave",
|
|
48
|
+
this.clearInteractiveState
|
|
49
|
+
), a(this, n).addEventListener(
|
|
50
|
+
"focusin",
|
|
51
|
+
a(this, u)
|
|
52
|
+
), a(this, n).addEventListener(
|
|
53
|
+
"focusout",
|
|
54
|
+
this.clearInteractiveState
|
|
55
|
+
), p(this, h, !0));
|
|
56
|
+
}
|
|
57
|
+
disconnect() {
|
|
58
|
+
a(this, h) && (a(this, n).removeEventListener(
|
|
59
|
+
"pointerenter",
|
|
60
|
+
a(this, u)
|
|
61
|
+
), a(this, n).removeEventListener(
|
|
62
|
+
"pointerleave",
|
|
63
|
+
this.clearInteractiveState
|
|
64
|
+
), a(this, n).removeEventListener(
|
|
65
|
+
"focusin",
|
|
66
|
+
a(this, u)
|
|
67
|
+
), a(this, n).removeEventListener(
|
|
68
|
+
"focusout",
|
|
69
|
+
this.clearInteractiveState
|
|
70
|
+
), p(this, h, !1));
|
|
71
|
+
}
|
|
72
|
+
setInteractiveState(t) {
|
|
73
|
+
const s = a(this, m, x);
|
|
74
|
+
if (!a(this, g).call(this)) {
|
|
75
|
+
s.forEach((e) => e.removeAttribute("interactive-state"));
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
s.forEach((e) => {
|
|
79
|
+
t ? e.setAttribute("interactive-state", t) : e.removeAttribute("interactive-state");
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
c = new WeakMap(), n = new WeakMap(), g = new WeakMap(), h = new WeakMap(), u = new WeakMap(), m = new WeakSet(), x = function() {
|
|
84
|
+
return Array.from(a(this, c).querySelectorAll("*")).filter(
|
|
85
|
+
E
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
function E(i) {
|
|
89
|
+
var s;
|
|
90
|
+
if (i.hasAttribute("interactive-state"))
|
|
91
|
+
return !0;
|
|
92
|
+
const t = customElements.get(
|
|
93
|
+
i.localName
|
|
94
|
+
);
|
|
95
|
+
return ((s = t == null ? void 0 : t.observedAttributes) == null ? void 0 : s.includes("interactive-state")) ?? !1;
|
|
96
|
+
}
|
|
97
|
+
typeof window < "u" && (window.isComponentDebug = v);
|
|
98
|
+
class y extends HTMLElement {
|
|
15
99
|
static get observedAttributes() {
|
|
16
100
|
return [
|
|
17
101
|
"grow",
|
|
@@ -58,17 +142,20 @@ class p extends HTMLElement {
|
|
|
58
142
|
"order--mobile",
|
|
59
143
|
"order--tablet",
|
|
60
144
|
"order--laptop",
|
|
61
|
-
"order--desktop"
|
|
145
|
+
"order--desktop",
|
|
146
|
+
"sticky-top",
|
|
147
|
+
"sticky-bottom"
|
|
62
148
|
];
|
|
63
149
|
}
|
|
64
150
|
constructor(...t) {
|
|
65
151
|
super(), this.shadowRoot || this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [
|
|
66
|
-
|
|
152
|
+
$,
|
|
67
153
|
...t
|
|
68
154
|
];
|
|
69
155
|
}
|
|
70
156
|
attributeChangedCallback(t, s, e) {
|
|
71
|
-
|
|
157
|
+
var o;
|
|
158
|
+
if (y.observedAttributes.indexOf(t) !== -1)
|
|
72
159
|
switch (t) {
|
|
73
160
|
case "grow":
|
|
74
161
|
case "grow--mobile":
|
|
@@ -96,7 +183,7 @@ class p extends HTMLElement {
|
|
|
96
183
|
t,
|
|
97
184
|
s,
|
|
98
185
|
e,
|
|
99
|
-
this.
|
|
186
|
+
((o = this.parentElement) == null ? void 0 : o.localName) === "px-grid" ? I : O
|
|
100
187
|
);
|
|
101
188
|
break;
|
|
102
189
|
case "justify-self":
|
|
@@ -108,7 +195,7 @@ class p extends HTMLElement {
|
|
|
108
195
|
t,
|
|
109
196
|
s,
|
|
110
197
|
e,
|
|
111
|
-
|
|
198
|
+
_
|
|
112
199
|
);
|
|
113
200
|
break;
|
|
114
201
|
case "col-span":
|
|
@@ -116,38 +203,37 @@ class p extends HTMLElement {
|
|
|
116
203
|
case "col-span--tablet":
|
|
117
204
|
case "col-span--laptop":
|
|
118
205
|
case "col-span--desktop":
|
|
119
|
-
this.updateProperties(t, s, e,
|
|
206
|
+
this.updateProperties(t, s, e, q);
|
|
120
207
|
break;
|
|
121
208
|
case "order":
|
|
122
209
|
case "order--mobile":
|
|
123
210
|
case "order--tablet":
|
|
124
211
|
case "order--laptop":
|
|
125
212
|
case "order--desktop":
|
|
126
|
-
this.updateProperties(t, s, e,
|
|
213
|
+
this.updateProperties(t, s, e, P);
|
|
127
214
|
break;
|
|
128
215
|
}
|
|
129
216
|
}
|
|
130
217
|
updateProperties(t, s, e, o) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
if (!a)
|
|
218
|
+
o && (this.checkName(o, e) || T(
|
|
219
|
+
`${e} is not an allowed ${o} value for ${this.tagName.toLowerCase()}`
|
|
220
|
+
));
|
|
221
|
+
const l = t.indexOf("--") > -1, b = l ? t.split("--")[0] : t;
|
|
222
|
+
if (!l)
|
|
137
223
|
this.style.setProperty(
|
|
138
|
-
`--${
|
|
224
|
+
`--${b}-value`,
|
|
139
225
|
s
|
|
140
226
|
), this.style.setProperty(
|
|
141
|
-
`--${
|
|
227
|
+
`--${b}-value`,
|
|
142
228
|
e
|
|
143
229
|
);
|
|
144
230
|
else {
|
|
145
|
-
const
|
|
231
|
+
const f = t.split("--")[1];
|
|
146
232
|
this.style.setProperty(
|
|
147
|
-
`--${
|
|
233
|
+
`--${b}--${f}-value`,
|
|
148
234
|
s
|
|
149
235
|
), this.style.setProperty(
|
|
150
|
-
`--${
|
|
236
|
+
`--${b}--${f}-value`,
|
|
151
237
|
e
|
|
152
238
|
);
|
|
153
239
|
}
|
|
@@ -168,11 +254,18 @@ class p extends HTMLElement {
|
|
|
168
254
|
var t;
|
|
169
255
|
return (t = this.parentElement) == null ? void 0 : t.tagName.toLowerCase();
|
|
170
256
|
}
|
|
171
|
-
get
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
257
|
+
get isInsideGridOrStack() {
|
|
258
|
+
let t = this.parentElement;
|
|
259
|
+
for (; t; ) {
|
|
260
|
+
if (t.localName === "px-grid" || t.localName === "px-stack" && (t == null ? void 0 : t.getAttribute("direction")) === "row")
|
|
261
|
+
return !0;
|
|
262
|
+
if (window.getComputedStyle(t).display === "contents") {
|
|
263
|
+
t = t.parentElement;
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
break;
|
|
267
|
+
}
|
|
268
|
+
return !1;
|
|
176
269
|
}
|
|
177
270
|
get grow() {
|
|
178
271
|
return this.getAttribute("grow");
|
|
@@ -409,23 +502,29 @@ class p extends HTMLElement {
|
|
|
409
502
|
this.setAttribute("order--desktop", t);
|
|
410
503
|
}
|
|
411
504
|
}
|
|
412
|
-
class w extends
|
|
505
|
+
const w = class w extends y {
|
|
506
|
+
// nativeName: string;
|
|
413
507
|
static get observedAttributes() {
|
|
414
508
|
return [
|
|
415
509
|
...super.observedAttributes,
|
|
416
|
-
...
|
|
510
|
+
...M(this.nativeName)
|
|
417
511
|
];
|
|
418
512
|
}
|
|
419
513
|
attributeChangedCallback(t, s, e) {
|
|
420
514
|
super.attributeChangedCallback(t, s, e), e === null ? this.$el.toggleAttribute(t) : this.$el.setAttribute(t, e);
|
|
421
515
|
}
|
|
516
|
+
get ctor() {
|
|
517
|
+
return Object.getPrototypeOf(this).constructor;
|
|
518
|
+
}
|
|
422
519
|
constructor(...t) {
|
|
423
|
-
super(...t), this.
|
|
520
|
+
super(...t), this.ctor.supportedPropertyNames || (this.ctor.supportedPropertyNames = N(
|
|
521
|
+
this.ctor.nativeName
|
|
522
|
+
)), this.enhanceWithNativeProperties();
|
|
424
523
|
}
|
|
425
|
-
|
|
524
|
+
enhanceWithNativeProperties() {
|
|
426
525
|
var t;
|
|
427
|
-
for (const s of
|
|
428
|
-
if (s
|
|
526
|
+
for (const s of this.ctor.supportedPropertyNames)
|
|
527
|
+
if (!(s === "constructor" || (((t = this.ctor) == null ? void 0 : t.accessorExclusions) ?? []).includes(s)))
|
|
429
528
|
try {
|
|
430
529
|
Object.defineProperty(this, s, {
|
|
431
530
|
get() {
|
|
@@ -438,16 +537,25 @@ class w extends p {
|
|
|
438
537
|
} catch (e) {
|
|
439
538
|
console.warn(`Could not create property ${s} for`, this.$el, e);
|
|
440
539
|
}
|
|
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
540
|
}
|
|
446
541
|
get $el() {
|
|
447
|
-
return this.shadowRoot.querySelector(this.nativeName);
|
|
542
|
+
return this.shadowRoot.querySelector(this.ctor.nativeName);
|
|
543
|
+
}
|
|
544
|
+
_updateAttribute(t, s) {
|
|
545
|
+
s ? this.setAttribute(t, s) : this.removeAttribute(t);
|
|
546
|
+
}
|
|
547
|
+
_updateBooleanAttribute(t, s) {
|
|
548
|
+
s ? this.setAttribute(t, "") : this.removeAttribute(t);
|
|
549
|
+
}
|
|
550
|
+
};
|
|
551
|
+
w.accessorExclusions = [];
|
|
552
|
+
let k = w;
|
|
553
|
+
class z extends k {
|
|
554
|
+
connectedCallback() {
|
|
555
|
+
this.isInsideGridOrStack && (this.$el.style.display = "block", this.$el.style.height = "100%");
|
|
448
556
|
}
|
|
449
557
|
}
|
|
450
|
-
const
|
|
558
|
+
const W = ["", "default", "none", "l"], O = [
|
|
451
559
|
"",
|
|
452
560
|
"default",
|
|
453
561
|
"auto",
|
|
@@ -456,21 +564,21 @@ const y = ["", "default", "none", "l"], c = [
|
|
|
456
564
|
"center",
|
|
457
565
|
"baseline",
|
|
458
566
|
"stretch"
|
|
459
|
-
],
|
|
567
|
+
], I = [
|
|
460
568
|
"",
|
|
461
569
|
"default",
|
|
462
570
|
"start",
|
|
463
571
|
"end",
|
|
464
572
|
"center",
|
|
465
573
|
"stretch"
|
|
466
|
-
],
|
|
574
|
+
], _ = [
|
|
467
575
|
"",
|
|
468
576
|
"default",
|
|
469
577
|
"start",
|
|
470
578
|
"end",
|
|
471
579
|
"center",
|
|
472
580
|
"stretch"
|
|
473
|
-
],
|
|
581
|
+
], q = [
|
|
474
582
|
"",
|
|
475
583
|
"1",
|
|
476
584
|
"2",
|
|
@@ -484,7 +592,7 @@ const y = ["", "default", "none", "l"], c = [
|
|
|
484
592
|
"10",
|
|
485
593
|
"11",
|
|
486
594
|
"12"
|
|
487
|
-
],
|
|
595
|
+
], P = [
|
|
488
596
|
"",
|
|
489
597
|
"-1",
|
|
490
598
|
"0",
|
|
@@ -500,7 +608,7 @@ const y = ["", "default", "none", "l"], c = [
|
|
|
500
608
|
"10",
|
|
501
609
|
"11",
|
|
502
610
|
"12"
|
|
503
|
-
],
|
|
611
|
+
], H = [
|
|
504
612
|
"",
|
|
505
613
|
"default",
|
|
506
614
|
"auto",
|
|
@@ -508,7 +616,7 @@ const y = ["", "default", "none", "l"], c = [
|
|
|
508
616
|
"end",
|
|
509
617
|
"center",
|
|
510
618
|
"stretch"
|
|
511
|
-
],
|
|
619
|
+
], X = [
|
|
512
620
|
"",
|
|
513
621
|
"default",
|
|
514
622
|
"inherit",
|
|
@@ -524,7 +632,7 @@ const y = ["", "default", "none", "l"], c = [
|
|
|
524
632
|
"heading-l",
|
|
525
633
|
"heading-m",
|
|
526
634
|
"heading-s"
|
|
527
|
-
],
|
|
635
|
+
], F = [
|
|
528
636
|
"",
|
|
529
637
|
"default",
|
|
530
638
|
"inherit",
|
|
@@ -539,7 +647,7 @@ const y = ["", "default", "none", "l"], c = [
|
|
|
539
647
|
"state-hover",
|
|
540
648
|
"state-active",
|
|
541
649
|
"state-disabled"
|
|
542
|
-
],
|
|
650
|
+
], U = [
|
|
543
651
|
"",
|
|
544
652
|
"default",
|
|
545
653
|
"inherit",
|
|
@@ -547,11 +655,11 @@ const y = ["", "default", "none", "l"], c = [
|
|
|
547
655
|
"title",
|
|
548
656
|
"title-large",
|
|
549
657
|
"subtitle"
|
|
550
|
-
],
|
|
658
|
+
], G = ["Xs", "S", "M", "L", "Xl"], J = [
|
|
551
659
|
"",
|
|
552
660
|
"default",
|
|
553
|
-
...
|
|
554
|
-
],
|
|
661
|
+
...G.map((i) => i.toLowerCase())
|
|
662
|
+
], K = ["", "default", "left", "center", "right"], Q = [
|
|
555
663
|
"",
|
|
556
664
|
"none",
|
|
557
665
|
"3xs",
|
|
@@ -561,7 +669,7 @@ const y = ["", "default", "none", "l"], c = [
|
|
|
561
669
|
"m",
|
|
562
670
|
"l",
|
|
563
671
|
"xl"
|
|
564
|
-
],
|
|
672
|
+
], Y = ["", "none", "s", "m", "l"], Z = ["", "none", "main", "pill"], tt = [
|
|
565
673
|
"none",
|
|
566
674
|
"main",
|
|
567
675
|
"brand",
|
|
@@ -572,7 +680,7 @@ const y = ["", "default", "none", "l"], c = [
|
|
|
572
680
|
"purpose-warning",
|
|
573
681
|
"purpose-error",
|
|
574
682
|
"purpose-unlimited"
|
|
575
|
-
],
|
|
683
|
+
], et = [
|
|
576
684
|
"",
|
|
577
685
|
"all",
|
|
578
686
|
"top",
|
|
@@ -581,7 +689,7 @@ const y = ["", "default", "none", "l"], c = [
|
|
|
581
689
|
"left",
|
|
582
690
|
"block",
|
|
583
691
|
"inline"
|
|
584
|
-
],
|
|
692
|
+
], st = [
|
|
585
693
|
"",
|
|
586
694
|
"none",
|
|
587
695
|
"surface-light",
|
|
@@ -607,8 +715,9 @@ const y = ["", "default", "none", "l"], c = [
|
|
|
607
715
|
"purpose-promo",
|
|
608
716
|
"purpose-info",
|
|
609
717
|
"purpose-eco",
|
|
610
|
-
"purpose-notification"
|
|
611
|
-
|
|
718
|
+
"purpose-notification",
|
|
719
|
+
"footer-sitemap"
|
|
720
|
+
], it = ["", "cover", "contain", "default"], ot = ["", "none", "s", "m", "l", "xl"], rt = [
|
|
612
721
|
"",
|
|
613
722
|
"default",
|
|
614
723
|
"title-4xl",
|
|
@@ -619,7 +728,7 @@ const y = ["", "default", "none", "l"], c = [
|
|
|
619
728
|
"title-m",
|
|
620
729
|
"title-s",
|
|
621
730
|
"subtitle"
|
|
622
|
-
],
|
|
731
|
+
], at = [
|
|
623
732
|
"",
|
|
624
733
|
"purple-top-red",
|
|
625
734
|
"purple-top-magenta",
|
|
@@ -669,7 +778,7 @@ const y = ["", "default", "none", "l"], c = [
|
|
|
669
778
|
"color-bottom-right-blue",
|
|
670
779
|
"color-bottom-right-turquoise",
|
|
671
780
|
"color-bottom-right-green"
|
|
672
|
-
],
|
|
781
|
+
], lt = [
|
|
673
782
|
"none",
|
|
674
783
|
"2xs",
|
|
675
784
|
"xs",
|
|
@@ -679,14 +788,14 @@ const y = ["", "default", "none", "l"], c = [
|
|
|
679
788
|
"heading-to-subtitle",
|
|
680
789
|
"heading-to-content",
|
|
681
790
|
"page-layout-between-sections"
|
|
682
|
-
],
|
|
791
|
+
], nt = [
|
|
683
792
|
"",
|
|
684
793
|
"all",
|
|
685
794
|
"top",
|
|
686
795
|
"right",
|
|
687
796
|
"bottom",
|
|
688
797
|
"left"
|
|
689
|
-
],
|
|
798
|
+
], pt = [
|
|
690
799
|
"",
|
|
691
800
|
"default",
|
|
692
801
|
"xs",
|
|
@@ -695,117 +804,118 @@ const y = ["", "default", "none", "l"], c = [
|
|
|
695
804
|
"l",
|
|
696
805
|
"xl"
|
|
697
806
|
];
|
|
698
|
-
function
|
|
807
|
+
function ht(i) {
|
|
699
808
|
const t = document.createElement("style");
|
|
700
809
|
t.innerHTML = i, document.head.appendChild(t);
|
|
701
810
|
}
|
|
702
|
-
function
|
|
811
|
+
function ut(i) {
|
|
703
812
|
return typeof i == "string" && (i === "false" || i === "0" || i === "null") || typeof i == "boolean" && !i;
|
|
704
813
|
}
|
|
705
|
-
function
|
|
814
|
+
function bt() {
|
|
706
815
|
return window.matchMedia("only screen and (min-width: 768px)").matches ? "tablet" : window.matchMedia("only screen and (min-width: 1025px)").matches ? "laptop" : "mobile";
|
|
707
816
|
}
|
|
708
|
-
function
|
|
817
|
+
function dt(i, t) {
|
|
709
818
|
return i.includes(t);
|
|
710
819
|
}
|
|
711
|
-
|
|
820
|
+
const B = [
|
|
821
|
+
"aria-label",
|
|
822
|
+
"aria-labelledby",
|
|
823
|
+
"aria-describedby",
|
|
824
|
+
"aria-controls",
|
|
825
|
+
"aria-expanded",
|
|
826
|
+
"aria-haspopup",
|
|
827
|
+
"aria-pressed",
|
|
828
|
+
"aria-selected",
|
|
829
|
+
"aria-required",
|
|
830
|
+
"aria-disabled",
|
|
831
|
+
"aria-live",
|
|
832
|
+
"aria-atomic",
|
|
833
|
+
"aria-relevant",
|
|
834
|
+
"aria-orientation",
|
|
835
|
+
"aria-valuenow",
|
|
836
|
+
"aria-valuetext",
|
|
837
|
+
"aria-valuemin",
|
|
838
|
+
"aria-valuemax",
|
|
839
|
+
"aria-details",
|
|
840
|
+
"aria-modal",
|
|
841
|
+
"aria-autocomplete",
|
|
842
|
+
"aria-activedescendant",
|
|
843
|
+
"aria-colcount",
|
|
844
|
+
"aria-colindex",
|
|
845
|
+
"aria-colspan",
|
|
846
|
+
"aria-rowcount",
|
|
847
|
+
"aria-rowindex",
|
|
848
|
+
"aria-rowspan",
|
|
849
|
+
"aria-keyshortcuts",
|
|
850
|
+
"aria-placeholder",
|
|
851
|
+
"aria-invalid",
|
|
852
|
+
"aria-busy",
|
|
853
|
+
"aria-owns"
|
|
854
|
+
];
|
|
855
|
+
function ct(i, t, s = !1) {
|
|
712
856
|
var e;
|
|
713
|
-
if (
|
|
714
|
-
"aria-label",
|
|
715
|
-
"aria-labelledby",
|
|
716
|
-
"aria-describedby",
|
|
717
|
-
"aria-controls",
|
|
718
|
-
"aria-expanded",
|
|
719
|
-
"aria-haspopup",
|
|
720
|
-
"aria-pressed",
|
|
721
|
-
"aria-selected",
|
|
722
|
-
"aria-required",
|
|
723
|
-
"aria-disabled",
|
|
724
|
-
"aria-live",
|
|
725
|
-
"aria-atomic",
|
|
726
|
-
"aria-relevant",
|
|
727
|
-
"aria-orientation",
|
|
728
|
-
"aria-valuenow",
|
|
729
|
-
"aria-valuetext",
|
|
730
|
-
"aria-valuemin",
|
|
731
|
-
"aria-valuemax",
|
|
732
|
-
"aria-details",
|
|
733
|
-
"aria-modal",
|
|
734
|
-
"aria-autocomplete",
|
|
735
|
-
"aria-activedescendant",
|
|
736
|
-
"aria-colcount",
|
|
737
|
-
"aria-colindex",
|
|
738
|
-
"aria-colspan",
|
|
739
|
-
"aria-rowcount",
|
|
740
|
-
"aria-rowindex",
|
|
741
|
-
"aria-rowspan",
|
|
742
|
-
"aria-keyshortcuts",
|
|
743
|
-
"aria-placeholder",
|
|
744
|
-
"aria-invalid",
|
|
745
|
-
"aria-busy",
|
|
746
|
-
"aria-owns"
|
|
747
|
-
].forEach((o) => {
|
|
857
|
+
if (B.forEach((o) => {
|
|
748
858
|
i.getAttribute(o) && (t.setAttribute(o, i.getAttribute(o)), i.removeAttribute(o));
|
|
749
|
-
}), s) {
|
|
859
|
+
}), s && !i.getAttribute("aria-labelledby")) {
|
|
750
860
|
const o = `px-${((e = t.localName) == null ? void 0 : e.toLowerCase()) ?? "component"}-${Math.random().toString(36).substring(2, 15)}`;
|
|
751
861
|
t.setAttribute("id", o), i.setAttribute("aria-labelledby", o);
|
|
752
862
|
}
|
|
753
863
|
}
|
|
754
|
-
function
|
|
755
|
-
const
|
|
756
|
-
(
|
|
757
|
-
${t(
|
|
864
|
+
function gt(i, t, s, e = "", o, l = i) {
|
|
865
|
+
const b = new CSSStyleSheet(), f = s.reduce(
|
|
866
|
+
(j, r) => j + `
|
|
867
|
+
${t(l, r)} {
|
|
758
868
|
${i}: var(--${e}-${r}-desktop);
|
|
759
869
|
${o ? `${o}:var(--${e}-${r}-desktop)` : ""}
|
|
760
870
|
}
|
|
761
871
|
/* Mobile only - max 767px */
|
|
762
|
-
@media only screen and (max-width: 47.
|
|
763
|
-
${t(
|
|
872
|
+
@media only screen and (max-width: 47.938rem) {
|
|
873
|
+
${t(l, r)} {
|
|
764
874
|
${i}: var(--${e}-${r}-mobile);
|
|
765
875
|
${o ? `${o}: var(--${e}-${r}-mobile)` : ""}
|
|
766
876
|
}
|
|
767
877
|
}
|
|
768
|
-
${t(
|
|
878
|
+
${t(l, r, "mobile")} {
|
|
769
879
|
/* Mobile only - max 767px */
|
|
770
|
-
@media only screen and (max-width: 47.
|
|
880
|
+
@media only screen and (max-width: 47.938rem) {
|
|
771
881
|
${i}: var(--${e}-${r}-mobile) !important;
|
|
772
882
|
${o ? `${o}: var(--${e}-${r}-mobile)` : ""}
|
|
773
883
|
}
|
|
774
884
|
}
|
|
775
|
-
${t(
|
|
885
|
+
${t(l, r, "tablet")} {
|
|
776
886
|
/* Tablet - min 768px max 1024px */
|
|
777
|
-
@media only screen and (min-width:
|
|
887
|
+
@media only screen and (min-width: 48rem) and (max-width: 64rem) {
|
|
778
888
|
${i}: var(--${e}-${r}-desktop) !important;
|
|
779
889
|
${o ? `${o}: var(--${e}-${r}-desktop)` : ""}
|
|
780
890
|
}
|
|
781
891
|
}
|
|
782
|
-
${t(
|
|
892
|
+
${t(l, r, "laptop")} {
|
|
783
893
|
/* Laptop - 1025px*/
|
|
784
|
-
@media only screen and (min-width: 64.
|
|
894
|
+
@media only screen and (min-width: 64.0625rem) {
|
|
785
895
|
${i}: var(--${e}-${r}-desktop) !important;
|
|
786
896
|
${o ? `${o}: var(--${e}-${r}-desktop)` : ""}
|
|
787
897
|
}
|
|
788
898
|
}
|
|
789
|
-
${t(
|
|
899
|
+
${t(l, r, "desktop")} {
|
|
790
900
|
/* Desktop - 1025px*/
|
|
791
|
-
@media only screen and (min-width: 64.
|
|
901
|
+
@media only screen and (min-width: 64.0625rem) {
|
|
792
902
|
${i}: var(--${e}-${r}-desktop) !important;
|
|
793
903
|
${o ? `${o}: var(--${e}-${r}-desktop)` : ""}
|
|
794
904
|
}
|
|
795
905
|
}`,
|
|
796
906
|
""
|
|
797
907
|
);
|
|
798
|
-
return
|
|
908
|
+
return b.replaceSync(f), b;
|
|
799
909
|
}
|
|
800
|
-
class
|
|
910
|
+
class ft {
|
|
801
911
|
constructor(t, s, e, o) {
|
|
802
912
|
this.component = t, this.attributeName = s, this.cssVariable = o, 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(
|
|
803
913
|
this.component,
|
|
804
914
|
this.toCamelCase(this.attributeName),
|
|
805
915
|
{
|
|
806
916
|
get: () => this.component.getAttribute(this.attributeName),
|
|
807
|
-
set: (
|
|
808
|
-
this.component.setAttribute(this.attributeName,
|
|
917
|
+
set: (l) => {
|
|
918
|
+
this.component.setAttribute(this.attributeName, l);
|
|
809
919
|
}
|
|
810
920
|
}
|
|
811
921
|
);
|
|
@@ -864,12 +974,12 @@ class J {
|
|
|
864
974
|
o,
|
|
865
975
|
!1
|
|
866
976
|
);
|
|
867
|
-
const
|
|
977
|
+
const l = this.component.getAttribute(
|
|
868
978
|
this.attributeNameDesktop
|
|
869
979
|
);
|
|
870
|
-
|
|
980
|
+
l && this.setCSSProperty(
|
|
871
981
|
this.attributeNameDesktop,
|
|
872
|
-
|
|
982
|
+
l,
|
|
873
983
|
!1
|
|
874
984
|
);
|
|
875
985
|
}
|
|
@@ -878,41 +988,46 @@ class J {
|
|
|
878
988
|
}
|
|
879
989
|
}
|
|
880
990
|
export {
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
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
|
-
|
|
991
|
+
ft as AttributeBreakpointHandlerDelegate,
|
|
992
|
+
k as PxElement,
|
|
993
|
+
z as VerticallyExtendedElement,
|
|
994
|
+
y as WithExtraAttributes,
|
|
995
|
+
R as WrappedInteractiveStateController,
|
|
996
|
+
B as accessibilityAttributes,
|
|
997
|
+
ht as addGlobalStylesheet,
|
|
998
|
+
pt as assetContainerImgWidthValues,
|
|
999
|
+
st as backgroundColorValues,
|
|
1000
|
+
it as backgroundSizeValues,
|
|
1001
|
+
tt as borderColorValues,
|
|
1002
|
+
Z as borderRadiusValues,
|
|
1003
|
+
et as borderSideValues,
|
|
1004
|
+
Y as borderValues,
|
|
1005
|
+
ot as boxShadowValues,
|
|
1006
|
+
dt as checkName,
|
|
1007
|
+
F as colorValues,
|
|
1008
|
+
I as cssGridAlignSelfValues,
|
|
1009
|
+
q as cssGridColSpanValues,
|
|
1010
|
+
_ as cssGridJustifySelfValues,
|
|
1011
|
+
P as cssGridOrderValues,
|
|
1012
|
+
H as cssGridPlaceSelfValues,
|
|
1013
|
+
gt as cssTokenBreakpoints,
|
|
1014
|
+
O as flexboxAlignSelfValues,
|
|
1015
|
+
X as fontsizeValues,
|
|
1016
|
+
U as fontweightValues,
|
|
1017
|
+
lt as gapValues,
|
|
1018
|
+
M as getSupportedAttributeNames,
|
|
1019
|
+
N as getSupportedPropertyNames,
|
|
1020
|
+
bt as getViewportFormat,
|
|
1021
|
+
at as gradientValues,
|
|
1022
|
+
W as gridGapValues,
|
|
1023
|
+
rt as headingValues,
|
|
1024
|
+
G as iconSizeValues,
|
|
1025
|
+
J as iconSizeValuesKC,
|
|
1026
|
+
v as isComponentDebug,
|
|
1027
|
+
ut as isFalsy,
|
|
1028
|
+
T as log,
|
|
1029
|
+
nt as noBorderRadiusValues,
|
|
1030
|
+
Q as paddingValues,
|
|
1031
|
+
K as textalignValues,
|
|
1032
|
+
ct as transferAccessibilityAttributes
|
|
918
1033
|
};
|