@ghchinoy/litflow 0.4.0 → 0.4.1
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/CHANGELOG.md +6 -6
- package/dist/lit-node.d.ts +1 -0
- package/dist/litflow.js +146 -123
- package/dist/litflow.js.map +1 -1
- package/package.json +1 -1
- package/src/lit-node.ts +28 -4
package/package.json
CHANGED
package/src/lit-node.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement, html } from 'lit';
|
|
1
|
+
import { LitElement, html, css } from 'lit';
|
|
2
2
|
import { customElement, property } from 'lit/decorators.js';
|
|
3
3
|
import { SignalWatcher } from '@lit-labs/signals';
|
|
4
4
|
|
|
@@ -6,6 +6,30 @@ type Constructor<T> = new (...args: any[]) => T;
|
|
|
6
6
|
|
|
7
7
|
@customElement('lit-node')
|
|
8
8
|
export class LitNode extends (SignalWatcher as <T extends Constructor<LitElement>>(base: T) => T)(LitElement) {
|
|
9
|
+
static styles = css`
|
|
10
|
+
:host {
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
.content-wrapper {
|
|
14
|
+
padding: 12px;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
gap: 4px;
|
|
18
|
+
pointer-events: none;
|
|
19
|
+
}
|
|
20
|
+
.headline {
|
|
21
|
+
font-size: var(--md-sys-typescale-title-small-size);
|
|
22
|
+
font-weight: var(--md-sys-typescale-title-small-weight);
|
|
23
|
+
color: var(--md-sys-color-on-surface);
|
|
24
|
+
font-family: var(--md-sys-typescale-title-small-font);
|
|
25
|
+
}
|
|
26
|
+
.supporting-text {
|
|
27
|
+
font-size: var(--md-sys-typescale-body-medium-size);
|
|
28
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
29
|
+
font-family: var(--md-sys-typescale-body-medium-font);
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
|
|
9
33
|
createRenderRoot() {
|
|
10
34
|
return this;
|
|
11
35
|
}
|
|
@@ -33,11 +57,11 @@ export class LitNode extends (SignalWatcher as <T extends Constructor<LitElement
|
|
|
33
57
|
|
|
34
58
|
render() {
|
|
35
59
|
return html`
|
|
36
|
-
<div class="content-wrapper"
|
|
37
|
-
<div class="headline"
|
|
60
|
+
<div class="content-wrapper">
|
|
61
|
+
<div class="headline">
|
|
38
62
|
<slot name="headline">${this.label}</slot>
|
|
39
63
|
</div>
|
|
40
|
-
<div class="supporting-text"
|
|
64
|
+
<div class="supporting-text">
|
|
41
65
|
<slot name="supporting-text"></slot>
|
|
42
66
|
</div>
|
|
43
67
|
<slot></slot>
|