@proximus/lavender-banner 1.0.0-alpha.7 → 1.0.0-beta.0
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/Banner.d.ts +37 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +186 -0
- package/package.json +9 -33
- package/dist/index.js +0 -186
package/dist/Banner.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Container } from '@proximus/lavender-container';
|
|
2
|
+
import { PxElement } from '@proximus/lavender-common';
|
|
3
|
+
export declare class Banner extends PxElement<HTMLDivElement> {
|
|
4
|
+
static nativeName: string;
|
|
5
|
+
private template;
|
|
6
|
+
constructor();
|
|
7
|
+
static get observedAttributes(): string[];
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
10
|
+
createGridTemplateAreas(): void;
|
|
11
|
+
get $container(): Container;
|
|
12
|
+
get $children(): NodeListOf<Element>;
|
|
13
|
+
get backgroundColor(): string;
|
|
14
|
+
set backgroundColor(value: string);
|
|
15
|
+
get gradient(): string;
|
|
16
|
+
set gradient(value: string);
|
|
17
|
+
get backgroundImage(): string;
|
|
18
|
+
set backgroundImage(value: string);
|
|
19
|
+
get backgroundImageMobile(): string;
|
|
20
|
+
set backgroundImageMobile(value: string);
|
|
21
|
+
get backgroundImageTablet(): string;
|
|
22
|
+
set backgroundImageTablet(value: string);
|
|
23
|
+
get backgroundImageLaptop(): string;
|
|
24
|
+
set backgroundImageLaptop(value: string);
|
|
25
|
+
get backgroundSize(): string;
|
|
26
|
+
set backgroundSize(value: string);
|
|
27
|
+
get backgroundPosition(): string;
|
|
28
|
+
set backgroundPosition(value: string);
|
|
29
|
+
get gradientContrastHelper(): boolean;
|
|
30
|
+
set gradientContrastHelper(value: boolean);
|
|
31
|
+
get overlayContrastHelper(): boolean;
|
|
32
|
+
set overlayContrastHelper(value: boolean);
|
|
33
|
+
get inverted(): boolean;
|
|
34
|
+
set inverted(value: boolean);
|
|
35
|
+
get reduced(): boolean;
|
|
36
|
+
set reduced(value: boolean);
|
|
37
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Banner';
|
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { PxElement as d, backgroundSizeValues as c, gradientValues as g, backgroundColorValues as l } from "@proximus/lavender-common";
|
|
2
|
+
const b = ':host{position:relative}:host,:host>*{display:block;box-sizing:border-box}.banner{position:relative;min-height:8em}.banner[reduced]{min-height:5em}px-container{height:100%}.banner-content{display:grid;grid-template-columns:1fr;grid-template-rows:minmax(0,auto);row-gap:var(--px-spacing-s-mobile);z-index:2;position:relative}[reduced] .banner-content{grid-template-columns:min-content minmax(0,1fr);column-gap:var(--px-spacing-default-mobile)}::slotted([slot="tag"]){grid-area:tag}::slotted([slot="media"]){grid-area:media;align-self:start}::slotted([slot="title"]){grid-area:title}::slotted([slot="description"]){grid-area:description}::slotted([slot="content"]){grid-area:content}:host(:not([reduced])) ::slotted([slot="action"]){grid-area:action;margin-top:calc(var(--px-spacing-default-mobile) - var(--px-spacing-s-mobile))}.contrast-helper{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:none;display:none;border-radius:var(--px-radius-main)}[contrast-helper-gradient] .contrast-helper{display:block;background-image:linear-gradient(90deg,#fff 23.43%,#fff0 81.69%)}[inverted] :is([contrast-helper-gradient] .contrast-helper){background-image:linear-gradient(90deg,#000 23.43%,#0000 81.69%)}[contrast-helper-overlay] .contrast-helper{display:block;background-color:#ffffffb3}[inverted] :is([contrast-helper-overlay] .contrast-helper){background-color:#0006}@media only screen and (min-width: 48em){.banner-content{row-gap:var(--px-spacing-s-desktop)}[reduced] .banner-content{column-gap:var(--px-spacing-default-desktop)}.banner-content :host(:not([reduced])) ::slotted([slot="action"]){margin-top:calc(var(--px-spacing-default-desktop) - var(--px-spacing-s-desktop))}}@media only screen and (min-width: 64.0625em){.banner-content{row-gap:var(--px-spacing-s-desktop)}[reduced] .banner-content{column-gap:var(--px-spacing-default-desktop)}.banner-content :host(:not([reduced])) ::slotted([slot="action"]){margin-top:calc(var(--px-spacing-default-desktop) - var(--px-spacing-s-desktop))}}', s = new CSSStyleSheet();
|
|
3
|
+
s.replaceSync(b);
|
|
4
|
+
const o = class o extends d {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(s), this.template = () => `<div class="banner">
|
|
7
|
+
<div class="contrast-helper"></div>
|
|
8
|
+
<px-container padding="${this.reduced ? "m" : "l"}" padding--mobile="m" border-radius="main" >
|
|
9
|
+
<div class="banner-content">
|
|
10
|
+
<slot name="tag"></slot>
|
|
11
|
+
<slot name="media"></slot>
|
|
12
|
+
<slot name="title"></slot>
|
|
13
|
+
<slot name="description"></slot>
|
|
14
|
+
<slot name="content"></slot>
|
|
15
|
+
<slot name="action"></slot>
|
|
16
|
+
</div>
|
|
17
|
+
</px-container>
|
|
18
|
+
</div>`, this.shadowRoot.innerHTML = this.template();
|
|
19
|
+
}
|
|
20
|
+
static get observedAttributes() {
|
|
21
|
+
return [
|
|
22
|
+
"background-color",
|
|
23
|
+
"background-gradient",
|
|
24
|
+
"background-image",
|
|
25
|
+
"background-image--mobile",
|
|
26
|
+
"background-image--tablet",
|
|
27
|
+
"background-image--laptop",
|
|
28
|
+
"background-size",
|
|
29
|
+
"background-position",
|
|
30
|
+
"contrast-helper-gradient",
|
|
31
|
+
"contrast-helper-overlay",
|
|
32
|
+
"reduced",
|
|
33
|
+
"inverted"
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
connectedCallback() {
|
|
37
|
+
var t;
|
|
38
|
+
(t = super.connectedCallback) == null || t.call(this), this.createGridTemplateAreas();
|
|
39
|
+
}
|
|
40
|
+
attributeChangedCallback(t, a, e) {
|
|
41
|
+
if (a !== e)
|
|
42
|
+
switch (t) {
|
|
43
|
+
case "background-color":
|
|
44
|
+
this.$container.backgroundColor = l.indexOf(e) > 0 ? e : "none";
|
|
45
|
+
break;
|
|
46
|
+
case "background-gradient":
|
|
47
|
+
this.$container.gradient = g.indexOf(e) > 0 ? e : "none";
|
|
48
|
+
break;
|
|
49
|
+
case "background-image":
|
|
50
|
+
this.$container.backgroundImage = e;
|
|
51
|
+
break;
|
|
52
|
+
case "background-image--mobile":
|
|
53
|
+
this.$container.backgroundImageMobile = e;
|
|
54
|
+
break;
|
|
55
|
+
case "background-image--tablet":
|
|
56
|
+
this.$container.backgroundImageTablet = e;
|
|
57
|
+
break;
|
|
58
|
+
case "background-image--laptop":
|
|
59
|
+
this.$container.backgroundImageLaptop = e;
|
|
60
|
+
break;
|
|
61
|
+
case "background-size":
|
|
62
|
+
this.$container.backgroundSize = c.indexOf(e) > 0 ? e : "";
|
|
63
|
+
break;
|
|
64
|
+
case "background-position":
|
|
65
|
+
this.$container.backgroundPosition = e;
|
|
66
|
+
break;
|
|
67
|
+
case "reduced":
|
|
68
|
+
this.$el.toggleAttribute("reduced", e !== null), this.createGridTemplateAreas();
|
|
69
|
+
break;
|
|
70
|
+
case "inverted":
|
|
71
|
+
for (let r = 0; r < this.$children.length; r++)
|
|
72
|
+
this.$children[r].hasAttribute("inverted") || this.$children[r].toggleAttribute("inverted");
|
|
73
|
+
this.$el.toggleAttribute("inverted", e !== null);
|
|
74
|
+
break;
|
|
75
|
+
default:
|
|
76
|
+
super.attributeChangedCallback(t, a, e);
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
createGridTemplateAreas() {
|
|
81
|
+
const t = this.shadowRoot.querySelector(
|
|
82
|
+
".banner-content"
|
|
83
|
+
), a = ["tag", "media", "title", "description", "content", "action"];
|
|
84
|
+
let e = "";
|
|
85
|
+
this.reduced ? a.forEach((r) => {
|
|
86
|
+
const n = this.shadowRoot.querySelector(
|
|
87
|
+
`slot[name="${r}"]`
|
|
88
|
+
);
|
|
89
|
+
if (n && n.assignedElements().length > 0) {
|
|
90
|
+
if (r === "media") return;
|
|
91
|
+
e += `'media ${r}'
|
|
92
|
+
`;
|
|
93
|
+
}
|
|
94
|
+
}) : a.forEach((r) => {
|
|
95
|
+
const n = this.shadowRoot.querySelector(
|
|
96
|
+
`slot[name="${r}"]`
|
|
97
|
+
);
|
|
98
|
+
n && n.assignedElements().length > 0 && (e += `'${r}'
|
|
99
|
+
`);
|
|
100
|
+
}), e || (e = "'content'"), t.style.gridTemplateAreas = e;
|
|
101
|
+
}
|
|
102
|
+
get $container() {
|
|
103
|
+
return this.shadowRoot.querySelector("px-container");
|
|
104
|
+
}
|
|
105
|
+
get $children() {
|
|
106
|
+
return this.querySelectorAll("px-banner > *");
|
|
107
|
+
}
|
|
108
|
+
get backgroundColor() {
|
|
109
|
+
return this.getAttribute("background-color");
|
|
110
|
+
}
|
|
111
|
+
set backgroundColor(t) {
|
|
112
|
+
this.setAttribute("background-color", t);
|
|
113
|
+
}
|
|
114
|
+
get gradient() {
|
|
115
|
+
return this.getAttribute("background-gradient");
|
|
116
|
+
}
|
|
117
|
+
set gradient(t) {
|
|
118
|
+
this.setAttribute("background-gradient", t);
|
|
119
|
+
}
|
|
120
|
+
get backgroundImage() {
|
|
121
|
+
return this.getAttribute("background-image");
|
|
122
|
+
}
|
|
123
|
+
set backgroundImage(t) {
|
|
124
|
+
this.setAttribute("background-image", t);
|
|
125
|
+
}
|
|
126
|
+
get backgroundImageMobile() {
|
|
127
|
+
return this.getAttribute("background-image--mobile");
|
|
128
|
+
}
|
|
129
|
+
set backgroundImageMobile(t) {
|
|
130
|
+
this.setAttribute("background-image--mobile", t);
|
|
131
|
+
}
|
|
132
|
+
get backgroundImageTablet() {
|
|
133
|
+
return this.getAttribute("background-image--tablet");
|
|
134
|
+
}
|
|
135
|
+
set backgroundImageTablet(t) {
|
|
136
|
+
this.setAttribute("background-image--tablet", t);
|
|
137
|
+
}
|
|
138
|
+
get backgroundImageLaptop() {
|
|
139
|
+
return this.getAttribute("background-image--laptop");
|
|
140
|
+
}
|
|
141
|
+
set backgroundImageLaptop(t) {
|
|
142
|
+
this.setAttribute("background-image--laptop", t);
|
|
143
|
+
}
|
|
144
|
+
get backgroundSize() {
|
|
145
|
+
return this.getAttribute("background-size");
|
|
146
|
+
}
|
|
147
|
+
set backgroundSize(t) {
|
|
148
|
+
this.setAttribute("background-size", t);
|
|
149
|
+
}
|
|
150
|
+
get backgroundPosition() {
|
|
151
|
+
return this.getAttribute("background-position");
|
|
152
|
+
}
|
|
153
|
+
set backgroundPosition(t) {
|
|
154
|
+
this.setAttribute("background-position", t);
|
|
155
|
+
}
|
|
156
|
+
get gradientContrastHelper() {
|
|
157
|
+
return this.hasAttribute("contrast-helper-gradient");
|
|
158
|
+
}
|
|
159
|
+
set gradientContrastHelper(t) {
|
|
160
|
+
t ? this.setAttribute("contrast-helper-gradient", "") : this.removeAttribute("contrast-helper-gradient");
|
|
161
|
+
}
|
|
162
|
+
get overlayContrastHelper() {
|
|
163
|
+
return this.hasAttribute("contrast-helper-overlay");
|
|
164
|
+
}
|
|
165
|
+
set overlayContrastHelper(t) {
|
|
166
|
+
t ? this.setAttribute("contrast-helper-overlay", "") : this.removeAttribute("contrast-helper-overlay");
|
|
167
|
+
}
|
|
168
|
+
get inverted() {
|
|
169
|
+
return this.hasAttribute("inverted");
|
|
170
|
+
}
|
|
171
|
+
set inverted(t) {
|
|
172
|
+
t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
173
|
+
}
|
|
174
|
+
get reduced() {
|
|
175
|
+
return this.hasAttribute("reduced");
|
|
176
|
+
}
|
|
177
|
+
set reduced(t) {
|
|
178
|
+
t ? this.setAttribute("reduced", "") : this.removeAttribute("reduced");
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
o.nativeName = "div";
|
|
182
|
+
let i = o;
|
|
183
|
+
customElements.get("px-banner") || customElements.define("px-banner", i);
|
|
184
|
+
export {
|
|
185
|
+
i as Banner
|
|
186
|
+
};
|
package/package.json
CHANGED
|
@@ -1,46 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-banner",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-beta.0",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"exports": {
|
|
7
|
-
".": {
|
|
8
|
-
"types": "./src/index.ts",
|
|
9
|
-
"development": "./src/index.ts",
|
|
10
|
-
"default": "./dist/index.js"
|
|
11
|
-
},
|
|
12
|
-
"./src/*.css": {
|
|
13
|
-
"development": "src/*.css"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
5
|
"files": [
|
|
17
6
|
"dist"
|
|
18
7
|
],
|
|
19
8
|
"type": "module",
|
|
20
9
|
"scripts": {
|
|
21
|
-
"
|
|
22
|
-
"
|
|
10
|
+
"transform-package-json": "node ../../../scripts/tranformPackageJson.js package.json dist/far/away",
|
|
11
|
+
"clean": "rm -rf dist",
|
|
12
|
+
"build": "npm run clean && NODE_ENV=development vite build && tsc && npm run transform-package-json && npm run wc-manifest",
|
|
13
|
+
"test": "vitest run --coverage",
|
|
14
|
+
"wc-manifest": "cem analyze --globs \"src/*\" --config ../custom-elements-manifest.config.js --outdir dist"
|
|
23
15
|
},
|
|
24
16
|
"publishConfig": {
|
|
25
17
|
"access": "public"
|
|
26
18
|
},
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"assets": [
|
|
31
|
-
"CHANGELOG.md",
|
|
32
|
-
"package.json",
|
|
33
|
-
"dist/*.js",
|
|
34
|
-
"dist/*.cjs",
|
|
35
|
-
"dist/css/**/*.css",
|
|
36
|
-
"dist/js/**/*.js",
|
|
37
|
-
"dist/*.svg",
|
|
38
|
-
"dist/*.ttf",
|
|
39
|
-
"dist/glyphmap.json",
|
|
40
|
-
"dist/*.d.ts"
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"gitHead": "632aad11570412a005e2ec7417eab5be24bc207e"
|
|
19
|
+
"customElements": "dist/custom-elements.json",
|
|
20
|
+
"web-types": "./dist/web-types.json",
|
|
21
|
+
"main": "dist/index.es.js"
|
|
46
22
|
}
|
package/dist/index.js
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import { PxElement as d, backgroundSizeValues as c, gradientValues as l, backgroundColorValues as g } from "@proximus/lavender-common";
|
|
2
|
-
const b = ':host{position:relative}:host,:host>*{display:block;box-sizing:border-box}.banner{position:relative;min-height:8em}.banner[reduced]{min-height:5em}px-container{height:100%}.banner-content{display:grid;grid-template-columns:1fr;grid-template-rows:minmax(0,auto);row-gap:var(--px-spacing-after-element-s-mobile);z-index:2;position:relative}[reduced] .banner-content{grid-template-columns:min-content minmax(0,1fr);column-gap:var(--px-spacing-after-element-default-mobile)}::slotted([slot="tag"]){grid-area:tag}::slotted([slot="media"]){grid-area:media;align-self:start}::slotted([slot="title"]){grid-area:title}::slotted([slot="description"]){grid-area:description}::slotted([slot="content"]){grid-area:content}:host(:not([reduced])) ::slotted([slot="action"]){grid-area:action;margin-top:calc(var(--px-spacing-after-element-default-mobile) - var(--px-spacing-after-element-s-mobile))}.contrast-helper{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:none;display:none;border-radius:var(--px-radius-main)}[contrast-helper-gradient] .contrast-helper{display:block;background-image:linear-gradient(90deg,#fff 23.43%,#fff0 81.69%)}[inverted] :is([contrast-helper-gradient] .contrast-helper){background-image:linear-gradient(90deg,#000 23.43%,#0000 81.69%)}[contrast-helper-overlay] .contrast-helper{display:block;background-color:#ffffffb3}[inverted] :is([contrast-helper-overlay] .contrast-helper){background-color:#0006}@media only screen and (min-width: 768px){.banner-content{row-gap:var(--px-spacing-after-element-s-tablet)}[reduced] .banner-content{column-gap:var(--px-spacing-after-element-default-tablet)}.banner-content :host(:not([reduced])) ::slotted([slot="action"]){margin-top:calc(var(--px-spacing-after-element-default-tablet) - var(--px-spacing-after-element-s-tablet))}}@media only screen and (min-width: 1025px){.banner-content{row-gap:var(--px-spacing-after-element-s-desktop)}[reduced] .banner-content{column-gap:var(--px-spacing-after-element-default-desktop)}.banner-content :host(:not([reduced])) ::slotted([slot="action"]){margin-top:calc(var(--px-spacing-after-element-default-desktop) - var(--px-spacing-after-element-s-desktop))}}', s = new CSSStyleSheet();
|
|
3
|
-
s.replaceSync(b);
|
|
4
|
-
const o = class o extends d {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(s), this.template = () => `<div class="banner">
|
|
7
|
-
<div class="contrast-helper"></div>
|
|
8
|
-
<px-container padding="${this.reduced ? "m" : "l"}" padding--mobile="m" border-radius="main" >
|
|
9
|
-
<div class="banner-content">
|
|
10
|
-
<slot name="tag"></slot>
|
|
11
|
-
<slot name="media"></slot>
|
|
12
|
-
<slot name="title"></slot>
|
|
13
|
-
<slot name="description"></slot>
|
|
14
|
-
<slot name="content"></slot>
|
|
15
|
-
<slot name="action"></slot>
|
|
16
|
-
</div>
|
|
17
|
-
</px-container>
|
|
18
|
-
</div>`, this.shadowRoot.innerHTML = this.template();
|
|
19
|
-
}
|
|
20
|
-
static get observedAttributes() {
|
|
21
|
-
return [
|
|
22
|
-
"background-color",
|
|
23
|
-
"background-gradient",
|
|
24
|
-
"background-image",
|
|
25
|
-
"background-image--mobile",
|
|
26
|
-
"background-image--tablet",
|
|
27
|
-
"background-image--laptop",
|
|
28
|
-
"background-size",
|
|
29
|
-
"background-position",
|
|
30
|
-
"contrast-helper-gradient",
|
|
31
|
-
"contrast-helper-overlay",
|
|
32
|
-
"reduced",
|
|
33
|
-
"inverted"
|
|
34
|
-
];
|
|
35
|
-
}
|
|
36
|
-
connectedCallback() {
|
|
37
|
-
var e;
|
|
38
|
-
(e = super.connectedCallback) == null || e.call(this), this.creategridTemplateAreas();
|
|
39
|
-
}
|
|
40
|
-
attributeChangedCallback(e, a, t) {
|
|
41
|
-
if (a !== t)
|
|
42
|
-
switch (e) {
|
|
43
|
-
case "background-color":
|
|
44
|
-
this.$container.backgroundColor = g.indexOf(t) > 0 ? t : "none";
|
|
45
|
-
break;
|
|
46
|
-
case "background-gradient":
|
|
47
|
-
this.$container.gradient = l.indexOf(t) > 0 ? t : "none";
|
|
48
|
-
break;
|
|
49
|
-
case "background-image":
|
|
50
|
-
this.$container.backgroundImage = t;
|
|
51
|
-
break;
|
|
52
|
-
case "background-image--mobile":
|
|
53
|
-
this.$container.backgroundImageMobile = t;
|
|
54
|
-
break;
|
|
55
|
-
case "background-image--tablet":
|
|
56
|
-
this.$container.backgroundImageTablet = t;
|
|
57
|
-
break;
|
|
58
|
-
case "background-image--laptop":
|
|
59
|
-
this.$container.backgroundImageLaptop = t;
|
|
60
|
-
break;
|
|
61
|
-
case "background-size":
|
|
62
|
-
this.$container.backgroundSize = c.indexOf(t) > 0 ? t : "";
|
|
63
|
-
break;
|
|
64
|
-
case "background-position":
|
|
65
|
-
this.$container.backgroundPosition = t;
|
|
66
|
-
break;
|
|
67
|
-
case "reduced":
|
|
68
|
-
this.$el.toggleAttribute("reduced", t !== null), this.creategridTemplateAreas();
|
|
69
|
-
break;
|
|
70
|
-
case "inverted":
|
|
71
|
-
for (let r = 0; r < this.$children.length; r++)
|
|
72
|
-
this.$children[r].hasAttribute("inverted") || this.$children[r].toggleAttribute("inverted");
|
|
73
|
-
this.$el.toggleAttribute("inverted", t !== null);
|
|
74
|
-
break;
|
|
75
|
-
default:
|
|
76
|
-
super.attributeChangedCallback(e, a, t);
|
|
77
|
-
break;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
creategridTemplateAreas() {
|
|
81
|
-
const e = this.shadowRoot.querySelector(
|
|
82
|
-
".banner-content"
|
|
83
|
-
), a = ["tag", "media", "title", "description", "content", "action"];
|
|
84
|
-
let t = "";
|
|
85
|
-
this.reduced ? a.forEach((r) => {
|
|
86
|
-
const n = this.shadowRoot.querySelector(
|
|
87
|
-
`slot[name="${r}"]`
|
|
88
|
-
);
|
|
89
|
-
if (n && n.assignedElements().length > 0) {
|
|
90
|
-
if (r === "media") return;
|
|
91
|
-
t += `'media ${r}'
|
|
92
|
-
`;
|
|
93
|
-
}
|
|
94
|
-
}) : a.forEach((r) => {
|
|
95
|
-
const n = this.shadowRoot.querySelector(
|
|
96
|
-
`slot[name="${r}"]`
|
|
97
|
-
);
|
|
98
|
-
n && n.assignedElements().length > 0 && (t += `'${r}'
|
|
99
|
-
`);
|
|
100
|
-
}), t || (t = "'content'"), e.style.gridTemplateAreas = t;
|
|
101
|
-
}
|
|
102
|
-
get $container() {
|
|
103
|
-
return this.shadowRoot.querySelector("px-container");
|
|
104
|
-
}
|
|
105
|
-
get $children() {
|
|
106
|
-
return this.querySelectorAll("px-banner > *");
|
|
107
|
-
}
|
|
108
|
-
get backgroundColor() {
|
|
109
|
-
return this.getAttribute("background-color");
|
|
110
|
-
}
|
|
111
|
-
set backgroundColor(e) {
|
|
112
|
-
this.setAttribute("background-color", e);
|
|
113
|
-
}
|
|
114
|
-
get gradient() {
|
|
115
|
-
return this.getAttribute("background-gradient");
|
|
116
|
-
}
|
|
117
|
-
set gradient(e) {
|
|
118
|
-
this.setAttribute("background-gradient", e);
|
|
119
|
-
}
|
|
120
|
-
get backgroundImage() {
|
|
121
|
-
return this.getAttribute("background-image");
|
|
122
|
-
}
|
|
123
|
-
set backgroundImage(e) {
|
|
124
|
-
this.setAttribute("background-image", e);
|
|
125
|
-
}
|
|
126
|
-
get backgroundImageMobile() {
|
|
127
|
-
return this.getAttribute("background-image--mobile");
|
|
128
|
-
}
|
|
129
|
-
set backgroundImageMobile(e) {
|
|
130
|
-
this.setAttribute("background-image--mobile", e);
|
|
131
|
-
}
|
|
132
|
-
get backgroundImageTablet() {
|
|
133
|
-
return this.getAttribute("background-image--tablet");
|
|
134
|
-
}
|
|
135
|
-
set backgroundImageTablet(e) {
|
|
136
|
-
this.setAttribute("background-image--tablet", e);
|
|
137
|
-
}
|
|
138
|
-
get backgroundImageLaptop() {
|
|
139
|
-
return this.getAttribute("background-image--laptop");
|
|
140
|
-
}
|
|
141
|
-
set backgroundImageLaptop(e) {
|
|
142
|
-
this.setAttribute("background-image--laptop", e);
|
|
143
|
-
}
|
|
144
|
-
get backgroundSize() {
|
|
145
|
-
return this.getAttribute("background-size");
|
|
146
|
-
}
|
|
147
|
-
set backgroundSize(e) {
|
|
148
|
-
this.setAttribute("background-size", e);
|
|
149
|
-
}
|
|
150
|
-
get backgroundPosition() {
|
|
151
|
-
return this.getAttribute("background-position");
|
|
152
|
-
}
|
|
153
|
-
set backgroundPosition(e) {
|
|
154
|
-
this.setAttribute("background-position", e);
|
|
155
|
-
}
|
|
156
|
-
get gradientContrastHelper() {
|
|
157
|
-
return this.hasAttribute("contrast-helper-gradient");
|
|
158
|
-
}
|
|
159
|
-
set gradientContrastHelper(e) {
|
|
160
|
-
e ? this.setAttribute("contrast-helper-gradient", "") : this.removeAttribute("contrast-helper-gradient");
|
|
161
|
-
}
|
|
162
|
-
get overlayContrastHelper() {
|
|
163
|
-
return this.hasAttribute("contrast-helper-overlay");
|
|
164
|
-
}
|
|
165
|
-
set overlayContrastHelper(e) {
|
|
166
|
-
e ? this.setAttribute("contrast-helper-overlay", "") : this.removeAttribute("contrast-helper-overlay");
|
|
167
|
-
}
|
|
168
|
-
get inverted() {
|
|
169
|
-
return this.hasAttribute("inverted");
|
|
170
|
-
}
|
|
171
|
-
set inverted(e) {
|
|
172
|
-
e ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
173
|
-
}
|
|
174
|
-
get reduced() {
|
|
175
|
-
return this.hasAttribute("reduced");
|
|
176
|
-
}
|
|
177
|
-
set reduced(e) {
|
|
178
|
-
e ? this.setAttribute("reduced", "") : this.removeAttribute("reduced");
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
o.nativeName = "div";
|
|
182
|
-
let i = o;
|
|
183
|
-
customElements.define("px-banner", i);
|
|
184
|
-
export {
|
|
185
|
-
i as Banner
|
|
186
|
-
};
|