@proximus/lavender-device-card 2.0.0-alpha.21 → 2.0.0-alpha.211
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/DeviceCard.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { VerticallyExtendedElement } from '@proximus/lavender-common';
|
|
2
|
-
export declare const styleSheet: CSSStyleSheet;
|
|
3
2
|
export declare class DeviceCard extends VerticallyExtendedElement<HTMLLinkElement> {
|
|
3
|
+
protected static readonly template: HTMLTemplateElement;
|
|
4
4
|
static nativeName: string;
|
|
5
|
-
template: () => string;
|
|
6
5
|
constructor();
|
|
7
6
|
static get observedAttributes(): string[];
|
|
8
7
|
attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/DeviceCard.ts",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "class",
|
|
11
|
+
"description": "",
|
|
12
|
+
"name": "DeviceCard",
|
|
13
|
+
"members": [
|
|
14
|
+
{
|
|
15
|
+
"kind": "field",
|
|
16
|
+
"name": "template",
|
|
17
|
+
"privacy": "protected",
|
|
18
|
+
"static": true,
|
|
19
|
+
"readonly": true
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"kind": "field",
|
|
23
|
+
"name": "nativeName",
|
|
24
|
+
"type": {
|
|
25
|
+
"text": "string"
|
|
26
|
+
},
|
|
27
|
+
"static": true,
|
|
28
|
+
"default": "'a'"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"superclass": {
|
|
32
|
+
"name": "VerticallyExtendedElement",
|
|
33
|
+
"package": "@proximus/lavender-common"
|
|
34
|
+
},
|
|
35
|
+
"tagName": "px-device-card",
|
|
36
|
+
"customElement": true
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"exports": [
|
|
40
|
+
{
|
|
41
|
+
"kind": "js",
|
|
42
|
+
"name": "DeviceCard",
|
|
43
|
+
"declaration": {
|
|
44
|
+
"name": "DeviceCard",
|
|
45
|
+
"module": "src/DeviceCard.ts"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"kind": "custom-element-definition",
|
|
50
|
+
"name": "px-device-card",
|
|
51
|
+
"declaration": {
|
|
52
|
+
"name": "DeviceCard",
|
|
53
|
+
"module": "src/DeviceCard.ts"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"kind": "javascript-module",
|
|
60
|
+
"path": "src/device-card.css",
|
|
61
|
+
"declarations": [],
|
|
62
|
+
"exports": []
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"kind": "javascript-module",
|
|
66
|
+
"path": "src/index.ts",
|
|
67
|
+
"declarations": [],
|
|
68
|
+
"exports": [
|
|
69
|
+
{
|
|
70
|
+
"kind": "js",
|
|
71
|
+
"name": "*",
|
|
72
|
+
"declaration": {
|
|
73
|
+
"name": "*",
|
|
74
|
+
"module": "src/DeviceCard"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
package/dist/index.es.js
CHANGED
|
@@ -1,57 +1,26 @@
|
|
|
1
|
-
import { VerticallyExtendedElement as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<slot name="as-from-label"></slot>
|
|
24
|
-
<px-hstack
|
|
25
|
-
gap="xs"
|
|
26
|
-
justify-content="space-between"
|
|
27
|
-
align-items="center"
|
|
28
|
-
>
|
|
29
|
-
<slot name="with-subscription-label"></slot>
|
|
30
|
-
<slot name="with-subscription-price"></slot>
|
|
31
|
-
</px-hstack>
|
|
32
|
-
<px-hstack gap="xs" justify-content="space-between">
|
|
33
|
-
<slot name="without-subscription-label"></slot>
|
|
34
|
-
<slot name="without-subscription-price"></slot>
|
|
35
|
-
</px-hstack>
|
|
36
|
-
</px-vstack>
|
|
37
|
-
</a>`, this.shadowRoot.innerHTML = this.template();
|
|
38
|
-
}
|
|
39
|
-
static get observedAttributes() {
|
|
40
|
-
return [...super.observedAttributes];
|
|
41
|
-
}
|
|
42
|
-
attributeChangedCallback(o, s, i) {
|
|
43
|
-
if (s !== i)
|
|
44
|
-
switch (o) {
|
|
45
|
-
default:
|
|
46
|
-
super.attributeChangedCallback(o, s, i);
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
e.nativeName = "a";
|
|
52
|
-
let t = e;
|
|
53
|
-
customElements.get("px-device-card") || customElements.define("px-device-card", t);
|
|
54
|
-
export {
|
|
55
|
-
t as DeviceCard,
|
|
56
|
-
a as styleSheet
|
|
1
|
+
import { VerticallyExtendedElement as e, createTemplate as t, renderTemplate as n } from "@proximus/lavender-common";
|
|
2
|
+
//#region src/device-card.css?inline
|
|
3
|
+
var r = ":host{display:block}:host *{box-sizing:border-box}.device-card{gap:var(--px-spacing-default-mobile);height:100%;font-family:var(--px-font-family);font-size:var(--px-font-size-base);color:var(--px-color-text-neutral-default);--btn-transition:all .2s ease-in-out 0s;transition:var(--btn-transition);border-radius:var(--px-radius-main);outline-color:var(--px-color-border-focus-outline-default);outline-width:var(--px-focus-outline-mobile);border:var(--px-size-border-m) solid transparent;background-color:var(--px-color-background-surface-light);padding:var(--px-padding-m-mobile);flex-direction:column;text-decoration:none;display:flex}.device-card ::slotted([slot=brand]){font-size:var(--px-text-size-body-m-mobile);line-height:var(--px-line-height-ratio-l);color:var(--px-color-text-dimmed-default)}.device-card ::slotted([slot=model]){font-size:var(--px-text-size-heading-l-mobile);line-height:var(--px-line-height-ratio-l);font-weight:var(--px-font-weight-title);color:var(--px-color-text-neutral-default);flex-grow:1}.device-card ::slotted([slot=energy-rating]),.device-card ::slotted([slot=model-visual]){flex-shrink:0}.device-card ::slotted([slot=color-options]),.device-card ::slotted([slot=storage-options]){gap:var(--px-spacing-xs-mobile);flex-wrap:wrap;display:flex}.device-card ::slotted([slot=as-from-label]){font-size:var(--px-text-size-body-m-mobile);line-height:var(--px-line-height-ratio-l);color:var(--px-color-text-dimmed-default);text-align:right}.device-card ::slotted([slot=with-subscription-label]){font-size:var(--px-text-size-body-l-mobile);line-height:var(--px-line-height-ratio-l);font-weight:var(--px-font-weight-title);color:var(--px-color-text-neutral-default)}.device-card ::slotted([slot=without-subscription-label]),.device-card ::slotted([slot=without-subscription-price]){font-size:var(--px-text-size-body-m-mobile);line-height:var(--px-line-height-ratio-l);color:var(--px-color-text-neutral-default)}.device-card ::slotted([slot=without-subscription-price]){text-align:right}.device-card:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline-style:solid}.device-card:hover{border-color:var(--px-color-border-state-hover-default);background-color:var(--px-color-background-state-hover-bordered-default)}@media screen and (width>=48rem){.device-card{gap:var(--px-spacing-default-tablet);outline-width:var(--px-focus-outline-tablet);padding:var(--px-padding-m-tablet)}.device-card ::slotted([slot=brand]){font-size:var(--px-text-size-body-m-tablet)}.device-card ::slotted([slot=model]){font-size:var(--px-text-size-heading-l-tablet)}.device-card ::slotted([slot=color-options]),.device-card ::slotted([slot=storage-options]){gap:var(--px-spacing-xs-tablet)}.device-card ::slotted([slot=as-from-label]){font-size:var(--px-text-size-body-m-tablet)}.device-card ::slotted([slot=with-subscription-label]){font-size:var(--px-text-size-body-l-tablet)}.device-card ::slotted([slot=without-subscription-label]),.device-card ::slotted([slot=without-subscription-price]){font-size:var(--px-text-size-body-m-tablet)}.device-card:focus-visible{outline-offset:var(--px-focus-offset-tablet)}}@media screen and (width>=64.0625rem){.device-card{gap:var(--px-spacing-default-laptop);outline-width:var(--px-focus-outline-laptop);padding:var(--px-padding-m-laptop)}.device-card ::slotted([slot=brand]){font-size:var(--px-text-size-body-m-laptop)}.device-card ::slotted([slot=model]){font-size:var(--px-text-size-heading-l-laptop)}.device-card ::slotted([slot=color-options]),.device-card ::slotted([slot=storage-options]){gap:var(--px-spacing-xs-laptop)}.device-card ::slotted([slot=as-from-label]){font-size:var(--px-text-size-body-m-laptop)}.device-card ::slotted([slot=with-subscription-label]){font-size:var(--px-text-size-body-l-laptop)}.device-card ::slotted([slot=without-subscription-label]),.device-card ::slotted([slot=without-subscription-price]){font-size:var(--px-text-size-body-m-laptop)}.device-card:focus-visible{outline-offset:var(--px-focus-offset-laptop)}}@media screen and (width>=90.0625rem){.device-card{gap:var(--px-spacing-default-desktop);outline-width:var(--px-focus-outline-desktop);padding:var(--px-padding-m-desktop)}.device-card ::slotted([slot=brand]){font-size:var(--px-text-size-body-m-desktop)}.device-card ::slotted([slot=model]){font-size:var(--px-text-size-heading-l-desktop)}.device-card ::slotted([slot=color-options]),.device-card ::slotted([slot=storage-options]){gap:var(--px-spacing-xs-desktop)}.device-card ::slotted([slot=as-from-label]){font-size:var(--px-text-size-body-m-desktop)}.device-card ::slotted([slot=with-subscription-label]){font-size:var(--px-text-size-body-l-desktop)}.device-card ::slotted([slot=without-subscription-label]),.device-card ::slotted([slot=without-subscription-price]){font-size:var(--px-text-size-body-m-desktop)}.device-card:focus-visible{outline-offset:var(--px-focus-offset-desktop)}}", i = new CSSStyleSheet();
|
|
4
|
+
i.replaceSync(r);
|
|
5
|
+
var a = class r extends e {
|
|
6
|
+
static {
|
|
7
|
+
this.template = t("<a class=\"device-card\"><px-hstack gap=\"xs\" grow=\"1\"><px-vstack grow=\"1\"><slot name=\"brand\"></slot><slot name=\"model\"></slot></px-vstack><slot name=\"energy-rating\"></slot></px-hstack><px-hstack gap=\"default\" grow=\"1\"><slot name=\"model-visual\"></slot><px-vstack gap=\"s\"><slot name=\"color-options\"></slot><slot name=\"storage-options\"></slot></px-vstack></px-hstack><px-separator></px-separator><px-vstack><slot name=\"as-from-label\"></slot><px-hstack\n gap=\"xs\"\n justify-content=\"space-between\"\n align-items=\"center\"\n ><slot name=\"with-subscription-label\"></slot><slot name=\"with-subscription-price\"></slot></px-hstack><px-hstack gap=\"xs\" justify-content=\"space-between\"><slot name=\"without-subscription-label\"></slot><slot name=\"without-subscription-price\"></slot></px-hstack></px-vstack></a>");
|
|
8
|
+
}
|
|
9
|
+
static {
|
|
10
|
+
this.nativeName = "a";
|
|
11
|
+
}
|
|
12
|
+
constructor() {
|
|
13
|
+
super(i), n(this.shadowRoot, r.template);
|
|
14
|
+
}
|
|
15
|
+
static get observedAttributes() {
|
|
16
|
+
return [...super.observedAttributes];
|
|
17
|
+
}
|
|
18
|
+
attributeChangedCallback(e, t, n) {
|
|
19
|
+
if (t !== n) switch (e) {
|
|
20
|
+
default: super.attributeChangedCallback(e, t, n);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
57
23
|
};
|
|
24
|
+
customElements.get("px-device-card") || customElements.define("px-device-card", a);
|
|
25
|
+
//#endregion
|
|
26
|
+
export { a as DeviceCard };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
|
|
3
|
+
"version": 1.1,
|
|
4
|
+
"tags": [
|
|
5
|
+
{
|
|
6
|
+
"name": "px-device-card",
|
|
7
|
+
"description": "\n---\n",
|
|
8
|
+
"attributes": [],
|
|
9
|
+
"references": []
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
|
+
"name": "@proximus/lavender-device-card",
|
|
4
|
+
"version": "2.0.0-alpha.211",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"contributions": {
|
|
7
|
+
"html": {
|
|
8
|
+
"elements": [
|
|
9
|
+
{
|
|
10
|
+
"name": "px-device-card",
|
|
11
|
+
"description": "\n\n---\n",
|
|
12
|
+
"doc-url": "",
|
|
13
|
+
"attributes": [],
|
|
14
|
+
"events": [],
|
|
15
|
+
"js": { "properties": [], "events": [] }
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"css": {
|
|
20
|
+
"properties": [],
|
|
21
|
+
"pseudo-elements": []
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-device-card",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.211",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"clean": "rm -rf dist",
|
|
14
14
|
"build": "npm run clean && NODE_ENV=development vite build && tsc && npm run transform-package-json && npm run wc-manifest",
|
|
15
15
|
"test": "vitest run --coverage",
|
|
16
|
-
"wc-manifest": "cem analyze --globs \"src/*\" --config
|
|
16
|
+
"wc-manifest": "cem analyze --globs \"src/*\" --config ../../custom-elements-manifest.config.js --outdir dist"
|
|
17
17
|
},
|
|
18
18
|
"publishConfig": {
|
|
19
19
|
"access": "public"
|