@proximus/lavender-device-card 2.0.0-alpha.2 → 2.0.0-alpha.200

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.
@@ -1,6 +1,5 @@
1
- import { PxElement } from '@proximus/lavender-common';
2
- export declare const styleSheet: CSSStyleSheet;
3
- export declare class DeviceCard extends PxElement<HTMLLinkElement> {
1
+ import { VerticallyExtendedElement } from '@proximus/lavender-common';
2
+ export declare class DeviceCard extends VerticallyExtendedElement<HTMLLinkElement> {
4
3
  static nativeName: string;
5
4
  template: () => string;
6
5
  constructor();
@@ -0,0 +1,81 @@
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": "nativeName",
17
+ "type": {
18
+ "text": "string"
19
+ },
20
+ "static": true,
21
+ "default": "'a'"
22
+ },
23
+ {
24
+ "kind": "field",
25
+ "name": "template"
26
+ },
27
+ {
28
+ "kind": "field",
29
+ "name": "innerHTML"
30
+ }
31
+ ],
32
+ "superclass": {
33
+ "name": "VerticallyExtendedElement",
34
+ "package": "@proximus/lavender-common"
35
+ },
36
+ "tagName": "px-device-card",
37
+ "customElement": true
38
+ }
39
+ ],
40
+ "exports": [
41
+ {
42
+ "kind": "js",
43
+ "name": "DeviceCard",
44
+ "declaration": {
45
+ "name": "DeviceCard",
46
+ "module": "src/DeviceCard.ts"
47
+ }
48
+ },
49
+ {
50
+ "kind": "custom-element-definition",
51
+ "name": "px-device-card",
52
+ "declaration": {
53
+ "name": "DeviceCard",
54
+ "module": "src/DeviceCard.ts"
55
+ }
56
+ }
57
+ ]
58
+ },
59
+ {
60
+ "kind": "javascript-module",
61
+ "path": "src/device-card.css",
62
+ "declarations": [],
63
+ "exports": []
64
+ },
65
+ {
66
+ "kind": "javascript-module",
67
+ "path": "src/index.ts",
68
+ "declarations": [],
69
+ "exports": [
70
+ {
71
+ "kind": "js",
72
+ "name": "*",
73
+ "declaration": {
74
+ "name": "*",
75
+ "module": "src/DeviceCard"
76
+ }
77
+ }
78
+ ]
79
+ }
80
+ ]
81
+ }
package/dist/index.es.js CHANGED
@@ -1,57 +1,23 @@
1
- import { PxElement as l } from "@proximus/lavender-common";
2
- const r = ':host{display:block}:host *{box-sizing:border-box}.device-card{display:flex;flex-direction:column;gap:var(--px-spacing-default-mobile);height:100%;font-family:var(--px-font-family);font-size:var(--px-font-size-base);text-decoration:none;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)}.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"]){display:flex;gap:var(--px-spacing-xs-mobile);flex-wrap:wrap}.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 only screen and (min-width: 48em){.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 only screen and (min-width: 64.0625em){.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 only screen and (min-width: 90.0625em){.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)}}', a = new CSSStyleSheet();
3
- a.replaceSync(r);
4
- const e = class e extends l {
5
- constructor() {
6
- super(a), this.template = () => `<a class="device-card">
7
- <px-hstack gap="xs" grow="1">
8
- <px-vstack grow="1">
9
- <slot name="brand"></slot>
10
- <slot name="model"></slot>
11
- </px-vstack>
12
- <slot name="energy-rating"></slot>
13
- </px-hstack>
14
- <px-hstack gap="default" grow="1">
15
- <slot name="model-visual"></slot>
16
- <px-vstack gap="s">
17
- <slot name="color-options"></slot>
18
- <slot name="storage-options"></slot>
19
- </px-vstack>
20
- </px-hstack>
21
- <px-separator></px-separator>
22
- <px-vstack>
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 } from "@proximus/lavender-common";
2
+ //#region src/device-card.css?inline
3
+ var t = ":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)}}", n = new CSSStyleSheet();
4
+ n.replaceSync(t);
5
+ var r = class extends e {
6
+ static {
7
+ this.nativeName = "a";
8
+ }
9
+ constructor() {
10
+ super(n), this.template = () => "<a class=\"device-card\">\n <px-hstack gap=\"xs\" grow=\"1\">\n <px-vstack grow=\"1\">\n <slot name=\"brand\"></slot>\n <slot name=\"model\"></slot>\n </px-vstack>\n <slot name=\"energy-rating\"></slot>\n </px-hstack>\n <px-hstack gap=\"default\" grow=\"1\">\n <slot name=\"model-visual\"></slot>\n <px-vstack gap=\"s\">\n <slot name=\"color-options\"></slot>\n <slot name=\"storage-options\"></slot>\n </px-vstack>\n </px-hstack>\n <px-separator></px-separator>\n <px-vstack>\n <slot name=\"as-from-label\"></slot>\n <px-hstack\n gap=\"xs\"\n justify-content=\"space-between\"\n align-items=\"center\"\n >\n <slot name=\"with-subscription-label\"></slot>\n <slot name=\"with-subscription-price\"></slot>\n </px-hstack>\n <px-hstack gap=\"xs\" justify-content=\"space-between\">\n <slot name=\"without-subscription-label\"></slot>\n <slot name=\"without-subscription-price\"></slot>\n </px-hstack>\n </px-vstack>\n </a>", this.shadowRoot.innerHTML = this.template();
11
+ }
12
+ static get observedAttributes() {
13
+ return [...super.observedAttributes];
14
+ }
15
+ attributeChangedCallback(e, t, n) {
16
+ if (t !== n) switch (e) {
17
+ default: super.attributeChangedCallback(e, t, n);
18
+ }
19
+ }
57
20
  };
21
+ customElements.get("px-device-card") || customElements.define("px-device-card", r);
22
+ //#endregion
23
+ export { r as DeviceCard };
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
3
+ "version": 1.1,
4
+ "properties": [],
5
+ "pseudoElements": []
6
+ }
@@ -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,27 @@
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.200",
5
+ "description-markup": "markdown",
6
+ "contributions": {
7
+ "html": {
8
+ "elements": [
9
+ {
10
+ "name": "px-device-card",
11
+ "description": "\n---\n",
12
+ "doc-url": "",
13
+ "attributes": [],
14
+ "events": [],
15
+ "js": {
16
+ "properties": [{ "name": "template" }, { "name": "innerHTML" }],
17
+ "events": []
18
+ }
19
+ }
20
+ ]
21
+ },
22
+ "css": {
23
+ "properties": [],
24
+ "pseudo-elements": []
25
+ }
26
+ }
27
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-device-card",
3
- "version": "2.0.0-alpha.2",
3
+ "version": "2.0.0-alpha.200",
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 ../custom-elements-manifest.config.js --outdir dist"
16
+ "wc-manifest": "cem analyze --globs \"src/*\" --config ../../custom-elements-manifest.config.js --outdir dist"
17
17
  },
18
18
  "publishConfig": {
19
19
  "access": "public"