@fluid-topics/ftds-card 2.1.6 → 2.1.8
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/build/ftds-card.d.ts +0 -1
- package/build/ftds-card.js +14 -24
- package/build/ftds-card.light.js +63 -62
- package/build/ftds-card.min.js +52 -51
- package/build/helpers.d.ts +6 -0
- package/build/helpers.js +21 -0
- package/package.json +7 -7
package/build/ftds-card.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ export declare class FtdsCard extends FtLitElement implements FtdsCardProperties
|
|
|
22
22
|
private sideBarContent;
|
|
23
23
|
private get isClickable();
|
|
24
24
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
25
|
-
private renderHeaderText;
|
|
26
25
|
private onKeydown;
|
|
27
26
|
private onKeyup;
|
|
28
27
|
private onClick;
|
package/build/ftds-card.js
CHANGED
|
@@ -6,12 +6,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { FtLitElement, unslotText, } from "@fluid-topics/ft-wc-utils";
|
|
8
8
|
import { FtdsTypography } from "@fluid-topics/ftds-typography";
|
|
9
|
-
import { designSystemStyles
|
|
10
|
-
import { property, query, queryAssignedNodes, state
|
|
11
|
-
import { html, nothing
|
|
9
|
+
import { designSystemStyles } from "./ftds-card.styles";
|
|
10
|
+
import { property, query, queryAssignedNodes, state } from "lit/decorators.js";
|
|
11
|
+
import { html, nothing } from "lit";
|
|
12
12
|
import { when } from "lit/directives/when.js";
|
|
13
13
|
import { classMap } from "lit/directives/class-map.js";
|
|
14
14
|
import { FtRipple } from "@fluid-topics/ft-ripple";
|
|
15
|
+
import { renderCardHeaderContent } from "./helpers";
|
|
15
16
|
export class FtdsCard extends FtLitElement {
|
|
16
17
|
constructor() {
|
|
17
18
|
super(...arguments);
|
|
@@ -59,21 +60,14 @@ export class FtdsCard extends FtLitElement {
|
|
|
59
60
|
<div id="image">
|
|
60
61
|
<slot name="image" @slotchange=${this.onSlotchange}></slot>
|
|
61
62
|
</div>
|
|
62
|
-
<
|
|
63
|
-
<div id="header
|
|
64
|
-
${
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
`, () => html `
|
|
69
|
-
${this.renderHeaderText()}
|
|
70
|
-
`)}
|
|
71
|
-
<slot name="header" @slotchange=${this.onSlotchange}></slot>
|
|
63
|
+
<slot name="header-wrapper">
|
|
64
|
+
<div id="header">
|
|
65
|
+
${renderCardHeaderContent({
|
|
66
|
+
headerText: this.headerText,
|
|
67
|
+
headerHref: this.headerHref,
|
|
68
|
+
})}
|
|
72
69
|
</div>
|
|
73
|
-
|
|
74
|
-
<slot name="header-actions" @slotchange=${this.onSlotchange}></slot>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
70
|
+
</slot>
|
|
77
71
|
<div id="body">
|
|
78
72
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
79
73
|
</div>
|
|
@@ -82,7 +76,8 @@ export class FtdsCard extends FtLitElement {
|
|
|
82
76
|
<slot name="footer" @slotchange=${this.onSlotchange}></slot>
|
|
83
77
|
</div>
|
|
84
78
|
<div id="footer-actions">
|
|
85
|
-
<slot name="footer-actions"
|
|
79
|
+
<slot name="footer-actions"
|
|
80
|
+
@slotchange=${this.onSlotchange}></slot>
|
|
86
81
|
</div>
|
|
87
82
|
</div>
|
|
88
83
|
</div>
|
|
@@ -92,11 +87,6 @@ export class FtdsCard extends FtLitElement {
|
|
|
92
87
|
</div>
|
|
93
88
|
`;
|
|
94
89
|
}
|
|
95
|
-
renderHeaderText() {
|
|
96
|
-
return html `
|
|
97
|
-
<ftds-typography variant="${FtdsCardTypographies.header}">${this.headerText}</ftds-typography>
|
|
98
|
-
`;
|
|
99
|
-
}
|
|
100
90
|
onKeydown(event) {
|
|
101
91
|
if (this.selectable && event.code === "Space") {
|
|
102
92
|
event.preventDefault();
|
|
@@ -170,7 +160,7 @@ __decorate([
|
|
|
170
160
|
query("#body slot")
|
|
171
161
|
], FtdsCard.prototype, "bodyContent", void 0);
|
|
172
162
|
__decorate([
|
|
173
|
-
queryAssignedNodes({ slot: "footer" })
|
|
163
|
+
queryAssignedNodes({ slot: "footer", flatten: true })
|
|
174
164
|
], FtdsCard.prototype, "footerContent", void 0);
|
|
175
165
|
__decorate([
|
|
176
166
|
queryAssignedNodes({ slot: "footer-actions" })
|