@proximus/lavender-list 1.4.6-beta.2 → 1.4.6
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/List.d.ts +0 -1
- package/dist/ListItem.d.ts +0 -2
- package/dist/index.es.js +175 -209
- package/package.json +1 -1
package/dist/List.d.ts
CHANGED
package/dist/ListItem.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { PxElement } from '@proximus/lavender-common';
|
|
2
|
-
export declare const LIST_ITEM_CONNECTED_EVENT = "px-list-item-connected";
|
|
3
2
|
export declare class ListItem extends PxElement<HTMLDivElement> {
|
|
4
3
|
static nativeName: string;
|
|
5
4
|
private template;
|
|
6
5
|
constructor();
|
|
7
|
-
connectedCallback(): void;
|
|
8
6
|
static get observedAttributes(): string[];
|
|
9
7
|
attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
10
8
|
get $children(): NodeListOf<Element>;
|
package/dist/index.es.js
CHANGED
|
@@ -1,32 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var $ = (o, t, e) => t.has(o) ? w("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(o) : t.set(o, e);
|
|
6
|
-
var p = (o, t, e) => (M(o, t, "access private method"), e);
|
|
7
|
-
const D = ".list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}", E = ":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([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}}", O = {};
|
|
8
|
-
function N(o) {
|
|
9
|
-
const t = document.createElement(o), e = Object.getPrototypeOf(t);
|
|
10
|
-
return Object.getOwnPropertyNames(e);
|
|
1
|
+
const A = ".list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}", y = ":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}}", w = {};
|
|
2
|
+
function $(o) {
|
|
3
|
+
const t = document.createElement(o), s = Object.getPrototypeOf(t);
|
|
4
|
+
return Object.getOwnPropertyNames(s);
|
|
11
5
|
}
|
|
12
|
-
function
|
|
13
|
-
const t = document.createElement(o),
|
|
14
|
-
return Object.getOwnPropertyNames(
|
|
15
|
-
(
|
|
6
|
+
function x(o) {
|
|
7
|
+
const t = document.createElement(o), s = Object.getPrototypeOf(t);
|
|
8
|
+
return Object.getOwnPropertyNames(s).map(
|
|
9
|
+
(e) => e.toLowerCase()
|
|
16
10
|
);
|
|
17
11
|
}
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
const
|
|
12
|
+
const f = new CSSStyleSheet();
|
|
13
|
+
f.replaceSync(y);
|
|
14
|
+
const S = typeof import.meta < "u" && typeof w < "u" && !1;
|
|
21
15
|
typeof window < "u" && (window.isComponentDebug = m);
|
|
22
16
|
function m() {
|
|
23
|
-
return
|
|
24
|
-
}
|
|
25
|
-
function S(o) {
|
|
26
|
-
m() && console.error(o);
|
|
17
|
+
return S;
|
|
27
18
|
}
|
|
28
19
|
typeof window < "u" && (window.isComponentDebug = m);
|
|
29
|
-
class
|
|
20
|
+
class b extends HTMLElement {
|
|
30
21
|
static get observedAttributes() {
|
|
31
22
|
return [
|
|
32
23
|
"grow",
|
|
@@ -78,13 +69,13 @@ class v extends HTMLElement {
|
|
|
78
69
|
}
|
|
79
70
|
constructor(...t) {
|
|
80
71
|
super(), this.shadowRoot || this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets = [
|
|
81
|
-
|
|
72
|
+
f,
|
|
82
73
|
...t
|
|
83
74
|
];
|
|
84
75
|
}
|
|
85
|
-
attributeChangedCallback(t,
|
|
76
|
+
attributeChangedCallback(t, s, e) {
|
|
86
77
|
var i;
|
|
87
|
-
if (
|
|
78
|
+
if (b.observedAttributes.indexOf(t) !== -1)
|
|
88
79
|
switch (t) {
|
|
89
80
|
case "grow":
|
|
90
81
|
case "grow--mobile":
|
|
@@ -101,7 +92,7 @@ class v extends HTMLElement {
|
|
|
101
92
|
case "basis--tablet":
|
|
102
93
|
case "basis--laptop":
|
|
103
94
|
case "basis--desktop":
|
|
104
|
-
this.style.setProperty(`--${t}-value`,
|
|
95
|
+
this.style.setProperty(`--${t}-value`, e);
|
|
105
96
|
break;
|
|
106
97
|
case "align-self":
|
|
107
98
|
case "align-self--mobile":
|
|
@@ -110,9 +101,9 @@ class v extends HTMLElement {
|
|
|
110
101
|
case "align-self--desktop":
|
|
111
102
|
this.updateProperties(
|
|
112
103
|
t,
|
|
113
|
-
e,
|
|
114
104
|
s,
|
|
115
|
-
|
|
105
|
+
e,
|
|
106
|
+
((i = this.parentElement) == null ? void 0 : i.localName) === "px-grid" ? C : j
|
|
116
107
|
);
|
|
117
108
|
break;
|
|
118
109
|
case "justify-self":
|
|
@@ -122,9 +113,9 @@ class v extends HTMLElement {
|
|
|
122
113
|
case "justify-self--desktop":
|
|
123
114
|
this.updateProperties(
|
|
124
115
|
t,
|
|
125
|
-
e,
|
|
126
116
|
s,
|
|
127
|
-
|
|
117
|
+
e,
|
|
118
|
+
M
|
|
128
119
|
);
|
|
129
120
|
break;
|
|
130
121
|
case "col-span":
|
|
@@ -132,49 +123,47 @@ class v extends HTMLElement {
|
|
|
132
123
|
case "col-span--tablet":
|
|
133
124
|
case "col-span--laptop":
|
|
134
125
|
case "col-span--desktop":
|
|
135
|
-
this.updateProperties(t,
|
|
126
|
+
this.updateProperties(t, s, e, T);
|
|
136
127
|
break;
|
|
137
128
|
case "order":
|
|
138
129
|
case "order--mobile":
|
|
139
130
|
case "order--tablet":
|
|
140
131
|
case "order--laptop":
|
|
141
132
|
case "order--desktop":
|
|
142
|
-
this.updateProperties(t,
|
|
133
|
+
this.updateProperties(t, s, e, L);
|
|
143
134
|
break;
|
|
144
135
|
}
|
|
145
136
|
}
|
|
146
|
-
updateProperties(t,
|
|
147
|
-
i && (this.checkName(i,
|
|
148
|
-
|
|
149
|
-
));
|
|
150
|
-
const l = t.indexOf("--") > -1, n = l ? t.split("--")[0] : t;
|
|
137
|
+
updateProperties(t, s, e, i) {
|
|
138
|
+
i && (this.checkName(i, e) || (`${e}${i}${this.tagName.toLowerCase()}`, void 0));
|
|
139
|
+
const l = t.indexOf("--") > -1, a = l ? t.split("--")[0] : t;
|
|
151
140
|
if (!l)
|
|
152
141
|
this.style.setProperty(
|
|
153
|
-
`--${
|
|
154
|
-
e
|
|
155
|
-
), this.style.setProperty(
|
|
156
|
-
`--${n}-value`,
|
|
142
|
+
`--${a}-value`,
|
|
157
143
|
s
|
|
144
|
+
), this.style.setProperty(
|
|
145
|
+
`--${a}-value`,
|
|
146
|
+
e
|
|
158
147
|
);
|
|
159
148
|
else {
|
|
160
|
-
const
|
|
149
|
+
const n = t.split("--")[1];
|
|
161
150
|
this.style.setProperty(
|
|
162
|
-
`--${
|
|
163
|
-
e
|
|
164
|
-
), this.style.setProperty(
|
|
165
|
-
`--${n}--${h}-value`,
|
|
151
|
+
`--${a}--${n}-value`,
|
|
166
152
|
s
|
|
153
|
+
), this.style.setProperty(
|
|
154
|
+
`--${a}--${n}-value`,
|
|
155
|
+
e
|
|
167
156
|
);
|
|
168
157
|
}
|
|
169
158
|
}
|
|
170
|
-
updateStyle(t,
|
|
171
|
-
|
|
172
|
-
`--${t}--${
|
|
173
|
-
|
|
159
|
+
updateStyle(t, s, e) {
|
|
160
|
+
e !== null && e !== "" && e !== "default" && this.style.setProperty(
|
|
161
|
+
`--${t}--${s}-value`,
|
|
162
|
+
e
|
|
174
163
|
);
|
|
175
164
|
}
|
|
176
|
-
checkName(t,
|
|
177
|
-
return t.includes(
|
|
165
|
+
checkName(t, s) {
|
|
166
|
+
return t.includes(s);
|
|
178
167
|
}
|
|
179
168
|
get $el() {
|
|
180
169
|
return this;
|
|
@@ -431,55 +420,55 @@ class v extends HTMLElement {
|
|
|
431
420
|
this.setAttribute("order--desktop", t);
|
|
432
421
|
}
|
|
433
422
|
}
|
|
434
|
-
const
|
|
423
|
+
const u = class u extends b {
|
|
435
424
|
// nativeName: string;
|
|
436
425
|
static get observedAttributes() {
|
|
437
426
|
return [
|
|
438
427
|
...super.observedAttributes,
|
|
439
|
-
...
|
|
428
|
+
...x(this.nativeName)
|
|
440
429
|
];
|
|
441
430
|
}
|
|
442
|
-
attributeChangedCallback(t,
|
|
443
|
-
super.attributeChangedCallback(t,
|
|
431
|
+
attributeChangedCallback(t, s, e) {
|
|
432
|
+
super.attributeChangedCallback(t, s, e), e === null ? this.$el.toggleAttribute(t) : this.$el.setAttribute(t, e);
|
|
444
433
|
}
|
|
445
434
|
get ctor() {
|
|
446
435
|
return Object.getPrototypeOf(this).constructor;
|
|
447
436
|
}
|
|
448
437
|
constructor(...t) {
|
|
449
|
-
super(...t), this.ctor.supportedPropertyNames || (this.ctor.supportedPropertyNames =
|
|
438
|
+
super(...t), this.ctor.supportedPropertyNames || (this.ctor.supportedPropertyNames = $(
|
|
450
439
|
this.ctor.nativeName
|
|
451
440
|
)), this.enhanceWithNativeProperties();
|
|
452
441
|
}
|
|
453
442
|
enhanceWithNativeProperties() {
|
|
454
443
|
var t;
|
|
455
|
-
for (const
|
|
456
|
-
if (!(
|
|
444
|
+
for (const s of this.ctor.supportedPropertyNames)
|
|
445
|
+
if (!(s === "constructor" || (((t = this.ctor) == null ? void 0 : t.accessorExclusions) ?? []).includes(s)))
|
|
457
446
|
try {
|
|
458
|
-
Object.defineProperty(this,
|
|
447
|
+
Object.defineProperty(this, s, {
|
|
459
448
|
get() {
|
|
460
|
-
return this.$el[
|
|
449
|
+
return this.$el[s];
|
|
461
450
|
},
|
|
462
|
-
set(
|
|
463
|
-
this.$el[
|
|
451
|
+
set(e) {
|
|
452
|
+
this.$el[s] !== e && (this.$el[s] = e);
|
|
464
453
|
}
|
|
465
454
|
});
|
|
466
|
-
} catch (
|
|
467
|
-
console.warn(`Could not create property ${
|
|
455
|
+
} catch (e) {
|
|
456
|
+
console.warn(`Could not create property ${s} for`, this.$el, e);
|
|
468
457
|
}
|
|
469
458
|
}
|
|
470
459
|
get $el() {
|
|
471
460
|
return this.shadowRoot.querySelector(this.ctor.nativeName);
|
|
472
461
|
}
|
|
473
|
-
_updateAttribute(t,
|
|
474
|
-
|
|
462
|
+
_updateAttribute(t, s) {
|
|
463
|
+
s ? this.setAttribute(t, s) : this.removeAttribute(t);
|
|
475
464
|
}
|
|
476
|
-
_updateBooleanAttribute(t,
|
|
477
|
-
|
|
465
|
+
_updateBooleanAttribute(t, s) {
|
|
466
|
+
s ? this.setAttribute(t, "") : this.removeAttribute(t);
|
|
478
467
|
}
|
|
479
468
|
};
|
|
480
|
-
|
|
481
|
-
let
|
|
482
|
-
const
|
|
469
|
+
u.accessorExclusions = [];
|
|
470
|
+
let p = u;
|
|
471
|
+
const j = [
|
|
483
472
|
"",
|
|
484
473
|
"default",
|
|
485
474
|
"auto",
|
|
@@ -488,21 +477,21 @@ const G = [
|
|
|
488
477
|
"center",
|
|
489
478
|
"baseline",
|
|
490
479
|
"stretch"
|
|
491
|
-
],
|
|
480
|
+
], C = [
|
|
492
481
|
"",
|
|
493
482
|
"default",
|
|
494
483
|
"start",
|
|
495
484
|
"end",
|
|
496
485
|
"center",
|
|
497
486
|
"stretch"
|
|
498
|
-
],
|
|
487
|
+
], M = [
|
|
499
488
|
"",
|
|
500
489
|
"default",
|
|
501
490
|
"start",
|
|
502
491
|
"end",
|
|
503
492
|
"center",
|
|
504
493
|
"stretch"
|
|
505
|
-
],
|
|
494
|
+
], T = [
|
|
506
495
|
"",
|
|
507
496
|
"1",
|
|
508
497
|
"2",
|
|
@@ -516,7 +505,7 @@ const G = [
|
|
|
516
505
|
"10",
|
|
517
506
|
"11",
|
|
518
507
|
"12"
|
|
519
|
-
],
|
|
508
|
+
], L = [
|
|
520
509
|
"",
|
|
521
510
|
"-1",
|
|
522
511
|
"0",
|
|
@@ -532,11 +521,11 @@ const G = [
|
|
|
532
521
|
"10",
|
|
533
522
|
"11",
|
|
534
523
|
"12"
|
|
535
|
-
],
|
|
524
|
+
], D = ["Xs", "S", "M", "L", "Xl"];
|
|
536
525
|
[
|
|
537
|
-
...
|
|
526
|
+
...D.map((o) => o.toLowerCase())
|
|
538
527
|
];
|
|
539
|
-
const
|
|
528
|
+
const O = [
|
|
540
529
|
"none",
|
|
541
530
|
"2xs",
|
|
542
531
|
"xs",
|
|
@@ -547,117 +536,61 @@ const I = [
|
|
|
547
536
|
"heading-to-content",
|
|
548
537
|
"page-layout-between-sections"
|
|
549
538
|
];
|
|
550
|
-
function
|
|
551
|
-
const
|
|
552
|
-
(
|
|
553
|
-
${t(
|
|
554
|
-
${o}: var(--${
|
|
555
|
-
${`${i}:var(--${
|
|
539
|
+
function E(o, t, s, e = "", i) {
|
|
540
|
+
const l = new CSSStyleSheet(), a = s.reduce(
|
|
541
|
+
(n, r) => n + `
|
|
542
|
+
${t(o, r)} {
|
|
543
|
+
${o}: var(--${e}-${r}-desktop);
|
|
544
|
+
${`${i}:var(--${e}-${r}-desktop)`}
|
|
556
545
|
}
|
|
557
546
|
/* Mobile only - max 767px */
|
|
558
547
|
@media only screen and (max-width: 47.938em) {
|
|
559
|
-
${t(
|
|
560
|
-
${o}: var(--${
|
|
561
|
-
${`${i}: var(--${
|
|
548
|
+
${t(o, r)} {
|
|
549
|
+
${o}: var(--${e}-${r}-mobile);
|
|
550
|
+
${`${i}: var(--${e}-${r}-mobile)`}
|
|
562
551
|
}
|
|
563
552
|
}
|
|
564
|
-
${t(
|
|
553
|
+
${t(o, r, "mobile")} {
|
|
565
554
|
/* Mobile only - max 767px */
|
|
566
555
|
@media only screen and (max-width: 47.938em) {
|
|
567
|
-
${o}: var(--${
|
|
568
|
-
${`${i}: var(--${
|
|
556
|
+
${o}: var(--${e}-${r}-mobile) !important;
|
|
557
|
+
${`${i}: var(--${e}-${r}-mobile)`}
|
|
569
558
|
}
|
|
570
559
|
}
|
|
571
|
-
${t(
|
|
560
|
+
${t(o, r, "tablet")} {
|
|
572
561
|
/* Tablet - min 768px max 1024px */
|
|
573
562
|
@media only screen and (min-width: 48em) and (max-width: 64em) {
|
|
574
|
-
${o}: var(--${
|
|
575
|
-
${`${i}: var(--${
|
|
563
|
+
${o}: var(--${e}-${r}-desktop) !important;
|
|
564
|
+
${`${i}: var(--${e}-${r}-desktop)`}
|
|
576
565
|
}
|
|
577
566
|
}
|
|
578
|
-
${t(
|
|
567
|
+
${t(o, r, "laptop")} {
|
|
579
568
|
/* Laptop - 1025px*/
|
|
580
569
|
@media only screen and (min-width: 64.0625em) {
|
|
581
|
-
${o}: var(--${
|
|
582
|
-
${`${i}: var(--${
|
|
570
|
+
${o}: var(--${e}-${r}-desktop) !important;
|
|
571
|
+
${`${i}: var(--${e}-${r}-desktop)`}
|
|
583
572
|
}
|
|
584
573
|
}
|
|
585
|
-
${t(
|
|
574
|
+
${t(o, r, "desktop")} {
|
|
586
575
|
/* Desktop - 1025px*/
|
|
587
576
|
@media only screen and (min-width: 64.0625em) {
|
|
588
|
-
${o}: var(--${
|
|
589
|
-
${`${i}: var(--${
|
|
577
|
+
${o}: var(--${e}-${r}-desktop) !important;
|
|
578
|
+
${`${i}: var(--${e}-${r}-desktop)`}
|
|
590
579
|
}
|
|
591
580
|
}`,
|
|
592
581
|
""
|
|
593
582
|
);
|
|
594
|
-
return
|
|
583
|
+
return l.replaceSync(a), l;
|
|
595
584
|
}
|
|
596
|
-
const
|
|
597
|
-
|
|
598
|
-
const
|
|
599
|
-
template() {
|
|
600
|
-
return `
|
|
601
|
-
<div class="list-item" role="listitem">
|
|
602
|
-
<slot name="icon"></slot>
|
|
603
|
-
<slot name="label"></slot>
|
|
604
|
-
</div>
|
|
605
|
-
`;
|
|
606
|
-
}
|
|
607
|
-
constructor() {
|
|
608
|
-
super(j), this.shadowRoot.innerHTML = this.template();
|
|
609
|
-
}
|
|
610
|
-
connectedCallback() {
|
|
611
|
-
this.dispatchEvent(
|
|
612
|
-
new CustomEvent(C, {
|
|
613
|
-
bubbles: !0,
|
|
614
|
-
composed: !0
|
|
615
|
-
})
|
|
616
|
-
);
|
|
617
|
-
}
|
|
618
|
-
static get observedAttributes() {
|
|
619
|
-
return ["inverted"];
|
|
620
|
-
}
|
|
621
|
-
// TODO: factorize code
|
|
622
|
-
attributeChangedCallback(t, e, s) {
|
|
623
|
-
if (e !== s)
|
|
624
|
-
switch (t) {
|
|
625
|
-
case "inverted":
|
|
626
|
-
for (let i = 0; i < this.$children.length; i++)
|
|
627
|
-
this.$children[i].hasAttribute("inverted") || this.$children[i].toggleAttribute("inverted");
|
|
628
|
-
this.$el.toggleAttribute("inverted", s !== null);
|
|
629
|
-
break;
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
get $children() {
|
|
633
|
-
return this.querySelectorAll("px-list-item > *");
|
|
634
|
-
}
|
|
635
|
-
get inverted() {
|
|
636
|
-
return this.hasAttribute("inverted");
|
|
637
|
-
}
|
|
638
|
-
set inverted(t) {
|
|
639
|
-
t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
640
|
-
}
|
|
641
|
-
};
|
|
642
|
-
A.nativeName = "div";
|
|
643
|
-
let b = A;
|
|
644
|
-
customElements.get("px-list-item") || customElements.define("px-list-item", b);
|
|
645
|
-
const T = new CSSStyleSheet();
|
|
646
|
-
T.replaceSync(D);
|
|
647
|
-
const J = ["", "ul", "ol"], U = (o, t, e) => `:host([${o}${e ? `--${e}` : ""}='${t}']) .list`, F = "px-spacing", K = W(
|
|
585
|
+
const v = new CSSStyleSheet();
|
|
586
|
+
v.replaceSync(A);
|
|
587
|
+
const N = ["", "ul", "ol"], _ = (o, t, s) => `:host([${o}${s ? `--${s}` : ""}='${t}']) .list`, B = "px-spacing", G = E(
|
|
648
588
|
"gap",
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
589
|
+
_,
|
|
590
|
+
O,
|
|
591
|
+
B,
|
|
652
592
|
"--list-gap"
|
|
653
|
-
)
|
|
654
|
-
var a, g, c, f;
|
|
655
|
-
const y = class y extends d {
|
|
656
|
-
constructor() {
|
|
657
|
-
super(T, K);
|
|
658
|
-
$(this, a);
|
|
659
|
-
this.shadowRoot.innerHTML = this.template();
|
|
660
|
-
}
|
|
593
|
+
), g = class g extends p {
|
|
661
594
|
template() {
|
|
662
595
|
return `
|
|
663
596
|
<div class="list" role="list">
|
|
@@ -665,27 +598,33 @@ const y = class y extends d {
|
|
|
665
598
|
</div>
|
|
666
599
|
`;
|
|
667
600
|
}
|
|
601
|
+
constructor() {
|
|
602
|
+
super(v, G), this.shadowRoot.innerHTML = this.template();
|
|
603
|
+
}
|
|
668
604
|
static get observedAttributes() {
|
|
669
605
|
return ["inverted", "variant"];
|
|
670
606
|
}
|
|
671
607
|
connectedCallback() {
|
|
672
|
-
this.gap || (this.gap = "xs")
|
|
673
|
-
p(this, a, g).call(this);
|
|
674
|
-
}), p(this, a, g).call(this);
|
|
608
|
+
this.gap || (this.gap = "xs");
|
|
675
609
|
}
|
|
676
|
-
attributeChangedCallback(
|
|
677
|
-
if (s !==
|
|
678
|
-
switch (
|
|
610
|
+
attributeChangedCallback(t, s, e) {
|
|
611
|
+
if (s !== e)
|
|
612
|
+
switch (t) {
|
|
679
613
|
case "inverted":
|
|
680
|
-
|
|
614
|
+
for (let i = 0; i < this.$children.length; i++)
|
|
615
|
+
this.$children[i].hasAttribute("inverted") || this.$children[i].toggleAttribute("inverted");
|
|
616
|
+
this.$el.toggleAttribute("inverted", e !== null);
|
|
681
617
|
break;
|
|
682
618
|
case "variant":
|
|
683
|
-
this.checkName(
|
|
684
|
-
|
|
685
|
-
|
|
619
|
+
this.checkName(N, e) || (`${e}${this.tagName.toLowerCase()}`, void 0);
|
|
620
|
+
for (let i = 0; i < this.$children.length; i++) {
|
|
621
|
+
const l = this.$children[i];
|
|
622
|
+
e !== null ? (l.setAttribute("variant", e), e === "ol" ? l.style.setProperty("--item-index", String(i + 1)) : l.style.removeProperty("--item-index")) : (l.removeAttribute("variant"), l.style.removeProperty("--item-index"));
|
|
623
|
+
}
|
|
624
|
+
super.attributeChangedCallback(t, s, e);
|
|
686
625
|
break;
|
|
687
626
|
default:
|
|
688
|
-
super.attributeChangedCallback(
|
|
627
|
+
super.attributeChangedCallback(t, s, e);
|
|
689
628
|
break;
|
|
690
629
|
}
|
|
691
630
|
}
|
|
@@ -695,65 +634,92 @@ const y = class y extends d {
|
|
|
695
634
|
get inverted() {
|
|
696
635
|
return this.hasAttribute("inverted");
|
|
697
636
|
}
|
|
698
|
-
set inverted(
|
|
699
|
-
|
|
637
|
+
set inverted(t) {
|
|
638
|
+
t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
700
639
|
}
|
|
701
640
|
get gap() {
|
|
702
641
|
return this.getAttribute("gap");
|
|
703
642
|
}
|
|
704
|
-
set gap(
|
|
705
|
-
|
|
643
|
+
set gap(t) {
|
|
644
|
+
t ? this.setAttribute("gap", t) : this.removeAttribute("gap");
|
|
706
645
|
}
|
|
707
646
|
get gapMobile() {
|
|
708
647
|
return this.getAttribute("gap--mobile");
|
|
709
648
|
}
|
|
710
|
-
set gapMobile(
|
|
711
|
-
|
|
649
|
+
set gapMobile(t) {
|
|
650
|
+
t ? this.setAttribute("gap--mobile", t) : this.removeAttribute("gap--mobile");
|
|
712
651
|
}
|
|
713
652
|
get gapTablet() {
|
|
714
653
|
return this.getAttribute("gap--tablet");
|
|
715
654
|
}
|
|
716
|
-
set gapTablet(
|
|
717
|
-
|
|
655
|
+
set gapTablet(t) {
|
|
656
|
+
t ? this.setAttribute("gap--tablet", t) : this.removeAttribute("gap--tablet");
|
|
718
657
|
}
|
|
719
658
|
get gapLaptop() {
|
|
720
659
|
return this.getAttribute("gap--laptop");
|
|
721
660
|
}
|
|
722
|
-
set gapLaptop(
|
|
723
|
-
|
|
661
|
+
set gapLaptop(t) {
|
|
662
|
+
t ? this.setAttribute("gap--laptop", t) : this.removeAttribute("gap--laptop");
|
|
724
663
|
}
|
|
725
664
|
get gapDesktop() {
|
|
726
665
|
return this.getAttribute("gap--desktop");
|
|
727
666
|
}
|
|
728
|
-
set gapDesktop(
|
|
729
|
-
|
|
667
|
+
set gapDesktop(t) {
|
|
668
|
+
t ? this.setAttribute("gap--desktop", t) : this.removeAttribute("gap--desktop");
|
|
730
669
|
}
|
|
731
670
|
get variant() {
|
|
732
671
|
return this.getAttribute("variant");
|
|
733
672
|
}
|
|
734
|
-
set variant(
|
|
735
|
-
|
|
673
|
+
set variant(t) {
|
|
674
|
+
t ? this.setAttribute("variant", t) : this.removeAttribute("variant");
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
g.nativeName = "div";
|
|
678
|
+
let h = g;
|
|
679
|
+
customElements.get("px-list") || customElements.define("px-list", h);
|
|
680
|
+
const R = '.list-item{display:flex;gap:var(--px-spacing-xs-mobile);align-items:flex-start;font-family:var(--px-font-family);line-height:var(--px-line-height-ratio-l);color:var(--px-color-text-neutral-default)}.list-item[inverted]{color:var(--px-color-text-neutral-inverted)}:host([variant="ul"]) .list-item,:host([variant="ol"]) .list-item{display:list-item;margin-left:var(--px-spacing-default-mobile)}: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 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)}}', k = new CSSStyleSheet();
|
|
681
|
+
k.replaceSync(R);
|
|
682
|
+
const c = class c extends p {
|
|
683
|
+
template() {
|
|
684
|
+
return `
|
|
685
|
+
<div class="list-item" role="listitem">
|
|
686
|
+
<slot name="icon"></slot>
|
|
687
|
+
<slot name="label"></slot>
|
|
688
|
+
</div>
|
|
689
|
+
`;
|
|
690
|
+
}
|
|
691
|
+
constructor() {
|
|
692
|
+
super(k), this.shadowRoot.innerHTML = this.template();
|
|
693
|
+
}
|
|
694
|
+
static get observedAttributes() {
|
|
695
|
+
return ["inverted"];
|
|
696
|
+
}
|
|
697
|
+
// TODO: factorize code
|
|
698
|
+
attributeChangedCallback(t, s, e) {
|
|
699
|
+
if (s !== e)
|
|
700
|
+
switch (t) {
|
|
701
|
+
case "inverted":
|
|
702
|
+
for (let i = 0; i < this.$children.length; i++)
|
|
703
|
+
this.$children[i].hasAttribute("inverted") || this.$children[i].toggleAttribute("inverted");
|
|
704
|
+
this.$el.toggleAttribute("inverted", e !== null);
|
|
705
|
+
break;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
get $children() {
|
|
709
|
+
return this.querySelectorAll("px-list-item > *");
|
|
710
|
+
}
|
|
711
|
+
get inverted() {
|
|
712
|
+
return this.hasAttribute("inverted");
|
|
713
|
+
}
|
|
714
|
+
set inverted(t) {
|
|
715
|
+
t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
736
716
|
}
|
|
737
717
|
};
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
var s;
|
|
742
|
-
const e = this.hasAttribute("inverted");
|
|
743
|
-
for (let i = 0; i < this.$children.length; i++)
|
|
744
|
-
this.$children[i].toggleAttribute("inverted", e);
|
|
745
|
-
(s = this.$el) == null || s.toggleAttribute("inverted", e);
|
|
746
|
-
}, f = function(e) {
|
|
747
|
-
for (let s = 0; s < this.$children.length; s++) {
|
|
748
|
-
const i = this.$children[s];
|
|
749
|
-
e !== null ? (i.setAttribute("variant", e), e === "ol" ? i.style.setProperty("--item-index", String(s + 1)) : i.style.removeProperty("--item-index")) : (i.removeAttribute("variant"), i.style.removeProperty("--item-index"));
|
|
750
|
-
}
|
|
751
|
-
}, y.nativeName = "div";
|
|
752
|
-
let u = y;
|
|
753
|
-
customElements.get("px-list") || customElements.define("px-list", u);
|
|
718
|
+
c.nativeName = "div";
|
|
719
|
+
let d = c;
|
|
720
|
+
customElements.get("px-list-item") || customElements.define("px-list-item", d);
|
|
754
721
|
export {
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
J as listVariantValues
|
|
722
|
+
h as List,
|
|
723
|
+
d as ListItem,
|
|
724
|
+
N as listVariantValues
|
|
759
725
|
};
|