@zanichelli/albe-web-components 18.3.4 → 18.4.0-RC2
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 +0 -2
- package/dist/cjs/index-96af6326.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-result-card.cjs.entry.js +43 -0
- package/dist/cjs/z-result-card.cjs.entry.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/css-components/z-cover/index.stories.js +40 -0
- package/dist/collection/components/css-components/z-cover/index.stories.js.map +1 -0
- package/dist/collection/components/css-components/z-cover/styles.css +71 -0
- package/dist/collection/components/result-card/z-result-card/index.js +179 -0
- package/dist/collection/components/result-card/z-result-card/index.js.map +1 -0
- package/dist/collection/components/result-card/z-result-card/styles.css +164 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/z-result-card.d.ts +11 -0
- package/dist/components/z-result-card.js +72 -0
- package/dist/components/z-result-card.js.map +1 -0
- package/dist/esm/index-c8ceadeb.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-result-card.entry.js +39 -0
- package/dist/esm/z-result-card.entry.js.map +1 -0
- package/dist/types/components/css-components/z-cover/index.stories.d.ts +12 -0
- package/dist/types/components/result-card/z-result-card/index.d.ts +43 -0
- package/dist/types/components.d.ts +77 -0
- package/dist/web-components-library/p-48a0867e.entry.js +2 -0
- package/dist/web-components-library/p-48a0867e.entry.js.map +1 -0
- package/dist/web-components-library/web-components-library.css +72 -0
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/dist/web-components-library/web-components-library.esm.js.map +1 -1
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +2 -1
- package/react/components.js.map +1 -1
- package/www/build/p-48a0867e.entry.js +2 -0
- package/www/build/p-48a0867e.entry.js.map +1 -0
- package/www/build/{p-06004a1d.js → p-9d9e4a98.js} +1 -1
- package/www/build/{p-dda8d321.css → p-efa5f95f.css} +72 -0
- package/www/build/web-components-library.css +72 -0
- package/www/build/web-components-library.esm.js +1 -1
- package/www/build/web-components-library.esm.js.map +1 -1
- package/www/index.html +1 -1
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class ZResultCard {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.renderOperaCard = () => {
|
|
5
|
+
return (h(Host, { tabIndex: 0 }, h("div", { class: `z-cover-container ${this.hasMultipleCovers ? "has-multiple" : ""}` }, h("div", { class: "z-cover-stack" }, this.hasMultipleCovers && (h("div", null, h("div", { class: "z-cover-shadow z-shadow-2" }), h("div", { class: "z-cover-shadow z-shadow-1" }))), h("img", { src: this.cover, alt: "Book Cover", class: "z-cover-img" }))), h("div", { class: "info-container" }, this.author && h("div", { class: "author-label" }, this.author), h("div", { class: "card-title" }, this.cardTitle), h("div", { class: "card-subtitle" }, this.cardSubtitle), h("div", { class: "tags-container" }, h("slot", { name: "tags" })), h("div", { class: "volumes-label" }, h("slot", { name: "volumes" })))));
|
|
6
|
+
};
|
|
7
|
+
this.renderInfoCard = () => {
|
|
8
|
+
return (h(Host, { tabIndex: 0, class: "info-card" }, h("div", { class: "info-icon-column" }, h("div", { class: "info-icon-container" }, h("z-icon", { class: "info-icon", name: "link", width: 18, height: 18 }))), h("div", { class: "info-container" }, h("div", { class: "card-title info-title" }, this.cardTitle), h("div", { class: "card-subtitle info-subtitle" }, this.cardSubtitle))));
|
|
9
|
+
};
|
|
10
|
+
this.author = undefined;
|
|
11
|
+
this.cardTitle = undefined;
|
|
12
|
+
this.cardSubtitle = undefined;
|
|
13
|
+
this.operaTags = undefined;
|
|
14
|
+
this.volumesLabel = undefined;
|
|
15
|
+
this.cover = undefined;
|
|
16
|
+
this.hasMultipleCovers = false;
|
|
17
|
+
this.isInfoCard = false;
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
if (this.isInfoCard) {
|
|
21
|
+
return this.renderInfoCard();
|
|
22
|
+
}
|
|
23
|
+
return this.renderOperaCard();
|
|
24
|
+
}
|
|
25
|
+
static get is() { return "z-result-card"; }
|
|
26
|
+
static get encapsulation() { return "shadow"; }
|
|
27
|
+
static get originalStyleUrls() {
|
|
28
|
+
return {
|
|
29
|
+
"$": ["styles.css", "../../css-components/z-cover/styles.css"]
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
static get styleUrls() {
|
|
33
|
+
return {
|
|
34
|
+
"$": ["styles.css", "../../css-components/z-cover/styles.css"]
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
static get properties() {
|
|
38
|
+
return {
|
|
39
|
+
"author": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"mutable": false,
|
|
42
|
+
"complexType": {
|
|
43
|
+
"original": "string",
|
|
44
|
+
"resolved": "string",
|
|
45
|
+
"references": {}
|
|
46
|
+
},
|
|
47
|
+
"required": false,
|
|
48
|
+
"optional": true,
|
|
49
|
+
"docs": {
|
|
50
|
+
"tags": [],
|
|
51
|
+
"text": "The author of the opera."
|
|
52
|
+
},
|
|
53
|
+
"attribute": "author",
|
|
54
|
+
"reflect": false
|
|
55
|
+
},
|
|
56
|
+
"cardTitle": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"mutable": false,
|
|
59
|
+
"complexType": {
|
|
60
|
+
"original": "string",
|
|
61
|
+
"resolved": "string",
|
|
62
|
+
"references": {}
|
|
63
|
+
},
|
|
64
|
+
"required": false,
|
|
65
|
+
"optional": false,
|
|
66
|
+
"docs": {
|
|
67
|
+
"tags": [],
|
|
68
|
+
"text": "The title of the opera."
|
|
69
|
+
},
|
|
70
|
+
"attribute": "card-title",
|
|
71
|
+
"reflect": false
|
|
72
|
+
},
|
|
73
|
+
"cardSubtitle": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"mutable": false,
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "string",
|
|
78
|
+
"resolved": "string",
|
|
79
|
+
"references": {}
|
|
80
|
+
},
|
|
81
|
+
"required": false,
|
|
82
|
+
"optional": false,
|
|
83
|
+
"docs": {
|
|
84
|
+
"tags": [],
|
|
85
|
+
"text": "The subtitle of the opera."
|
|
86
|
+
},
|
|
87
|
+
"attribute": "card-subtitle",
|
|
88
|
+
"reflect": false
|
|
89
|
+
},
|
|
90
|
+
"operaTags": {
|
|
91
|
+
"type": "unknown",
|
|
92
|
+
"mutable": false,
|
|
93
|
+
"complexType": {
|
|
94
|
+
"original": "string[]",
|
|
95
|
+
"resolved": "string[]",
|
|
96
|
+
"references": {}
|
|
97
|
+
},
|
|
98
|
+
"required": false,
|
|
99
|
+
"optional": true,
|
|
100
|
+
"docs": {
|
|
101
|
+
"tags": [],
|
|
102
|
+
"text": "Tags associated with the opera.\nThis is a string array that can be used to display tags in the component."
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"volumesLabel": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"mutable": false,
|
|
108
|
+
"complexType": {
|
|
109
|
+
"original": "string",
|
|
110
|
+
"resolved": "string",
|
|
111
|
+
"references": {}
|
|
112
|
+
},
|
|
113
|
+
"required": false,
|
|
114
|
+
"optional": true,
|
|
115
|
+
"docs": {
|
|
116
|
+
"tags": [],
|
|
117
|
+
"text": "The label for the volumes.\nThis is used to display the number of volumes or a related message."
|
|
118
|
+
},
|
|
119
|
+
"attribute": "volumes-label",
|
|
120
|
+
"reflect": false
|
|
121
|
+
},
|
|
122
|
+
"cover": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"mutable": false,
|
|
125
|
+
"complexType": {
|
|
126
|
+
"original": "string",
|
|
127
|
+
"resolved": "string",
|
|
128
|
+
"references": {}
|
|
129
|
+
},
|
|
130
|
+
"required": false,
|
|
131
|
+
"optional": true,
|
|
132
|
+
"docs": {
|
|
133
|
+
"tags": [],
|
|
134
|
+
"text": "The URL of the cover image.\nThis is used to display the cover image of the opera."
|
|
135
|
+
},
|
|
136
|
+
"attribute": "cover",
|
|
137
|
+
"reflect": false
|
|
138
|
+
},
|
|
139
|
+
"hasMultipleCovers": {
|
|
140
|
+
"type": "boolean",
|
|
141
|
+
"mutable": false,
|
|
142
|
+
"complexType": {
|
|
143
|
+
"original": "boolean",
|
|
144
|
+
"resolved": "boolean",
|
|
145
|
+
"references": {}
|
|
146
|
+
},
|
|
147
|
+
"required": false,
|
|
148
|
+
"optional": false,
|
|
149
|
+
"docs": {
|
|
150
|
+
"tags": [],
|
|
151
|
+
"text": "Indicates whether the card has multiple covers.\nThis is used to apply specific styles when there are multiple covers."
|
|
152
|
+
},
|
|
153
|
+
"attribute": "has-multiple-covers",
|
|
154
|
+
"reflect": false,
|
|
155
|
+
"defaultValue": "false"
|
|
156
|
+
},
|
|
157
|
+
"isInfoCard": {
|
|
158
|
+
"type": "boolean",
|
|
159
|
+
"mutable": false,
|
|
160
|
+
"complexType": {
|
|
161
|
+
"original": "boolean",
|
|
162
|
+
"resolved": "boolean",
|
|
163
|
+
"references": {}
|
|
164
|
+
},
|
|
165
|
+
"required": false,
|
|
166
|
+
"optional": false,
|
|
167
|
+
"docs": {
|
|
168
|
+
"tags": [],
|
|
169
|
+
"text": "Indicates whether the card is an info page.\nThis can be used to apply specific styles or behaviors for info pages."
|
|
170
|
+
},
|
|
171
|
+
"attribute": "is-info-card",
|
|
172
|
+
"reflect": false,
|
|
173
|
+
"defaultValue": "false"
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
static get elementRef() { return "hostElement"; }
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/result-card/z-result-card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAOhE,MAAM,OAAO,WAAW;;QAwDd,oBAAe,GAAG,GAA2B,EAAE;YACrD,OAAO,CACL,EAAC,IAAI,IAAC,QAAQ,EAAE,CAAC;gBACf,WAAK,KAAK,EAAE,qBAAqB,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE;oBAC7E,WAAK,KAAK,EAAC,eAAe;wBACvB,IAAI,CAAC,iBAAiB,IAAI,CACzB;4BACE,WAAK,KAAK,EAAC,2BAA2B,GAAG;4BACzC,WAAK,KAAK,EAAC,2BAA2B,GAAG,CACrC,CACP;wBACD,WACE,GAAG,EAAE,IAAI,CAAC,KAAK,EACf,GAAG,EAAC,YAAY,EAChB,KAAK,EAAC,aAAa,GACnB,CACE,CACF;gBACN,WAAK,KAAK,EAAC,gBAAgB;oBACxB,IAAI,CAAC,MAAM,IAAI,WAAK,KAAK,EAAC,cAAc,IAAE,IAAI,CAAC,MAAM,CAAO;oBAC7D,WAAK,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,SAAS,CAAO;oBAC9C,WAAK,KAAK,EAAC,eAAe,IAAE,IAAI,CAAC,YAAY,CAAO;oBACpD,WAAK,KAAK,EAAC,gBAAgB;wBACzB,YAAM,IAAI,EAAC,MAAM,GAAQ,CACrB;oBACN,WAAK,KAAK,EAAC,eAAe;wBACxB,YAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,CACF,CACD,CACR,CAAC;QACJ,CAAC,CAAC;QAEM,mBAAc,GAAG,GAA2B,EAAE;YACpD,OAAO,CACL,EAAC,IAAI,IACH,QAAQ,EAAE,CAAC,EACX,KAAK,EAAC,WAAW;gBAEjB,WAAK,KAAK,EAAC,kBAAkB;oBAC3B,WAAK,KAAK,EAAC,qBAAqB;wBAC9B,cACE,KAAK,EAAC,WAAW,EACjB,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACV,CACE,CACF;gBACN,WAAK,KAAK,EAAC,gBAAgB;oBACzB,WAAK,KAAK,EAAC,uBAAuB,IAAE,IAAI,CAAC,SAAS,CAAO;oBACzD,WAAK,KAAK,EAAC,6BAA6B,IAAE,IAAI,CAAC,YAAY,CAAO,CAC9D,CACD,CACR,CAAC;QACJ,CAAC,CAAC;;;;;;;iCAhEkB,KAAK;0BAOZ,KAAK;;IA2DlB,MAAM;QACJ,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;QAC/B,CAAC;QAED,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC;IAChC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Host, Prop, h} from \"@stencil/core\";\n\n@Component({\n tag: \"z-result-card\",\n styleUrls: [\"styles.css\", \"../../css-components/z-cover/styles.css\"],\n shadow: true,\n})\nexport class ZResultCard {\n @Element() hostElement: HTMLZResultCardElement;\n\n /**\n * The author of the opera.\n */\n @Prop()\n author?: string;\n\n /**\n * The title of the opera.\n */\n @Prop()\n cardTitle: string;\n\n /**\n * The subtitle of the opera.\n */\n @Prop()\n cardSubtitle: string;\n\n /**\n * Tags associated with the opera.\n * This is a string array that can be used to display tags in the component.\n */\n @Prop()\n operaTags?: string[];\n\n /**\n * The label for the volumes.\n * This is used to display the number of volumes or a related message.\n */\n @Prop()\n volumesLabel?: string;\n\n /**\n * The URL of the cover image.\n * This is used to display the cover image of the opera.\n */\n @Prop()\n cover?: string;\n\n /**\n * Indicates whether the card has multiple covers.\n * This is used to apply specific styles when there are multiple covers.\n */\n @Prop()\n hasMultipleCovers = false;\n\n /**\n * Indicates whether the card is an info page.\n * This can be used to apply specific styles or behaviors for info pages.\n */\n @Prop()\n isInfoCard = false;\n\n private renderOperaCard = (): HTMLZResultCardElement => {\n return (\n <Host tabIndex={0}>\n <div class={`z-cover-container ${this.hasMultipleCovers ? \"has-multiple\" : \"\"}`}>\n <div class=\"z-cover-stack\">\n {this.hasMultipleCovers && (\n <div>\n <div class=\"z-cover-shadow z-shadow-2\" />\n <div class=\"z-cover-shadow z-shadow-1\" />\n </div>\n )}\n <img\n src={this.cover}\n alt=\"Book Cover\"\n class=\"z-cover-img\"\n />\n </div>\n </div>\n <div class=\"info-container\">\n {this.author && <div class=\"author-label\">{this.author}</div>}\n <div class=\"card-title\">{this.cardTitle}</div>\n <div class=\"card-subtitle\">{this.cardSubtitle}</div>\n <div class=\"tags-container\">\n <slot name=\"tags\"></slot>\n </div>\n <div class=\"volumes-label\">\n <slot name=\"volumes\"></slot>\n </div>\n </div>\n </Host>\n );\n };\n\n private renderInfoCard = (): HTMLZResultCardElement => {\n return (\n <Host\n tabIndex={0}\n class=\"info-card\"\n >\n <div class=\"info-icon-column\">\n <div class=\"info-icon-container\">\n <z-icon\n class=\"info-icon\"\n name=\"link\"\n width={18}\n height={18}\n />\n </div>\n </div>\n <div class=\"info-container\">\n <div class=\"card-title info-title\">{this.cardTitle}</div>\n <div class=\"card-subtitle info-subtitle\">{this.cardSubtitle}</div>\n </div>\n </Host>\n );\n };\n\n render(): HTMLZResultCardElement {\n if (this.isInfoCard) {\n return this.renderInfoCard();\n }\n\n return this.renderOperaCard();\n }\n}\n"]}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: flex;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
width: 100%;
|
|
5
|
+
min-width: 0;
|
|
6
|
+
max-width: 500px;
|
|
7
|
+
height: 175px;
|
|
8
|
+
max-height: 175px;
|
|
9
|
+
padding: var(--space-unit);
|
|
10
|
+
border: 2px solid var(--color-surface02);
|
|
11
|
+
border-radius: var(--border-size-large);
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
font-family: var(--font-family-sans);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:host(:focus:focus-visible) {
|
|
17
|
+
z-index: 1;
|
|
18
|
+
box-shadow: var(--shadow-focus-primary);
|
|
19
|
+
outline: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:host(.info-card:focus:focus-visible) {
|
|
23
|
+
z-index: 1;
|
|
24
|
+
box-shadow: var(--shadow-focus-primary);
|
|
25
|
+
outline: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.info-container {
|
|
29
|
+
display: flex;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
min-width: 0;
|
|
32
|
+
flex: 1;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
padding-left: calc(var(--space-unit) * 2);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.author-label {
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
color: var(--color-default-text);
|
|
40
|
+
font-size: var(--font-size-2);
|
|
41
|
+
font-weight: var(--font-rg);
|
|
42
|
+
text-overflow: ellipsis;
|
|
43
|
+
white-space: nowrap;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.card-title {
|
|
47
|
+
display: -webkit-box;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
min-width: 0;
|
|
50
|
+
max-width: 100%;
|
|
51
|
+
max-height: 2.4em;
|
|
52
|
+
margin-top: var(--space-unit);
|
|
53
|
+
margin-bottom: 4px;
|
|
54
|
+
-webkit-box-orient: vertical;
|
|
55
|
+
font-size: var(--font-size-3);
|
|
56
|
+
font-weight: var(--font-bd);
|
|
57
|
+
-webkit-line-clamp: 2;
|
|
58
|
+
line-clamp: 2;
|
|
59
|
+
line-height: 1.2;
|
|
60
|
+
word-break: break-word;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.card-subtitle {
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
color: var(--color-default-text);
|
|
66
|
+
text-overflow: ellipsis;
|
|
67
|
+
white-space: nowrap;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.tags-container {
|
|
71
|
+
display: flex;
|
|
72
|
+
margin-top: var(--space-unit);
|
|
73
|
+
gap: var(--space-unit);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.volumes-label {
|
|
77
|
+
display: flex;
|
|
78
|
+
height: auto;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
margin-top: auto;
|
|
81
|
+
color: var(--color-default-text);
|
|
82
|
+
font-size: var(--font-size-1);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:host(.info-card) {
|
|
86
|
+
display: flex;
|
|
87
|
+
width: 100%;
|
|
88
|
+
max-width: 500px;
|
|
89
|
+
height: 75px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.info-icon-column {
|
|
93
|
+
display: flex;
|
|
94
|
+
width: 50px;
|
|
95
|
+
height: 100%;
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.info-icon-container {
|
|
101
|
+
display: flex;
|
|
102
|
+
width: 34px;
|
|
103
|
+
height: 34px;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
margin-bottom: calc(var(--space-unit) * 4.5);
|
|
107
|
+
background-color: var(--gray50);
|
|
108
|
+
border-radius: var(--border-size-large);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.card-title.info-title {
|
|
112
|
+
display: -webkit-box;
|
|
113
|
+
overflow: hidden;
|
|
114
|
+
min-width: 0;
|
|
115
|
+
max-width: 100%;
|
|
116
|
+
max-height: 2.4em;
|
|
117
|
+
margin-top: 0;
|
|
118
|
+
margin-bottom: 4px;
|
|
119
|
+
-webkit-box-orient: vertical;
|
|
120
|
+
font-size: var(--font-size-3);
|
|
121
|
+
font-weight: var(--font-bd);
|
|
122
|
+
-webkit-line-clamp: 1;
|
|
123
|
+
line-clamp: 1;
|
|
124
|
+
line-height: 1.2;
|
|
125
|
+
word-break: break-word;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.card-subtitle.info-subtitle {
|
|
129
|
+
display: -webkit-box;
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
-webkit-box-orient: vertical;
|
|
132
|
+
-webkit-line-clamp: 2;
|
|
133
|
+
line-clamp: 2;
|
|
134
|
+
line-height: 1.2;
|
|
135
|
+
white-space: normal;
|
|
136
|
+
word-break: break-word;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.info-icon {
|
|
140
|
+
width: 18px;
|
|
141
|
+
height: 18px;
|
|
142
|
+
color: var(--color-default-text);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@media (max-width: 768px) {
|
|
146
|
+
.card-title {
|
|
147
|
+
display: block;
|
|
148
|
+
overflow: hidden;
|
|
149
|
+
max-height: unset;
|
|
150
|
+
-webkit-line-clamp: unset;
|
|
151
|
+
line-clamp: unset;
|
|
152
|
+
line-height: normal;
|
|
153
|
+
text-overflow: ellipsis;
|
|
154
|
+
white-space: nowrap;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.card-title.info-title {
|
|
158
|
+
display: -webkit-box;
|
|
159
|
+
-webkit-box-orient: vertical;
|
|
160
|
+
-webkit-line-clamp: 1;
|
|
161
|
+
line-clamp: 1;
|
|
162
|
+
white-space: normal;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -117,6 +117,8 @@ export { ZPopover as ZPopover } from '../types/components/z-popover/index';
|
|
|
117
117
|
export { defineCustomElement as defineCustomElementZPopover } from './z-popover';
|
|
118
118
|
export { ZRangePicker as ZRangePicker } from '../types/components/date-picker/z-range-picker/index';
|
|
119
119
|
export { defineCustomElement as defineCustomElementZRangePicker } from './z-range-picker';
|
|
120
|
+
export { ZResultCard as ZResultCard } from '../types/components/result-card/z-result-card/index';
|
|
121
|
+
export { defineCustomElement as defineCustomElementZResultCard } from './z-result-card';
|
|
120
122
|
export { ZSearchbar as ZSearchbar } from '../types/components/z-searchbar/index';
|
|
121
123
|
export { defineCustomElement as defineCustomElementZSearchbar } from './z-searchbar';
|
|
122
124
|
export { ZSectionTitle as ZSectionTitle } from '../types/components/deprecated/z-section-title/index';
|
package/dist/components/index.js
CHANGED
|
@@ -60,6 +60,7 @@ export { ZPagination, defineCustomElement as defineCustomElementZPagination } fr
|
|
|
60
60
|
export { ZPanelElem, defineCustomElement as defineCustomElementZPanelElem } from './z-panel-elem.js';
|
|
61
61
|
export { ZPopover, defineCustomElement as defineCustomElementZPopover } from './z-popover.js';
|
|
62
62
|
export { ZRangePicker, defineCustomElement as defineCustomElementZRangePicker } from './z-range-picker.js';
|
|
63
|
+
export { ZResultCard, defineCustomElement as defineCustomElementZResultCard } from './z-result-card.js';
|
|
63
64
|
export { ZSearchbar, defineCustomElement as defineCustomElementZSearchbar } from './z-searchbar.js';
|
|
64
65
|
export { ZSectionTitle, defineCustomElement as defineCustomElementZSectionTitle } from './z-section-title.js';
|
|
65
66
|
export { ZSelect, defineCustomElement as defineCustomElementZSelect } from './z-select.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index.js","mappings":"
|
|
1
|
+
{"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEM,KAAK,GAAG;IACZ,WAAW;;;;;","names":[],"sources":["src/index.ts"],"sourcesContent":["import {colorFromId} from \"./utils/utils\";\n\nconst UTILS = {\n colorFromId,\n};\n\nexport * from \"./beans\";\nexport * from \"./components\";\nexport {UTILS as Utils};\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface ZResultCard extends Components.ZResultCard, HTMLElement {}
|
|
4
|
+
export const ZResultCard: {
|
|
5
|
+
prototype: ZResultCard;
|
|
6
|
+
new (): ZResultCard;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './index9.js';
|
|
3
|
+
|
|
4
|
+
const stylesCss$1 = ":host{display:flex;overflow:hidden;width:100%;min-width:0;max-width:500px;height:175px;max-height:175px;padding:var(--space-unit);border:2px solid var(--color-surface02);border-radius:var(--border-size-large);cursor:pointer;font-family:var(--font-family-sans)}:host(:focus:focus-visible){z-index:1;box-shadow:var(--shadow-focus-primary);outline:none}:host(.info-card:focus:focus-visible){z-index:1;box-shadow:var(--shadow-focus-primary);outline:none}.info-container{display:flex;overflow:hidden;min-width:0;flex:1;flex-direction:column;padding-left:calc(var(--space-unit) * 2)}.author-label{overflow:hidden;color:var(--color-default-text);font-size:var(--font-size-2);font-weight:var(--font-rg);text-overflow:ellipsis;white-space:nowrap}.card-title{display:-webkit-box;overflow:hidden;min-width:0;max-width:100%;max-height:2.4em;margin-top:var(--space-unit);margin-bottom:4px;-webkit-box-orient:vertical;font-size:var(--font-size-3);font-weight:var(--font-bd);-webkit-line-clamp:2;line-clamp:2;line-height:1.2;word-break:break-word}.card-subtitle{overflow:hidden;color:var(--color-default-text);text-overflow:ellipsis;white-space:nowrap}.tags-container{display:flex;margin-top:var(--space-unit);gap:var(--space-unit)}.volumes-label{display:flex;height:auto;flex-direction:column;margin-top:auto;color:var(--color-default-text);font-size:var(--font-size-1)}:host(.info-card){display:flex;width:100%;max-width:500px;height:75px}.info-icon-column{display:flex;width:50px;height:100%;align-items:center;justify-content:center}.info-icon-container{display:flex;width:34px;height:34px;align-items:center;justify-content:center;margin-bottom:calc(var(--space-unit) * 4.5);background-color:var(--gray50);border-radius:var(--border-size-large)}.card-title.info-title{display:-webkit-box;overflow:hidden;min-width:0;max-width:100%;max-height:2.4em;margin-top:0;margin-bottom:4px;-webkit-box-orient:vertical;font-size:var(--font-size-3);font-weight:var(--font-bd);-webkit-line-clamp:1;line-clamp:1;line-height:1.2;word-break:break-word}.card-subtitle.info-subtitle{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;line-height:1.2;white-space:normal;word-break:break-word}.info-icon{width:18px;height:18px;color:var(--color-default-text)}@media (max-width: 768px){.card-title{display:block;overflow:hidden;max-height:unset;-webkit-line-clamp:unset;line-clamp:unset;line-height:normal;text-overflow:ellipsis;white-space:nowrap}.card-title.info-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1;white-space:normal}}";
|
|
5
|
+
const ZResultCardStyle0 = stylesCss$1;
|
|
6
|
+
|
|
7
|
+
const stylesCss = ".z-cover-container{position:relative;display:flex;width:115px;height:175px;align-items:center}.z-cover-stack{width:100%;height:100%}.z-cover-shadow,.z-cover-img{width:115px;min-width:115px;max-width:115px;height:175px;min-height:175px;max-height:175px}.z-cover-container.has-multiple .z-cover-shadow,.z-cover-container.has-multiple .z-cover-img{width:95px;min-width:95px;max-width:95px;height:160px;min-height:160px;max-height:160px}.z-cover-shadow{position:absolute;z-index:1;background:#e0e0e0;border-radius:var(--border-size-large);box-shadow:0 2px 8px rgb(0 0 0 / 10%)}.z-shadow-1{z-index:1;top:var(--space-unit);right:var(--space-unit);border:1px solid var(--gray200)}.z-shadow-2{z-index:0;top:calc(var(--space-unit) * 2);right:calc(var(--space-unit) * 2);border:1px solid var(--gray200)}.z-cover-img{position:absolute;z-index:2;top:0;right:0;border-radius:6px;box-shadow:0 2px 8px rgb(0 0 0 / 12%);object-fit:cover;object-position:left}.z-cover-container.has-multiple .z-cover-img{right:0}";
|
|
8
|
+
const ZResultCardStyle1 = stylesCss;
|
|
9
|
+
|
|
10
|
+
const ZResultCard$1 = /*@__PURE__*/ proxyCustomElement(class ZResultCard extends HTMLElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.__registerHost();
|
|
14
|
+
this.__attachShadow();
|
|
15
|
+
this.renderOperaCard = () => {
|
|
16
|
+
return (h(Host, { tabIndex: 0 }, h("div", { class: `z-cover-container ${this.hasMultipleCovers ? "has-multiple" : ""}` }, h("div", { class: "z-cover-stack" }, this.hasMultipleCovers && (h("div", null, h("div", { class: "z-cover-shadow z-shadow-2" }), h("div", { class: "z-cover-shadow z-shadow-1" }))), h("img", { src: this.cover, alt: "Book Cover", class: "z-cover-img" }))), h("div", { class: "info-container" }, this.author && h("div", { class: "author-label" }, this.author), h("div", { class: "card-title" }, this.cardTitle), h("div", { class: "card-subtitle" }, this.cardSubtitle), h("div", { class: "tags-container" }, h("slot", { name: "tags" })), h("div", { class: "volumes-label" }, h("slot", { name: "volumes" })))));
|
|
17
|
+
};
|
|
18
|
+
this.renderInfoCard = () => {
|
|
19
|
+
return (h(Host, { tabIndex: 0, class: "info-card" }, h("div", { class: "info-icon-column" }, h("div", { class: "info-icon-container" }, h("z-icon", { class: "info-icon", name: "link", width: 18, height: 18 }))), h("div", { class: "info-container" }, h("div", { class: "card-title info-title" }, this.cardTitle), h("div", { class: "card-subtitle info-subtitle" }, this.cardSubtitle))));
|
|
20
|
+
};
|
|
21
|
+
this.author = undefined;
|
|
22
|
+
this.cardTitle = undefined;
|
|
23
|
+
this.cardSubtitle = undefined;
|
|
24
|
+
this.operaTags = undefined;
|
|
25
|
+
this.volumesLabel = undefined;
|
|
26
|
+
this.cover = undefined;
|
|
27
|
+
this.hasMultipleCovers = false;
|
|
28
|
+
this.isInfoCard = false;
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
if (this.isInfoCard) {
|
|
32
|
+
return this.renderInfoCard();
|
|
33
|
+
}
|
|
34
|
+
return this.renderOperaCard();
|
|
35
|
+
}
|
|
36
|
+
get hostElement() { return this; }
|
|
37
|
+
static get style() { return ZResultCardStyle0 + ZResultCardStyle1; }
|
|
38
|
+
}, [1, "z-result-card", {
|
|
39
|
+
"author": [1],
|
|
40
|
+
"cardTitle": [1, "card-title"],
|
|
41
|
+
"cardSubtitle": [1, "card-subtitle"],
|
|
42
|
+
"operaTags": [16],
|
|
43
|
+
"volumesLabel": [1, "volumes-label"],
|
|
44
|
+
"cover": [1],
|
|
45
|
+
"hasMultipleCovers": [4, "has-multiple-covers"],
|
|
46
|
+
"isInfoCard": [4, "is-info-card"]
|
|
47
|
+
}]);
|
|
48
|
+
function defineCustomElement$1() {
|
|
49
|
+
if (typeof customElements === "undefined") {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const components = ["z-result-card", "z-icon"];
|
|
53
|
+
components.forEach(tagName => { switch (tagName) {
|
|
54
|
+
case "z-result-card":
|
|
55
|
+
if (!customElements.get(tagName)) {
|
|
56
|
+
customElements.define(tagName, ZResultCard$1);
|
|
57
|
+
}
|
|
58
|
+
break;
|
|
59
|
+
case "z-icon":
|
|
60
|
+
if (!customElements.get(tagName)) {
|
|
61
|
+
defineCustomElement$2();
|
|
62
|
+
}
|
|
63
|
+
break;
|
|
64
|
+
} });
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const ZResultCard = ZResultCard$1;
|
|
68
|
+
const defineCustomElement = defineCustomElement$1;
|
|
69
|
+
|
|
70
|
+
export { ZResultCard, defineCustomElement };
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=z-result-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"z-result-card.js","mappings":";;;AAAA,MAAMA,WAAS,GAAG,8hFAA8hF,CAAC;AACjjF,0BAAeA,WAAS;;ACDxB,MAAM,SAAS,GAAG,q+BAAq+B,CAAC;AACx/B,0BAAe,SAAS;;MCMXC,aAAW;;;;;QAwDd,oBAAe,GAAG;YACxB,QACE,EAAC,IAAI,IAAC,QAAQ,EAAE,CAAC,IACf,WAAK,KAAK,EAAE,qBAAqB,IAAI,CAAC,iBAAiB,GAAG,cAAc,GAAG,EAAE,EAAE,IAC7E,WAAK,KAAK,EAAC,eAAe,IACvB,IAAI,CAAC,iBAAiB,KACrB,eACE,WAAK,KAAK,EAAC,2BAA2B,GAAG,EACzC,WAAK,KAAK,EAAC,2BAA2B,GAAG,CACrC,CACP,EACD,WACE,GAAG,EAAE,IAAI,CAAC,KAAK,EACf,GAAG,EAAC,YAAY,EAChB,KAAK,EAAC,aAAa,GACnB,CACE,CACF,EACN,WAAK,KAAK,EAAC,gBAAgB,IACxB,IAAI,CAAC,MAAM,IAAI,WAAK,KAAK,EAAC,cAAc,IAAE,IAAI,CAAC,MAAM,CAAO,EAC7D,WAAK,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,SAAS,CAAO,EAC9C,WAAK,KAAK,EAAC,eAAe,IAAE,IAAI,CAAC,YAAY,CAAO,EACpD,WAAK,KAAK,EAAC,gBAAgB,IACzB,YAAM,IAAI,EAAC,MAAM,GAAQ,CACrB,EACN,WAAK,KAAK,EAAC,eAAe,IACxB,YAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,CACF,CACD,EACP;SACH,CAAC;QAEM,mBAAc,GAAG;YACvB,QACE,EAAC,IAAI,IACH,QAAQ,EAAE,CAAC,EACX,KAAK,EAAC,WAAW,IAEjB,WAAK,KAAK,EAAC,kBAAkB,IAC3B,WAAK,KAAK,EAAC,qBAAqB,IAC9B,cACE,KAAK,EAAC,WAAW,EACjB,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACV,CACE,CACF,EACN,WAAK,KAAK,EAAC,gBAAgB,IACzB,WAAK,KAAK,EAAC,uBAAuB,IAAE,IAAI,CAAC,SAAS,CAAO,EACzD,WAAK,KAAK,EAAC,6BAA6B,IAAE,IAAI,CAAC,YAAY,CAAO,CAC9D,CACD,EACP;SACH,CAAC;;;;;;;iCAhEkB,KAAK;0BAOZ,KAAK;;IA2DlB,MAAM;QACJ,IAAI,IAAI,CAAC,UAAU,EAAE;YACnB,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;SAC9B;QAED,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC;KAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["stylesCss","ZResultCard"],"sources":["src/components/result-card/z-result-card/styles.css?tag=z-result-card&encapsulation=shadow","src/components/css-components/z-cover/styles.css?tag=z-result-card&encapsulation=shadow","src/components/result-card/z-result-card/index.tsx"],"sourcesContent":[":host {\n display: flex;\n overflow: hidden;\n width: 100%;\n min-width: 0;\n max-width: 500px;\n height: 175px;\n max-height: 175px;\n padding: var(--space-unit);\n border: 2px solid var(--color-surface02);\n border-radius: var(--border-size-large);\n cursor: pointer;\n font-family: var(--font-family-sans);\n}\n\n:host(:focus:focus-visible) {\n z-index: 1;\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\n:host(.info-card:focus:focus-visible) {\n z-index: 1;\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\n.info-container {\n display: flex;\n overflow: hidden;\n min-width: 0;\n flex: 1;\n flex-direction: column;\n padding-left: calc(var(--space-unit) * 2);\n}\n\n.author-label {\n overflow: hidden;\n color: var(--color-default-text);\n font-size: var(--font-size-2);\n font-weight: var(--font-rg);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.card-title {\n display: -webkit-box;\n overflow: hidden;\n min-width: 0;\n max-width: 100%;\n max-height: 2.4em;\n margin-top: var(--space-unit);\n margin-bottom: 4px;\n -webkit-box-orient: vertical;\n font-size: var(--font-size-3);\n font-weight: var(--font-bd);\n -webkit-line-clamp: 2;\n line-clamp: 2;\n line-height: 1.2;\n word-break: break-word;\n}\n\n.card-subtitle {\n overflow: hidden;\n color: var(--color-default-text);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.tags-container {\n display: flex;\n margin-top: var(--space-unit);\n gap: var(--space-unit);\n}\n\n.volumes-label {\n display: flex;\n height: auto;\n flex-direction: column;\n margin-top: auto;\n color: var(--color-default-text);\n font-size: var(--font-size-1);\n}\n\n:host(.info-card) {\n display: flex;\n width: 100%;\n max-width: 500px;\n height: 75px;\n}\n\n.info-icon-column {\n display: flex;\n width: 50px;\n height: 100%;\n align-items: center;\n justify-content: center;\n}\n\n.info-icon-container {\n display: flex;\n width: 34px;\n height: 34px;\n align-items: center;\n justify-content: center;\n margin-bottom: calc(var(--space-unit) * 4.5);\n background-color: var(--gray50);\n border-radius: var(--border-size-large);\n}\n\n.card-title.info-title {\n display: -webkit-box;\n overflow: hidden;\n min-width: 0;\n max-width: 100%;\n max-height: 2.4em;\n margin-top: 0;\n margin-bottom: 4px;\n -webkit-box-orient: vertical;\n font-size: var(--font-size-3);\n font-weight: var(--font-bd);\n -webkit-line-clamp: 1;\n line-clamp: 1;\n line-height: 1.2;\n word-break: break-word;\n}\n\n.card-subtitle.info-subtitle {\n display: -webkit-box;\n overflow: hidden;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n line-clamp: 2;\n line-height: 1.2;\n white-space: normal;\n word-break: break-word;\n}\n\n.info-icon {\n width: 18px;\n height: 18px;\n color: var(--color-default-text);\n}\n\n@media (max-width: 768px) {\n .card-title {\n display: block;\n overflow: hidden;\n max-height: unset;\n -webkit-line-clamp: unset;\n line-clamp: unset;\n line-height: normal;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .card-title.info-title {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n line-clamp: 1;\n white-space: normal;\n }\n}\n",".z-cover-container {\n position: relative;\n display: flex;\n width: 115px;\n height: 175px;\n align-items: center;\n}\n\n.z-cover-stack {\n width: 100%;\n height: 100%;\n}\n\n/* Base sizes for single cover */\n.z-cover-shadow,\n.z-cover-img {\n width: 115px;\n min-width: 115px;\n max-width: 115px;\n height: 175px;\n min-height: 175px;\n max-height: 175px;\n}\n\n/* Scaled sizes for multiple covers */\n.z-cover-container.has-multiple .z-cover-shadow,\n.z-cover-container.has-multiple .z-cover-img {\n width: 95px;\n min-width: 95px;\n max-width: 95px;\n height: 160px;\n min-height: 160px;\n max-height: 160px;\n}\n\n.z-cover-shadow {\n position: absolute;\n z-index: 1;\n background: #e0e0e0;\n border-radius: var(--border-size-large);\n box-shadow: 0 2px 8px rgb(0 0 0 / 10%);\n}\n\n.z-shadow-1 {\n z-index: 1;\n top: var(--space-unit);\n right: var(--space-unit);\n border: 1px solid var(--gray200);\n}\n\n.z-shadow-2 {\n z-index: 0;\n top: calc(var(--space-unit) * 2);\n right: calc(var(--space-unit) * 2);\n border: 1px solid var(--gray200);\n}\n\n.z-cover-img {\n position: absolute;\n z-index: 2;\n top: 0;\n right: 0;\n border-radius: 6px;\n box-shadow: 0 2px 8px rgb(0 0 0 / 12%);\n object-fit: cover;\n object-position: left;\n}\n\n.z-cover-container.has-multiple .z-cover-img {\n right: 0;\n}\n","import {Component, Element, Host, Prop, h} from \"@stencil/core\";\n\n@Component({\n tag: \"z-result-card\",\n styleUrls: [\"styles.css\", \"../../css-components/z-cover/styles.css\"],\n shadow: true,\n})\nexport class ZResultCard {\n @Element() hostElement: HTMLZResultCardElement;\n\n /**\n * The author of the opera.\n */\n @Prop()\n author?: string;\n\n /**\n * The title of the opera.\n */\n @Prop()\n cardTitle: string;\n\n /**\n * The subtitle of the opera.\n */\n @Prop()\n cardSubtitle: string;\n\n /**\n * Tags associated with the opera.\n * This is a string array that can be used to display tags in the component.\n */\n @Prop()\n operaTags?: string[];\n\n /**\n * The label for the volumes.\n * This is used to display the number of volumes or a related message.\n */\n @Prop()\n volumesLabel?: string;\n\n /**\n * The URL of the cover image.\n * This is used to display the cover image of the opera.\n */\n @Prop()\n cover?: string;\n\n /**\n * Indicates whether the card has multiple covers.\n * This is used to apply specific styles when there are multiple covers.\n */\n @Prop()\n hasMultipleCovers = false;\n\n /**\n * Indicates whether the card is an info page.\n * This can be used to apply specific styles or behaviors for info pages.\n */\n @Prop()\n isInfoCard = false;\n\n private renderOperaCard = (): HTMLZResultCardElement => {\n return (\n <Host tabIndex={0}>\n <div class={`z-cover-container ${this.hasMultipleCovers ? \"has-multiple\" : \"\"}`}>\n <div class=\"z-cover-stack\">\n {this.hasMultipleCovers && (\n <div>\n <div class=\"z-cover-shadow z-shadow-2\" />\n <div class=\"z-cover-shadow z-shadow-1\" />\n </div>\n )}\n <img\n src={this.cover}\n alt=\"Book Cover\"\n class=\"z-cover-img\"\n />\n </div>\n </div>\n <div class=\"info-container\">\n {this.author && <div class=\"author-label\">{this.author}</div>}\n <div class=\"card-title\">{this.cardTitle}</div>\n <div class=\"card-subtitle\">{this.cardSubtitle}</div>\n <div class=\"tags-container\">\n <slot name=\"tags\"></slot>\n </div>\n <div class=\"volumes-label\">\n <slot name=\"volumes\"></slot>\n </div>\n </div>\n </Host>\n );\n };\n\n private renderInfoCard = (): HTMLZResultCardElement => {\n return (\n <Host\n tabIndex={0}\n class=\"info-card\"\n >\n <div class=\"info-icon-column\">\n <div class=\"info-icon-container\">\n <z-icon\n class=\"info-icon\"\n name=\"link\"\n width={18}\n height={18}\n />\n </div>\n </div>\n <div class=\"info-container\">\n <div class=\"card-title info-title\">{this.cardTitle}</div>\n <div class=\"card-subtitle info-subtitle\">{this.cardSubtitle}</div>\n </div>\n </Host>\n );\n };\n\n render(): HTMLZResultCardElement {\n if (this.isInfoCard) {\n return this.renderInfoCard();\n }\n\n return this.renderOperaCard();\n }\n}\n"],"version":3}
|
|
@@ -204,6 +204,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
204
204
|
return import(
|
|
205
205
|
/* webpackMode: "lazy" */
|
|
206
206
|
'./z-range-picker.entry.js').then(processMod, consoleError);
|
|
207
|
+
case 'z-result-card':
|
|
208
|
+
return import(
|
|
209
|
+
/* webpackMode: "lazy" */
|
|
210
|
+
'./z-result-card.entry.js').then(processMod, consoleError);
|
|
207
211
|
case 'z-section-title':
|
|
208
212
|
return import(
|
|
209
213
|
/* webpackMode: "lazy" */
|