@proximus/lavender-content-header 1.0.0-alpha.9 → 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/ContentHeader.d.ts +41 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +4 -4
- package/package.json +8 -4
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Section } from '@proximus/lavender-section';
|
|
2
|
+
import { H1 } from '@proximus/lavender-heading';
|
|
3
|
+
import { PxElement } from '@proximus/lavender-common';
|
|
4
|
+
export declare class ContentHeader extends PxElement<HTMLDivElement> {
|
|
5
|
+
static nativeName: string;
|
|
6
|
+
private template;
|
|
7
|
+
constructor();
|
|
8
|
+
static get observedAttributes(): string[];
|
|
9
|
+
connectedCallback(): void;
|
|
10
|
+
attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
11
|
+
get $section(): Section;
|
|
12
|
+
get $h1(): H1;
|
|
13
|
+
get $subtitleSlot(): HTMLSlotElement;
|
|
14
|
+
get $patchDescriptionSlot(): HTMLSlotElement;
|
|
15
|
+
get $overlapSlot(): HTMLSlotElement;
|
|
16
|
+
get $children(): NodeListOf<Element>;
|
|
17
|
+
get backgroundColor(): string;
|
|
18
|
+
set backgroundColor(value: string);
|
|
19
|
+
get gradient(): string;
|
|
20
|
+
set gradient(value: string);
|
|
21
|
+
get backgroundImage(): string;
|
|
22
|
+
set backgroundImage(value: string);
|
|
23
|
+
get backgroundImageMobile(): string;
|
|
24
|
+
set backgroundImageMobile(value: string);
|
|
25
|
+
get backgroundImageTablet(): string;
|
|
26
|
+
set backgroundImageTablet(value: string);
|
|
27
|
+
get backgroundImageLaptop(): string;
|
|
28
|
+
set backgroundImageLaptop(value: string);
|
|
29
|
+
get backgroundSize(): string;
|
|
30
|
+
set backgroundSize(value: string);
|
|
31
|
+
get backgroundPosition(): string;
|
|
32
|
+
set backgroundPosition(value: string);
|
|
33
|
+
get gradientContrastHelper(): boolean;
|
|
34
|
+
set gradientContrastHelper(value: boolean);
|
|
35
|
+
get overlayContrastHelper(): boolean;
|
|
36
|
+
set overlayContrastHelper(value: boolean);
|
|
37
|
+
get inverted(): boolean;
|
|
38
|
+
set inverted(value: boolean);
|
|
39
|
+
get minHeight(): boolean;
|
|
40
|
+
set minHeight(value: boolean);
|
|
41
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ContentHeader';
|
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PxElement as s, backgroundSizeValues as c, gradientValues as l, backgroundColorValues as g } from "@proximus/lavender-common";
|
|
2
|
-
const
|
|
3
|
-
n.replaceSync(
|
|
2
|
+
const h = ":host{--min-height--mobile: 15.625em;--min-height--tablet: 17.5em;--min-height--laptop: 17.5em;--min-height--desktop: 17.5em}:host,:host>*{display:block;box-sizing:border-box}.content-header{position:relative;z-index:0}[min-height] .content-header-content{min-height:calc(var(--min-height--mobile) - (var(--px-spacing-l-mobile) * 2))}.content-header-content{display:flex;flex-direction:column;gap:var(--px-spacing-l-mobile);z-index:2;position:relative;box-sizing:border-box}.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){.content-header-content{gap:var(--px-spacing-l-desktop)}[min-height] .content-header-content{min-height:calc(var(--min-height--tablet) - (var(--px-spacing-l-tablet) * 2))}}@media only screen and (min-width: 64.0625em){.content-header-content{gap:var(--px-spacing-l-laptop)}[min-height] .content-header-content{min-height:calc(var(--min-height--laptop) - (var(--px-spacing-l-laptop) * 2))}}", n = new CSSStyleSheet();
|
|
3
|
+
n.replaceSync(h);
|
|
4
4
|
const o = class o extends s {
|
|
5
5
|
constructor() {
|
|
6
6
|
super(n), this.template = () => `<div class="content-header">
|
|
@@ -8,7 +8,7 @@ const o = class o extends s {
|
|
|
8
8
|
<px-section padding-block="l">
|
|
9
9
|
<div class="content-header-content">
|
|
10
10
|
<px-vstack gap="heading-to-subtitle">
|
|
11
|
-
<px-h1><slot></slot></px-h1>
|
|
11
|
+
<px-h1 variant="title-3xl"><slot></slot></px-h1>
|
|
12
12
|
<slot name="subtitle"></slot>
|
|
13
13
|
</px-vstack>
|
|
14
14
|
${this.$patchDescriptionSlot ? `<px-stack gap="s" direction="row" direction--mobile="column">
|
|
@@ -170,7 +170,7 @@ const o = class o extends s {
|
|
|
170
170
|
};
|
|
171
171
|
o.nativeName = "div";
|
|
172
172
|
let r = o;
|
|
173
|
-
customElements.define("px-content-header", r);
|
|
173
|
+
customElements.get("px-content-header") || customElements.define("px-content-header", r);
|
|
174
174
|
export {
|
|
175
175
|
r as ContentHeader
|
|
176
176
|
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-content-header",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-beta.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.es.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
6
7
|
"files": [
|
|
7
8
|
"dist"
|
|
8
9
|
],
|
|
@@ -10,10 +11,13 @@
|
|
|
10
11
|
"scripts": {
|
|
11
12
|
"transform-package-json": "node ../../../scripts/tranformPackageJson.js package.json dist/far/away",
|
|
12
13
|
"clean": "rm -rf dist",
|
|
13
|
-
"build": "npm run clean &&
|
|
14
|
-
"test": "vitest run --coverage"
|
|
14
|
+
"build": "npm run clean && NODE_ENV=development vite build && tsc && npm run transform-package-json && npm run wc-manifest",
|
|
15
|
+
"test": "vitest run --coverage",
|
|
16
|
+
"wc-manifest": "cem analyze --globs \"src/*\" --config ../custom-elements-manifest.config.js --outdir dist"
|
|
15
17
|
},
|
|
16
18
|
"publishConfig": {
|
|
17
19
|
"access": "public"
|
|
18
|
-
}
|
|
20
|
+
},
|
|
21
|
+
"customElements": "dist/custom-elements.json",
|
|
22
|
+
"web-types": "./dist/web-types.json"
|
|
19
23
|
}
|